3 # Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
4 # Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
6 # Licensed under the Apache License 2.0 (the "License"). You may not use
7 # this file except in compliance with the License. You can obtain a copy
8 # in the file LICENSE in the source distribution or at
9 # https://www.openssl.org/source/license.html
12 # OpenSSL external testing using the Python Cryptography module
16 O_EXE=`pwd`/$BLDTOP/apps
17 O_BINC=`pwd`/$BLDTOP/include
18 O_SINC=`pwd`/$SRCTOP/include
21 export PATH=$O_EXE:$PATH
22 export LD_LIBRARY_PATH=$O_LIB:$LD_LIBRARY_PATH
24 # Check/Set openssl version
25 OPENSSL_VERSION=`openssl version | cut -f 2 -d ' '`
27 echo "------------------------------------------------------------------"
28 echo "Testing OpenSSL using Python Cryptography:"
30 echo " SRCTOP: $SRCTOP"
31 echo " BLDTOP: $BLDTOP"
32 echo " OpenSSL version: $OPENSSL_VERSION"
33 echo "------------------------------------------------------------------"
37 # Create a python virtual env and activate
39 virtualenv venv-pycrypto
40 . ./venv-pycrypto/bin/activate
46 echo "------------------------------------------------------------------"
47 echo "Building cryptography"
48 echo "------------------------------------------------------------------"
49 python ./setup.py clean
51 CFLAGS="-I$O_BINC -I$O_SINC -L$O_LIB" python ./setup.py build
53 echo "------------------------------------------------------------------"
55 echo "------------------------------------------------------------------"
57 CFLAGS="-I$O_BINC -I$O_SINC -L$O_LIB" python ./setup.py test