-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for multiple ca's in caFile
- Loading branch information
Showing
6 changed files
with
108 additions
and
20 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
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,48 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIEEjCCAvqgAwIBAgIJANSQQyljKhqiMA0GCSqGSIb3DQEBBQUAMGMxCzAJBgNV | ||
BAYTAlVLMQ8wDQYDVQQIEwZMb25kb24xDzANBgNVBAcTBkxvbmRvbjEeMBwGA1UE | ||
ChMVbm9kZS1zYXVjZS1jb25uZWN0LWNhMRIwEAYDVQQDEwlsb2NhbGhvc3QwHhcN | ||
MTcxMDIyMTMyMTUxWhcNNDIxMDIyMTMyMTUxWjBjMQswCQYDVQQGEwJVSzEPMA0G | ||
A1UECBMGTG9uZG9uMQ8wDQYDVQQHEwZMb25kb24xHjAcBgNVBAoTFW5vZGUtc2F1 | ||
Y2UtY29ubmVjdC1jYTESMBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0B | ||
AQEFAAOCAQ8AMIIBCgKCAQEA0nQey37BhKeyg2zhr5i9Wd0/O7FYcQROYjZgjTsx | ||
koPm8WzREqn1YPnVPgS2Qsqg4IqWhEKhGCQeAN7bb9zE5LsWL2ynTfTUuWr1GEyl | ||
3GHKOQsE7nafYVYPqjwZL9RbF0rl0/SJM+ACiXJHK/6nlp5qM17q9r9ukvMfcS5H | ||
ZHc6hIleDhd4ddqinZTZLtVNaT/2fCUaCJooUy2v4UW51aWZK8K+04YiD1o8BBeG | ||
lOjLTew70M9HtzM3tkEr7tTGq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hbamuY2RzQJcCHCBWDafKKQYGE0ZqHJkR+ovnp07JpB | ||
H3qoRgYYAdwdfZ1ydqJvymG6kMZ1JCsdAiJXeRzzI8Q0U/QHAwrqoeFO+HTSHOsC | ||
ulDfH78oUNqN3xOAOEZerX68Kc9unDyuVGDunldUPc62+OH+OuM= | ||
-----END CERTIFICATE----- |
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,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
# remove old sauce connect | ||
rm ./lib/sc | ||
|
||
# start proxy in bg | ||
node ./acceptance/support/self-signed-https-server.js & | ||
|
||
SSL_PROXY_PID=$! | ||
|
||
echo "SSL reverse proxy started on 8081 PID: ${SSL_PROXY_PID}" | ||
|
||
export SAUCECONNECT_CDNURL=https://localhost:8081/downloads | ||
npm config set cafile=./acceptance/support/keys/multi-ca.crt | ||
|
||
# install sc | ||
npm install | ||
|
||
unset SAUCECONNECT_CDNURL | ||
npm config rm cafile | ||
|
||
# test | ||
./acceptance/tests/test.sh | ||
|
||
# ps -p Checks if the process is still running. If it is it returns 0, | ||
# otherwise it returns 1 | ||
ps -p $SSL_PROXY_PID > /dev/null | ||
SSL_PROXY_TASK_RUNNING=$? | ||
|
||
# check if the process is still running by examining the exit code of ps -p | ||
CA_FILE_TEST_RESULT=1 | ||
|
||
if [ $SSL_PROXY_TASK_RUNNING -eq 1 ]; then | ||
# not running, so has been hit. | ||
echo "SSL proxy finished, test passed" | ||
CA_FILE_TEST_RESULT=0 | ||
else | ||
echo "SSL proxy not finished, test failed" | ||
kill $SSL_PROXY_PID | ||
fi | ||
|
||
exit $CA_FILE_TEST_RESULT |
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