Lines Matching defs:digest

39 static int query_command(const char *data, const char *digest,
42 static TS_REQ *create_query(BIO *data_bio, const char *digest, const EVP_MD *md,
44 static int create_digest(BIO *input, const char *digest,
64 static int verify_command(const char *data, const char *digest, const char *queryfile,
69 static TS_VERIFY_CTX *create_verify_ctx(const char *data, const char *digest,
107 {"", OPT_MD, '-', "Any supported digest"},
112 {"digest", OPT_DIGEST, 's', "Digest (as a hex string)"},
138 " [-digest hexstring] [-tspolicy oid] [-no_nonce] [-cert]",
153 " -untrusted extra-certs.pem [-data file] [-digest hexstring]",
167 char *data = NULL, *digest = NULL, *policy = NULL;
215 digest = opt_arg();
317 if ((data != NULL) && (digest != NULL))
319 ret = !query_command(data, digest, md, policy, no_nonce, cert,
335 if ((in == NULL) || !EXACTLY_ONE(queryfile, data, digest))
337 ret = !verify_command(data, digest, queryfile, in, token_in,
394 static int query_command(const char *data, const char *digest, const EVP_MD *md,
410 if (digest == NULL
413 query = create_query(data_bio, digest, md, policy, no_nonce, cert);
441 static TS_REQ *create_query(BIO *data_bio, const char *digest, const EVP_MD *md,
470 if ((len = create_digest(data_bio, digest, md, &data)) == 0)
505 static int create_digest(BIO *input, const char *digest, const EVP_MD *md,
523 *md_value = app_malloc(md_value_len, "digest buffer");
536 *md_value = OPENSSL_hexstr2buf(digest, &digest_len);
538 BIO_printf(bio_err, "bad digest, %d bytes "
849 static int verify_command(const char *data, const char *digest, const char *queryfile,
871 if ((verify_ctx = create_verify_ctx(data, digest, queryfile,
896 static TS_VERIFY_CTX *create_verify_ctx(const char *data, const char *digest,
910 if (data != NULL || digest != NULL) {
924 } else if (digest != NULL) {
926 unsigned char *hexstr = OPENSSL_hexstr2buf(digest, &imprint_len);
929 BIO_printf(bio_err, "invalid digest string\n");