Commit cf6cad9a authored by Laurent Peuch's avatar Laurent Peuch

[fix] nullpointerexception in CA.java\n\nAccording to the decompilation of...

[fix] nullpointerexception in CA.java\n\nAccording to the decompilation of prod this is what is missing in prod.
parent 2d312e35
......@@ -7,6 +7,7 @@ import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.asn1.x509.*;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.cert.X509v3CertificateBuilder;
import org.bouncycastle.cert.bc.BcX509ExtensionUtils;
import org.bouncycastle.cert.jcajce.JcaX509CertificateHolder;
import org.bouncycastle.crypto.util.PrivateKeyFactory;
import org.bouncycastle.openssl.jcajce.JcaPEMWriter;
......@@ -89,7 +90,8 @@ public class CA {
certgen.addExtension(Extension.extendedKeyUsage, false, eku);
// Identifiers
SubjectKeyIdentifier subjectKeyIdentifier = SubjectKeyIdentifier.getInstance(csr.getSubjectPublicKeyInfo());
BcX509ExtensionUtils extensionUtils = new BcX509ExtensionUtils();
org.bouncycastle.asn1.x509.SubjectKeyIdentifier subjectKeyIdentifier = extensionUtils.createSubjectKeyIdentifier(csr.getSubjectPublicKeyInfo());
AuthorityKeyIdentifier authorityKeyIdentifier = new AuthorityKeyIdentifier(new GeneralNames
(new GeneralName(issuer)), caCert.getSerialNumber());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment