summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2017-06-30 15:01:19 -0400
committerReinhard Tartler <siretart@tauware.de>2017-06-30 15:01:19 -0400
commitab148d97773d2ae623b277fe920466377b7f1698 (patch)
treebfb2991e7ecb03e4567a7710c877ba5fd46d782c
parent99a48ff652f89f2b1c3e50b2b6863a4ccaa34e5c (diff)
Fixup bbstored for newer openssl
It appears that modern openssl versions slightly changed the formatting for printing the common name of a certificate. I've also dropped the check against filename because I cound't get the filename to match against my local files - the check didn't appear too useful to me. Gbp-Pq: Name 06-fixup-bbstored-certs.diff
-rwxr-xr-xbin/bbstored/bbstored-certs.in8
1 files changed, 1 insertions, 7 deletions
diff --git a/bin/bbstored/bbstored-certs.in b/bin/bbstored/bbstored-certs.in
index 85560748..0f6b9b27 100755
--- a/bin/bbstored/bbstored-certs.in
+++ b/bin/bbstored/bbstored-certs.in
@@ -171,12 +171,6 @@ sub cmd_sign
my $acc = $1;
- # check against filename
- if(!($csr =~ m/(\A|\/)([A-Fa-f0-9]+)-/) || $2 ne $acc)
- {
- die "Certificate request filename does not match name in certificate ($common_name)"
- }
-
print <<__E;
This certificate is for backup account
@@ -288,7 +282,7 @@ sub get_csr_common_name
my $subject;
while(<CSRTEXT>)
{
- $subject = $1 if m/Subject:.+?CN=([-\.\w]+)/
+ $subject = $1 if m/Subject:.+?CN\s?=\s?([-\.\w]+)/
}
close CSRTEXT;