/[smecontribs]/rpms/phpki/contribs7/phpki-0.82-sme_openvpn_bridge_compat.patch
ViewVC logotype

Annotation of /rpms/phpki/contribs7/phpki-0.82-sme_openvpn_bridge_compat.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Mar 2 23:38:37 2009 UTC (15 years, 8 months ago) by slords
Branch: MAIN
CVS Tags: phpki-0_82-13_el4_sme, phpki-0_82-16_el4_sme, phpki-0_82-10_el4_sme, phpki-0_82-11_el4_sme, phpki-0_82-14_el4_sme, phpki-0_82-15_el4_sme, phpki-0_82-9_el4_sme, phpki-0_82-8_el4_sme, phpki-0_82-7_el4_sme, phpki-0_82-12_el4_sme, HEAD
Initial import of phpki

1 slords 1.1 diff -Nur -x '*.orig' -x '*.rej' phpki/phpki-0.82/include/openssl_functions.php mezzanine_patched_phpki/phpki-0.82/include/openssl_functions.php
2     --- phpki/phpki-0.82/include/openssl_functions.php 2008-12-08 03:44:27.000000000 +0100
3     +++ mezzanine_patched_phpki/phpki-0.82/include/openssl_functions.php 2008-12-08 03:44:07.000000000 +0100
4     @@ -324,15 +324,43 @@
5     if (time() > strtotime("$mm/$dd/$yy"))
6     $db['status'] = "Expired";
7    
8     - $db['serial'] = $a[3];
9     - $db['country'] = $b[1];
10     - $db['province'] = $b[2];
11     - $db['locality'] = $b[3];
12     - $db['organization'] = $b[4];
13     - $db['issuer'] = $b[5];
14     - $db['unit'] = $b[6];
15     - $db['common_name'] = $b[7];
16     - $db['email'] = $b[8];
17     +
18     + // Compatibility with migrated certs from openvpn-bridge
19     + if(count($b) == 7){
20     + $db['serial'] = $a[3];
21     + $db['country'] = $b[1];
22     + $db['province'] = $b[2];
23     + $db['locality'] = '';
24     + $db['organization'] = $b[3];
25     + $db['issuer'] = '';
26     + $db['unit'] = $b[4];
27     + $db['common_name'] = $b[5];
28     + $db['email'] = $b[6];
29     + }
30     + // Compatibility with renewed certs from openvpn-bridge
31     + elseif(count($b) == 8){
32     + $db['serial'] = $a[3];
33     + $db['country'] = $b[1];
34     + $db['province'] = $b[2];
35     + $db['locality'] = $b[3];
36     + $db['organization'] = $b[4];
37     + $db['issuer'] = '';
38     + $db['unit'] = $b[5];
39     + $db['common_name'] = $b[6];
40     + $db['email'] = $b[7];
41     + }
42     + // Else, it's a certificate created with phpki
43     + else{
44     + $db['serial'] = $a[3];
45     + $db['country'] = $b[1];
46     + $db['province'] = $b[2];
47     + $db['locality'] = $b[3];
48     + $db['organization'] = $b[4];
49     + $db['issuer'] = $b[5];
50     + $db['unit'] = $b[6];
51     + $db['common_name'] = $b[7];
52     + $db['email'] = $b[8];
53     + }
54    
55     return $db;
56     }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed