mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-31 13:55:25 +01:00 
			
		
		
		
	minor code improvements
This commit is contained in:
		| @@ -1,12 +1,11 @@ | ||||
| #!/bin/sh | ||||
| # | ||||
| # License GPLv2, see ../LICENSE | ||||
| # This script compiles the "bad openssl" version, 1.0.2 supporting legacy | ||||
| # cryptography for Linux, FreeBSD and Darwin. | ||||
| # | ||||
| # instructions @ https://github.com/drwetter/testssl.sh/tree/2.9dev/bin | ||||
| # License GPLv2, see ../LICENSE | ||||
|  | ||||
|  | ||||
| OPENSSLDIR="/etc/ssl" | ||||
|  | ||||
| STDOPTIONS="--prefix=/usr/ -DOPENSSL_USE_BUILD_DATE enable-zlib \ | ||||
| enable-ssl2 enable-ssl3 enable-ssl-trace enable-rc5 enable-rc2 \ | ||||
| enable-gost enable-cms enable-md2 enable-mdc2 enable-ec enable-ec2m enable-ecdh enable-ecdsa \ | ||||
| @@ -105,20 +104,21 @@ sleep 3 | ||||
|  | ||||
| case $(uname) in | ||||
|      Linux|FreeBSD) | ||||
| 		openssldir_option='--openssldir=/etc/ssl' | ||||
| 		case $(uname -m) in | ||||
|          		i686|armv7l) clean | ||||
| 				if [ "$1" = krb ]; then | ||||
| 					./config --openssldir=$OPENSSLDIR $STDOPTIONS no-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT | ||||
| 					./config $openssldir_option $STDOPTIONS no-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT | ||||
| 				else | ||||
| 					./config --openssldir=$OPENSSLDIR $STDOPTIONS no-ec_nistp_64_gcc_128 -static | ||||
| 					./config $openssldir_option $STDOPTIONS no-ec_nistp_64_gcc_128 -static | ||||
| 				fi | ||||
| 				[ $? -ne 0 ] && error "configuring" | ||||
| 				;; | ||||
| 			x86_64|amd64) clean | ||||
|                	if [ "$1" = krb ]; then | ||||
| 					./config --openssldir=$OPENSSLDIR $STDOPTIONS enable-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT | ||||
| 					./config $openssldir_option $STDOPTIONS enable-ec_nistp_64_gcc_128 --with-krb5-flavor=MIT | ||||
| 				else | ||||
| 					./config --openssldir=$OPENSSLDIR $STDOPTIONS enable-ec_nistp_64_gcc_128 -static | ||||
| 					./config $openssldir_option $STDOPTIONS enable-ec_nistp_64_gcc_128 -static | ||||
| 				fi | ||||
| 				[ $? -ne 0 ] && error "configuring" | ||||
| 				;; | ||||
| @@ -128,14 +128,15 @@ case $(uname) in | ||||
|          esac | ||||
|          ;; | ||||
|      Darwin) | ||||
| 		openssldir_option='--openssldir=/private/etc/ssl/' | ||||
| 		case $(uname -m) in | ||||
| 			# No Keberos (yet?) for Darwin | ||||
| 			# No Kerberos (yet?) for Darwin. Static doesn't work for Darwin (#1204) | ||||
| 			x86_64) clean || echo "nothing to clean" | ||||
| 				./Configure --openssldir=/private/etc/ssl/ $STDOPTIONS enable-ec_nistp_64_gcc_128 darwin64-x86_64-cc | ||||
| 				./config $openssldir_option  $STDOPTIONS enable-ec_nistp_64_gcc_128 darwin64-x86_64-cc | ||||
| 				[ $? -ne 0 ] && error "configuring" | ||||
|           		;; | ||||
| 			i386) clean || echo "nothing to clean" | ||||
| 				./config --openssldir=/private/etc/ssl $STDOPTIONS no-ec_nistp_64_gcc_128 darwin64-x86_64-cc | ||||
| 				./config  $openssldir_option $STDOPTIONS no-ec_nistp_64_gcc_128 darwin64-x86_64-cc | ||||
| 				[ $? -ne 0 ] && error "configuring" | ||||
| 				;; | ||||
| 		esac | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dirk
					Dirk