Skip to content

Commit 7005bb5

Browse files
committed
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 a500776 commit 7005bb5

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
@@ -7106,6 +7106,10 @@ typedef struct CipherSuiteInfo {
71067106
byte flags;
71077107
} CipherSuiteInfo;
71087108

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

0 commit comments

Comments
 (0)