Closed
Bug 798413
Opened 13 years ago
Closed 13 years ago
Add the ability to export signatures from a libmar file
Categories
(Toolkit :: Application Update, defect)
Tracking
()
People
(Reporter: bbondy, Assigned: bbondy)
References
Details
Attachments
(3 files, 6 obsolete files)
|
2.62 KB,
patch
|
briansmith
:
review+
|
Details | Diff | Splinter Review |
|
6.85 KB,
patch
|
bbondy
:
review+
|
Details | Diff | Splinter Review |
|
11.45 KB,
patch
|
bbondy
:
review+
|
Details | Diff | Splinter Review |
We need a way to export a specific signature from a MAR file.
This should include a way to specify which signature should be exported.
The exported signature should be in a copy/pasteable encoding such as base64.
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #669650 -
Flags: review?(bsmith)
| Assignee | ||
Comment 2•13 years ago
|
||
Attachment #669651 -
Flags: review?(bsmith)
| Assignee | ||
Comment 3•13 years ago
|
||
Attachment #669652 -
Flags: review?(bsmith)
| Assignee | ||
Comment 4•13 years ago
|
||
- Fixed file handle not being closed after extracting sig
- Synced parameter name/comments
- Fixed a couple typos
Attachment #669650 -
Attachment is obsolete: true
Attachment #669650 -
Flags: review?(bsmith)
Attachment #669978 -
Flags: review?(bsmith)
| Assignee | ||
Comment 5•13 years ago
|
||
Rebased after multi signing review comments and carried forward similar review comments into this patch.
Attachment #669978 -
Attachment is obsolete: true
Attachment #669978 -
Flags: review?(bsmith)
Attachment #671426 -
Flags: review?(bsmith)
| Assignee | ||
Comment 6•13 years ago
|
||
Rebased for windows change
Attachment #671426 -
Attachment is obsolete: true
Attachment #671426 -
Flags: review?(bsmith)
Attachment #671462 -
Flags: review?(bsmith)
| Assignee | ||
Comment 7•13 years ago
|
||
Attachment #671462 -
Attachment is obsolete: true
Attachment #671462 -
Flags: review?(bsmith)
Attachment #671471 -
Flags: review?(bsmith)
Comment 8•13 years ago
|
||
Comment on attachment 671471 [details] [diff] [review]
Patch v4' - Implementation for extracting signatures
Review of attachment 671471 [details] [diff] [review]:
-----------------------------------------------------------------
::: modules/libmar/sign/mar_sign.c
@@ +507,5 @@
> + fprintf(stderr, "ERROR: could not open source file: %s\n", src);
> + goto failure;
> + }
> +
> + fpDest = fopen(dest, "wb");
IMO, it is better to just do things the Unix way and output to stdout. If the user wants the output in a file then they can redirect the output.
I suspect people will want to write scripts like:
mar -X0 [...] >> signatures
echo >> signatures
mar -X1 [...] >> signatures
echo >> signatures
Attachment #671471 -
Flags: review?(bsmith) → review+
Updated•13 years ago
|
Attachment #669652 -
Flags: review?(bsmith) → review+
Comment 9•13 years ago
|
||
Comment on attachment 669651 [details] [diff] [review]
Patch v1 - Tests for extracting signatures
Review of attachment 669651 [details] [diff] [review]:
-----------------------------------------------------------------
::: modules/libmar/tests/unit/test_sign_verify.js
@@ +325,5 @@
> let outMARData = getBinaryFileData(outMAR);
> let originalMARData = getBinaryFileData(originalMAR);
> compareBinaryData(outMARData, originalMARData);
> },
> + // Test extracting the first MAR in a MAR that has only a single signature
s/first MAR/first signature/
Attachment #669651 -
Flags: review?(bsmith) → review+
| Assignee | ||
Comment 10•13 years ago
|
||
(In reply to Brian Smith (:bsmith) from comment #8)
> Comment on attachment 671471 [details] [diff] [review]
> Patch v4' - Implementation for extracting signatures
>
> Review of attachment 671471 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: modules/libmar/sign/mar_sign.c
> @@ +507,5 @@
> > + fprintf(stderr, "ERROR: could not open source file: %s\n", src);
> > + goto failure;
> > + }
> > +
> > + fpDest = fopen(dest, "wb");
>
> IMO, it is better to just do things the Unix way and output to stdout. If
> the user wants the output in a file then they can redirect the output.
>
> I suspect people will want to write scripts like:
>
> mar -X0 [...] >> signatures
> echo >> signatures
> mar -X1 [...] >> signatures
> echo >> signatures
I considered changing this, but there's no point and no advantage since you can just do something like less filename and pipe it wherever you want.
There's more important things to do.
| Assignee | ||
Comment 11•13 years ago
|
||
Fixed comment. Carrying forward r+.
Attachment #669651 -
Attachment is obsolete: true
Attachment #671696 -
Flags: review+
| Assignee | ||
Comment 12•13 years ago
|
||
Small fix to initialize fpSrc and fpDest to NULL which caused intermittent crash on invalid path specified test cases.
Carrying forward r+.
Attachment #671471 -
Attachment is obsolete: true
Attachment #671703 -
Flags: review+
| Assignee | ||
Comment 13•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/29ee4f3f346b
https://hg.mozilla.org/mozilla-central/rev/b3d74f835aa9
https://hg.mozilla.org/mozilla-central/rev/53560434a236
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 14•13 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•