public DGWSPolicy(X509Certificate2 moces)
        {
            this.moces = moces;

            Assertions.Add(new RequireActionHeaderAssertion());                         // WSE policy

            DGWSAssertion dgwsAss = new DGWSAssertion();

            dgwsAss.Card = GetIDCard();
            Assertions.Add(dgwsAss);

            Assertions.Add(new AddressingConverterAssertion());

            MessageSignAssertion msgAss = new MessageSignAssertion();

            msgAss.certificate          = moces;
            msgAss.acceptedcartificates = new[] { "CVR:25767535-UID:1100080130597 + CN=TDC TOTALLØSNINGER A/S - TDC Test" };
            Assertions.Add(msgAss);

/*			DGWSAssertion dgwsAss = new DGWSAssertion();
 *                      dgwsAss.GetIDCard = new IDCardReceiver(GetClientIDCard);
 *                      Assertions.Add(dgwsAss);
 *
 *                      Assertions.Add(new AddressingConverterAssertion());
 *
 *                      MessageSignAssertion msgAss = new MessageSignAssertion();
 *                      msgAss.certificate = moces;
 *                      msgAss.acceptedcartificates = new[] { "CVR:25767535-UID:1100080130597 + CN=TDC TOTALLØSNINGER A/S - TDC Test" };
 *                      Assertions.Add(msgAss);
 */     }
Example #2
0
    public DGWSPolicy(X509Certificate2 cardOCES, X509Certificate2 msgOCES, bool sts)
    {
        this.cardOCES = cardOCES;
        this.msgOCES  = msgOCES;

        Assertions.Add(new RequireActionHeaderAssertion());                     // WSE policy

        DGWSAssertion dgwsAss = new DGWSAssertion();

        dgwsAss.Card = GetIDCard(sts);
        Assertions.Add(dgwsAss);

        Assertions.Add(new AddressingConverterAssertion());

        MessageSignAssertion msgAss = new MessageSignAssertion();

        msgAss.certificate = msgOCES;
        //			msgAss.acceptedcartificates = new[] { "CVR:25767535-UID:1100080130597 + CN=TDC TOTALLØSNINGER A/S - TDC Test" };
        msgAss.acceptedcartificates = new[] { "*" };
        Assertions.Add(msgAss);
    }