add --enable-certreq to --enable-jni, support extKeyUsage in X509_REQ_sign, add missing X509_REQ_print fields

This commit is contained in:
Chris Conlon
2023-09-01 11:59:21 -06:00
parent efd08eadb8
commit a2e2a3e994
2 changed files with 19 additions and 1 deletions

View File

@ -5984,6 +5984,11 @@ then
ENABLED_CERTGEN="yes" ENABLED_CERTGEN="yes"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN" AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
fi 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" if test "x$ENABLED_SNI" = "xno"
then then
ENABLED_SNI="yes" ENABLED_SNI="yes"

View File

@ -9691,7 +9691,8 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref(
} }
if (req->keyUsageSet) if (req->keyUsageSet)
cert->keyUsage = req->keyUsage; cert->keyUsage = req->keyUsage;
/* Extended Key Usage not supported. */
cert->extKeyUsage = req->extKeyUsage;
#endif #endif
XMEMCPY(cert->challengePw, req->challengePw, CTC_NAME_SIZE); XMEMCPY(cert->challengePw, req->challengePw, CTC_NAME_SIZE);
@ -12611,6 +12612,10 @@ static int get_dn_attr_by_nid(int n, const char** buf)
str = "ST"; str = "ST";
len = 2; len = 2;
break; break;
case NID_streetAddress:
str = "street";
len = 6;
break;
case NID_organizationName: case NID_organizationName:
str = "O"; str = "O";
len = 1; len = 1;
@ -12619,6 +12624,10 @@ static int get_dn_attr_by_nid(int n, const char** buf)
str = "OU"; str = "OU";
len = 2; len = 2;
break; break;
case NID_postalCode:
str = "postalCode";
len = 10;
break;
case NID_emailAddress: case NID_emailAddress:
str = "emailAddress"; str = "emailAddress";
len = 12; len = 12;
@ -12651,6 +12660,10 @@ static int get_dn_attr_by_nid(int n, const char** buf)
str = "contentType"; str = "contentType";
len = 11; len = 11;
break; break;
case NID_userId:
str = "UID";
len = 3;
break;
default: default:
WOLFSSL_MSG("Attribute type not found"); WOLFSSL_MSG("Attribute type not found");
str = NULL; str = NULL;