robrichards / wse-php

Libraries for adding WS-* support to ext/soap in PHP
129 stars 92 forks source link

Add private key passphrase option to decryptSoapDoc #40

Closed cmmcneill closed 5 years ago

cmmcneill commented 6 years ago

Added an option to decryptSoapDoc named 'passphrase' so that an encrypted private key can be used to decrypt a document without manually decrypting the key beforehand.

Example:

$wsse = new WSSESoap($doc);
$options = [
    'keys' => [
        'private' => [
            'key' => $encryptedPrivateKey,
            'passphrase' => $privateKeyPass
        ]
    ]
];
$wsse->decryptSoapDoc($doc, $options);
robrichards commented 5 years ago

Thanks!