From c080461448815dab809661080ee5e21417478fb4 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 9 Apr 2018 15:06:50 +0100 Subject: Change SRP functions to use EVP_EncodeUpdate/EVP_DecodeUpdate functions Previously they were using EVP_EncodeBlock/EVP_DecodeBlock. These are low level functions that do not handle padding characters. This was causing the SRP code to fail. One side effect of using EVP_EncodeUpdate is that it inserts newlines which is not what we need in SRP so we add a flag to avoid that. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5925) --- crypto/include/internal/evp_int.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crypto/include') diff --git a/crypto/include/internal/evp_int.h b/crypto/include/internal/evp_int.h index 77c8731355..a766a2c994 100644 --- a/crypto/include/internal/evp_int.h +++ b/crypto/include/internal/evp_int.h @@ -7,6 +7,7 @@ * https://www.openssl.org/source/license.html */ +#include #include "internal/refcount.h" struct evp_pkey_ctx_st { @@ -422,3 +423,8 @@ void evp_app_cleanup_int(void); #ifndef TLS1_1_VERSION # define TLS1_1_VERSION 0x0302 #endif + +void evp_encode_ctx_set_flags(EVP_ENCODE_CTX *ctx, unsigned int flags); + +/* EVP_ENCODE_CTX flags */ +#define EVP_ENCODE_CTX_NO_NEWLINES 1 -- cgit v1.2.3