Go Back   maemo.org - Talk > OS / Platform > Maemo 5 / Fremantle
 
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
  #11  
Old 2015-12-29, 09:36
ceene ceene is offline
 
Join Date: Apr 2014
Location: Madrid, Spain
Posts: 207
Thanks!: 174
Thanked 967 Times in 173 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

Hi there,

Quote:
1.Get the latest OpenSSL (or LibreSSL) building and working properly on Fremantle (including all the newest algorithms and features and protocols as well as correct debian packaging, optimization flags etc for Fremantle)
I've managed to download debian's sid latest openssl (1.0.2e) and have backported its debian/ directory so this package now builds on scratchbox. I've succesfully installed generated libssl1.0.2 .deb package on N900 and it passes the tests openssl includes. Note that these tests result in a segmentation fault when run on scratchbox, it's probably a fault of qemu.

So we've got now a really good start.

Changes I've made are available on https://github.com/agamez/maemo-openssl-1.0.2 This work is not finished but it's a start.

I've found original openssl 0.9.8n-1 source used by debian on top of which maemo built its own library here https://launchpad.net/debian/+source/openssl/0.9.8n-1 so we can check which differences are between what is on maemo and upstream.

Best regards!

EDIT: I can't see any relevant difference between debian's original source code and that on maemo (apt-get source openssl=different_versions_on_repos...). I am almost completely sure that the only differences are in packaging, but there are no new patches. For a library like openssl that would be, in fact, a very very bad idea, so even if there are some differences, changes are they are for bad instead of for benefit of the security of the system.
__________________
OVI and downloads.maemo.nokia.com mirror
Yappari for Maemo
pyLedger for Maemo


If you want to donate, please read this. If you still want to donate, contact me via private message or email. Thank you.

Last edited by ceene; 2015-12-29 at 09:56. Reason: Versions compared
Reply With Quote
The Following 4 Users Say Thank You to ceene For This Useful Post:
  #12  
Old 2015-12-29, 09:52
ginggs's Avatar
ginggs ginggs is offline
 
Join Date: Mar 2012
Posts: 306
Thanks!: 53
Thanked 582 Times in 174 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

Quote:
Originally Posted by jonwil View Post
Anyone know where I can get source code to debian OpenSSL 0.9.8n-1 (the version Maemo Fremantle OpenSSL is based on)?
http://snapshot.debian.org/package/openssl/0.9.8n-1/
Reply With Quote
The Following User Says Thank You to ginggs For This Useful Post:
  #13  
Old 2015-12-29, 11:08
jonwil jonwil is offline
 
Join Date: Oct 2009
Posts: 567
Thanks!: 0
Thanked 2,964 Times in 448 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

I have taken Debian OpenSSL 0.9.8n-1 source from http://snapshot.debian.org/package/openssl/0.9.8n-1/ and Maemo OpenSSL 0.9.8n-1+maemo4+0m5 source from http://repository.maemo.org/pool/mae...ree/o/openssl/. I have renamed the patches in the Debian source to match the names in the Maemo source.

The diff of the resulting folders is attached to this post:

The following changes exist in the Maemo tree vs the Debian tree:
1.Change PERL path in Configure
2.Remove Makefile (its automatically generated from Makefile.org)
3.Change PERL path in a bunch of PERL scripts
4.Remove apps/CA.pl (its automatically generated from apps/CA.pl.in)
5.Add a commented out #ifdef to crypto/ec/ectest.c
6.Comment out an #ifdef in crypto/o_init.c
7.Remove crypto/opensslconf.h and its symlink include/openssl/opensslconf.h (its automatically generated from crypto/opensslconf.h.in)
8.Added various entries to debian/changelog
9.Changed debian/compat from 3 to 5
10.Added a debian/debian.tar.gz file containing an unknown changelog/compat/rules file
11.Change debian/libssl0.9.8.postinst to use sh instead of bash
12.Add headers to various patches
13.Rename the patches (and add an 00list file instead of the series file)
14.Add a new patch 20_load-cert.dpatch
15.Add a new patch 21_configure-cflags.dpatch
16.Add a new patch 22_openssl-psk-0.9.8n-lib.dpatch
17.Add a new patch 23_openssl-psk-0.9.8n-test.dpatch
18.Add a new patch 24_openssl-psk-0.9.8n-doc.dpatch
20.Remove patch kfreebsd-pipe.patch
21.Remove patch rc4-amd64.patch
22.Add lines to debian/rules for include /usr/share/dpatch/dpatch.make, build: patch-stamp build-stamp and clean: unpatch
23.Add include/openssl/cms.h symlink to crypto/cms/cms.h
24.Add include/openssl/jpake.h symlink to crypto/jpake/jpake.h
25.Add a commented out #ifdef to test/ectest.c
26.Make a bunch of changes to test/jpaketest.c
27.Remove tools/c_rehash (its automatically generated from tools/c_rehash.in)

Now we need to figure out the following:
1.Whether any of the above changes (the 5 Nokia patches or the changes made directly to the source code) are still necessary for our OpenSSL 1.0.2e port
2.Whether there is anything removed from OpenSSL (stock or Debian) between 0.9.8n and 1.0.2e that we need on Maemo
and 3.Whether there is anything added to OpenSSL (stock or Debian) between 0.9.8n and 1.0.2e that we dont need on Maemo (i.e. that we need to remove for Maemo)

I suspect there is likely to be nothing satisfying #2 and #3 above (and that its not even worth looking)
Attached Files
File Type: gz ossl.diff.gz (49.5 KB, 38 views)
Reply With Quote
The Following 2 Users Say Thank You to jonwil For This Useful Post:
  #14  
Old 2015-12-29, 11:31
Android_808 Android_808 is offline
 
Join Date: Dec 2010
Posts: 1,203
Thanks!: 640
Thanked 3,027 Times in 901 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

Is this of any use to you: http://abi-laboratory.pro/tracker/timeline/openssl/
Reply With Quote
  #15  
Old 2015-12-29, 11:39
ginggs's Avatar
ginggs ginggs is offline
 
Join Date: Mar 2012
Posts: 306
Thanks!: 53
Thanked 582 Times in 174 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

Quote:
Originally Posted by jonwil View Post
8.Added various entries to debian/changelog
This looks like Nokia forked at Debian version 0.9.8g-10 and then merged at 0.9.8g-13, 0.9.8g-15 and 0.9.8n-1.

Are there older Nokia versions available anywhere?
(Edit: I see openssl_0.9.8g-15maemo4 in the maemo5.0 pool, it might be worth examining a diff there too)

Quote:
Originally Posted by jonwil View Post
9.Changed debian/compat from 3 to 5
Could be a mistake in the Debian packaging. I think this should have been bumped when converting to source format 3.0 (quilt).

Quote:
Originally Posted by jonwil View Post
10.Added a debian/debian.tar.gz file containing an unknown changelog/compat/rules file
Could be a mistake in the Nokia packaging.

Quote:
Originally Posted by jonwil View Post
12.Add headers to various patches
13.Rename the patches (and add an 00list file instead of the series file)
22.Add lines to debian/rules for include /usr/share/dpatch/dpatch.make, build: patch-stamp build-stamp and clean: unpatch
This looks like Debian converted to source format 3.0 (quilt) after the fork and then Nokia reverted to source format 1.0 for the merge.

The Maemo builders have been able to cope with source format 3.0 (quilt) for some years now.

Last edited by ginggs; 2015-12-29 at 11:53.
Reply With Quote
The Following User Says Thank You to ginggs For This Useful Post:
  #16  
Old 2015-12-29, 11:49
ginggs's Avatar
ginggs ginggs is offline
 
Join Date: Mar 2012
Posts: 306
Thanks!: 53
Thanked 582 Times in 174 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

Debian converted to source format 3.0 (quilt) in 0.9.8m-1:
Code:
openssl (0.9.8m-1) unstable; urgency=low

  * New upstream version
  ...
  * Switch to 3.0 (quilt) source package.
I can't see any explicit mention of bumping the compat level to 5, only a bump to level 9 in 2013:
Code:
openssl (1.0.1e-4) unstable; urgency=low
  ...
  * change to debhelper compat level 9:
Reply With Quote
  #17  
Old 2015-12-29, 12:10
bencoh bencoh is offline
 
Join Date: Nov 2014
Posts: 23
Thanks!: 102
Thanked 69 Times in 19 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

Quote:
Originally Posted by jonwil View Post
14.Add a new patch 20_load-cert.dpatch
This one really seems to be maemo specific, but I'm not even sure it's relevant in Maemo5, since I can't find libcst on my device (or in SDK).
See http://maemo-developers.maemo.narkiv...libcst-sources for more info on libcst.

If it tries to dlopen (!) a library that is no longer available, I think we can safely drop it...

Quote:
Originally Posted by jonwil View Post
16.Add a new patch 22_openssl-psk-0.9.8n-lib.dpatch
17.Add a new patch 23_openssl-psk-0.9.8n-test.dpatch
18.Add a new patch 24_openssl-psk-0.9.8n-doc.dpatch
Those have been upstreamed.
See openssl commit ddac1974 and openssl-1.0.0 release changelog.
Reply With Quote
  #18  
Old 2015-12-29, 12:20
pali pali is offline
 
Join Date: May 2010
Posts: 2,151
Thanks!: 221
Thanked 8,459 Times in 1,632 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

libcst was renamed to libmaemosec, see:

https://github.com/community-ssu/mae...ddc9521c847ced
Reply With Quote
The Following User Says Thank You to pali For This Useful Post:
  #19  
Old 2015-12-29, 12:34
bencoh bencoh is offline
 
Join Date: Nov 2014
Posts: 23
Thanks!: 102
Thanked 69 Times in 19 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

Quote:
Originally Posted by pali View Post
libcst was renamed to libmaemosec, see:

https://github.com/community-ssu/mae...ddc9521c847ced
Ah, thanks.
Looks like they didn't bother updating the openssl package though... and I don't see how this dlopen() could work the way it is
Reply With Quote
The Following User Says Thank You to bencoh For This Useful Post:
  #20  
Old 2015-12-29, 12:38
pali pali is offline
 
Join Date: May 2010
Posts: 2,151
Thanks!: 221
Thanked 8,459 Times in 1,632 Posts
Default Re: Suggested roadmap for updating OpenSSL on Fremantle

Looks like that function is not in fremantle version. Something from diablo or bora. I suggest to drop that patch.
Reply With Quote
The Following User Says Thank You to pali For This Useful Post:
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:58.