1 |
slords |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-base-4.18.0/root/etc/e-smith/templates/home/e-smith/ssl.crt mezzanine_patched_e-smith-base-4.18.0/root/etc/e-smith/templates/home/e-smith/ssl.crt |
2 |
|
|
--- e-smith-base-4.18.0/root/etc/e-smith/templates/home/e-smith/ssl.crt 2007-01-19 14:33:22.000000000 -0700 |
3 |
|
|
+++ mezzanine_patched_e-smith-base-4.18.0/root/etc/e-smith/templates/home/e-smith/ssl.crt 2007-03-07 11:59:18.000000000 -0700 |
4 |
|
|
@@ -5,12 +5,13 @@ |
5 |
|
|
my $here = getcwd; |
6 |
|
|
|
7 |
|
|
my $FQDN = "$SystemName.$DomainName"; |
8 |
|
|
+ my $commonName = &$cropLeft($modSSL{CommonName} || $FQDN, 64); |
9 |
|
|
my $crt = "/home/e-smith/ssl.crt/$FQDN.crt"; |
10 |
|
|
my $key = "/home/e-smith/ssl.key/$FQDN.key"; |
11 |
|
|
my $defaultCity = $ldap{defaultCity}; |
12 |
|
|
my $defaultCompany = $ldap{defaultCompany}; |
13 |
|
|
my $defaultDepartment = $ldap{defaultDepartment}; |
14 |
|
|
- my $email = "admin\@$FQDN"; |
15 |
|
|
+ my $email = "admin\@$DomainName"; |
16 |
|
|
|
17 |
|
|
if ( -f $crt ) |
18 |
|
|
{ |
19 |
|
|
@@ -24,7 +25,7 @@ |
20 |
|
|
$expected_issuer .= '/L=' . ($defaultCity ? $defaultCity : 'Newbury'); |
21 |
|
|
$expected_issuer .= '/O=' . ($defaultCompany ? $defaultCompany : 'My Company Ltd'); |
22 |
|
|
$expected_issuer .= "/OU=$defaultDepartment" if $defaultDepartment; |
23 |
|
|
- $expected_issuer .= "/CN=$FQDN" . |
24 |
|
|
+ $expected_issuer .= "/CN=$commonName" . |
25 |
|
|
"/emailAddress=$email"; |
26 |
|
|
my $issuer = `openssl x509 -issuer -noout -in $crt`; |
27 |
|
|
chomp $issuer; |
28 |
|
|
@@ -73,7 +74,6 @@ |
29 |
|
|
$defaultCity = &$cropLeft($defaultCity, 128); |
30 |
|
|
$defaultCompany = &$cropLeft($defaultCompany, 64); |
31 |
|
|
$defaultDepartment = &$cropLeft($defaultDepartment, 64); |
32 |
|
|
- $FQDN = &$cropLeft($FQDN, 64); |
33 |
|
|
$email = &$cropLeft($email, 40); |
34 |
|
|
|
35 |
|
|
foreach ( |
36 |
|
|
@@ -82,7 +82,7 @@ |
37 |
|
|
"$defaultCity", |
38 |
|
|
"$defaultCompany", |
39 |
|
|
"$defaultDepartment", |
40 |
|
|
- "$FQDN", |
41 |
|
|
+ "$commonName", |
42 |
|
|
"$email" |
43 |
|
|
) |
44 |
|
|
{ |