Skip to content

Commit

Permalink
Save openssl config file to tmp directory
Browse files Browse the repository at this point in the history
Signed-off-by: Iyán Méndez Veiga <[email protected]>
  • Loading branch information
iyanmv committed Apr 26, 2024
1 parent 8a427c2 commit 546236b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ test/oqs_test_groups
# test artifacts
tmp
interop.log
scripts/openssl-ca-no-oqsprovider.cnf
# pycache
oqs-template/__pycache__
scripts/__pycache__
Expand Down
4 changes: 2 additions & 2 deletions scripts/oqsprovider-pkcs12gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ if [ $? -ne 0 ] || [ ! -f tmp/$1_srv_1.p12 ]; then
fi

# Generate config file with oqsprovider disabled
sed -e 's/^oqsprovider/# oqsprovider/' "$(pwd)/scripts/openssl-ca.cnf" > "$(pwd)/scripts/openssl-ca-no-oqsprovider.cnf"
sed -e 's/^oqsprovider/# oqsprovider/' "$(pwd)/scripts/openssl-ca.cnf" > tmp/openssl-ca-no-oqsprovider.cnf

# This print an error but OpenSSL returns 0 and .p12 file is generated correctly
OPENSSL_CONF="$(pwd)/scripts/openssl-ca-no-oqsprovider.cnf" $OPENSSL_APP pkcs12 -provider default -provider oqsprovider -export -in tmp/$1_srv.crt -inkey tmp/$1_srv.key -passout pass: -out tmp/$1_srv_2.p12
OPENSSL_CONF=tmp/openssl-ca-no-oqsprovider.cnf $OPENSSL_APP pkcs12 -provider default -provider oqsprovider -export -in tmp/$1_srv.crt -inkey tmp/$1_srv.key -passout pass: -out tmp/$1_srv_2.p12

if [ $? -ne 0 ] || [ ! -f tmp/$1_srv_2.p12 ]; then
echo "PKCS#12 generation with oqsprovider disabled failed."
Expand Down

0 comments on commit 546236b

Please sign in to comment.