SignedData signedData = SignedData.getInstance(contentInfo.getContent()); Enumeration certificates = signedData.getCertificates().getObjects();
/** * construct an RSA key from a private key info object. */ JCERSAPrivateCrtKey( PrivateKeyInfo info) throws IOException { this(org.spongycastle.asn1.pkcs.RSAPrivateKey.getInstance(info.parsePrivateKey())); }
/** * Return the SubjectPublicKeyInfo describing the public key this request is carrying. * * @return the public key ASN.1 structure contained in the request. */ public SubjectPublicKeyInfo getSubjectPublicKeyInfo() { return certificationRequest.getCertificationRequestInfo().getSubjectPublicKeyInfo(); }
BCRSAPrivateKey(org.spongycastle.asn1.pkcs.RSAPrivateKey key) { this.modulus = key.getModulus(); this.privateExponent = key.getPrivateExponent(); }
/** * Return the subject on this request. * * @return the X500Name representing the request's subject. */ public X500Name getSubject() { return X500Name.getInstance(certificationRequest.getCertificationRequestInfo().getSubject()); }
public static byte[] getEncodedPrivateKeyInfo(PrivateKeyInfo info) { try { return info.getEncoded(ASN1Encoding.DER); } catch (Exception e) { return null; } } }
/** * Return the BagId giving the type of content in the bag. * * @return the bagId */ public ASN1ObjectIdentifier getType() { return safeBag.getBagId(); }
/** * Return whether or not there is MAC attached to this file. * * @return true if there is, false otherwise. */ public boolean hasMac() { return pfx.getMacData() != null; }
/** * Return the details of the signature algorithm used to create this request. * * @return the AlgorithmIdentifier describing the signature algorithm used to create this request. */ public AlgorithmIdentifier getSignatureAlgorithm() { return certificationRequest.getSignatureAlgorithm(); }
public byte[] getEncoded() throws IOException { return certificationRequest.getEncoded(); }
public byte[] getEncoded() throws IOException { return encryptedPrivateKeyInfo.getEncoded(); }
public ASN1Primitive toASN1Primitive() { if (oid != null) { return oid; } return attribute.toASN1Primitive(); } }
/** * construct an RSA key from a private key info object. */ JCERSAPrivateCrtKey( PrivateKeyInfo info) throws IOException { this(org.spongycastle.asn1.pkcs.RSAPrivateKey.getInstance(info.parsePrivateKey())); }
/** * Return the SubjectPublicKeyInfo describing the public key this request is carrying. * * @return the public key ASN.1 structure contained in the request. */ public SubjectPublicKeyInfo getSubjectPublicKeyInfo() { return certificationRequest.getCertificationRequestInfo().getSubjectPublicKeyInfo(); }
/** * Return the subject on this request. * * @return the X500Name representing the request's subject. */ public X500Name getSubject() { return X500Name.getInstance(certificationRequest.getCertificationRequestInfo().getSubject()); }
/** * Return the details of the signature algorithm used to create this request. * * @return the AlgorithmIdentifier describing the signature algorithm used to create this request. */ public AlgorithmIdentifier getSignatureAlgorithm() { return certificationRequest.getSignatureAlgorithm(); }
public byte[] getEncoded() throws IOException { return certificationRequest.getEncoded(); }
public byte[] getEncoded() throws IOException { return encryptedPrivateKeyInfo.getEncoded(); }
/** * construct an RSA key from a private key info object. */ BCRSAPrivateCrtKey( PrivateKeyInfo info) throws IOException { this(RSAPrivateKey.getInstance(info.parsePrivateKey())); }
/** * construct an RSA key from a private key info object. */ BCRSAPrivateCrtKey( PrivateKeyInfo info) throws IOException { this(RSAPrivateKey.getInstance(info.parsePrivateKey())); }