Previously this would error out with a M_FATAL message about cipher
not known. Align the mbed TLS version to OpenSSL version and also remove
unreachable code. This manifested in key_print2() running into this
M_FATAL message when used with an AEAD cipher and verb 7.
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20221109115208.1248948-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25494.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
| ... | ... |
@@ -809,11 +809,11 @@ md_kt_name(const char *mdname) |
| 809 | 809 |
unsigned char |
| 810 | 810 |
md_kt_size(const char *mdname) |
| 811 | 811 |
{
|
| 812 |
- const mbedtls_md_info_t *kt = md_get(mdname); |
|
| 813 |
- if (NULL == kt) |
|
| 812 |
+ if (!strcmp("none", mdname))
|
|
| 814 | 813 |
{
|
| 815 | 814 |
return 0; |
| 816 | 815 |
} |
| 816 |
+ const mbedtls_md_info_t *kt = md_get(mdname); |
|
| 817 | 817 |
return mbedtls_md_get_size(kt); |
| 818 | 818 |
} |
| 819 | 819 |
|