Lines Matching refs:cert

46 static nxt_conf_value_t *nxt_cert_details(nxt_mp_t *mp, nxt_cert_t *cert);
61 nxt_cert_t *cert; in nxt_cert_mem() local
69 cert = nxt_cert_bio(task, bio); in nxt_cert_mem()
73 return cert; in nxt_cert_mem()
81 nxt_cert_t *cert; in nxt_cert_fd() local
89 cert = nxt_cert_bio(task, bio); in nxt_cert_fd()
93 return cert; in nxt_cert_fd()
106 nxt_cert_t *cert, *new_cert; in nxt_cert_bio() local
114 cert = nxt_zalloc(sizeof(nxt_cert_t) + nalloc * sizeof(X509 *)); in nxt_cert_bio()
115 if (cert == NULL) { in nxt_cert_bio()
222 if (cert->key != NULL) { in nxt_cert_bio()
228 cert->key = key; in nxt_cert_bio()
234 if (cert->count == nalloc) { in nxt_cert_bio()
237 new_cert = nxt_realloc(cert, sizeof(nxt_cert_t) in nxt_cert_bio()
244 cert = new_cert; in nxt_cert_bio()
247 cert->chain[cert->count++] = x509; in nxt_cert_bio()
254 if (cert->key == NULL) { in nxt_cert_bio()
259 if (cert->count == 0) { in nxt_cert_bio()
264 return cert; in nxt_cert_bio()
268 nxt_cert_destroy(cert); in nxt_cert_bio()
304 nxt_cert_destroy(nxt_cert_t *cert) in nxt_cert_destroy() argument
308 EVP_PKEY_free(cert->key); in nxt_cert_destroy()
310 for (i = 0; i != cert->count; i++) { in nxt_cert_destroy()
311 X509_free(cert->chain[i]); in nxt_cert_destroy()
314 nxt_free(cert); in nxt_cert_destroy()
348 nxt_cert_t *cert; in nxt_cert_info_init() local
352 cert = nxt_cert_fd(task, items[i].fd); in nxt_cert_info_init()
354 if (nxt_slow_path(cert == NULL)) { in nxt_cert_info_init()
358 (void) nxt_cert_info_save(&items[i].name, cert); in nxt_cert_info_init()
360 nxt_cert_destroy(cert); in nxt_cert_info_init()
366 nxt_cert_info_save(nxt_str_t *name, nxt_cert_t *cert) in nxt_cert_info_save() argument
389 value = nxt_cert_details(mp, cert); in nxt_cert_info_save()
492 nxt_cert_details(nxt_mp_t *mp, nxt_cert_t *cert) in nxt_cert_details() argument
518 if (cert->key != NULL) { in nxt_cert_details()
519 key = cert->key; in nxt_cert_details()
556 chain = nxt_conf_create_array(mp, cert->count); in nxt_cert_details()
561 for (i = 0; i < cert->count; i++) { in nxt_cert_details()
567 x509 = cert->chain[i]; in nxt_cert_details()