public JcaCertificateRequestMessage(byte[] certReqMsg) { this(CertReqMsg.getInstance(certReqMsg)); }
public static CertReqMsg getInstance(Object o) { if (o instanceof CertReqMsg) { return (CertReqMsg)o; } else if (o != null) { return new CertReqMsg(ASN1Sequence.getInstance(o)); } return null; }
public CertificateRequestMessage(CertReqMsg certReqMsg) { this.certReqMsg = certReqMsg; this.controls = certReqMsg.getCertReq().getControls(); }
/** * Return whether or not this request message has a proof-of-possession field in it. * * @return true if proof-of-possession is present, false otherwise. */ public boolean hasProofOfPossession() { return this.certReqMsg.getPopo() != null; }
/** * Return the ASN.1 encoding of the certReqMsg we wrap. * * @return a byte array containing the binary encoding of the certReqMsg. * @throws IOException if there is an exception creating the encoding. */ public byte[] getEncoded() throws IOException { return certReqMsg.getEncoded(); } }
/** * <pre> * CertReqMsg ::= SEQUENCE { * certReq CertRequest, * popo ProofOfPossession OPTIONAL, * -- content depends upon key type * regInfo SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue OPTIONAL } * </pre> * @return a basic ASN.1 object representation. */ public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(certReq); addOptional(v, pop); addOptional(v, regInfo); return new DERSequence(v); }
/** * Return whether or not this request message has a proof-of-possession field in it. * * @return true if proof-of-possession is present, false otherwise. */ public boolean hasProofOfPossession() { return this.certReqMsg.getPopo() != null; }
/** * Return the ASN.1 encoding of the certReqMsg we wrap. * * @return a byte array containing the binary encoding of the certReqMsg. * @throws IOException if there is an exception creating the encoding. */ public byte[] getEncoded() throws IOException { return certReqMsg.getEncoded(); } }
/** * <pre> * CertReqMsg ::= SEQUENCE { * certReq CertRequest, * popo ProofOfPossession OPTIONAL, * -- content depends upon key type * regInfo SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue OPTIONAL } * </pre> * @return a basic ASN.1 object representation. */ public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(certReq); addOptional(v, pop); addOptional(v, regInfo); return new DERSequence(v); }
public JcaCertificateRequestMessage(byte[] certReqMsg) { this(CertReqMsg.getInstance(certReqMsg)); }
/** * Return the type of the proof-of-possession this request message provides. * * @return one of: popRaVerified, popSigningKey, popKeyEncipherment, popKeyAgreement */ public int getProofOfPossessionType() { return this.certReqMsg.getPopo().getType(); }
/** * Return the certificate template contained in this message. * * @return a CertTemplate structure. */ public CertTemplate getCertTemplate() { return this.certReqMsg.getCertReq().getCertTemplate(); }
public static CertReqMsg getInstance(Object o) { if (o instanceof CertReqMsg) { return (CertReqMsg)o; } else if (o != null) { return new CertReqMsg(ASN1Sequence.getInstance(o)); } return null; }
public static CertReqMsg getInstance( ASN1TaggedObject obj, boolean explicit) { return getInstance(ASN1Sequence.getInstance(obj, explicit)); }
/** * Return the type of the proof-of-possession this request message provides. * * @return one of: popRaVerified, popSigningKey, popKeyEncipherment, popKeyAgreement */ public int getProofOfPossessionType() { return this.certReqMsg.getPopo().getType(); }
public CertificateRequestMessage(CertReqMsg certReqMsg) { this.certReqMsg = certReqMsg; this.controls = certReqMsg.getCertReq().getControls(); }
public CertReqMsg[] toCertReqMsgArray() { CertReqMsg[] result = new CertReqMsg[content.size()]; for (int i = 0; i != result.length; i++) { result[i] = CertReqMsg.getInstance(content.getObjectAt(i)); } return result; }
/** * Return whether or not the proof-of-possession (POP) is of the type popSigningKey and * it has a public key MAC associated with it. * * @return true if POP is popSigningKey and a PKMAC is present, false otherwise. */ public boolean hasSigningKeyProofOfPossessionWithPKMAC() { ProofOfPossession pop = certReqMsg.getPopo(); if (pop.getType() == popSigningKey) { POPOSigningKey popoSign = POPOSigningKey.getInstance(pop.getObject()); return popoSign.getPoposkInput().getPublicKeyMAC() != null; } return false; }
/** * Return the certificate template contained in this message. * * @return a CertTemplate structure. */ public CertTemplate getCertTemplate() { return this.certReqMsg.getCertReq().getCertTemplate(); }
public CertReqMsg[] toCertReqMsgArray() { CertReqMsg[] result = new CertReqMsg[content.size()]; for (int i = 0; i != result.length; i++) { result[i] = CertReqMsg.getInstance(content.getObjectAt(i)); } return result; }