<?xml version="1.0" encoding="UTF-8"?>
<tns:{{ command }}Request xmlns:xe="http://www.w3.org/2001/04/xmlenc#" xmlns:xd="http://www.w3.org/2000/09/xmldsig#" xmlns:tns="http://danskebank.dk/PKI/PKIFactoryService/elements" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pkif="http://danskebank.dk/PKI/PKIFactoryService">
    <tns:CustomerId>{{ ws.sender_identifier }}</tns:CustomerId>
    <tns:KeyGeneratorType>software</tns:KeyGeneratorType>
    <tns:EncryptionCertPKCS10>{{ encryption_cert_pkcs10 }}</tns:EncryptionCertPKCS10>
    <tns:SigningCertPKCS10>{{ signing_cert_pkcs10 }}</tns:SigningCertPKCS10>
    <tns:Timestamp>{{ soap_call.timestamp.isoformat }}</tns:Timestamp>
    <tns:RequestId>{{ soap_call.request_identifier }}</tns:RequestId>
    <tns:Environment>{% if lowercase_environment %}{{ ws.environment|lower }}{% else %}{{ ws.environment }}{% endif %}</tns:Environment>
    <xd:Signature xmlns:xd="http://www.w3.org/2000/09/xmldsig#">
        <xd:SignedInfo>
          <xd:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
          <xd:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
          <xd:Reference URI="">
            <xd:Transforms>
              <xd:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
              <xd:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
            </xd:Transforms>
            <xd:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
            <xd:DigestValue/>
          </xd:Reference>
        </xd:SignedInfo>
        <xd:SignatureValue/>
        <xd:KeyInfo>
          <xd:X509Data>
            <xd:X509Certificate></xd:X509Certificate>
            <xd:X509IssuerSerial>
              <xd:X509IssuerName>{{ old_signing_cert.issuer.rfc4514_string }}</xd:X509IssuerName>
              <xd:X509SerialNumber>{{ old_signing_cert.serial_number }}</xd:X509SerialNumber>
            </xd:X509IssuerSerial>
          </xd:X509Data>
        </xd:KeyInfo>
    </xd:Signature>
</tns:{{ command }}Request>
