Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/external/bsd/wpa/dist/src/crypto



Module Name:    src
Committed By:   christos
Date:           Thu Aug  8 09:55:32 UTC 2019

Modified Files:
        src/external/bsd/wpa/dist/src/crypto: crypto_openssl.c

Log Message:
OpenSSL: Use BN_bn2binpad() or BN_bn2bin_padded() if available

This converts crypto_bignum_to_bin() to use the OpenSSL/BoringSSL
functions BN_bn2binpad()/BN_bn2bin_padded(), when available, to avoid
differences in runtime and memory access patterns depending on the
leading bytes of the BIGNUM value.

OpenSSL 1.0.2 and LibreSSL do not include such functions, so those cases
are still using the previous implementation where the BN_num_bytes()
call may result in different memory access pattern.

Signed-off-by: Jouni Malinen <jouni%codeaurora.org@localhost>
(cherry picked from commit 1e237903f5b5d3117342daf006c5878cdb45e3d3)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
    src/external/bsd/wpa/dist/src/crypto/crypto_openssl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index