Home | History | Annotate | Download | only in apps

Lines Matching defs:exc

898     SSL_EXCERT *exc = arg;
911 if (exc == NULL)
918 while (exc->next != NULL)
919 exc = exc->next;
923 while (exc != NULL) {
925 rv = SSL_check_chain(ssl, exc->cert, exc->key, exc->chain);
927 X509_NAME_print_ex(bio_err, X509_get_subject_name(exc->cert), 0,
932 if (!SSL_use_certificate(ssl, exc->cert)
933 || !SSL_use_PrivateKey(ssl, exc->key)) {
941 if (exc->build_chain) {
944 } else if (exc->chain != NULL) {
945 if (!SSL_set1_chain(ssl, exc->chain))
949 exc = exc->prev;
954 void ssl_ctx_set_excert(SSL_CTX *ctx, SSL_EXCERT *exc)
956 SSL_CTX_set_cert_cb(ctx, set_cert_cb, exc);
961 SSL_EXCERT *exc = app_malloc(sizeof(*exc), "prepend cert");
963 memset(exc, 0, sizeof(*exc));
965 exc->next = *pexc;
966 *pexc = exc;
968 if (exc->next) {
969 exc->certform = exc->next->certform;
970 exc->keyform = exc->next->keyform;
971 exc->next->prev = exc;
973 exc->certform = FORMAT_PEM;
974 exc->keyform = FORMAT_PEM;
980 void ssl_excert_free(SSL_EXCERT *exc)
984 if (exc == NULL)
986 while (exc) {
987 X509_free(exc->cert);
988 EVP_PKEY_free(exc->key);
989 sk_X509_pop_free(exc->chain, X509_free);
990 curr = exc;
991 exc = exc->next;
998 SSL_EXCERT *exc = *pexc;
999 if (exc == NULL)
1002 if (exc->certfile == NULL && exc->next == NULL) {
1003 ssl_excert_free(exc);
1007 for (; exc; exc = exc->next) {
1008 if (exc->certfile == NULL) {
1012 exc->cert = load_cert(exc->certfile, exc->certform,
1014 if (exc->cert == NULL)
1016 if (exc->keyfile != NULL) {
1017 exc->key = load_key(exc->keyfile, exc->keyform,
1020 exc->key = load_key(exc->certfile, exc->certform,
1023 if (exc->key == NULL)
1025 if (exc->chainfile != NULL) {
1026 if (!load_certs(exc->chainfile, &exc->chain, FORMAT_PEM, NULL,
1038 SSL_EXCERT *exc = *pexc;
1043 if (exc == NULL) {
1044 if (!ssl_excert_prepend(&exc)) {
1049 *pexc = exc;
1057 if (exc->certfile != NULL && !ssl_excert_prepend(&exc)) {
1061 *pexc = exc;
1062 exc->certfile = opt_arg();
1065 if (exc->keyfile != NULL) {
1069 exc->keyfile = opt_arg();
1072 if (exc->chainfile != NULL) {
1077 exc->chainfile = opt_arg();
1080 exc->build_chain = 1;
1083 if (!opt_format(opt_arg(), OPT_FMT_PEMDER, &exc->certform))
1087 if (!opt_format(opt_arg(), OPT_FMT_PEMDER, &exc->keyform))
1095 ssl_excert_free(exc);