Add openssl lib support for WPA on RTEMS-libbsd
The WPA encrypted WiFi need openssl lib support. So we need port openssl from FreeBSD to RTEMS-libbsd.
1. Add openssl lib files in libbsd.py
+# /crypto/openssl
+#
+def crypto_openssl(mm):
+ mod = builder.Module('crypto_openssl')
+ mod.addUserSpaceHeaderFiles(
+ [
+ 'crypto/openssl/engines/e_cswift_err.h',
+ 'crypto/openssl/engines/e_aep_err.h',
+ 'crypto/openssl/engines/e_gmp_err.h',
+ 'crypto/openssl/engines/ccgost/gost2001_keyx.h',
+ 'crypto/openssl/engines/ccgost/e_gost_err.h',
+ 'crypto/openssl/engines/ccgost/gost_params.h',
+ 'crypto/openssl/engines/ccgost/gost_lcl.h',
+ 'crypto/openssl/engines/ccgost/gost89.h',
......
As the number of openssl files is too large, we do not expand in detail.
By the way, there are some files which shouldn't be compiled. so for these files we need use a new rule.
+ mod.addFile(mm.generator['file']('crypto/openssl/crypto/LPdir_unix.c',
+ mm.generator['freebsd-path'](),
+ mm.generator['some-name-for-FromFreeBSDToRTEMSUserSpaceSourceConverter'](),
+ mm.generator['some-name-for-FromRTEMSToFreeBSDSourceConverter'](),
+ mm.generator['some-name-for-BuildSystemFragmentComposer']()))
+ mod.addFile(mm.generator['file']('crypto/openssl/crypto/ec/ecp_nistz256_table.c',
+ mm.generator['freebsd-path'](),
+ mm.generator['some-name-for-FromFreeBSDToRTEMSUserSpaceSourceConverter'](),
+ mm.generator['some-name-for-FromRTEMSToFreeBSDSourceConverter'](),
+ mm.generator['some-name-for-BuildSystemFragmentComposer']()))
2. Add the new rule in waf_generator.py
+ self.generator['some-name-for-FromFreeBSDToRTEMSUserSpaceSourceConverter'] = builder.FromFreeBSDToRTEMSUserSpaceSourceConverter
+ self.generator['some-name-for-FromRTEMSToFreeBSDSourceConverter'] = builder.FromRTEMSToFreeBSDSourceConverter
+ self.generator['some-name-for-BuildSystemFragmentComposer'] = builder.BuildSystemFragmentComposer
3. Add these files installed into a directory with a different name then it's source directory in builder.py.
+ ('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'),
+ ('freebsd/crypto/openssl/crypto/cms', 'cms.h', 'openssl'),
+ ('freebsd/crypto/openssl/crypto/txt_db', 'txt_db.h', 'openssl'),
+ ('freebsd/crypto/openssl/crypto/ts', 'ts.h', 'openssl'),
+ ('freebsd/crypto/openssl/crypto/modes', 'modes.h', 'openssl'),
+ ('freebsd/crypto/openssl/crypto/pkcs12', 'pkcs12.h', 'openssl'),
+ ('freebsd/crypto/openssl/crypto/bf', 'blowfish.h', 'openssl'),
+ ('freebsd/crypto/openssl/crypto/cmac', 'cmac.h', 'openssl'),
+ ('freebsd/crypto/openssl/ssl', '(ssl|kssl|ssl2).h', 'openssl'),
+ ('freebsd/crypto/openssl/ssl', '*.h', 'openssl'),
评论
发表评论