Browse Source

disable PEM support on MSVC

If someone wants to fix builds on MSVC, please step forward. Until then
the library can still be used on Windows via `mingw-gcc`.

Signed-off-by: Steffen Jaeckel <[email protected]>
Steffen Jaeckel 3 years ago
parent
commit
5523eadc13
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/headers/tomcrypt_custom.h

+ 7 - 0
src/headers/tomcrypt_custom.h

@@ -773,4 +773,11 @@
 #undef LTC_ECC521
 #undef LTC_ECC521
 #endif
 #endif
 
 
+/* MSVC can't build PEM */
+#if defined(LTC_PEM) && defined(_MSC_VER)
+#undef LTC_PEM
+#undef LTC_PEM_DECODE_BUFSZ
+#undef LTC_PEM_READ_BUFSIZE
+#endif
+
 #endif /* TOMCRYPT_CUSTOM_H_ */
 #endif /* TOMCRYPT_CUSTOM_H_ */