public final class CapiCredentialRecoverer extends CapiCmpCredentialReader
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 MSCAPI, requesting all server generated key pairs from the Security Manager, and securely storing all in an MSCAPI-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:
CapiCredentialWriter
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 CapiCredentialRecoverer(secureRefNum, secureAuthCode); CredentialWriter credentialWriter = new CapiCredentialWriter(); user.setCredentialWriter(credentialWriter); user.login(credentialReader, securePassword);
DSASignature, ECDSASignature, PKIX4Version, PKIX5Version, RSASignature| Constructor and Description |
|---|
CapiCredentialRecoverer(SecureStringBuffer referenceNumber,
AuthorizationCode authorizationCode)
A constructor; creates a new
CapiCredentialRecoverer object. |
| 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.
|
setClientKeyGenParams, setForceV1KeyPaircheckPwdpublic CapiCredentialRecoverer(SecureStringBuffer referenceNumber, AuthorizationCode authorizationCode)
CapiCredentialRecoverer 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 MSCAPI. All other information is retrieved from the Security Manager and written to the MSCAPI-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 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.