Skip to content

Commit

Permalink
Merge pull request wolfSSL#6749 from cconlon/jniCertReq
Browse files Browse the repository at this point in the history
Add WOLFSSL_CERT_EXT to --enable-jni, minor CSR items
  • Loading branch information
JacobBarthelmeh authored Sep 1, 2023
2 parents 0352b38 + a2e2a3e commit 298b488
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5991,6 +5991,11 @@ then
ENABLED_CERTGEN="yes"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
fi
if test "x$ENABLED_CERTREQ" = "xno"
then
ENABLED_CERTREQ="yes"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_REQ"
fi
if test "x$ENABLED_SNI" = "xno"
then
ENABLED_SNI="yes"
Expand Down
15 changes: 14 additions & 1 deletion src/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -9691,7 +9691,8 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref(
}
if (req->keyUsageSet)
cert->keyUsage = req->keyUsage;
/* Extended Key Usage not supported. */

cert->extKeyUsage = req->extKeyUsage;
#endif

XMEMCPY(cert->challengePw, req->challengePw, CTC_NAME_SIZE);
Expand Down Expand Up @@ -12611,6 +12612,10 @@ static int get_dn_attr_by_nid(int n, const char** buf)
str = "ST";
len = 2;
break;
case NID_streetAddress:
str = "street";
len = 6;
break;
case NID_organizationName:
str = "O";
len = 1;
Expand All @@ -12619,6 +12624,10 @@ static int get_dn_attr_by_nid(int n, const char** buf)
str = "OU";
len = 2;
break;
case NID_postalCode:
str = "postalCode";
len = 10;
break;
case NID_emailAddress:
str = "emailAddress";
len = 12;
Expand Down Expand Up @@ -12651,6 +12660,10 @@ static int get_dn_attr_by_nid(int n, const char** buf)
str = "contentType";
len = 11;
break;
case NID_userId:
str = "UID";
len = 3;
break;
default:
WOLFSSL_MSG("Attribute type not found");
str = NULL;
Expand Down

0 comments on commit 298b488

Please sign in to comment.