diff options
| author | beck <> | 2017-01-25 10:29:34 +0000 |
|---|---|---|
| committer | beck <> | 2017-01-25 10:29:34 +0000 |
| commit | fe779bdf8fe3a5ca93fe1aa8bdc24ea59b8b7adc (patch) | |
| tree | c63f4134e60dae4d18bf283d0cb878f3ce09895c /src/regress/lib/libcrypto/CA/intermediate.cnf | |
| parent | 5db8efb14ac2f2c5972558f52104b5187d102a2d (diff) | |
| download | openbsd-fe779bdf8fe3a5ca93fe1aa8bdc24ea59b8b7adc.tar.gz openbsd-fe779bdf8fe3a5ca93fe1aa8bdc24ea59b8b7adc.tar.bz2 openbsd-fe779bdf8fe3a5ca93fe1aa8bdc24ea59b8b7adc.zip | |
Add start of a regress for cert gen and validation. not clean, won't
hook it up yet
Diffstat (limited to 'src/regress/lib/libcrypto/CA/intermediate.cnf')
| -rw-r--r-- | src/regress/lib/libcrypto/CA/intermediate.cnf | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/src/regress/lib/libcrypto/CA/intermediate.cnf b/src/regress/lib/libcrypto/CA/intermediate.cnf new file mode 100644 index 0000000000..383f8f0b9b --- /dev/null +++ b/src/regress/lib/libcrypto/CA/intermediate.cnf | |||
| @@ -0,0 +1,129 @@ | |||
| 1 | # For regression tests | ||
| 2 | default_ca = CA_regress | ||
| 3 | |||
| 4 | [ CA_regress ] | ||
| 5 | # Directory and file locations. | ||
| 6 | dir = . | ||
| 7 | certs = $dir | ||
| 8 | crl_dir = $dir | ||
| 9 | database = $dir/int.txt | ||
| 10 | serial = $dir/intserial | ||
| 11 | new_certs_dir = $dir | ||
| 12 | |||
| 13 | # The root key and root certificate. | ||
| 14 | private_key = $dir/intermediate.key.pem | ||
| 15 | certificate = $dir/intermediate.cert.pem | ||
| 16 | |||
| 17 | # For certificate revocation lists. | ||
| 18 | crlnumber = $dir/crlnumber | ||
| 19 | crl = $dir/ca.crl.pem | ||
| 20 | crl_extensions = crl_ext | ||
| 21 | default_crl_days = 30 | ||
| 22 | |||
| 23 | # SHA-1 is deprecated, so use SHA-2 instead. | ||
| 24 | default_md = sha256 | ||
| 25 | |||
| 26 | name_opt = ca_default | ||
| 27 | cert_opt = ca_default | ||
| 28 | default_days = 10 | ||
| 29 | preserve = no | ||
| 30 | policy = policy_loose | ||
| 31 | |||
| 32 | [ policy_strict ] | ||
| 33 | # The root CA should only sign intermediate certificates that match. | ||
| 34 | # See the POLICY FORMAT section of `man ca`. | ||
| 35 | countryName = match | ||
| 36 | stateOrProvinceName = match | ||
| 37 | organizationName = match | ||
| 38 | organizationalUnitName = optional | ||
| 39 | commonName = supplied | ||
| 40 | emailAddress = optional | ||
| 41 | |||
| 42 | [ policy_loose ] | ||
| 43 | # Allow the intermediate CA to sign a more diverse range of certificates. | ||
| 44 | # See the POLICY FORMAT section of the `ca` man page. | ||
| 45 | countryName = optional | ||
| 46 | stateOrProvinceName = optional | ||
| 47 | localityName = optional | ||
| 48 | organizationName = optional | ||
| 49 | organizationalUnitName = optional | ||
| 50 | commonName = supplied | ||
| 51 | emailAddress = optional | ||
| 52 | |||
| 53 | [ req ] | ||
| 54 | # Options for the `req` tool (`man req`). | ||
| 55 | default_bits = 2048 | ||
| 56 | distinguished_name = req_distinguished_name | ||
| 57 | string_mask = utf8only | ||
| 58 | |||
| 59 | # SHA-1 is deprecated, so use SHA-2 instead. | ||
| 60 | default_md = sha256 | ||
| 61 | |||
| 62 | # Extension to add when the -x509 option is used. | ||
| 63 | x509_extensions = v3_ca | ||
| 64 | |||
| 65 | [ req_distinguished_name ] | ||
| 66 | # See <https://en.wikipedia.org/wiki/Certificate_signing_request>. | ||
| 67 | countryName = Country Name (2 letter code) | ||
| 68 | stateOrProvinceName = State or Province Name | ||
| 69 | localityName = Locality Name | ||
| 70 | 0.organizationName = Organization Name | ||
| 71 | organizationalUnitName = Organizational Unit Name | ||
| 72 | commonName = Common Name | ||
| 73 | emailAddress = Email Address | ||
| 74 | |||
| 75 | # Optionally, specify some defaults. | ||
| 76 | countryName_default = CA | ||
| 77 | stateOrProvinceName_default = Alberta | ||
| 78 | localityName_default = Edmonton | ||
| 79 | 0.organizationName_default = OpenBSD | ||
| 80 | organizationalUnitName_default = So and Sos | ||
| 81 | emailAddress_default = evilsoandsos@openbsd.org | ||
| 82 | commonName_default = Regress Intermediate CA | ||
| 83 | |||
| 84 | [ v3_ca ] | ||
| 85 | # Extensions for a typical CA (`man x509v3_config`). | ||
| 86 | subjectKeyIdentifier = hash | ||
| 87 | authorityKeyIdentifier = keyid:always,issuer | ||
| 88 | basicConstraints = critical, CA:true | ||
| 89 | keyUsage = critical, digitalSignature, cRLSign, keyCertSign | ||
| 90 | |||
| 91 | [ v3_intermediate_ca ] | ||
| 92 | # Extensions for a typical intermediate CA (`man x509v3_config`). | ||
| 93 | subjectKeyIdentifier = hash | ||
| 94 | authorityKeyIdentifier = keyid:always,issuer | ||
| 95 | basicConstraints = critical, CA:true, pathlen:0 | ||
| 96 | keyUsage = critical, digitalSignature, cRLSign, keyCertSign | ||
| 97 | |||
| 98 | [ usr_cert ] | ||
| 99 | # Extensions for client certificates (`man x509v3_config`). | ||
| 100 | basicConstraints = CA:FALSE | ||
| 101 | nsCertType = client, email | ||
| 102 | nsComment = "OpenSSL Generated Client Certificate" | ||
| 103 | subjectKeyIdentifier = hash | ||
| 104 | authorityKeyIdentifier = keyid,issuer | ||
| 105 | keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment | ||
| 106 | extendedKeyUsage = clientAuth, emailProtection | ||
| 107 | |||
| 108 | [ server_cert ] | ||
| 109 | # Extensions for server certificates (`man x509v3_config`). | ||
| 110 | basicConstraints = CA:FALSE | ||
| 111 | nsCertType = server | ||
| 112 | nsComment = "OpenSSL Generated Server Certificate" | ||
| 113 | subjectKeyIdentifier = hash | ||
| 114 | authorityKeyIdentifier = keyid,issuer:always | ||
| 115 | keyUsage = critical, digitalSignature, keyEncipherment | ||
| 116 | extendedKeyUsage = serverAuth | ||
| 117 | |||
| 118 | [ crl_ext ] | ||
| 119 | # Extension for CRLs (`man x509v3_config`). | ||
| 120 | authorityKeyIdentifier=keyid:always | ||
| 121 | |||
| 122 | [ ocsp ] | ||
| 123 | # Extension for OCSP signing certificates (`man ocsp`). | ||
| 124 | basicConstraints = CA:FALSE | ||
| 125 | subjectKeyIdentifier = hash | ||
| 126 | authorityKeyIdentifier = keyid,issuer | ||
| 127 | keyUsage = critical, digitalSignature | ||
| 128 | extendedKeyUsage = critical, OCSPSigning | ||
| 129 | |||
