Browse Source

tlsx: expose TLSX_Push

To be able to implement extension in separate compilation unit
Marco Oliverio 1 year ago
parent
commit
171af05e96
2 changed files with 3 additions and 1 deletions
  1. 1 1
      src/tls.c
  2. 2 0
      wolfssl/internal.h

+ 1 - 1
src/tls.c

@@ -1307,7 +1307,7 @@ static TLSX* TLSX_New(TLSX_Type type, const void* data, void* heap)
  * Creates a new extension and pushes it to the provided list.
  * Checks for duplicate extensions, keeps the newest.
  */
-static int TLSX_Push(TLSX** list, TLSX_Type type, const void* data, void* heap)
+int TLSX_Push(TLSX** list, TLSX_Type type, const void* data, void* heap)
 {
     TLSX* extension = TLSX_New(type, data, heap);
 

+ 2 - 0
wolfssl/internal.h

@@ -2497,6 +2497,8 @@ WOLFSSL_LOCAL int   TLSX_ParseVersion(WOLFSSL* ssl, const byte* input,
                                       word16 length, byte msgType, int* found);
 WOLFSSL_LOCAL int   TLSX_Parse(WOLFSSL* ssl, const byte* input, word16 length,
                                byte msgType, Suites *suites);
+WOLFSSL_LOCAL int TLSX_Push(TLSX** list, TLSX_Type type,
+                            const void* data, void* heap);
 
 #elif defined(HAVE_SNI)                           \
    || defined(HAVE_MAX_FRAGMENT)                  \