summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/evp_lib.c')
-rw-r--r--src/lib/libcrypto/evp/evp_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/libcrypto/evp/evp_lib.c b/src/lib/libcrypto/evp/evp_lib.c
index a431945ef5..52a3b287be 100644
--- a/src/lib/libcrypto/evp/evp_lib.c
+++ b/src/lib/libcrypto/evp/evp_lib.c
@@ -90,6 +90,7 @@ int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
90 if (type != NULL) 90 if (type != NULL)
91 { 91 {
92 l=EVP_CIPHER_CTX_iv_length(c); 92 l=EVP_CIPHER_CTX_iv_length(c);
93 OPENSSL_assert(l <= sizeof c->iv);
93 i=ASN1_TYPE_get_octetstring(type,c->oiv,l); 94 i=ASN1_TYPE_get_octetstring(type,c->oiv,l);
94 if (i != l) 95 if (i != l)
95 return(-1); 96 return(-1);
@@ -106,6 +107,7 @@ int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
106 if (type != NULL) 107 if (type != NULL)
107 { 108 {
108 j=EVP_CIPHER_CTX_iv_length(c); 109 j=EVP_CIPHER_CTX_iv_length(c);
110 OPENSSL_assert(j <= sizeof c->iv);
109 i=ASN1_TYPE_set_octetstring(type,c->oiv,j); 111 i=ASN1_TYPE_set_octetstring(type,c->oiv,j);
110 } 112 }
111 return(i); 113 return(i);