diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-08-24 18:15:25 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-08-24 18:15:25 -0400 |
commit | d43ad788f295023f6e7d923fa07f0928a9a270d0 (patch) | |
tree | 4c8d54143bcab1e79440ee837b57ba0395549253 /etc/inc/upgrade_config.inc | |
parent | af539291187b159b4c7ddab791536f59193c21ea (diff) | |
parent | 29dc1e6e81998c881c15c08c526d7de65ff8e76b (diff) | |
download | pfsense-d43ad788f295023f6e7d923fa07f0928a9a270d0.zip pfsense-d43ad788f295023f6e7d923fa07f0928a9a270d0.tar.gz |
Merge branch 'master' of git://rcs.pfsense.org/pfsense/nigel-ca-chain into review/master
Conflicts:
etc/inc/certs.inc
etc/inc/upgrade_config.inc
Diffstat (limited to 'etc/inc/upgrade_config.inc')
-rw-r--r-- | etc/inc/upgrade_config.inc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 7d05575..161133b 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -1740,7 +1740,40 @@ function upgrade_058_to_059() { function upgrade_059_to_060() { global $config; +<<<<<<< HEAD:etc/inc/upgrade_config.inc /* Insert upgrade code here */ } +======= + + if (is_array($config['system']['ca'])) + { + /* Locate issuer for all CAs */ + foreach ($config['system']['ca'] as & $ca) + { + $subject = cert_get_subject($ca['crt']); + $issuer = cert_get_issuer($ca['crt']); + if($issuer <> $subject) { + $issuer_crt =& lookup_ca_by_subject($issuer); + if($issuer_crt) + $ca['caref'] = $issuer_crt['refid']; + } + } + + /* Locate issuer for all certificates */ + if (is_array($config['system']['cert'])) + foreach ($config['system']['cert'] as & $cert) + { + $subject = cert_get_subject($cert['crt']); + $issuer = cert_get_issuer($cert['crt']); + if($issuer <> $subject) { + $issuer_crt =& lookup_ca_by_subject($issuer); + if($issuer_crt) + $cert['caref'] = $issuer_crt['refid']; + } + } + + } +} + ?> |