Skip to content

Commit ee63d73

Browse files
author
Lealem Amedie
committed
Restore nid2oid functionality to preserve expected behaviour
1 parent 1d83448 commit ee63d73

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/ssl.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33957,7 +33957,6 @@ int wolfSSL_set_alpn_protos(WOLFSSL* ssl,
3395733957

3395833958
word32 nid2oid(int nid, int grp)
3395933959
{
33960-
size_t i;
3396133960
/* get OID type */
3396233961
switch (grp) {
3396333962
/* oidHashType */
@@ -34335,13 +34334,8 @@ word32 nid2oid(int nid, int grp)
3433534334

3433634335
default:
3433734336
WOLFSSL_MSG("NID not in table");
34338-
}
34339-
34340-
/* If not found in above switch then try the table */
34341-
for (i = 0; i < WOLFSSL_OBJECT_INFO_SZ; i++) {
34342-
if (wolfssl_object_info[i].nid == nid) {
34343-
return wolfssl_object_info[i].id;
34344-
}
34337+
/* MSVC warns without the cast */
34338+
return (word32)-1;
3434534339
}
3434634340

3434734341
/* MSVC warns without the cast */

0 commit comments

Comments
 (0)