Allow oversized buffers for provider cipher IV fetch
[oweals/openssl.git] / providers / implementations / ciphers / cipher_aes_ocb.c
index 681eb9ee707d52c84b6ae829c063a2e7131eb1cd..84ba062d6b7e3cd110c2ab84e579162328b6807a 100644 (file)
@@ -401,7 +401,7 @@ static int aes_ocb_get_ctx_params(void *vctx, OSSL_PARAM params[])
 
     p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_IV);
     if (p != NULL) {
-        if (ctx->base.ivlen != p->data_size) {
+        if (ctx->base.ivlen > p->data_size) {
             ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
             return 0;
         }