Skip to Content
author's profile photo Former Member
Former Member

Signing an XML with Report SSF02

Hi Experts,

I am a newby in signing documents and I am facing a problem with signing an XML using report SSF02. I can sign an XML and it looks like:

But I expected something like that:

<?xml version="1.0" encoding="UTF-8"?>

<PurchaseOrder>

<Item number="130046593231">

<Description>Video Game</Description>

<Price>10.29</Price>

</Item>

<Buyer id="8492340">

<Name>My Name</Name>

<Address>

<Street>One Network Drive</Street>

<Town>Burlington</Town>

<State>MA</State>

<Country>United States</Country>

<PostalCode>01803</PostalCode>

</Address>

</Buyer>

<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">

<SignedInfo>

<CanonicalizationMethod

Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

<SignatureMethod

Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>

<Reference URI="">

<Transforms>

<Transform

Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>

</Transforms>

<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>

<DigestValue>tVicGh6V+8cHbVYFIU91o5+L3OQ=</DigestValue>

</Reference>

</SignedInfo>

<SignatureValue>

dJDHiGQMaKN8iPuWApAL57eVnxz2BQtyujwfPSgE7HyKoxYtoRB97ocxZ

8ZU440wHtE39ZwRGIjvwor3WfURxnIgnI1CChMXXwoGpHH//Zc0z4ejaz

DuCNEq4Mm4OUVTiEVuwcWAOMkfDHaM82awYQiOGcwMbZe38UX0oPJ2DOE=

</SignatureValue>

<KeyInfo>

<X509Data>

<X509SubjectName>

CN=My Name,O=Test Certificates Inc.,C=US

</X509SubjectName>

<X509Certificate>

MIIB9zCCAWCgAwIBAgIERZwdkzANBgkqhkiG9w0BAQUFADBAMQswCQYD

VQQGEwJVUzEfMB0GA1UEChMWVGVzdCBDZXJ0aWZpY2F0ZXMgSW5jLjEQ

MA4GA1UEAxMHTXkgTmFtZTAeFw0wNzAxMDMyMTE4MTFaFw0zMTA4MjUy

...

</X509Certificate>

</X509Data>

</KeyInfo>

</Signature>

</PurchaseOrder>

What do I wrong? Can someone give me some advise or does someone have an example how to handle signing xml within ABAP?

Thanks in advance.

Cheers, Alex

pastedImage_0.png (46.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2013 at 07:07 AM

    Hi Alexander,

    I did not have a closer look at the xml, but it seams you are looking for XML-DSIG. At least when using OASIS Web Services based communication, ABAP does support this since quite some time. See the docs for some more info.
    What is the use case, you want to create signed XML documents for?

    Regards,

    Patrick

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 02, 2013 at 10:31 PM

    Hi,

    basically only signing format provided by ABAP AS out of the box is PKCS#7. On input it takes a binary blob. SSF02 takes a file from your PC and it signs it. It does not perform any manipulation of input (e.g. modifying XML document). What you can see on that screen is an output of signing in PCKS#7 format.

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.