mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-23 01:51:58 +00:00
Quick hacks to get it working
This commit is contained in:
parent
a01374b5cd
commit
5c3837e0ed
@ -273,7 +273,10 @@ int RSA_encrypt(RSA_CTX *ctx, const uint8_t *in_data, uint16_t in_len,
|
||||
else /* randomize the encryption padding with non-zero bytes */
|
||||
{
|
||||
out_data[1] = 2;
|
||||
memset(&out_data[2], 0x01, num_pads_needed);
|
||||
#if 0
|
||||
get_random_NZ(num_pads_needed, &out_data[2]);
|
||||
#endif
|
||||
}
|
||||
|
||||
out_data[2+num_pads_needed] = 0;
|
||||
@ -287,6 +290,8 @@ int RSA_encrypt(RSA_CTX *ctx, const uint8_t *in_data, uint16_t in_len,
|
||||
return byte_size;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
/**
|
||||
* Take a signature and decrypt it.
|
||||
*/
|
||||
@ -328,4 +333,6 @@ bigint *RSA_sign_verify(BI_CTX *ctx, const uint8_t *sig, int sig_len,
|
||||
return bir;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_SSL_CERT_VERIFICATION */
|
||||
|
Loading…
Reference in New Issue
Block a user