Example #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;
 }
Example #2
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;
 }
        private PopoSigningKey(Asn1Sequence seq)
        {
            int index = 0;

            if (seq[index] is Asn1TaggedObject)
            {
                Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)seq[index++];
                if (asn1TaggedObject.TagNo != 0)
                {
                    throw new ArgumentException("Unknown PopoSigningKeyInput tag: " + asn1TaggedObject.TagNo, "seq");
                }
                this.poposkInput = PopoSigningKeyInput.GetInstance(asn1TaggedObject.GetObject());
            }
            this.algorithmIdentifier = AlgorithmIdentifier.GetInstance(seq[index++]);
            this.signature           = DerBitString.GetInstance(seq[index]);
        }
Example #4
0
        private PopoSigningKey(Asn1Sequence seq)
        {
            //IL_0049: Unknown result type (might be due to invalid IL or missing references)
            int index = 0;

            if (seq[index] is Asn1TaggedObject)
            {
                Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)seq[index++];
                if (asn1TaggedObject.TagNo != 0)
                {
                    throw new ArgumentException(string.Concat((object)"Unknown PopoSigningKeyInput tag: ", (object)asn1TaggedObject.TagNo), "seq");
                }
                poposkInput = PopoSigningKeyInput.GetInstance(asn1TaggedObject.GetObject());
            }
            algorithmIdentifier = AlgorithmIdentifier.GetInstance(seq[index++]);
            signature           = DerBitString.GetInstance(seq[index]);
        }
Example #5
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]);
        }