RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

add error check of aes_encrypt()

Open Hxinrong opened this issue 4 years ago • 3 comments

Contribution description

sys/random/fortuna/fortuna.c:add error check of aes_encrypt() I'm not sure which exact value should be returned when aes_encrypt() is not on success. I just return the return value of it.

Issues/PRs references

Addresses parts of #15524

Hxinrong avatar Dec 08 '20 03:12 Hxinrong

ping @Hxinrong! :)

fjmolinas avatar Jan 20 '21 07:01 fjmolinas

@basilfx you put a change request on this PR. What did you want changed?

PeterKietzmann avatar Jun 28 '22 16:06 PeterKietzmann

@PeterKietzmann I think that it should not return res but return -3 (or another negative value) if aes_encrypt != 1.

The documentation states that aes_encrypt either returns 1 or a negative value. Returning res could be a problem if aes_encrypt would return something else (due to an API change, another implementation, etc).

basilfx avatar Jun 29 '22 08:06 basilfx

@basilfx could you give it another look?

Teufelchen1 avatar Jan 30 '24 14:01 Teufelchen1

Murdock results

:heavy_check_mark: PASSED

bf3c038fa97d83561f47c48732eb7bef45291570 sys/random/fortuna/fortuna.c:add error check of aes_encrypt()

Success Failures Total Runtime
8629 0 8629 11m:10s

Artifacts

riot-ci avatar Jan 30 '24 19:01 riot-ci