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)
|
DerBuffer** pDer, void* heap, EncryptedInfo* info, int* keyFormat)
|
||||||
{
|
{
|
||||||
int ret = PemToDer(buff, longSz, type, pDer, heap, info, keyFormat);
|
int ret = PemToDer(buff, longSz, type, pDer, heap, info, keyFormat);
|
||||||
|
#if defined(HAVE_PKCS8) || defined(HAVE_PKCS12)
|
||||||
if (ret == 0 && type == PRIVATEKEY_TYPE) {
|
if (ret == 0 && type == PRIVATEKEY_TYPE) {
|
||||||
DerBuffer* der = *pDer;
|
DerBuffer* der = *pDer;
|
||||||
/* if a PKCS8 key header exists remove it */
|
/* 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;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2147,7 +2147,7 @@ extern void uITRON4_free(void *p) ;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_PKCS12
|
#if !defined(NO_PKCS12) && !defined(NO_PKCS8)
|
||||||
#undef HAVE_PKCS12
|
#undef HAVE_PKCS12
|
||||||
#define HAVE_PKCS12
|
#define HAVE_PKCS12
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user