MCPcopy Create free account
hub / github.com/Thalhammer/jwt-cpp / EVP_DigestInit

Function EVP_DigestInit

tests/OpenSSLErrorTest.cpp:228–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228int EVP_DigestInit(EVP_MD_CTX* ctx, const EVP_MD* type) {
229 static int (*origMethod)(EVP_MD_CTX * ctx, const EVP_MD* type) = nullptr;
230 if (origMethod == nullptr) origMethod = (decltype(origMethod))dlsym(RTLD_NEXT, SYMBOL_NAME("EVP_DigestInit"));
231 bool fail = fail_EVP_DigestInit & 1;
232 fail_EVP_DigestInit = fail_EVP_DigestInit >> 1;
233 if (fail)
234 return 0;
235 else
236 return origMethod(ctx, type);
237}
238
239int 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;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected