diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:06:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:06:57 +0000 |
commit | a3eed2c248067f0319cb72bcc8b5e2c7054ea6dc (patch) | |
tree | fd79d650c7ffee81608955be5f4fd8edd791834e /tests/certs/create-certs.sh | |
parent | Initial commit. (diff) | |
download | wget-a3eed2c248067f0319cb72bcc8b5e2c7054ea6dc.tar.xz wget-a3eed2c248067f0319cb72bcc8b5e2c7054ea6dc.zip |
Adding upstream version 1.20.1.upstream/1.20.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/certs/create-certs.sh')
-rwxr-xr-x | tests/certs/create-certs.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/certs/create-certs.sh b/tests/certs/create-certs.sh new file mode 100755 index 0000000..8e5f409 --- /dev/null +++ b/tests/certs/create-certs.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#create key for CA self-signed certificate +certtool --generate-privkey --outfile test-ca-key.pem --rsa + +#create CA self-signed certificate +certtool --generate-self-signed --load-privkey test-ca-key.pem --template test-ca-template.txt --outfile test-ca-cert.pem + +# create server key +certtool --generate-privkey --outfile server-key.pem --rsa + +# create server certificate +certtool --generate-certificate --load-privkey server-key.pem --template server-template.txt --outfile server-cert.pem --load-ca-certificate test-ca-cert.pem --load-ca-privkey test-ca-key.pem + +# create expired server certificate +certtool --generate-certificate --load-privkey server-key.pem --template expired-template.txt --outfile expired.pem --load-ca-certificate test-ca-cert.pem --load-ca-privkey test-ca-key.pem + +# create not activated server cert +certtool --generate-certificate --load-privkey server-key.pem --template invalid-template.txt --outfile invalid.pem --load-ca-certificate test-ca-cert.pem --load-ca-privkey test-ca-key.pem + +# create client key +certtool --generate-privkey --outfile client-key.pem --rsa + +# create client certificate +certtool --generate-certificate --load-privkey client-key.pem --template client-template.txt --outfile client-cert.pem --load-ca-certificate test-ca-cert.pem --load-ca-privkey test-ca-key.pem + +# create CRL for the server certificate +certtool --generate-crl --load-ca-privkey test-ca-key.pem --load-ca-certificate test-ca-cert.pem --load-certificate server-cert.pem --outfile revoked-crl.pem --template revoked-template.txt |