@@ -853,37 +853,6 @@ INLINE static int IsMessageAllowed(WOLFSSH *ssh, byte msg, byte state)
853853 return 0;
854854}
855855
856- #ifdef WOLFSSH_TEST_INTERNAL
857- int wolfSSH_TestIsMessageAllowed(WOLFSSH* ssh, byte msg, byte state)
858- {
859- return IsMessageAllowed(ssh, msg, state);
860- }
861-
862- static int DoKexInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx);
863- static int DoKexDhInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx);
864- #ifndef WOLFSSH_NO_DH_GEX_SHA256
865- static int DoKexDhGexRequest(WOLFSSH* ssh, byte* buf, word32 len, word32* idx);
866- #endif
867-
868- int wolfSSH_TestDoKexInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
869- {
870- return DoKexInit(ssh, buf, len, idx);
871- }
872-
873- int wolfSSH_TestDoKexDhInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
874- {
875- return DoKexDhInit(ssh, buf, len, idx);
876- }
877-
878- #ifndef WOLFSSH_NO_DH_GEX_SHA256
879- int wolfSSH_TestDoKexDhGexRequest(WOLFSSH* ssh, byte* buf, word32 len,
880- word32* idx)
881- {
882- return DoKexDhGexRequest(ssh, buf, len, idx);
883- }
884- #endif
885- #endif
886-
887856
888857static const char cannedKexAlgoNames[] =
889858#if !defined(WOLFSSH_NO_CURVE25519_MLKEM768_SHA256)
@@ -6558,15 +6527,6 @@ static int DoKexDhGexGroup(WOLFSSH* ssh,
65586527 return ret;
65596528}
65606529
6561- #ifdef WOLFSSH_TEST_INTERNAL
6562- int wolfSSH_TestValidateKexDhGexGroup(const byte* primeGroup,
6563- word32 primeGroupSz, const byte* generator, word32 generatorSz,
6564- word32 minBits, word32 maxBits, WC_RNG* rng)
6565- {
6566- return ValidateKexDhGexGroup(primeGroup, primeGroupSz,
6567- generator, generatorSz, minBits, maxBits, rng);
6568- }
6569- #endif
65706530#endif /* !WOLFSSH_NO_DH_GEX_SHA256 */
65716531
65726532
@@ -10750,31 +10710,6 @@ int DoReceive(WOLFSSH* ssh)
1075010710 return ret;
1075110711}
1075210712
10753- #ifdef WOLFSSH_TEST_INTERNAL
10754- int wolfSSH_TestDoReceive(WOLFSSH* ssh)
10755- {
10756- return DoReceive(ssh);
10757- }
10758-
10759- int wolfSSH_TestDoUserAuthBanner(WOLFSSH* ssh, byte* buf, word32 len,
10760- word32* idx)
10761- {
10762- return DoUserAuthBanner(ssh, buf, len, idx);
10763- }
10764-
10765- int wolfSSH_TestDoChannelRequest(WOLFSSH* ssh, byte* buf, word32 len,
10766- word32* idx)
10767- {
10768- return DoChannelRequest(ssh, buf, len, idx);
10769- }
10770-
10771- int wolfSSH_TestChannelPutData(WOLFSSH_CHANNEL* channel, byte* data,
10772- word32 dataSz)
10773- {
10774- return ChannelPutData(channel, data, dataSz);
10775- }
10776- #endif
10777-
1077810713
1077910714int DoProtoId(WOLFSSH* ssh)
1078010715{
@@ -11968,15 +11903,6 @@ int wolfSSH_RsaVerify(const byte *sig, word32 sigSz,
1196811903 return ret;
1196911904}
1197011905
11971- #ifdef WOLFSSH_TEST_INTERNAL
11972- int wolfSSH_TestRsaVerify(const byte* sig, word32 sigSz,
11973- const byte* encDigest, word32 encDigestSz,
11974- RsaKey* key, void* heap)
11975- {
11976- return wolfSSH_RsaVerify(sig, sigSz, encDigest, encDigestSz,
11977- key, heap, "wolfSSH_TestRsaVerify");
11978- }
11979- #endif /* WOLFSSH_TEST_INTERNAL */
1198011906#endif /* WOLFSSH_NO_RSA */
1198111907
1198211908
@@ -17933,3 +17859,76 @@ void AddAssign64(word32* addend1, word32 addend2)
1793317859}
1793417860
1793517861#endif /* WOLFSSH_SFTP */
17862+
17863+
17864+ #ifdef WOLFSSH_TEST_INTERNAL
17865+
17866+ int wolfSSH_TestIsMessageAllowed(WOLFSSH* ssh, byte msg, byte state)
17867+ {
17868+ return IsMessageAllowed(ssh, msg, state);
17869+ }
17870+
17871+ int wolfSSH_TestDoReceive(WOLFSSH* ssh)
17872+ {
17873+ return DoReceive(ssh);
17874+ }
17875+
17876+ int wolfSSH_TestDoUserAuthBanner(WOLFSSH* ssh, byte* buf, word32 len,
17877+ word32* idx)
17878+ {
17879+ return DoUserAuthBanner(ssh, buf, len, idx);
17880+ }
17881+
17882+ int wolfSSH_TestDoChannelRequest(WOLFSSH* ssh, byte* buf, word32 len,
17883+ word32* idx)
17884+ {
17885+ return DoChannelRequest(ssh, buf, len, idx);
17886+ }
17887+
17888+ int wolfSSH_TestDoKexInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
17889+ {
17890+ return DoKexInit(ssh, buf, len, idx);
17891+ }
17892+
17893+ int wolfSSH_TestDoKexDhInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
17894+ {
17895+ return DoKexDhInit(ssh, buf, len, idx);
17896+ }
17897+
17898+ int wolfSSH_TestChannelPutData(WOLFSSH_CHANNEL* channel, byte* data,
17899+ word32 dataSz)
17900+ {
17901+ return ChannelPutData(channel, data, dataSz);
17902+ }
17903+
17904+ #ifndef WOLFSSH_NO_DH_GEX_SHA256
17905+
17906+ int wolfSSH_TestDoKexDhGexRequest(WOLFSSH* ssh, byte* buf, word32 len,
17907+ word32* idx)
17908+ {
17909+ return DoKexDhGexRequest(ssh, buf, len, idx);
17910+ }
17911+
17912+ int wolfSSH_TestValidateKexDhGexGroup(const byte* primeGroup,
17913+ word32 primeGroupSz, const byte* generator, word32 generatorSz,
17914+ word32 minBits, word32 maxBits, WC_RNG* rng)
17915+ {
17916+ return ValidateKexDhGexGroup(primeGroup, primeGroupSz,
17917+ generator, generatorSz, minBits, maxBits, rng);
17918+ }
17919+
17920+ #endif /* !WOLFSSH_NO_DH_GEX_SHA256 */
17921+
17922+ #ifndef WOLFSSH_NO_RSA
17923+
17924+ int wolfSSH_TestRsaVerify(const byte* sig, word32 sigSz,
17925+ const byte* encDigest, word32 encDigestSz,
17926+ RsaKey* key, void* heap)
17927+ {
17928+ return wolfSSH_RsaVerify(sig, sigSz, encDigest, encDigestSz,
17929+ key, heap, "wolfSSH_TestRsaVerify");
17930+ }
17931+
17932+ #endif /* !WOLFSSH_NO_RSA */
17933+
17934+ #endif /* WOLFSSH_TEST_INTERNAL */
0 commit comments