diff options
Diffstat (limited to 'crypto/openssl/demos/maurice/example3.c')
-rw-r--r-- | crypto/openssl/demos/maurice/example3.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/openssl/demos/maurice/example3.c b/crypto/openssl/demos/maurice/example3.c index c8462a4..03d8a20 100644 --- a/crypto/openssl/demos/maurice/example3.c +++ b/crypto/openssl/demos/maurice/example3.c @@ -57,7 +57,8 @@ void do_cipher(char *pw, int operation) EVP_BytesToKey(ALG, EVP_md5(), "salu", pw, strlen(pw), 1, key, iv); - EVP_CipherInit(&ectx, ALG, key, iv, operation); + EVP_CIPHER_CTX_init(&ectx); + EVP_CipherInit_ex(&ectx, ALG, NULL, key, iv, operation); while(1) { @@ -79,7 +80,8 @@ void do_cipher(char *pw, int operation) write(STDOUT, ebuf, ebuflen); } - EVP_CipherFinal(&ectx, ebuf, &ebuflen); + EVP_CipherFinal_ex(&ectx, ebuf, &ebuflen); + EVP_CIPHER_CTX_cleanup(&ectx); write(STDOUT, ebuf, ebuflen); } |