View | Details | Raw Unified | Return to bug 3238 | Differences between
and this patch

Collapse All | Expand All

(-)a/cipher.c (-1 / +1 lines)
Lines 498-504 cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, size_t len) Link Here
498
		if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN,
498
		if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN,
499
		   len, iv))
499
		   len, iv))
500
		       return SSH_ERR_LIBCRYPTO_ERROR;
500
		       return SSH_ERR_LIBCRYPTO_ERROR;
501
	} else if (!EVP_CIPHER_CTX_get_iv(cc->evp, iv, len))
501
	} else if (!EVP_CIPHER_CTX_get_iv_state(cc->evp, iv, len))
502
	       return SSH_ERR_LIBCRYPTO_ERROR;
502
	       return SSH_ERR_LIBCRYPTO_ERROR;
503
#endif
503
#endif
504
	return 0;
504
	return 0;
(-)a/configure.ac (+5 lines)
Lines 2875-2880 if test "x$openssl" = "xyes" ; then Link Here
2875
		EVP_chacha20 \
2875
		EVP_chacha20 \
2876
	])
2876
	])
2877
2877
2878
	# LibreSSL/OpenSSL 3.x API
2879
	AC_CHECK_FUNCS([ \
2880
		EVP_CIPHER_CTX_get_iv_state \
2881
	])
2882
2878
	if test "x$openssl_engine" = "xyes" ; then
2883
	if test "x$openssl_engine" = "xyes" ; then
2879
		AC_MSG_CHECKING([for OpenSSL ENGINE support])
2884
		AC_MSG_CHECKING([for OpenSSL ENGINE support])
2880
		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2885
		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
(-)a/openbsd-compat/libressl-api-compat.c (+8 lines)
Lines 363-368 EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len) Link Here
363
}
363
}
364
#endif /* HAVE_EVP_CIPHER_CTX_GET_IV */
364
#endif /* HAVE_EVP_CIPHER_CTX_GET_IV */
365
365
366
#ifndef HAVE_EVP_CIPHER_CTX_GET_IV_STATE
367
int
368
EVP_CIPHER_CTX_get_iv_state(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len)
369
{
370
	return EVP_CIPHER_CTX_get_iv(ctx, iv, len);
371
}
372
#endif /* HAVE_EVP_CIPHER_CTX_GET_IV_STATE */
373
366
#ifndef HAVE_EVP_CIPHER_CTX_SET_IV
374
#ifndef HAVE_EVP_CIPHER_CTX_SET_IV
367
int
375
int
368
EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len)
376
EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len)
(-)a/openbsd-compat/openssl-compat.h (-1 / +5 lines)
Lines 117-122 int EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, Link Here
117
    unsigned char *iv, size_t len);
117
    unsigned char *iv, size_t len);
118
#endif /* HAVE_EVP_CIPHER_CTX_GET_IV */
118
#endif /* HAVE_EVP_CIPHER_CTX_GET_IV */
119
119
120
#ifndef HAVE_EVP_CIPHER_CTX_GET_IV_STATE
121
int EVP_CIPHER_CTX_get_iv_state(const EVP_CIPHER_CTX *ctx,
122
    unsigned char *iv, size_t len);
123
#endif /* HAVE_EVP_CIPHER_CTX_GET_IV_STATE */
124
120
#ifndef HAVE_EVP_CIPHER_CTX_SET_IV
125
#ifndef HAVE_EVP_CIPHER_CTX_SET_IV
121
int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx,
126
int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx,
122
    const unsigned char *iv, size_t len);
127
    const unsigned char *iv, size_t len);
123
- 

Return to bug 3238