EldoS | Feel safer!

Software components for data protection, secure storage and transfer

EncryptedKey with two References to EncryptedData

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#34472
Posted: 09/15/2015 23:53:21
by ja silva (Basic support level)
Joined: 09/15/2015
Posts: 1

Hello guys
I need encrypt an XML file with a 509 certificade

In this file they are to encrypt two things, body tag and custom tag

In both I need replace the tag with the EncryptedData for example

Code
<some><custom>data</custom></some>
to
Code
<some><xenc:EncryptedData>...</xenc:EncryptedData></some>


I could not do with the library

And I need put the certificate in a binary security token, which references the key

Like this

Code
<wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="Id-token">CERT-DATA        
      </wsse:BinarySecurityToken>
      <xenc:EncryptedKey Id="id-some" xmlns:xenc="http://www.w3.org/2001/04/xmlenc# ">
        <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
        <ds:KeyInfo xmlns:ds=" http://www.w3.org/2000/09/xmldsig#">
          <wsse:SecurityTokenReference>
            <wsse:Reference URI="#Id-token" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference>
        </ds:KeyInfo>
        <xenc:CipherData>
          <xenc:CipherValue>
            DATA
          </xenc:CipherValue>
        </xenc:CipherData>
        <xenc:ReferenceList>
            <xenc:DataReference URI="#ID_TO_BODY"/>
            <xenc:DataReference URI="#ID_TO_CUSTOM"/>
        </xenc:ReferenceList>
      </xenc:EncryptedKey>


I look in samples, but simpleEncript has has a different way of writting the EncryptedKey Element

Like what I can do?
#34475
Posted: 09/16/2015 05:01:54
by Dmytro Bogatskyy (EldoS Corp.)

I've moved the question to the helpdesk for investigation ( https://www.eldos.com/helpdesk/ ). You will see your (and only your) support tickets by following this URL. You will also get e-mail notifications about updates related to your support ticket.

Reply

Statistics

Topic viewed 802 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!