Skip to content

Commit 6a7271b

Browse files
committed
Fix from review
1 parent 46662ba commit 6a7271b

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

src/x509.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11712,18 +11712,21 @@ WOLF_STACK_OF(WOLFSSL_X509_OBJECT)* wolfSSL_sk_X509_OBJECT_deep_copy(
1171211712
cert->basicConstSet = req->basicConstSet;
1171311713
#ifdef WOLFSSL_CERT_EXT
1171411714
if (req->subjKeyIdSz != 0) {
11715-
if (req->subjKeyIdSz <= CTC_MAX_SKID_SIZE) {
11716-
if (req->subjKeyId) {
11717-
XMEMCPY(cert->skid, req->subjKeyId,
11718-
req->subjKeyIdSz);
11719-
}
11720-
cert->skidSz = (int)req->subjKeyIdSz;
11721-
}
11722-
else {
11715+
if (req->subjKeyIdSz > CTC_MAX_SKID_SIZE) {
1172311716
WOLFSSL_MSG("Subject Key ID too large");
1172411717
WOLFSSL_ERROR_VERBOSE(BUFFER_E);
1172511718
ret = WOLFSSL_FAILURE;
1172611719
}
11720+
else if (req->subjKeyId == NULL) {
11721+
WOLFSSL_MSG("Subject Key ID missing");
11722+
WOLFSSL_ERROR_VERBOSE(BAD_FUNC_ARG);
11723+
ret = WOLFSSL_FAILURE;
11724+
}
11725+
else {
11726+
XMEMCPY(cert->skid, req->subjKeyId,
11727+
req->subjKeyIdSz);
11728+
cert->skidSz = (int)req->subjKeyIdSz;
11729+
}
1172711730
}
1172811731
if (req->keyUsageSet)
1172911732
cert->keyUsage = req->keyUsage;

wolfssl/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
extern "C" {
2929
#endif
3030

31-
#define LIBWOLFSSL_VERSION_STRING "5.9.0"
32-
#define LIBWOLFSSL_VERSION_HEX 0x05009000
31+
#define LIBWOLFSSL_VERSION_STRING "5.9.1"
32+
#define LIBWOLFSSL_VERSION_HEX 0x05009001
3333

3434
#ifdef __cplusplus
3535
}

0 commit comments

Comments
 (0)