X509: set-up key identifier upon certificate loading.

This commit is contained in:
monnerat 2012-10-12 02:42:19 +01:00
parent 4f634aaca8
commit 73b0d05ddc

View File

@ -1269,6 +1269,9 @@ class File_X509 {
$this->currentCert = $x509; $this->currentCert = $x509;
$this->dn = $x509['tbsCertificate']['subject']; $this->dn = $x509['tbsCertificate']['subject'];
$keyIdentifier = $this->getExtension('id-ce-subjectKeyIdentifier');
$this->keyIdentifier = is_string($keyIdentifier) ? $keyIdentifier : NULL;
return $x509; return $x509;
} }
@ -2189,6 +2192,7 @@ class File_X509 {
$this->publicKey = NULL; $this->publicKey = NULL;
} }
$this->keyIdentifier = NULL;
$this->currentCert = $csr; $this->currentCert = $csr;
return $csr; return $csr;