與源的問題是,它應該這樣做:
X509Certificate issueCert = Org.BouncyCastle.Security.DotNetUtilities.FromX509Certificate(issuerCertificate);
var authorityKeyIdentifier = new AuthorityKeyIdentifierStructure(issueCert);
certificateGenerator.AddExtension(X509Extensions.AuthorityKeyIdentifier.Id, false, authorityKeyIdentifier);
,而不是這樣的:
var authorityKeyIdentifierExtension =
new AuthorityKeyIdentifier(
SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(issuerKeyPair.Public),
new GeneralNames(new GeneralName(issuerDN)),
issuerSerialNumber);
certificateGenerator.AddExtension(
X509Extensions.AuthorityKeyIdentifier.Id, false, authorityKeyIdentifierExtension);