Skip to content

Commit 1110fa8

Browse files
julek-wolfsslopencode
authored andcommitted
Map BuildMessage and GetCipherNames under WOLFSSL_API_PREFIX_MAP
The new test_record_size_matches_build_message exposes BuildMessage, GetCipherNames and GetCipherNamesSize via WOLFSSL_TEST_VIS so the unit test can call them from outside the library. Without a prefix map, the WOLFSSL_API_PREFIX_MAP build (symbol-prefixes.yml) trips the unprefixed-public-symbols check because these names start with neither wc_ nor wolf/WOLF. Add the same #define remap that the other WOLFSSL_TEST_VIS internals (DoApplicationData, TLSX_Find, DeriveTls13Keys, ...) already use, so the exported symbols become wolfSSL_BuildMessage / wolfSSL_GetCipherNames(Size) under that build. wolfssl_local_GetRecordSize already starts with "wolf" and needs no remap.
1 parent 9eaac79 commit 1110fa8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

wolfssl/internal.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7107,6 +7107,10 @@ typedef struct CipherSuiteInfo {
71077107
byte flags;
71087108
} CipherSuiteInfo;
71097109

7110+
#ifdef WOLFSSL_API_PREFIX_MAP
7111+
#define GetCipherNames wolfSSL_GetCipherNames
7112+
#define GetCipherNamesSize wolfSSL_GetCipherNamesSize
7113+
#endif
71107114
WOLFSSL_TEST_VIS const CipherSuiteInfo* GetCipherNames(void);
71117115
WOLFSSL_TEST_VIS int GetCipherNamesSize(void);
71127116
WOLFSSL_LOCAL const char* GetCipherNameInternal(byte cipherSuite0, byte cipherSuite);
@@ -7188,6 +7192,9 @@ WOLFSSL_LOCAL int InitHandshakeHashesAndCopy(WOLFSSL* ssl, HS_Hashes* source,
71887192
#ifndef WOLFSSL_NO_TLS12
71897193
WOLFSSL_LOCAL void FreeBuildMsgArgs(WOLFSSL* ssl, BuildMsgArgs* args);
71907194
#endif
7195+
#ifdef WOLFSSL_API_PREFIX_MAP
7196+
#define BuildMessage wolfSSL_BuildMessage
7197+
#endif
71917198
WOLFSSL_TEST_VIS int BuildMessage(WOLFSSL* ssl, byte* output, int outSz,
71927199
const byte* input, int inSz, int type, int hashOutput,
71937200
int sizeOnly, int asyncOkay, int epochOrder);

0 commit comments

Comments
 (0)