ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
__construct ($options=array()) | |
Constructor for the metadata signer. More... | |
loadPrivateKeyArray ($privatekey) | |
Set the private key from an array. More... | |
loadPrivateKey ($file, $pass=null, $full_path=false) | |
Set the private key. More... | |
loadPublicKeyArray ($publickey) | |
Set the public key / certificate we should include in the signature. More... | |
loadCertificate ($file, $full_path=false) | |
Set the certificate we should include in the signature. More... | |
setIDAttribute ($idAttrName) | |
Set the attribute name for the ID value. More... | |
addCertificate ($file, $full_path=false) | |
Add an extra certificate to the certificate chain in the signature. More... | |
sign ($node, $insertInto, $insertBefore=null) | |
Signs the given DOMElement and inserts the signature at the given position. More... | |
Private Attributes | |
$idAttrName | |
$privateKey | |
$certificate | |
$extraCertificates | |
Definition at line 18 of file Signer.php.
SimpleSAML\XML\Signer::__construct | ( | $options = array() | ) |
Constructor for the metadata signer.
You can pass an list of options as key-value pairs in the array. This allows you to initialize a metadata signer in one call.
The following keys are recognized:
array | $options | Associative array with options for the constructor. Defaults to an empty array. |
Definition at line 60 of file Signer.php.
References $options, $pass, array, SimpleSAML\XML\Signer\loadCertificate(), SimpleSAML\XML\Signer\loadPrivateKey(), SimpleSAML\XML\Signer\loadPrivateKeyArray(), and SimpleSAML\XML\Signer\loadPublicKeyArray().
SimpleSAML\XML\Signer::addCertificate | ( | $file, | |
$full_path = false |
|||
) |
Add an extra certificate to the certificate chain in the signature.
Extra certificates will be added to the certificate chain in the order they are added.
string | $file | The file which contains the certificate, relative to the cert-directory. |
bool | $full_path | Whether the filename found in the configuration contains the full path to the private key or not. Default to false. |
Definition at line 239 of file Signer.php.
References SimpleSAML\XML\Signer\$certificate, $file, and SimpleSAML\Utils\Config\getCertPath().
SimpleSAML\XML\Signer::loadCertificate | ( | $file, | |
$full_path = false |
|||
) |
Set the certificate we should include in the signature.
If this function isn't called, no certificate will be included. Will throw an exception if unable to load the certificate.
string | $file | The file which contains the certificate. The path is assumed to be relative to the cert-directory. |
bool | $full_path | Whether the filename found in the configuration contains the full path to the private key or not. Default to false. |
Definition at line 193 of file Signer.php.
References $file, and SimpleSAML\Utils\Config\getCertPath().
Referenced by SimpleSAML\XML\Signer\__construct().
SimpleSAML\XML\Signer::loadPrivateKey | ( | $file, | |
$pass = null , |
|||
$full_path = false |
|||
) |
Set the private key.
Will throw an exception if unable to load the private key.
string | $file | The file which contains the private key. The path is assumed to be relative to the cert-directory. |
string | null | $pass | The passphrase on the private key. Pass no value or NULL if the private key is unencrypted. |
bool | $full_path | Whether the filename found in the configuration contains the full path to the private key or not. Default to false. |
Definition at line 130 of file Signer.php.
References $file, $pass, array, SimpleSAML\Utils\Config\getCertPath(), and SimpleSAML\XML\Signer\loadPrivateKeyArray().
Referenced by SimpleSAML\XML\Signer\__construct().
SimpleSAML\XML\Signer::loadPrivateKeyArray | ( | $privatekey | ) |
Set the private key from an array.
This function loads the private key from an array matching what is returned by SimpleSAML_Utilities::loadPrivateKey(...).
array | $privatekey | The private key. |
Definition at line 104 of file Signer.php.
References array, and RobRichards\XMLSecLibs\XMLSecurityKey\RSA_SHA1.
Referenced by SimpleSAML\XML\Signer\__construct(), and SimpleSAML\XML\Signer\loadPrivateKey().
SimpleSAML\XML\Signer::loadPublicKeyArray | ( | $publickey | ) |
Set the public key / certificate we should include in the signature.
This function loads the public key from an array matching what is returned by SimpleSAML_Utilities::loadPublicKey(...).
array | $publickey | The public key. |
Definition at line 167 of file Signer.php.
Referenced by SimpleSAML\XML\Signer\__construct().
SimpleSAML\XML\Signer::setIDAttribute | ( | $idAttrName | ) |
Set the attribute name for the ID value.
string | $idAttrName | The name of the attribute which contains the id. |
Definition at line 220 of file Signer.php.
References SimpleSAML\XML\Signer\$idAttrName.
SimpleSAML\XML\Signer::sign | ( | $node, | |
$insertInto, | |||
$insertBefore = null |
|||
) |
Signs the given DOMElement and inserts the signature at the given position.
The private key must be set before calling this function.
\DOMElement | $node | The DOMElement we should generate a signature for. |
\DOMElement | $insertInto | The DOMElement we should insert the signature element into. |
\DOMElement | $insertBefore | The element we should insert the signature element before. Defaults to NULL, in which case the signature will be appended to the element spesified in $insertInto. |
Definition at line 275 of file Signer.php.
References SimpleSAML\XML\Signer\$certificate, SimpleSAML\XML\Signer\$idAttrName, $options, array, RobRichards\XMLSecLibs\XMLSecurityDSig\EXC_C14N, and RobRichards\XMLSecLibs\XMLSecurityDSig\SHA1.
|
private |
Definition at line 35 of file Signer.php.
Referenced by SimpleSAML\XML\Signer\addCertificate(), and SimpleSAML\XML\Signer\sign().
|
private |
Definition at line 41 of file Signer.php.
|
private |
Definition at line 25 of file Signer.php.
Referenced by SimpleSAML\XML\Signer\setIDAttribute(), and SimpleSAML\XML\Signer\sign().
|
private |
Definition at line 30 of file Signer.php.