• Manuel Pégourié-Gonnard's avatar
    Remove faulty cipher_finish calls from nist_kw · 01d4b76b
    Manuel Pégourié-Gonnard authored
    The calls to cipher_finish didn't actually do anything:
    - the cipher mode is always ECB
    - in that case cipher_finish() only sets *olen to zero, and returns either 0
      or an error depending on whether there was pending data
    - olen is a local variable in the caller, so setting it to zero right before
      returning is not essential
    - the return value of cipher_finis() was not checked by the caller so that's
      not useful either
    - the cipher layer does not have ALT implementations so the behaviour
      described above is unconditional on ALT implementations (in particular,
    cipher_finish() can't be useful to hardware as (with ECB) it doesn't call any
    functions from lower-level modules that could release resources for example)
    Since the calls are causing issues with parameter validation, and were no
    serving any functional purpose, it's simpler to just remove them.