org.italiangrid.voms.util
public class CredentialsUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CredentialsUtils.PrivateKeyEncoding
The encoding used to serialize proxy credentials private key.
|
Modifier and Type | Field and Description |
---|---|
static CredentialsUtils.PrivateKeyEncoding |
DEFAULT_ENCONDING
The default encoding used when no encoding is specified by callers.
|
Constructor and Description |
---|
CredentialsUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
savePrivateKey(OutputStream os,
PrivateKey key,
CredentialsUtils.PrivateKeyEncoding encoding)
Serializes a private key to an output stream according to an encoding.
|
static void |
saveProxyCredentials(OutputStream os,
eu.emi.security.authn.x509.X509Credential uc)
Saves user credentials as a plain text PEM data.
|
static void |
saveProxyCredentials(OutputStream os,
eu.emi.security.authn.x509.X509Credential uc,
CredentialsUtils.PrivateKeyEncoding encoding)
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.
|
static void |
saveProxyCredentials(String proxyFileName,
eu.emi.security.authn.x509.X509Credential uc,
CredentialsUtils.PrivateKeyEncoding encoding)
Saves proxy credentials to a file.
|
public static final CredentialsUtils.PrivateKeyEncoding DEFAULT_ENCONDING
public static void savePrivateKey(OutputStream os, PrivateKey key, CredentialsUtils.PrivateKeyEncoding encoding) throws IllegalArgumentException, IOException
os
- key
- encoding
- IllegalArgumentException
IOException
public static void saveProxyCredentials(OutputStream os, eu.emi.security.authn.x509.X509Credential uc, CredentialsUtils.PrivateKeyEncoding encoding) throws UnrecoverableKeyException, KeyStoreException, IllegalArgumentException, NoSuchAlgorithmException, IOException, NoSuchProviderException, CertificateException
os
- uc
- encoding
- UnrecoverableKeyException
KeyStoreException
IllegalArgumentException
NoSuchAlgorithmException
IOException
NoSuchProviderException
CertificateException
public static void saveProxyCredentials(OutputStream os, eu.emi.security.authn.x509.X509Credential uc) throws UnrecoverableKeyException, KeyStoreException, IllegalArgumentException, NoSuchAlgorithmException, IOException, NoSuchProviderException, CertificateException
DEFAULT_ENCONDING
.public static void saveProxyCredentials(String proxyFileName, eu.emi.security.authn.x509.X509Credential uc, CredentialsUtils.PrivateKeyEncoding encoding) throws IOException, UnrecoverableKeyException, KeyStoreException, IllegalArgumentException, NoSuchAlgorithmException, NoSuchProviderException, CertificateException
proxyFileName
- the file where the proxy will be saveduc
- the credential to be savedencoding
- the private key encodingIOException
UnrecoverableKeyException
KeyStoreException
IllegalArgumentException
NoSuchAlgorithmException
NoSuchProviderException
CertificateException
public static void saveProxyCredentials(String proxyFileName, eu.emi.security.authn.x509.X509Credential uc) throws UnrecoverableKeyException, KeyStoreException, IllegalArgumentException, NoSuchAlgorithmException, NoSuchProviderException, CertificateException, IOException
DEFAULT_ENCONDING
.proxyFileName
- uc
- UnrecoverableKeyException
KeyStoreException
IllegalArgumentException
NoSuchAlgorithmException
NoSuchProviderException
CertificateException
IOException
Copyright © 2014. All rights reserved.