mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
test-client: crl: declare vars before code
Some toolchains blow chunks otherwise https://github.com/warmcat/libwebsockets/issues/1451
This commit is contained in:
parent
0019b67f8b
commit
1bd08c3941
1 changed files with 6 additions and 3 deletions
|
@ -279,13 +279,16 @@ callback_dumb_increment(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
case LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS:
|
||||
if (crl_path[0]) {
|
||||
/* Enable CRL checking of the server certificate */
|
||||
X509_STORE *store;
|
||||
X509_LOOKUP *lookup;
|
||||
int n;
|
||||
X509_VERIFY_PARAM *param = X509_VERIFY_PARAM_new();
|
||||
X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_CRL_CHECK);
|
||||
SSL_CTX_set1_param((SSL_CTX*)user, param);
|
||||
X509_STORE *store = SSL_CTX_get_cert_store((SSL_CTX*)user);
|
||||
X509_LOOKUP *lookup = X509_STORE_add_lookup(store,
|
||||
store = SSL_CTX_get_cert_store((SSL_CTX*)user);
|
||||
lookup = X509_STORE_add_lookup(store,
|
||||
X509_LOOKUP_file());
|
||||
int n = X509_load_cert_crl_file(lookup, crl_path,
|
||||
n = X509_load_cert_crl_file(lookup, crl_path,
|
||||
X509_FILETYPE_PEM);
|
||||
X509_VERIFY_PARAM_free(param);
|
||||
if (n != 1) {
|
||||
|
|
Loading…
Add table
Reference in a new issue