org.italiangrid.voms.util
Class CredentialsUtils

java.lang.Object
  extended by org.italiangrid.voms.util.CredentialsUtils

public class CredentialsUtils
extends Object

An utility class for handling credentials

Author:
Daniele Andreotti, Andrea Ceccanti

Constructor Summary
CredentialsUtils()
           
 
Method Summary
static void saveProxyCredentials(OutputStream os, eu.emi.security.authn.x509.X509Credential uc)
          Saves user credentials as a plain text PEM data.
static void saveProxyCredentials(String proxyFileName, eu.emi.security.authn.x509.X509Credential uc)
          Saves proxy credentials to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CredentialsUtils

public CredentialsUtils()
Method Detail

saveProxyCredentials

public static void saveProxyCredentials(OutputStream os,
                                        eu.emi.security.authn.x509.X509Credential uc)
                                 throws UnrecoverableKeyException,
                                        KeyStoreException,
                                        IllegalArgumentException,
                                        NoSuchAlgorithmException,
                                        IOException,
                                        NoSuchProviderException,
                                        CertificateException
Saves user credentials as a plain text PEM data.
Writes the user certificate chain first, then the user key.

Throws:
IOException
NoSuchAlgorithmException
IllegalArgumentException
KeyStoreException
UnrecoverableKeyException
NoSuchProviderException
CertificateException

saveProxyCredentials

public static void saveProxyCredentials(String proxyFileName,
                                        eu.emi.security.authn.x509.X509Credential uc)
                                 throws IOException,
                                        UnrecoverableKeyException,
                                        KeyStoreException,
                                        IllegalArgumentException,
                                        NoSuchAlgorithmException,
                                        NoSuchProviderException,
                                        CertificateException
Saves proxy credentials to a file. This method ensures that the stored proxy is saved with the appropriate file permissions.

Parameters:
proxyFileName -
uc -
Throws:
IOException
UnrecoverableKeyException
KeyStoreException
IllegalArgumentException
NoSuchAlgorithmException
NoSuchProviderException
CertificateException


Copyright © 2013. All Rights Reserved.