我正在开发一个 Profile Certificate 软件,需要使用 V2Form 作为 BasicCertificateID。
issuerGenName = new GeneralNames(new GeneralName(new X500Name(issuerName)));
ASN1Integer issuerSerialNumber = new ASN1Integer(Integer.parseInt(mainWindow.getIssuerSerialNumber()));
//IssuerSerial baseCertificateID = new IssuerSerial(issuerGenName, issuerSerialNumber);
ASN1EncodableVector vec = new ASN1EncodableVector();
ASN1EncodableVector vecS = new ASN1EncodableVector();
vecS.add(issuerGenName);
vecS.add(issuerSerialNumber);
ASN1Sequence seq = new DERSequence(vecS);
IssuerSerial baseCertificateID = IssuerSerial.getInstance(seq);
ASN1TaggedObject tagged = new DERTaggedObject(0, baseCertificateID);
//TODO Refazer
vec.add(issuerGenName);
vec.add(tagged);
ASN1Sequence seq2 = new DERSequence(vec);
V2Form teste = new V2Form(seq2);
issuer = new AttCertIssuer(teste);
attIssuer = new AttributeCertificateIssuer(issuer);
但这不起作用,我做错了什么?