Skip to content

Commit

Permalink
playground client certificates and demo requests updated
Browse files Browse the repository at this point in the history
  • Loading branch information
todvora committed Oct 19, 2016
1 parent fc8aed7 commit 947e267
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Implementer has to take care of:

## Usage
```java
InputStream clientKey = getClass().getResourceAsStream("/keys/01000005.p12");
InputStream clientKey = getClass().getResourceAsStream("/keys/CZ683555118.p12");
InputStream serverCertificate = getClass().getResourceAsStream("/keys/qica.der");
EETClient client = EETServiceFactory.getInstance(clientKey, "eet", serverCertificate);

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/cz/tomasdvorak/eet/client/EETClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void setUp() throws Exception {
/*
Client's key pair, used to sign requests
*/
final InputStream clientKey = getClass().getResourceAsStream("/keys/01000005.p12");
final InputStream clientKey = getClass().getResourceAsStream("/keys/CZ683555118.p12");

/*
EET's server certificate, issued by I.CA, used to verify response signature
Expand Down Expand Up @@ -58,7 +58,7 @@ public void testCommunication() throws Exception {

@Test
public void testTimeoutHandling() throws Exception {
final InputStream clientKey = getClass().getResourceAsStream("/keys/01000005.p12");
final InputStream clientKey = getClass().getResourceAsStream("/keys/CZ683555118.p12");
final InputStream serverCertificate = getClass().getResourceAsStream("/keys/qica.der");
final EETClient client = EETServiceFactory.getInstance(clientKey, "eet", serverCertificate, new WebserviceConfiguration(1L));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public class SecurityCodesGeneratorTest {
@Before
public void setUp() throws Exception {
testData = Arrays.asList(
new DemoRequestHolder("/keys/01000003.p12", "eet", "/requests/CZ1212121218.valid.v3.xml"),
new DemoRequestHolder("/keys/01000004.p12", "eet", "/requests/CZ00000019.valid.v3.xml")
new DemoRequestHolder("/keys/CZ1212121218.p12", "eet", "/requests/CZ1212121218.valid.v3.1.xml"),
new DemoRequestHolder("/keys/CZ00000019.p12", "eet", "/requests/CZ00000019.valid.v3.1.xml")
);
}

Expand Down
Binary file removed src/test/resources/keys/01000003.p12
Binary file not shown.
Binary file removed src/test/resources/keys/01000004.p12
Binary file not shown.
Binary file removed src/test/resources/keys/01000005.p12
Binary file not shown.
Binary file added src/test/resources/keys/CZ00000019.p12
Binary file not shown.
Binary file added src/test/resources/keys/CZ1212121218.p12
Binary file not shown.
Binary file added src/test/resources/keys/CZ683555118.p12
Binary file not shown.
2 changes: 2 additions & 0 deletions src/test/resources/requests/CZ00000019.valid.v3.1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soap:mustUnderstand="1"><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="X509-A79845F15C5549CA0514761283545351">MIIEmDCCA4CgAwIBAgIEdHOXJzANBgkqhkiG9w0BAQsFADB3MRIwEAYKCZImiZPyLGQBGRYCQ1oxQzBBBgNVBAoMOsSMZXNrw6EgUmVwdWJsaWthIOKAkyBHZW5lcsOhbG7DrSBmaW5hbsSNbsOtIMWZZWRpdGVsc3R2w60xHDAaBgNVBAMTE0VFVCBDQSAxIFBsYXlncm91bmQwHhcNMTYwOTMwMDkwMzU5WhcNMTkwOTMwMDkwMzU5WjBDMRIwEAYKCZImiZPyLGQBGRYCQ1oxEzARB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JZmiXTbGgOCKiUPIXO80cnP7U1ZPkVNV7WZwh0I2k/fg1VLTI5HA/x4BeD77wiEOExa7eqePJET0jpTVK3LxSW59LLIJROh4/kfKQbTvDL5Ypw8WagAMVCPvWnGJIcUru+ApLU4pZD9bdHSa1Ib4LpFhtWrkHYM/XqKbj2bNKKjTo5T3sU0Bf2QD3QzkmcjlNVG0V+qAgimwTdPueU/mtExw+7z1/A==</wsse:BinarySecurityToken><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SIG-A79845F15C5549CA0514761283545705"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="soap"/></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/><ds:Reference URI="#id-A79845F15C5549CA0514761283545594"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList=""/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>M8/dBI/LLuwxP8ZoeRKVVpzIhQhyUDI0l6bglhNWKC0=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>DlFiF51sdtc0zeqgCsuSY6EU5emX7Hka6Ox3gviR4dpqyrwj6O8cm4oWkUTl+erINf9CpOG2y1z5y83+DubuGmiOPsACeEZjwF5TCme/uU1tzXs+LsLS8WXZvuMUejFOrUFEUKyzRvHJW5lskV/DhiMsTwJ/MEtGtjRVuWnAEcHxq/3ALsc3HfSi/qAqAiGlz3OpIKf3Hai6iiD37eJwHNd9QdJy4D32DJwY4Gw21ku7TO3FiLdtBT+Xdr3At8sWbbihFwErKrutT/FAVQKffUzCjHdEm9//W/shHufxYdnEh0m8cYp5Z5xK2bfnfhaKPB0rUZrrcw8T7LlvZKGogg==</ds:SignatureValue><ds:KeyInfo Id="KI-A79845F15C5549CA0514761283545482"><wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STR-A79845F15C5549CA0514761283545513"><wsse:Reference URI="#X509-A79845F15C5549CA0514761283545351" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature></wsse:Security></SOAP-ENV:Header><soap:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-A79845F15C5549CA0514761283545594"><Trzba xmlns="http://fs.mfcr.cz/eet/schema/v3"><Hlavicka dat_odesl="2016-08-19T19:06:37+02:00" prvni_zaslani="false" uuid_zpravy="2da635a5-d712-459d-9674-c12f335c39f7"/><Data celk_trzba="34113.00" cerp_zuct="679.00" cest_sluz="5460.00" dan1="-172.39" dan2="-530.73" dan3="975.65" dat_trzby="2016-08-05T00:30:12+02:00" dic_popl="CZ00000019" dic_poverujiciho="CZ683555118" id_pokl="/5546/RO24" id_provoz="273" porad_cis="0/6460/ZQ42" pouzit_zboz1="784.00" pouzit_zboz2="967.00" pouzit_zboz3="189.00" rezim="0" urceno_cerp_zuct="324.00" zakl_dan1="-820.92" zakl_dan2="-3538.20" zakl_dan3="9756.46" zakl_nepodl_dph="3036.00"/><KontrolniKody><pkp cipher="RSA2048" digest="SHA256" encoding="base64">a0asEiJhFCBlVtptSspKvEZhcrvnzF7SQ55C4DhnStnSu1b37GUI2+Dlme9P94UCPZ1oCUPJdsYOBZ3IX6aEgEe0FJKXYX0kXraYCJKIo3g64wRchE7iblIOBCK1uHh8qqHA66Isnhb6hqBOOdlt2aWO/0jCzlfeQr0axpPF1mohMnP3h3ICaxZh0dnMdju5OmMrq+91PL5T9KkR7bfGHqAoWJ0kmxY/mZumtRfGil2/xf7I5pdVeYXPgDO/Tojzm6J95n68fPDOXTDrTzKYmqDjpg3kmWepLNQKFXRmkQrkBLToJWG1LDUDm3UTTmPWzq4c0XnGcXJDZglxfolGpA==</pkp><bkp digest="SHA1" encoding="base16">9356D566-A3E48838-FB403790-D201244E-95DCBD92</bkp></KontrolniKody></Trzba></soap:Body></soap:Envelope>
2 changes: 0 additions & 2 deletions src/test/resources/requests/CZ00000019.valid.v3.xml

This file was deleted.

2 changes: 2 additions & 0 deletions src/test/resources/requests/CZ1212121218.valid.v3.1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soap:mustUnderstand="1"><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="X509-AB79979F3364F5119A14761286403811">MIIEmDCCA4CgAwIBAgIEVjaXMDANBgkqhkiG9w0BAQsFADB3MRIwEAYKCZImiZPyLGQBGRYCQ1oxQzBBBgNVBAoMOsSMZXNrw6EgUmVwdWJsaWthIOKAkyBHZW5lcsOhbG7DrSBmaW5hbsSNbsOtIMWZZWRpdGVsc3R2w60xHDAaBgNVBAMTE0VFVCBDQSAxIFBsYXlncm91bmQwHhcNMTYwOTMwMDkwMjQ0WhcNMT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E4XPKyJclUDhT4dEoR0JcCiFZci8Oei35p6PAZ/dFEXBLHylMO5JOY5JNwhUJNkhE2oSoCDBWpZ+tF6sPPeQv+dR9Zcj6vy767D0XGz6zyrxB3Lb1t03SO+pGac/1C7dc3rOkBkqxz7b7dVRl7hT31ct/TTSMBBvPqStiUNF375nKb1pRTSZtj5jt8m8UHChmu6bWyFGYLqil9XFHr3xeIGK8hRb4pPdjMEOY6HULZwImPg3SnP8fInbXA47hWoHb7pGwpdE5Jybveo6ae8HNx4w==</wsse:BinarySecurityToken><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SIG-AB79979F3364F5119A14761286404065"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="soap"/></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/><ds:Reference URI="#id-AB79979F3364F5119A14761286403964"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList=""/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>TWpSLQpOXSUe8k6Q8lAd7DyMhWkTIcbHNifrPnWDG/M=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>SX8rtbZ6ip6ayGLQsmoSjd5wVKJEXfbOIqP75E3HchB5QD09YYKuMpXVzLawtJHNVFPE8AvN0jqQaQkJCS2NaI0BZfBsryEx/Pnoq8dkwEYbEa7XgBIzblVNmN9iiaQoQPC2Q/PHCwhOSYUmMRM8liwBnkdaqNWw/6BySw7PWcS/BMDm3d3O/igheuO8Tbi3ksybTDun5lf8xsWdFFRZ2hJX4rJm9p2ro128AbDO6yJIy/sfsyEvMFkpSQ8pms66EIgz0OflhplvPxOsYjA4V0aB31M5t2qXAUNKBcaZkyUZDhLSgBf63GzcfQ501s8R/fwmH07NxfDFmSsrsP3LHw==</ds:SignatureValue><ds:KeyInfo Id="KI-AB79979F3364F5119A14761286403862"><wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STR-AB79979F3364F5119A14761286403893"><wsse:Reference URI="#X509-AB79979F3364F5119A14761286403811" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature></wsse:Security></SOAP-ENV:Header><soap:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-AB79979F3364F5119A14761286403964"><Trzba xmlns="http://fs.mfcr.cz/eet/schema/v3"><Hlavicka dat_odesl="2016-09-19T19:06:37+02:00" prvni_zaslani="false" uuid_zpravy="ab1bc7a0-5ab0-4d61-a170-2982f2d83784"/><Data celk_trzba="34113.00" cerp_zuct="679.00" cest_sluz="5460.00" dan1="-172.39" dan2="-530.73" dan3="975.65" dat_trzby="2016-08-05T00:30:12+02:00" dic_popl="CZ1212121218" id_pokl="/5546/RO24" id_provoz="273" porad_cis="0/6460/ZQ42" pouzit_zboz1="784.00" pouzit_zboz2="967.00" pouzit_zboz3="189.00" rezim="0" urceno_cerp_zuct="324.00" zakl_dan1="-820.92" zakl_dan2="-3538.20" zakl_dan3="9756.46" zakl_nepodl_dph="3036.00"/><KontrolniKody><pkp cipher="RSA2048" digest="SHA256" encoding="base64">JvCv0lXfT74zuviJaHeO91guUfum1MKhq0NNPxW0YlBGvIIt+I4QxEC3QP6BRwEkIS14n2WN+9oQ8nhQPYwZX7L4W9Ie7CYv1ojcl/YiF4560EdB3IpRNRj3UjQlwSZ5ucSM9vWqp0UTbhJDSUk5/WjC/CEiSYv7OQIqa0NJ0f0+ldzGveLRSF34eu2iqAhs/yfDnENlnMDPVB5ko/zQO0vcC93k5DEWEoytTIAsKd6jKSO7eama8Qe+d0wq9vBzudkfLgCe2C1iERJuyHknhjo9KOx10h5wk99QqVGX8tthpAmryDcX2N0ZGkzJHuzzebnYsxXFYI2tKOJLiLLoLQ==</pkp><bkp digest="SHA1" encoding="base16">3F9119C1-FBF34535-D30B60F8-9859E4A6-C8C8AAFA</bkp></KontrolniKody></Trzba></soap:Body></soap:Envelope>
Loading

0 comments on commit 947e267

Please sign in to comment.