Commit d145e783 authored by Max Lv's avatar Max Lv

Merge branch 'master' of github.com:shadowsocks/shadowsocks-android

parents 44ce054f cb920644
language: java language: java
before_install: before_install:
- sudo apt-get install libc6-dev-i386
- sudo apt-get install lib32ncurses5-dev
- sudo apt-get install libx11-dev
- sudo apt-get install g++-multilib
- sudo apt-get install lib32z1-dev
- wget http://dl.google.com/android/android-sdk_r21-linux.tgz - wget http://dl.google.com/android/android-sdk_r21-linux.tgz
- tar -zxf android-sdk_r21-linux.tgz - tar -zxf android-sdk_r21-linux.tgz
- export ANDROID_HOME=~/builds/shadowsocks/shadowsocks-android/android-sdk-linux - export ANDROID_HOME=`pwd`/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
- android update sdk --filter tools,platform-tools,android-16,addon-google_apis-google-16,extra-android-support,extra-google-admob_ads_sdk,extra-google-analytics_sdk,extra-google-gcm,extra-google-play_apk_expansion,extra-google-play_billing,extra-google-play_licensing --no-ui --force --no-https -a - android update sdk --filter tools,platform-tools,android-16,addon-google_apis-google-16,extra-android-support,extra-google-admob_ads_sdk,extra-google-analytics_sdk,extra-google-gcm,extra-google-play_apk_expansion,extra-google-play_billing,extra-google-play_licensing --no-ui --force --no-https -a
install: install:
......
## Shadowsocks for Android ## Shadowsocks for Android
A shadowsocks client for Android, powered by amazing nodejs/golang/libev. A [shadowsocks](http://shadowsocks.org) client for Android, powered by amazing nodejs/golang/libev.
## TRAVIS CI STATUS ## TRAVIS CI STATUS
......
...@@ -143,6 +143,7 @@ include $(BUILD_SHARED_LIBRARY) ...@@ -143,6 +143,7 @@ include $(BUILD_SHARED_LIBRARY)
subdirs := $(addprefix $(LOCAL_PATH)/openssl/,$(addsuffix /Android.mk, \ subdirs := $(addprefix $(LOCAL_PATH)/openssl/,$(addsuffix /Android.mk, \
crypto \ crypto \
ssl \
)) ))
include $(subdirs) include $(subdirs)
......
APP_PLATFORM = android-9 APP_PLATFORM := android-9
APP_STL := stlport_static
The OpenSSL project depends on volunteer efforts and financial support from
the end user community. That support comes in the form of donations and paid
sponsorships, software support contracts, paid consulting services
and commissioned software development.
Since all these activities support the continued development and improvement
of OpenSSL we consider all these clients and customers as sponsors of the
OpenSSL project.
We would like to identify and thank the following such sponsors for their past
or current significant support of the OpenSSL project:
Very significant support:
OpenGear: www.opengear.com
Significant support:
PSW Group: www.psw.net
Please note that we ask permission to identify sponsors and that some sponsors
we consider eligible for inclusion here have requested to remain anonymous.
Additional sponsorship or financial support is always welcome: for more
information please contact the OpenSSL Software Foundation.
LICENSE ISSUES
==============
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
See below for the actual license texts. Actually both licenses are BSD-style
Open Source licenses. In case of any license issues related to OpenSSL
please contact openssl-core@openssl.org.
OpenSSL License
---------------
/* ====================================================================
* Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
Original SSLeay License
-----------------------
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
Version Information
---
The code in this directory is based on 0.9.8h with patches from
http://openssl.org/news/secadv_20090107.txt, and some backported OpenSSL code
in crypto/0.9.9-dev.
Porting New Versions of OpenSSL
---
The following steps are recommended for porting new OpenSSL versions.
a) Run "./Configure linux-generic32 no-idea no-bf no-cast no-seed no-md2 \
-DL_ENDIAN"
in the openssl distribution directory.
(Ignore when the Configure scripts asks you to run "make depend".)
b) Create an updated android-config.mk file by looking at CFLAG and DEPFLAG in
the Makefile resulting from step a. Make sure to add all the -D flags to
LOCAL_CFLAGS, except -DTERMIO; include -DOPENSSL_NO_HW in addition to these.
(New OpenSSL releases may include additional code meant to be disabled by
default, so it's important not to miss any -DOPENSSL_NO_foo.
Usually these should be replicated in crypto/opensslconf.h, but let's not
take a chance.)
c) Copy the new LICENSE file from OpenSSL distribution as NOTICE.
Create an empty MODULE_LICENSE_BSD_LIKE file.
d) You may delete the following directories along with their contents,
since we won't use these (any more):
MacOS Netware VMS apps/demoCA apps/set bugs certs crypto/bf crypto/cast \
crypto/cms crypto/idea crypto/md2 crypto/rc5 crypto/seed demos doc \
engines ms os2 perl shlib test times tools util
Also you may delete the following files:
CHANGES CHANGES.SSLeay ChangeLog.0_9_7-stable_not-in-head \
ChangeLog.0_9_7-stable_not-in-head_FIPS Configure FAQ INSTALL \
INSTALL.DJGPP INSTALL.MacOS INSTALL.NW INSTALL.OS2 INSTALL.VMS \
INSTALL.W32 INSTALL.W64 INSTALL.WCE LICENSE Makefile Makefile.bak \
Makefile.org Makefile.shared NEWS PROBLEMS README README.ASN1 \
README.ENGINE apps/CA.pl.bak config crypto/opensslconf.h.bak \
install.com makevms.com openssl.doxy openssl.spec
e) Go to include/openssl. There's a bunch of symlinks here. Since symlinks
can be a special case for version control, replace them by regular files:
for l in *.h; do cp $l copy_$l; rm $l; mv copy_$l $l; done
Some symlinks will remain, pointing to files that don't exit
(you deleted those in step d). Delete the symlinks.
f) Create Android.mk files based on those you find in the previous OpenSSL port:
Android.mk
apps/Android.mk
crypto/Android.mk
ssl/Android.mk
For the latter three, merge in any substantial changes between the
corresponding Makefiles in the OpenSSL distribution (apps/Makefile,
crypto/Makefile, crypto/*/Makefile, ssl/Makefile).
Don't forget to update the directory name for OpenSSL in these files
and whereever else it is used.
g) Apply the patch found at the end of this file.
h) Finally, create an updated version of this file (README.android)!
Patch for apps directory:
--- openssl-0.9.8h-ORIG/apps/progs.h
+++ openssl-0.9.8h/apps/progs.h
@@ -22,7 +22,9 @@
extern int x509_main(int argc,char *argv[]);
extern int genrsa_main(int argc,char *argv[]);
extern int gendsa_main(int argc,char *argv[]);
+#if 0 /* ANDROID */
extern int s_server_main(int argc,char *argv[]);
+#endif
extern int s_client_main(int argc,char *argv[]);
extern int speed_main(int argc,char *argv[]);
extern int s_time_main(int argc,char *argv[]);
@@ -97,7 +99,9 @@
{FUNC_TYPE_GENERAL,"gendsa",gendsa_main},
#endif
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
- {FUNC_TYPE_GENERAL,"s_server",s_server_main},
+#if 0 /* ANDROID */
+ {FUNC_TYPE_GENERAL,"s_server",s_server_main},
+#endif
#endif
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
{FUNC_TYPE_GENERAL,"s_client",s_client_main},
diff -ur openssl-0.9.8h-ORIG/apps/speed.c openssl-0.9.8h/apps/speed.c
--- openssl-0.9.8h-ORIG/apps/speed.c
+++ openssl-0.9.8h/apps/speed.c
@@ -108,12 +108,12 @@
#include <signal.h>
#endif
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(OPENSSL_SYS_MACOSX)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(OPENSSL_SYS_MACOSX) || defined(HAVE_ANDROID_OS)
# define USE_TOD
#elif !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
# define TIMES
#endif
-#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) && !defined(OPENSSL_SYS_VXWORKS) /* FIXME */
+#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) && !defined(OPENSSL_SYS_VXWORKS) && !defined(HAVE_ANDROID_OS) /* FIXME */
# define TIMEB
#endif
@@ -1836,6 +1836,7 @@
}
}
+#if 0 /* ANDROID */
if (doit[D_IGE_128_AES])
{
for (j=0; j<SIZE_NUM; j++)
@@ -1879,6 +1880,7 @@
}
}
#endif
+#endif
#ifndef OPENSSL_NO_CAMELLIA
if (doit[D_CBC_128_CML])
{
\ No newline at end of file
OpenSSL1.0.1cForAndroid
=======================
OpenSSL 1.0.1c For Android
\ No newline at end of file
...@@ -5,10 +5,14 @@ ...@@ -5,10 +5,14 @@
# #
# From CLFAG= # From CLFAG=
LOCAL_CFLAGS += -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN #-DTERMIO LOCAL_CFLAGS += -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O3 -fomit-frame-pointer -Wall #-DTERMIO
# From DEPFLAG= # From DEPFLAG=
LOCAL_CFLAGS += -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CAST -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_SHA0 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_STORE -DOPENSSL_NO_WHIRLPOOL LOCAL_CFLAGS += -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_SCTP \
-DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CAST -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_SHA0 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_STORE -DOPENSSL_NO_WHIRLPOOL
#Copied by seaching for the OPENSSL_NO_
LOCAL_CFLAGS += -DOPENSSL_NO_DEPRECATED
# Extra # Extra
LOCAL_CFLAGS += -DOPENSSL_NO_HW -DOPENSSL_NO_ENGINE -DZLIB LOCAL_CFLAGS += -DOPENSSL_NO_HW -DOPENSSL_NO_ENGINE -DZLIB
......
...@@ -6,7 +6,8 @@ arm_src_files := \ ...@@ -6,7 +6,8 @@ arm_src_files := \
bn/asm/armv4-mont.S \ bn/asm/armv4-mont.S \
sha/asm/sha1-armv4-large.S \ sha/asm/sha1-armv4-large.S \
sha/asm/sha256-armv4.S \ sha/asm/sha256-armv4.S \
sha/asm/sha512-armv4.S sha/asm/sha512-armv4.S
non_arm_src_files := aes/aes_core.c non_arm_src_files := aes/aes_core.c
local_src_files := \ local_src_files := \
...@@ -22,10 +23,14 @@ local_src_files := \ ...@@ -22,10 +23,14 @@ local_src_files := \
o_time.c \ o_time.c \
o_str.c \ o_str.c \
o_dir.c \ o_dir.c \
o_fips.c \
o_init.c \
fips_ers.c \
aes/aes_cbc.c \ aes/aes_cbc.c \
aes/aes_cfb.c \ aes/aes_cfb.c \
aes/aes_ctr.c \ aes/aes_ctr.c \
aes/aes_ecb.c \ aes/aes_ecb.c \
aes/aes_ige.c \
aes/aes_misc.c \ aes/aes_misc.c \
aes/aes_ofb.c \ aes/aes_ofb.c \
aes/aes_wrap.c \ aes/aes_wrap.c \
...@@ -133,7 +138,9 @@ local_src_files := \ ...@@ -133,7 +138,9 @@ local_src_files := \
bn/bn_add.c \ bn/bn_add.c \
bn/bn_asm.c \ bn/bn_asm.c \
bn/bn_blind.c \ bn/bn_blind.c \
bn/bn_const.c \
bn/bn_ctx.c \ bn/bn_ctx.c \
bn/bn_depr.c \
bn/bn_div.c \ bn/bn_div.c \
bn/bn_err.c \ bn/bn_err.c \
bn/bn_exp.c \ bn/bn_exp.c \
...@@ -155,8 +162,13 @@ local_src_files := \ ...@@ -155,8 +162,13 @@ local_src_files := \
bn/bn_sqr.c \ bn/bn_sqr.c \
bn/bn_sqrt.c \ bn/bn_sqrt.c \
bn/bn_word.c \ bn/bn_word.c \
bn/bn_x931p.c \
buffer/buf_err.c \ buffer/buf_err.c \
buffer/buf_str.c \
buffer/buffer.c \ buffer/buffer.c \
cmac/cmac.c \
cmac/cm_ameth.c \
cmac/cm_pmeth.c \
comp/c_rle.c \ comp/c_rle.c \
comp/c_zlib.c \ comp/c_zlib.c \
comp/comp_err.c \ comp/comp_err.c \
...@@ -203,6 +215,7 @@ local_src_files := \ ...@@ -203,6 +215,7 @@ local_src_files := \
dh/dh_key.c \ dh/dh_key.c \
dh/dh_lib.c \ dh/dh_lib.c \
dh/dh_pmeth.c \ dh/dh_pmeth.c \
dh/dh_prn.c \
dsa/dsa_ameth.c \ dsa/dsa_ameth.c \
dsa/dsa_asn1.c \ dsa/dsa_asn1.c \
dsa/dsa_depr.c \ dsa/dsa_depr.c \
...@@ -223,6 +236,7 @@ local_src_files := \ ...@@ -223,6 +236,7 @@ local_src_files := \
dso/dso_openssl.c \ dso/dso_openssl.c \
dso/dso_vms.c \ dso/dso_vms.c \
dso/dso_win32.c \ dso/dso_win32.c \
dso/dso_beos.c \
ec/ec2_mult.c \ ec/ec2_mult.c \
ec/ec2_smpl.c \ ec/ec2_smpl.c \
ec/ec_ameth.c \ ec/ec_ameth.c \
...@@ -240,6 +254,13 @@ local_src_files := \ ...@@ -240,6 +254,13 @@ local_src_files := \
ec/ecp_mont.c \ ec/ecp_mont.c \
ec/ecp_nist.c \ ec/ecp_nist.c \
ec/ecp_smpl.c \ ec/ecp_smpl.c \
ec/ecp_nistp224.c \
ec/ecp_nistp256.c \
ec/ecp_nistp521.c \
ec/ecp_nistputil.c \
ec/ecp_oct.c \
ec/ec2_oct.c \
ec/ec_oct.c \
ecdh/ech_err.c \ ecdh/ech_err.c \
ecdh/ech_key.c \ ecdh/ech_key.c \
ecdh/ech_lib.c \ ecdh/ech_lib.c \
...@@ -303,6 +324,15 @@ local_src_files := \ ...@@ -303,6 +324,15 @@ local_src_files := \
evp/pmeth_fn.c \ evp/pmeth_fn.c \
evp/pmeth_gn.c \ evp/pmeth_gn.c \
evp/pmeth_lib.c \ evp/pmeth_lib.c \
evp/e_idea.c \
evp/e_camellia.c \
evp/e_seed.c \
evp/e_cast.c \
evp/m_md2.c \
evp/m_sha.c \
evp/evp_fips.c \
evp/e_aes_cbc_hmac_sha1.c \
evp/e_rc4_hmac_md5.c \
hmac/hm_ameth.c \ hmac/hm_ameth.c \
hmac/hm_pmeth.c \ hmac/hm_pmeth.c \
hmac/hmac.c \ hmac/hmac.c \
...@@ -314,9 +344,13 @@ local_src_files := \ ...@@ -314,9 +344,13 @@ local_src_files := \
md5/md5_dgst.c \ md5/md5_dgst.c \
md5/md5_one.c \ md5/md5_one.c \
modes/cbc128.c \ modes/cbc128.c \
modes/cfb128.c \
modes/ctr128.c \ modes/ctr128.c \
modes/cts128.c \
modes/cfb128.c \
modes/ofb128.c \ modes/ofb128.c \
modes/gcm128.c \
modes/ccm128.c \
modes/xts128.c \
objects/o_names.c \ objects/o_names.c \
objects/obj_dat.c \ objects/obj_dat.c \
objects/obj_err.c \ objects/obj_err.c \
...@@ -365,6 +399,8 @@ local_src_files := \ ...@@ -365,6 +399,8 @@ local_src_files := \
pkcs7/pk7_mime.c \ pkcs7/pk7_mime.c \
pkcs7/pk7_smime.c \ pkcs7/pk7_smime.c \
pkcs7/pkcs7err.c \ pkcs7/pkcs7err.c \
pkcs7/bio_pk7.c \
pqueue/pqueue.c \
rand/md_rand.c \ rand/md_rand.c \
rand/rand_egd.c \ rand/rand_egd.c \
rand/rand_err.c \ rand/rand_err.c \
...@@ -378,6 +414,7 @@ local_src_files := \ ...@@ -378,6 +414,7 @@ local_src_files := \
rc2/rc2ofb64.c \ rc2/rc2ofb64.c \
rc4/rc4_enc.c \ rc4/rc4_enc.c \
rc4/rc4_skey.c \ rc4/rc4_skey.c \
rc4/rc4_utl.c \
ripemd/rmd_dgst.c \ ripemd/rmd_dgst.c \
ripemd/rmd_one.c \ ripemd/rmd_one.c \
rsa/rsa_ameth.c \ rsa/rsa_ameth.c \
...@@ -398,11 +435,16 @@ local_src_files := \ ...@@ -398,11 +435,16 @@ local_src_files := \
rsa/rsa_sign.c \ rsa/rsa_sign.c \
rsa/rsa_ssl.c \ rsa/rsa_ssl.c \
rsa/rsa_x931.c \ rsa/rsa_x931.c \
rsa/rsa_depr.c \
rsa/rsa_crpt.c \
sha/sha1_one.c \ sha/sha1_one.c \
sha/sha1dgst.c \ sha/sha1dgst.c \
sha/sha256.c \ sha/sha256.c \
sha/sha512.c \ sha/sha512.c \
sha/sha_dgst.c \ sha/sha_dgst.c \
sha/sha_one.c \
srp/srp_lib.c \
srp/srp_vfy.c \
stack/stack.c \ stack/stack.c \
ts/ts_err.c \ ts/ts_err.c \
txt_db/txt_db.c \ txt_db/txt_db.c \
...@@ -444,6 +486,8 @@ local_src_files := \ ...@@ -444,6 +486,8 @@ local_src_files := \
x509v3/v3_akey.c \ x509v3/v3_akey.c \
x509v3/v3_akeya.c \ x509v3/v3_akeya.c \
x509v3/v3_alt.c \ x509v3/v3_alt.c \
x509v3/v3_asid.c \
x509v3/v3_addr.c \
x509v3/v3_bcons.c \ x509v3/v3_bcons.c \
x509v3/v3_bitst.c \ x509v3/v3_bitst.c \
x509v3/v3_conf.c \ x509v3/v3_conf.c \
...@@ -471,17 +515,17 @@ local_src_files := \ ...@@ -471,17 +515,17 @@ local_src_files := \
x509v3/v3err.c x509v3/v3err.c
local_c_includes := \ local_c_includes := \
$(LOCAL_PATH)/.. \ $(NDK_PROJECT_PATH)/jni/openssl \
$(LOCAL_PATH)/../crypto/asn1 \ $(NDK_PROJECT_PATH)/jni/openssl/crypto/asn1 \
$(LOCAL_PATH)/../crypto/evp \ $(NDK_PROJECT_PATH)/jni/openssl/crypto/evp \
$(LOCAL_PATH)/../include \ $(NDK_PROJECT_PATH)/jni/openssl/include \
$(LOCAL_PATH)/../include/openssl $(NDK_PROJECT_PATH)/jni/openssl/include/openssl
local_c_flags := -DNO_WINDOWS_BRAINDEATH local_c_flags := -DNO_WINDOWS_BRAINDEATH
####################################### #######################################
# static library
# target
include $(CLEAR_VARS) include $(CLEAR_VARS)
include $(LOCAL_PATH)/../android-config.mk include $(LOCAL_PATH)/../android-config.mk
LOCAL_SRC_FILES += $(local_src_files) LOCAL_SRC_FILES += $(local_src_files)
......
...@@ -40,22 +40,18 @@ ...@@ -40,22 +40,18 @@
#ifndef LPDIR_H #ifndef LPDIR_H
#include "LPdir.h" #include "LPdir.h"
#endif #endif
#include "vms_rms.h"
/* Because some compiler options hide this macor */ /* Some compiler options hide EVMSERR. */
#ifndef EVMSERR #ifndef EVMSERR
#define EVMSERR 65535 /* error for non-translatable VMS errors */ # define EVMSERR 65535 /* error for non-translatable VMS errors */
#endif #endif
struct LP_dir_context_st struct LP_dir_context_st
{ {
unsigned long VMS_context; unsigned long VMS_context;
#ifdef NAML$C_MAXRSS char filespec[ NAMX_MAXRSS+ 1];
char filespec[NAML$C_MAXRSS+1]; char result[ NAMX_MAXRSS+ 1];
char result[NAML$C_MAXRSS+1];
#else
char filespec[256];
char result[256];
#endif
struct dsc$descriptor_d filespec_dsc; struct dsc$descriptor_d filespec_dsc;
struct dsc$descriptor_d result_dsc; struct dsc$descriptor_d result_dsc;
}; };
...@@ -66,6 +62,16 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory) ...@@ -66,6 +62,16 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
char *p, *r; char *p, *r;
size_t l; size_t l;
unsigned long flags = 0; unsigned long flags = 0;
/* Arrange 32-bit pointer to (copied) string storage, if needed. */
#if __INITIAL_POINTER_SIZE == 64
# pragma pointer_size save
# pragma pointer_size 32
char *ctx_filespec_32p;
# pragma pointer_size restore
char ctx_filespec_32[ NAMX_MAXRSS+ 1];
#endif /* __INITIAL_POINTER_SIZE == 64 */
#ifdef NAML$C_MAXRSS #ifdef NAML$C_MAXRSS
flags |= LIB$M_FIL_LONG_NAMES; flags |= LIB$M_FIL_LONG_NAMES;
#endif #endif
...@@ -93,13 +99,7 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory) ...@@ -93,13 +99,7 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
filespeclen += 4; /* "*.*;" */ filespeclen += 4; /* "*.*;" */
if (filespeclen > if (filespeclen > NAMX_MAXRSS)
#ifdef NAML$C_MAXRSS
NAML$C_MAXRSS
#else
255
#endif
)
{ {
errno = ENAMETOOLONG; errno = ENAMETOOLONG;
return 0; return 0;
...@@ -115,14 +115,21 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory) ...@@ -115,14 +115,21 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
strcpy((*ctx)->filespec,directory); strcpy((*ctx)->filespec,directory);
strcat((*ctx)->filespec,"*.*;"); strcat((*ctx)->filespec,"*.*;");
/* Arrange 32-bit pointer to (copied) string storage, if needed. */
#if __INITIAL_POINTER_SIZE == 64
# define CTX_FILESPEC ctx_filespec_32p
/* Copy the file name to storage with a 32-bit pointer. */
ctx_filespec_32p = ctx_filespec_32;
strcpy( ctx_filespec_32p, (*ctx)->filespec);
#else /* __INITIAL_POINTER_SIZE == 64 */
# define CTX_FILESPEC (*ctx)->filespec
#endif /* __INITIAL_POINTER_SIZE == 64 [else] */
(*ctx)->filespec_dsc.dsc$w_length = filespeclen; (*ctx)->filespec_dsc.dsc$w_length = filespeclen;
(*ctx)->filespec_dsc.dsc$b_dtype = DSC$K_DTYPE_T; (*ctx)->filespec_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
(*ctx)->filespec_dsc.dsc$b_class = DSC$K_CLASS_S; (*ctx)->filespec_dsc.dsc$b_class = DSC$K_CLASS_S;
(*ctx)->filespec_dsc.dsc$a_pointer = (*ctx)->filespec; (*ctx)->filespec_dsc.dsc$a_pointer = CTX_FILESPEC;
(*ctx)->result_dsc.dsc$w_length = 0;
(*ctx)->result_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
(*ctx)->result_dsc.dsc$b_class = DSC$K_CLASS_D;
(*ctx)->result_dsc.dsc$a_pointer = 0;
} }
(*ctx)->result_dsc.dsc$w_length = 0; (*ctx)->result_dsc.dsc$w_length = 0;
......
#
# OpenSSL/crypto/Makefile
#
DIR= crypto
TOP= ..
CC= cc
INCLUDE= -I. -I$(TOP) -I../include $(ZLIB_INCLUDE)
# INCLUDES targets sudbirs!
INCLUDES= -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include $(ZLIB_INCLUDE)
CFLAG= -g
MAKEDEPPROG= makedepend
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
MAKEFILE= Makefile
RM= rm -f
AR= ar r
RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
(cd $$i && echo "making $$target in $(DIR)/$$i..." && \
$(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \
done;
PEX_LIBS=
EX_LIBS=
CFLAGS= $(INCLUDE) $(CFLAG)
ASFLAGS= $(INCLUDE) $(ASFLAG)
AFLAGS=$(ASFLAGS)
CPUID_OBJ=mem_clr.o
LIBS=
GENERAL=Makefile README crypto-lib.com install.com
LIB= $(TOP)/libcrypto.a
SHARED_LIB= libcrypto$(SHLIB_EXT)
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o ebcdic.o \
uid.o o_time.o o_str.o o_dir.o o_fips.o o_init.o fips_ers.o $(CPUID_OBJ)
SRC= $(LIBSRC)
EXHEADER= crypto.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
ossl_typ.h
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
top:
@(cd ..; $(MAKE) DIRS=$(DIR) all)
all: shared
buildinf.h: ../Makefile
( echo "#ifndef MK1MF_BUILD"; \
echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
echo ' #define PLATFORM "$(PLATFORM)"'; \
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
echo '#endif' ) >buildinf.h
x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
$(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
applink.o: $(TOP)/ms/applink.c
$(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/applink.c
uplink.o: $(TOP)/ms/uplink.c applink.o
$(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c
uplink-x86.s: $(TOP)/ms/uplink-x86.pl
$(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) > $@
x86_64cpuid.s: x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS) -E ia64cpuid.S > $@
ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@
alphacpuid.s: alphacpuid.pl
$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
testapps:
[ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \
then cd des && $(MAKE) -e des; fi )
[ -z "$(THIS)" ] || ( cd pkcs7 && $(MAKE) -e testapps );
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
subdirs:
@target=all; $(RECURSIVE_MAKE)
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@target=files; $(RECURSIVE_MAKE)
links:
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
@target=links; $(RECURSIVE_MAKE)
# lib: $(LIB): are splitted to avoid end-less loop
lib: $(LIB)
@touch lib
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
[ -z "$(FIPSLIBDIR)" ] || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
$(RANLIB) $(LIB) || echo Never mind.
shared: buildinf.h lib subdirs
if [ -n "$(SHARED_LIBS)" ]; then \
(cd ..; $(MAKE) $(SHARED_LIB)); \
fi
libs:
@target=lib; $(RECURSIVE_MAKE)
install:
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@headerlist="$(EXHEADER)"; for i in $$headerlist ;\
do \
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
done;
@target=install; $(RECURSIVE_MAKE)
lint:
@target=lint; $(RECURSIVE_MAKE)
depend:
@[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
@[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
@[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
clean:
rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
@target=clean; $(RECURSIVE_MAKE)
dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
rm -f opensslconf.h
@target=dclean; $(RECURSIVE_MAKE)
# DO NOT DELETE THIS LINE -- make depend depends on it.
cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h
cpt_err.o: ../include/openssl/symhacks.h cpt_err.c
cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c
cryptlib.o: cryptlib.h
cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
cversion.o: cryptlib.h cversion.c
ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
ex_data.o: ex_data.c
fips_ers.o: ../include/openssl/opensslconf.h fips_ers.c
mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
mem.o: mem.c
mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c
mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
mem_dbg.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
mem_dbg.o: mem_dbg.c
o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
o_dir.o: LPdir_unix.c o_dir.c o_dir.h
o_fips.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
o_fips.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
o_fips.o: ../include/openssl/err.h ../include/openssl/lhash.h
o_fips.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
o_fips.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
o_fips.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
o_fips.o: o_fips.c
o_init.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h
o_init.o: ../include/openssl/e_os2.h ../include/openssl/err.h
o_init.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
o_init.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
o_init.o: ../include/openssl/safestack.h ../include/openssl/stack.h
o_init.o: ../include/openssl/symhacks.h o_init.c
o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
o_str.o: o_str.c o_str.h
o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
o_time.o: o_time.h
uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c
#
# crypto/aes/Makefile
#
DIR= aes
TOP= ../..
CC= cc
CPP= $(CC) -E
INCLUDES=
CFLAG=-g
MAKEFILE= Makefile
AR= ar r
AES_ENC=aes_core.o aes_cbc.o
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
AFLAGS= $(ASFLAGS)
GENERAL=Makefile
#TEST=aestest.c
TEST=
APPS=
LIB=$(TOP)/libcrypto.a
LIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c \
aes_ctr.c aes_ige.c aes_wrap.c
LIBOBJ=aes_misc.o aes_ecb.o aes_cfb.o aes_ofb.o aes_ctr.o aes_ige.o aes_wrap.o \
$(AES_ENC)
SRC= $(LIBSRC)
EXHEADER= aes.h
HEADER= aes_locl.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
top:
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
all: lib
lib: $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB) || echo Never mind.
@touch lib
aes-ia64.s: asm/aes-ia64.S
$(CC) $(CFLAGS) -E asm/aes-ia64.S > $@
aes-586.s: asm/aes-586.pl ../perlasm/x86asm.pl
$(PERL) asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
vpaes-x86.s: asm/vpaes-x86.pl ../perlasm/x86asm.pl
$(PERL) asm/vpaes-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
aesni-x86.s: asm/aesni-x86.pl ../perlasm/x86asm.pl
$(PERL) asm/aesni-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
aes-x86_64.s: asm/aes-x86_64.pl
$(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@
vpaes-x86_64.s: asm/vpaes-x86_64.pl
$(PERL) asm/vpaes-x86_64.pl $(PERLASM_SCHEME) > $@
bsaes-x86_64.s: asm/bsaes-x86_64.pl
$(PERL) asm/bsaes-x86_64.pl $(PERLASM_SCHEME) > $@
aesni-x86_64.s: asm/aesni-x86_64.pl
$(PERL) asm/aesni-x86_64.pl $(PERLASM_SCHEME) > $@
aesni-sha1-x86_64.s: asm/aesni-sha1-x86_64.pl
$(PERL) asm/aesni-sha1-x86_64.pl $(PERLASM_SCHEME) > $@
aes-sparcv9.s: asm/aes-sparcv9.pl
$(PERL) asm/aes-sparcv9.pl $(CFLAGS) > $@
aes-ppc.s: asm/aes-ppc.pl
$(PERL) asm/aes-ppc.pl $(PERLASM_SCHEME) $@
aes-parisc.s: asm/aes-parisc.pl
$(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@
aes-mips.S: asm/aes-mips.pl
$(PERL) asm/aes-mips.pl $(PERLASM_SCHEME) $@
# GNU make "catch all"
aes-%.S: asm/aes-%.pl; $(PERL) $< $(PERLASM_SCHEME) > $@
aes-armv4.o: aes-armv4.S
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
links:
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
install:
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
do \
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
done;
tags:
ctags $(SRC)
tests:
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
aes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
aes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c
aes_cfb.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
aes_cfb.o: ../../include/openssl/opensslconf.h aes_cfb.c
aes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
aes_core.o: ../../include/openssl/opensslconf.h aes_core.c aes_locl.h
aes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
aes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c
aes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
aes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
aes_ige.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/bio.h
aes_ige.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
aes_ige.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
aes_ige.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
aes_ige.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
aes_ige.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
aes_ige.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_ige.c aes_locl.h
aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
aes_misc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
aes_misc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
aes_misc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
aes_misc.o: ../../include/openssl/symhacks.h aes_locl.h aes_misc.c
aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
aes_ofb.o: ../../include/openssl/opensslconf.h aes_ofb.c
aes_wrap.o: ../../e_os.h ../../include/openssl/aes.h
aes_wrap.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
aes_wrap.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
aes_wrap.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
aes_wrap.o: ../../include/openssl/opensslconf.h
aes_wrap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
aes_wrap.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
aes_wrap.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_wrap.c
...@@ -90,6 +90,11 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits, ...@@ -90,6 +90,11 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
int AES_set_decrypt_key(const unsigned char *userKey, const int bits, int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key); AES_KEY *key);
int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
void AES_encrypt(const unsigned char *in, unsigned char *out, void AES_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key); const AES_KEY *key);
void AES_decrypt(const unsigned char *in, unsigned char *out, void AES_decrypt(const unsigned char *in, unsigned char *out,
......
...@@ -625,7 +625,7 @@ static const u32 rcon[] = { ...@@ -625,7 +625,7 @@ static const u32 rcon[] = {
/** /**
* Expand the cipher key into the encryption key schedule. * Expand the cipher key into the encryption key schedule.
*/ */
int AES_set_encrypt_key(const unsigned char *userKey, const int bits, int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key) { AES_KEY *key) {
u32 *rk; u32 *rk;
...@@ -726,7 +726,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits, ...@@ -726,7 +726,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
/** /**
* Expand the cipher key into the decryption key schedule. * Expand the cipher key into the decryption key schedule.
*/ */
int AES_set_decrypt_key(const unsigned char *userKey, const int bits, int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key) { AES_KEY *key) {
u32 *rk; u32 *rk;
...@@ -734,7 +734,7 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits, ...@@ -734,7 +734,7 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
u32 temp; u32 temp;
/* first, start with an encryption schedule */ /* first, start with an encryption schedule */
status = AES_set_encrypt_key(userKey, bits, key); status = private_AES_set_encrypt_key(userKey, bits, key);
if (status < 0) if (status < 0)
return status; return status;
...@@ -1201,7 +1201,7 @@ static const u32 rcon[] = { ...@@ -1201,7 +1201,7 @@ static const u32 rcon[] = {
/** /**
* Expand the cipher key into the encryption key schedule. * Expand the cipher key into the encryption key schedule.
*/ */
int AES_set_encrypt_key(const unsigned char *userKey, const int bits, int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key) { AES_KEY *key) {
u32 *rk; u32 *rk;
int i = 0; int i = 0;
...@@ -1301,7 +1301,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits, ...@@ -1301,7 +1301,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
/** /**
* Expand the cipher key into the decryption key schedule. * Expand the cipher key into the decryption key schedule.
*/ */
int AES_set_decrypt_key(const unsigned char *userKey, const int bits, int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key) { AES_KEY *key) {
u32 *rk; u32 *rk;
...@@ -1309,7 +1309,7 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits, ...@@ -1309,7 +1309,7 @@ int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
u32 temp; u32 temp;
/* first, start with an encryption schedule */ /* first, start with an encryption schedule */
status = AES_set_encrypt_key(userKey, bits, key); status = private_AES_set_encrypt_key(userKey, bits, key);
if (status < 0) if (status < 0)
return status; return status;
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
*/ */
#include <openssl/opensslv.h> #include <openssl/opensslv.h>
#include <openssl/crypto.h>
#include <openssl/aes.h> #include <openssl/aes.h>
#include "aes_locl.h" #include "aes_locl.h"
...@@ -62,3 +63,23 @@ const char *AES_options(void) { ...@@ -62,3 +63,23 @@ const char *AES_options(void) {
return "aes(partial)"; return "aes(partial)";
#endif #endif
} }
/* FIPS wrapper functions to block low level AES calls in FIPS mode */
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key)
{
#ifdef OPENSSL_FIPS
fips_cipher_abort(AES);
#endif
return private_AES_set_encrypt_key(userKey, bits, key);
}
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key)
{
#ifdef OPENSSL_FIPS
fips_cipher_abort(AES);
#endif
return private_AES_set_decrypt_key(userKey, bits, key);
}
...@@ -85,9 +85,9 @@ int AES_wrap_key(AES_KEY *key, const unsigned char *iv, ...@@ -85,9 +85,9 @@ int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
A[7] ^= (unsigned char)(t & 0xff); A[7] ^= (unsigned char)(t & 0xff);
if (t > 0xff) if (t > 0xff)
{ {
A[6] ^= (unsigned char)((t & 0xff) >> 8); A[6] ^= (unsigned char)((t >> 8) & 0xff);
A[5] ^= (unsigned char)((t & 0xff) >> 16); A[5] ^= (unsigned char)((t >> 16) & 0xff);
A[4] ^= (unsigned char)((t & 0xff) >> 24); A[4] ^= (unsigned char)((t >> 24) & 0xff);
} }
memcpy(R, B + 8, 8); memcpy(R, B + 8, 8);
} }
...@@ -119,9 +119,9 @@ int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, ...@@ -119,9 +119,9 @@ int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
A[7] ^= (unsigned char)(t & 0xff); A[7] ^= (unsigned char)(t & 0xff);
if (t > 0xff) if (t > 0xff)
{ {
A[6] ^= (unsigned char)((t & 0xff) >> 8); A[6] ^= (unsigned char)((t >> 8) & 0xff);
A[5] ^= (unsigned char)((t & 0xff) >> 16); A[5] ^= (unsigned char)((t >> 16) & 0xff);
A[4] ^= (unsigned char)((t & 0xff) >> 24); A[4] ^= (unsigned char)((t >> 24) & 0xff);
} }
memcpy(B + 8, R, 8); memcpy(B + 8, R, 8);
AES_decrypt(B, B, key); AES_decrypt(B, B, key);
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
# but exhibits up to 10% improvement on other cores. # but exhibits up to 10% improvement on other cores.
# #
# Second version is "monolithic" replacement for aes_core.c, which in # Second version is "monolithic" replacement for aes_core.c, which in
# addition to AES_[de|en]crypt implements AES_set_[de|en]cryption_key. # addition to AES_[de|en]crypt implements private_AES_set_[de|en]cryption_key.
# This made it possible to implement little-endian variant of the # This made it possible to implement little-endian variant of the
# algorithm without modifying the base C code. Motivating factor for # algorithm without modifying the base C code. Motivating factor for
# the undertaken effort was that it appeared that in tight IA-32 # the undertaken effort was that it appeared that in tight IA-32
...@@ -2854,12 +2854,12 @@ sub enckey() ...@@ -2854,12 +2854,12 @@ sub enckey()
&set_label("exit"); &set_label("exit");
&function_end("_x86_AES_set_encrypt_key"); &function_end("_x86_AES_set_encrypt_key");
# int AES_set_encrypt_key(const unsigned char *userKey, const int bits, # int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
# AES_KEY *key) # AES_KEY *key)
&function_begin_B("AES_set_encrypt_key"); &function_begin_B("private_AES_set_encrypt_key");
&call ("_x86_AES_set_encrypt_key"); &call ("_x86_AES_set_encrypt_key");
&ret (); &ret ();
&function_end_B("AES_set_encrypt_key"); &function_end_B("private_AES_set_encrypt_key");
sub deckey() sub deckey()
{ my ($i,$key,$tp1,$tp2,$tp4,$tp8) = @_; { my ($i,$key,$tp1,$tp2,$tp4,$tp8) = @_;
...@@ -2916,9 +2916,9 @@ sub deckey() ...@@ -2916,9 +2916,9 @@ sub deckey()
&mov (&DWP(4*$i,$key),$tp1); &mov (&DWP(4*$i,$key),$tp1);
} }
# int AES_set_decrypt_key(const unsigned char *userKey, const int bits, # int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
# AES_KEY *key) # AES_KEY *key)
&function_begin_B("AES_set_decrypt_key"); &function_begin_B("private_AES_set_decrypt_key");
&call ("_x86_AES_set_encrypt_key"); &call ("_x86_AES_set_encrypt_key");
&cmp ("eax",0); &cmp ("eax",0);
&je (&label("proceed")); &je (&label("proceed"));
...@@ -2974,7 +2974,7 @@ sub deckey() ...@@ -2974,7 +2974,7 @@ sub deckey()
&jb (&label("permute")); &jb (&label("permute"));
&xor ("eax","eax"); # return success &xor ("eax","eax"); # return success
&function_end("AES_set_decrypt_key"); &function_end("private_AES_set_decrypt_key");
&asciz("AES for x86, CRYPTOGAMS by <appro\@openssl.org>"); &asciz("AES for x86, CRYPTOGAMS by <appro\@openssl.org>");
&asm_finish(); &asm_finish();
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -1176,6 +1176,7 @@ ___ ...@@ -1176,6 +1176,7 @@ ___
# As UltraSPARC T1, a.k.a. Niagara, has shared FPU, FP nops can have # As UltraSPARC T1, a.k.a. Niagara, has shared FPU, FP nops can have
# undesired effect, so just omit them and sacrifice some portion of # undesired effect, so just omit them and sacrifice some portion of
# percent in performance... # percent in performance...
$code =~ s/fmovs.*$//gem; $code =~ s/fmovs.*$//gm;
print $code; print $code;
close STDOUT; # ensure flush
...@@ -588,6 +588,9 @@ $code.=<<___; ...@@ -588,6 +588,9 @@ $code.=<<___;
.globl AES_encrypt .globl AES_encrypt
.type AES_encrypt,\@function,3 .type AES_encrypt,\@function,3
.align 16 .align 16
.globl asm_AES_encrypt
.hidden asm_AES_encrypt
asm_AES_encrypt:
AES_encrypt: AES_encrypt:
push %rbx push %rbx
push %rbp push %rbp
...@@ -1184,6 +1187,9 @@ $code.=<<___; ...@@ -1184,6 +1187,9 @@ $code.=<<___;
.globl AES_decrypt .globl AES_decrypt
.type AES_decrypt,\@function,3 .type AES_decrypt,\@function,3
.align 16 .align 16
.globl asm_AES_decrypt
.hidden asm_AES_decrypt
asm_AES_decrypt:
AES_decrypt: AES_decrypt:
push %rbx push %rbx
push %rbp push %rbp
...@@ -1277,13 +1283,13 @@ $code.=<<___; ...@@ -1277,13 +1283,13 @@ $code.=<<___;
___ ___
} }
# int AES_set_encrypt_key(const unsigned char *userKey, const int bits, # int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
# AES_KEY *key) # AES_KEY *key)
$code.=<<___; $code.=<<___;
.globl AES_set_encrypt_key .globl private_AES_set_encrypt_key
.type AES_set_encrypt_key,\@function,3 .type private_AES_set_encrypt_key,\@function,3
.align 16 .align 16
AES_set_encrypt_key: private_AES_set_encrypt_key:
push %rbx push %rbx
push %rbp push %rbp
push %r12 # redundant, but allows to share push %r12 # redundant, but allows to share
...@@ -1304,7 +1310,7 @@ AES_set_encrypt_key: ...@@ -1304,7 +1310,7 @@ AES_set_encrypt_key:
add \$56,%rsp add \$56,%rsp
.Lenc_key_epilogue: .Lenc_key_epilogue:
ret ret
.size AES_set_encrypt_key,.-AES_set_encrypt_key .size private_AES_set_encrypt_key,.-private_AES_set_encrypt_key
.type _x86_64_AES_set_encrypt_key,\@abi-omnipotent .type _x86_64_AES_set_encrypt_key,\@abi-omnipotent
.align 16 .align 16
...@@ -1547,13 +1553,13 @@ $code.=<<___; ...@@ -1547,13 +1553,13 @@ $code.=<<___;
___ ___
} }
# int AES_set_decrypt_key(const unsigned char *userKey, const int bits, # int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
# AES_KEY *key) # AES_KEY *key)
$code.=<<___; $code.=<<___;
.globl AES_set_decrypt_key .globl private_AES_set_decrypt_key
.type AES_set_decrypt_key,\@function,3 .type private_AES_set_decrypt_key,\@function,3
.align 16 .align 16
AES_set_decrypt_key: private_AES_set_decrypt_key:
push %rbx push %rbx
push %rbp push %rbp
push %r12 push %r12
...@@ -1622,7 +1628,7 @@ $code.=<<___; ...@@ -1622,7 +1628,7 @@ $code.=<<___;
add \$56,%rsp add \$56,%rsp
.Ldec_key_epilogue: .Ldec_key_epilogue:
ret ret
.size AES_set_decrypt_key,.-AES_set_decrypt_key .size private_AES_set_decrypt_key,.-private_AES_set_decrypt_key
___ ___
# void AES_cbc_encrypt (const void char *inp, unsigned char *out, # void AES_cbc_encrypt (const void char *inp, unsigned char *out,
...@@ -1648,6 +1654,9 @@ $code.=<<___; ...@@ -1648,6 +1654,9 @@ $code.=<<___;
.type AES_cbc_encrypt,\@function,6 .type AES_cbc_encrypt,\@function,6
.align 16 .align 16
.extern OPENSSL_ia32cap_P .extern OPENSSL_ia32cap_P
.globl asm_AES_cbc_encrypt
.hidden asm_AES_cbc_encrypt
asm_AES_cbc_encrypt:
AES_cbc_encrypt: AES_cbc_encrypt:
cmp \$0,%rdx # check length cmp \$0,%rdx # check length
je .Lcbc_epilogue je .Lcbc_epilogue
...@@ -2766,13 +2775,13 @@ cbc_se_handler: ...@@ -2766,13 +2775,13 @@ cbc_se_handler:
.rva .LSEH_end_AES_decrypt .rva .LSEH_end_AES_decrypt
.rva .LSEH_info_AES_decrypt .rva .LSEH_info_AES_decrypt
.rva .LSEH_begin_AES_set_encrypt_key .rva .LSEH_begin_private_AES_set_encrypt_key
.rva .LSEH_end_AES_set_encrypt_key .rva .LSEH_end_private_AES_set_encrypt_key
.rva .LSEH_info_AES_set_encrypt_key .rva .LSEH_info_private_AES_set_encrypt_key
.rva .LSEH_begin_AES_set_decrypt_key .rva .LSEH_begin_private_AES_set_decrypt_key
.rva .LSEH_end_AES_set_decrypt_key .rva .LSEH_end_private_AES_set_decrypt_key
.rva .LSEH_info_AES_set_decrypt_key .rva .LSEH_info_private_AES_set_decrypt_key
.rva .LSEH_begin_AES_cbc_encrypt .rva .LSEH_begin_AES_cbc_encrypt
.rva .LSEH_end_AES_cbc_encrypt .rva .LSEH_end_AES_cbc_encrypt
...@@ -2788,11 +2797,11 @@ cbc_se_handler: ...@@ -2788,11 +2797,11 @@ cbc_se_handler:
.byte 9,0,0,0 .byte 9,0,0,0
.rva block_se_handler .rva block_se_handler
.rva .Ldec_prologue,.Ldec_epilogue # HandlerData[] .rva .Ldec_prologue,.Ldec_epilogue # HandlerData[]
.LSEH_info_AES_set_encrypt_key: .LSEH_info_private_AES_set_encrypt_key:
.byte 9,0,0,0 .byte 9,0,0,0
.rva key_se_handler .rva key_se_handler
.rva .Lenc_key_prologue,.Lenc_key_epilogue # HandlerData[] .rva .Lenc_key_prologue,.Lenc_key_epilogue # HandlerData[]
.LSEH_info_AES_set_decrypt_key: .LSEH_info_private_AES_set_decrypt_key:
.byte 9,0,0,0 .byte 9,0,0,0
.rva key_se_handler .rva key_se_handler
.rva .Ldec_key_prologue,.Ldec_key_epilogue # HandlerData[] .rva .Ldec_key_prologue,.Ldec_key_epilogue # HandlerData[]
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env perl
print <<'___';
.text
.set noat
.globl OPENSSL_cpuid_setup
.ent OPENSSL_cpuid_setup
OPENSSL_cpuid_setup:
.frame $30,0,$26
.prologue 0
ret ($26)
.end OPENSSL_cpuid_setup
.globl OPENSSL_wipe_cpu
.ent OPENSSL_wipe_cpu
OPENSSL_wipe_cpu:
.frame $30,0,$26
.prologue 0
clr $1
clr $2
clr $3
clr $4
clr $5
clr $6
clr $7
clr $8
clr $16
clr $17
clr $18
clr $19
clr $20
clr $21
clr $22
clr $23
clr $24
clr $25
clr $27
clr $at
clr $29
fclr $f0
fclr $f1
fclr $f10
fclr $f11
fclr $f12
fclr $f13
fclr $f14
fclr $f15
fclr $f16
fclr $f17
fclr $f18
fclr $f19
fclr $f20
fclr $f21
fclr $f22
fclr $f23
fclr $f24
fclr $f25
fclr $f26
fclr $f27
fclr $f28
fclr $f29
fclr $f30
mov $sp,$0
ret ($26)
.end OPENSSL_wipe_cpu
.globl OPENSSL_atomic_add
.ent OPENSSL_atomic_add
OPENSSL_atomic_add:
.frame $30,0,$26
.prologue 0
1: ldl_l $0,0($16)
addl $0,$17,$1
stl_c $1,0($16)
beq $1,1b
addl $0,$17,$0
ret ($26)
.end OPENSSL_atomic_add
.globl OPENSSL_rdtsc
.ent OPENSSL_rdtsc
OPENSSL_rdtsc:
.frame $30,0,$26
.prologue 0
rpcc $0
ret ($26)
.end OPENSSL_rdtsc
.globl OPENSSL_cleanse
.ent OPENSSL_cleanse
OPENSSL_cleanse:
.frame $30,0,$26
.prologue 0
beq $17,.Ldone
and $16,7,$0
bic $17,7,$at
beq $at,.Little
beq $0,.Laligned
.Little:
subq $0,8,$0
ldq_u $1,0($16)
mov $16,$2
.Lalign:
mskbl $1,$16,$1
lda $16,1($16)
subq $17,1,$17
addq $0,1,$0
beq $17,.Lout
bne $0,.Lalign
.Lout: stq_u $1,0($2)
beq $17,.Ldone
bic $17,7,$at
beq $at,.Little
.Laligned:
stq $31,0($16)
subq $17,8,$17
lda $16,8($16)
bic $17,7,$at
bne $at,.Laligned
bne $17,.Little
.Ldone: ret ($26)
.end OPENSSL_cleanse
___
#ifndef __ARM_ARCH_H__
#define __ARM_ARCH_H__
#if !defined(__ARM_ARCH__)
# if defined(__CC_ARM)
# define __ARM_ARCH__ __TARGET_ARCH_ARM
# if defined(__BIG_ENDIAN)
# define __ARMEB__
# else
# define __ARMEL__
# endif
# elif defined(__GNUC__)
/*
* Why doesn't gcc define __ARM_ARCH__? Instead it defines
* bunch of below macros. See all_architectires[] table in
* gcc/config/arm/arm.c. On a side note it defines
* __ARMEL__/__ARMEB__ for little-/big-endian.
*/
# if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
defined(__ARM_ARCH_7R__)|| defined(__ARM_ARCH_7M__) || \
defined(__ARM_ARCH_7EM__)
# define __ARM_ARCH__ 7
# elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
defined(__ARM_ARCH_6K__)|| defined(__ARM_ARCH_6M__) || \
defined(__ARM_ARCH_6Z__)|| defined(__ARM_ARCH_6ZK__) || \
defined(__ARM_ARCH_6T2__)
# define __ARM_ARCH__ 6
# elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \
defined(__ARM_ARCH_5E__)|| defined(__ARM_ARCH_5TE__) || \
defined(__ARM_ARCH_5TEJ__)
# define __ARM_ARCH__ 5
# elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
# define __ARM_ARCH__ 4
# else
# error "unsupported ARM architecture"
# endif
# endif
#endif
#ifdef OPENSSL_FIPSCANISTER
#include <openssl/fipssyms.h>
#endif
#if !__ASSEMBLER__
extern unsigned int OPENSSL_armcap_P;
#define ARMV7_NEON (1<<0)
#define ARMV7_TICK (1<<1)
#endif
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -87,7 +87,8 @@ int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, ...@@ -87,7 +87,8 @@ int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
p=str; p=str;
i2d(data,&p); i2d(data,&p);
EVP_Digest(str, i, md, len, type, NULL); if (!EVP_Digest(str, i, md, len, type, NULL))
return 0;
OPENSSL_free(str); OPENSSL_free(str);
return(1); return(1);
} }
...@@ -104,7 +105,8 @@ int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, ...@@ -104,7 +105,8 @@ int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn,
i=ASN1_item_i2d(asn,&str, it); i=ASN1_item_i2d(asn,&str, it);
if (!str) return(0); if (!str) return(0);
EVP_Digest(str, i, md, len, type, NULL); if (!EVP_Digest(str, i, md, len, type, NULL))
return 0;
OPENSSL_free(str); OPENSSL_free(str);
return(1); return(1);
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
The version numbers will follow my SSL implementation
0.7.2r - Some reasonable default compiler options from
Peter Gutman <pgut001@cs.auckland.ac.nz>
0.7.2m - the first release
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment