Skip to content

Commit

Permalink
add ssl tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan63 committed Jul 27, 2024
1 parent bd8d8e2 commit 023613b
Show file tree
Hide file tree
Showing 18 changed files with 509 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/std/Test.hx
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,18 @@ class Test extends utest.Test
case [ 'socket' ]:
socketClient();
case _:
utest.UTest.run([ new Test() ]);
utest.UTest.run([
new Test(),
new ssl.CertificateLoadingTests(),
new ssl.CertificateTests(),
new ssl.DigestTests.MD5Tests(),
new ssl.DigestTests.SHA1Tests(),
new ssl.DigestTests.SHA256Tests(),
new ssl.DigestTests.SHA512Tests(),
new ssl.DigestTests.RIPEMD160Tests(),
new ssl.TestPKCS1(),
new ssl.TestPKCS8()
]);
}
}
}
1 change: 1 addition & 0 deletions test/std/compile32.hxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
resources.hxml
-m Test
-D HXCPP_M32
-D HXCPP_DEBUGGER
Expand Down
1 change: 1 addition & 0 deletions test/std/compile64.hxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
resources.hxml
-m Test
-D HXCPP_M64
-L hx4compat
Expand Down
11 changes: 11 additions & 0 deletions test/std/resources.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-r resources/pkcs8/public.key@pkcs8_public_key
-r resources/pkcs8/private.key@pkcs8_private_key
-r resources/pkcs8/private_aes.key@pkcs8_aes_private_key

-r resources/pkcs1/public.key@pkcs1_public_key
-r resources/pkcs1/private.key@pkcs1_private_key
-r resources/pkcs1/private_aes.key@pkcs1_private_aes_key

-r resources/certs/rootkey.pem@rootkey
-r resources/certs/rootcert.pem@rootcert
-r resources/certs/sample.pem@x509sample
18 changes: 18 additions & 0 deletions test/std/resources/certs/rootcert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-----BEGIN CERTIFICATE-----
MIIC8TCCAdmgAwIBAgIBATANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdSb290
IENBMCAXDTE2MDExNDIyMjkwNVoYDzIxMTYwMTE1MjIyOTA1WjASMRAwDgYDVQQD
DAdSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv5oV1s3N
us7SINg7omu5AxueEgK97mh5PU3hgZpliSFaESmL2qLGeP609oXs/68XDXVW4utU
LCOjLh0np+5Xy3i3GRDXgBZ72QDe23WqqQqqaBlQVVm1WxG+amRtZJEWdSIsiFBt
k+8dBElHh2WQDhDOWqHGHQarQgJPxGB97MRhMSlbTwK1T5KAWOlqi5mJW5L6vNrQ
7Tra/YceH70fU0fJYOXhBxM92NwD1bbVd9GPYFSqrdrVj19bvo63XsxZduex5QHr
RkWqT5w5mgAHaEgCqWrS/64q9TR9UEwrB8kiZZg3k9/im+zBwEULTZu0r8oMEkpj
bTlXLmt8EMBqxwIDAQABo1AwTjAdBgNVHQ4EFgQUcH8uroNoWZgEIyrN6z4XzSTd
AUkwHwYDVR0jBBgwFoAUcH8uroNoWZgEIyrN6z4XzSTdAUkwDAYDVR0TBAUwAwEB
/zANBgkqhkiG9w0BAQsFAAOCAQEAuiLq2lhcOJHrwUP0txbHk2vy6rmGTPxqmcCo
CUQFZ3KrvUQM+rtRqqQ0+LzU4wSTFogBz9KSMfT03gPegY3b/7L2TOaMmUFRzTdd
c9PNT0lP8V3pNQrxp0IjKir791QkGe2Ux45iMKf/SXpeTWASp4zeMiD6/LXFzzaK
BfNS5IrIWRDev41lFasDzudK5/kmVaMvDOFyW51KkKkqb64VS4UA81JIEzClvz+3
Vp3k1AXup5+XnTvhqu2nRhrLpJR5w8OXQpcn6qjKlVc2BXtb3xwci1/ibHlZy3CZ
n70e2NYihU5yYKccReP+fjLgVFsuhsDs/0hRML1u9bLp9nUbYA==
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions test/std/resources/certs/rootkey.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@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QjiAC5SLzoNO9Jn8g4eS/1mEPXhQ0TXIsFonZDypp/n
RMp21DkvdMUCgYAIMgwjR5rbYjEtUqJnlBlTBmD0FWDEqigQpgxdRcWgjT2nA2l0
3AbcVwwv+6M2eg1MPASqsgvfP13CQZQ2afaKY10Zo6NTrOrLPupm+MYP4hp5w6Ox
JI3lzGWHKYLYWKvmpEr7tZwMaXtsC7R77WP2A6hMUZA7dU2dg1ra3lrSsQKBgQDA
sPIsUtmtwOBtqzUSEXrGfQqA+larDEGNVDVaiKfVwzwg+aeyWS+rqRS5Rj64L2GG
KW3i020EvN/fplZap9vY9lIN7UZ5avSmDdqRFl1ajiccy1HRarKrbTFRoHibItMN
4YvYfVZQ2h2aHQe2Myb6OULv6e4qbPIRyyDo4aKmTQKBgQCadq2JfICFIP9Q1aQn
93oD7Z4WcYs+KsLYO+/uJxWMrn0/gv90cGrSfstJqDOHnRq4WKUcgK9ErxaE4LkW
sD0mBhRM3SMxnRJZRO+6roRdehtjHkvzKu75KjcsuwefoMs2sFa4CLQ1YU2vO3Tx
dgzpnKS2bH/i5yLwhelRfddZ6Q==
-----END PRIVATE KEY-----
23 changes: 23 additions & 0 deletions test/std/resources/certs/sample.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIID2jCCA0MCAg39MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG
A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE
MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl
YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw
ODIyMDUyODAwWhcNMTcwODIxMDUyODAwWjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE
CAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs
ZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwvWITOLeyTbS1
Q/UacqeILIK16UHLvSymIlbbiT7mpD4SMwB343xpIlXN64fC0Y1ylT6LLeX4St7A
cJrGIV3AMmJcsDsNzgo577LqtNvnOkLH0GojisFEKQiREX6gOgq9tWSqwaENccTE
sAXuV6AQ1ST+G16s00iN92hjX9V/V66snRwTsJ/p4WRpLSdAj4272hiM19qIg9zr
h92e2rQy7E/UShW4gpOrhg2f6fcCBm+aXIga+qxaSLchcDUvPXrpIxTd/OWQ23Qh
vIEzkGbPlBA8J7Nw9KCyaxbYMBFb1i0lBjwKLjmcoihiI7PVthAOu/B71D2hKcFj
Kpfv4D1Uam/0VumKwhwuhZVNjLq1BR1FKRJ1CioLG4wCTr0LVgtvvUyhFrS+3PdU
R0T5HlAQWPMyQDHgCpbOHW0wc0hbuNeO/lS82LjieGNFxKmMBFF9lsN2zsA6Qw32
Xkb2/EFltXCtpuOwVztdk4MDrnaDXy9zMZuqFHpv5lWTbDVwDdyEQNclYlbAEbDe
vEQo/rAOZFl94Mu63rAgLiPeZN4IdS/48or5KaQaCOe0DuAb4GWNIQ42cYQ5TsEH
Wt+FIOAMSpf9hNPjDeu1uff40DOtsiyGeX9NViqKtttaHpvd7rb2zsasbcAGUl+f
NQJj4qImPSB9ThqZqPTukEcM/NtbeQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAIAi
gU3My8kYYniDuKEXSJmbVB+K1upHxWDA8R6KMZGXfbe5BRd8s40cY6JBYL52Tgqd
l8z5Ek8dC4NNpfpcZc/teT1WqiO2wnpGHjgMDuDL1mxCZNL422jHpiPWkWp3AuDI
c7tL1QjbfAUHAQYwmHkWgPP+T2wAv0pOt36GgMCM
-----END CERTIFICATE-----
27 changes: 27 additions & 0 deletions test/std/resources/pkcs1/private.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
M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v2X66EpGvzM5ne9tU2/
tTUxv8s0XgEVt1Qqd9vi9gm+ni076Yz8ZRPQ+N/DGMgMEovhFT1m1ZPviELC7G/1
pJF+1n2Npl5A8Sk5RxWirz5iHCBOi3C63Bt+48Hd8te7xeIMUlOEM62tPDd2zcJx
WMN2RaiOr1aRWKbSijJk7QKBgHzoFpk74WF+Bw0uzc1EahgBKPU5uhLkOkpbcCru
IAxNAnlATqNup9+CIwkySnNHxPMYMNsPVwyj6BxH85j3zf8pmvAhtJLPwkEVKGFm
WVsUCLeMzwk/foMvl8rgI8Mm9g+apFCnecU3OH4vwNDnTytxMC9JORQ57dFT1a+X
0TsvAoGAXLg1gHO9rK4rPEx1HF6AJJwLVDODbjdkRujOVFF9N0D4cF1EAng0ZdxA
cgFYem6qq3kEW2u34n/jizf2LXz1FYhgA9UfxanTCJ9KD3iNyLvk2Otdw5ydj+Z5
zbzgrn1MkeW2iEk/Yq9d0LVDzqCNqsqErs7vEG2MfcA4k2v+YKs=
-----END RSA PRIVATE KEY-----
30 changes: 30 additions & 0 deletions test/std/resources/pkcs1/private_aes.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,BEE4D1EF74A04EFC3F33E2B1DC986640

YlI83/hV77r3gw97DOBI+pkuPqCOXp6zTpt28+W5FbyYKo+owRW6liVSvD6wQGn/
B3zQAjaezYd2PhscLTHXGbrPywOQADDkMoCNc5uWOIUJ2zw7UUyMs1QyLK4AB5Cr
tvsdF0zXckIw9/RjMghyVsFVfEdQ2ZKb2Zwf3ciDDD3zQvXh96T7jf9x191PIaW/
5F9vAHQyc5WWhlQvifTHt3o/BAnHiflgnEnYcY9Am1AhHB9lUiF2BUj5Sexkkqqo
MqzzvdU2X8PBiEuJ0x18Pv83TwBuIf1Q+q1BG0i3BWi+nH60X9qwr/g4e4ddl7q2
5NW8lcUyqPrcuUuNs8dvGd+APky/SoJEZ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
eJAFVIXmPUlJBqH2mNiIf8Qr58OEb8VoqlMPhp1kddCcZFiOnmonNtXyIKQ4MHXK
k97MjUTpcHA8KHVmtF885lvaO61mGc45vJTOR5cVv3hJ7FtSDrHEnl212aZbK1NP
ei4WF5mD9lv2THzsrSF6LAUTKTqVsQmSIGvNs2MdSCP5NX9TXrOe5J81gv4uNvY6
-----END RSA PRIVATE KEY-----
8 changes: 8 additions & 0 deletions test/std/resources/pkcs1/public.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA6gqprEQKAbycoSMIxlQXqmyaLM+jtNi55yftQ13qGp9h2s1h5qAM
wRpGx2ZZJl0PaGV3jpJlKAxqay8oEeKXN+c+/nkzLDJmNG2Z8iYDKmuOYi2tCUt4
TMyHfUIvErJvhzMlJMUXUsU0aHY7y+wKoJVIuor/9AgRY+66+XjAO/hAhIQyntqS
CkyjSwGHVRaooQCibIEXjwSP2a5YnqnO1v6xbVcrhoMN8rMIA2gd2qplqJY2u6H/
9H/MdyLibTpxNWygBeUTpnIuELC3bX4t21McoObE8sul4WFe/kCp6myv11rNTQ/y
YorrD4jXPnadTSaGbSLjN5S7HVCuD5h+yQIDAQAB
-----END RSA PUBLIC KEY-----
28 changes: 28 additions & 0 deletions test/std/resources/pkcs8/private.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDqCqmsRAoBvJyh
IwjGVBeqbJosz6O02LnnJ+1DXeoan2HazWHmoAzBGkbHZlkmXQ9oZXeOkmUoDGpr
LygR4pc35z7+eTMsMmY0bZnyJgMqa45iLa0JS3hMzId9Qi8Ssm+HMyUkxRdSxTRo
djvL7AqglUi6iv/0CBFj7rr5eMA7+ECEhDKe2pIKTKNLAYdVFqihAKJsgRePBI/Z
rlieqc7W/rFtVyuGgw3yswgDaB3aqmWolja7of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9XDKPoHEfzmPfN/yma8CG0ks/CQRUoYWZZWxQIt4zPCT9+gy+XyuAjwyb2D5qk
UKd5xTc4fi/A0OdPK3EwL0k5FDnt0VPVr5fROy8CgYBcuDWAc72sris8THUcXoAk
nAtUM4NuN2RG6M5UUX03QPhwXUQCeDRl3EByAVh6bqqreQRba7fif+OLN/YtfPUV
iGAD1R/FqdMIn0oPeI3Iu+TY613DnJ2P5nnNvOCufUyR5baIST9ir13QtUPOoI2q
yoSuzu8QbYx9wDiTa/5gqw==
-----END PRIVATE KEY-----
30 changes: 30 additions & 0 deletions test/std/resources/pkcs8/private_aes.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFHzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIE5zl+LjRt2wCAggA
MB0GCWCGSAFlAwQBAgQQBObFJI+NtSI8jNzTwSCltgSCBNBUJvrbCtbufEAhHduN
59BFVqEoyTW59M/w7AmWhMRCYlRqG/drW+x4KDmNFzJ7wNMgBEJhhzR1KleoDUMC
iWH+NMypl/qI983mboa5vksEU+8Q0A+eJpVZcTRvN31I3Pg6L/mA6mQOOp/sE9+N
loPcY3QvbFZ58F7ep/X1gpwcAIGGOHbYhgLUh+y7P0BTf0uYfbimiaBjlRBbfxIu
AtL+vLW1jQBpZVOklqI7kY4J58DoTiLnkQxZeFyWfBW/JSS5/oK/tFE6jDH+CuQA
2fL+xyTCI64P/204uznDDGEPUNFa9IvPek+ddo3rfsQzQNlDPBDEU2lTErCLBrbY
PKvHu4x7BNm2Ahe5ALhXP/XGDnxlzJMpkHnye952S0ckhA9E0ycTbxOcSay+NubC
4MCjk+JFEbjlKndTl6gUrG0DvUqPd2oJk2XC8qRN2vkzeUuhupXmf56u00xrO4Nf
AF7HHTIIP4RdyQ/s1ur4W5X+TrPXmsK4IEMTtNIpRTS9OhJ5Wkw/BvlrkKep4dxe
pNV7UIchs5iIc5KW5pCW2EG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VDfE4sV7h8DLINp9MMpGdMsQ==
-----END ENCRYPTED PRIVATE KEY-----
9 changes: 9 additions & 0 deletions test/std/resources/pkcs8/public.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6gqprEQKAbycoSMIxlQX
qmyaLM+jtNi55yftQ13qGp9h2s1h5qAMwRpGx2ZZJl0PaGV3jpJlKAxqay8oEeKX
N+c+/nkzLDJmNG2Z8iYDKmuOYi2tCUt4TMyHfUIvErJvhzMlJMUXUsU0aHY7y+wK
oJVIuor/9AgRY+66+XjAO/hAhIQyntqSCkyjSwGHVRaooQCibIEXjwSP2a5YnqnO
1v6xbVcrhoMN8rMIA2gd2qplqJY2u6H/9H/MdyLibTpxNWygBeUTpnIuELC3bX4t
21McoObE8sul4WFe/kCp6myv11rNTQ/yYorrD4jXPnadTSaGbSLjN5S7HVCuD5h+
yQIDAQAB
-----END PUBLIC KEY-----
14 changes: 14 additions & 0 deletions test/std/ssl/CertificateLoadingTests.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package ssl;

import utest.Assert;
import haxe.Resource;
import sys.ssl.Certificate;
import utest.Test;

class CertificateLoadingTests extends Test {
function testFromString() {
Certificate.fromString(Resource.getString('x509sample'));

Assert.pass();
}
}
Loading

0 comments on commit 023613b

Please sign in to comment.