Re: [PATCH 3/3] Port openssl to RTEMS.

2017-08-09 Thread Sichen Zhao
Ok, after the discussion, i will add it in my second version of openssl patches.

Best Regards
Sichen Zhao


From: devel  on behalf of Chris Johns 

Sent: Thursday, August 10, 2017 7:05
To: Sichen Zhao; devel@rtems.org
Subject: Re: [PATCH 3/3] Port openssl to RTEMS.

Should we consider an 'OPENSSL.README' file in the top of libbsd to make sure we
are covered?

Something like:

8<---
The RTEMS LibBSD package contains OpenSSL. Please refer to
https://www.openssl.org/ for the legalities related to your use.

OpenSSL
---

OpenSSL 1.0.2l 25 May 2017

 Copyright (c) 1998-2015 The OpenSSL Project
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
All rights reserved.

LEGALITIES
--

A number of nations restrict the use or export of cryptography. If you
are potentially subject to such restrictions you should seek competent
professional legal advice before attempting to develop or distribute
cryptographic code.
-8<---

Also once this is merged the wiki page
https://devel.rtems.org/wiki/Packages/OpenSSL needs to be updated to say OpenSSL
is part of LibBSD and to hold the legalities section the current page moved to
https://devel.rtems.org/wiki/Packages/OpenSSL/Legacy-Networking.

Thanks for this work and effort, it is really great to see openssl is now a
constant feature of RTEMS.

Chris

On 10/08/2017 02:29, Sichen Zhao wrote:
> ---
>  builder.py   |  58 
>  libbsd.py| 952 
> +++
>  libbsd_waf.py| 901 +++-
>  waf_generator.py |   3 +
>  4 files changed, 1898 insertions(+), 16 deletions(-)
>
> diff --git a/builder.py b/builder.py
> index 53802c7..2f6c490 100755
> --- a/builder.py
> +++ b/builder.py
> @@ -217,6 +217,64 @@ def headerPaths():
>  ('freebsd/sys/netinet',   '*.h',   
> 'netinet'),
>  ('freebsd/sys/netinet6',  '*.h',   
> 'netinet6'),
>  ('freebsd/sys/netipsec',  '*.h',   
> 'netipsec'),
> +('freebsd/crypto/openssl', '*.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto', '*.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto', 
> '(opensslconf|opensslv|crypto).h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/aes', 'aes.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/err', 'err.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/bio', '*.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/dsa', '*.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/lhash', 'lhash.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/asn1', '(asn1|asn1t).h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/x509', 'x509.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/bn', 'bn.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/camellia', 'camellia.h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/cast', 'cast.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/objects', '(objects|obj_mac).h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/conf', '(conf|conf_api).h',  
>  'openssl'),
> +('freebsd/crypto/openssl/crypto/des', '(des|des_old).h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/ecdh', 'ecdh.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/ecdsa', 'ecdsa.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/idea', 'idea.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/mdc2', 'mdc2.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/md4', 'md4.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/md5', 'md5.h',   

Re: [PATCH 3/3] Port openssl to RTEMS.

2017-08-09 Thread Chris Johns
On 10/08/2017 15:56, Christian Mauderer wrote:
> Am 10.08.2017 um 07:46 schrieb Chris Johns:
>> On 10/08/2017 15:42, Christian Mauderer wrote:
>>> The version here is likely to become out of sync with the sources. To be
>>> exact: It already is in your suggestion.
>>> freebsd-org/crypto/openssl/README states the version 1.0.2.k. Maybe we
>>> should refer to that file instead?
>>
>> Sure with a specific reference to the section 'LEGALITIES'. We need to make 
>> sure
>> we are clear there is something users should review and look into.
>>
>> Chris
>>
> 
> I mostly wanted to refer there for the version and copyright. The
> paragraph regarding crypto regulations should be unlikely to change in
> the near future. Even if it does it should be universal enough that it
> works even if something is changed in the original README.
> 

Oh ok. I will leave this with you.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 3/3] Port openssl to RTEMS.

2017-08-09 Thread Christian Mauderer
Am 10.08.2017 um 07:46 schrieb Chris Johns:
> On 10/08/2017 15:42, Christian Mauderer wrote:
>> The version here is likely to become out of sync with the sources. To be
>> exact: It already is in your suggestion.
>> freebsd-org/crypto/openssl/README states the version 1.0.2.k. Maybe we
>> should refer to that file instead?
> 
> Sure with a specific reference to the section 'LEGALITIES'. We need to make 
> sure
> we are clear there is something users should review and look into.
> 
> Chris
> 

I mostly wanted to refer there for the version and copyright. The
paragraph regarding crypto regulations should be unlikely to change in
the near future. Even if it does it should be universal enough that it
works even if something is changed in the original README.

Regards

Christian

-- 

embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.maude...@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 3/3] Port openssl to RTEMS.

2017-08-09 Thread Chris Johns
On 10/08/2017 15:42, Christian Mauderer wrote:
> The version here is likely to become out of sync with the sources. To be
> exact: It already is in your suggestion.
> freebsd-org/crypto/openssl/README states the version 1.0.2.k. Maybe we
> should refer to that file instead?

Sure with a specific reference to the section 'LEGALITIES'. We need to make sure
we are clear there is something users should review and look into.

Chris

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 3/3] Port openssl to RTEMS.

2017-08-09 Thread Chris Johns
Should we consider an 'OPENSSL.README' file in the top of libbsd to make sure we
are covered?

Something like:

8<---
The RTEMS LibBSD package contains OpenSSL. Please refer to
https://www.openssl.org/ for the legalities related to your use.

OpenSSL
---

OpenSSL 1.0.2l 25 May 2017

 Copyright (c) 1998-2015 The OpenSSL Project
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
All rights reserved.

LEGALITIES
--

A number of nations restrict the use or export of cryptography. If you
are potentially subject to such restrictions you should seek competent
professional legal advice before attempting to develop or distribute
cryptographic code.
-8<---

Also once this is merged the wiki page
https://devel.rtems.org/wiki/Packages/OpenSSL needs to be updated to say OpenSSL
is part of LibBSD and to hold the legalities section the current page moved to
https://devel.rtems.org/wiki/Packages/OpenSSL/Legacy-Networking.

Thanks for this work and effort, it is really great to see openssl is now a
constant feature of RTEMS.

Chris

On 10/08/2017 02:29, Sichen Zhao wrote:
> ---
>  builder.py   |  58 
>  libbsd.py| 952 
> +++
>  libbsd_waf.py| 901 +++-
>  waf_generator.py |   3 +
>  4 files changed, 1898 insertions(+), 16 deletions(-)
> 
> diff --git a/builder.py b/builder.py
> index 53802c7..2f6c490 100755
> --- a/builder.py
> +++ b/builder.py
> @@ -217,6 +217,64 @@ def headerPaths():
>  ('freebsd/sys/netinet',   '*.h',   
> 'netinet'),
>  ('freebsd/sys/netinet6',  '*.h',   
> 'netinet6'),
>  ('freebsd/sys/netipsec',  '*.h',   
> 'netipsec'),
> +('freebsd/crypto/openssl', '*.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto', '*.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto', 
> '(opensslconf|opensslv|crypto).h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/aes', 'aes.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/err', 'err.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/bio', '*.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/dsa', '*.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/lhash', 'lhash.h', 'openssl'),
> +('freebsd/crypto/openssl/crypto/asn1', '(asn1|asn1t).h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/x509', 'x509.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/bn', 'bn.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/camellia', 'camellia.h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/cast', 'cast.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/objects', '(objects|obj_mac).h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/conf', '(conf|conf_api).h',  
>  'openssl'),
> +('freebsd/crypto/openssl/crypto/des', '(des|des_old).h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/ecdh', 'ecdh.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/ecdsa', 'ecdsa.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/idea', 'idea.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/mdc2', 'mdc2.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/md4', 'md4.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/md5', 'md5.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/rc2', 'rc2.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/rc4', 'rc4.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/ripemd', 'ripemd.h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/seed', 'seed.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/sha', 'sha.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/ui', '(ui_compat|ui).h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/whrlpool', 'whrlpool.h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/x509v3', 'x509v3.h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/x509', 'x509_vfy.h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/buffer', 'buffer.h', 
>   'openssl'),
> +('freebsd/crypto/openssl/crypto/comp', 'comp.h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/stack', '(stack|safestack).h',   
> 'openssl'),
> +('freebsd/crypto/openssl/crypto/asn1', 'asn

[PATCH 3/3] Port openssl to RTEMS.

2017-08-09 Thread Sichen Zhao
---
 builder.py   |  58 
 libbsd.py| 952 +++
 libbsd_waf.py| 901 +++-
 waf_generator.py |   3 +
 4 files changed, 1898 insertions(+), 16 deletions(-)

diff --git a/builder.py b/builder.py
index 53802c7..2f6c490 100755
--- a/builder.py
+++ b/builder.py
@@ -217,6 +217,64 @@ def headerPaths():
 ('freebsd/sys/netinet',   '*.h',   'netinet'),
 ('freebsd/sys/netinet6',  '*.h',   'netinet6'),
 ('freebsd/sys/netipsec',  '*.h',   'netipsec'),
+('freebsd/crypto/openssl', '*.h', 'openssl'),
+('freebsd/crypto/openssl/crypto', '*.h', 'openssl'),
+('freebsd/crypto/openssl/crypto', 
'(opensslconf|opensslv|crypto).h', 'openssl'),
+('freebsd/crypto/openssl/crypto/aes', 'aes.h', 'openssl'),
+('freebsd/crypto/openssl/crypto/err', 'err.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/bio', '*.h', 'openssl'),
+('freebsd/crypto/openssl/crypto/dsa', '*.h', 'openssl'),
+('freebsd/crypto/openssl/crypto/lhash', 'lhash.h', 'openssl'),
+('freebsd/crypto/openssl/crypto/asn1', '(asn1|asn1t).h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/x509', 'x509.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/bn', 'bn.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/camellia', 'camellia.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/cast', 'cast.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/objects', '(objects|obj_mac).h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/conf', '(conf|conf_api).h',
   'openssl'),
+('freebsd/crypto/openssl/crypto/des', '(des|des_old).h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/ecdh', 'ecdh.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/ecdsa', 'ecdsa.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/idea', 'idea.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/mdc2', 'mdc2.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/md4', 'md4.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/md5', 'md5.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/rc2', 'rc2.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/rc4', 'rc4.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/ripemd', 'ripemd.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/seed', 'seed.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/sha', 'sha.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/ui', '(ui_compat|ui).h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/whrlpool', 'whrlpool.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/x509v3', 'x509v3.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/x509', 'x509_vfy.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/buffer', 'buffer.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/comp', 'comp.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/stack', '(stack|safestack).h', 
  'openssl'),
+('freebsd/crypto/openssl/crypto/asn1', 'asn1_mac.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/pem', '(pem|pem2).h',  
 'openssl'),
+('freebsd/crypto/openssl/crypto/rsa', 'rsa.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/evp', 'evp.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/ec', 'ec.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/engine', 'engine.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/pkcs7', 'pkcs7.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/hmac', 'hmac.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/pqueue', 'pqueue.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/ocsp', 'ocsp.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/rand', 'rand.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/srp', 'srp.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/dh', 'dh.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/dso', 'dso.h',   
'openssl'),
+('freebsd/crypto/openssl/crypto/krb5', 'krb5_asn.h',   
'openssl'),
+