Revision 3f9c1775
Added by Jim Pingle over 13 years ago
etc/inc/certs.inc | ||
---|---|---|
30 | 30 |
pfSense_MODULE: certificate_managaer |
31 | 31 |
*/ |
32 | 32 |
|
33 |
define("OPEN_SSL_CONF_PATH", "/etc/ssl/openssl.cnf"); |
|
34 |
|
|
33 | 35 |
require_once("functions.inc"); |
34 | 36 |
|
35 | 37 |
function & lookup_ca($refid) { |
... | ... | |
160 | 162 |
function ca_create(& $ca, $keylen, $lifetime, $dn) { |
161 | 163 |
|
162 | 164 |
$args = array( |
165 |
"x509_extensions" => "v3_ca", |
|
163 | 166 |
"digest_alg" => "sha1", |
164 | 167 |
"private_key_bits" => (int)$keylen, |
165 | 168 |
"private_key_type" => OPENSSL_KEYTYPE_RSA, |
... | ... | |
202 | 205 |
$signing_ca_serial = ++$signing_ca['serial']; |
203 | 206 |
|
204 | 207 |
$args = array( |
208 |
"x509_extensions" => "v3_ca", |
|
205 | 209 |
"digest_alg" => "sha1", |
206 | 210 |
"private_key_bits" => (int)$keylen, |
207 | 211 |
"private_key_type" => OPENSSL_KEYTYPE_RSA, |
... | ... | |
263 | 267 |
$ca_serial = ++$ca['serial']; |
264 | 268 |
|
265 | 269 |
$args = array( |
270 |
"x509_extensions" => "usr_cert", |
|
266 | 271 |
"digest_alg" => "sha1", |
267 | 272 |
"private_key_bits" => (int)$keylen, |
268 | 273 |
"private_key_type" => OPENSSL_KEYTYPE_RSA, |
... | ... | |
297 | 302 |
function csr_generate(& $cert, $keylen, $dn) { |
298 | 303 |
|
299 | 304 |
$args = array( |
305 |
"x509_extensions" => "v3_req", |
|
300 | 306 |
"digest_alg" => "sha1", |
301 | 307 |
"private_key_bits" => (int)$keylen, |
302 | 308 |
"private_key_type" => OPENSSL_KEYTYPE_RSA, |
Also available in: Unified diff
Specify full path to openssl.cnf, and select the relevant section to use when generating certificates.