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