Skip to content

Commit f929c5e

Browse files
ejohnstownJacobBarthelmeh
authored andcommitted
Added RSA cert support
1 parent 269c7f5 commit f929c5e

4 files changed

Lines changed: 407 additions & 20 deletions

File tree

examples/client/client.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,14 @@ static byte isPrivate = 0;
199199

200200

201201
#ifdef WOLFSSH_CERTS
202+
#if 0
203+
static const byte publicKeyType[] = "x509v3-ssh-rsa";
204+
static const byte privateKeyType[] = "ssh-rsa";
205+
#else
202206
static const byte publicKeyType[] = "x509v3-ecdsa-sha2-nistp256";
203207
static const byte privateKeyType[] = "ecdsa-sha2-nistp256";
204208
#endif
209+
#endif
205210

206211
#ifndef WOLFSSH_NO_RSA
207212
static const char* hanselPublicRsa =

src/certman.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,12 @@ static int CheckProfile(DecodedCert* cert, int profile)
313313
valid = !cert->isCA;
314314
}
315315

316+
if (valid) {
317+
valid =
318+
WMEMCMP(cert->extAuthKeyId, cert->extSubjKeyId, KEYID_SIZE) != 0;
319+
320+
}
321+
316322
if (valid) {
317323
valid =
318324
((certPolicies[1] != NULL) &&

0 commit comments

Comments
 (0)