log.debug("We will create a link certificate.");
X509CAInfo info = (X509CAInfo)getCAInfo();
UserDataVO cadata = new UserDataVO("nobody", info.getSubjectDN(), info.getSubjectDN().hashCode(), info.getSubjectAltName(), null,
0,0,0, info.getCertificateProfileId(), null, null, 0, 0, null);
CertificateProfile certProfile = new RootCACertificateProfile();
if((info.getPolicies() != null) && (info.getPolicies().size() > 0)) {
certProfile.setUseCertificatePolicies(true);
certProfile.setCertificatePolicies(info.getPolicies());
}
PublicKey previousCaPublicKey = catoken.getPublicKey(SecConst.CAKEYPURPOSE_CERTSIGN_PREVIOUS);
PrivateKey previousCaPrivateKey = catoken.getPrivateKey(SecConst.CAKEYPURPOSE_CERTSIGN_PREVIOUS);
String provider = catoken.getProvider();
String sequence = catoken.getCATokenInfo().getKeySequence(); // get from CAtoken to make sure it is fresh