Lines Matching refs:exc

985     SSL_EXCERT *exc = arg;  in set_cert_cb()  local
999 if (exc == NULL) in set_cert_cb()
1006 while (exc->next != NULL) in set_cert_cb()
1007 exc = exc->next; in set_cert_cb()
1011 while (exc != NULL) { in set_cert_cb()
1013 rv = SSL_check_chain(ssl, exc->cert, exc->key, exc->chain); in set_cert_cb()
1015 X509_NAME_print_ex(bio_err, X509_get_subject_name(exc->cert), 0, in set_cert_cb()
1020 if (!SSL_use_certificate(ssl, exc->cert) in set_cert_cb()
1021 || !SSL_use_PrivateKey(ssl, exc->key)) { in set_cert_cb()
1029 if (exc->build_chain) { in set_cert_cb()
1032 } else if (exc->chain != NULL) { in set_cert_cb()
1033 if (!SSL_set1_chain(ssl, exc->chain)) in set_cert_cb()
1037 exc = exc->prev; in set_cert_cb()
1042 void ssl_ctx_set_excert(SSL_CTX *ctx, SSL_EXCERT *exc) in ssl_ctx_set_excert() argument
1044 SSL_CTX_set_cert_cb(ctx, set_cert_cb, exc); in ssl_ctx_set_excert()
1049 SSL_EXCERT *exc = app_malloc(sizeof(*exc), "prepend cert"); in ssl_excert_prepend() local
1051 memset(exc, 0, sizeof(*exc)); in ssl_excert_prepend()
1053 exc->next = *pexc; in ssl_excert_prepend()
1054 *pexc = exc; in ssl_excert_prepend()
1056 if (exc->next) { in ssl_excert_prepend()
1057 exc->certform = exc->next->certform; in ssl_excert_prepend()
1058 exc->keyform = exc->next->keyform; in ssl_excert_prepend()
1059 exc->next->prev = exc; in ssl_excert_prepend()
1061 exc->certform = FORMAT_PEM; in ssl_excert_prepend()
1062 exc->keyform = FORMAT_PEM; in ssl_excert_prepend()
1068 void ssl_excert_free(SSL_EXCERT *exc) in ssl_excert_free() argument
1072 if (exc == NULL) in ssl_excert_free()
1074 while (exc) { in ssl_excert_free()
1075 X509_free(exc->cert); in ssl_excert_free()
1076 EVP_PKEY_free(exc->key); in ssl_excert_free()
1077 OSSL_STACK_OF_X509_free(exc->chain); in ssl_excert_free()
1078 curr = exc; in ssl_excert_free()
1079 exc = exc->next; in ssl_excert_free()
1086 SSL_EXCERT *exc = *pexc; in load_excert() local
1088 if (exc == NULL) in load_excert()
1091 if (exc->certfile == NULL && exc->next == NULL) { in load_excert()
1092 ssl_excert_free(exc); in load_excert()
1096 for (; exc; exc = exc->next) { in load_excert()
1097 if (exc->certfile == NULL) { in load_excert()
1101 exc->cert = load_cert(exc->certfile, exc->certform, in load_excert()
1103 if (exc->cert == NULL) in load_excert()
1105 if (exc->keyfile != NULL) { in load_excert()
1106 exc->key = load_key(exc->keyfile, exc->keyform, in load_excert()
1109 exc->key = load_key(exc->certfile, exc->certform, in load_excert()
1112 if (exc->key == NULL) in load_excert()
1114 if (exc->chainfile != NULL) { in load_excert()
1115 if (!load_certs(exc->chainfile, 0, &exc->chain, NULL, "server chain")) in load_excert()
1126 SSL_EXCERT *exc = *pexc; in args_excert() local
1131 if (exc == NULL) { in args_excert()
1132 if (!ssl_excert_prepend(&exc)) { in args_excert()
1137 *pexc = exc; in args_excert()
1145 if (exc->certfile != NULL && !ssl_excert_prepend(&exc)) { in args_excert()
1149 *pexc = exc; in args_excert()
1150 exc->certfile = opt_arg(); in args_excert()
1153 if (exc->keyfile != NULL) { in args_excert()
1157 exc->keyfile = opt_arg(); in args_excert()
1160 if (exc->chainfile != NULL) { in args_excert()
1165 exc->chainfile = opt_arg(); in args_excert()
1168 exc->build_chain = 1; in args_excert()
1171 if (!opt_format(opt_arg(), OPT_FMT_ANY, &exc->certform)) in args_excert()
1175 if (!opt_format(opt_arg(), OPT_FMT_ANY, &exc->keyform)) in args_excert()
1183 ssl_excert_free(exc); in args_excert()