|
Lines 34-39
Link Here
|
| 34 |
#include "sshkey.h" |
34 |
#include "sshkey.h" |
| 35 |
#include "digest.h" |
35 |
#include "digest.h" |
| 36 |
#include "log.h" |
36 |
#include "log.h" |
|
|
37 |
#include "misc.h" |
| 37 |
|
38 |
|
| 38 |
#include "openbsd-compat/openssl-compat.h" |
39 |
#include "openbsd-compat/openssl-compat.h" |
| 39 |
|
40 |
|
|
Lines 399-404
rsa_hash_alg_oid(int hash_alg, const u_char **oidp, size_t *oidlenp)
Link Here
|
| 399 |
return 0; |
400 |
return 0; |
| 400 |
} |
401 |
} |
| 401 |
|
402 |
|
|
|
403 |
static int |
| 404 |
dump_libcrypto_error(const char *str, size_t len, void *u) |
| 405 |
{ |
| 406 |
debug("%s: libcrypto: %.*s", (char*)u, (int)len, str); |
| 407 |
return 0; |
| 408 |
} |
| 409 |
|
| 410 |
|
| 402 |
static int |
411 |
static int |
| 403 |
openssh_RSA_verify(int hash_alg, u_char *hash, size_t hashlen, |
412 |
openssh_RSA_verify(int hash_alg, u_char *hash, size_t hashlen, |
| 404 |
u_char *sigbuf, size_t siglen, RSA *rsa) |
413 |
u_char *sigbuf, size_t siglen, RSA *rsa) |
|
Lines 428-433
openssh_RSA_verify(int hash_alg, u_char *hash, size_t hashlen,
Link Here
|
| 428 |
} |
437 |
} |
| 429 |
if ((len = RSA_public_decrypt(siglen, sigbuf, decrypted, rsa, |
438 |
if ((len = RSA_public_decrypt(siglen, sigbuf, decrypted, rsa, |
| 430 |
RSA_PKCS1_PADDING)) < 0) { |
439 |
RSA_PKCS1_PADDING)) < 0) { |
|
|
440 |
debug_f("failed RSA_public_decrypt: sig=%s", tohex(sigbuf, siglen)); |
| 441 |
ERR_print_errors_cb(dump_libcrypto_error, (void*)__func__); |
| 431 |
ret = SSH_ERR_LIBCRYPTO_ERROR; |
442 |
ret = SSH_ERR_LIBCRYPTO_ERROR; |
| 432 |
goto done; |
443 |
goto done; |
| 433 |
} |
444 |
} |