| 1046 | } |
| 1047 | |
| 1048 | String BinaryToHex(const unsigned char* data, size_t length) { |
| 1049 | static const char hexdigits[] = "0123456789abcdef"; |
| 1050 | |
| 1051 | String output(2*length, 0); |
| 1052 | for (int i = 0; i < SHA_DIGEST_LENGTH; i++) { |
| 1053 | output[2 * i] = hexdigits[data[i] >> 4]; |
| 1054 | output[2 * i + 1] = hexdigits[data[i] & 0xf]; |
| 1055 | } |
| 1056 | |
| 1057 | return output; |
| 1058 | } |
| 1059 | |
| 1060 | bool VerifyCertificate(const std::shared_ptr<X509> &caCertificate, const std::shared_ptr<X509> &certificate, const String& crlFile) |
| 1061 | { |
no outgoing calls
no test coverage detected