From bac6429296caf2e4472f6d0507e69ced59c62a5a Mon Sep 17 00:00:00 2001 From: Gromcio Date: Wed, 10 Aug 2016 14:34:21 +0200 Subject: [PATCH] Missing letter This missing letter gave me 2 weeks of headache. Apache CXF based service because of this missing letter will deny your whole envelope by simply saying something is wrong "A security error was encountered when verifying the message". --- WsSecurityFilterClientServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WsSecurityFilterClientServer.php b/WsSecurityFilterClientServer.php index 15b0d25..3aa4eda 100644 --- a/WsSecurityFilterClientServer.php +++ b/WsSecurityFilterClientServer.php @@ -219,7 +219,7 @@ protected function createKeyInfo(FilterHelper $filterHelper, $tokenReference, $g } elseif (self::TOKEN_REFERENCE_SUBJECT_KEY_IDENTIFIER === $tokenReference && null !== $xmlSecurityKey) { $keyIdentifier = $filterHelper->createElement(Helper::NS_WSS, 'KeyIdentifier'); $filterHelper->setAttribute($keyIdentifier, null, 'EncodingType', Helper::NAME_WSS_SMS . '#Base64Binary'); - $filterHelper->setAttribute($keyIdentifier, null, 'ValueType', Helper::NAME_WSS_X509 . '#509SubjectKeyIdentifier'); + $filterHelper->setAttribute($keyIdentifier, null, 'ValueType', Helper::NAME_WSS_X509 . '#X509SubjectKeyIdentifier'); $securityTokenReference->appendChild($keyIdentifier); $certificate = $xmlSecurityKey->getX509SubjectKeyIdentifier(); $dataNode = new \DOMText($certificate);