forked from wolfSSL/wolfssl
XSTRNCPY, fixed typos
This commit is contained in:
17
tests/api.c
17
tests/api.c
@@ -47073,8 +47073,7 @@ static void test_wc_ParseCert(void)
|
|||||||
|
|
||||||
static void test_MakeCertWithPathLen(void)
|
static void test_MakeCertWithPathLen(void)
|
||||||
{
|
{
|
||||||
#if defined(WOLFSSL_CERT_REQ) && defined(WOLFSSL_CERT_GEN) && \
|
#if defined(WOLFSSL_CERT_REQ) && defined(WOLFSSL_CERT_GEN) && defined(HAVE_ECC)
|
||||||
defined(WOLFSSL_KEY_GEN) && defined(HAVE_ECC)
|
|
||||||
const byte expectedPathLen = 7;
|
const byte expectedPathLen = 7;
|
||||||
Cert cert;
|
Cert cert;
|
||||||
DecodedCert decodedCert;
|
DecodedCert decodedCert;
|
||||||
@@ -47090,13 +47089,13 @@ static void test_MakeCertWithPathLen(void)
|
|||||||
AssertIntEQ(wc_ecc_make_key(&rng, 32, &key), 0);
|
AssertIntEQ(wc_ecc_make_key(&rng, 32, &key), 0);
|
||||||
AssertIntEQ(wc_InitCert(&cert), 0);
|
AssertIntEQ(wc_InitCert(&cert), 0);
|
||||||
|
|
||||||
(void)strncpy(cert.subject.country, "US", CTC_NAME_SIZE);
|
(void)XSTRNCPY(cert.subject.country, "US", CTC_NAME_SIZE);
|
||||||
(void)strncpy(cert.subject.state, "state", CTC_NAME_SIZE);
|
(void)XSTRNCPY(cert.subject.state, "state", CTC_NAME_SIZE);
|
||||||
(void)strncpy(cert.subject.locality, "Bozeman", CTC_NAME_SIZE);
|
(void)XSTRNCPY(cert.subject.locality, "Bozeman", CTC_NAME_SIZE);
|
||||||
(void)strncpy(cert.subject.org, "yourOrgNameHere", CTC_NAME_SIZE);
|
(void)XSTRNCPY(cert.subject.org, "yourOrgNameHere", CTC_NAME_SIZE);
|
||||||
(void)strncpy(cert.subject.unit, "yourUnitNameHere", CTC_NAME_SIZE);
|
(void)XSTRNCPY(cert.subject.unit, "yourUnitNameHere", CTC_NAME_SIZE);
|
||||||
(void)strncpy(cert.subject.commonName, "www.yourDomain.com", CTC_NAME_SIZE);
|
(void)XSTRNCPY(cert.subject.commonName, "www.yourDomain.com", CTC_NAME_SIZE);
|
||||||
(void)strncpy(cert.subject.email, "yourEmail@yourDomain.com", CTC_NAME_SIZE);
|
(void)XSTRNCPY(cert.subject.email, "yourEmail@yourDomain.com", CTC_NAME_SIZE);
|
||||||
|
|
||||||
cert.selfSigned = 1;
|
cert.selfSigned = 1;
|
||||||
cert.isCA = 1;
|
cert.isCA = 1;
|
||||||
|
@@ -24946,7 +24946,7 @@ static int EncodeCert(Cert* cert, DerCert* der, RsaKey* rsaKey, ecc_key* eccKey,
|
|||||||
der->extensionsSz = 0;
|
der->extensionsSz = 0;
|
||||||
|
|
||||||
/* RFC 5280 : 4.2.1.9. Basic Constraints
|
/* RFC 5280 : 4.2.1.9. Basic Constraints
|
||||||
* The pathLenConstraint field is meaningful only if the cA boolean is
|
* The pathLenConstraint field is meaningful only if the CA boolean is
|
||||||
* asserted and the key usage extension, if present, asserts the
|
* asserted and the key usage extension, if present, asserts the
|
||||||
* keyCertSign bit */
|
* keyCertSign bit */
|
||||||
/* Set CA and path length */
|
/* Set CA and path length */
|
||||||
@@ -26133,7 +26133,7 @@ static int EncodeCertReq(Cert* cert, DerCert* der, RsaKey* rsaKey,
|
|||||||
der->extensionsSz = 0;
|
der->extensionsSz = 0;
|
||||||
|
|
||||||
/* RFC 5280 : 4.2.1.9. Basic Constraints
|
/* RFC 5280 : 4.2.1.9. Basic Constraints
|
||||||
* The pathLenConstraint field is meaningful only if the cA boolean is
|
* The pathLenConstraint field is meaningful only if the CA boolean is
|
||||||
* asserted and the key usage extension, if present, asserts the
|
* asserted and the key usage extension, if present, asserts the
|
||||||
* keyCertSign bit */
|
* keyCertSign bit */
|
||||||
/* Set CA and path length */
|
/* Set CA and path length */
|
||||||
|
Reference in New Issue
Block a user