On Fri, May 20, 2011 at 03:48:25PM -0500, George McCollister wrote:
> On 05/20/2011 12:49 PM, Michael Olbrich wrote:
> >Ok, I've pushed everything but this patch. For some reason it never works
> >for me. I always get:
> >  * opkg_verify_file: Verification failure.
> >
> >I have to admit I have no idea how this stuff works. So I probably did
> >something wrong when generating the key/cert. Any hints?
> Yes, I have a pretty good idea of what the problem could be.
> Typically certificates are valid only for a certain window of time.
> By default this window of time begins on the date/time of the
> machine you generated the certificate on. You can then specify how
> long you want to the certificate to stay valid. If your target
> doesn't have its clock set correctly  (like possibly 1970-1-1
> 00:00:00) it will not pass verification. Use ntpdate or something
> similar to set the time on your target. Alternatively you can force
> a different start date (like 1970-1-1 00:00:00) when creating the
> certificate. I'm not sure if you can force a start time with the
> openssl command, I find it easiest to do it in a Python script using
> pyOpenSSL.
> 
> If the clock on your machine was set correctly when you generated
> the certificate and the clock on the target is also set correctly
> there must be some other problem with the way it was signed.
> 
> You can test the verification using the following command:
> openssl smime -verify -in Packages.sig -inform PEM -content Packages
> -CAfile opkg.crt
> 
> Let me know if that helps.

Thanks! That was the problem. opkg is happy now.
I've cleaned up the signature generation stuff and pushed everything. It
works for me (tm). Please check that I didn't break anything.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
[email protected]

Reply via email to