mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-08 10:35:12 +00:00
Add support for SSL client certificate authentication (#3435)
Adds `--client-certificate`, `--client-certificate-key`, `--client-certificate-password` Authored-by: coletdjnz Co-authored-by: df <fieldhouse@gmx.net> Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
This commit is contained in:
19
test/testdata/certificate/instructions.md
vendored
Normal file
19
test/testdata/certificate/instructions.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generate certificates for client cert tests
|
||||
|
||||
## CA
|
||||
```sh
|
||||
openssl ecparam -name prime256v1 -genkey -noout -out ca.key
|
||||
openssl req -new -x509 -sha256 -days 6027 -key ca.key -out ca.crt -subj "/CN=ytdlptest"
|
||||
```
|
||||
|
||||
## Client
|
||||
```sh
|
||||
openssl ecparam -name prime256v1 -genkey -noout -out client.key
|
||||
openssl ec -in client.key -out clientencrypted.key -passout pass:foobar -aes256
|
||||
openssl req -new -sha256 -key client.key -out client.csr -subj "/CN=ytdlptest2"
|
||||
openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 6027 -sha256
|
||||
cp client.crt clientwithkey.crt
|
||||
cp client.crt clientwithencryptedkey.crt
|
||||
cat client.key >> clientwithkey.crt
|
||||
cat clientencrypted.key >> clientwithencryptedkey.crt
|
||||
```
|
||||
Reference in New Issue
Block a user