diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-08-20 18:41:40 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-08-20 18:41:40 +0000 |
commit | f2aa13c1ede47b2e6fdbd61e6cbbde4be9b4ae56 (patch) | |
tree | 04fb6e6d7107067144d7f0be57e6615f39472f2d /lib/libcrypto/man | |
parent | 63064e343cd8537cc890f75c50f92be0381e1f1e (diff) |
sync with OpenSSL:
1. mention three additional functions for stitched ciphers
from Steven Collison <steven at raycoll dot com>
via OpenSSL commit 209fac9f Mar 28 12:46:07 2017 -0700
2. fix wrong data type of an automatic variable in an example
from Paul Yang <paulyang dot inf at gmail dot com>
via OpenSSL commit 719b289d May 22 23:18:45 2017 +0800
3. fix memory leak in sample encryption code and check return value of fopen
from Greg Zaverucha <gregz at microsoft dot com>
via OpenSSL commit 519a5d1e Jun 27 17:38:25 2017 -0700
Diffstat (limited to 'lib/libcrypto/man')
-rw-r--r-- | lib/libcrypto/man/EVP_EncryptInit.3 | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/libcrypto/man/EVP_EncryptInit.3 b/lib/libcrypto/man/EVP_EncryptInit.3 index c328edf4f6d..478e80839ee 100644 --- a/lib/libcrypto/man/EVP_EncryptInit.3 +++ b/lib/libcrypto/man/EVP_EncryptInit.3 @@ -1,5 +1,6 @@ -.\" $OpenBSD: EVP_EncryptInit.3,v 1.5 2016/12/25 22:15:10 schwarze Exp $ -.\" OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800 +.\" $OpenBSD: EVP_EncryptInit.3,v 1.6 2017/08/20 18:41:39 schwarze Exp $ +.\" OpenSSL EVP_EncryptInit.pod 519a5d1e Jun 27 17:38:25 2017 -0700 +.\" OpenSSL EVP_EncryptInit.pod 5211e094 Nov 11 14:39:11 2014 -0800 .\" .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. .\" Copyright (c) 2000-2002, 2005, 2012-2016 The OpenSSL Project. @@ -49,7 +50,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: December 25 2016 $ +.Dd $Mdocdate: August 20 2017 $ .Dt EVP_ENCRYPTINIT 3 .Os .Sh NAME @@ -113,6 +114,7 @@ .Nm EVP_desx_cbc , .Nm EVP_rc4 , .Nm EVP_rc4_40 , +.Nm EVP_rc4_hmac_md5 , .Nm EVP_idea_cbc , .Nm EVP_idea_ecb , .Nm EVP_idea_cfb , @@ -149,6 +151,8 @@ .Nm EVP_aes_128_ccm , .Nm EVP_aes_192_ccm , .Nm EVP_aes_256_ccm , +.Nm EVP_aes_128_cbc_hmac_sha1 , +.Nm EVP_aes_256_cbc_hmac_sha1 , .Nm EVP_rc5_32_12_16_cbc , .Nm EVP_rc5_32_12_16_cfb , .Nm EVP_rc5_32_12_16_ecb , @@ -1074,7 +1078,7 @@ do_crypt(char *outfile) unsigned char key[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; unsigned char iv[] = {1,2,3,4,5,6,7,8}; const char intext[] = "Some Crypto Text"; - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx; FILE *out; EVP_CIPHER_CTX_init(&ctx); EVP_EncryptInit_ex(&ctx, EVP_bf_cbc(), NULL, key, iv); @@ -1082,6 +1086,7 @@ do_crypt(char *outfile) if (!EVP_EncryptUpdate(&ctx, outbuf, &outlen, intext, strlen(intext))) { /* Error */ + EVP_CIPHER_CTX_free(ctx); return 0; } /* @@ -1090,6 +1095,7 @@ do_crypt(char *outfile) */ if (!EVP_EncryptFinal_ex(&ctx, outbuf + outlen, &tmplen)) { /* Error */ + EVP_CIPHER_CTX_free(ctx); return 0; } outlen += tmplen; @@ -1101,6 +1107,10 @@ do_crypt(char *outfile) * NULs. */ out = fopen(outfile, "wb"); + if (out == NULL) { + /* Error */ + return 0; + } fwrite(outbuf, 1, outlen, out); fclose(out); return 1; |