summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-07-07 12:22:20 -0400
committerjim-p <jimp@pfsense.org>2010-07-07 12:23:02 -0400
commitecefc738d72fef321fd00f9c624fead7390348b7 (patch)
tree31df8daf0440fdba78aff8e3f7d087a5420f913e /etc
parentfe4fc20bf06e032daf7993714da85a415f9eb51f (diff)
downloadpfsense-ecefc738d72fef321fd00f9c624fead7390348b7.zip
pfsense-ecefc738d72fef321fd00f9c624fead7390348b7.tar.gz
Allow importing of a CA's private key (optionally).
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/certs.inc4
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);
OpenPOWER on IntegriCloud