forked from pool/easy-rsa
Accepting request 497926 from home:bruno_friedmann:branches:network:vpn
- Include upstream patches + f174800.patch Generate random serial number for all certificates + 29d4dee.patch Fixes #91 basename: invalid option -- 's' + b93d0a1.patch Spelling fixes and sentence structure improvements + fb4d8d8.patch Fix comment indicating the end of the function verify_file() + b75faa4.patch Convert README and COPYING into markdown files - Rename openSUSE specific patch easyrsa.packaging.patch to easy-rsa-packaging.patch - spec-cleaner -m (Add also SUSE copyrights) OBS-URL: https://build.opensuse.org/request/show/497926 OBS-URL: https://build.opensuse.org/package/show/network:vpn/easy-rsa?expand=0&rev=3
This commit is contained in:
31
f174800.patch
Normal file
31
f174800.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From d309c6aaa23f661ccd2563df6a184e1351293b61 Mon Sep 17 00:00:00 2001
|
||||
From: ValdikSS <iam@valdikss.org.ru>
|
||||
Date: Mon, 11 Jan 2016 01:53:32 +0300
|
||||
Subject: [PATCH] Generate random serial number for all certificates
|
||||
|
||||
---
|
||||
easyrsa3/easyrsa | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa
|
||||
index 6fec288..bcb3aeb 100755
|
||||
--- a/easyrsa3/easyrsa
|
||||
+++ b/easyrsa3/easyrsa
|
||||
@@ -652,6 +652,17 @@ Certificate created at: $crt_out
|
||||
build_full() {
|
||||
verify_ca_init
|
||||
|
||||
+ local i= serial= check_serial=
|
||||
+ for i in 1 2 3 4 5; do
|
||||
+ "$EASYRSA_OPENSSL" rand -hex 16 -out "$EASYRSA_PKI/serial"
|
||||
+ serial="$(cat "$EASYRSA_PKI/serial")"
|
||||
+ check_serial="$("$EASYRSA_OPENSSL" ca -config "$EASYRSA_SSL_CONF" -status "$serial" 2>&1)"
|
||||
+ case "$check_serial" in
|
||||
+ *"not present in db"*) break ;;
|
||||
+ *) continue ;;
|
||||
+ esac
|
||||
+ done
|
||||
+
|
||||
# pull filename base:
|
||||
[ -n "$2" ] || die "\
|
||||
Error: didn't find a file base name as the first argument.
|
Reference in New Issue
Block a user