Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Class: Swift_Signers_SMimeSigner

Source Location: /system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php

Class Overview


MIME Message Signer used to apply S/MIME Signature/Encryption to a message.


Author(s):

Implements interfaces:

Variables

Methods



Class Details

[line 18]
MIME Message Signer used to apply S/MIME Signature/Encryption to a message.



Tags:

author:  Romain-Geissler
author:  Sebastiaan Stok <s.stok@rollerscapes.net>


[ Top ]


Class Variables

$encryptCert =

[line 22]



Tags:

access:  protected

Type:   mixed


[ Top ]

$encryptCipher =

[line 28]



Tags:

access:  protected

Type:   mixed


[ Top ]

$encryptLevel =

[line 25]



Tags:

access:  protected

Type:   mixed


[ Top ]

$encryptOptions =

[line 27]



Tags:

access:  protected

Type:   mixed


[ Top ]

$extraCerts =  null

[line 29]



Tags:

access:  protected

Type:   mixed


[ Top ]

$headerFactory =

[line 39]



Tags:

access:  protected



[ Top ]

$replacementFactory =

[line 34]



Tags:

access:  protected



[ Top ]

$signCertificate =

[line 20]



Tags:

access:  protected

Type:   mixed


[ Top ]

$signLevel =

[line 24]



Tags:

access:  protected

Type:   mixed


[ Top ]

$signOptions =

[line 26]



Tags:

access:  protected

Type:   mixed


[ Top ]

$signPrivateKey =

[line 21]



Tags:

access:  protected

Type:   mixed


[ Top ]

$signThenEncrypt =  true

[line 23]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


static method newInstance [line 79]

static Swift_Signers_SMimeSigner newInstance( [string $certificate = null], [string $privateKey = null])

Returns an new Swift_Signers_SMimeSigner instance.



Tags:

access:  public


Parameters:

string   $certificate  
string   $privateKey  

[ Top ]

constructor __construct [line 48]

Swift_Signers_SMimeSigner __construct( [string|null $signCertificate = null], [string|null $signPrivateKey = null], [string|null $encryptCertificate = null])

Constructor.



Tags:

access:  public


Parameters:

string|null   $signCertificate  
string|null   $signPrivateKey  
string|null   $encryptCertificate  

[ Top ]

method copyFromOpenSSLOutput [line 328]

void copyFromOpenSSLOutput( Swift_OutputByteStream $fromStream, Swift_InputByteStream $toStream)



Tags:

access:  protected


Parameters:

Swift_OutputByteStream   $fromStream  
Swift_InputByteStream   $toStream  

[ Top ]

method createMessage [line 269]

Swift_Message createMessage( Swift_Message $message)



Tags:

access:  protected


Parameters:

Swift_Message   $message  

[ Top ]

method getAlteredHeaders [line 230]

array getAlteredHeaders( )

Return the list of header a signer might tamper.



Tags:

access:  public



Implementation of:
Swift_Signers_BodySigner::getAlteredHeaders()
Return the list of header a signer might tamper.
[ Top ]

method getSignCertificate [line 150]

string getSignCertificate( )



Tags:

access:  public


[ Top ]

method getSignPrivateKey [line 158]

string getSignPrivateKey( )



Tags:

access:  public


[ Top ]

method isSignThenEncrypt [line 184]

bool isSignThenEncrypt( )



Tags:

access:  public


[ Top ]

method messageStreamToEncryptedByteStream [line 313]

void messageStreamToEncryptedByteStream( Swift_FileStream $outputStream, Swift_InputByteStream $is)



Tags:

throws:  Swift_IoException
access:  protected


Parameters:

Swift_FileStream   $outputStream  
Swift_InputByteStream   $is  

[ Top ]

method messageStreamToSignedByteStream [line 291]

void messageStreamToSignedByteStream( Swift_FileStream $outputStream, Swift_InputByteStream $inputStream)



Tags:

throws:  Swift_IoException
access:  protected


Parameters:

Swift_FileStream   $outputStream  
Swift_InputByteStream   $inputStream  

[ Top ]

method reset [line 194]

Swift_Signers_SMimeSigner reset( )

Resets internal states.



Tags:

access:  public



Implementation of:
Swift_Signer::reset()
[ Top ]

method setEncryptCertificate [line 128]

Swift_Signers_SMimeSigner setEncryptCertificate( string|array $recipientCerts, [int $cipher = null])

Set the certificate location to use for encryption.



Tags:



Parameters:

string|array   $recipientCerts   Either an single X.509 certificate, or an assoc array of X.509 certificates.
int   $cipher  

[ Top ]

method setSignCertificate [line 96]

Swift_Signers_SMimeSigner setSignCertificate( string $certificate, [string|array $privateKey = null], [int $signOptions = PKCS7_DETACHED], [string $extraCerts = null])

Set the certificate location to use for signing.



Tags:



Parameters:

string   $certificate  
string|array   $privateKey   If the key needs an passphrase use array('file-location', 'passphrase') instead
int   $signOptions   Bitwise operator options for openssl_pkcs7_sign()
string   $extraCerts   A file containing intermediate certificates needed by the signing certificate

[ Top ]

method setSignThenEncrypt [line 174]

Swift_Signers_SMimeSigner setSignThenEncrypt( [bool $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.




Tags:

access:  public


Parameters:

bool   $signThenEncrypt  

[ Top ]

method signMessage [line 206]

Swift_Signers_SMimeSigner signMessage( Swift_Message $message)

Change the Swift_Message to apply the signing.



Tags:

access:  public



Implementation of:
Swift_Signers_BodySigner::signMessage()
Change the Swift_Signed_Message to apply the singing.

Parameters:

Swift_Message   $message  

[ Top ]

method streamToMime [line 354]

void streamToMime( Swift_OutputByteStream $fromStream, Swift_Message $message)

Merges an OutputByteStream to Swift_Message.



Tags:

access:  protected


Parameters:

Swift_OutputByteStream   $fromStream  
Swift_Message   $message  

[ Top ]

method toSMimeByteStream [line 239]

void toSMimeByteStream( Swift_InputByteStream $inputStream, Swift_Message $message, Swift_Message $mimeEntity)



Tags:

access:  protected


Parameters:

Swift_InputByteStream   $inputStream  
Swift_Message   $mimeEntity  
Swift_Message   $message  

[ Top ]


Documentation generated on Sun, 02 Oct 2016 07:54:50 +0000 by phpDocumentor 1.4.3