Differences between revisions 1 and 2
Revision 1 as of 2019-08-25 22:45:13
Size: 1236
Editor: PieterSmit
Comment:
Revision 2 as of 2019-09-18 23:01:20
Size: 1353
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
 * Nice instructions 201909 - https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/
Line 5: Line 6:
 

Openssl Self Signed Certificate

Example 2019, create self signed certificate with keyUsage flags

  • openssl req -out test.csr -newkey rsa:4096 -nodes -keyout test.key -config cert.cnf
  • openssl x509 -req -days 365 -in test.csr -signkey test.key -sha256 -out test.crt
  • cert.cnf
    • [ req ]
      default_bits       = 4096
      distinguished_name = req_distinguished_name
      
      x509_extensions = v3_req
      
      [ req_distinguished_name ]
      countryName                 = Country Name (2 letter code)
      countryName_default         = NZ
      stateOrProvinceName         = State or Province Name (full name)
      stateOrProvinceName_default = Auckland
      localityName                = Locality Name (eg, city)
      localityName_default        = Auckland
      organizationName            = Organization Name (eg, company)
      organizationName_default    = Infra&Networks
      commonName                  = Common Name (e.g. server FQDN or YOUR name)
      commonName_max              = 64
      commonName_default          = test.vigor,nz
      
      [v3_req]
      
      basicConstraints = CA:FALSE
      keyUsage = keyEncipherment, digitalSignature, nonRepudiation
      extendedKeyUsage = serverAuth, clientAuth
      
      subjectAltName = @alt_names
      
      [alt_names]
      DNS.1   = test1.vigor.nz

OpenSslSelfSignedCertificate (last edited 2019-09-18 23:01:20 by PieterSmit)