Skip to content

Commit

Permalink
Merge pull request #3 from vibe-d/add_testcase
Browse files Browse the repository at this point in the history
Add TLS test case from vibe.d
  • Loading branch information
l-kramer authored Feb 17, 2024
2 parents f00730c + 61fca96 commit 800d8e5
Show file tree
Hide file tree
Showing 7 changed files with 461 additions and 0 deletions.
8 changes: 8 additions & 0 deletions run-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ dub test $DUB_FLAGS

if [ "$OS" == "macOS-latest" ]; then
dub test :tls -c openssl-1.1 $DUB_FLAGS
DUB_FLAGS="$DUB_FLAGS --override-config vibe-stream:tls/openssl-1.1"
else
dub test :tls $DUB_FLAGS
fi

if [ ${RUN_TEST=1} -eq 1 ]; then
for ex in `cd tests && ls -1 *.d`; do
echo "[INFO] Running test $ex"
(cd tests && dub --temp-build --single $ex $DUB_FLAGS)
done
fi
21 changes: 21 additions & 0 deletions tests/ca.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDhzCCAm+gAwIBAgIJAPPsz4Vg1ss1MA0GCSqGSIb3DQEBCwUAMFkxCzAJBgNV
BAYTAkRFMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
aWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMMCVNhbXBsZSBDQTAgFw0xNTExMTEwNjM1
NDFaGA8yMTE1MTAxODA2MzU0MVowWTELMAkGA1UEBhMCREUxEzARBgNVBAgMClNv
bWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDESMBAG
A1UEAwwJU2FtcGxlIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
qb+I9X26YydJNXmc7q9woXSI5b/5vitB6BHxUIkXkv0qSKpgV5IGQKXKgJK3FLwf
vqIemiCbJDiiLamnoXectG/FQxxGXolwmMjGBloHSeCo8yZcQq/3WXL2urH2R8B3
q7Du2TT7pqNFVAvkFVM8Z/rE1kAGBGiF+tTf2Tm0xq3fXk3DOSfTWV9OqHoLNrS7
Cx2E260L2j1SGk4mCYsDjSWtMm5lfVWZ+FjnAMZw22goMgbPEuMQGhzla0yxux4/
kKdgyGKFhXAmPsHkDIOtM+HBV34qnPRGps/ICfqAUx+RyUIK5bWjIaUENhFq0uis
dQsX9VDQB489kQJcB/Pt4wIDAQABo1AwTjAdBgNVHQ4EFgQUzQ3L47XiUI3247OT
T1WLDFYr/CgwHwYDVR0jBBgwFoAUzQ3L47XiUI3247OTT1WLDFYr/CgwDAYDVR0T
BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAX5cSudTaTbxjMb+SPnQlCZngQWKJ
AjYvQcSR9iXrdmU9teaf/hwZbutTFPgjAWUktNjfxvmgDEbX8PBJ+VfE1DzxZsG/
V3b1kz6gyFucWcImYu0XEqv4WLA78FuBKvb7XCnrw/Wy8zW0q5Zg6DeHLUd9WABC
omciZhk59qy01r/j4o2KPZxmZ3AM5ZqslC5ntO+mt1TtnYRVLPHAF+5MkApraBLU
e7MaRVNp49FXzsnA50VuIdu5nppuTvb6OeLjVFFujj6mteGIbUSMdI41KkALl4L6
uqMwL3v4+/BZgTbXJSZcDop/jzMzgGqN5GnpLYx1SFKDxrkAcEEF1bpceA==
-----END CERTIFICATE-----
40 changes: 40 additions & 0 deletions tests/client.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-----BEGIN CERTIFICATE-----
MIIDKTCCAhECAQEwDQYJKoZIhvcNAQELBQAwWTELMAkGA1UEBhMCREUxEzARBgNV
BAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
ZDESMBAGA1UEAwwJU2FtcGxlIENBMCAXDTE1MTExMTA2MzkwOVoYDzIxMTUxMDE4
MDYzOTA5WjBaMQswCQYDVQQGEwJERTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8G
A1UECgwYSW50ZXJuZXQgV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1MTAxODA2MzU0MVowWTELMAkGA1UEBhMCREUxEzARBgNVBAgMClNv
bWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDESMBAG
A1UEAwwJU2FtcGxlIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
qb+I9X26YydJNXmc7q9woXSI5b/5vitB6BHxUIkXkv0qSKpgV5IGQKXKgJK3FLwf
vqIemiCbJDiiLamnoXectG/FQxxGXolwmMjGBloHSeCo8yZcQq/3WXL2urH2R8B3
q7Du2TT7pqNFVAvkFVM8Z/rE1kAGBGiF+tTf2Tm0xq3fXk3DOSfTWV9OqHoLNrS7
Cx2E260L2j1SGk4mCYsDjSWtMm5lfVWZ+FjnAMZw22goMgbPEuMQGhzla0yxux4/
kKdgyGKFhXAmPsHkDIOtM+HBV34qnPRGps/ICfqAUx+RyUIK5bWjIaUENhFq0uis
dQsX9VDQB489kQJcB/Pt4wIDAQABo1AwTjAdBgNVHQ4EFgQUzQ3L47XiUI3247OT
T1WLDFYr/CgwHwYDVR0jBBgwFoAUzQ3L47XiUI3247OTT1WLDFYr/CgwDAYDVR0T
BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAX5cSudTaTbxjMb+SPnQlCZngQWKJ
AjYvQcSR9iXrdmU9teaf/hwZbutTFPgjAWUktNjfxvmgDEbX8PBJ+VfE1DzxZsG/
V3b1kz6gyFucWcImYu0XEqv4WLA78FuBKvb7XCnrw/Wy8zW0q5Zg6DeHLUd9WABC
omciZhk59qy01r/j4o2KPZxmZ3AM5ZqslC5ntO+mt1TtnYRVLPHAF+5MkApraBLU
e7MaRVNp49FXzsnA50VuIdu5nppuTvb6OeLjVFFujj6mteGIbUSMdI41KkALl4L6
uqMwL3v4+/BZgTbXJSZcDop/jzMzgGqN5GnpLYx1SFKDxrkAcEEF1bpceA==
-----END CERTIFICATE-----
27 changes: 27 additions & 0 deletions tests/client.key
Original file line number Diff line number Diff line change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qvk9jOz
elWvQNifAWgP72sT+/EVr0GJJwOw0JCkTQopU8UCgYEA13As/38NDI69JL1wPJ4H
2Q/X0QYcpJewdp6ZBufh9pqhoIPlA3OWN4H1WX3asm2aZjCxk9ssH1AF7PVl/RbY
jO338zkDmAX2occWDF7DKwvwJEnnEHQYq5HyU3HN7hiMuT0IwjPBmDBprCoh7bnm
Vs9MwkIq5x34DRq4LLbBDckCgYEApCh/TW98epWrqm6wSe+YMAXRvdO0EYzDbmdc
+dPeLc2bjrB1tUHQppRgdTZ3Ve1kNmd3swldUSJpMKtURjY8ZwlrrFlFCN/f45jB
q5ArclFyCHMcAzt1xnljjECGMk9KDNkdnJFGDTYr7M0pLYyQG91yB2z0T/0nfA/u
zkM3xO0CgYEAnP6OACxfPTlxeNrFd0wzzh4zO3K8/bZzsrtVFSnKIABQ5024o05e
FTGb/kmXtLPsdarFW5HRFTui44Sf2TDjkowlxj/jcVWSkJ+K0N6t6aH3+Y+8Foir
elRyFwfbndO9MAROSymzfDjwh/zeuFmzudqQfdqiU5DvhNGmaec3dDM=
-----END RSA PRIVATE KEY-----
40 changes: 40 additions & 0 deletions tests/server.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-----BEGIN CERTIFICATE-----
MIIDKDCCAhACAQIwDQYJKoZIhvcNAQELBQAwWTELMAkGA1UEBhMCREUxEzARBgNV
BAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
ZDESMBAGA1UEAwwJU2FtcGxlIENBMCAXDTE1MTExMTA2MzkzM1oYDzIxMTUxMDE4
MDYzOTMzWjBZMQswCQYDVQQGEwJERTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8G
A1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRIwEAYDVQQDDAlsb2NhbGhv
c3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCjqgBkBVyMPsWa64jW
vdhfxeLn69S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lIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
qb+I9X26YydJNXmc7q9woXSI5b/5vitB6BHxUIkXkv0qSKpgV5IGQKXKgJK3FLwf
vqIemiCbJDiiLamnoXectG/FQxxGXolwmMjGBloHSeCo8yZcQq/3WXL2urH2R8B3
q7Du2TT7pqNFVAvkFVM8Z/rE1kAGBGiF+tTf2Tm0xq3fXk3DOSfTWV9OqHoLNrS7
Cx2E260L2j1SGk4mCYsDjSWtMm5lfVWZ+FjnAMZw22goMgbPEuMQGhzla0yxux4/
kKdgyGKFhXAmPsHkDIOtM+HBV34qnPRGps/ICfqAUx+RyUIK5bWjIaUENhFq0uis
dQsX9VDQB489kQJcB/Pt4wIDAQABo1AwTjAdBgNVHQ4EFgQUzQ3L47XiUI3247OT
T1WLDFYr/CgwHwYDVR0jBBgwFoAUzQ3L47XiUI3247OTT1WLDFYr/CgwDAYDVR0T
BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAX5cSudTaTbxjMb+SPnQlCZngQWKJ
AjYvQcSR9iXrdmU9teaf/hwZbutTFPgjAWUktNjfxvmgDEbX8PBJ+VfE1DzxZsG/
V3b1kz6gyFucWcImYu0XEqv4WLA78FuBKvb7XCnrw/Wy8zW0q5Zg6DeHLUd9WABC
omciZhk59qy01r/j4o2KPZxmZ3AM5ZqslC5ntO+mt1TtnYRVLPHAF+5MkApraBLU
e7MaRVNp49FXzsnA50VuIdu5nppuTvb6OeLjVFFujj6mteGIbUSMdI41KkALl4L6
uqMwL3v4+/BZgTbXJSZcDop/jzMzgGqN5GnpLYx1SFKDxrkAcEEF1bpceA==
-----END CERTIFICATE-----
27 changes: 27 additions & 0 deletions tests/server.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAo6oAZAVcjD7FmuuI1r3YX8Xi5+vUlmZEr9vh2bDTmPzQTkbd
9rDuz8OpkCx0vutAuxbj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