<div dir="ltr">Hi Alex,<br><br>that sounds correct. For more info<br><a href="http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/updater/Makefile.in#16">http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/updater/Makefile.in#16</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 30, 2015 at 4:26 PM, Alex Kontos <span dir="ltr"><<a href="mailto:alexboy94@msn.com" target="_blank">alexboy94@msn.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Robert,<div><br></div><div>Ah right I see! So a build that didn’t specify a certificate will have used Mozilla’s certificates? I’m assuming from toolkit/mozapps/update/updater.</div><div>Therefore I’m guessing you can’t sign a MAR with those certificates and therefore can’t update that build?</div><div><br></div><div>Thanks for all the help so far,</div><div>Alex</div><div><div class="h5"><div><br><div><blockquote type="cite"><div>On 27 Mar 2015, at 20:27, Robert Strong <<a href="mailto:rstrong@mozilla.com" target="_blank">rstrong@mozilla.com</a>> wrote:</div><br><div><div dir="ltr"><div><div>Hi Alex,<br><br></div>It most definitely expects a specific certificate(s) and which cerificate(s) it expects is set when the application is compiled. The applicable code:<br><a href="http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/updater/archivereader.cpp" target="_blank">http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/updater/archivereader.cpp</a><br><br></div>Robert<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 27, 2015 at 1:03 PM, Alex Kontos <span dir="ltr"><<a href="mailto:alexboy94@msn.com" target="_blank">alexboy94@msn.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Good news, I managed to sign the MAR successfully with a cert I generated! Thanks for the advice, It looks like the NSS database was malformed which caused it to throw out an error saying it can’t initialise the directory.</div><div><br></div><div>Bad news is that a test Firefox build updater is throwing failed 19 code, which is CERT_VERIFY_ERROR right? Is the updater looking for specific certs?</div><div><br></div><br><div><blockquote type="cite"><div><div><div>On 27 Mar 2015, at 00:41, Alex Kontos <<a href="mailto:alexboy94@msn.com" target="_blank">alexboy94@msn.com</a>> wrote:</div><br></div></div><div><div dir="ltr" style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><div><br>@Robert Strong<br><br>Yes that worked fine and I verified the MAR was signed correctly with that test cert as well! Could there be something wrong with the NSS build I made? I've tried with different versions of NSS but they all give the same error message. Are the binaries used to make the test certificates available anywhere?<br><br>@Brian Bondy<br><br>Yes thanks those are the instructions I followed :). I'll look at that test as well, thanks.<br><br></div></div><div><div><div><hr>From: <a href="mailto:bbondy@gmail.com" target="_blank">bbondy@gmail.com</a><br>Date: Thu, 26 Mar 2015 00:04:35 -0400<br>Subject: Re: Can't sign MAR files on Windows<br>To: <a href="mailto:rstrong@mozilla.com" target="_blank">rstrong@mozilla.com</a><br>CC: <a href="mailto:alexboy94@msn.com" target="_blank">alexboy94@msn.com</a>; <a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br><br><div dir="ltr">I didn't spot off hand what's wrong, but there are tests that run on Windows which does signing, so you can get ideas on how to run it here:<div><a href="https://dxr.mozilla.org/mozilla-central/source/modules/libmar/tests/unit/test_sign_verify.js#23" target="_blank">https://dxr.mozilla.org/mozilla-central/source/modules/libmar/tests/unit/test_sign_verify.js#23</a><br></div><div><br></div><div>You can also find example usage of certutil here:</div><div><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=701087#c1" target="_blank">https://bugzilla.mozilla.org/show_bug.cgi?id=701087#c1</a><br></div></div><div><br><div>On Wed, Mar 25, 2015 at 6:05 PM, Robert Strong<span> </span><span dir="ltr"><<a href="mailto:rstrong@mozilla.com" target="_blank">rstrong@mozilla.com</a>></span><span> </span>wrote:<br><blockquote style="border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Alex,<br><br></div>To narrow things down try signing with the test certificate in the tree as follows:<br><path_to_obj_dir>\dist\bin\signmar.exe -d <path_to_source_dir>\modules\libmar\tests\unit\data -n mycert -s <path_to_original_mar>\mar_you_created.mar <path_to_output_mar>\output.mar<br><br></div><div>Also, signmar only supports SHA1 atm.<br><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1105689" target="_blank">https://bugzilla.mozilla.org/show_bug.cgi?id=1105689</a><br><br></div>Robert<br></div><div><br><div><div><div>On Wed, Mar 25, 2015 at 1:17 PM, Alex Kontos<span> </span><span dir="ltr"><<a href="mailto:alexboy94@msn.com" target="_blank">alexboy94@msn.com</a>></span>wrote:<br></div></div><blockquote style="border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div style="word-wrap:break-word">I can’t seem to sign MAR files on Windows (haven’t tested other OSs). I’m using signmar.exe generated by the build, and I get the following error:<br><br><div>ERROR: Could not initialize NSS</div><div>ERROR: Could not init config dir: C:\NSScert</div><div><br></div><div>I’ve generated my certificates using certutil as defined in this <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=701087#c1" target="_blank">bug</a>. I’ve tried using different versions of NSS as well to no amends.</div><div><br></div><div>Steps I followed:</div><div><br></div><div><ol><li>Generate MAR file (have tested MAR is valid as a build made with -disable-verify-mar accepts it)</li><li>certutil -N -d /c/NSScert</li><li>certutil -A -n test_cert -t "u,u,u" -i testcert.der -d /c/NSScert</li><li>certutil -L -d /c/NSScert (just to check, there is a valid output)</li><li>Attempt to sign MAR:</li><li>signmar -d /c/NSScert -n test_cert -s update.mar output_update.mar</li></ol><div>Which brings us to the error defined above.</div><div><br></div></div><div><br></div><div>The build is Visual Studio 2013 64-Bit, no changes at all, just default Firefox build. Is there a specific way I’m supposed to sign MAR files?</div></div><br></div></div>_______________________________________________<br>firefox-dev mailing list<br><a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br><a href="https://mail.mozilla.org/listinfo/firefox-dev" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br><br></blockquote></div><br></div><br>_______________________________________________<br>firefox-dev mailing list<br><a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br><a href="https://mail.mozilla.org/listinfo/firefox-dev" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br><br></blockquote></div><br><br clear="all"><div><br></div>--<span> </span><br><div>Thanks,<br>Brian R. Bondy</div></div><br></div></div>_______________________________________________ firefox-dev mailing list<a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><span> </span><a href="https://mail.mozilla.org/listinfo/firefox-dev" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a></div></div><span><span style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">_______________________________________________</span><br style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">firefox-dev mailing list</span><br style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:firefox-dev@mozilla.org" style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">firefox-dev@mozilla.org</a><br style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="https://mail.mozilla.org/listinfo/firefox-dev" style="font-family:Calibri;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a></span></div></blockquote></div><br></div></blockquote></div><br></div>
_______________________________________________<br>firefox-dev mailing list<br><a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br><a href="https://mail.mozilla.org/listinfo/firefox-dev" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>