diff options
author | jim-p <jimp@pfsense.org> | 2010-07-07 12:22:20 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-07-07 12:23:02 -0400 |
commit | ecefc738d72fef321fd00f9c624fead7390348b7 (patch) | |
tree | 31df8daf0440fdba78aff8e3f7d087a5420f913e /etc/inc/certs.inc | |
parent | fe4fc20bf06e032daf7993714da85a415f9eb51f (diff) | |
download | pfsense-ecefc738d72fef321fd00f9c624fead7390348b7.zip pfsense-ecefc738d72fef321fd00f9c624fead7390348b7.tar.gz |
Allow importing of a CA's private key (optionally).
Diffstat (limited to 'etc/inc/certs.inc')
-rw-r--r-- | etc/inc/certs.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc index 88fb2b9..6d48e55 100644 --- a/etc/inc/certs.inc +++ b/etc/inc/certs.inc @@ -101,10 +101,12 @@ function ca_chain(& $cert) { return ""; } -function ca_import(& $ca, $str) { +function ca_import(& $ca, $str, $key="") { global $config; $ca['crt'] = base64_encode($str); + if (!empty($key)) + $ca['prv'] = base64_encode($key); $subject = cert_get_subject($str, false); $issuer = cert_get_issuer($str, false); |