summaryrefslogtreecommitdiffstats
path: root/crypto/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-04-09 15:06:50 +0100
committerMatt Caswell <matt@openssl.org>2018-04-13 09:37:38 +0100
commitc080461448815dab809661080ee5e21417478fb4 (patch)
tree8fb56ec9f510ecbf1581e53ae9fe0d4b5310936a /crypto/include
parent0320e8e2869fb6cde4579375e65f6d576bbec95e (diff)
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 <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5925)
Diffstat (limited to 'crypto/include')
-rw-r--r--crypto/include/internal/evp_int.h6
1 files changed, 6 insertions, 0 deletions
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 <openssl/evp.h>
#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