New ctrl to set current certificate.
New ctrl sets current certificate based on certain criteria. Currently two options: set the first valid certificate as current and set the next valid certificate as current. Using these an application can iterate over all certificates in an SSL_CTX or SSL structure.
This commit is contained in:
@@ -3431,6 +3431,9 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
|
||||
case SSL_CTRL_SELECT_CURRENT_CERT:
|
||||
return ssl_cert_select_current(s->cert, (X509 *)parg);
|
||||
|
||||
case SSL_CTRL_SET_CURRENT_CERT:
|
||||
return ssl_cert_set_current(s->cert, larg);
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
case SSL_CTRL_GET_CURVES:
|
||||
{
|
||||
@@ -3937,6 +3940,9 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
|
||||
case SSL_CTRL_SELECT_CURRENT_CERT:
|
||||
return ssl_cert_select_current(ctx->cert, (X509 *)parg);
|
||||
|
||||
case SSL_CTRL_SET_CURRENT_CERT:
|
||||
return ssl_cert_set_current(ctx->cert, larg);
|
||||
|
||||
default:
|
||||
return(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user