Commit a8327a78 authored by Daniel Bevenius's avatar Daniel Bevenius
Browse files

test: add min/max iv lengths for OpenSSL3

This commit adds min and max IV lengths to the test
crypto-cipheriv-decipher-iv when OpenSSL 3.x is in use.

The motivation for this is that OpenSSL 3.x has a check in
providers/implementations/ciphers/ciphercommon_gcm:

  if (iv != NULL) {
    if (ivlen < ctx->ivlen_min || ivlen > sizeof(ctx->iv)) {
      ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
      return 0;
    }

And the ivlen_min is 8 and max is 64:
(lldb) expr ctx->ivlen_min
(size_t) $25 = 8

(lldb) expr sizeof(ctx->iv)
(unsigned long) $28 = 64
(size_t) $25 = 8
parent 3deb7ae7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment