Skip to content

Commit 12b750a

Browse files
committed
Follow KeyRef/EncKeyRef move into WSSecurity\Outbound\KeyReference
1 parent 0200026 commit 12b750a

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

tests/Support/Wsse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class Wsse
3131
*/
3232
public static function sign(
3333
?SoapVersion $soapVersion = null,
34-
Outbound\KeyRef $keyRef = Outbound\KeyRef::BinarySecurityToken,
34+
Outbound\KeyReference\KeyRef $keyRef = Outbound\KeyReference\KeyRef::BinarySecurityToken,
3535
?SignatureMethod $signatureMethod = null,
3636
?SignatureCanonicalization $canonicalization = null,
3737
?string $clientCertFile = null,
@@ -64,7 +64,7 @@ public static function sign(
6464
/** Encrypt the sample Body to the given recipient cert and return the encrypted XML. */
6565
public static function encrypt(
6666
string $recipientCertFile,
67-
Outbound\EncKeyRef $encKeyRef = Outbound\EncKeyRef::SubjectKeyIdentifier,
67+
Outbound\KeyReference\EncKeyRef $encKeyRef = Outbound\KeyReference\EncKeyRef::SubjectKeyIdentifier,
6868
?\Soap\Psr18WsseMiddleware\Algorithm\DataEncryptionMethod $dataMethod = null,
6969
?KeyTransportAlgorithm $keyTransport = null,
7070
?string $inputXml = null,

tests/Wsse/EncryptionInteropTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function test_php_encrypted_with_issuerserial_recipient_is_decrypted_by_w
112112
{
113113
$encrypted = Wsse::encrypt(
114114
recipientCertFile: Oracle::certPath('java-server.crt'),
115-
encKeyRef: Outbound\EncKeyRef::IssuerSerial,
115+
encKeyRef: Outbound\KeyReference\EncKeyRef::IssuerSerial,
116116
);
117117

118118
$response = Oracle::post('/decrypt', $encrypted);

tests/Wsse/SignatureInteropTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ public function test_php_signed_ecdsa_sha256_is_accepted_by_wss4j(): void
7878
}
7979

8080
/**
81-
* @return iterable<string, array{Outbound\KeyRef, string}>
81+
* @return iterable<string, array{Outbound\KeyReference\KeyRef, string}>
8282
*/
8383
public static function phpKeyRefProvider(): iterable
8484
{
8585
// keyref => verify keystore hint param. BST/SKI resolve from the recipients keystore (holds php-client);
8686
// IssuerSerial also resolves there because the php-client cert is present.
87-
yield 'BinarySecurityToken' => [Outbound\KeyRef::BinarySecurityToken, ''];
88-
yield 'SubjectKeyIdentifier' => [Outbound\KeyRef::SubjectKeyIdentifier, ''];
89-
yield 'IssuerSerial' => [Outbound\KeyRef::IssuerSerial, '?disableBsp=true'];
87+
yield 'BinarySecurityToken' => [Outbound\KeyReference\KeyRef::BinarySecurityToken, ''];
88+
yield 'SubjectKeyIdentifier' => [Outbound\KeyReference\KeyRef::SubjectKeyIdentifier, ''];
89+
yield 'IssuerSerial' => [Outbound\KeyReference\KeyRef::IssuerSerial, '?disableBsp=true'];
9090
}
9191

9292
#[DataProvider('phpKeyRefProvider')]
93-
public function test_php_signed_keyref_is_accepted_by_wss4j(Outbound\KeyRef $keyRef, string $query): void
93+
public function test_php_signed_keyref_is_accepted_by_wss4j(Outbound\KeyReference\KeyRef $keyRef, string $query): void
9494
{
9595
$signed = Wsse::sign(keyRef: $keyRef);
9696

0 commit comments

Comments
 (0)