Skip to content

Commit 2db1669

Browse files
authored
Merge pull request #8988 from JacobBarthelmeh/visibility
remove WOLFSSL_API in source code when already used in header file
2 parents e4a9ffd + 01cd91c commit 2db1669

File tree

11 files changed

+25
-25
lines changed

11 files changed

+25
-25
lines changed

src/bio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ long wolfSSL_BIO_get_mem_ptr(WOLFSSL_BIO *bio, WOLFSSL_BUF_MEM **ptr)
14041404
}
14051405
#endif
14061406

1407-
WOLFSSL_API long wolfSSL_BIO_int_ctrl(WOLFSSL_BIO *bp, int cmd, long larg, int iarg)
1407+
long wolfSSL_BIO_int_ctrl(WOLFSSL_BIO *bp, int cmd, long larg, int iarg)
14081408
{
14091409
(void) bp;
14101410
(void) cmd;

src/ssl.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8726,7 +8726,7 @@ static int isArrayUnique(const char* buf, size_t len)
87268726
* Takes byte array containing cert types the caller can provide to its peer.
87278727
* Cert types are in preferred order in the array.
87288728
*/
8729-
WOLFSSL_API int wolfSSL_CTX_set_client_cert_type(WOLFSSL_CTX* ctx,
8729+
int wolfSSL_CTX_set_client_cert_type(WOLFSSL_CTX* ctx,
87308730
const char* buf, int bufLen)
87318731
{
87328732
int i;
@@ -8761,7 +8761,7 @@ WOLFSSL_API int wolfSSL_CTX_set_client_cert_type(WOLFSSL_CTX* ctx,
87618761
* Takes byte array containing cert types the caller can provide to its peer.
87628762
* Cert types are in preferred order in the array.
87638763
*/
8764-
WOLFSSL_API int wolfSSL_CTX_set_server_cert_type(WOLFSSL_CTX* ctx,
8764+
int wolfSSL_CTX_set_server_cert_type(WOLFSSL_CTX* ctx,
87658765
const char* buf, int bufLen)
87668766
{
87678767
int i;
@@ -8796,7 +8796,7 @@ WOLFSSL_API int wolfSSL_CTX_set_server_cert_type(WOLFSSL_CTX* ctx,
87968796
* Takes byte array containing cert types the caller can provide to its peer.
87978797
* Cert types are in preferred order in the array.
87988798
*/
8799-
WOLFSSL_API int wolfSSL_set_client_cert_type(WOLFSSL* ssl,
8799+
int wolfSSL_set_client_cert_type(WOLFSSL* ssl,
88008800
const char* buf, int bufLen)
88018801
{
88028802
int i;
@@ -8833,7 +8833,7 @@ WOLFSSL_API int wolfSSL_set_client_cert_type(WOLFSSL* ssl,
88338833
* Takes byte array containing cert types the caller can provide to its peer.
88348834
* Cert types are in preferred order in the array.
88358835
*/
8836-
WOLFSSL_API int wolfSSL_set_server_cert_type(WOLFSSL* ssl,
8836+
int wolfSSL_set_server_cert_type(WOLFSSL* ssl,
88378837
const char* buf, int bufLen)
88388838
{
88398839
int i;
@@ -8875,7 +8875,7 @@ WOLFSSL_API int wolfSSL_set_server_cert_type(WOLFSSL* ssl,
88758875
* in case no negotiation performed, it returns WOLFSSL_SUCCESS and -1 is for
88768876
* cert type.
88778877
*/
8878-
WOLFSSL_API int wolfSSL_get_negotiated_client_cert_type(WOLFSSL* ssl, int* tp)
8878+
int wolfSSL_get_negotiated_client_cert_type(WOLFSSL* ssl, int* tp)
88798879
{
88808880
int ret = WOLFSSL_SUCCESS;
88818881

@@ -8906,7 +8906,7 @@ WOLFSSL_API int wolfSSL_get_negotiated_client_cert_type(WOLFSSL* ssl, int* tp)
89068906
* in case no negotiation performed, it returns WOLFSSL_SUCCESS and -1 is for
89078907
* cert type.
89088908
*/
8909-
WOLFSSL_API int wolfSSL_get_negotiated_server_cert_type(WOLFSSL* ssl, int* tp)
8909+
int wolfSSL_get_negotiated_server_cert_type(WOLFSSL* ssl, int* tp)
89108910
{
89118911
int ret = WOLFSSL_SUCCESS;
89128912

src/ssl_sess.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ WOLFSSL_SESSION* wolfSSL_get1_session(WOLFSSL* ssl)
290290
}
291291

292292
/* session is a private struct, return if it is setup or not */
293-
WOLFSSL_API int wolfSSL_SessionIsSetup(WOLFSSL_SESSION* session)
293+
int wolfSSL_SessionIsSetup(WOLFSSL_SESSION* session)
294294
{
295295
if (session != NULL)
296296
return session->isSetup;

src/wolfio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,7 @@ static const char* ocspAppStrList[] = {
21212121
NULL
21222122
};
21232123

2124-
WOLFSSL_API int wolfIO_HttpProcessResponseOcspGenericIO(
2124+
int wolfIO_HttpProcessResponseOcspGenericIO(
21252125
WolfSSLGenericIORecvCb ioCb, void* ioCbCtx, unsigned char** respBuf,
21262126
unsigned char* httpBuf, int httpBufSz, void* heap)
21272127
{

src/x509.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8386,7 +8386,7 @@ WOLFSSL_X509 *wolfSSL_d2i_X509_fp(XFILE fp, WOLFSSL_X509 **x509)
83868386
/* @param file file name to load */
83878387
/* @param type WOLFSSL_FILETYPE_PEM or WOLFSSL_FILETYPE_ASN1 */
83888388
/* @return a number of loading CRL or certificate, otherwise zero */
8389-
WOLFSSL_API int wolfSSL_X509_load_cert_crl_file(WOLFSSL_X509_LOOKUP *ctx,
8389+
int wolfSSL_X509_load_cert_crl_file(WOLFSSL_X509_LOOKUP *ctx,
83908390
const char *file, int type)
83918391
{
83928392
WOLFSSL_X509 *x509 = NULL;
@@ -8523,7 +8523,7 @@ WOLFSSL_API int wolfSSL_X509_load_cert_crl_file(WOLFSSL_X509_LOOKUP *ctx,
85238523
#ifdef HAVE_CRL
85248524

85258525
#ifndef NO_BIO
8526-
WOLFSSL_API WOLFSSL_X509_CRL *wolfSSL_d2i_X509_CRL_bio(WOLFSSL_BIO *bp,
8526+
WOLFSSL_X509_CRL *wolfSSL_d2i_X509_CRL_bio(WOLFSSL_BIO *bp,
85278527
WOLFSSL_X509_CRL **x)
85288528
{
85298529
int derSz;
@@ -8561,7 +8561,7 @@ WOLFSSL_X509_CRL *wolfSSL_d2i_X509_CRL_fp(XFILE fp, WOLFSSL_X509_CRL **crl)
85618561
/* @param file a file to read */
85628562
/* @param type WOLFSSL_FILETYPE_PEM or WOLFSSL_FILETYPE_ASN1 */
85638563
/* @return WOLFSSL_SUCCESS(1) on successful, otherwise WOLFSSL_FAILURE(0)*/
8564-
WOLFSSL_API int wolfSSL_X509_load_crl_file(WOLFSSL_X509_LOOKUP *ctx,
8564+
int wolfSSL_X509_load_crl_file(WOLFSSL_X509_LOOKUP *ctx,
85658565
const char *file, int type)
85668566
{
85678567
#ifndef NO_BIO
@@ -12398,15 +12398,15 @@ static void* wolfSSL_PEM_read_X509_ex(XFILE fp, void **x,
1239812398
return NULL;
1239912399
}
1240012400

12401-
WOLFSSL_API WOLFSSL_X509* wolfSSL_PEM_read_X509(XFILE fp, WOLFSSL_X509 **x,
12401+
WOLFSSL_X509* wolfSSL_PEM_read_X509(XFILE fp, WOLFSSL_X509 **x,
1240212402
wc_pem_password_cb *cb, void *u)
1240312403
{
1240412404
return (WOLFSSL_X509* )wolfSSL_PEM_read_X509_ex(fp, (void **)x, cb, u,
1240512405
CERT_TYPE);
1240612406
}
1240712407

1240812408
#if defined(HAVE_CRL)
12409-
WOLFSSL_API WOLFSSL_X509_CRL* wolfSSL_PEM_read_X509_CRL(XFILE fp,
12409+
WOLFSSL_X509_CRL* wolfSSL_PEM_read_X509_CRL(XFILE fp,
1241012410
WOLFSSL_X509_CRL **crl, wc_pem_password_cb *cb, void *u)
1241112411
{
1241212412
return (WOLFSSL_X509_CRL* )wolfSSL_PEM_read_X509_ex(fp, (void **)crl, cb, u,
@@ -15663,7 +15663,7 @@ int wolfSSL_X509_ACERT_get_serial_number(WOLFSSL_X509_ACERT* x509,
1566315663
* Returns WOLFSSL_SUCCESS on success.
1566415664
* Returns BAD_FUNC_ARG if input pointers are null.
1566515665
* */
15666-
WOLFSSL_API int wolfSSL_X509_ACERT_get_attr_buf(const WOLFSSL_X509_ACERT* x509,
15666+
int wolfSSL_X509_ACERT_get_attr_buf(const WOLFSSL_X509_ACERT* x509,
1566715667
const byte ** rawAttr,
1566815668
word32 * rawAttrLen)
1566915669
{
@@ -15678,7 +15678,7 @@ WOLFSSL_API int wolfSSL_X509_ACERT_get_attr_buf(const WOLFSSL_X509_ACERT* x509,
1567815678
}
1567915679

1568015680
#ifndef NO_WOLFSSL_STUB
15681-
WOLFSSL_API int wolfSSL_X509_ACERT_sign(WOLFSSL_X509_ACERT * x509,
15681+
int wolfSSL_X509_ACERT_sign(WOLFSSL_X509_ACERT * x509,
1568215682
WOLFSSL_EVP_PKEY * pkey,
1568315683
const WOLFSSL_EVP_MD * md)
1568415684
{

src/x509_str.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ static int X509StoreLoadFile(WOLFSSL_X509_STORE *str,
15841584
* a file or directory.
15851585
* Returns WOLFSSL_SUCCESS on success or WOLFSSL_FAILURE if an error occurs.
15861586
*/
1587-
WOLFSSL_API int wolfSSL_X509_STORE_load_locations(WOLFSSL_X509_STORE *str,
1587+
int wolfSSL_X509_STORE_load_locations(WOLFSSL_X509_STORE *str,
15881588
const char *file, const char *dir)
15891589
{
15901590
WOLFSSL_CTX* ctx;

wolfcrypt/src/asn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25085,7 +25085,7 @@ int wc_CertGetPubKey(const byte* cert, word32 certSz,
2508525085
* @return BAD_FUNC_ARG if certDer is NULL, certSz is 0, or pubKeyDerSz is NULL
2508625086
* @return BUFFER_E if the provided buffer is too small
2508725087
*/
25088-
WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer,
25088+
int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer,
2508925089
word32 certDerSz,
2509025090
byte* pubKeyDer,
2509125091
word32* pubKeyDerSz)

wolfcrypt/src/cryptocb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static const char* GetCryptoCbCmdTypeStr(int type)
172172
}
173173
#endif
174174

175-
WOLFSSL_API void wc_CryptoCb_InfoString(wc_CryptoInfo* info)
175+
void wc_CryptoCb_InfoString(wc_CryptoInfo* info)
176176
{
177177
if (info == NULL)
178178
return;

wolfcrypt/src/dh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ static int GeneratePublicDh(DhKey* key, byte* priv, word32 privSz,
13781378
* Given a DhKey with set params and a priv key, generate the corresponding
13791379
* public key. If fips, does pub key validation.
13801380
* */
1381-
WOLFSSL_API int wc_DhGeneratePublic(DhKey* key, byte* priv, word32 privSz,
1381+
int wc_DhGeneratePublic(DhKey* key, byte* priv, word32 privSz,
13821382
byte* pub, word32* pubSz)
13831383
{
13841384
int ret = 0;

wolfcrypt/src/logging.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void wolfSSL_Debugging_OFF(void)
176176
#endif
177177
}
178178

179-
WOLFSSL_API void wolfSSL_SetLoggingPrefix(const char* prefix)
179+
void wolfSSL_SetLoggingPrefix(const char* prefix)
180180
{
181181
#ifdef DEBUG_WOLFSSL
182182
log_prefix = prefix;
@@ -490,7 +490,7 @@ void WOLFSSL_LEAVE2(const char *file, int line, const char* msg, int ret)
490490
#endif
491491
#endif
492492

493-
WOLFSSL_API int WOLFSSL_IS_DEBUG_ON(void)
493+
int WOLFSSL_IS_DEBUG_ON(void)
494494
{
495495
return loggingEnabled;
496496
}

0 commit comments

Comments
 (0)