C4: loopback HTTPS test credential for the content parity test
Self-signed P-256 pair for 127.0.0.1, CA:FALSE, serverAuth, with the openssl recipe in the README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
51a00bb326
commit
cebe6ae724
3 changed files with 40 additions and 0 deletions
22
packages/cultmesh-browser/test/fixtures/README.md
vendored
Normal file
22
packages/cultmesh-browser/test/fixtures/README.md
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Test fixtures
|
||||
|
||||
`content-https-test-cert.pem` and `content-https-test-key.pem` are a loopback-only
|
||||
test credential. They sign nothing real: the certificate is self-signed P-256, valid
|
||||
for `127.0.0.1` and `localhost`, `CA:FALSE`, `serverAuth` only, and the key is public
|
||||
on purpose.
|
||||
|
||||
They exist for `interop/content-https.test.ts`. The TypeScript provider serves HTTPS
|
||||
with this pair. The C# suite (`CultMeshHttpsContentInteropTests`) anchors the
|
||||
certificate with `CustomRootTrust`, so chain and name validation stay on and no
|
||||
other certificate is accepted. The TypeScript reader trusts it through
|
||||
`NODE_EXTRA_CA_CERTS`, set on the reader's child process only.
|
||||
|
||||
Regenerate (Git Bash needs the `MSYS_NO_PATHCONV=1` prefix); no test pins the bytes:
|
||||
|
||||
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes \
|
||||
-keyout content-https-test-key.pem -out content-https-test-cert.pem -days 36500 \
|
||||
-subj "/CN=cultmesh-content-https-tests" \
|
||||
-addext "subjectAltName=IP:127.0.0.1,DNS:localhost" \
|
||||
-addext "basicConstraints=critical,CA:FALSE" \
|
||||
-addext "keyUsage=critical,digitalSignature" \
|
||||
-addext "extendedKeyUsage=serverAuth"
|
||||
13
packages/cultmesh-browser/test/fixtures/content-https-test-cert.pem
vendored
Normal file
13
packages/cultmesh-browser/test/fixtures/content-https-test-cert.pem
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIB5TCCAYugAwIBAgIUYu2AT96reiPh11v9xCTtZyIk3F4wCgYIKoZIzj0EAwIw
|
||||
JzElMCMGA1UEAwwcY3VsdG1lc2gtY29udGVudC1odHRwcy10ZXN0czAgFw0yNjEw
|
||||
MTkxNzM3MzlaGA8yMTI2MDkyNTE3MzczOVowJzElMCMGA1UEAwwcY3VsdG1lc2gt
|
||||
Y29udGVudC1odHRwcy10ZXN0czBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLrV
|
||||
DZdr7rly5z4D6XCzEFnL3njGBw/XSfGJBqsvtnLv7biP++PUx/otGhk2FpfJCa8s
|
||||
RSS6tr1KlJAinDwQfT+jgZIwgY8wHQYDVR0OBBYEFHNEAAq4I/qya72ulYoItVKu
|
||||
AV8TMB8GA1UdIwQYMBaAFHNEAAq4I/qya72ulYoItVKuAV8TMBoGA1UdEQQTMBGH
|
||||
BH8AAAGCCWxvY2FsaG9zdDAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDAT
|
||||
BgNVHSUEDDAKBggrBgEFBQcDATAKBggqhkjOPQQDAgNIADBFAiAhM5txvdC+43aZ
|
||||
EbHYftYUY2BnJuOV9fdDyJF3jgyLGgIhALS6Zq5/KQyBWaYzdExrlpuXyl60eSz5
|
||||
aQVLg5FGjIpX
|
||||
-----END CERTIFICATE-----
|
||||
5
packages/cultmesh-browser/test/fixtures/content-https-test-key.pem
vendored
Normal file
5
packages/cultmesh-browser/test/fixtures/content-https-test-key.pem
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgBpkdByjhxCucHa5P
|
||||
jvQD6psI8I1cTwOqBKefGsyP8SehRANCAAS61Q2Xa+65cuc+A+lwsxBZy954xgcP
|
||||
10nxiQarL7Zy7+24j/vj1Mf6LRoZNhaXyQmvLEUkura9SpSQIpw8EH0/
|
||||
-----END PRIVATE KEY-----
|
||||
Loading…
Reference in a new issue