mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
boringssl: adapt to missing AES modes
This commit is contained in:
parent
23fde179f0
commit
761e7528eb
3 changed files with 28 additions and 0 deletions
|
@ -1830,6 +1830,13 @@ CHECK_FUNCTION_EXISTS(X509_get_key_usage LWS_HAVE_X509_get_key_usage)
|
|||
CHECK_FUNCTION_EXISTS(SSL_CTX_get0_certificate LWS_HAVE_SSL_CTX_get0_certificate)
|
||||
CHECK_FUNCTION_EXISTS(SSL_get0_alpn_selected LWS_HAVE_SSL_get0_alpn_selected)
|
||||
CHECK_FUNCTION_EXISTS(SSL_set_alpn_protos LWS_HAVE_SSL_set_alpn_protos)
|
||||
CHECK_FUNCTION_EXISTS(EVP_aes_128_cfb8 LWS_HAVE_EVP_aes_128_cfb8)
|
||||
CHECK_FUNCTION_EXISTS(EVP_aes_128_cfb128 LWS_HAVE_EVP_aes_128_cfb128)
|
||||
CHECK_FUNCTION_EXISTS(EVP_aes_192_cfb8 LWS_HAVE_EVP_aes_192_cfb8)
|
||||
CHECK_FUNCTION_EXISTS(EVP_aes_192_cfb128 LWS_HAVE_EVP_aes_192_cfb128)
|
||||
CHECK_FUNCTION_EXISTS(EVP_aes_256_cfb8 LWS_HAVE_EVP_aes_256_cfb8)
|
||||
CHECK_FUNCTION_EXISTS(EVP_aes_256_cfb128 LWS_HAVE_EVP_aes_256_cfb128)
|
||||
CHECK_FUNCTION_EXISTS(EVP_aes_128_xts LWS_HAVE_EVP_aes_128_xts)
|
||||
CHECK_FUNCTION_EXISTS(SSL_CTX_set_ciphersuites LWS_HAVE_SSL_CTX_set_ciphersuites)
|
||||
if (LWS_WITH_SSL AND NOT LWS_WITH_MBEDTLS)
|
||||
if (UNIX)
|
||||
|
|
|
@ -29,6 +29,13 @@
|
|||
#cmakedefine LWS_HAVE_ECDSA_SIG_set0
|
||||
#cmakedefine LWS_HAVE_EVP_MD_CTX_free
|
||||
#cmakedefine LWS_HAVE_EVP_aes_128_wrap
|
||||
#cmakedefine LWS_HAVE_EVP_aes_128_cfb8
|
||||
#cmakedefine LWS_HAVE_EVP_aes_128_cfb128
|
||||
#cmakedefine LWS_HAVE_EVP_aes_192_cfb8
|
||||
#cmakedefine LWS_HAVE_EVP_aes_192_cfb128
|
||||
#cmakedefine LWS_HAVE_EVP_aes_256_cfb8
|
||||
#cmakedefine LWS_HAVE_EVP_aes_256_cfb128
|
||||
#cmakedefine LWS_HAVE_EVP_aes_128_xts
|
||||
#cmakedefine LWS_HAVE_LIBCAP
|
||||
#cmakedefine LWS_HAVE_MALLOC_H
|
||||
#cmakedefine LWS_HAVE_MALLOC_TRIM
|
||||
|
|
|
@ -64,12 +64,16 @@ lws_genaes_create(struct lws_genaes_ctx *ctx, enum enum_aes_operation op,
|
|||
case LWS_GAESM_CBC:
|
||||
ctx->cipher = EVP_aes_128_cbc();
|
||||
break;
|
||||
#if defined(LWS_HAVE_EVP_aes_128_cfb128)
|
||||
case LWS_GAESM_CFB128:
|
||||
ctx->cipher = EVP_aes_128_cfb128();
|
||||
break;
|
||||
#endif
|
||||
#if defined(LWS_HAVE_EVP_aes_128_cfb8)
|
||||
case LWS_GAESM_CFB8:
|
||||
ctx->cipher = EVP_aes_128_cfb8();
|
||||
break;
|
||||
#endif
|
||||
case LWS_GAESM_CTR:
|
||||
ctx->cipher = EVP_aes_128_ctr();
|
||||
break;
|
||||
|
@ -107,12 +111,16 @@ lws_genaes_create(struct lws_genaes_ctx *ctx, enum enum_aes_operation op,
|
|||
case LWS_GAESM_CBC:
|
||||
ctx->cipher = EVP_aes_192_cbc();
|
||||
break;
|
||||
#if defined(LWS_HAVE_EVP_aes_192_cfb128)
|
||||
case LWS_GAESM_CFB128:
|
||||
ctx->cipher = EVP_aes_192_cfb128();
|
||||
break;
|
||||
#endif
|
||||
#if defined(LWS_HAVE_EVP_aes_192_cfb8)
|
||||
case LWS_GAESM_CFB8:
|
||||
ctx->cipher = EVP_aes_192_cfb8();
|
||||
break;
|
||||
#endif
|
||||
case LWS_GAESM_CTR:
|
||||
ctx->cipher = EVP_aes_192_ctr();
|
||||
break;
|
||||
|
@ -149,12 +157,16 @@ lws_genaes_create(struct lws_genaes_ctx *ctx, enum enum_aes_operation op,
|
|||
case LWS_GAESM_CBC:
|
||||
ctx->cipher = EVP_aes_256_cbc();
|
||||
break;
|
||||
#if defined(LWS_HAVE_EVP_aes_256_cfb128)
|
||||
case LWS_GAESM_CFB128:
|
||||
ctx->cipher = EVP_aes_256_cfb128();
|
||||
break;
|
||||
#endif
|
||||
#if defined(LWS_HAVE_EVP_aes_256_cfb8)
|
||||
case LWS_GAESM_CFB8:
|
||||
ctx->cipher = EVP_aes_256_cfb8();
|
||||
break;
|
||||
#endif
|
||||
case LWS_GAESM_CTR:
|
||||
ctx->cipher = EVP_aes_256_ctr();
|
||||
break;
|
||||
|
@ -164,9 +176,11 @@ lws_genaes_create(struct lws_genaes_ctx *ctx, enum enum_aes_operation op,
|
|||
case LWS_GAESM_OFB:
|
||||
ctx->cipher = EVP_aes_256_ofb();
|
||||
break;
|
||||
#if defined(LWS_HAVE_EVP_aes_128_xts)
|
||||
case LWS_GAESM_XTS:
|
||||
ctx->cipher = EVP_aes_128_xts();
|
||||
break;
|
||||
#endif
|
||||
case LWS_GAESM_GCM:
|
||||
ctx->cipher = EVP_aes_256_gcm();
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue