Skip to content

Commit 1180fdd

Browse files
committed
Spaces -> tabs
1 parent 6e45a85 commit 1180fdd

File tree

7 files changed

+108
-108
lines changed

7 files changed

+108
-108
lines changed

ext/soap/tests/wss/T01.phpt

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
--TEST--
2-
SOAP CLIENT WSS: SOAP 1.1 / WSS 1.0 SHA1 echo
3-
--EXTENSIONS--
4-
soap
5-
--INI--
6-
soap.wsdl_cache_enabled=0
7-
--FILE--
8-
<?php
9-
include __DIR__.DIRECTORY_SEPARATOR."wss-test.inc";
10-
11-
$client = new LocalSoapClient(__DIR__.DIRECTORY_SEPARATOR."wss-test.wsdl");
12-
13-
$client->__setWSS(array(
14-
"random_id" => false,
15-
"x509_binsectoken" => "TEST CERTIFICATE",
16-
"signfunc" => function($data) {
17-
return "TEST SIGNATURE";
18-
}
19-
));
20-
21-
$client->testFunction(array(
22-
"Param1" => "foo",
23-
"Param2" => "bar"
24-
));
25-
?>
26-
--EXPECTF--
27-
<?xml version="1.0" encoding="UTF-8"?>
28-
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
29-
%w<SOAP-ENV:Header>
30-
%w<wsse:Security SOAP-ENV:mustUnderstand="1">
31-
%w<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="TokenID-1">VEVTVCBDRVJUSUZJQ0FURQ==</wsse:BinarySecurityToken>
32-
%w<ds:Signature>
33-
%w<ds:SignedInfo>
34-
%w<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
35-
%w<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
36-
%w<ds:Reference URI="#BodyID-1">
37-
%w<ds:Transforms>
38-
%w<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
39-
%w</ds:Transforms>
40-
%w<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
41-
%w<ds:DigestValue>OaQiUDsEKrCjytgTUqF4CLsB9jo=</ds:DigestValue>
42-
%w</ds:Reference>
43-
%w</ds:SignedInfo>
44-
%w<ds:SignatureValue>VEVTVCBTSUdOQVRVUkU=</ds:SignatureValue>
45-
%w<ds:KeyInfo>
46-
%w<wsse:SecurityTokenReference>
47-
%w<wsse:Reference URI="#TokenID-1" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
48-
%w</wsse:SecurityTokenReference>
49-
%w</ds:KeyInfo>
50-
%w</ds:Signature>
51-
%w</wsse:Security>
52-
%w</SOAP-ENV:Header>
53-
%w<SOAP-ENV:Body wsu:Id="BodyID-1">
54-
%w<ns1:testFunctionIn>
55-
%w<ns1:Param1>foo</ns1:Param1>
56-
%w<ns1:Param2>bar</ns1:Param2>
57-
%w</ns1:testFunctionIn>
58-
%w</SOAP-ENV:Body>
59-
</SOAP-ENV:Envelope>
1+
--TEST--
2+
SOAP CLIENT WSS: SOAP 1.1 / WSS 1.0 SHA1 echo
3+
--EXTENSIONS--
4+
soap
5+
--INI--
6+
soap.wsdl_cache_enabled=0
7+
--FILE--
8+
<?php
9+
include __DIR__.DIRECTORY_SEPARATOR."wss-test.inc";
10+
11+
$client = new LocalSoapClient(__DIR__.DIRECTORY_SEPARATOR."wss-test.wsdl");
12+
13+
$client->__setWSS(array(
14+
"random_id" => false,
15+
"x509_binsectoken" => "TEST CERTIFICATE",
16+
"signfunc" => function($data) {
17+
return "TEST SIGNATURE";
18+
}
19+
));
20+
21+
$client->testFunction(array(
22+
"Param1" => "foo",
23+
"Param2" => "bar"
24+
));
25+
?>
26+
--EXPECTF--
27+
<?xml version="1.0" encoding="UTF-8"?>
28+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
29+
%w<SOAP-ENV:Header>
30+
%w<wsse:Security SOAP-ENV:mustUnderstand="1">
31+
%w<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="TokenID-1">VEVTVCBDRVJUSUZJQ0FURQ==</wsse:BinarySecurityToken>
32+
%w<ds:Signature>
33+
%w<ds:SignedInfo>
34+
%w<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
35+
%w<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
36+
%w<ds:Reference URI="#BodyID-1">
37+
%w<ds:Transforms>
38+
%w<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
39+
%w</ds:Transforms>
40+
%w<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
41+
%w<ds:DigestValue>OaQiUDsEKrCjytgTUqF4CLsB9jo=</ds:DigestValue>
42+
%w</ds:Reference>
43+
%w</ds:SignedInfo>
44+
%w<ds:SignatureValue>VEVTVCBTSUdOQVRVUkU=</ds:SignatureValue>
45+
%w<ds:KeyInfo>
46+
%w<wsse:SecurityTokenReference>
47+
%w<wsse:Reference URI="#TokenID-1" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
48+
%w</wsse:SecurityTokenReference>
49+
%w</ds:KeyInfo>
50+
%w</ds:Signature>
51+
%w</wsse:Security>
52+
%w</SOAP-ENV:Header>
53+
%w<SOAP-ENV:Body wsu:Id="BodyID-1">
54+
%w<ns1:testFunctionIn>
55+
%w<ns1:Param1>foo</ns1:Param1>
56+
%w<ns1:Param2>bar</ns1:Param2>
57+
%w</ns1:testFunctionIn>
58+
%w</SOAP-ENV:Body>
59+
</SOAP-ENV:Envelope>

ext/soap/tests/wss/T02.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ include __DIR__.DIRECTORY_SEPARATOR."wss-test.inc";
1111
$client = new LocalSoapClient(__DIR__.DIRECTORY_SEPARATOR."wss-test.wsdl");
1212

1313
$client->__setWSS(array(
14-
"x509_binsectoken" => "TEST CERTIFICATE",
15-
"signfunc" => function($data) {
14+
"x509_binsectoken" => "TEST CERTIFICATE",
15+
"signfunc" => function($data) {
1616
return "TEST SIGNATURE";
1717
}
1818
));

ext/soap/tests/wss/T04.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ $client = new LocalSoapClient(__DIR__.DIRECTORY_SEPARATOR."wss-test.wsdl",array(
1313
));
1414

1515
$client->__setWSS(array(
16-
"add_timestamp" => true,
17-
"timestamp_expires" => 300,
18-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
19-
"wss_version" => SOAP_WSS_VERSION_1_1,
20-
"x509_binsectoken" => "TEST CERTIFICATE",
21-
"signfunc" => function($data) {
16+
"add_timestamp" => true,
17+
"timestamp_expires" => 300,
18+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
19+
"wss_version" => SOAP_WSS_VERSION_1_1,
20+
"x509_binsectoken" => "TEST CERTIFICATE",
21+
"signfunc" => function($data) {
2222
return "TEST SIGNATURE";
2323
}
2424
));

ext/soap/tests/wss/T05.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ include __DIR__.DIRECTORY_SEPARATOR."wss-test.inc";
1111
$client = new LocalSoapClient(__DIR__.DIRECTORY_SEPARATOR."wss-test.wsdl");
1212

1313
$client->__setWSS(array(
14-
"random_id" => false,
15-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA512,
16-
"wss_version" => SOAP_WSS_VERSION_1_1,
17-
"x509_binsectoken" => "TEST CERTIFICATE",
18-
"signfunc" => function($data) {
14+
"random_id" => false,
15+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA512,
16+
"wss_version" => SOAP_WSS_VERSION_1_1,
17+
"x509_binsectoken" => "TEST CERTIFICATE",
18+
"signfunc" => function($data) {
1919
return "TEST SIGNATURE";
2020
}
2121
));

ext/soap/tests/wss/T07.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ function __wss_test_signfunc($data) {
1515
$client = new LocalSoapClient(__DIR__.DIRECTORY_SEPARATOR."wss-test.wsdl");
1616

1717
$client->__setWSS(array(
18-
"random_id" => false,
19-
"signfunc" => "__wss_test_signfunc"
18+
"random_id" => false,
19+
"signfunc" => "__wss_test_signfunc"
2020
));
2121

2222
$client->testFunction(array(

ext/soap/tests/wss/T08.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ $obj = new __wssTestSignClass();
1919
$client = new LocalSoapClient(__DIR__.DIRECTORY_SEPARATOR."wss-test.wsdl");
2020

2121
$client->__setWSS(array(
22-
"random_id" => false,
23-
"x509_binsectoken" => "TEST CERTIFICATE",
24-
"signfunc" => array($obj,"sign")
22+
"random_id" => false,
23+
"x509_binsectoken" => "TEST CERTIFICATE",
24+
"signfunc" => array($obj,"sign")
2525
));
2626

2727
$client->testFunction(array(

ext/soap/tests/wss/T09.phpt

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,46 +26,46 @@ try {
2626

2727
try {
2828
$client->__setWSS(array(
29-
"signfunc" => function($data) {
29+
"signfunc" => function($data) {
3030
return $data;
3131
},
32-
"x509_binsectoken" => false
32+
"x509_binsectoken" => false
3333
));
3434
} catch (TypeError $e) {
3535
var_dump($e->getMessage());
3636
}
3737

3838
try {
3939
$client->__setWSS(array(
40-
"signfunc" => function($data) {
40+
"signfunc" => function($data) {
4141
return $data;
4242
},
43-
"x509_binsectoken" => null,
44-
"digest_method" => false,
43+
"x509_binsectoken" => null,
44+
"digest_method" => false,
4545
));
4646
} catch (TypeError $e) {
4747
var_dump($e->getMessage());
4848
}
4949

5050
try {
5151
$client->__setWSS(array(
52-
"signfunc" => function($data) {
52+
"signfunc" => function($data) {
5353
return $data;
5454
},
55-
"x509_binsectoken" => null,
56-
"digest_method" => 999,
55+
"x509_binsectoken" => null,
56+
"digest_method" => 999,
5757
));
5858
} catch (ValueError $e) {
5959
var_dump($e->getMessage());
6060
}
6161

6262
try {
6363
$client->__setWSS(array(
64-
"signfunc" => function($data) {
64+
"signfunc" => function($data) {
6565
return $data;
6666
},
67-
"x509_binsectoken" => null,
68-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
67+
"x509_binsectoken" => null,
68+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
6969
"add_timestamp" => null
7070
));
7171
} catch (TypeError $e) {
@@ -74,11 +74,11 @@ try {
7474

7575
try {
7676
$client->__setWSS(array(
77-
"signfunc" => function($data) {
77+
"signfunc" => function($data) {
7878
return $data;
7979
},
80-
"x509_binsectoken" => null,
81-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
80+
"x509_binsectoken" => null,
81+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
8282
"add_timestamp" => true,
8383
"timestamp_expires" => null
8484
));
@@ -88,11 +88,11 @@ try {
8888

8989
try {
9090
$client->__setWSS(array(
91-
"signfunc" => function($data) {
91+
"signfunc" => function($data) {
9292
return $data;
9393
},
94-
"x509_binsectoken" => null,
95-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
94+
"x509_binsectoken" => null,
95+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
9696
"add_timestamp" => true,
9797
"timestamp_expires" => -1
9898
));
@@ -102,11 +102,11 @@ try {
102102

103103
try {
104104
$client->__setWSS(array(
105-
"signfunc" => function($data) {
105+
"signfunc" => function($data) {
106106
return $data;
107107
},
108-
"x509_binsectoken" => null,
109-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
108+
"x509_binsectoken" => null,
109+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
110110
"add_timestamp" => true,
111111
"timestamp_expires" => 120,
112112
"random_id" => null
@@ -117,11 +117,11 @@ try {
117117

118118
try {
119119
$client->__setWSS(array(
120-
"signfunc" => function($data) {
120+
"signfunc" => function($data) {
121121
return $data;
122122
},
123-
"x509_binsectoken" => null,
124-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
123+
"x509_binsectoken" => null,
124+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
125125
"add_timestamp" => true,
126126
"timestamp_expires" => 120,
127127
"random_id" => true
@@ -132,11 +132,11 @@ try {
132132

133133
try {
134134
$client->__setWSS(array(
135-
"signfunc" => function($data) {
135+
"signfunc" => function($data) {
136136
return $data;
137137
},
138138
"x509_binsectoken" => null,
139-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
139+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
140140
"add_timestamp" => true,
141141
"timestamp_expires" => 120,
142142
"random_id" => true,
@@ -148,11 +148,11 @@ try {
148148

149149
try {
150150
$client->__setWSS(array(
151-
"signfunc" => function($data) {
151+
"signfunc" => function($data) {
152152
return $data;
153153
},
154-
"x509_binsectoken" => null,
155-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
154+
"x509_binsectoken" => null,
155+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
156156
"add_timestamp" => true,
157157
"timestamp_expires" => 120,
158158
"random_id" => true,
@@ -163,11 +163,11 @@ try {
163163
}
164164

165165
var_dump($client->__setWSS(array(
166-
"signfunc" => function($data) {
166+
"signfunc" => function($data) {
167167
return $data;
168168
},
169-
"x509_binsectoken" => null,
170-
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
169+
"x509_binsectoken" => null,
170+
"digest_method" => SOAP_WSS_DIGEST_METHOD_SHA256,
171171
"add_timestamp" => true,
172172
"timestamp_expires" => 120,
173173
"random_id" => true,

0 commit comments

Comments
 (0)