protected XmlDocument Authenticate(ebics.ebicsNoPubKeyDigestsRequest initReq) { initReq.AuthSignature = new ebics.SignatureType { SignatureValue = new ebics.SignatureValueType { } }; var doc = XMLSerializeToDocument(initReq); Sign(doc, Config.User.AuthKeys.PrivateKey); return(doc); }
private List <XmlDocument> CreateRequests() { using (new MethodLogger(s_logger)) { try { var reqs = new List <XmlDocument>(); var req = new ebics.ebicsNoPubKeyDigestsRequest { header = new ebics.ebicsNoPubKeyDigestsRequestHeader { @static = new ebics.NoPubKeyDigestsRequestStaticHeaderType { HostID = Config.User.HostId, Nonce = CryptoUtils.GetNonceBinary(), TimestampSpecified = true, Timestamp = DateTime.UtcNow, PartnerID = Config.User.PartnerId, UserID = Config.User.UserId, Product = Config.ProductElementType, SecurityMedium = Params.SecurityMedium, OrderDetails = new ebics.NoPubKeyDigestsReqOrderDetailsType { OrderType = OrderType, OrderAttribute = OrderAttribute, } }, mutable = new ebics.EmptyMutableHeaderType { }, }, body = new ebics.ebicsNoPubKeyDigestsRequestBody { }, Version = "H004", Revision = "1" }; reqs.Add(Authenticate(req)); return(reqs); } catch (Exception e) { throw new CreateRequestException($"can't create requests for {OrderType}", e); } } }