private PopoPrivKey(Asn1TaggedObject obj) { tagNo = obj.TagNo; switch (tagNo) { case 0: this.obj = DerBitString.GetInstance(obj, isExplicit: false); break; case 1: this.obj = SubsequentMessage.ValueOf(DerInteger.GetInstance(obj, isExplicit: false).Value.IntValue); break; case 2: this.obj = DerBitString.GetInstance(obj, isExplicit: false); break; case 3: this.obj = PKMacValue.GetInstance(obj, isExplicit: false); break; case 4: this.obj = EnvelopedData.GetInstance(obj, explicitly: false); break; default: throw new ArgumentException("unknown tag in PopoPrivKey", "obj"); } }
public Task Handle(InitiatingMessage initiatingMessage, IMessageHandlerContext context) { if (initiatingMessage.Id == testContext.TestRunId) { var message = new SubsequentMessage { Id = initiatingMessage.Id }; return(context.Send(ErrorSpyAddress, message)); } return(Task.FromResult(0)); }
public PopoPrivKey(SubsequentMessage msg) { this.tagNo = subsequentMessage; this.obj = msg; }
public CertificateRequestMessageBuilder SetProofOfPossessionSubsequentMessage(int type, SubsequentMessage msg) { if (_popoPrivKey != null || _popRaVerified != null || _agreeMac != null) { throw new InvalidOperationException("only one proof of possession is allowed."); } if (type != ProofOfPossession.TYPE_KEY_ENCIPHERMENT && type != ProofOfPossession.TYPE_KEY_AGREEMENT) { throw new ArgumentException("type must be ProofOfPossession.TYPE_KEY_ENCIPHERMENT || ProofOfPossession.TYPE_KEY_AGREEMENT"); } this._popoType = type; this._popoPrivKey = new PopoPrivKey(msg); return(this); }
public CertificateRequestMessageBuilder SetProofOfPossessionSubsequentMessage(SubsequentMessage msg) { if (_popoPrivKey != null || _popRaVerified != null || _agreeMac != null) { throw new InvalidOperationException("only one proof of possession is allowed."); } this._popoType = ProofOfPossession.TYPE_KEY_ENCIPHERMENT; this._popoPrivKey = new PopoPrivKey(msg); return(this); }
public PopoPrivKey(SubsequentMessage msg) { tagNo = 1; obj = msg; }