1 |
diff -Nur --no-dereference e-smith-base-5.8.1.old/root/sbin/e-smith/generate-subjectaltnames e-smith-base-5.8.1/root/sbin/e-smith/generate-subjectaltnames |
2 |
--- e-smith-base-5.8.1.old/root/sbin/e-smith/generate-subjectaltnames 2021-06-06 16:30:37.000000000 -0400 |
3 |
+++ e-smith-base-5.8.1/root/sbin/e-smith/generate-subjectaltnames 2021-06-06 16:46:09.625000000 -0400 |
4 |
@@ -20,6 +20,11 @@ |
5 |
|
6 |
my $configuration = esmith::ConfigDB->open_ro('configuration') |
7 |
or die "Couldn't open configuration DB\n"; |
8 |
+my $domains = esmith::ConfigDB->open_ro('domains') |
9 |
+ or die "Couldn't open domains DB\n"; |
10 |
+ |
11 |
+my $hosts = esmith::ConfigDB->open_ro('hosts') |
12 |
+ or die "Couldn't open domains DB\n"; |
13 |
|
14 |
my %results_dict = (); |
15 |
|
16 |
@@ -62,10 +67,34 @@ |
17 |
} |
18 |
|
19 |
#---------------------------------------------------------------------- |
20 |
+# Add all domains defined |
21 |
+#---------------------------------------------------------------------- |
22 |
+my $modSSL = $configuration->get('modSSL'); |
23 |
+my $AddDomains = $modSSL->prop('AddDomains') || "enabled"; |
24 |
+if ( $AddDomains eq "enabled" ) |
25 |
+{ |
26 |
+ foreach my $domain ( $domains->get_all_by_prop(type => 'domain') ) |
27 |
+ { |
28 |
+ $results_dict{$domain->key} = 1; |
29 |
+ } |
30 |
+} |
31 |
+ |
32 |
+#---------------------------------------------------------------------- |
33 |
+# Add all domains defined |
34 |
+#---------------------------------------------------------------------- |
35 |
+my $AddHosts = $modSSL->prop('AddHosts') || "enabled"; |
36 |
+if ( $AddHosts eq "enabled" ) |
37 |
+{ |
38 |
+ foreach my $host ( $hosts->get_all_by_prop(type => 'host') ) |
39 |
+ { |
40 |
+ $results_dict{$host->key} = 1; |
41 |
+ } |
42 |
+} |
43 |
+ |
44 |
+#---------------------------------------------------------------------- |
45 |
# Add any alternate names specified in the modSSL config DB. |
46 |
#---------------------------------------------------------------------- |
47 |
|
48 |
-$modSSL = $configuration->get('modSSL'); |
49 |
if ($modSSL) |
50 |
{ |
51 |
$AlternateNames = $modSSL->prop('AlternateNames'); |