Skip to content
Advertisement

Tag: bouncycastle

How to load public certificate from pem file?

I was trying to extract RES public key from the file below Here is the code i did.. But It throws out java.security.InvalidKeyException: IOException: ObjectIdentifier() — data isn’t an object ID What’s the appropriate way to extract RES Public key from a file.. Answer An X.509 certificate and an X509EncodedKeySpec are quite different structures, and trying to parse a cert

Java Bouncy Castle OCSP Url

I am using bouncy castle 1.48 to verify certificate validation with OCSP. It works good. But I’m using Ocsp Url as static variable and I want to read it from certificate. Url is written in certificate as Authority Info Access I got org.bouncycastle.asn1.x509.AuthorityInformationAccess object from certificate which writes AuthorityInformationAccess: Oid(1.3.6.1.5.5.7.48.1) but cant get Url from there Answer I found the

X500Principal Distinguished Name order

I’m using the Bouncycastle lib to generate certificates from PKCS10 requests using the X509v3CertificateBuilder class. It returns build a X509CertificateHolder object which contains the generated certificate. If I call getIssuer on the holder, it returns the issuer distinguished name in the correct order (the same returned if I call getSubjectX500Principal() on the issuer certificate), if I parse the encoded version

Advertisement