mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
unsigned pathlen
This commit is contained in:
@ -22751,10 +22751,10 @@ static int SetExtensionsHeader(byte* out, word32 outSz, int extSz)
|
||||
|
||||
/* encode CA basic constraints true with path length
|
||||
* return total bytes written */
|
||||
static int SetCaWithPathLen(byte* out, word32 outSz, char pathLen)
|
||||
static int SetCaWithPathLen(byte* out, word32 outSz, byte pathLen)
|
||||
{
|
||||
/* ASN1->DER sequence for Basic Constraints True and path length */
|
||||
byte caPathLenBasicConstASN1[] = {
|
||||
const byte caPathLenBasicConstASN1[] = {
|
||||
0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04,
|
||||
0x08, 0x30, 0x06, 0x01, 0x01, 0xFF, 0x02, 0x01,
|
||||
0x00
|
||||
@ -22766,10 +22766,10 @@ static int SetCaWithPathLen(byte* out, word32 outSz, char pathLen)
|
||||
if (outSz < sizeof(caPathLenBasicConstASN1))
|
||||
return BUFFER_E;
|
||||
|
||||
caPathLenBasicConstASN1[16U] = pathLen;
|
||||
|
||||
XMEMCPY(out, caPathLenBasicConstASN1, sizeof(caPathLenBasicConstASN1));
|
||||
|
||||
out[sizeof(caPathLenBasicConstASN1)-1] = pathLen;
|
||||
|
||||
return (int)sizeof(caPathLenBasicConstASN1);
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,7 @@ typedef struct Cert {
|
||||
int selfSigned; /* self signed flag */
|
||||
CertName subject; /* subject info */
|
||||
int isCA; /* is this going to be a CA */
|
||||
char pathLen; /* max depth of valid certification
|
||||
byte pathLen; /* max depth of valid certification
|
||||
* paths that include this cert */
|
||||
/* internal use only */
|
||||
int bodySz; /* pre sign total size */
|
||||
|
Reference in New Issue
Block a user