Lines Matching refs:new_cert
3178 X509 * cert = NULL, *new_cert = NULL; in PHP_FUNCTION() local
3235 new_cert = X509_new(); in PHP_FUNCTION()
3236 if (new_cert == NULL) { in PHP_FUNCTION()
3241 if (!X509_set_version(new_cert, 2)) in PHP_FUNCTION()
3245 ASN1_INTEGER_set(X509_get_serialNumber(new_cert), (long)serial); in PHP_FUNCTION()
3247 X509_set_subject_name(new_cert, X509_REQ_get_subject_name(csr)); in PHP_FUNCTION()
3250 cert = new_cert; in PHP_FUNCTION()
3252 if (!X509_set_issuer_name(new_cert, X509_get_subject_name(cert))) { in PHP_FUNCTION()
3255 X509_gmtime_adj(X509_get_notBefore(new_cert), 0); in PHP_FUNCTION()
3256 X509_gmtime_adj(X509_get_notAfter(new_cert), 60*60*24*(long)num_days); in PHP_FUNCTION()
3257 i = X509_set_pubkey(new_cert, key); in PHP_FUNCTION()
3264 X509V3_set_ctx(&ctx, cert, new_cert, csr, NULL, 0); in PHP_FUNCTION()
3266 if (!X509V3_EXT_add_conf(req.req_config, &ctx, req.extensions_section, new_cert)) { in PHP_FUNCTION()
3272 if (!X509_sign(new_cert, priv_key, req.digest)) { in PHP_FUNCTION()
3278 ZVAL_RES(return_value, zend_register_resource(new_cert, le_x509)); in PHP_FUNCTION()
3279 new_cert = NULL; in PHP_FUNCTION()
3283 if (cert == new_cert) { in PHP_FUNCTION()
3300 if (new_cert) { in PHP_FUNCTION()
3301 X509_free(new_cert); in PHP_FUNCTION()