Skip to contentSkip to conversation

Properly detect OpenSSL version strings with numbers only

PATCH In review Simon Deziel 3 participants 3 messages May 12, 2012 – Jun 1, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Properly detect OpenSSL version strings with numbers only

whichopensslcnf failed to return the right cnf for:

$ openssl version
OpenSSL 1.0.1 14 Mar 2012
---
 easy-rsa/2.0/whichopensslcnf |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
easy-rsa/2.0/whichopensslcnf +1 -1
index 2226a8e..ccdaf50 100755
@@ -3,11 +3,11 @@
 cnf="$1/openssl.cnf"
 
 if [ "$OPENSSL" ]; then
-       if $OPENSSL version | grep -E "0\.9\.6[[:alnum:]]" > /dev/null; then
+       if $OPENSSL version | grep -E "0\.9\.6[[:alnum:]]?" > /dev/null;

then

                cnf="$1/openssl-0.9.6.cnf"

- elif $OPENSSL version | grep -E "0\.9\.8[[:alnum:]]" >
/dev/null; then
+ elif $OPENSSL version | grep -E "0\.9\.8[[:alnum:]]?" >
/dev/null; then

                cnf="$1/openssl-0.9.8.cnf"

- elif $OPENSSL version | grep -E "1\.0\.([[:digit:]][[:alnum:]])"

Quoted 1 line

/dev/null; then

+ elif $OPENSSL version | grep -E "1\.0\.[[:digit:]][[:alnum:]]?"

Quoted 1 line

/dev/null; then

                 cnf="$1/openssl-1.0.0.cnf"
        else
                cnf="$1/openssl.cnf"
Signature · 1 line
1.7.5.4
#1 lore raw

ACK, the revision letter is indeed optional.

David,
Repository is at github...

Quoted 47 lines · Simon Deziel

whichopensslcnf failed to return the right cnf for:

$ openssl version
OpenSSL 1.0.1 14 Mar 2012

---
 easy-rsa/2.0/whichopensslcnf |    6 +++---

 1 files changed, 3 insertions(+), 3 deletions(-)
easy-rsa/2.0/whichopensslcnf +0 -0
index 2226a8e..ccdaf50 100755
@@ -3,11 +3,11 @@

 cnf="$1/openssl.cnf"

 if [ "$OPENSSL" ]; then
-       if $OPENSSL version | grep -E "0\.9\.6[[:alnum:]]" > /dev/null; then
+       if $OPENSSL version | grep -E "0\.9\.6[[:alnum:]]?" > /dev/null; then
               cnf="$1/openssl-0.9.6.cnf"
-       elif $OPENSSL version | grep -E "0\.9\.8[[:alnum:]]" > /dev/null; then
+       elif $OPENSSL version | grep -E "0\.9\.8[[:alnum:]]?" > /dev/null; then
               cnf="$1/openssl-0.9.8.cnf"
-       elif $OPENSSL version | grep -E "1\.0\.([[:digit:]][[:alnum:]])"

Quoted 1 line

/dev/null; then

+       elif $OPENSSL version | grep -E "1\.0\.[[:digit:]][[:alnum:]]?"

Quoted 1 line

/dev/null; then

                cnf="$1/openssl-1.0.0.cnf"
       else
               cnf="$1/openssl.cnf"
--
1.7.5.4

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#2 lore raw
In reply to Simon Deziel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Simon Deziel

whichopensslcnf failed to return the right cnf for:

$ openssl version OpenSSL 1.0.1 14 Mar 2012

easy-rsa/2.0/whichopensslcnf | 6 +++--- 1 files changed, 3
insertions(+), 3 deletions(-)

Thank you very much for your contribution. Your patch has been applied to the brand new easy-rsa.git repository.

commit a812fed7fbc39d4936c348d4a1a9c0e07e6d65f6

Author: Simon Deziel <[email protected]...>
Date:   Sat May 12 11:54:41 2012 -0400
    Properly detect OpenSSL version strings with numbers only

    Signed-off-by: Simon Deziel <[email protected]...>
    Acked-by: Alon Bar-Lev <[email protected]...>
    Message-Id: [email protected]...
    URL: http://article.gmane.org/gmane.network.openvpn.devel/6534
    Signed-off-by: David Sommerseth <[email protected]...>

kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/IwIkACgkQDC186MBRfrqHQQCeP5K4OkTAuGaZb6L9z5IMVVAT p3MAoKT2EHHsidSbY2sAMH8ZfeN/Qp+u
=8HSr
-----END PGP SIGNATURE-----