|
Lines 473-479
main(int argc, char *argv[])
Link Here
|
| 473 |
"force overwriting of output file", NULL }, |
473 |
"force overwriting of output file", NULL }, |
| 474 |
{"sign", 's', POPT_ARG_VAL, &ctxp->sign, 1, |
474 |
{"sign", 's', POPT_ARG_VAL, &ctxp->sign, 1, |
| 475 |
"create a new signature", NULL }, |
475 |
"create a new signature", NULL }, |
| 476 |
{"hash", 'h', POPT_ARG_VAL, &ctxp->hash, 1, "hash binary", NULL }, |
476 |
{"hash", 'h', POPT_ARG_VAL, &ctxp->hash, 1, |
|
|
477 |
"hash binary", NULL }, |
| 477 |
{"digest_type", 'd', POPT_ARG_STRING|POPT_ARGFLAG_SHOW_DEFAULT, |
478 |
{"digest_type", 'd', POPT_ARG_STRING|POPT_ARGFLAG_SHOW_DEFAULT, |
| 478 |
&digest_name, 0, "digest type to use for pe hash" }, |
479 |
&digest_name, 0, "digest type to use for pe hash" }, |
| 479 |
{"import-signed-certificate", 'm', |
480 |
{"import-signed-certificate", 'm', |
|
Lines 669-675
main(int argc, char *argv[])
Link Here
|
| 669 |
open_input(ctxp); |
670 |
open_input(ctxp); |
| 670 |
open_output(ctxp); |
671 |
open_output(ctxp); |
| 671 |
close_input(ctxp); |
672 |
close_input(ctxp); |
| 672 |
generate_digest(ctxp->cms_ctx, ctxp->outpe); |
673 |
generate_digest(ctxp->cms_ctx, ctxp->outpe, 1); |
| 673 |
sigspace = calculate_signature_space(ctxp->cms_ctx, |
674 |
sigspace = calculate_signature_space(ctxp->cms_ctx, |
| 674 |
ctxp->outpe); |
675 |
ctxp->outpe); |
| 675 |
allocate_signature_space(ctxp->outpe, sigspace); |
676 |
allocate_signature_space(ctxp->outpe, sigspace); |
|
Lines 683-689
main(int argc, char *argv[])
Link Here
|
| 683 |
case EXPORT_SATTRS: |
684 |
case EXPORT_SATTRS: |
| 684 |
open_input(ctxp); |
685 |
open_input(ctxp); |
| 685 |
open_sattr_output(ctxp); |
686 |
open_sattr_output(ctxp); |
| 686 |
generate_digest(ctxp->cms_ctx, ctxp->inpe); |
687 |
generate_digest(ctxp->cms_ctx, ctxp->inpe, 1); |
| 687 |
generate_sattr_blob(ctxp); |
688 |
generate_sattr_blob(ctxp); |
| 688 |
close_sattr_output(ctxp); |
689 |
close_sattr_output(ctxp); |
| 689 |
close_input(ctxp); |
690 |
close_input(ctxp); |
|
Lines 779-785
main(int argc, char *argv[])
Link Here
|
| 779 |
break; |
780 |
break; |
| 780 |
case GENERATE_DIGEST|PRINT_DIGEST: |
781 |
case GENERATE_DIGEST|PRINT_DIGEST: |
| 781 |
open_input(ctxp); |
782 |
open_input(ctxp); |
| 782 |
generate_digest(ctxp->cms_ctx, ctxp->inpe); |
783 |
generate_digest(ctxp->cms_ctx, ctxp->inpe, 0); |
| 783 |
print_digest(ctxp); |
784 |
print_digest(ctxp); |
| 784 |
break; |
785 |
break; |
| 785 |
/* generate a signature and save it in a separate file */ |
786 |
/* generate a signature and save it in a separate file */ |
|
Lines 793-799
main(int argc, char *argv[])
Link Here
|
| 793 |
} |
794 |
} |
| 794 |
open_input(ctxp); |
795 |
open_input(ctxp); |
| 795 |
open_sig_output(ctxp); |
796 |
open_sig_output(ctxp); |
| 796 |
generate_digest(ctxp->cms_ctx, ctxp->inpe); |
797 |
generate_digest(ctxp->cms_ctx, ctxp->inpe, 1); |
| 797 |
generate_signature(ctxp->cms_ctx); |
798 |
generate_signature(ctxp->cms_ctx); |
| 798 |
export_signature(ctxp->cms_ctx, ctxp->outsigfd, ctxp->ascii); |
799 |
export_signature(ctxp->cms_ctx, ctxp->outsigfd, ctxp->ascii); |
| 799 |
break; |
800 |
break; |
|
Lines 814-824
main(int argc, char *argv[])
Link Here
|
| 814 |
open_input(ctxp); |
815 |
open_input(ctxp); |
| 815 |
open_output(ctxp); |
816 |
open_output(ctxp); |
| 816 |
close_input(ctxp); |
817 |
close_input(ctxp); |
| 817 |
generate_digest(ctxp->cms_ctx, ctxp->outpe); |
818 |
generate_digest(ctxp->cms_ctx, ctxp->outpe, 1); |
| 818 |
sigspace = calculate_signature_space(ctxp->cms_ctx, |
819 |
sigspace = calculate_signature_space(ctxp->cms_ctx, |
| 819 |
ctxp->outpe); |
820 |
ctxp->outpe); |
| 820 |
allocate_signature_space(ctxp->outpe, sigspace); |
821 |
allocate_signature_space(ctxp->outpe, sigspace); |
| 821 |
generate_digest(ctxp->cms_ctx, ctxp->outpe); |
822 |
generate_digest(ctxp->cms_ctx, ctxp->outpe, 1); |
| 822 |
generate_signature(ctxp->cms_ctx); |
823 |
generate_signature(ctxp->cms_ctx); |
| 823 |
insert_signature(ctxp->cms_ctx, ctxp->signum); |
824 |
insert_signature(ctxp->cms_ctx, ctxp->signum); |
| 824 |
finalize_signatures(ctxp->cms_ctx->signatures, |
825 |
finalize_signatures(ctxp->cms_ctx->signatures, |
| 825 |
- |
|
|
| 826 |
certificate list. |
826 |
certificate list. |
| 827 |
-- |
|
|
| 828 |
src/wincert.c | 22 +++++++++++++++++++++- |
827 |
src/wincert.c | 22 +++++++++++++++++++++- |
| 829 |
1 file changed, 21 insertions(+), 1 deletion(-) |
828 |
1 file changed, 21 insertions(+), 1 deletion(-) |