| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#define _GNU_SOURCE |
| 17 |
#include <dlfcn.h> |
| 18 |
#include <openssl/rsa.h> |
| 19 |
#include <time.h> |
| 20 |
|
| 21 |
#include "error/s2n_errno.h" |
| 22 |
#include "tls/s2n_connection.h" |
| 23 |
#include "utils/s2n_safety.h" |
| 24 |
|
| 25 |
time_t time (time_t *__timer) |
| 26 |
{ |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
return 0; |
| 31 |
} |
| 32 |
|
| 33 |
|
| 34 |
int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, |
| 35 |
const unsigned char *sigbuf, unsigned int siglen, RSA *rsa) |
| 36 |
{ |
| 37 |
|
| 38 |
return 1; |
| 39 |
} |
| 40 |
|
| 41 |
bool s2n_constant_time_equals(const uint8_t *a, const uint8_t *b, uint32_t len) |
| 42 |
{ |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
return 1; |
| 47 |
} |
| 48 |
|
| 49 |
int s2n_rsa_client_key_recv(struct s2n_connection *conn, struct s2n_blob *shared_key) |
| 50 |
{ |
| 51 |
|
| 52 |
typedef int (*orig_s2n_rsa_client_key_recv_func_type)(struct s2n_connection *conn, struct s2n_blob *shared_key); |
| 53 |
orig_s2n_rsa_client_key_recv_func_type orig_s2n_rsa_client_key_recv; |
| 54 |
orig_s2n_rsa_client_key_recv = (orig_s2n_rsa_client_key_recv_func_type) dlsym(RTLD_NEXT, "s2n_rsa_client_key_recv"); |
| 55 |
int original_return_code = orig_s2n_rsa_client_key_recv(conn, shared_key); |
| 56 |
|
| 57 |
|
| 58 |
conn->handshake.rsa_failed = 0; |
| 59 |
|
| 60 |
return original_return_code; |
| 61 |
} |
| 62 |
|