Skip to content

Commit 6dbb7ab

Browse files
committed
tests/README: Update TLS certificate generation instructions.
Fix the command that converts `ec_key.pem` to `ec_key.der`, and increase the certificate validity to 10 years. Signed-off-by: Damien George <[email protected]>
1 parent 790986b commit 6dbb7ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ need to be re-created by end users. This section is included here for reference
222222

223223
A new self-signed RSA key/cert pair can be created with openssl:
224224
```
225-
$ openssl req -x509 -newkey rsa:2048 -keyout rsa_key.pem -out rsa_cert.pem -days 365 -nodes -subj '/CN=micropython.local/O=MicroPython/C=AU'
225+
$ openssl req -x509 -newkey rsa:2048 -keyout rsa_key.pem -out rsa_cert.pem -days 3650 -nodes -subj '/CN=micropython.local/O=MicroPython/C=AU'
226226
```
227227
In this case CN is: micropython.local
228228

@@ -235,6 +235,6 @@ $ openssl x509 -in rsa_cert.pem -out rsa_cert.der -outform DER
235235
For elliptic curve tests using key/cert pairs, create a key then a certificate using:
236236
```
237237
$ openssl ecparam -name prime256v1 -genkey -noout -out ec_key.pem
238-
$ openssl x509 -in ec_key.pem -out ec_key.der -outform DER
239-
$ openssl req -new -x509 -key ec_key.pem -out ec_cert.der -outform DER -days 365 -nodes -subj '/CN=micropython.local/O=MicroPython/C=AU'
238+
$ openssl pkey -in ec_key.pem -out ec_key.der -outform DER
239+
$ openssl req -new -x509 -key ec_key.pem -out ec_cert.der -outform DER -days 3650 -nodes -subj '/CN=micropython.local/O=MicroPython/C=AU'
240240
```

0 commit comments

Comments
 (0)