コード例 #1
0
ファイル: PA_PK_AS_REQ.cs プロジェクト: yuanqi-che/Kernelhub
 public PA_PK_AS_REQ(KrbAuthPack krbAuthPack, X509Certificate2 pkCert, KDCKeyAgreement agreement, bool verifyCerts = false)
 {
     AuthPack    = krbAuthPack;
     PKCert      = pkCert;
     Agreement   = agreement;
     VerifyCerts = verifyCerts;
 }
コード例 #2
0
        public PA_DATA(X509Certificate2 pkInitCert, KDCKeyAgreement agreement, KDCReqBody kdcRequestBody, bool verifyCerts = false)
        {
            DateTime           now           = DateTime.UtcNow;
            KrbPkAuthenticator authenticator = new KrbPkAuthenticator((uint)now.Millisecond, now, now.Millisecond, kdcRequestBody);
            KrbAuthPack        authPack      = new KrbAuthPack(authenticator, pkInitCert);

            byte[] pubKeyInfo = AsnElt.Make(AsnElt.SEQUENCE, new AsnElt[] {
                AsnElt.MakeInteger(agreement.P),
                AsnElt.MakeInteger(agreement.G),
            }).Encode();

            authPack.ClientPublicValue = new KrbSubjectPublicKeyInfo(new KrbAlgorithmIdentifier(DiffieHellman, pubKeyInfo),
                                                                     AsnElt.MakeInteger(agreement.Y).Encode());

            type  = Interop.PADATA_TYPE.PK_AS_REQ;
            value = new PA_PK_AS_REQ(authPack, pkInitCert, agreement, verifyCerts);
        }
コード例 #3
0
ファイル: PA_PK_AS_REQ.cs プロジェクト: slooppe/SharpMapExec
 public PA_PK_AS_REQ(KrbAuthPack krbAuthPack, X509Certificate2 pkCert, KDCKeyAgreement agreement)
 {
     AuthPack  = krbAuthPack;
     PKCert    = pkCert;
     Agreement = agreement;
 }