TYPO3
7.6
|
Public Member Functions | |
__construct ($signCertificate=null, $signPrivateKey=null, $encryptCertificate=null) | |
setSignCertificate ($certificate, $privateKey=null, $signOptions=PKCS7_DETACHED, $extraCerts=null) | |
setEncryptCertificate ($recipientCerts, $cipher=null) | |
getSignCertificate () | |
getSignPrivateKey () | |
setSignThenEncrypt ($signThenEncrypt=true) | |
isSignThenEncrypt () | |
reset () | |
signMessage (Swift_Message $message) | |
getAlteredHeaders () | |
Static Public Member Functions | |
static | newInstance ($certificate=null, $privateKey=null) |
Protected Member Functions | |
toSMimeByteStream (Swift_InputByteStream $inputStream, Swift_Message $message) | |
createMessage (Swift_Message $message) | |
messageStreamToSignedByteStream (Swift_FileStream $outputStream, Swift_InputByteStream $inputStream) | |
messageStreamToEncryptedByteStream (Swift_FileStream $outputStream, Swift_InputByteStream $is) | |
copyFromOpenSSLOutput (Swift_OutputByteStream $fromStream, Swift_InputByteStream $toStream) | |
streamToMime (Swift_OutputByteStream $fromStream, Swift_Message $message) | |
Protected Attributes | |
$signCertificate | |
$signPrivateKey | |
$encryptCert | |
$signThenEncrypt = true | |
$signLevel | |
$encryptLevel | |
$signOptions | |
$encryptOptions | |
$encryptCipher | |
$extraCerts = null | |
$replacementFactory | |
$headerFactory | |
MIME Message Signer used to apply S/MIME Signature/Encryption to a message.
Definition at line 18 of file SMimeSigner.php.
__construct | ( | $signCertificate = null , |
|
$signPrivateKey = null , |
|||
$encryptCertificate = null |
|||
) |
Constructor.
string | $certificate | |
string | $privateKey | |
string | $encryptCertificate |
Definition at line 48 of file SMimeSigner.php.
References $signCertificate, $signPrivateKey, Swift_DependencyContainer\getInstance(), setEncryptCertificate(), and setSignCertificate().
|
protected |
Swift_OutputByteStream | $fromStream | |
Swift_InputByteStream | $toStream |
Definition at line 328 of file SMimeSigner.php.
References Swift_InputByteStream\commit(), Swift_OutputByteStream\read(), and Swift_InputByteStream\write().
Referenced by messageStreamToEncryptedByteStream(), and messageStreamToSignedByteStream().
|
protected |
Swift_Message | $message |
Definition at line 269 of file SMimeSigner.php.
References Swift_Mime_SimpleMimeEntity\getBody(), Swift_Mime_MimePart\getCharset(), Swift_Mime_SimpleMimeEntity\getChildren(), Swift_Mime_SimpleMimeEntity\getContentType(), and Swift_Mime_SimpleMimeEntity\setChildren().
Referenced by toSMimeByteStream().
getAlteredHeaders | ( | ) |
Return the list of header a signer might tamper.
Implements Swift_Signers_BodySigner.
Definition at line 230 of file SMimeSigner.php.
getSignCertificate | ( | ) |
getSignPrivateKey | ( | ) |
isSignThenEncrypt | ( | ) |
|
protected |
Swift_FileStream | $outputStream | |
Swift_InputByteStream | $is |
Swift_IoException |
Definition at line 313 of file SMimeSigner.php.
References $encryptCert, $encryptCipher, copyFromOpenSSLOutput(), and Swift_FileStream\getPath().
Referenced by toSMimeByteStream().
|
protected |
Swift_FileStream | $outputStream | |
Swift_InputByteStream | $inputStream |
Swift_IoException |
Definition at line 291 of file SMimeSigner.php.
References $extraCerts, $signCertificate, $signOptions, $signPrivateKey, copyFromOpenSSLOutput(), and Swift_FileStream\getPath().
Referenced by toSMimeByteStream().
|
static |
Returns an new Swift_Signers_SMimeSigner instance.
string | $certificate | |
string | $privateKey |
Definition at line 79 of file SMimeSigner.php.
reset | ( | ) |
Resets internal states.
Implements Swift_Signer.
Definition at line 194 of file SMimeSigner.php.
setEncryptCertificate | ( | $recipientCerts, | |
$cipher = null |
|||
) |
Set the certificate location to use for encryption.
http://nl3.php.net/manual/en/openssl.ciphers.php string|array $recipientCerts Either an single X.509 certificate, or an assoc array of X.509 certificates. int $cipher Swift_Signers_SMimeSigner
Definition at line 128 of file SMimeSigner.php.
Referenced by __construct().
setSignCertificate | ( | $certificate, | |
$privateKey = null , |
|||
$signOptions = PKCS7_DETACHED , |
|||
$extraCerts = null |
|||
) |
Set the certificate location to use for signing.
Definition at line 96 of file SMimeSigner.php.
References $extraCerts, and $signOptions.
Referenced by __construct().
setSignThenEncrypt | ( | $signThenEncrypt = true | ) |
Set perform signing before encryption.
The default is to first sign the message and then encrypt. But some older mail clients, namely Microsoft Outlook 2000 will work when the message first encrypted. As this goes against the official specs, its recommended to only use 'encryption -> signing' when specifically targeting these 'broken' clients.
string | $signThenEncrypt |
Definition at line 174 of file SMimeSigner.php.
References $signThenEncrypt.
signMessage | ( | Swift_Message | $message | ) |
Change the Swift_Message to apply the signing.
Swift_Message | $message |
Implements Swift_Signers_BodySigner.
Definition at line 206 of file SMimeSigner.php.
References Swift_DependencyContainer\getInstance(), Swift_Mime_SimpleMimeEntity\setChildren(), Swift_Mime_SimpleMimeEntity\setEncoder(), streamToMime(), and toSMimeByteStream().
|
protected |
Merges an OutputByteStream to Swift_Message.
Swift_OutputByteStream | $fromStream | |
Swift_Message | $message |
Definition at line 354 of file SMimeSigner.php.
References Swift_Mime_SimpleMimeEntity\getHeaders(), Swift_DependencyContainer\getInstance(), Swift_OutputByteStream\read(), Swift_Mime_MimePart\setBody(), Swift_Mime_SimpleMimeEntity\setBoundary(), Swift_Mime_SimpleMimeEntity\setContentType(), and Swift_OutputByteStream\setReadPointer().
Referenced by signMessage().
|
protected |
Swift_InputByteStream | $inputStream | |
Swift_Message | $mimeEntity |
Definition at line 239 of file SMimeSigner.php.
References createMessage(), elseif, messageStreamToEncryptedByteStream(), and messageStreamToSignedByteStream().
Referenced by signMessage().
|
protected |
Definition at line 22 of file SMimeSigner.php.
Referenced by messageStreamToEncryptedByteStream().
|
protected |
Definition at line 28 of file SMimeSigner.php.
Referenced by messageStreamToEncryptedByteStream().
|
protected |
Definition at line 25 of file SMimeSigner.php.
|
protected |
Definition at line 27 of file SMimeSigner.php.
|
protected |
Definition at line 29 of file SMimeSigner.php.
Referenced by messageStreamToSignedByteStream(), and setSignCertificate().
|
protected |
Definition at line 39 of file SMimeSigner.php.
|
protected |
Definition at line 34 of file SMimeSigner.php.
|
protected |
Definition at line 20 of file SMimeSigner.php.
Referenced by __construct(), getSignCertificate(), and messageStreamToSignedByteStream().
|
protected |
Definition at line 24 of file SMimeSigner.php.
|
protected |
Definition at line 26 of file SMimeSigner.php.
Referenced by messageStreamToSignedByteStream(), and setSignCertificate().
|
protected |
Definition at line 21 of file SMimeSigner.php.
Referenced by __construct(), getSignPrivateKey(), and messageStreamToSignedByteStream().
|
protected |
Definition at line 23 of file SMimeSigner.php.
Referenced by isSignThenEncrypt(), and setSignThenEncrypt().