@@ -2934,7 +2934,7 @@ static int wc_RsaFunctionAsync(const byte* in, word32 inLen, byte* out,
29342934/* Performs direct RSA computation without padding. The input and output must
29352935 * match the key size (ex: 2048-bits = 256 bytes). Returns the size of the
29362936 * output on success or negative value on failure. */
2937- int wc_RsaDirect (byte * in , word32 inLen , byte * out , word32 * outSz ,
2937+ int wc_RsaDirect (const byte * in , word32 inLen , byte * out , word32 * outSz ,
29382938 RsaKey * key , int type , WC_RNG * rng )
29392939{
29402940 int ret ;
@@ -4002,7 +4002,7 @@ int wc_RsaPSS_VerifyInline_ex(byte* in, word32 inLen, byte** out,
40024002 * key Public RSA key.
40034003 * returns the length of the PSS data on success and negative indicates failure.
40044004 */
4005- int wc_RsaPSS_Verify (byte * in , word32 inLen , byte * out , word32 outLen ,
4005+ int wc_RsaPSS_Verify (const byte * in , word32 inLen , byte * out , word32 outLen ,
40064006 enum wc_HashType hash , int mgf , RsaKey * key )
40074007{
40084008#ifndef WOLFSSL_PSS_SALT_LEN_DISCOVER
@@ -4027,7 +4027,7 @@ int wc_RsaPSS_Verify(byte* in, word32 inLen, byte* out, word32 outLen,
40274027 * indicates salt length is determined from the data.
40284028 * returns the length of the PSS data on success and negative indicates failure.
40294029 */
4030- int wc_RsaPSS_Verify_ex (byte * in , word32 inLen , byte * out , word32 outLen ,
4030+ int wc_RsaPSS_Verify_ex (const byte * in , word32 inLen , byte * out , word32 outLen ,
40314031 enum wc_HashType hash , int mgf , int saltLen ,
40324032 RsaKey * key )
40334033{
@@ -4062,7 +4062,7 @@ int wc_RsaPSS_Verify_ex(byte* in, word32 inLen, byte* out, word32 outLen,
40624062 * NULL is passed in to in or sig or inSz is not the same as the hash
40634063 * algorithm length and 0 on success.
40644064 */
4065- int wc_RsaPSS_CheckPadding (const byte * in , word32 inSz , byte * sig ,
4065+ int wc_RsaPSS_CheckPadding (const byte * in , word32 inSz , const byte * sig ,
40664066 word32 sigSz , enum wc_HashType hashType )
40674067{
40684068#ifndef WOLFSSL_PSS_SALT_LEN_DISCOVER
@@ -4087,7 +4087,7 @@ int wc_RsaPSS_CheckPadding(const byte* in, word32 inSz, byte* sig,
40874087 * NULL is passed in to in or sig or inSz is not the same as the hash
40884088 * algorithm length and 0 on success.
40894089 */
4090- int wc_RsaPSS_CheckPadding_ex2 (const byte * in , word32 inSz , byte * sig ,
4090+ int wc_RsaPSS_CheckPadding_ex2 (const byte * in , word32 inSz , const byte * sig ,
40914091 word32 sigSz , enum wc_HashType hashType ,
40924092 int saltLen , int bits , void * heap )
40934093{
@@ -4186,7 +4186,7 @@ int wc_RsaPSS_CheckPadding_ex2(const byte* in, word32 inSz, byte* sig,
41864186 (void )heap ; /* unused if memory is disabled */
41874187 return ret ;
41884188}
4189- int wc_RsaPSS_CheckPadding_ex (const byte * in , word32 inSz , byte * sig ,
4189+ int wc_RsaPSS_CheckPadding_ex (const byte * in , word32 inSz , const byte * sig ,
41904190 word32 sigSz , enum wc_HashType hashType ,
41914191 int saltLen , int bits )
41924192{
@@ -4257,7 +4257,7 @@ int wc_RsaPSS_VerifyCheckInline(byte* in, word32 inLen, byte** out,
42574257 * key Public RSA key.
42584258 * returns the length of the PSS data on success and negative indicates failure.
42594259 */
4260- int wc_RsaPSS_VerifyCheck (byte * in , word32 inLen , byte * out , word32 outLen ,
4260+ int wc_RsaPSS_VerifyCheck (const byte * in , word32 inLen , byte * out , word32 outLen ,
42614261 const byte * digest , word32 digestLen ,
42624262 enum wc_HashType hash , int mgf ,
42634263 RsaKey * key )
@@ -4383,7 +4383,7 @@ int wc_RsaEncryptSize(const RsaKey* key)
43834383
43844384#ifndef WOLFSSL_RSA_VERIFY_ONLY
43854385/* flatten RsaKey structure into individual elements (e, n) */
4386- int wc_RsaFlattenPublicKey (RsaKey * key , byte * e , word32 * eSz , byte * n ,
4386+ int wc_RsaFlattenPublicKey (const RsaKey * key , byte * e , word32 * eSz , byte * n ,
43874387 word32 * nSz )
43884388{
43894389 int sz , ret ;
@@ -4413,7 +4413,7 @@ int wc_RsaFlattenPublicKey(RsaKey* key, byte* e, word32* eSz, byte* n,
44134413#endif
44144414
44154415#ifndef WOLFSSL_RSA_VERIFY_ONLY
4416- static int RsaGetValue (mp_int * in , byte * out , word32 * outSz )
4416+ static int RsaGetValue (const mp_int * in , byte * out , word32 * outSz )
44174417{
44184418 word32 sz ;
44194419 int ret = 0 ;
@@ -4434,7 +4434,7 @@ static int RsaGetValue(mp_int* in, byte* out, word32* outSz)
44344434}
44354435
44364436
4437- int wc_RsaExportKey (RsaKey * key ,
4437+ int wc_RsaExportKey (const RsaKey * key ,
44384438 byte * e , word32 * eSz , byte * n , word32 * nSz ,
44394439 byte * d , word32 * dSz , byte * p , word32 * pSz ,
44404440 byte * q , word32 * qSz )
0 commit comments