forked from wolfSSL/wolfssl
Only compile in PKCS12 code if PKCS8 is also compiled in.
This commit is contained in:
@@ -11646,6 +11646,7 @@ int wc_PemToDer(const unsigned char* buff, long longSz, int type,
|
||||
DerBuffer** pDer, void* heap, EncryptedInfo* info, int* keyFormat)
|
||||
{
|
||||
int ret = PemToDer(buff, longSz, type, pDer, heap, info, keyFormat);
|
||||
#if defined(HAVE_PKCS8) || defined(HAVE_PKCS12)
|
||||
if (ret == 0 && type == PRIVATEKEY_TYPE) {
|
||||
DerBuffer* der = *pDer;
|
||||
/* if a PKCS8 key header exists remove it */
|
||||
@@ -11655,6 +11656,7 @@ int wc_PemToDer(const unsigned char* buff, long longSz, int type,
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -2147,7 +2147,7 @@ extern void uITRON4_free(void *p) ;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef NO_PKCS12
|
||||
#if !defined(NO_PKCS12) && !defined(NO_PKCS8)
|
||||
#undef HAVE_PKCS12
|
||||
#define HAVE_PKCS12
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user