MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / build_certHashes

Function build_certHashes

extra/yassl/src/handshake.cpp:719–737  ·  view source on GitHub ↗

build certificate hashes

Source from the content-addressed store, hash-verified

717
718// build certificate hashes
719void build_certHashes(SSL& ssl, Hashes& hashes)
720{
721 // store current states, building requires get_digest which resets state
722 MD5 md5(ssl.getHashes().get_MD5());
723 SHA sha(ssl.getHashes().get_SHA());
724
725 if (ssl.isTLS()) {
726 ssl.useHashes().use_MD5().get_digest(hashes.md5_);
727 ssl.useHashes().use_SHA().get_digest(hashes.sha_);
728 }
729 else {
730 buildMD5_CertVerify(ssl, hashes.md5_);
731 buildSHA_CertVerify(ssl, hashes.sha_);
732 }
733
734 // restore
735 ssl.useHashes().use_MD5() = md5;
736 ssl.useHashes().use_SHA() = sha;
737}
738
739
740

Callers 2

BuildMethod · 0.85
ProcessMethod · 0.85

Calls 4

buildMD5_CertVerifyFunction · 0.85
buildSHA_CertVerifyFunction · 0.85
isTLSMethod · 0.80
get_digestMethod · 0.80

Tested by

no test coverage detected