Add getter function for handshake->resume
This makes the code more readable by having fewer #ifdefs all over the place.
diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h
index cca71e7..c36c2ad 100644
--- a/include/mbedtls/ssl_internal.h
+++ b/include/mbedtls/ssl_internal.h
@@ -1111,4 +1111,20 @@
}
#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */
+
+/*
+ * Accessor functions for optional fields of various structures
+ */
+
+static inline int mbedtls_ssl_handshake_get_resume(
+ const mbedtls_ssl_handshake_params *handshake )
+{
+#if !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
+ return( handshake->resume );
+#else
+ (void) handshake;
+ return( 0 );
+#endif
+}
+
#endif /* ssl_internal.h */