Add support for certificate stores in CERT structure. This makes it
[openssl.git] / ssl / s3_lib.c
index 457a5c7..3bc5ce9 100644 (file)
@@ -3449,6 +3449,15 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
                        return 0;
                return ssl3_set_req_cert_type(s->cert, parg, larg);
 
+       case SSL_CTRL_BUILD_CERT_CHAIN:
+               return ssl_build_cert_chain(s->cert, s->ctx->cert_store, larg);
+
+       case SSL_CTRL_SET_VERIFY_CERT_STORE:
+               return ssl_cert_set_cert_store(s->cert, parg, 0, larg);
+
+       case SSL_CTRL_SET_CHAIN_CERT_STORE:
+               return ssl_cert_set_cert_store(s->cert, parg, 1, larg);
+
        default:
                break;
                }
@@ -3746,6 +3755,15 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
        case SSL_CTRL_SET_CLIENT_CERT_TYPES:
                return ssl3_set_req_cert_type(ctx->cert, parg, larg);
 
+       case SSL_CTRL_BUILD_CERT_CHAIN:
+               return ssl_build_cert_chain(ctx->cert, ctx->cert_store, larg);
+
+       case SSL_CTRL_SET_VERIFY_CERT_STORE:
+               return ssl_cert_set_cert_store(ctx->cert, parg, 0, larg);
+
+       case SSL_CTRL_SET_CHAIN_CERT_STORE:
+               return ssl_cert_set_cert_store(ctx->cert, parg, 1, larg);
+
        case SSL_CTRL_SET_TLSEXT_AUTHZ_SERVER_AUDIT_PROOF_CB_ARG:
                ctx->tlsext_authz_server_audit_proof_cb_arg = parg;
                break;