88 |
ssl_rsa_encrypt(uint8 * out, uint8 * in, int len, uint32 modulus_size, uint8 * modulus, |
ssl_rsa_encrypt(uint8 * out, uint8 * in, int len, uint32 modulus_size, uint8 * modulus, |
89 |
uint8 * exponent) |
uint8 * exponent) |
90 |
{ |
{ |
91 |
BN_CTX * ctx; |
BN_CTX *ctx; |
92 |
BIGNUM mod, exp, x, y; |
BIGNUM mod, exp, x, y; |
93 |
uint8 inr[SEC_MAX_MODULUS_SIZE]; |
uint8 inr[SEC_MAX_MODULUS_SIZE]; |
94 |
int outlen; |
int outlen; |
138 |
SSL_RKEY * |
SSL_RKEY * |
139 |
ssl_cert_to_rkey(SSL_CERT * cert, uint32 * key_len) |
ssl_cert_to_rkey(SSL_CERT * cert, uint32 * key_len) |
140 |
{ |
{ |
141 |
EVP_PKEY * epk = NULL; |
EVP_PKEY *epk = NULL; |
142 |
SSL_RKEY * lkey; |
SSL_RKEY *lkey; |
143 |
/* By some reason, Microsoft sets the OID of the Public RSA key to |
/* By some reason, Microsoft sets the OID of the Public RSA key to |
144 |
the oid for "MD5 with RSA Encryption" instead of "RSA Encryption" |
the oid for "MD5 with RSA Encryption" instead of "RSA Encryption" |
145 |
|
|
176 |
server we are connecting to as key, and compare it |
server we are connecting to as key, and compare it |
177 |
when we connect the next time, in order to prevent |
when we connect the next time, in order to prevent |
178 |
MITM-attacks. |
MITM-attacks. |
179 |
*/ |
*/ |
180 |
return True; |
return True; |
181 |
} |
} |
182 |
|
|
217 |
{ |
{ |
218 |
/* Currently, we don't check the signature |
/* Currently, we don't check the signature |
219 |
FIXME: |
FIXME: |
220 |
*/ |
*/ |
221 |
return True; |
return True; |
222 |
} |
} |