| 237 | } |
| 238 | |
| 239 | int EVP_DigestUpdate(EVP_MD_CTX* ctx, const void* d, size_t cnt) { |
| 240 | static int (*origMethod)(EVP_MD_CTX * ctx, const void* d, size_t cnt) = nullptr; |
| 241 | if (origMethod == nullptr) origMethod = (decltype(origMethod))dlsym(RTLD_NEXT, SYMBOL_NAME("EVP_DigestUpdate")); |
| 242 | bool fail = fail_EVP_DigestUpdate & 1; |
| 243 | fail_EVP_DigestUpdate = fail_EVP_DigestUpdate >> 1; |
| 244 | if (fail) |
| 245 | return 0; |
| 246 | else |
| 247 | return origMethod(ctx, d, cnt); |
| 248 | } |
| 249 | |
| 250 | int EVP_DigestFinal(EVP_MD_CTX* ctx, unsigned char* md, unsigned int* s) { |
| 251 | static int (*origMethod)(EVP_MD_CTX * ctx, unsigned char* md, unsigned int* s) = nullptr; |