|
@@ -273,7 +273,10 @@ int RSA_encrypt(RSA_CTX *ctx, const uint8_t *in_data, uint16_t in_len,
|
273
|
273
|
else /* randomize the encryption padding with non-zero bytes */
|
274
|
274
|
{
|
275
|
275
|
out_data[1] = 2;
|
|
276
|
+ memset(&out_data[2], 0x01, num_pads_needed);
|
|
277
|
+#if 0
|
276
|
278
|
get_random_NZ(num_pads_needed, &out_data[2]);
|
|
279
|
+#endif
|
277
|
280
|
}
|
278
|
281
|
|
279
|
282
|
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,
|
287
|
290
|
return byte_size;
|
288
|
291
|
}
|
289
|
292
|
|
|
293
|
+#if 0
|
|
294
|
+
|
290
|
295
|
/**
|
291
|
296
|
* Take a signature and decrypt it.
|
292
|
297
|
*/
|
|
@@ -328,4 +333,6 @@ bigint *RSA_sign_verify(BI_CTX *ctx, const uint8_t *sig, int sig_len,
|
328
|
333
|
return bir;
|
329
|
334
|
}
|
330
|
335
|
|
|
336
|
+#endif
|
|
337
|
+
|
331
|
338
|
#endif /* CONFIG_SSL_CERT_VERIFICATION */
|