david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Quick hacks to get it working

This commit is contained in:
Michael Brown 2007-02-01 02:20:35 +00:00
parent a01374b5cd
commit 5c3837e0ed
1 changed files with 7 additions and 0 deletions

View File

@ -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 */ else /* randomize the encryption padding with non-zero bytes */
{ {
out_data[1] = 2; out_data[1] = 2;
memset(&out_data[2], 0x01, num_pads_needed);
#if 0
get_random_NZ(num_pads_needed, &out_data[2]); get_random_NZ(num_pads_needed, &out_data[2]);
#endif
} }
out_data[2+num_pads_needed] = 0; 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; return byte_size;
} }
#if 0
/** /**
* Take a signature and decrypt it. * 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; return bir;
} }
#endif
#endif /* CONFIG_SSL_CERT_VERIFICATION */ #endif /* CONFIG_SSL_CERT_VERIFICATION */