forked from wolfSSL/wolfssl
use first 64 bits of SERIAL number
This commit is contained in:
@@ -880,7 +880,7 @@ static int GetCertHeader(DecodedCert* cert, word32 inSz)
|
|||||||
|
|
||||||
len = mp_unsigned_bin_size(&mpi);
|
len = mp_unsigned_bin_size(&mpi);
|
||||||
if (len > SERIAL_SIZE)
|
if (len > SERIAL_SIZE)
|
||||||
ret = MP_TO_E;
|
len = SERIAL_SIZE; /* use first 64 bits for unique id */
|
||||||
if (mp_to_unsigned_bin(&mpi, cert->serial + (SERIAL_SIZE - len)) != MP_OKAY)
|
if (mp_to_unsigned_bin(&mpi, cert->serial + (SERIAL_SIZE - len)) != MP_OKAY)
|
||||||
ret = MP_TO_E;
|
ret = MP_TO_E;
|
||||||
|
|
||||||
|
@@ -99,8 +99,7 @@
|
|||||||
const char* eccCert = "../../certs/server-ecc.pem";
|
const char* eccCert = "../../certs/server-ecc.pem";
|
||||||
const char* eccKey = "../../certs/ecc-key.pem";
|
const char* eccKey = "../../certs/ecc-key.pem";
|
||||||
const char* svrCert = "../../certs/server-cert.pem";
|
const char* svrCert = "../../certs/server-cert.pem";
|
||||||
//const char* svrKey = "../../certs/server-key.pem";
|
const char* svrKey = "../../certs/server-key.pem";
|
||||||
const char* svrKey = "../../certs/server-keyPkcs8Enc.pem";
|
|
||||||
const char* cliCert = "../../certs/client-cert.pem";
|
const char* cliCert = "../../certs/client-cert.pem";
|
||||||
const char* cliKey = "../../certs/client-key.pem";
|
const char* cliKey = "../../certs/client-key.pem";
|
||||||
const char* ntruCert = "../../certs/ntru-cert.pem";
|
const char* ntruCert = "../../certs/ntru-cert.pem";
|
||||||
@@ -110,8 +109,7 @@
|
|||||||
static const char* eccCert = "../certs/server-ecc.pem";
|
static const char* eccCert = "../certs/server-ecc.pem";
|
||||||
static const char* eccKey = "../certs/ecc-key.pem";
|
static const char* eccKey = "../certs/ecc-key.pem";
|
||||||
static const char* svrCert = "../certs/server-cert.pem";
|
static const char* svrCert = "../certs/server-cert.pem";
|
||||||
//static const char* svrKey = "../certs/server-key.pem";
|
static const char* svrKey = "../certs/server-key.pem";
|
||||||
static const char* svrKey = "../certs/server-keyPkcs8Enc.pem";
|
|
||||||
static const char* cliCert = "../certs/client-cert.pem";
|
static const char* cliCert = "../certs/client-cert.pem";
|
||||||
static const char* cliKey = "../certs/client-key.pem";
|
static const char* cliKey = "../certs/client-key.pem";
|
||||||
static const char* ntruCert = "../certs/ntru-cert.pem";
|
static const char* ntruCert = "../certs/ntru-cert.pem";
|
||||||
|
@@ -480,6 +480,7 @@ static int AddCA(SSL_CTX* ctx, buffer der)
|
|||||||
if (pkcs8)
|
if (pkcs8)
|
||||||
return ToTraditional(der->buffer, der->length);
|
return ToTraditional(der->buffer, der->length);
|
||||||
|
|
||||||
|
#ifdef OPENSSL_EXTRA
|
||||||
if (pkcs8Enc) {
|
if (pkcs8Enc) {
|
||||||
int passwordSz;
|
int passwordSz;
|
||||||
char password[80];
|
char password[80];
|
||||||
@@ -491,6 +492,7 @@ static int AddCA(SSL_CTX* ctx, buffer der)
|
|||||||
return ToTraditionalEnc(der->buffer, der->length, password,
|
return ToTraditionalEnc(der->buffer, der->length, password,
|
||||||
passwordSz);
|
passwordSz);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user