| 402 | } |
| 403 | |
| 404 | int EVP_DigestVerifyFinal(EVP_MD_CTX* ctx, const unsigned char* sigret, size_t siglen) { |
| 405 | static int (*origMethod)(EVP_MD_CTX * ctx, const unsigned char* sigret, size_t siglen) = nullptr; |
| 406 | if (origMethod == nullptr) |
| 407 | origMethod = (decltype(origMethod))dlsym(RTLD_NEXT, SYMBOL_NAME("EVP_DigestVerifyFinal")); |
| 408 | bool fail = fail_EVP_DigestVerifyFinal & 1; |
| 409 | fail_EVP_DigestVerifyFinal = fail_EVP_DigestVerifyFinal >> 1; |
| 410 | if (fail) |
| 411 | return 0; |
| 412 | else |
| 413 | return origMethod(ctx, sigret, siglen); |
| 414 | } |
| 415 | |
| 416 | int i2d_ECDSA_SIG(const ECDSA_SIG* sig, unsigned char** ppout) { |
| 417 | static int (*origMethod)(const ECDSA_SIG* sig, unsigned char** ppout) = nullptr; |