public final class CredentialRecoverer extends CMPSoftwareCredentialReader
All communication with the Entrust Security Manager is done using the PKIX-CMP protocol.
Recovering an Entrust Digital Identity involves generating all client generated key pairs in software, requesting all server generated key pairs from the Security Manager, and securely storing all in a software-based Digital Identity store.
When recovering an Entrust Digital Identity, the user must have a connection to the Security Manager and Directory set, and must have a credential writer set. The following credential writers can all be used with this credential reader:
FilenameProfileWriterStreamProfileWriterRoamingCredentialWriter
User user = new User(); JNDIDirectory directory = new JNDIDirectory(DIRECTORY_IP, DIRECTORY_PORT); ManagerTransport transport = new ManagerTransport(MANAGER_IP, MANAGER_PORT); user.setConnections(directory, transport); SecureStringBuffer secureRefNum = new SecureStringBuffer(REF_NUM); AuthorizationCode secureAuthCode = new AuthorizationCode(AUTH_CODE); SecureStringBuffer securePassword = new SecureStringBuffer(PASSWORD); CredentialReader credentialReader = new CredentialRecoverer(secureRefNum, secureAuthCode); CredentialWriter credentialWriter = new FilenameProfileWriter(EPF_FILE_NAME); user.setCredentialWriter(credentialWriter); user.login(credentialReader, securePassword);
DSASignature, ECDSASignature, PKIX4Version, PKIX5Version, RSASignature| Constructor and Description |
|---|
CredentialRecoverer(SecureStringBuffer referenceNumber,
AuthorizationCode authorizationCode)
A constructor; create a new
CredentialRecoverer object. |
CredentialRecoverer(SecureStringBuffer referenceNumber,
AuthorizationCode authorizationCode,
java.security.spec.AlgorithmParameterSpec clientKeyGenerationParameter)
A constructor; creates a new
CredentialRecoverer object and
configures it for operation with custom key generation parameters. |
CredentialRecoverer(SecureStringBuffer referenceNumber,
AuthorizationCode authorizationCode,
int signingKeyAlgorithm,
java.security.spec.AlgorithmParameterSpec clientKeyGenerationParameter,
int pkixVersion)
Deprecated.
this constructor contains obsolete parameters; use another
constructor that does not.
|
CredentialRecoverer(SecureStringBuffer referenceNumber,
AuthorizationCode authorizationCode,
int signingKeyAlgorithm,
int signingKeyStrength,
int pkixVersion)
Deprecated.
this constructor contains obsolete parameters; use another
constructor that does not
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getType()
Returns the type (name) of this specific credential reader.
|
void |
setPreserveUserKeyPairVersion(boolean preserveUserKeyPairVersion)
Allows the caller to maintain the client key-pair version during
a recover operation.
|
setClientKeyGenerationUtilsetClientKeyGenParams, setForceV1KeyPaircheckPwdpublic CredentialRecoverer(SecureStringBuffer referenceNumber, AuthorizationCode authorizationCode)
CredentialRecoverer object.
Using the reference number and authentication code, the user's Digital Identity is recovered using the PKIX-CMP protocol. Any keys that are to be client generated are generated in software. All other information is retrieved from the Security Manager and written to the software-based Digital Identity store.
referenceNumber - the reference number assigned to the user; an 8 digit integer
obtained from the Security Manager by the PKI AdministratorauthorizationCode - the authorization code assigned to the user; an alphanumeric
string (of the form ABCD-EFGH-IJKL) obtained from the Security
Manager by the PKI Administratorjava.lang.IllegalArgumentException - thrown if any of the required parameters are
nullpublic CredentialRecoverer(SecureStringBuffer referenceNumber, AuthorizationCode authorizationCode, int signingKeyAlgorithm, int signingKeyStrength, int pkixVersion)
CredentialRecoverer object
(legacy).
Using the reference number and authentication code, the user's Digital Identity is recovered using the PKIX-CMP protocol. Any keys that are to be client generated are generated in software. All other information is retrieved from the Security Manager and written to the software-based Digital Identity store.
referenceNumber - the reference number assigned to the user; an 8 digit integer
obtained from the Security Manager by the PKI AdministratorauthorizationCode - the authorization code assigned to the user; an alphanumeric
string (of the form ABCD-EFGH-IJKL) obtained from the Security
Manager by the PKI AdministratorsigningKeyAlgorithm - this parameter is no longer used; as of JTK 7.0 the algorithm
of the signing key pair is always extracted from the user's
policy settingssigningKeyStrength - this parameter is no longer used; as of JTK 7.0 the strength
of the signing key pair is always extracted from the user's
policy settingspkixVersion - this parameter is no longer used; as of JTK 7.0 proto-PKIX is
not supported and instead PKIX-CMP is always used for
communication with the Security Managerjava.lang.IllegalArgumentException - thrown if any of the required parameters are
nullpublic CredentialRecoverer(SecureStringBuffer referenceNumber, AuthorizationCode authorizationCode, java.security.spec.AlgorithmParameterSpec clientKeyGenerationParameter)
CredentialRecoverer object and
configures it for operation with custom key generation parameters.
Using the reference number and authentication code, the user's Digital Identity is recovered using the PKIX-CMP protocol. Any keys that are to be client generated are generated in software. All other information is retrieved from the Security Manager and written to a software-based Digital Identity store.
referenceNumber - the reference number assigned to the user; an 8 digit integer
obtained from the Security Manager by the PKI AdministratorauthorizationCode - the authorization code assigned to the user; an alphanumeric
string (of the form ABCD-EFGH-IJKL) obtained from the Security
Manager by the PKI AdministratorclientKeyGenerationParameter - client specified key generation parametersjava.lang.IllegalArgumentException - thrown if any of the required parameters are
nullpublic CredentialRecoverer(SecureStringBuffer referenceNumber, AuthorizationCode authorizationCode, int signingKeyAlgorithm, java.security.spec.AlgorithmParameterSpec clientKeyGenerationParameter, int pkixVersion)
CredentialRecoverer object and
configures it for operation with custom key generation parameters
(legacy).
Using the reference number and authentication code, the user's Digital Identity is recovered using the PKIX-CMP protocol. Any keys that are to be client generated are generated in software. All other information is retrieved from the Security Manager and written to a software-based Digital Identity store.
referenceNumber - the reference number assigned to the user; an 8 digit integer
obtained from the Security Manager by the PKI AdministratorauthorizationCode - the authorization code assigned to the user; an alphanumeric
string (of the form ABCD-EFGH-IJKL) obtained from the Security
Manager by the PKI AdministratorsigningKeyAlgorithm - this parameter is no longer used; as of JTK 7.0 the algorithm
of the signing key pair is always extracted from the user's
policy settingsclientKeyGenerationParameter - client specified key generation parameterspkixVersion - this parameter is no longer used; as of JTK 7.0 proto-PKIX is
not supported and instead PKIX-CMP is always used for
communication with the Security Managerjava.lang.IllegalArgumentException - thrown if any of the required parameters are
nullpublic java.lang.String getType()
CredentialReadergetType in class CredentialReaderpublic void setPreserveUserKeyPairVersion(boolean preserveUserKeyPairVersion)
The user will be recovered using the protocol version that matches the users key-pair type.
preserveUserKeyPairVersion - when true the user key-pair version will not change.
When false the user key-pair version will be handled
as described in setForceV1KeyPair. This
setting takes precedence over the setForceV1KeyPair
setting.