我一直试图按照 server?language=objc 中提到的步骤解码八进制字符串。
以下是我尝试过的:
X509Certificate cert1 = getParentCertificate(new String(decodedCredCert)); System.out.println(cert1); cert1.checkValidity(); // verify against apple app attest root ca byte[] ext = cert1.getExtensionValue("1.2.840.113635.100.8.2"); ASN1InputStream bIn = new ASN1InputStream(ext); ASN1Primitive obj = bIn.readObject(); ASN1OctetString string = (ASN1OctetString) obj; byte[] octs = string.getOctets(); ASN1InputStream dIn = new ASN1InputStream(octs);