]> git.pld-linux.org Git - packages/easy-rsa.git/blob - easy-rsa2.patch
up to 2.2.2, md default now sha256 instead of md5; it's noarch really
[packages/easy-rsa.git] / easy-rsa2.patch
1 --- openvpn-2.2.0-orig/easy-rsa/2.0/build-ca    2011-04-06 18:05:52.000000000 +0200
2 +++ openvpn-2.2.0/easy-rsa/2.0/build-ca 2011-04-27 22:34:59.357652908 +0200
3 @@ -4,5 +4,5 @@
4  # Build a root certificate
5  #
6  
7 -export EASY_RSA="${EASY_RSA:-.}"
8 -"$EASY_RSA/pkitool" --interact --initca $*
9 +export EASY_RSA="${EASY_RSA:-/etc/easy-rsa}"
10 +/usr/sbin/pkitool --interact --initca $*
11 --- openvpn-2.2.0-orig/easy-rsa/2.0/build-dh    2011-04-06 18:05:52.000000000 +0200
12 +++ openvpn-2.2.0/easy-rsa/2.0/build-dh 2011-04-27 22:36:11.867656490 +0200
13 @@ -3,8 +3,12 @@
14  # Build Diffie-Hellman parameters for the server side
15  # of an SSL/TLS connection.
16  
17 +if [ -z "$EASY_RSA" ]; then
18 +       . /etc/easy-rsa/vars
19 +fi
20 +
21  if [ -d $KEY_DIR ] && [ $KEY_SIZE ]; then
22 -    $OPENSSL dhparam -out ${KEY_DIR}/dh${KEY_SIZE}.pem ${KEY_SIZE}
23 +    openssl dhparam -out ${KEY_DIR}/dh${KEY_SIZE}.pem ${KEY_SIZE}
24  else
25      echo 'Please source the vars script first (i.e. "source ./vars")'
26      echo 'Make sure you have edited it to reflect your configuration.'
27 --- openvpn-2.2.0-orig/easy-rsa/2.0/build-inter 2011-04-06 18:05:52.000000000 +0200
28 +++ openvpn-2.2.0/easy-rsa/2.0/build-inter      2011-04-27 22:37:59.789289422 +0200
29 @@ -3,5 +3,5 @@
30  # Make an intermediate CA certificate/private key pair using a locally generated
31  # root certificate.
32  
33 -export EASY_RSA="${EASY_RSA:-.}"
34 -"$EASY_RSA/pkitool" --interact --inter $*
35 +export EASY_RSA="${EASY_RSA:-/etc/easy-rsa}"
36 +/usr/sbin/pkitool --interact --inter $*
37 --- openvpn-2.2.0-orig/easy-rsa/2.0/build-key   2011-04-06 18:05:52.000000000 +0200
38 +++ openvpn-2.2.0/easy-rsa/2.0/build-key        2011-04-27 22:38:35.330924876 +0200
39 @@ -3,5 +3,5 @@
40  # Make a certificate/private key pair using a locally generated
41  # root certificate.
42  
43 -export EASY_RSA="${EASY_RSA:-.}"
44 -"$EASY_RSA/pkitool" --interact $*
45 +export EASY_RSA="${EASY_RSA:-/etc/easy-rsa}"
46 +/usr/sbin/pkitool --interact $*
47 --- openvpn-2.2.0-orig/easy-rsa/2.0/build-key-pass      2011-04-06 18:05:52.000000000 +0200
48 +++ openvpn-2.2.0/easy-rsa/2.0/build-key-pass   2011-04-27 22:39:23.919827311 +0200
49 @@ -3,5 +3,5 @@
50  # Similar to build-key, but protect the private key
51  # with a password.
52  
53 -export EASY_RSA="${EASY_RSA:-.}"
54 -"$EASY_RSA/pkitool" --interact --pass $*
55 +export EASY_RSA="${EASY_RSA:-/etc/easy-rsa}"
56 +/usr/sbin/pkitool --interact --pass $*
57 --- openvpn-2.2.0-orig/easy-rsa/2.0/build-key-pkcs12    2011-04-06 18:05:52.000000000 +0200
58 +++ openvpn-2.2.0/easy-rsa/2.0/build-key-pkcs12 2011-04-27 22:40:10.288627524 +0200
59 @@ -4,5 +4,5 @@
60  # root certificate and convert it to a PKCS #12 file including the
61  # the CA certificate as well.
62  
63 -export EASY_RSA="${EASY_RSA:-.}"
64 -"$EASY_RSA/pkitool" --interact --pkcs12 $*
65 +export EASY_RSA="${EASY_RSA:-/etc/easy-rsa}"
66 +/usr/sbin/pkitool --interact --pkcs12 $*
67 --- openvpn-2.2.0-orig/easy-rsa/2.0/build-key-server    2011-04-06 18:05:52.000000000 +0200
68 +++ openvpn-2.2.0/easy-rsa/2.0/build-key-server 2011-04-27 22:41:24.715385295 +0200
69 @@ -6,5 +6,5 @@
70  # Explicitly set nsCertType to server using the "server"
71  # extension in the openssl.cnf file.
72  
73 -export EASY_RSA="${EASY_RSA:-.}"
74 -"$EASY_RSA/pkitool" --interact --server $*
75 +export EASY_RSA="${EASY_RSA:-/etc/easy-rsa}"
76 +/usr/sbin/pkitool --interact --server $*
77 --- openvpn-2.2.0-orig/easy-rsa/2.0/build-req   2011-04-06 18:05:52.000000000 +0200
78 +++ openvpn-2.2.0/easy-rsa/2.0/build-req        2011-04-27 22:41:59.636992013 +0200
79 @@ -3,5 +3,5 @@
80  # Build a certificate signing request and private key.  Use this
81  # when your root certificate and key is not available locally.
82  
83 -export EASY_RSA="${EASY_RSA:-.}"
84 -"$EASY_RSA/pkitool" --interact --csr $*
85 +export EASY_RSA="${EASY_RSA:-/etc/easy-rsa}"
86 +/usr/sbin/pkitool --interact --csr $*
87 --- openvpn-2.2.0-orig/easy-rsa/2.0/build-req-pass      2011-04-06 18:05:52.000000000 +0200
88 +++ openvpn-2.2.0/easy-rsa/2.0/build-req-pass   2011-04-27 22:43:36.938135257 +0200
89 @@ -3,5 +3,5 @@
90  # Like build-req, but protect your private key
91  # with a password.
92  
93 -export EASY_RSA="${EASY_RSA:-.}"
94 -"$EASY_RSA/pkitool" --interact --csr --pass $*
95 +export EASY_RSA="${EASY_RSA:-/etc/easy-rsa}"
96 +/usr/sbin/pkitool --interact --csr --pass $*
97 --- openvpn-2.2.0-orig/easy-rsa/2.0/clean-all   2011-04-06 18:05:52.000000000 +0200
98 +++ openvpn-2.2.0/easy-rsa/2.0/clean-all        2011-04-27 22:44:36.544210785 +0200
99 @@ -4,6 +4,10 @@
100  # Note that this script does a
101  # rm -rf on $KEY_DIR so be careful!
102  
103 +if [ -z "$EASY_RSA" ]; then
104 +       . /etc/easy-rsa/vars
105 +fi
106 +
107  if [ "$KEY_DIR" ]; then
108      rm -rf "$KEY_DIR"
109      mkdir "$KEY_DIR" && \
110 --- openvpn-2.2.0-orig/easy-rsa/2.0/inherit-inter       2011-04-06 18:05:52.000000000 +0200
111 +++ openvpn-2.2.0/easy-rsa/2.0/inherit-inter    2011-04-27 22:45:20.809580498 +0200
112 @@ -9,6 +9,10 @@
113  # To build an intermediate CA, follow the same steps for a regular PKI but
114  # replace ./build-key or ./pkitool --initca with this script.
115  
116 +if [ -z "$EASY_RSA" ]; then
117 +       . /etc/easy-rsa/vars
118 +fi
119 +
120  # The EXPORT_CA file will contain the CA certificate chain and should be
121  # referenced by the OpenVPN "ca" directive in config files.  The ca.crt file
122  # will only contain the local intermediate CA -- it's needed by the easy-rsa
123 --- easy-rsa-2.2.2/easy-rsa/2.0/list-crl~       2013-11-09 05:38:30.000000000 +0200
124 +++ easy-rsa-2.2.2/easy-rsa/2.0/list-crl        2015-06-02 21:09:57.640431912 +0300
125 @@ -2,11 +2,15 @@
126  
127  # list revoked certificates
128  
129 +if [ -z "$EASY_RSA" ]; then
130 +       . /etc/easy-rsa/vars
131 +fi
132 +
133  CRL="${1:-crl.pem}"
134  
135  if [ "$KEY_DIR" ]; then
136      cd "$KEY_DIR" && \
137 -        $OPENSSL crl -text -noout -in "$CRL"
138 +        openssl crl -text -noout -in "$CRL"
139  else
140      echo 'Please source the vars script first (i.e. "source ./vars")'
141      echo 'Make sure you have edited it to reflect your configuration.'
142 --- easy-rsa-2.2.2/easy-rsa/2.0/pkitool~        2015-06-02 21:08:57.000000000 +0300
143 +++ easy-rsa-2.2.2/easy-rsa/2.0/pkitool 2015-06-02 21:11:42.382534794 +0300
144 @@ -42,6 +42,10 @@
145      exit 1
146  }
147  
148 +if [ -z "$EASY_RSA" ]; then
149 +       . /etc/easy-rsa/vars
150 +fi
151 +
152  need_vars()
153  {
154      echo '  Please edit the vars script to reflect your configuration,'
155 --- openvpn-2.2.0-orig/easy-rsa/2.0/revoke-full 2011-04-06 18:05:52.000000000 +0200
156 +++ openvpn-2.2.0/easy-rsa/2.0/revoke-full      2011-04-27 22:56:07.449351374 +0200
157 @@ -3,6 +3,10 @@
158  # revoke a certificate, regenerate CRL,
159  # and verify revocation
160  
161 +if [ -z "$EASY_RSA" ]; then
162 +       . /etc/easy-rsa/vars
163 +fi
164 +
165  CRL="crl.pem"
166  RT="revoke-test.pem"
167  
168 @@ -21,11 +25,11 @@
169      export KEY_NAME=""
170  
171      # revoke key and generate a new CRL
172 -    $OPENSSL ca -revoke "$1.crt" -config "$KEY_CONFIG"
173 +    openssl ca -revoke "$1" -config "$KEY_CONFIG"
174  
175      # generate a new CRL -- try to be compatible with
176      # intermediate PKIs
177 -    $OPENSSL ca -gencrl -out "$CRL" -config "$KEY_CONFIG"
178 +    openssl ca -gencrl -out "$CRL" -config "$KEY_CONFIG"
179      if [ -e export-ca.crt ]; then
180         cat export-ca.crt "$CRL" >"$RT"
181      else
182 @@ -33,7 +37,7 @@
183      fi
184      
185      # verify the revocation
186 -    $OPENSSL verify -CAfile "$RT" -crl_check "$1.crt"
187 +    openssl verify -CAfile "$RT" -crl_check "$1"
188  else
189      echo 'Please source the vars script first (i.e. "source ./vars")'
190      echo 'Make sure you have edited it to reflect your configuration.'
191 --- openvpn-2.2.0-orig/easy-rsa/2.0/sign-req    2011-04-06 18:05:52.000000000 +0200
192 +++ openvpn-2.2.0/easy-rsa/2.0/sign-req 2011-04-27 22:56:46.124465700 +0200
193 @@ -3,5 +3,5 @@
194  # Sign a certificate signing request (a .csr file)
195  # with a local root certificate and key.
196  
197 -export EASY_RSA="${EASY_RSA:-.}"
198 -"$EASY_RSA/pkitool" --interact --sign $*
199 +export EASY_RSA="${EASY_RSA:-/etc/easy-rsa}"
200 +/usr/sbin/pkitool --interact --sign $*
201 --- openvpn-2.2.0-orig/easy-rsa/2.0/vars        2010-10-21 11:18:17.000000000 +0200
202 +++ openvpn-2.2.0/easy-rsa/2.0/vars     2011-04-27 22:58:41.789791888 +0200
203 @@ -12,21 +12,12 @@
204  # This variable should point to
205  # the top level of the easy-rsa
206  # tree.
207 -export EASY_RSA="`pwd`"
208 -
209 -#
210 -# This variable should point to
211 -# the requested executables
212 -#
213 -export OPENSSL="openssl"
214 -export PKCS11TOOL="pkcs11-tool"
215 -export GREP="grep"
216 -
217 +export EASY_RSA="/etc/easy-rsa"
218  
219  # This variable should point to
220  # the openssl.cnf file included
221  # with easy-rsa.
222 -export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA`
223 +export KEY_CONFIG="$EASY_RSA/openssl.cnf"
224  
225  # Edit this variable to point to
226  # your soon-to-be-created key
227 @@ -38,9 +29,6 @@
228  # it correctly!
229  export KEY_DIR="$EASY_RSA/keys"
230  
231 -# Issue rm -rf warning
232 -echo NOTE: If you run ./clean-all, I will be doing a rm -rf on $KEY_DIR
233 -
234  # PKCS11 fixes
235  export PKCS11_MODULE_PATH="dummy"
236  export PKCS11_PIN="dummy"
This page took 0.078269 seconds and 3 git commands to generate.