summaryrefslogtreecommitdiffstats
path: root/crypto/include/internal/evp_int.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-04-09 15:50:20 +0100
committerMatt Caswell <matt@openssl.org>2018-04-13 09:37:38 +0100
commit3fd59700357072c567785a1fb1430a55ef7bd45b (patch)
tree500ba38bfa6a14315b0832c8bb263e7cf31c4d85 /crypto/include/internal/evp_int.h
parentc080461448815dab809661080ee5e21417478fb4 (diff)
Add support for the SRP base64 alphabet
Historically we used to implement standalone base64 code for SRP. This was replaced by commit 3d3f21aa with the standard base64 processing code. However, the SRP base64 code was designed to be compatible with other SRP libraries (notably libsrp, but also others) that use a variant of standard base64. Specifically a different alphabet is used and no padding '=' characters are used. Instead 0 padding is added to the front of the string. By changing to standard base64 we change the behaviour of the API which may impact interoperability. It also means that SRP verifier files created prior to 1.1.1 would not be readable in 1.1.1 and vice versa. Instead we expand our standard base64 processing with the capability to be able to read and generate the SRP base64 variant. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5925)
Diffstat (limited to 'crypto/include/internal/evp_int.h')
-rw-r--r--crypto/include/internal/evp_int.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/include/internal/evp_int.h b/crypto/include/internal/evp_int.h
index a766a2c994..691b28b3b4 100644
--- a/crypto/include/internal/evp_int.h
+++ b/crypto/include/internal/evp_int.h
@@ -427,4 +427,7 @@ void evp_app_cleanup_int(void);
void evp_encode_ctx_set_flags(EVP_ENCODE_CTX *ctx, unsigned int flags);
/* EVP_ENCODE_CTX flags */
-#define EVP_ENCODE_CTX_NO_NEWLINES 1
+/* Don't generate new lines when encoding */
+#define EVP_ENCODE_CTX_NO_NEWLINES 1
+/* Use the SRP base64 alphabet instead of the standard one */
+#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2