Skip to content

Commit a2e2a3e

Browse files
committed
add --enable-certreq to --enable-jni, support extKeyUsage in X509_REQ_sign, add missing X509_REQ_print fields
1 parent efd08ea commit a2e2a3e

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5984,6 +5984,11 @@ then
59845984
ENABLED_CERTGEN="yes"
59855985
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
59865986
fi
5987+
if test "x$ENABLED_CERTREQ" = "xno"
5988+
then
5989+
ENABLED_CERTREQ="yes"
5990+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_REQ"
5991+
fi
59875992
if test "x$ENABLED_SNI" = "xno"
59885993
then
59895994
ENABLED_SNI="yes"

src/x509.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9691,7 +9691,8 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref(
96919691
}
96929692
if (req->keyUsageSet)
96939693
cert->keyUsage = req->keyUsage;
9694-
/* Extended Key Usage not supported. */
9694+
9695+
cert->extKeyUsage = req->extKeyUsage;
96959696
#endif
96969697

96979698
XMEMCPY(cert->challengePw, req->challengePw, CTC_NAME_SIZE);
@@ -12611,6 +12612,10 @@ static int get_dn_attr_by_nid(int n, const char** buf)
1261112612
str = "ST";
1261212613
len = 2;
1261312614
break;
12615+
case NID_streetAddress:
12616+
str = "street";
12617+
len = 6;
12618+
break;
1261412619
case NID_organizationName:
1261512620
str = "O";
1261612621
len = 1;
@@ -12619,6 +12624,10 @@ static int get_dn_attr_by_nid(int n, const char** buf)
1261912624
str = "OU";
1262012625
len = 2;
1262112626
break;
12627+
case NID_postalCode:
12628+
str = "postalCode";
12629+
len = 10;
12630+
break;
1262212631
case NID_emailAddress:
1262312632
str = "emailAddress";
1262412633
len = 12;
@@ -12651,6 +12660,10 @@ static int get_dn_attr_by_nid(int n, const char** buf)
1265112660
str = "contentType";
1265212661
len = 11;
1265312662
break;
12663+
case NID_userId:
12664+
str = "UID";
12665+
len = 3;
12666+
break;
1265412667
default:
1265512668
WOLFSSL_MSG("Attribute type not found");
1265612669
str = NULL;

0 commit comments

Comments
 (0)