Skip to content

Commit 31a06d3

Browse files
committed
Fix from review
1 parent 9dfa93f commit 31a06d3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/internal.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7205,13 +7205,15 @@ static int DoUserAuthRequestRsaCert(WOLFSSH* ssh, WS_UserAuthData_PublicKey* pk,
72057205

72067206
if (ret == WS_SUCCESS) {
72077207
int sigTypeOk = 0;
7208-
if (publicKeyTypeSz == pk->publicKeyTypeSz
7208+
if (publicKeyType != NULL
7209+
&& publicKeyTypeSz == pk->publicKeyTypeSz
72097210
&& WMEMCMP(publicKeyType, pk->publicKeyType,
72107211
publicKeyTypeSz) == 0) {
72117212
sigTypeOk = 1;
72127213
}
72137214
#ifdef WOLFSSH_CERTS
7214-
else if (pk->publicKeyTypeSz == 14
7215+
else if (publicKeyType != NULL
7216+
&& pk->publicKeyTypeSz == 14
72157217
&& WMEMCMP(pk->publicKeyType,
72167218
"x509v3-ssh-rsa", 14) == 0) {
72177219
/* RFC 6187 Section 5: the signature uses the underlying

0 commit comments

Comments
 (0)