Lines Matching defs:digest

85 static int query_command(const char *data, char *digest,
90 static TS_REQ *create_query(BIO *data_bio, char *digest, const EVP_MD *md,
92 static int create_digest(BIO *input, char *digest,
111 static int verify_command(char *data, char *digest, char *queryfile,
114 static TS_VERIFY_CTX *create_verify_ctx(char *data, char *digest,
134 char *digest = NULL;
193 else if (strcmp(*argv, "-digest") == 0)
196 digest = *++argv;
329 ret = data != NULL && digest != NULL;
333 ret = !query_command(data, digest, md, policy, no_nonce, cert,
355 ret = !(((queryfile && !data && !digest)
356 || (!queryfile && data && !digest)
357 || (!queryfile && !data && digest))
361 ret = !verify_command(data, digest, queryfile, in, token_in,
370 "[-data file_to_hash] [-digest digest_bytes]"
383 "ts -verify [-data file_to_hash] [-digest digest_bytes] "
466 static int query_command(const char *data, char *digest, const EVP_MD *md,
484 /* Open the file if no explicit digest bytes were specified. */
485 if (!digest
489 query = create_query(data_bio, digest, md,
533 static TS_REQ *create_query(BIO *data_bio, char *digest, const EVP_MD *md,
545 /* Setting default message digest. */
564 /* Adding message digest. */
565 if ((len = create_digest(data_bio, digest, md, &data)) == 0)
598 static int create_digest(BIO *input, char *digest, const EVP_MD *md,
625 /* Digest bytes are specified with digest. */
627 *md_value = string_to_hex(digest, &digest_len);
632 BIO_printf(bio_err, "bad digest, %d bytes "
961 static int verify_command(char *data, char *digest, char *queryfile,
982 if (!(verify_ctx = create_verify_ctx(data, digest, queryfile,
1010 static TS_VERIFY_CTX *create_verify_ctx(char *data, char *digest,
1020 if (data != NULL || digest != NULL)
1029 else if (digest != NULL)
1033 if (!(ctx->imprint = string_to_hex(digest,
1036 BIO_printf(bio_err, "invalid digest string\n");