X509Extensions.Extension ag = (X509Extensions.Extension)iter.next();
try {
byte[] bytes = ag.getRealValueBytes();
generator.addExtension(ag.getRealOid(),ag.getRealCritical(),bytes);
} catch (IOException ioe) {
throw runtime.newIOErrorFromException(ioe);
}
}
generator.setSignatureAlgorithm(digAlg + "WITH" + keyAlg);
if (public_key == null) {