mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
fix: fix compile error caused by store_ctx (#338)
When I compile lsquic with boringssl, I got following error: error: storage size of ‘store_ctx’ isn’t known Signed-off-by: anatasluo <luolongjuna@gmail.com>
This commit is contained in:
parent
082507cd10
commit
103d146831
1 changed files with 8 additions and 4 deletions
|
@ -1124,7 +1124,7 @@ init_x509_cert_store (const char *path)
|
|||
static int
|
||||
verify_server_cert (void *ctx, STACK_OF(X509) *chain)
|
||||
{
|
||||
X509_STORE_CTX store_ctx;
|
||||
X509_STORE_CTX *store_ctx = NULL;
|
||||
X509 *cert;
|
||||
int ver;
|
||||
|
||||
|
@ -1134,12 +1134,16 @@ verify_server_cert (void *ctx, STACK_OF(X509) *chain)
|
|||
return -1;
|
||||
}
|
||||
|
||||
store_ctx = X509_STORE_CTX_new();
|
||||
if (!store_ctx)
|
||||
return -1;
|
||||
|
||||
cert = sk_X509_shift(chain);
|
||||
X509_STORE_CTX_init(&store_ctx, store, cert, chain);
|
||||
X509_STORE_CTX_init(store_ctx, store, cert, chain);
|
||||
|
||||
ver = X509_verify_cert(&store_ctx);
|
||||
ver = X509_verify_cert(store_ctx);
|
||||
|
||||
X509_STORE_CTX_cleanup(&store_ctx);
|
||||
X509_STORE_CTX_free(store_ctx);
|
||||
|
||||
if (ver != 1)
|
||||
LSQ_WARN("could not verify server certificate");
|
||||
|
|
Loading…
Reference in a new issue