-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
76 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
Makefile | ||
Makefile.in | ||
aclocal.m4 | ||
aminclude_static.am | ||
autom4te.cache/ | ||
compile | ||
config.guess | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
set -eufx | ||
|
||
export LANG=C | ||
export OPENSSL_ENGINES=${PWD}/.libs | ||
export LD_LIBRARY_PATH=$OPENSSL_ENGINES:${LD_LIBRARY_PATH-} | ||
export PATH=${PWD}:${PATH} | ||
#The following is for DESTDIR-installations of openssl | ||
export OPENSSL_CONF=$(find $(dirname $(which openssl))/../../ -name openssl.cnf | head -n 1) | ||
|
||
if openssl version | grep "OpenSSL 1.0.2" >/dev/null; then | ||
echo "OpenSSL 1.0.2 does not load the certificate; private key mismatch ???" | ||
exit 77 | ||
fi | ||
|
||
DIR=$(mktemp -d) | ||
|
||
echo -n "WORKING !!!">${DIR}/index.html | ||
|
||
function cleanup() | ||
{ | ||
kill -term $SERVER | ||
} | ||
|
||
tpm2tss-genkey -a ecdsa ${DIR}/mykey | ||
|
||
echo -e "\n\n\n\n\n\n\n" | openssl req -new -x509 -engine tpm2tss -key ${DIR}/mykey -keyform engine -out ${DIR}/mykey.crt | ||
|
||
openssl s_server -www -cert ${DIR}/mykey.crt -key ${DIR}/mykey -keyform engine -engine tpm2tss -accept 127.0.0.1:8443 & | ||
SERVER=$! | ||
trap "cleanup" EXIT | ||
|
||
sleep 1 | ||
|
||
echo "GET index.html" | openssl s_client -connect localhost:8443 |