Merge pull request #3802 from tmael/pkcs8err

Fix PKCS8 build config
pull/3807/head
David Garske 2021-02-23 13:42:17 -08:00 committed by GitHub
commit 7a71ec4692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -2773,7 +2773,7 @@ int ToTraditional(byte* input, word32 sz)
#endif /* HAVE_PKCS8 || HAVE_PKCS12 */
#ifdef HAVE_PKCS8
#if defined(HAVE_PKCS8) && !defined(NO_CERTS)
/* find beginning of traditional key inside PKCS#8 unencrypted buffer
* return traditional length on success, with inOutIdx at beginning of
@ -2867,7 +2867,6 @@ int wc_CreatePKCS8Key(byte* out, word32* outSz, byte* key, word32 keySz,
* no header information just INTEGER */
sz = SetMyVersion(PKCS8v0, out + keyIdx, 0);
tmpSz += sz; keyIdx += sz;
/* privateKeyAlgorithm PrivateKeyAlgorithmIdentifier */
sz = 0; /* set sz to 0 and get privateKey oid buffer size needed */
if (curveOID != NULL && oidSz > 0) {
@ -2903,7 +2902,7 @@ int wc_CreatePKCS8Key(byte* out, word32* outSz, byte* key, word32 keySz,
return tmpSz + sz;
}
#endif /* HAVE_PKCS8 */
#endif /* HAVE_PKCS8 && !NO_CERTS */
#if defined(HAVE_PKCS12) || !defined(NO_CHECK_PRIVATE_KEY)
/* check that the private key is a pair for the public key

View File

@ -11827,10 +11827,11 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out)
static const char* eccCaKeyPemFile = CERT_WRITE_TEMP_DIR "ecc-key.pem";
static const char* eccPubKeyDerFile = CERT_WRITE_TEMP_DIR "ecc-public-key.der";
static const char* eccCaKeyTempFile = CERT_WRITE_TEMP_DIR "ecc-key.der";
#endif
#ifdef HAVE_PKCS8
static const char* eccPkcs8KeyDerFile = CERT_WRITE_TEMP_DIR "ecc-key-pkcs8.der";
#endif
#endif /* HAVE_ECC_KEY_EXPORT */
#if defined(WOLFSSL_CERT_GEN) || \
(defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_TEST_CERT))
static const char* certEccDerFile = CERT_WRITE_TEMP_DIR "certecc.der";