+
+#ifdef FEATURE_HTTPS_INSPECTION
+ /* Result of server certificate verification
+ *
+ * Values for flag determining certificate validity
+ * are compatible with return value of function
+ * mbedtls_ssl_get_verify_result() for mbedtls
+ * and SSL_get_verify_result() for openssl.
+ * There are no values for "invalid certificate", they are
+ * set by the functions mentioned above.
+ */
+#define SSL_CERT_VALID 0
+#ifdef FEATURE_HTTPS_INSPECTION_MBEDTLS
+#define SSL_CERT_NOT_VERIFIED 0xFFFFFFFF
+ uint32_t server_cert_verification_result;
+#endif /* FEATURE_HTTPS_INSPECTION_MBEDTLS */
+#if defined(FEATURE_HTTPS_INSPECTION_OPENSSL) || defined(FEATURE_HTTPS_INSPECTION_WOLFSSL)
+#define SSL_CERT_NOT_VERIFIED ~0L
+ long server_cert_verification_result;
+#endif /* FEATURE_HTTPS_INSPECTION_OPENSSL */
+
+ /* Flag for certificate validity checking */
+ int dont_verify_certificate;
+
+ /*
+ * Flags if SSL connection with server or client is opened.
+ * Thanks to this flags, we can call function to close both connections
+ * and we don't have to care about more details.
+ */
+ short int ssl_with_server_is_opened;
+ short int ssl_with_client_is_opened;
+
+ /*
+ * Server certificate chain of trust including strings with certificates
+ * information and string with whole certificate file
+ */
+ struct certs_chain server_certs_chain;
+#endif