version 1.15, 2019/08/30 11:19:00 |
version 1.16, 2019/08/30 11:43:34 |
|
|
if (*name++ != '-') |
if (*name++ != '-') |
return (1); |
return (1); |
|
|
if ((dgst_config.m = EVP_get_digestbyname(name)) != NULL) |
if ((dgst_config.m = EVP_get_digestbyname(name)) == NULL) |
dgst_config.md = dgst_config.m; |
|
else |
|
return (1); |
return (1); |
|
|
|
dgst_config.md = dgst_config.m; |
|
|
*argsused = 1; |
*argsused = 1; |
return (0); |
return (0); |
} |
} |
|
|
static const struct option dgst_options[] = { |
static const struct option dgst_options[] = { |
{ |
{ |
.name = "binary", |
.name = "binary", |
.desc = "Output in binary form", |
.desc = "Output the digest or signature in binary form", |
.type = OPTION_VALUE, |
.type = OPTION_VALUE, |
.opt.value = &dgst_config.out_bin, |
.opt.value = &dgst_config.out_bin, |
.value = 1, |
.value = 1, |
}, |
}, |
{ |
{ |
.name = "c", |
.name = "c", |
.desc = "To output the digest with separating colons", |
.desc = "Print the digest in two-digit groups separated by colons", |
.type = OPTION_VALUE, |
.type = OPTION_VALUE, |
.opt.value = &dgst_config.separator, |
.opt.value = &dgst_config.separator, |
.value = 1, |
.value = 1, |
}, |
}, |
{ |
{ |
.name = "d", |
.name = "d", |
.desc = "To output debug info", |
.desc = "Print BIO debugging information", |
.type = OPTION_FLAG, |
.type = OPTION_FLAG, |
.opt.flag = &dgst_config.debug, |
.opt.flag = &dgst_config.debug, |
}, |
}, |
|
|
}, |
}, |
{ |
{ |
.name = "r", |
.name = "r", |
.desc = "To output the digest in coreutils format", |
.desc = "Output the digest in coreutils format", |
.type = OPTION_VALUE, |
.type = OPTION_VALUE, |
.opt.value = &dgst_config.separator, |
.opt.value = &dgst_config.separator, |
.value = 2, |
.value = 2, |