1 # Generate certificates for client cert tests
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"
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