summaryrefslogtreecommitdiffstats
path: root/etc/inc/certs.inc
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2010-04-12 17:32:34 -0400
committerjim-p <jim@pingle.org>2010-04-12 17:32:34 -0400
commita84eb838596bf3d3b0722c0ff44ea3e83aa210f2 (patch)
treec6be699c9b0b969c4817b9c9f8e4c9739bf74071 /etc/inc/certs.inc
parent6f8b8ed05b0937905caeaebe1f97bde74f6816f4 (diff)
downloadpfsense-a84eb838596bf3d3b0722c0ff44ea3e83aa210f2.zip
pfsense-a84eb838596bf3d3b0722c0ff44ea3e83aa210f2.tar.gz
Perform more strict validation on CA and Cert names before proceeding in the wizard.
Diffstat (limited to 'etc/inc/certs.inc')
-rw-r--r--etc/inc/certs.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc
index b9c3383..88fb2b9 100644
--- a/etc/inc/certs.inc
+++ b/etc/inc/certs.inc
@@ -307,6 +307,12 @@ function cert_get_subject_array($crt) {
return $subject_array;
}
+function cert_get_subject_hash($crt) {
+ $str_crt = base64_decode($crt);
+ $inf_crt = openssl_x509_parse($str_crt);
+ return $inf_crt['subject'];
+}
+
function cert_get_issuer($str_crt, $decode = true) {
if ($decode)
OpenPOWER on IntegriCloud