Search in sources :

Example 11 with AuthDataResponse

use of org.openecard.common.anytype.AuthDataResponse in project open-ecard by ecsec.

the class EAC2OutputType method getAuthDataType.

/**
 * Returns the DIDAuthenticationDataType.
 *
 * @return DIDAuthenticationDataType
 */
public DIDAuthenticationDataType getAuthDataType() {
    AuthDataResponse authResponse = authMap.createResponse(new iso.std.iso_iec._24727.tech.schema.EAC2OutputType());
    if (challenge != null) {
        authResponse.addElement(CHALLENGE, ByteUtils.toHexString(challenge));
    } else {
        authResponse.addElement(EF_CARDSECURITY, ByteUtils.toHexString(efCardSecurity));
        authResponse.addElement(TOKEN, ByteUtils.toHexString(token));
        authResponse.addElement(NONCE, ByteUtils.toHexString(nonce));
    }
    return authResponse.getResponse();
}
Also used : AuthDataResponse(org.openecard.common.anytype.AuthDataResponse)

Aggregations

AuthDataResponse (org.openecard.common.anytype.AuthDataResponse)11 DIDAuthenticationDataType (iso.std.iso_iec._24727.tech.schema.DIDAuthenticationDataType)8 EstablishChannel (iso.std.iso_iec._24727.tech.schema.EstablishChannel)8 EstablishChannelResponse (iso.std.iso_iec._24727.tech.schema.EstablishChannelResponse)8 AuthDataMap (org.openecard.common.anytype.AuthDataMap)8 ExecutionResults (org.openecard.gui.executor.ExecutionResults)8 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)5 PasswordField (org.openecard.gui.definition.PasswordField)5 WSException (org.openecard.common.WSHelper.WSException)3 StepActionResult (org.openecard.gui.executor.StepActionResult)3 Step (org.openecard.gui.definition.Step)2 DestroyChannel (iso.std.iso_iec._24727.tech.schema.DestroyChannel)1 APDUException (org.openecard.common.apdu.exception.APDUException)1 StepAction (org.openecard.gui.executor.StepAction)1 IFDException (org.openecard.ifd.scio.IFDException)1