use first 64 bits of SERIAL number

This commit is contained in:
Todd A Ouska
2011-03-22 08:15:03 -07:00
parent 680358abe1
commit c068592799
3 changed files with 5 additions and 5 deletions

View File

@@ -880,7 +880,7 @@ static int GetCertHeader(DecodedCert* cert, word32 inSz)
len = mp_unsigned_bin_size(&mpi);
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)
ret = MP_TO_E;

View File

@@ -99,8 +99,7 @@
const char* eccCert = "../../certs/server-ecc.pem";
const char* eccKey = "../../certs/ecc-key.pem";
const char* svrCert = "../../certs/server-cert.pem";
//const char* svrKey = "../../certs/server-key.pem";
const char* svrKey = "../../certs/server-keyPkcs8Enc.pem";
const char* svrKey = "../../certs/server-key.pem";
const char* cliCert = "../../certs/client-cert.pem";
const char* cliKey = "../../certs/client-key.pem";
const char* ntruCert = "../../certs/ntru-cert.pem";
@@ -110,8 +109,7 @@
static const char* eccCert = "../certs/server-ecc.pem";
static const char* eccKey = "../certs/ecc-key.pem";
static const char* svrCert = "../certs/server-cert.pem";
//static const char* svrKey = "../certs/server-key.pem";
static const char* svrKey = "../certs/server-keyPkcs8Enc.pem";
static const char* svrKey = "../certs/server-key.pem";
static const char* cliCert = "../certs/client-cert.pem";
static const char* cliKey = "../certs/client-key.pem";
static const char* ntruCert = "../certs/ntru-cert.pem";

View File

@@ -480,6 +480,7 @@ static int AddCA(SSL_CTX* ctx, buffer der)
if (pkcs8)
return ToTraditional(der->buffer, der->length);
#ifdef OPENSSL_EXTRA
if (pkcs8Enc) {
int passwordSz;
char password[80];
@@ -491,6 +492,7 @@ static int AddCA(SSL_CTX* ctx, buffer der)
return ToTraditionalEnc(der->buffer, der->length, password,
passwordSz);
}
#endif
return 0;
}