示例#1
0
 /**
  * Creates a new Proof of Possession object for a signing key.
  * @param poposkIn the PopoSigningKeyInput structure, or null if the
  *     CertTemplate includes both subject and publicKey values.
  * @param aid the AlgorithmIdentifier used to sign the proof of possession.
  * @param signature a signature over the DER-encoded value of poposkIn,
  *     or the DER-encoded value of certReq if poposkIn is null.
  */
 public PopoSigningKey(
     PopoSigningKeyInput poposkIn,
     AlgorithmIdentifier aid,
     DerBitString signature)
 {
     this.poposkInput         = poposkIn;
     this.algorithmIdentifier = aid;
     this.signature           = signature;
 }
示例#2
0
        private PopoSigningKey(Asn1Sequence seq)
        {
            int index = 0;

            if (seq[index] is Asn1TaggedObject)
            {
                Asn1TaggedObject tagObj
                    = (Asn1TaggedObject)seq[index++];
                if (tagObj.TagNo != 0)
                {
                    throw new ArgumentException("Unknown PopoSigningKeyInput tag: " + tagObj.TagNo, "seq");
                }
                poposkInput = PopoSigningKeyInput.GetInstance(tagObj.GetObject());
            }
            algorithmIdentifier = AlgorithmIdentifier.GetInstance(seq[index++]);
            signature           = DerBitString.GetInstance(seq[index]);
        }