private KrbKdcDHKeyInfo ValidateDHReply(KrbPaPkAsRep pkRep)
        {
            var signed = new SignedCms();

            signed.Decode(pkRep.DHInfo.DHSignedData.ToArray());

            VerifyKdcSignature(signed);

            return(KrbKdcDHKeyInfo.Decode(signed.ContentInfo.Content));
        }
Exemple #2
0
        public void ParsePaPkAsRep_SignedDHRep_KDCDHKeyInfo()
        {
            KrbPaPkAsRep asrep = KrbPaPkAsRep.Decode(signedPkAsRep);

            Assert.IsNotNull(asrep);

            SignedCms signed = new SignedCms();

            signed.Decode(asrep.DHInfo.DHSignedData.ToArray());
            signed.CheckSignature(verifySignatureOnly: true);

            KrbKdcDHKeyInfo keyInfo = KrbKdcDHKeyInfo.Decode(signed.ContentInfo.Content);

            Assert.IsNotNull(keyInfo);
        }