]> jfr.im git - yt-dlp.git/blame - test/testdata/certificate/instructions.md
Add support for SSL client certificate authentication (#3435)
[yt-dlp.git] / test / testdata / certificate / instructions.md
CommitLineData
bb58c9ed 1# Generate certificates for client cert tests
2
3## CA
4```sh
5openssl ecparam -name prime256v1 -genkey -noout -out ca.key
6openssl req -new -x509 -sha256 -days 6027 -key ca.key -out ca.crt -subj "/CN=ytdlptest"
7```
8
9## Client
10```sh
11openssl ecparam -name prime256v1 -genkey -noout -out client.key
12openssl ec -in client.key -out clientencrypted.key -passout pass:foobar -aes256
13openssl req -new -sha256 -key client.key -out client.csr -subj "/CN=ytdlptest2"
14openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 6027 -sha256
15cp client.crt clientwithkey.crt
16cp client.crt clientwithencryptedkey.crt
17cat client.key >> clientwithkey.crt
18cat clientencrypted.key >> clientwithencryptedkey.crt
19```