summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/p_seal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/p_seal.c')
-rw-r--r--src/lib/libcrypto/evp/p_seal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/evp/p_seal.c b/src/lib/libcrypto/evp/p_seal.c
index 4f8417ae64..8b9740fbcd 100644
--- a/src/lib/libcrypto/evp/p_seal.c
+++ b/src/lib/libcrypto/evp/p_seal.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_seal.c,v 1.13 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: p_seal.c,v 1.14 2014/10/22 13:02:04 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -57,12 +57,12 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h>
60 61
61#include <openssl/opensslconf.h> 62#include <openssl/opensslconf.h>
62 63
63#include <openssl/evp.h> 64#include <openssl/evp.h>
64#include <openssl/objects.h> 65#include <openssl/objects.h>
65#include <openssl/rand.h>
66#include <openssl/x509.h> 66#include <openssl/x509.h>
67 67
68#ifndef OPENSSL_NO_RSA 68#ifndef OPENSSL_NO_RSA
@@ -86,7 +86,7 @@ EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek,
86 if (EVP_CIPHER_CTX_rand_key(ctx, key) <= 0) 86 if (EVP_CIPHER_CTX_rand_key(ctx, key) <= 0)
87 return 0; 87 return 0;
88 if (EVP_CIPHER_CTX_iv_length(ctx)) 88 if (EVP_CIPHER_CTX_iv_length(ctx))
89 RAND_pseudo_bytes(iv, EVP_CIPHER_CTX_iv_length(ctx)); 89 arc4random_buf(iv, EVP_CIPHER_CTX_iv_length(ctx));
90 90
91 if (!EVP_EncryptInit_ex(ctx, NULL, NULL, key, iv)) 91 if (!EVP_EncryptInit_ex(ctx, NULL, NULL, key, iv))
92 return 0; 92 return 0;