seq = RandomStringUtils.randomNumeric(5);
getLogger().info("No sequence given, using random 5 number sequence: "+seq);
}
HolderReferenceField holderRef = new HolderReferenceField(country, mnemonic, seq);
CAReferenceField caRef = new CAReferenceField(holderRef.getCountry(), holderRef.getMnemonic(), holderRef.getSequence());
AuthorizationRoleEnum authRole = AuthorizationRoleEnum.CVCA;
Date notBefore = new Date();
Calendar notAfter = Calendar.getInstance();
notAfter.add(Calendar.DAY_OF_MONTH, valdays);
CVCertificate cvc = CertificateGenerator.createCertificate(pubKey, privKey,
sigAlg, caRef, holderRef, authRole, AccessRightEnum.READ_ACCESS_DG3_AND_DG4, notBefore, notAfter.getTime(), "BC");