diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2019-01-19 01:24:19 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2019-01-19 01:24:19 +0000 |
commit | dbdf50b7788d48d424eaf2591c1b23216c4f53df (patch) | |
tree | 9ca7f92a68cf289def583ebd589efcd562688595 /lib | |
parent | 2e14386c2f6c89bc3da13a2b49226f7d226b2a2f (diff) |
provide EVP_ENCODE_CTX_{new,free}().
ok jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/Symbols.list | 2 | ||||
-rw-r--r-- | lib/libcrypto/evp/encode.c | 14 | ||||
-rw-r--r-- | lib/libcrypto/evp/evp.h | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index 98518fcf725..4836a3ff9f0 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -1328,6 +1328,8 @@ EVP_DigestSignInit EVP_DigestUpdate EVP_DigestVerifyFinal EVP_DigestVerifyInit +EVP_ENCODE_CTX_free +EVP_ENCODE_CTX_new EVP_EncodeBlock EVP_EncodeFinal EVP_EncodeInit diff --git a/lib/libcrypto/evp/encode.c b/lib/libcrypto/evp/encode.c index 07cfd7f2bc4..ae107abb875 100644 --- a/lib/libcrypto/evp/encode.c +++ b/lib/libcrypto/evp/encode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: encode.c,v 1.25 2018/08/24 19:45:11 tb Exp $ */ +/* $OpenBSD: encode.c,v 1.26 2019/01/19 01:24:18 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -112,6 +112,18 @@ static const unsigned char data_ascii2bin[128] = { 0x31, 0x32, 0x33, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; +EVP_ENCODE_CTX * +EVP_ENCODE_CTX_new(void) +{ + return calloc(1, sizeof(EVP_ENCODE_CTX)); +} + +void +EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx) +{ + free(ctx); +} + void EVP_EncodeInit(EVP_ENCODE_CTX *ctx) { diff --git a/lib/libcrypto/evp/evp.h b/lib/libcrypto/evp/evp.h index 04e04556235..35f2b3281b1 100644 --- a/lib/libcrypto/evp/evp.h +++ b/lib/libcrypto/evp/evp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: evp.h,v 1.70 2018/11/11 06:53:31 tb Exp $ */ +/* $OpenBSD: evp.h,v 1.71 2019/01/19 01:24:18 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -634,6 +634,8 @@ int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, int npubk); int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); +EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void); +void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx); void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl); |