eet_signer 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +48 -0
- data/LICENSE +22 -0
- data/README.md +25 -0
- data/lib/signer/digester.rb +69 -0
- data/lib/signer/version.rb +3 -0
- data/lib/signer.rb +336 -0
- data/spec/fixtures/cert.pem +17 -0
- data/spec/fixtures/input_1.xml +24 -0
- data/spec/fixtures/input_2.xml +7 -0
- data/spec/fixtures/input_3_c14n_comments.xml +22 -0
- data/spec/fixtures/input_4_with_nested_signatures.xml +25 -0
- data/spec/fixtures/key.pem +18 -0
- data/spec/fixtures/output_1.xml +58 -0
- data/spec/fixtures/output_1_inclusive_namespaces.xml +48 -0
- data/spec/fixtures/output_1_sha256.xml +2 -0
- data/spec/fixtures/output_2.xml +31 -0
- data/spec/fixtures/output_2_with_ds_prefix.xml +31 -0
- data/spec/fixtures/output_3_c14n_comments.xml +38 -0
- data/spec/fixtures/output_4_with_nested_signatures.xml +59 -0
- data/spec/fixtures/output_4_with_nested_signatures_with_noblanks_disabled.xml +25 -0
- data/spec/signer_spec.rb +192 -0
- data/spec/spec_helper.rb +5 -0
- metadata +124 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:wsurandom="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
|
3
|
+
<s:Header>
|
4
|
+
<a:Action s:mustUnderstand="1">http://tempuri.org/IDocumentService/SearchDocuments</a:Action>
|
5
|
+
<a:MessageID>urn:uuid:30db5d4f-ab84-46be-907c-be690a92979b</a:MessageID>
|
6
|
+
<a:ReplyTo>
|
7
|
+
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
|
8
|
+
</a:ReplyTo>
|
9
|
+
<To xmlns="http://www.w3.org/2005/08/addressing" xmlns:a="http://www.w3.org/2003/05/soap-envelope" a:mustUnderstand="1" wsurandom:Id="_7e75a8ded22253b163ca76a40b6cc0c670ed0c33">http://tempuri.org/PublicServices/Test/1.0.12/PublicServices/DocumentService.svc</To>
|
10
|
+
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
|
11
|
+
<wsurandom:Timestamp wsurandom:Id="_3e2f6b0b9430b7f2b69712172db02293291f5322">
|
12
|
+
<wsurandom:Created>2012-05-02T18:17:14.467Z</wsurandom:Created>
|
13
|
+
<wsurandom:Expires>2012-05-02T18:22:14.467Z</wsurandom:Expires>
|
14
|
+
</wsurandom:Timestamp>
|
15
|
+
<wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsurandom:Id="uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1">MIICsDCCAhmgAwIBAgIJAOUHvh4oho0tMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTIwNTAzMTMxODIyWhcNMTMwNTAzMTMxODIyWjBFMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvK5hMPv/R5IFmwWyJOyEaFUrF/ZsmN+Gip8hvR6rLP3YPNx9iFYvPcZllFmuVwyaz7YT2N5BsqTwLdyi5v4HY4fUtuz0p8jIPoSd6dfDvcnSpf4QLTOgOaL3ciPEbgDHH2tnIksukoWzqCYva+qFZ74NFl19swXotW9fA4Jzs4QIDAQABo4GnMIGkMB0GA1UdDgQWBBRU1WEHDnP8Hr7ZulxrSzEwOcYpMzB1BgNVHSMEbjBsgBRU1WEHDnP8Hr7ZulxrSzEwOcYpM6FJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAOUHvh4oho0tMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEASY/9SAOK57q9mGnNJJeyDbmyGrAHSJTod646xTHYkMvhUqwHyk9PTr5bdfmswpmyVn+AQ43U2tU5vnpTBmKpHWD2+HSHgGa92mMLrfBOd8EBZ329NL3N2HDPIaHr4NPGyhNrSK3QVOnAq2D0jlyrGYJlLli1NxHiBz7FCEJaVI8=</wsse:BinarySecurityToken>
|
16
|
+
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
17
|
+
<SignedInfo>
|
18
|
+
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
19
|
+
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
|
20
|
+
<Reference URI="#_3e2f6b0b9430b7f2b69712172db02293291f5322">
|
21
|
+
<Transforms>
|
22
|
+
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
23
|
+
</Transforms>
|
24
|
+
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
25
|
+
<DigestValue>hUP34KxVar1UE5I87U1kH8MzV+o=</DigestValue>
|
26
|
+
</Reference>
|
27
|
+
<Reference URI="#_7e75a8ded22253b163ca76a40b6cc0c670ed0c33">
|
28
|
+
<Transforms>
|
29
|
+
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
30
|
+
</Transforms>
|
31
|
+
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
32
|
+
<DigestValue>/rAVEm0SjaC0ckFViZd+A0hYe+U=</DigestValue>
|
33
|
+
</Reference>
|
34
|
+
<Reference URI="#uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1">
|
35
|
+
<Transforms>
|
36
|
+
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
37
|
+
</Transforms>
|
38
|
+
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
39
|
+
<DigestValue>QfyyHQKBXN21QNXRHMDBkxZeTMI=</DigestValue>
|
40
|
+
</Reference>
|
41
|
+
</SignedInfo>
|
42
|
+
<SignatureValue>c1YkLvip/5njmwGakJ1Er6PMDUO2zC1HpinFkEEQkL+Ay1XJzGFehQdflIQjb6oRkT3c5DY3c+tcvE+G9/Wzy1m89RKkLvUAdPeI+ZMZw+90Rf5mvJku3QJ/G1bDlBOL54zYIC76El+XmHy1YM71x9+Y56z2mtCxZWAFOP7C3rA=</SignatureValue>
|
43
|
+
<KeyInfo>
|
44
|
+
<wsse:SecurityTokenReference>
|
45
|
+
<wsse:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1"/>
|
46
|
+
</wsse:SecurityTokenReference>
|
47
|
+
</KeyInfo>
|
48
|
+
</Signature>
|
49
|
+
</wsse:Security>
|
50
|
+
</s:Header>
|
51
|
+
<s:Body>
|
52
|
+
<SearchDocuments xmlns="http://tempuri.org/">
|
53
|
+
<searchCriteria xmlns:b="http://schemas.datacontract.org/2004/07/BusinessLogic.Data.Documents.Integration" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
54
|
+
<b:RegistrationNo>1</b:RegistrationNo>
|
55
|
+
</searchCriteria>
|
56
|
+
</SearchDocuments>
|
57
|
+
</s:Body>
|
58
|
+
</s:Envelope>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:wsurandom="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
|
3
|
+
<s:Header>
|
4
|
+
<a:Action s:mustUnderstand="1">http://tempuri.org/IDocumentService/SearchDocuments</a:Action>
|
5
|
+
<a:MessageID>urn:uuid:30db5d4f-ab84-46be-907c-be690a92979b</a:MessageID>
|
6
|
+
<a:ReplyTo>
|
7
|
+
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
|
8
|
+
</a:ReplyTo>
|
9
|
+
<To xmlns="http://www.w3.org/2005/08/addressing" xmlns:a="http://www.w3.org/2003/05/soap-envelope" a:mustUnderstand="1">http://tempuri.org/PublicServices/Test/1.0.12/PublicServices/DocumentService.svc</To>
|
10
|
+
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
|
11
|
+
<wsurandom:Timestamp>
|
12
|
+
<wsurandom:Created>2012-05-02T18:17:14.467Z</wsurandom:Created>
|
13
|
+
<wsurandom:Expires>2012-05-02T18:22:14.467Z</wsurandom:Expires>
|
14
|
+
</wsurandom:Timestamp>
|
15
|
+
<wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsurandom:Id="uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1">MIICsDCCAhmgAwIBAgIJAOUHvh4oho0tMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTIwNTAzMTMxODIyWhcNMTMwNTAzMTMxODIyWjBFMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvK5hMPv/R5IFmwWyJOyEaFUrF/ZsmN+Gip8hvR6rLP3YPNx9iFYvPcZllFmuVwyaz7YT2N5BsqTwLdyi5v4HY4fUtuz0p8jIPoSd6dfDvcnSpf4QLTOgOaL3ciPEbgDHH2tnIksukoWzqCYva+qFZ74NFl19swXotW9fA4Jzs4QIDAQABo4GnMIGkMB0GA1UdDgQWBBRU1WEHDnP8Hr7ZulxrSzEwOcYpMzB1BgNVHSMEbjBsgBRU1WEHDnP8Hr7ZulxrSzEwOcYpM6FJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAOUHvh4oho0tMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEASY/9SAOK57q9mGnNJJeyDbmyGrAHSJTod646xTHYkMvhUqwHyk9PTr5bdfmswpmyVn+AQ43U2tU5vnpTBmKpHWD2+HSHgGa92mMLrfBOd8EBZ329NL3N2HDPIaHr4NPGyhNrSK3QVOnAq2D0jlyrGYJlLli1NxHiBz7FCEJaVI8=</wsse:BinarySecurityToken>
|
16
|
+
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
17
|
+
<SignedInfo>
|
18
|
+
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
|
19
|
+
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="s"/>
|
20
|
+
</CanonicalizationMethod>
|
21
|
+
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
|
22
|
+
<Reference URI="#_846355fa6c1fbadc2f04c0e0a86eda85d9cbfa31">
|
23
|
+
<Transforms>
|
24
|
+
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
|
25
|
+
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="s"/>
|
26
|
+
</Transform>
|
27
|
+
</Transforms>
|
28
|
+
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
29
|
+
<DigestValue>lXzKYCXgcLpnf/2Q8ieQqj3Er7I=</DigestValue>
|
30
|
+
</Reference>
|
31
|
+
</SignedInfo>
|
32
|
+
<SignatureValue>Bs6O0JuOix9vzDX7gTUMWJ+xzB4IfIWI7l/HjMnE4MnfnFlDQeU1a+0OuqiWiesdzImDLZvqjAeSBUPQOnP4eil2O9qTEd4FvTAUm6DldBV+4ECSXozDiLyPaHMSrm4JZyuePF6d3IOroDYn7ZREWBYgBGHiga7F7+h4s9ZW2XQ=</SignatureValue>
|
33
|
+
<KeyInfo>
|
34
|
+
<wsse:SecurityTokenReference>
|
35
|
+
<wsse:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1"/>
|
36
|
+
</wsse:SecurityTokenReference>
|
37
|
+
</KeyInfo>
|
38
|
+
</Signature>
|
39
|
+
</wsse:Security>
|
40
|
+
</s:Header>
|
41
|
+
<s:Body wsurandom:Id="_846355fa6c1fbadc2f04c0e0a86eda85d9cbfa31">
|
42
|
+
<SearchDocuments xmlns="http://tempuri.org/">
|
43
|
+
<searchCriteria xmlns:b="http://schemas.datacontract.org/2004/07/BusinessLogic.Data.Documents.Integration" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
44
|
+
<b:RegistrationNo>1</b:RegistrationNo>
|
45
|
+
</searchCriteria>
|
46
|
+
</SearchDocuments>
|
47
|
+
</s:Body>
|
48
|
+
</s:Envelope>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:wsurandom="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/IDocumentService/SearchDocuments</a:Action><a:MessageID>urn:uuid:30db5d4f-ab84-46be-907c-be690a92979b</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><To xmlns="http://www.w3.org/2005/08/addressing" xmlns:a="http://www.w3.org/2003/05/soap-envelope" a:mustUnderstand="1">http://tempuri.org/PublicServices/Test/1.0.12/PublicServices/DocumentService.svc</To><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1"><wsurandom:Timestamp><wsurandom:Created>2012-05-02T18:17:14.467Z</wsurandom:Created><wsurandom:Expires>2012-05-02T18:22:14.467Z</wsurandom:Expires></wsurandom:Timestamp><wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsurandom:Id="uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1">MIICsDCCAhmgAwIBAgIJAOUHvh4oho0tMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTIwNTAzMTMxODIyWhcNMTMwNTAzMTMxODIyWjBFMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvK5hMPv/R5IFmwWyJOyEaFUrF/ZsmN+Gip8hvR6rLP3YPNx9iFYvPcZllFmuVwyaz7YT2N5BsqTwLdyi5v4HY4fUtuz0p8jIPoSd6dfDvcnSpf4QLTOgOaL3ciPEbgDHH2tnIksukoWzqCYva+qFZ74NFl19swXotW9fA4Jzs4QIDAQABo4GnMIGkMB0GA1UdDgQWBBRU1WEHDnP8Hr7ZulxrSzEwOcYpMzB1BgNVHSMEbjBsgBRU1WEHDnP8Hr7ZulxrSzEwOcYpM6FJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAOUHvh4oho0tMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEASY/9SAOK57q9mGnNJJeyDbmyGrAHSJTod646xTHYkMvhUqwHyk9PTr5bdfmswpmyVn+AQ43U2tU5vnpTBmKpHWD2+HSHgGa92mMLrfBOd8EBZ329NL3N2HDPIaHr4NPGyhNrSK3QVOnAq2D0jlyrGYJlLli1NxHiBz7FCEJaVI8=</wsse:BinarySecurityToken><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/><Reference URI="#uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/><DigestValue>2ca0eR2o1+y/CovNwnle3yEK1wI+ztlKQfCqcGvoSAA=</DigestValue></Reference></SignedInfo><SignatureValue>ml/HJ0ouBwAag9Kr4yTyrc4RrHc3sspx2YbQHPiTxB3QOT+T2kM5wU+gnHVIk5VOYVR9FIvm/bb6RWnLyW78/7eN6eIoh+Zr1YsEavCHw3AR9Zf4d7S+9ugCrPmrrEO1lOiyEHU0HuWS5gqua+/ttuTPtV24fGeWvxl15SIxFa8=</SignatureValue><KeyInfo><wsse:SecurityTokenReference><wsse:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1"/></wsse:SecurityTokenReference></KeyInfo></Signature></wsse:Security></s:Header><s:Body><SearchDocuments xmlns="http://tempuri.org/"><searchCriteria xmlns:b="http://schemas.datacontract.org/2004/07/BusinessLogic.Data.Documents.Integration" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><b:RegistrationNo>1</b:RegistrationNo></searchCriteria></SearchDocuments></s:Body></s:Envelope>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<ApplicationRequest xmlns="http://bxd.fi/xmldata/">
|
3
|
+
<CustomerId>679155330</CustomerId>
|
4
|
+
<Command>GetUserInfo</Command>
|
5
|
+
<Timestamp>2010-05-10T13:22:19.847+03:00</Timestamp>
|
6
|
+
<Environment>PRODUCTION</Environment>
|
7
|
+
<SoftwareId>Petri</SoftwareId>
|
8
|
+
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
9
|
+
<SignedInfo>
|
10
|
+
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
11
|
+
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
|
12
|
+
<Reference URI="">
|
13
|
+
<Transforms>
|
14
|
+
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
|
15
|
+
</Transforms>
|
16
|
+
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
17
|
+
<DigestValue>U9tsT4lrRMp8ZdKMnblgeMCGfvI=</DigestValue>
|
18
|
+
</Reference>
|
19
|
+
</SignedInfo>
|
20
|
+
<SignatureValue>HpRIiW6/yGyAI0AwVaaGp3PltD3JOCFfxZLVt+kQD05u1tz9EA91/5CbvCNfn1ljoObMSGe3+W9gXFZewCXANu5VXMnt+FeZ42QYNuYj2oUCFaWlg3NcThWnehE1W/R+QPLJVgk4RxpSntNLK0WWtFy79JbAh0NO4CcD84/HEo8=</SignatureValue>
|
21
|
+
<KeyInfo>
|
22
|
+
<X509Data>
|
23
|
+
<X509IssuerSerial>
|
24
|
+
<X509IssuerName>C=AU,ST=Some-State,O=Internet Widgits Pty Ltd</X509IssuerName>
|
25
|
+
<X509SerialNumber>16503368396260674861</X509SerialNumber>
|
26
|
+
</X509IssuerSerial>
|
27
|
+
<X509Certificate>MIICsDCCAhmgAwIBAgIJAOUHvh4oho0tMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTIwNTAzMTMxODIyWhcNMTMwNTAzMTMxODIyWjBFMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvK5hMPv/R5IFmwWyJOyEaFUrF/ZsmN+Gip8hvR6rLP3YPNx9iFYvPcZllFmuVwyaz7YT2N5BsqTwLdyi5v4HY4fUtuz0p8jIPoSd6dfDvcnSpf4QLTOgOaL3ciPEbgDHH2tnIksukoWzqCYva+qFZ74NFl19swXotW9fA4Jzs4QIDAQABo4GnMIGkMB0GA1UdDgQWBBRU1WEHDnP8Hr7ZulxrSzEwOcYpMzB1BgNVHSMEbjBsgBRU1WEHDnP8Hr7ZulxrSzEwOcYpM6FJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAOUHvh4oho0tMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEASY/9SAOK57q9mGnNJJeyDbmyGrAHSJTod646xTHYkMvhUqwHyk9PTr5bdfmswpmyVn+AQ43U2tU5vnpTBmKpHWD2+HSHgGa92mMLrfBOd8EBZ329NL3N2HDPIaHr4NPGyhNrSK3QVOnAq2D0jlyrGYJlLli1NxHiBz7FCEJaVI8=</X509Certificate>
|
28
|
+
</X509Data>
|
29
|
+
</KeyInfo>
|
30
|
+
</Signature>
|
31
|
+
</ApplicationRequest>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<ApplicationRequest xmlns="http://bxd.fi/xmldata/">
|
3
|
+
<CustomerId>679155330</CustomerId>
|
4
|
+
<Command>GetUserInfo</Command>
|
5
|
+
<Timestamp>2010-05-10T13:22:19.847+03:00</Timestamp>
|
6
|
+
<Environment>PRODUCTION</Environment>
|
7
|
+
<SoftwareId>Petri</SoftwareId>
|
8
|
+
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
|
9
|
+
<ds:SignedInfo>
|
10
|
+
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
11
|
+
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
|
12
|
+
<ds:Reference URI="">
|
13
|
+
<ds:Transforms>
|
14
|
+
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
|
15
|
+
</ds:Transforms>
|
16
|
+
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
17
|
+
<ds:DigestValue>U9tsT4lrRMp8ZdKMnblgeMCGfvI=</ds:DigestValue>
|
18
|
+
</ds:Reference>
|
19
|
+
</ds:SignedInfo>
|
20
|
+
<ds:SignatureValue>rOCe8McbIFa4Ul3pnzd/dBjFWoT4JtSghJgzZGLrz17K/j0W1JyaopcZeMD+8M5/GplAlQrJg3ZSkQvY9Sf7WpqZeLYHW17J0ZJpwas+/OOXUEdyUiec7q9OgWsFLH9DBNuJdLKE3CO6w/8tTKQ/kidYnPBXT6FKioNlSJVZsuI=</ds:SignatureValue>
|
21
|
+
<ds:KeyInfo>
|
22
|
+
<ds:X509Data>
|
23
|
+
<ds:X509IssuerSerial>
|
24
|
+
<ds:X509IssuerName>C=AU,ST=Some-State,O=Internet Widgits Pty Ltd</ds:X509IssuerName>
|
25
|
+
<ds:X509SerialNumber>16503368396260674861</ds:X509SerialNumber>
|
26
|
+
</ds:X509IssuerSerial>
|
27
|
+
<ds:X509Certificate>MIICsDCCAhmgAwIBAgIJAOUHvh4oho0tMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTIwNTAzMTMxODIyWhcNMTMwNTAzMTMxODIyWjBFMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvK5hMPv/R5IFmwWyJOyEaFUrF/ZsmN+Gip8hvR6rLP3YPNx9iFYvPcZllFmuVwyaz7YT2N5BsqTwLdyi5v4HY4fUtuz0p8jIPoSd6dfDvcnSpf4QLTOgOaL3ciPEbgDHH2tnIksukoWzqCYva+qFZ74NFl19swXotW9fA4Jzs4QIDAQABo4GnMIGkMB0GA1UdDgQWBBRU1WEHDnP8Hr7ZulxrSzEwOcYpMzB1BgNVHSMEbjBsgBRU1WEHDnP8Hr7ZulxrSzEwOcYpM6FJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAOUHvh4oho0tMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEASY/9SAOK57q9mGnNJJeyDbmyGrAHSJTod646xTHYkMvhUqwHyk9PTr5bdfmswpmyVn+AQ43U2tU5vnpTBmKpHWD2+HSHgGa92mMLrfBOd8EBZ329NL3N2HDPIaHr4NPGyhNrSK3QVOnAq2D0jlyrGYJlLli1NxHiBz7FCEJaVI8=</ds:X509Certificate>
|
28
|
+
</ds:X509Data>
|
29
|
+
</ds:KeyInfo>
|
30
|
+
</ds:Signature>
|
31
|
+
</ApplicationRequest>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"
|
3
|
+
xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
|
4
|
+
<s:Header>
|
5
|
+
<a:Action s:mustUnderstand="1">http://tempuri.org/IDocumentService/SearchDocuments</a:Action>
|
6
|
+
<a:MessageID>urn:uuid:30db5d4f-ab84-46be-907c-be690a92979b</a:MessageID>
|
7
|
+
<To xmlns="http://www.w3.org/2005/08/addressing" xmlns:a="http://www.w3.org/2003/05/soap-envelope" a:mustUnderstand="1">http://tempuri.org/PublicServices/Test/1.0.12/PublicServices/DocumentService.svc</To>
|
8
|
+
<o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
|
9
|
+
s:mustUnderstand="1">
|
10
|
+
<u:Timestamp>
|
11
|
+
<u:Created>2012-05-02T18:17:14.467Z</u:Created>
|
12
|
+
<u:Expires>2012-05-02T18:22:14.467Z</u:Expires>
|
13
|
+
</u:Timestamp>
|
14
|
+
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
15
|
+
<SignedInfo>
|
16
|
+
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
17
|
+
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
|
18
|
+
<Reference URI="#_f7a662fdba7cdb44426d7447f06adf0f11707eeb">
|
19
|
+
<Transforms>
|
20
|
+
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
21
|
+
</Transforms>
|
22
|
+
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
23
|
+
<DigestValue>iqiXdxdsix9HMz4rEBEo/sYazDU=</DigestValue>
|
24
|
+
</Reference>
|
25
|
+
</SignedInfo>
|
26
|
+
<SignatureValue>XOMmCzcg7Un+BpWIP5WpAAeT1Sq2B+WZ8eM4MiDR1bhIFV8aPScAXX/cB3Esa88JcBltsiBlZTdq1hCQ8GKrLEvWTFMhkSCQrkAR+3eCUR894UzPrWTr0jYA7RZaVaw+XODf7ICbYIhLs7n50cPyFrslKVOjh6EKlCq1ZV5XFYE=</SignatureValue>
|
27
|
+
</Signature>
|
28
|
+
</o:Security>
|
29
|
+
</s:Header>
|
30
|
+
<s:Body u:Id="_f7a662fdba7cdb44426d7447f06adf0f11707eeb">
|
31
|
+
<SearchDocuments xmlns="http://tempuri.org/">
|
32
|
+
<searchCriteria xmlns:b="http://schemas.datacontract.org/2004/07/BusinessLogic.Data.Documents.Integration" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
33
|
+
<!-- This comment shouldn't affect digest value for digested node -->
|
34
|
+
<b:RegistrationNo>1</b:RegistrationNo>
|
35
|
+
</searchCriteria>
|
36
|
+
</SearchDocuments>
|
37
|
+
</s:Body>
|
38
|
+
</s:Envelope>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:wsurandom="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
|
3
|
+
<s:Header>
|
4
|
+
<a:Action s:mustUnderstand="1">http://tempuri.org/IDocumentService/SearchDocuments</a:Action>
|
5
|
+
<a:MessageID>urn:uuid:30db5d4f-ab84-46be-907c-be690a92979b</a:MessageID>
|
6
|
+
<a:ReplyTo>
|
7
|
+
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
|
8
|
+
</a:ReplyTo>
|
9
|
+
<To xmlns="http://www.w3.org/2005/08/addressing" xmlns:a="http://www.w3.org/2003/05/soap-envelope" a:mustUnderstand="1" wsurandom:Id="_7e75a8ded22253b163ca76a40b6cc0c670ed0c33">http://tempuri.org/PublicServices/Test/1.0.12/PublicServices/DocumentService.svc</To>
|
10
|
+
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
|
11
|
+
<wsurandom:Timestamp wsurandom:Id="_3e2f6b0b9430b7f2b69712172db02293291f5322">
|
12
|
+
<wsurandom:Created>2012-05-02T18:17:14.467Z</wsurandom:Created>
|
13
|
+
<wsurandom:Expires>2012-05-02T18:22:14.467Z</wsurandom:Expires>
|
14
|
+
</wsurandom:Timestamp>
|
15
|
+
<wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsurandom:Id="uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1">MIICsDCCAhmgAwIBAgIJAOUHvh4oho0tMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTIwNTAzMTMxODIyWhcNMTMwNTAzMTMxODIyWjBFMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvK5hMPv/R5IFmwWyJOyEaFUrF/ZsmN+Gip8hvR6rLP3YPNx9iFYvPcZllFmuVwyaz7YT2N5BsqTwLdyi5v4HY4fUtuz0p8jIPoSd6dfDvcnSpf4QLTOgOaL3ciPEbgDHH2tnIksukoWzqCYva+qFZ74NFl19swXotW9fA4Jzs4QIDAQABo4GnMIGkMB0GA1UdDgQWBBRU1WEHDnP8Hr7ZulxrSzEwOcYpMzB1BgNVHSMEbjBsgBRU1WEHDnP8Hr7ZulxrSzEwOcYpM6FJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAOUHvh4oho0tMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEASY/9SAOK57q9mGnNJJeyDbmyGrAHSJTod646xTHYkMvhUqwHyk9PTr5bdfmswpmyVn+AQ43U2tU5vnpTBmKpHWD2+HSHgGa92mMLrfBOd8EBZ329NL3N2HDPIaHr4NPGyhNrSK3QVOnAq2D0jlyrGYJlLli1NxHiBz7FCEJaVI8=</wsse:BinarySecurityToken>
|
16
|
+
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
17
|
+
<SignedInfo>
|
18
|
+
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
19
|
+
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
|
20
|
+
<Reference URI="#_3e2f6b0b9430b7f2b69712172db02293291f5322">
|
21
|
+
<Transforms>
|
22
|
+
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
23
|
+
</Transforms>
|
24
|
+
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
25
|
+
<DigestValue>hUP34KxVar1UE5I87U1kH8MzV+o=</DigestValue>
|
26
|
+
</Reference>
|
27
|
+
<Reference URI="#_7e75a8ded22253b163ca76a40b6cc0c670ed0c33">
|
28
|
+
<Transforms>
|
29
|
+
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
30
|
+
</Transforms>
|
31
|
+
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
32
|
+
<DigestValue>/rAVEm0SjaC0ckFViZd+A0hYe+U=</DigestValue>
|
33
|
+
</Reference>
|
34
|
+
<Reference URI="#uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1">
|
35
|
+
<Transforms>
|
36
|
+
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
|
37
|
+
</Transforms>
|
38
|
+
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
|
39
|
+
<DigestValue>QfyyHQKBXN21QNXRHMDBkxZeTMI=</DigestValue>
|
40
|
+
</Reference>
|
41
|
+
</SignedInfo>
|
42
|
+
<SignatureValue>c1YkLvip/5njmwGakJ1Er6PMDUO2zC1HpinFkEEQkL+Ay1XJzGFehQdflIQjb6oRkT3c5DY3c+tcvE+G9/Wzy1m89RKkLvUAdPeI+ZMZw+90Rf5mvJku3QJ/G1bDlBOL54zYIC76El+XmHy1YM71x9+Y56z2mtCxZWAFOP7C3rA=</SignatureValue>
|
43
|
+
<KeyInfo>
|
44
|
+
<wsse:SecurityTokenReference>
|
45
|
+
<wsse:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1"/>
|
46
|
+
</wsse:SecurityTokenReference>
|
47
|
+
</KeyInfo>
|
48
|
+
</Signature>
|
49
|
+
</wsse:Security>
|
50
|
+
</s:Header>
|
51
|
+
<s:Body>
|
52
|
+
<SearchDocuments xmlns="http://tempuri.org/">
|
53
|
+
<searchCriteria xmlns:b="http://schemas.datacontract.org/2004/07/BusinessLogic.Data.Documents.Integration" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
54
|
+
<b:RegistrationNo>1</b:RegistrationNo>
|
55
|
+
</searchCriteria>
|
56
|
+
<ds:Signature/>
|
57
|
+
</SearchDocuments>
|
58
|
+
</s:Body>
|
59
|
+
</s:Envelope>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:wsurandom="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
|
3
|
+
<s:Header>
|
4
|
+
<a:Action s:mustUnderstand="1">http://tempuri.org/IDocumentService/SearchDocuments</a:Action>
|
5
|
+
<a:MessageID>urn:uuid:30db5d4f-ab84-46be-907c-be690a92979b</a:MessageID>
|
6
|
+
<a:ReplyTo>
|
7
|
+
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
|
8
|
+
</a:ReplyTo>
|
9
|
+
<To xmlns="http://www.w3.org/2005/08/addressing" xmlns:a="http://www.w3.org/2003/05/soap-envelope" a:mustUnderstand="1" wsurandom:Id="_7e75a8ded22253b163ca76a40b6cc0c670ed0c33">http://tempuri.org/PublicServices/Test/1.0.12/PublicServices/DocumentService.svc</To>
|
10
|
+
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
|
11
|
+
<wsurandom:Timestamp wsurandom:Id="_071e409128bacfd1bc280e1d0ee581a56e93ffe2">
|
12
|
+
<wsurandom:Created>2012-05-02T18:17:14.467Z</wsurandom:Created>
|
13
|
+
<wsurandom:Expires>2012-05-02T18:22:14.467Z</wsurandom:Expires>
|
14
|
+
</wsurandom:Timestamp>
|
15
|
+
<wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsurandom:Id="uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1">MIICsDCCAhmgAwIBAgIJAOUHvh4oho0tMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTIwNTAzMTMxODIyWhcNMTMwNTAzMTMxODIyWjBFMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvK5hMPv/R5IFmwWyJOyEaFUrF/ZsmN+Gip8hvR6rLP3YPNx9iFYvPcZllFmuVwyaz7YT2N5BsqTwLdyi5v4HY4fUtuz0p8jIPoSd6dfDvcnSpf4QLTOgOaL3ciPEbgDHH2tnIksukoWzqCYva+qFZ74NFl19swXotW9fA4Jzs4QIDAQABo4GnMIGkMB0GA1UdDgQWBBRU1WEHDnP8Hr7ZulxrSzEwOcYpMzB1BgNVHSMEbjBsgBRU1WEHDnP8Hr7ZulxrSzEwOcYpM6FJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAOUHvh4oho0tMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEASY/9SAOK57q9mGnNJJeyDbmyGrAHSJTod646xTHYkMvhUqwHyk9PTr5bdfmswpmyVn+AQ43U2tU5vnpTBmKpHWD2+HSHgGa92mMLrfBOd8EBZ329NL3N2HDPIaHr4NPGyhNrSK3QVOnAq2D0jlyrGYJlLli1NxHiBz7FCEJaVI8=</wsse:BinarySecurityToken><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI="#_071e409128bacfd1bc280e1d0ee581a56e93ffe2"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>YDcfIJMN1Ef14aySyIDif+0XeUE=</DigestValue></Reference><Reference URI="#_7e75a8ded22253b163ca76a40b6cc0c670ed0c33"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>/rAVEm0SjaC0ckFViZd+A0hYe+U=</DigestValue></Reference><Reference URI="#uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>QfyyHQKBXN21QNXRHMDBkxZeTMI=</DigestValue></Reference></SignedInfo><SignatureValue>AKYUCGtsWq4HzQ5NgATA/K6mpEGyoQ7S1imImIChmIcSGVCWfdr01KVpjQPxqnhJSiMZo3gLy4buY5ZUvckFIahIYxbG0ZNCrLACAjtAhXpvUNKjGHgUsW5UV1d5+wrEkUDiMnaym+FM37fyJMfCmmuJAc623LnBSLX349DETlI=</SignatureValue><KeyInfo><wsse:SecurityTokenReference><wsse:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-639b8970-7644-4f9e-9bc4-9c2e367808fc-1"/></wsse:SecurityTokenReference></KeyInfo></Signature></wsse:Security>
|
16
|
+
</s:Header>
|
17
|
+
<s:Body>
|
18
|
+
<SearchDocuments xmlns="http://tempuri.org/">
|
19
|
+
<searchCriteria xmlns:b="http://schemas.datacontract.org/2004/07/BusinessLogic.Data.Documents.Integration" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
20
|
+
<b:RegistrationNo>1</b:RegistrationNo>
|
21
|
+
</searchCriteria>
|
22
|
+
<ds:Signature/>
|
23
|
+
</SearchDocuments>
|
24
|
+
</s:Body>
|
25
|
+
</s:Envelope>
|
data/spec/signer_spec.rb
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Signer do
|
4
|
+
it "should digest and sign SOAP XML with security node and digested binary token" do
|
5
|
+
input_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'input_1.xml')
|
6
|
+
cert_file = File.join(File.dirname(__FILE__), 'fixtures', 'cert.pem')
|
7
|
+
private_key_file = File.join(File.dirname(__FILE__), 'fixtures', 'key.pem')
|
8
|
+
|
9
|
+
signer = Signer.new(File.read(input_xml_file))
|
10
|
+
signer.cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
|
11
|
+
signer.private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file), "test")
|
12
|
+
|
13
|
+
signer.document.xpath("//u:Timestamp", { "u" => "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" }).each do |node|
|
14
|
+
signer.digest!(node)
|
15
|
+
end
|
16
|
+
|
17
|
+
signer.document.xpath("//a:To", { "a" => "http://www.w3.org/2005/08/addressing" }).each do |node|
|
18
|
+
signer.digest!(node)
|
19
|
+
end
|
20
|
+
|
21
|
+
signer.digest!(signer.binary_security_token_node)
|
22
|
+
|
23
|
+
signer.sign!
|
24
|
+
|
25
|
+
# File.open(File.join(File.dirname(__FILE__), 'fixtures', 'output_1.xml'), "w") do |f|
|
26
|
+
# f.write signer.document.to_s
|
27
|
+
# end
|
28
|
+
output_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'output_1.xml')
|
29
|
+
|
30
|
+
signer.to_xml.should == Nokogiri::XML(File.read(output_xml_file), &:noblanks).to_xml(:save_with => 0)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should correctly canonicalize digested nodes (shouldn't account comments)" do
|
34
|
+
input_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'input_3_c14n_comments.xml')
|
35
|
+
cert_file = File.join(File.dirname(__FILE__), 'fixtures', 'cert.pem')
|
36
|
+
private_key_file = File.join(File.dirname(__FILE__), 'fixtures', 'key.pem')
|
37
|
+
|
38
|
+
signer = Signer.new(File.read(input_xml_file))
|
39
|
+
signer.cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
|
40
|
+
signer.private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file), "test")
|
41
|
+
|
42
|
+
signer.digest!(signer.document.at_xpath('//soap:Body', { 'soap' => 'http://www.w3.org/2003/05/soap-envelope'}))
|
43
|
+
signer.sign!
|
44
|
+
|
45
|
+
output_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'output_3_c14n_comments.xml')
|
46
|
+
|
47
|
+
signer.to_xml.should == Nokogiri::XML(File.read(output_xml_file), &:noblanks).to_xml(:save_with => 0)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should digest and sign SOAP XML with SHA256" do
|
51
|
+
input_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'input_1.xml')
|
52
|
+
cert_file = File.join(File.dirname(__FILE__), 'fixtures', 'cert.pem')
|
53
|
+
private_key_file = File.join(File.dirname(__FILE__), 'fixtures', 'key.pem')
|
54
|
+
|
55
|
+
signer = Signer.new(File.read(input_xml_file))
|
56
|
+
signer.cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
|
57
|
+
signer.private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file), "test")
|
58
|
+
signer.digest_algorithm = :sha256
|
59
|
+
signer.signature_digest_algorithm = :sha256
|
60
|
+
signer.signature_algorithm_id = 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256'
|
61
|
+
|
62
|
+
signer.digest!(signer.binary_security_token_node)
|
63
|
+
|
64
|
+
signer.sign!
|
65
|
+
|
66
|
+
output_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'output_1_sha256.xml')
|
67
|
+
|
68
|
+
signer.to_xml.should == Nokogiri::XML(File.read(output_xml_file), &:noblanks).to_xml(:save_with => 0)
|
69
|
+
end
|
70
|
+
|
71
|
+
it "should digest and sign SOAP XML with inclusive namespaces" do
|
72
|
+
input_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'input_1.xml')
|
73
|
+
cert_file = File.join(File.dirname(__FILE__), 'fixtures', 'cert.pem')
|
74
|
+
private_key_file = File.join(File.dirname(__FILE__), 'fixtures', 'key.pem')
|
75
|
+
|
76
|
+
signer = Signer.new(File.read(input_xml_file))
|
77
|
+
signer.cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
|
78
|
+
signer.private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file), "test")
|
79
|
+
|
80
|
+
signer.document.xpath("//soap:Body", { "soap" => "http://www.w3.org/2003/05/soap-envelope" }).each do |node|
|
81
|
+
signer.digest!(node, inclusive_namespaces: ['s'])
|
82
|
+
end
|
83
|
+
|
84
|
+
signer.sign!(security_token: true, inclusive_namespaces: ['s'])
|
85
|
+
|
86
|
+
output_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'output_1_inclusive_namespaces.xml')
|
87
|
+
|
88
|
+
signer.to_xml.should == Nokogiri::XML(File.read(output_xml_file), &:noblanks).to_xml(:save_with => 0)
|
89
|
+
end
|
90
|
+
|
91
|
+
it "should sign simple XML" do
|
92
|
+
input_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'input_2.xml')
|
93
|
+
cert_file = File.join(File.dirname(__FILE__), 'fixtures', 'cert.pem')
|
94
|
+
private_key_file = File.join(File.dirname(__FILE__), 'fixtures', 'key.pem')
|
95
|
+
|
96
|
+
signer = Signer.new(File.read(input_xml_file))
|
97
|
+
signer.cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
|
98
|
+
signer.private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file), "test")
|
99
|
+
signer.security_node = signer.document.root
|
100
|
+
signer.security_token_id = ""
|
101
|
+
signer.digest!(signer.document.root, :id => "", :enveloped => true)
|
102
|
+
signer.sign!(:issuer_serial => true)
|
103
|
+
|
104
|
+
# File.open(File.join(File.dirname(__FILE__), 'fixtures', 'output_2.xml'), "w") do |f|
|
105
|
+
# f.write signer.document.to_s
|
106
|
+
# end
|
107
|
+
output_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'output_2.xml')
|
108
|
+
|
109
|
+
signer.to_xml.should == Nokogiri::XML(File.read(output_xml_file), &:noblanks).to_xml(:save_with => 0)
|
110
|
+
end
|
111
|
+
|
112
|
+
it "should digest and sign SOAP XML with security node and digested binary token" do
|
113
|
+
input_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'input_4_with_nested_signatures.xml')
|
114
|
+
cert_file = File.join(File.dirname(__FILE__), 'fixtures', 'cert.pem')
|
115
|
+
private_key_file = File.join(File.dirname(__FILE__), 'fixtures', 'key.pem')
|
116
|
+
|
117
|
+
signer = Signer.new(File.read(input_xml_file))
|
118
|
+
signer.cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
|
119
|
+
signer.private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file), "test")
|
120
|
+
signer.security_node = signer.document.at_xpath('//soap:Header/wsse:Security', soap: 'http://www.w3.org/2003/05/soap-envelope', wsse: Signer::WSSE_NAMESPACE)
|
121
|
+
|
122
|
+
signer.document.xpath("//u:Timestamp", { "u" => "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" }).each do |node|
|
123
|
+
signer.digest!(node)
|
124
|
+
end
|
125
|
+
|
126
|
+
signer.document.xpath("//a:To", { "a" => "http://www.w3.org/2005/08/addressing" }).each do |node|
|
127
|
+
signer.digest!(node)
|
128
|
+
end
|
129
|
+
|
130
|
+
signer.digest!(signer.binary_security_token_node)
|
131
|
+
|
132
|
+
signer.sign!
|
133
|
+
|
134
|
+
# File.open(File.join(File.dirname(__FILE__), 'fixtures', 'output_4_with_nested_signatures.xml'), "w") do |f|
|
135
|
+
# f.write signer.document.to_s
|
136
|
+
# end
|
137
|
+
output_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'output_4_with_nested_signatures.xml')
|
138
|
+
|
139
|
+
signer.to_xml.should == Nokogiri::XML(File.read(output_xml_file), &:noblanks).to_xml(:save_with => 0)
|
140
|
+
end
|
141
|
+
|
142
|
+
it "should sign simple XML with custom DS namespace prefix" do
|
143
|
+
input_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'input_2.xml')
|
144
|
+
cert_file = File.join(File.dirname(__FILE__), 'fixtures', 'cert.pem')
|
145
|
+
private_key_file = File.join(File.dirname(__FILE__), 'fixtures', 'key.pem')
|
146
|
+
|
147
|
+
signer = Signer.new(File.read(input_xml_file))
|
148
|
+
signer.cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
|
149
|
+
signer.private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file), "test")
|
150
|
+
signer.security_node = signer.document.root
|
151
|
+
signer.security_token_id = ""
|
152
|
+
signer.ds_namespace_prefix = 'ds'
|
153
|
+
signer.digest!(signer.document.root, :id => "", :enveloped => true)
|
154
|
+
signer.sign!(:issuer_serial => true)
|
155
|
+
|
156
|
+
# File.open(File.join(File.dirname(__FILE__), 'fixtures', 'output_2_with_ds_prefix.xml'), "w") do |f|
|
157
|
+
# f.write signer.document.to_s
|
158
|
+
# end
|
159
|
+
output_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'output_2_with_ds_prefix.xml')
|
160
|
+
|
161
|
+
signer.to_xml.should == Nokogiri::XML(File.read(output_xml_file), &:noblanks).to_xml(:save_with => 0)
|
162
|
+
end
|
163
|
+
|
164
|
+
it "should digest and sign SOAP XML with security node and digested binary token with noblanks diabled" do
|
165
|
+
input_xml_file = File.join(File.dirname(__FILE__), 'fixtures', 'input_4_with_nested_signatures.xml')
|
166
|
+
cert_file = File.join(File.dirname(__FILE__), 'fixtures', 'cert.pem')
|
167
|
+
private_key_file = File.join(File.dirname(__FILE__), 'fixtures', 'key.pem')
|
168
|
+
|
169
|
+
signer = Signer.new(File.read(input_xml_file), noblanks: false)
|
170
|
+
signer.cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
|
171
|
+
signer.private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file), "test")
|
172
|
+
signer.security_node = signer.document.at_xpath('//soap:Header/wsse:Security', soap: 'http://www.w3.org/2003/05/soap-envelope', wsse: Signer::WSSE_NAMESPACE)
|
173
|
+
|
174
|
+
signer.document.xpath("//u:Timestamp", { "u" => "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" }).each do |node|
|
175
|
+
signer.digest!(node)
|
176
|
+
end
|
177
|
+
|
178
|
+
signer.document.xpath("//a:To", { "a" => "http://www.w3.org/2005/08/addressing" }).each do |node|
|
179
|
+
signer.digest!(node)
|
180
|
+
end
|
181
|
+
|
182
|
+
signer.digest!(signer.binary_security_token_node)
|
183
|
+
|
184
|
+
signer.sign!
|
185
|
+
|
186
|
+
output_xml_file = File.join(File.dirname(__FILE__),
|
187
|
+
'fixtures',
|
188
|
+
'output_4_with_nested_signatures_with_noblanks_disabled.xml')
|
189
|
+
|
190
|
+
signer.to_xml.should == Nokogiri::XML(File.read(output_xml_file)).to_xml(:save_with => 0)
|
191
|
+
end
|
192
|
+
end
|