What the signed structures of the PKI share (time-stamp tokens, CRLs, OCSP responses): their algorithm identifiers, the verification of their signature with the algorithms and key sizes of the seals. The functions throw an Exception whose message says what is wrong, for the caller to put in context.
| Methods | ||
|---|---|---|
public
static
|
sequenceOf($element, $what)
|
# |
public
static
|
digestOf($algorithm): string
|
# |
public
static
|
verifySignature(
array $algorithm,
string|null $digest,
resource|OpenSSLAsymmetricKey $key,
string $data,
string $signature,
): boolean
|
# |
| Constants | |||
|---|---|---|---|
public
|
OID_SHA1 = '1.3.14.3.2.26'
|
# | |
public
|
OID_SHA256 = '2.16.840.1.101.3.4.2.1'
|
# | |
public
|
OID_SHA384 = '2.16.840.1.101.3.4.2.2'
|
# | |
public
|
OID_SHA512 = '2.16.840.1.101.3.4.2.3'
|
# | |
public
|
OID_RSA_PSS = '1.2.840.113549.1.1.10'
|
# | |
public
|
OID_MGF1 = '1.2.840.113549.1.1.8'
|
# | |
public
|
DIGEST_OIDS = [self::OID_SHA256 => 'sha256', self::OID_SHA384 => 'sha384', self::OID_SHA512 => 'sha512']
|
# | |
public
|
SIGNATURES = [
'1.2.840.113549.1.1.1' => ['rsa', null],
'1.2.840.113549.1.1.11' => ['rsa', 'sha256'],
'1.2.840.113549.1.1.12' => ['rsa', 'sha384'],
'1.2.840.113549.1.1.13' => ['rsa', 'sha512'],
'1.2.840.10045.4.3.2' => ['ec', 'sha256'],
'1.2.840.10045.4.3.3' => ['ec', 'sha384'],
'1.2.840.10045.4.3.4' => ['ec', 'sha512'],
]
|
# | |