<?xml version="1.0" encoding="UTF-8"?>
<CertApplicationRequest xmlns="http://op.fi/mlp/xmldata/">
    <CustomerId>{{ ws.sender_identifier }}</CustomerId>
    <Timestamp>{{ soap_call.timestamp.isoformat }}</Timestamp>
    <Environment>{% if lowercase_environment %}{{ ws.environment|lower }}{% else %}{{ ws.environment }}{% endif %}</Environment>
    <SoftwareId>Kajala WS</SoftwareId>
    <Service>MATU</Service>
    <Command>{{ command }}</Command>
    <Content>{{ signing_cert_pkcs10 }}</Content>
    <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/2001/04/xmldsig-more#rsa-sha256"/>
          <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/2001/04/xmlenc#sha256"/>
            <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>
</CertApplicationRequest>
