Move code to reduce probability of conflicts
There are a number of PRs in flight that are going to append to the list of
getter functions for harcodeable SSL conf items, so leave that list at the end
in order to avoid conflicts between this PR and the SSL conf ones.
diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h
index a8aa75b..8803e83 100644
--- a/include/mbedtls/ssl_internal.h
+++ b/include/mbedtls/ssl_internal.h
@@ -1083,6 +1083,33 @@
/*
+ * 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
+}
+
+static inline int mbedtls_ssl_get_renego_status(
+ const mbedtls_ssl_context *ssl )
+{
+#if defined(MBEDTLS_SSL_RENEGOTIATION)
+ return( ssl->renego_status );
+#else
+ (void) ssl;
+ return( MBEDTLS_SSL_INITIAL_HANDSHAKE );
+#endif
+}
+
+
+/*
* Getter functions for fields in mbedtls_ssl_config which may
* be fixed at compile time via one of MBEDTLS_SSL_SSL_CONF_XXX.
*/
@@ -1111,31 +1138,4 @@
}
#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
-}
-
-static inline int mbedtls_ssl_get_renego_status(
- const mbedtls_ssl_context *ssl )
-{
-#if defined(MBEDTLS_SSL_RENEGOTIATION)
- return( ssl->renego_status );
-#else
- (void) ssl;
- return( MBEDTLS_SSL_INITIAL_HANDSHAKE );
-#endif
-}
-
#endif /* ssl_internal.h */