#include <library.h>
#include <credentials/certificates/certificate.h>
-/* <wincrypt.h> comes with CRL_REASON clashing with ours. Even if the values
- * are identical, we undef them here to use our enum instead of defines. */
-#ifdef WIN32
+/* <wincrypt.h> comes with CRL_REASON clashing with ours. The same is true for
+ * OpenSSL 3.0. Even if the values are identical, we undef them here to use our
+ * enum instead of defines. */
+#ifdef CRL_REASON_UNSPECIFIED
# undef CRL_REASON_UNSPECIFIED
# undef CRL_REASON_KEY_COMPROMISE
# undef CRL_REASON_CA_COMPROMISE