if (submessage.getSignCA() != -1) {
signCA = submessage.getSignCA();
}
HardTokenProfile htp = hardTokenSession.getHardTokenProfile(admin, data.getTokenType());
if ( htp!=null && htp instanceof EIDProfile ) {
EIDProfile hardTokenProfile = (EIDProfile)htp;
if (authCertProfile == -1) {
authCertProfile = hardTokenProfile.getCertificateProfileId(SwedishEIDProfile.CERTUSAGE_AUTHENC);
}
if (signCertProfile == -1) {
signCertProfile = hardTokenProfile.getCertificateProfileId(SwedishEIDProfile.CERTUSAGE_SIGN);
}
if (authCA == -1) {
authCA = hardTokenProfile.getCAId(SwedishEIDProfile.CERTUSAGE_AUTHENC);
if (authCA == EIDProfile.CAID_USEUSERDEFINED) {
authCA = data.getCAId();
}
}
if (signCA == -1) {
signCA = hardTokenProfile.getCAId(SwedishEIDProfile.CERTUSAGE_SIGN);
if (signCA == EIDProfile.CAID_USEUSERDEFINED) {
signCA = data.getCAId();
}
}
} else {