Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
swgatling [2024/11/13 18:18] – typo beckmanfswgatling [2024/11/13 18:37] (current) – add beckmanf
Line 26: Line 26:
  
  
 +=== Creating a x.509 certificate for localhost ===
  
 +[[https://letsencrypt.org/docs/certificates-for-localhost/|Letsencrypt]] describes how to create self signed certificates for development with https for tls/ssl. The following code creates a self signed x.509 certificate and a private key. The gatling server searches for a file "server.pem" which must contain the certificate "localhost.crt" and the private key "localhost.key".
 +
 +<code>
 +openssl req -x509 -out localhost.crt -keyout localhost.key \
 +  -newkey rsa:2048 -nodes -sha256 \
 +  -subj '/CN=localhost' -extensions EXT -config <( \
 +   printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
 +
 +cp localhost.crt server.pem
 +cat localhost.key >> server.pem
 +</code>
  
  
  • swgatling.1731518297.txt.gz
  • Last modified: 2024/11/13 18:18
  • by beckmanf