Skip to content

Commit

Permalink
feat: switch to openssl
Browse files Browse the repository at this point in the history
  • Loading branch information
andygeiss committed Dec 24, 2024
1 parent 67477b3 commit 46e1e8b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 55 deletions.
8 changes: 3 additions & 5 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ benchmark:
# This will only be used if domains = ["localhost"].
cert-dir := "./security/testdata"
make-certs:
@brew install mkcert
@rm -rf {{cert-dir}} ; mkdir {{cert-dir}}
@mkcert -install
@mkcert -cert-file {{cert-dir}}/server.crt \
-key-file {{cert-dir}}/server.key \
localhost 127.0.0.1 ::1
@openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:secp384r1 -days 3650 \
-nodes -keyout {{cert-dir}}/server.key -out {{cert-dir}}/server.crt -subj "/CN=localhost" \
-addext "subjectAltName=DNS:localhost,DNS:*.localhost,IP:127.0.0.1"

# Test the Go sources (Units).
test:
Expand Down
35 changes: 11 additions & 24 deletions security/testdata/server.crt
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
-----BEGIN CERTIFICATE-----
MIIEXzCCAsegAwIBAgIRAL3Wb1obP5pG83sKcwZh22YwDQYJKoZIhvcNAQELBQAw
gYUxHjAcBgNVBAoTFW1rY2VydCBkZXZlbG9wbWVudCBDQTEtMCsGA1UECwwkeGNi
NzIzMUBNUFZHWUY3V0w2NEwgKEFuZHJlYXMgR2Vpw58pMTQwMgYDVQQDDCtta2Nl
cnQgeGNiNzIzMUBNUFZHWUY3V0w2NEwgKEFuZHJlYXMgR2Vpw58pMB4XDTI0MTIx
NjEyMjg0NFoXDTI3MDMxNjEyMjg0NFowWDEnMCUGA1UEChMebWtjZXJ0IGRldmVs
b3BtZW50IGNlcnRpZmljYXRlMS0wKwYDVQQLDCR4Y2I3MjMxQE1QVkdZRjdXTDY0
TCAoQW5kcmVhcyBHZWnDnykwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQDTurT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wIBAgIUK/4AekDorBKokRq1ul+4wW1GnnMwCgYIKoZIzj0EAwIw
FDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTI0MTIyNDE1MTkyMloXDTM0MTIyMjE1
MTkyMlowFDESMBAGA1UEAwwJbG9jYWxob3N0MHYwEAYHKoZIzj0CAQYFK4EEACID
YgAElR1PMSkhDgXO+MuYCblf6Ol4gbALOedEhG6SvgF+1kXqVmTqTUBpJSJE/pOH
KU+85KODpqmIwtAAHlld7R4Tm+L8RwTw04Iv94ZqZbNUuMNIN6IjLYo7f4WXJO0F
sGO/o3wwejAdBgNVHQ4EFgQUo3rFzfEKFJJ48cWd2z8uZW2mSScwHwYDVR0jBBgw
FoAUo3rFzfEKFJJ48cWd2z8uZW2mSScwDwYDVR0TAQH/BAUwAwEB/zAnBgNVHREE
IDAegglsb2NhbGhvc3SCCyoubG9jYWxob3N0hwR/AAABMAoGCCqGSM49BAMCA2kA
MGYCMQDHzmGumTI1YDRtvbzTOpvcrADxBBWiEoK3Srw0L7WI7Ie1HKnWqMIrr8lk
U+5N2D8CMQCKs/5OA//4lL1JwFuhkW3qI28qjVRnGdgham/kv32R6K0VOiDM/mcf
D//a7xhgd2Q=
-----END CERTIFICATE-----
30 changes: 4 additions & 26 deletions security/testdata/server.key
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDTurTdoauBSVFl
6g5f+ATH3c1ChnX2KxoJToYL5wmAzrseMQa02jICK+iFz7ABnR7W3gzcz0T4lgC9
uTOPwaJUP2gqiMYrNS6b2fmbC7T9wbx7waQ1pVdIiCzrMl76PU9i40Xqkj99Ou8P
WNP81EuJ7GAVPpmvgk+bBR+0yf/gTxLN0VrUiaVYykHft+/Rw/cBpw7YC9ibelRQ
37QUjTVNuBFCfxZGfJYypBKYq/5CrGOGrWPASe5rPd3cfGSzb0XJqpPboQHhZ3n0
eNon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