@@ -2281,6 +2281,7 @@ static INLINE enum wc_HashType HashForId(byte id)
22812281}
22822282
22832283
2284+ #ifndef WOLFSSH_NO_ECDSA
22842285static INLINE int wcPrimeForId (byte id )
22852286{
22862287 switch (id ) {
@@ -2317,7 +2318,6 @@ static INLINE int wcPrimeForId(byte id)
23172318 }
23182319}
23192320
2320- #ifndef WOLFSSH_NO_ECDSA
23212321static INLINE const char * PrimeNameForId (byte id )
23222322{
23232323 switch (id ) {
@@ -2337,7 +2337,7 @@ static INLINE const char *PrimeNameForId(byte id)
23372337 return "unknown" ;
23382338 }
23392339}
2340- #endif
2340+ #endif /* WOLFSSH_NO_ECDSA */
23412341
23422342
23432343static INLINE byte AeadModeForId (byte id )
@@ -5884,6 +5884,7 @@ static INLINE int VerifyMac(WOLFSSH* ssh, const byte* in, word32 inSz,
58845884}
58855885
58865886
5887+ #ifndef WOLFSSH_NO_AEAD
58875888static INLINE void AeadIncrementExpIv (byte * iv )
58885889{
58895890 int i ;
@@ -5896,7 +5897,6 @@ static INLINE void AeadIncrementExpIv(byte* iv)
58965897}
58975898
58985899
5899- #ifndef WOLFSSH_NO_AEAD
59005900static INLINE int EncryptAead (WOLFSSH * ssh , byte * cipher ,
59015901 const byte * input , word16 sz ,
59025902 byte * authTag , const byte * auth ,
@@ -5968,7 +5968,7 @@ static INLINE int DecryptAead(WOLFSSH* ssh, byte* plain,
59685968
59695969 return ret ;
59705970}
5971- #endif
5971+ #endif /* WOLFSSH_NO_AEAD */
59725972
59735973
59745974int DoReceive (WOLFSSH * ssh )
@@ -6432,7 +6432,7 @@ static const char cannedKeyAlgoClientNames[] =
64326432#endif
64336433
64346434static const char cannedKeyAlgoRsaNames [] = "ssh-rsa" ;
6435- #if !defined(WOLFSSH_NO_ECDSA )
6435+ #if !defined(WOLFSSH_NO_ECDSA ) && !defined( WOLFSSH_NO_ECDH )
64366436static const char cannedKeyAlgoEcc256Names [] = "ecdsa-sha2-nistp256" ;
64376437static const char cannedKeyAlgoEcc384Names [] = "ecdsa-sha2-nistp384" ;
64386438static const char cannedKeyAlgoEcc521Names [] = "ecdsa-sha2-nistp521" ;
@@ -7683,6 +7683,8 @@ int SendKexDhInit(WOLFSSH* ssh)
76837683 privKey , primeId );
76847684 if (ret == 0 )
76857685 ret = wc_ecc_export_x963 (privKey , e , & eSz );
7686+ #else
7687+ ret = WS_INVALID_ALGO_ID ;
76867688#endif /* !defined(WOLFSSH_NO_ECDH) */
76877689 }
76887690
0 commit comments