|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.adobe.flashaccess.sdk.cert.ServerCredentialFactory
public class ServerCredentialFactory
Utilities for getting instances of ServerCredential.
Constructor Summary | |
---|---|
ServerCredentialFactory()
|
Method Summary | |
---|---|
static ServerCredential |
getServerCredential(java.io.File pfxFile,
java.lang.String password)
Creates a ServerCredential from a PKCS12 file containing the
certificate and private key. |
static ServerCredential |
getServerCredential(java.io.InputStream pfxInputStream,
java.lang.String password)
Creates a ServerCredential from a PKCS12 file containing the
certificate and private key. |
static ServerCredential |
getServerCredential(java.security.PrivateKey privateKey,
java.security.cert.Certificate certificate)
Creates a ServerCredential for the given private key and certificate. |
static ServerCredential |
getServerCredential(java.security.PrivateKey privateKey,
java.security.cert.Certificate[] chain)
Creates a ServerCredential for the given private key and certificate chain. |
static ServerCredential |
getServerCredential(java.security.PrivateKey privateKey,
java.security.cert.Certificate[] chain,
java.lang.String provider)
Creates a ServerCredential for the given private key and certificate chain. |
static ServerCredential |
getServerCredential(java.security.PrivateKey privateKey,
java.security.cert.Certificate certificate,
java.lang.String provider)
Creates a ServerCredential for the given private key and certificate. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerCredentialFactory()
Method Detail |
---|
public static ServerCredential getServerCredential(java.security.PrivateKey privateKey, java.security.cert.Certificate[] chain) throws ServerCredentialException
ServerCredential
for the given private key and certificate chain.
This constructor must not be used for private keys stored on an HSM.
privateKey
- The private key.chain
- The certificate chain. The first element in the array must be the
certificate corresponding to the private key.
ServerCredentialException
- if the certificate is not valid or expired.
java.lang.IllegalArgumentException
- if the arguments are not valid as described in
java.security.KeyStore.PrivateKeyEntry
.public static ServerCredential getServerCredential(java.security.PrivateKey privateKey, java.security.cert.Certificate certificate) throws ServerCredentialException
ServerCredential
for the given private key and certificate.
This constructor must not be used for private keys stored on an HSM.
privateKey
- The private key.certificate
- The certificate corresponding to the private key.
ServerCredentialException
- if the certificate is not valid or expired.
java.lang.IllegalArgumentException
- if the arguments are not valid as described in
java.security.KeyStore.PrivateKeyEntry
.public static ServerCredential getServerCredential(java.io.File pfxFile, java.lang.String password) throws ServerCredentialException
ServerCredential
from a PKCS12 file containing the
certificate and private key.
pfxFile
- The .pfx file containing the credentials.password
- The password to recover the key from the file.
InvalidServerCredentialException
- if the certificate is not valid.
ServerCredentialException
- if there is a problem loading the certificate from the file,
the password is incorrect, or the certificate is not valid or expired.
java.lang.IllegalArgumentException
- if the arguments are not valid as described in
java.security.KeyStore.PrivateKeyEntry
.public static ServerCredential getServerCredential(java.io.InputStream pfxInputStream, java.lang.String password) throws ServerCredentialException
ServerCredential
from a PKCS12 file containing the
certificate and private key.
pfxInputStream
- The pfx InputStream containing the credentials.password
- The password to recover the key from the file.
InvalidServerCredentialException
- if the certificate is not valid.
ServerCredentialException
- if there is a problem loading the certificate from the file,
the password is incorrect, or the certificate is not valid or expired.
java.lang.IllegalArgumentException
- if the arguments are not valid as described in
java.security.KeyStore.PrivateKeyEntry
.public static ServerCredential getServerCredential(java.security.PrivateKey privateKey, java.security.cert.Certificate[] chain, java.lang.String provider) throws ServerCredentialException
ServerCredential
for the given private key and certificate chain.
This constructor must be used for private keys stored on an HSM.
privateKey
- The private key.chain
- The certificate chain. The first element in the array must be the
certificate corresponding to the private key.provider
- The name of a registered java.security.Provider used to load the PrivateKey
(for example, "PKCS11" for sun.security.pkcs11.SunPKCS11)
ServerCredentialException
- if the certificate is not valid or expired.
java.lang.IllegalArgumentException
- if the arguments are not valid as described in
java.security.KeyStore.PrivateKeyEntry
.public static ServerCredential getServerCredential(java.security.PrivateKey privateKey, java.security.cert.Certificate certificate, java.lang.String provider) throws ServerCredentialException
ServerCredential
for the given private key and certificate.
This constructor must be used for private keys stored on an HSM.
privateKey
- The private key.certificate
- The certificate corresponding to the private key.provider
- The name of a registered java.security.Provider used to load the PrivateKey
(for example, "PKCS11" for sun.security.pkcs11.SunPKCS11)
ServerCredentialException
- if the certificate is not valid or expired.
java.lang.IllegalArgumentException
- if the arguments are not valid as described in
java.security.KeyStore.PrivateKeyEntry
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |