1
0
mirror of https://github.com/danog/tgseclib.git synced 2025-01-22 05:51:20 +01:00

Merge pull request #723 from terrafrost/x509-null-1.0

set signaturealgorithm parameters field to null / 1.0 branch

* terrafrost/x509-null-1.0:
  X509: set one more parameter to null
  X509: set another parameters field to null
This commit is contained in:
Andreas Fischer 2015-06-30 12:27:05 +02:00
commit 61af2be8f9
2 changed files with 5 additions and 0 deletions

View File

@ -1512,6 +1512,9 @@ class File_X509
it seems like perhaps the ASN.1 description ought not say the parameters field is OPTIONAL, but whatever. it seems like perhaps the ASN.1 description ought not say the parameters field is OPTIONAL, but whatever.
*/ */
$cert['tbsCertificate']['subjectPublicKeyInfo']['algorithm']['parameters'] = null; $cert['tbsCertificate']['subjectPublicKeyInfo']['algorithm']['parameters'] = null;
// https://tools.ietf.org/html/rfc3279#section-2.2.1
$cert['signatureAlgorithm']['parameters'] = null;
$cert['tbsCertificate']['signature']['parameters'] = null;
} }
} }

View File

@ -137,6 +137,8 @@ aBtsWpliLSex/HHhtRW9AkBGcq67zKmEpJ9kXcYLEjJii3flFS+Ct/rNm+Hhm1l7
$cert = $x509->loadX509($cert); $cert = $x509->loadX509($cert);
$this->assertArrayHasKey('parameters', $cert['tbsCertificate']['subjectPublicKeyInfo']['algorithm']); $this->assertArrayHasKey('parameters', $cert['tbsCertificate']['subjectPublicKeyInfo']['algorithm']);
$this->assertArrayHasKey('parameters', $cert['signatureAlgorithm']);
$this->assertArrayHasKey('parameters', $cert['tbsCertificate']['signature']);
} }
private function _encodeOID($oid) private function _encodeOID($oid)