Initial commit
This commit is contained in:
68
package/libs/openssl/Config.in
Normal file
68
package/libs/openssl/Config.in
Normal file
@@ -0,0 +1,68 @@
|
||||
if PACKAGE_libopenssl
|
||||
|
||||
config OPENSSL_WITH_EC
|
||||
bool
|
||||
default y
|
||||
prompt "Enable elliptic curve support"
|
||||
|
||||
config OPENSSL_WITH_EC2M
|
||||
bool
|
||||
depends on OPENSSL_WITH_EC
|
||||
prompt "Enable ec2m support"
|
||||
|
||||
config OPENSSL_WITH_SSL3
|
||||
bool
|
||||
default n
|
||||
prompt "Enable sslv3 support"
|
||||
|
||||
config OPENSSL_WITH_DEPRECATED
|
||||
bool
|
||||
default y
|
||||
prompt "Include deprecated APIs"
|
||||
|
||||
config OPENSSL_WITH_DTLS
|
||||
bool
|
||||
default n
|
||||
prompt "Enable DTLS support"
|
||||
|
||||
config OPENSSL_WITH_COMPRESSION
|
||||
bool
|
||||
default n
|
||||
prompt "Enable compression support"
|
||||
|
||||
config OPENSSL_WITH_NPN
|
||||
bool
|
||||
default y
|
||||
prompt "Enable NPN support"
|
||||
|
||||
config OPENSSL_WITH_PSK
|
||||
bool
|
||||
default y
|
||||
prompt "Enable PSK support"
|
||||
|
||||
config OPENSSL_WITH_SRP
|
||||
bool
|
||||
default y
|
||||
prompt "Enable SRP support"
|
||||
|
||||
config OPENSSL_ENGINE_DIGEST
|
||||
bool
|
||||
depends on OPENSSL_ENGINE_CRYPTO
|
||||
prompt "Digests acceleration support"
|
||||
|
||||
config OPENSSL_HARDWARE_SUPPORT
|
||||
bool
|
||||
default n
|
||||
prompt "Enable hardware support"
|
||||
|
||||
config OPENSSL_OPTIMIZE_SPEED
|
||||
bool
|
||||
default n
|
||||
prompt "Enable optimization for speed instead of size"
|
||||
|
||||
endif
|
||||
|
||||
config OPENSSL_ENGINE_CRYPTO
|
||||
bool
|
||||
select OPENSSL_HARDWARE_SUPPORT
|
||||
prompt "Crypto acceleration support" if PACKAGE_libopenssl
|
||||
271
package/libs/openssl/Makefile
Normal file
271
package/libs/openssl/Makefile
Normal file
@@ -0,0 +1,271 @@
|
||||
#
|
||||
# Copyright (C) 2006-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl
|
||||
PKG_BASE:=1.0.2
|
||||
PKG_BUGFIX:=u
|
||||
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
|
||||
PKG_RELEASE:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_BUILD_PARALLEL:=0
|
||||
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:= \
|
||||
http://ftp.fi.muni.cz/pub/openssl/source/ \
|
||||
http://ftp.linux.hr/pub/openssl/source/ \
|
||||
http://gd.tuwien.ac.at/infosys/security/openssl/source/ \
|
||||
http://www.openssl.org/source/ \
|
||||
http://www.openssl.org/source/old/$(PKG_BASE)/
|
||||
PKG_HASH:=ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
|
||||
|
||||
PKG_LICENSE:=OpenSSL
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
|
||||
PKG_CPE_ID:=cpe:/a:openssl:openssl
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_OPENSSL_ENGINE_CRYPTO \
|
||||
CONFIG_OPENSSL_ENGINE_DIGEST \
|
||||
CONFIG_OPENSSL_WITH_EC \
|
||||
CONFIG_OPENSSL_WITH_EC2M \
|
||||
CONFIG_OPENSSL_WITH_SSL3 \
|
||||
CONFIG_OPENSSL_HARDWARE_SUPPORT \
|
||||
CONFIG_OPENSSL_WITH_DEPRECATED \
|
||||
CONFIG_OPENSSL_WITH_DTLS \
|
||||
CONFIG_OPENSSL_WITH_COMPRESSION \
|
||||
CONFIG_OPENSSL_WITH_NPN \
|
||||
CONFIG_OPENSSL_WITH_PSK \
|
||||
CONFIG_OPENSSL_WITH_SRP \
|
||||
CONFIG_OPENSSL_OPTIMIZE_SPEED
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
HOSTCC=$(HOSTCC_NOCACHE)
|
||||
HOSTCXX=$(HOSTCXX_NOCACHE)
|
||||
endif
|
||||
|
||||
define Package/openssl/Default
|
||||
TITLE:=Open source SSL toolkit
|
||||
URL:=http://www.openssl.org/
|
||||
endef
|
||||
|
||||
define Package/libopenssl/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/openssl/Default/description
|
||||
The OpenSSL Project is a collaborative effort to develop a robust,
|
||||
commercial-grade, full-featured, and Open Source toolkit implementing the Secure
|
||||
Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well
|
||||
as a full-strength general purpose cryptography library.
|
||||
endef
|
||||
|
||||
define Package/libopenssl
|
||||
$(call Package/openssl/Default)
|
||||
SECTION:=libs
|
||||
SUBMENU:=SSL
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+OPENSSL_WITH_COMPRESSION:zlib
|
||||
TITLE+= (libraries)
|
||||
ABI_VERSION:=$(PKG_VERSION)
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/libopenssl/description
|
||||
$(call Package/openssl/Default/description)
|
||||
This package contains the OpenSSL shared libraries, needed by other programs.
|
||||
endef
|
||||
|
||||
define Package/openssl-util
|
||||
$(call Package/openssl/Default)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libopenssl
|
||||
TITLE+= (utility)
|
||||
endef
|
||||
|
||||
define Package/openssl-util/conffiles
|
||||
/etc/ssl/openssl.cnf
|
||||
endef
|
||||
|
||||
define Package/openssl-util/description
|
||||
$(call Package/openssl/Default/description)
|
||||
This package contains the OpenSSL command-line utility.
|
||||
endef
|
||||
|
||||
|
||||
OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-camellia no-krb5 \
|
||||
no-whrlpool no-whirlpool no-seed no-jpake
|
||||
OPENSSL_OPTIONS:= shared no-err no-sse2 no-ssl2 no-ssl2-method no-heartbeats
|
||||
|
||||
ifdef CONFIG_OPENSSL_ENGINE_CRYPTO
|
||||
OPENSSL_OPTIONS += -DHAVE_CRYPTODEV
|
||||
ifdef CONFIG_OPENSSL_ENGINE_DIGEST
|
||||
OPENSSL_OPTIONS += -DUSE_CRYPTODEV_DIGESTS
|
||||
endif
|
||||
else
|
||||
OPENSSL_OPTIONS += no-engines
|
||||
endif
|
||||
|
||||
ifndef CONFIG_OPENSSL_WITH_EC
|
||||
OPENSSL_OPTIONS += no-ec
|
||||
endif
|
||||
|
||||
ifndef CONFIG_OPENSSL_WITH_EC2M
|
||||
OPENSSL_OPTIONS += no-ec2m
|
||||
endif
|
||||
|
||||
ifndef CONFIG_OPENSSL_WITH_SSL3
|
||||
OPENSSL_OPTIONS += no-ssl3 no-ssl3-method
|
||||
endif
|
||||
|
||||
ifndef CONFIG_OPENSSL_HARDWARE_SUPPORT
|
||||
OPENSSL_OPTIONS += no-hw
|
||||
endif
|
||||
|
||||
ifndef CONFIG_OPENSSL_WITH_DEPRECATED
|
||||
OPENSSL_OPTIONS += no-deprecated
|
||||
endif
|
||||
|
||||
ifndef CONFIG_OPENSSL_WITH_DTLS
|
||||
OPENSSL_OPTIONS += no-dtls
|
||||
endif
|
||||
|
||||
ifdef CONFIG_OPENSSL_WITH_COMPRESSION
|
||||
OPENSSL_OPTIONS += zlib-dynamic
|
||||
else
|
||||
OPENSSL_OPTIONS += no-comp
|
||||
endif
|
||||
|
||||
ifndef CONFIG_OPENSSL_WITH_NPN
|
||||
OPENSSL_OPTIONS += no-nextprotoneg
|
||||
endif
|
||||
|
||||
ifndef CONFIG_OPENSSL_WITH_PSK
|
||||
OPENSSL_OPTIONS += no-psk
|
||||
endif
|
||||
|
||||
ifndef CONFIG_OPENSSL_WITH_SRP
|
||||
OPENSSL_OPTIONS += no-srp
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OPENSSL_OPTIMIZE_SPEED),y)
|
||||
TARGET_CFLAGS := $(filter-out -Os,$(TARGET_CFLAGS)) -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_x86_64),y)
|
||||
OPENSSL_TARGET:=linux-x86_64-openwrt
|
||||
OPENSSL_MAKEFLAGS += LIBDIR=lib
|
||||
else
|
||||
OPENSSL_OPTIONS+=no-sse2
|
||||
ifeq ($(CONFIG_mips)$(CONFIG_mipsel),y)
|
||||
OPENSSL_TARGET:=linux-mips-openwrt
|
||||
else ifeq ($(CONFIG_aarch64),y)
|
||||
OPENSSL_TARGET:=linux-aarch64-openwrt
|
||||
else ifeq ($(CONFIG_arm)$(CONFIG_armeb),y)
|
||||
OPENSSL_TARGET:=linux-armv4-openwrt
|
||||
else
|
||||
OPENSSL_TARGET:=linux-generic-openwrt
|
||||
OPENSSL_OPTIONS+=no-perlasm
|
||||
endif
|
||||
endif
|
||||
|
||||
STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(shell echo $(OPENSSL_OPTIONS) | mkhash md5)
|
||||
|
||||
define Build/Configure
|
||||
[ -f $(STAMP_CONFIGURED) ] || { \
|
||||
rm -f $(PKG_BUILD_DIR)/*.so.* $(PKG_BUILD_DIR)/*.a; \
|
||||
find $(PKG_BUILD_DIR) -name \*.o | xargs rm -f; \
|
||||
}
|
||||
(cd $(PKG_BUILD_DIR); \
|
||||
./Configure $(OPENSSL_TARGET) \
|
||||
--prefix=/usr \
|
||||
--openssldir=/etc/ssl \
|
||||
$(TARGET_CPPFLAGS) \
|
||||
$(TARGET_LDFLAGS) -ldl \
|
||||
$(if $(CONFIG_OPENSSL_OPTIMIZE_SPEED),,-DOPENSSL_SMALL_FOOTPRINT) \
|
||||
$(OPENSSL_NO_CIPHERS) \
|
||||
$(OPENSSL_OPTIONS) \
|
||||
)
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
MAKEDEPPROG="$(TARGET_CROSS)gcc" \
|
||||
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
||||
$(OPENSSL_MAKEFLAGS) \
|
||||
depend
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += $(FPIC) -I$(CURDIR)/include -ffunction-sections -fdata-sections
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CC="$(TARGET_CC)" \
|
||||
ASFLAGS="$(TARGET_ASFLAGS) -I$(PKG_BUILD_DIR)/crypto -c" \
|
||||
AR="$(TARGET_CROSS)ar r" \
|
||||
RANLIB="$(TARGET_CROSS)ranlib" \
|
||||
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
||||
$(OPENSSL_MAKEFLAGS) \
|
||||
all
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CC="$(TARGET_CC)" \
|
||||
ASFLAGS="$(TARGET_ASFLAGS) -I$(PKG_BUILD_DIR)/crypto -c" \
|
||||
AR="$(TARGET_CROSS)ar r" \
|
||||
RANLIB="$(TARGET_CROSS)ranlib" \
|
||||
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
||||
$(OPENSSL_MAKEFLAGS) \
|
||||
build-shared
|
||||
# Work around openssl build bug to link libssl.so with libcrypto.so.
|
||||
-rm $(PKG_BUILD_DIR)/libssl.so.*.*.*
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CC="$(TARGET_CC)" \
|
||||
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
||||
$(OPENSSL_MAKEFLAGS) \
|
||||
do_linux-shared
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CC="$(TARGET_CC)" \
|
||||
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
|
||||
$(OPENSSL_MAKEFLAGS) \
|
||||
install
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/openssl $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/{openssl,libcrypto,libssl}.pc $(1)/usr/lib/pkgconfig/
|
||||
[ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/{openssl,libcrypto,libssl}.pc || true
|
||||
endef
|
||||
|
||||
define Package/libopenssl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcrypto.so.* $(1)/usr/lib/
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libssl.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/openssl-util/install
|
||||
$(INSTALL_DIR) $(1)/etc/ssl
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(1)/etc/ssl/
|
||||
$(INSTALL_DIR) $(1)/etc/ssl/certs
|
||||
$(INSTALL_DIR) $(1)/etc/ssl/private
|
||||
chmod 0700 $(1)/etc/ssl/private
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openssl $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libopenssl))
|
||||
$(eval $(call BuildPackage,openssl-util))
|
||||
292
package/libs/openssl/include/crypto/cryptodev.h
Normal file
292
package/libs/openssl/include/crypto/cryptodev.h
Normal file
@@ -0,0 +1,292 @@
|
||||
/* This is a source compatible implementation with the original API of
|
||||
* cryptodev by Angelos D. Keromytis, found at openbsd cryptodev.h.
|
||||
* Placed under public domain */
|
||||
|
||||
#ifndef L_CRYPTODEV_H
|
||||
#define L_CRYPTODEV_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#ifndef __KERNEL__
|
||||
#define __user
|
||||
#endif
|
||||
|
||||
/* API extensions for linux */
|
||||
#define CRYPTO_HMAC_MAX_KEY_LEN 512
|
||||
#define CRYPTO_CIPHER_MAX_KEY_LEN 64
|
||||
|
||||
/* All the supported algorithms
|
||||
*/
|
||||
enum cryptodev_crypto_op_t {
|
||||
CRYPTO_DES_CBC = 1,
|
||||
CRYPTO_3DES_CBC = 2,
|
||||
CRYPTO_BLF_CBC = 3,
|
||||
CRYPTO_CAST_CBC = 4,
|
||||
CRYPTO_SKIPJACK_CBC = 5,
|
||||
CRYPTO_MD5_HMAC = 6,
|
||||
CRYPTO_SHA1_HMAC = 7,
|
||||
CRYPTO_RIPEMD160_HMAC = 8,
|
||||
CRYPTO_MD5_KPDK = 9,
|
||||
CRYPTO_SHA1_KPDK = 10,
|
||||
CRYPTO_RIJNDAEL128_CBC = 11,
|
||||
CRYPTO_AES_CBC = CRYPTO_RIJNDAEL128_CBC,
|
||||
CRYPTO_ARC4 = 12,
|
||||
CRYPTO_MD5 = 13,
|
||||
CRYPTO_SHA1 = 14,
|
||||
CRYPTO_DEFLATE_COMP = 15,
|
||||
CRYPTO_NULL = 16,
|
||||
CRYPTO_LZS_COMP = 17,
|
||||
CRYPTO_SHA2_256_HMAC = 18,
|
||||
CRYPTO_SHA2_384_HMAC = 19,
|
||||
CRYPTO_SHA2_512_HMAC = 20,
|
||||
CRYPTO_AES_CTR = 21,
|
||||
CRYPTO_AES_XTS = 22,
|
||||
CRYPTO_AES_ECB = 23,
|
||||
CRYPTO_AES_GCM = 50,
|
||||
|
||||
CRYPTO_CAMELLIA_CBC = 101,
|
||||
CRYPTO_RIPEMD160,
|
||||
CRYPTO_SHA2_224,
|
||||
CRYPTO_SHA2_256,
|
||||
CRYPTO_SHA2_384,
|
||||
CRYPTO_SHA2_512,
|
||||
CRYPTO_SHA2_224_HMAC,
|
||||
CRYPTO_ALGORITHM_ALL, /* Keep updated - see below */
|
||||
};
|
||||
|
||||
#define CRYPTO_ALGORITHM_MAX (CRYPTO_ALGORITHM_ALL - 1)
|
||||
|
||||
/* Values for ciphers */
|
||||
#define DES_BLOCK_LEN 8
|
||||
#define DES3_BLOCK_LEN 8
|
||||
#define RIJNDAEL128_BLOCK_LEN 16
|
||||
#define AES_BLOCK_LEN RIJNDAEL128_BLOCK_LEN
|
||||
#define CAMELLIA_BLOCK_LEN 16
|
||||
#define BLOWFISH_BLOCK_LEN 8
|
||||
#define SKIPJACK_BLOCK_LEN 8
|
||||
#define CAST128_BLOCK_LEN 8
|
||||
|
||||
/* the maximum of the above */
|
||||
#define EALG_MAX_BLOCK_LEN 16
|
||||
|
||||
/* Values for hashes/MAC */
|
||||
#define AALG_MAX_RESULT_LEN 64
|
||||
|
||||
/* maximum length of verbose alg names (depends on CRYPTO_MAX_ALG_NAME) */
|
||||
#define CRYPTODEV_MAX_ALG_NAME 64
|
||||
|
||||
#define HASH_MAX_LEN 64
|
||||
|
||||
/* input of CIOCGSESSION */
|
||||
struct session_op {
|
||||
/* Specify either cipher or mac
|
||||
*/
|
||||
__u32 cipher; /* cryptodev_crypto_op_t */
|
||||
__u32 mac; /* cryptodev_crypto_op_t */
|
||||
|
||||
__u32 keylen;
|
||||
__u8 __user *key;
|
||||
__u32 mackeylen;
|
||||
__u8 __user *mackey;
|
||||
|
||||
__u32 ses; /* session identifier */
|
||||
};
|
||||
|
||||
struct session_info_op {
|
||||
__u32 ses; /* session identifier */
|
||||
|
||||
/* verbose names for the requested ciphers */
|
||||
struct alg_info {
|
||||
char cra_name[CRYPTODEV_MAX_ALG_NAME];
|
||||
char cra_driver_name[CRYPTODEV_MAX_ALG_NAME];
|
||||
} cipher_info, hash_info;
|
||||
|
||||
__u16 alignmask; /* alignment constraints */
|
||||
__u32 flags; /* SIOP_FLAGS_* */
|
||||
};
|
||||
|
||||
/* If this flag is set then this algorithm uses
|
||||
* a driver only available in kernel (software drivers,
|
||||
* or drivers based on instruction sets do not set this flag).
|
||||
*
|
||||
* If multiple algorithms are involved (as in AEAD case), then
|
||||
* if one of them is kernel-driver-only this flag will be set.
|
||||
*/
|
||||
#define SIOP_FLAG_KERNEL_DRIVER_ONLY 1
|
||||
|
||||
#define COP_ENCRYPT 0
|
||||
#define COP_DECRYPT 1
|
||||
|
||||
/* input of CIOCCRYPT */
|
||||
struct crypt_op {
|
||||
__u32 ses; /* session identifier */
|
||||
__u16 op; /* COP_ENCRYPT or COP_DECRYPT */
|
||||
__u16 flags; /* see COP_FLAG_* */
|
||||
__u32 len; /* length of source data */
|
||||
__u8 __user *src; /* source data */
|
||||
__u8 __user *dst; /* pointer to output data */
|
||||
/* pointer to output data for hash/MAC operations */
|
||||
__u8 __user *mac;
|
||||
/* initialization vector for encryption operations */
|
||||
__u8 __user *iv;
|
||||
};
|
||||
|
||||
/* input of CIOCAUTHCRYPT */
|
||||
struct crypt_auth_op {
|
||||
__u32 ses; /* session identifier */
|
||||
__u16 op; /* COP_ENCRYPT or COP_DECRYPT */
|
||||
__u16 flags; /* see COP_FLAG_AEAD_* */
|
||||
__u32 len; /* length of source data */
|
||||
__u32 auth_len; /* length of auth data */
|
||||
__u8 __user *auth_src; /* authenticated-only data */
|
||||
|
||||
/* The current implementation is more efficient if data are
|
||||
* encrypted in-place (src==dst). */
|
||||
__u8 __user *src; /* data to be encrypted and authenticated */
|
||||
__u8 __user *dst; /* pointer to output data. Must have
|
||||
* space for tag. For TLS this should be at least
|
||||
* len + tag_size + block_size for padding */
|
||||
|
||||
__u8 __user *tag; /* where the tag will be copied to. TLS mode
|
||||
* doesn't use that as tag is copied to dst.
|
||||
* SRTP mode copies tag there. */
|
||||
__u32 tag_len; /* the length of the tag. Use zero for digest size or max tag. */
|
||||
|
||||
/* initialization vector for encryption operations */
|
||||
__u8 __user *iv;
|
||||
__u32 iv_len;
|
||||
};
|
||||
|
||||
/* In plain AEAD mode the following are required:
|
||||
* flags : 0
|
||||
* iv : the initialization vector (12 bytes)
|
||||
* auth_len: the length of the data to be authenticated
|
||||
* auth_src: the data to be authenticated
|
||||
* len : length of data to be encrypted
|
||||
* src : the data to be encrypted
|
||||
* dst : space to hold encrypted data. It must have
|
||||
* at least a size of len + tag_size.
|
||||
* tag_size: the size of the desired authentication tag or zero to use
|
||||
* the maximum tag output.
|
||||
*
|
||||
* Note tag isn't being used because the Linux AEAD interface
|
||||
* copies the tag just after data.
|
||||
*/
|
||||
|
||||
/* In TLS mode (used for CBC ciphers that required padding)
|
||||
* the following are required:
|
||||
* flags : COP_FLAG_AEAD_TLS_TYPE
|
||||
* iv : the initialization vector
|
||||
* auth_len: the length of the data to be authenticated only
|
||||
* len : length of data to be encrypted
|
||||
* auth_src: the data to be authenticated
|
||||
* src : the data to be encrypted
|
||||
* dst : space to hold encrypted data (preferably in-place). It must have
|
||||
* at least a size of len + tag_size + blocksize.
|
||||
* tag_size: the size of the desired authentication tag or zero to use
|
||||
* the default mac output.
|
||||
*
|
||||
* Note that the padding used is the minimum padding.
|
||||
*/
|
||||
|
||||
/* In SRTP mode the following are required:
|
||||
* flags : COP_FLAG_AEAD_SRTP_TYPE
|
||||
* iv : the initialization vector
|
||||
* auth_len: the length of the data to be authenticated. This must
|
||||
* include the SRTP header + SRTP payload (data to be encrypted) + rest
|
||||
*
|
||||
* len : length of data to be encrypted
|
||||
* auth_src: pointer the data to be authenticated. Should point at the same buffer as src.
|
||||
* src : pointer to the data to be encrypted.
|
||||
* dst : This is mandatory to be the same as src (in-place only).
|
||||
* tag_size: the size of the desired authentication tag or zero to use
|
||||
* the default mac output.
|
||||
* tag : Pointer to an address where the authentication tag will be copied.
|
||||
*/
|
||||
|
||||
|
||||
/* struct crypt_op flags */
|
||||
|
||||
#define COP_FLAG_NONE (0 << 0) /* totally no flag */
|
||||
#define COP_FLAG_UPDATE (1 << 0) /* multi-update hash mode */
|
||||
#define COP_FLAG_FINAL (1 << 1) /* multi-update final hash mode */
|
||||
#define COP_FLAG_WRITE_IV (1 << 2) /* update the IV during operation */
|
||||
#define COP_FLAG_NO_ZC (1 << 3) /* do not zero-copy */
|
||||
#define COP_FLAG_AEAD_TLS_TYPE (1 << 4) /* authenticate and encrypt using the
|
||||
* TLS protocol rules */
|
||||
#define COP_FLAG_AEAD_SRTP_TYPE (1 << 5) /* authenticate and encrypt using the
|
||||
* SRTP protocol rules */
|
||||
#define COP_FLAG_RESET (1 << 6) /* multi-update reset the state.
|
||||
* should be used in combination
|
||||
* with COP_FLAG_UPDATE */
|
||||
|
||||
|
||||
/* Stuff for bignum arithmetic and public key
|
||||
* cryptography - not supported yet by linux
|
||||
* cryptodev.
|
||||
*/
|
||||
|
||||
#define CRYPTO_ALG_FLAG_SUPPORTED 1
|
||||
#define CRYPTO_ALG_FLAG_RNG_ENABLE 2
|
||||
#define CRYPTO_ALG_FLAG_DSA_SHA 4
|
||||
|
||||
struct crparam {
|
||||
__u8 *crp_p;
|
||||
__u32 crp_nbits;
|
||||
};
|
||||
|
||||
#define CRK_MAXPARAM 8
|
||||
|
||||
/* input of CIOCKEY */
|
||||
struct crypt_kop {
|
||||
__u32 crk_op; /* cryptodev_crk_op_t */
|
||||
__u32 crk_status;
|
||||
__u16 crk_iparams;
|
||||
__u16 crk_oparams;
|
||||
__u32 crk_pad1;
|
||||
struct crparam crk_param[CRK_MAXPARAM];
|
||||
};
|
||||
|
||||
enum cryptodev_crk_op_t {
|
||||
CRK_MOD_EXP = 0,
|
||||
CRK_MOD_EXP_CRT = 1,
|
||||
CRK_DSA_SIGN = 2,
|
||||
CRK_DSA_VERIFY = 3,
|
||||
CRK_DH_COMPUTE_KEY = 4,
|
||||
CRK_ALGORITHM_ALL
|
||||
};
|
||||
|
||||
#define CRK_ALGORITHM_MAX (CRK_ALGORITHM_ALL-1)
|
||||
|
||||
/* features to be queried with CIOCASYMFEAT ioctl
|
||||
*/
|
||||
#define CRF_MOD_EXP (1 << CRK_MOD_EXP)
|
||||
#define CRF_MOD_EXP_CRT (1 << CRK_MOD_EXP_CRT)
|
||||
#define CRF_DSA_SIGN (1 << CRK_DSA_SIGN)
|
||||
#define CRF_DSA_VERIFY (1 << CRK_DSA_VERIFY)
|
||||
#define CRF_DH_COMPUTE_KEY (1 << CRK_DH_COMPUTE_KEY)
|
||||
|
||||
|
||||
/* ioctl's. Compatible with old linux cryptodev.h
|
||||
*/
|
||||
#define CRIOGET _IOWR('c', 101, __u32)
|
||||
#define CIOCGSESSION _IOWR('c', 102, struct session_op)
|
||||
#define CIOCFSESSION _IOW('c', 103, __u32)
|
||||
#define CIOCCRYPT _IOWR('c', 104, struct crypt_op)
|
||||
#define CIOCKEY _IOWR('c', 105, struct crypt_kop)
|
||||
#define CIOCASYMFEAT _IOR('c', 106, __u32)
|
||||
#define CIOCGSESSINFO _IOWR('c', 107, struct session_info_op)
|
||||
|
||||
/* to indicate that CRIOGET is not required in linux
|
||||
*/
|
||||
#define CRIOGET_NOT_NEEDED 1
|
||||
|
||||
/* additional ioctls for AEAD */
|
||||
#define CIOCAUTHCRYPT _IOWR('c', 109, struct crypt_auth_op)
|
||||
|
||||
/* additional ioctls for asynchronous operation.
|
||||
* These are conditionally enabled since version 1.6.
|
||||
*/
|
||||
#define CIOCASYNCCRYPT _IOW('c', 110, struct crypt_op)
|
||||
#define CIOCASYNCFETCH _IOR('c', 111, struct crypt_op)
|
||||
|
||||
#endif /* L_CRYPTODEV_H */
|
||||
16
package/libs/openssl/patches/110-optimize-for-size.patch
Normal file
16
package/libs/openssl/patches/110-optimize-for-size.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -470,6 +470,13 @@ my %table=(
|
||||
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
||||
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
||||
|
||||
+# OpenWrt targets
|
||||
+"linux-armv4-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-aarch64-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-x86_64-openwrt", "gcc:-m64 -DL_ENDIAN -DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
+"linux-mips-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-generic-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+
|
||||
# Android: linux-* but without pointers to headers and libs.
|
||||
"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
64
package/libs/openssl/patches/130-perl-path.patch
Normal file
64
package/libs/openssl/patches/130-perl-path.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -1,4 +1,4 @@
|
||||
-:
|
||||
+#!/usr/bin/perl
|
||||
eval 'exec perl -S $0 ${1+"$@"}'
|
||||
if $running_under_some_shell;
|
||||
##
|
||||
--- a/tools/c_rehash.in
|
||||
+++ b/tools/c_rehash.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl
|
||||
+#!/usr/bin/perl
|
||||
|
||||
# Perl c_rehash script, scan all files in a directory
|
||||
# and add symbolic links to their hash values.
|
||||
--- a/util/clean-depend.pl
|
||||
+++ b/util/clean-depend.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl -w
|
||||
+#!/usr/bin/perl
|
||||
# Clean the dependency list in a makefile of standard includes...
|
||||
# Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
|
||||
|
||||
--- a/util/mkdef.pl
|
||||
+++ b/util/mkdef.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl -w
|
||||
+#!/usr/bin/perl
|
||||
#
|
||||
# generate a .def file
|
||||
#
|
||||
--- a/util/mkerr.pl
|
||||
+++ b/util/mkerr.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl -w
|
||||
+#!/usr/bin/perl
|
||||
|
||||
my $config = "crypto/err/openssl.ec";
|
||||
my $hprefix = "openssl/";
|
||||
--- a/util/mkstack.pl
|
||||
+++ b/util/mkstack.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl -w
|
||||
+#!/usr/bin/perl
|
||||
|
||||
# This is a utility that searches out "DECLARE_STACK_OF()"
|
||||
# declarations in .h and .c files, and updates/creates/replaces
|
||||
--- a/util/pod2man.pl
|
||||
+++ b/util/pod2man.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-: #!/usr/bin/perl-5.005
|
||||
+#!/usr/bin/perl
|
||||
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
|
||||
if $running_under_some_shell;
|
||||
|
||||
--- a/util/selftest.pl
|
||||
+++ b/util/selftest.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl -w
|
||||
+#!/usr/bin/perl
|
||||
#
|
||||
# Run the test suite and generate a report
|
||||
#
|
||||
11
package/libs/openssl/patches/140-makefile-dirs.patch
Normal file
11
package/libs/openssl/patches/140-makefile-dirs.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/Makefile.org
|
||||
+++ b/Makefile.org
|
||||
@@ -137,7 +137,7 @@ FIPSCANLIB=
|
||||
|
||||
BASEADDR=
|
||||
|
||||
-DIRS= crypto ssl engines apps test tools
|
||||
+DIRS= crypto ssl apps
|
||||
ENGDIRS= ccgost
|
||||
SHLIBDIRS= crypto ssl
|
||||
|
||||
81
package/libs/openssl/patches/150-no_engines.patch
Normal file
81
package/libs/openssl/patches/150-no_engines.patch
Normal file
@@ -0,0 +1,81 @@
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -2145,6 +2145,11 @@ EOF
|
||||
close(OUT);
|
||||
}
|
||||
|
||||
+# ugly hack to disable engines
|
||||
+if($target eq "mingwx") {
|
||||
+ system("sed -e s/^LIB/XLIB/g -i engines/Makefile");
|
||||
+}
|
||||
+
|
||||
print <<EOF;
|
||||
|
||||
Configured for $target.
|
||||
--- a/util/libeay.num
|
||||
+++ b/util/libeay.num
|
||||
@@ -2075,7 +2075,6 @@ PKCS7_ATTR_SIGN_it
|
||||
UI_add_error_string 2633 EXIST::FUNCTION:
|
||||
KRB5_CHECKSUM_free 2634 EXIST::FUNCTION:
|
||||
OCSP_REQUEST_get_ext 2635 EXIST::FUNCTION:
|
||||
-ENGINE_load_ubsec 2636 EXIST::FUNCTION:ENGINE,STATIC_ENGINE
|
||||
ENGINE_register_all_digests 2637 EXIST::FUNCTION:ENGINE
|
||||
PKEY_USAGE_PERIOD_it 2638 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
PKEY_USAGE_PERIOD_it 2638 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
@@ -2549,7 +2548,6 @@ OCSP_RESPONSE_new
|
||||
AES_set_encrypt_key 3024 EXIST::FUNCTION:AES
|
||||
OCSP_resp_count 3025 EXIST::FUNCTION:
|
||||
KRB5_CHECKSUM_new 3026 EXIST::FUNCTION:
|
||||
-ENGINE_load_cswift 3027 EXIST::FUNCTION:ENGINE,STATIC_ENGINE
|
||||
OCSP_onereq_get0_id 3028 EXIST::FUNCTION:
|
||||
ENGINE_set_default_ciphers 3029 EXIST::FUNCTION:ENGINE
|
||||
NOTICEREF_it 3030 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
@@ -2580,7 +2578,6 @@ ASN1_primitive_free
|
||||
i2d_EXTENDED_KEY_USAGE 3052 EXIST::FUNCTION:
|
||||
i2d_OCSP_SIGNATURE 3053 EXIST::FUNCTION:
|
||||
asn1_enc_save 3054 EXIST::FUNCTION:
|
||||
-ENGINE_load_nuron 3055 EXIST::FUNCTION:ENGINE,STATIC_ENGINE
|
||||
_ossl_old_des_pcbc_encrypt 3056 EXIST::FUNCTION:DES
|
||||
PKCS12_MAC_DATA_it 3057 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
PKCS12_MAC_DATA_it 3057 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
@@ -2604,7 +2601,6 @@ asn1_get_choice_selector
|
||||
i2d_KRB5_CHECKSUM 3072 EXIST::FUNCTION:
|
||||
ENGINE_set_table_flags 3073 EXIST::FUNCTION:ENGINE
|
||||
AES_options 3074 EXIST::FUNCTION:AES
|
||||
-ENGINE_load_chil 3075 EXIST::FUNCTION:ENGINE,STATIC_ENGINE
|
||||
OCSP_id_cmp 3076 EXIST::FUNCTION:
|
||||
OCSP_BASICRESP_new 3077 EXIST::FUNCTION:
|
||||
OCSP_REQUEST_get_ext_by_NID 3078 EXIST::FUNCTION:
|
||||
@@ -2671,7 +2667,6 @@ OCSP_CRLID_it
|
||||
OCSP_CRLID_it 3127 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
i2d_KRB5_AUTHENTBODY 3128 EXIST::FUNCTION:
|
||||
OCSP_REQUEST_get_ext_count 3129 EXIST::FUNCTION:
|
||||
-ENGINE_load_atalla 3130 EXIST::FUNCTION:ENGINE,STATIC_ENGINE
|
||||
X509_NAME_it 3131 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
X509_NAME_it 3131 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
USERNOTICE_it 3132 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
@@ -2766,8 +2761,6 @@ DES_read_2passwords
|
||||
DES_read_password 3207 EXIST::FUNCTION:DES
|
||||
UI_UTIL_read_pw 3208 EXIST::FUNCTION:
|
||||
UI_UTIL_read_pw_string 3209 EXIST::FUNCTION:
|
||||
-ENGINE_load_aep 3210 EXIST::FUNCTION:ENGINE,STATIC_ENGINE
|
||||
-ENGINE_load_sureware 3211 EXIST::FUNCTION:ENGINE,STATIC_ENGINE
|
||||
OPENSSL_add_all_algorithms_noconf 3212 EXIST:!VMS:FUNCTION:
|
||||
OPENSSL_add_all_algo_noconf 3212 EXIST:VMS:FUNCTION:
|
||||
OPENSSL_add_all_algorithms_conf 3213 EXIST:!VMS:FUNCTION:
|
||||
@@ -2776,7 +2769,6 @@ OPENSSL_load_builtin_modules
|
||||
AES_ofb128_encrypt 3215 EXIST::FUNCTION:AES
|
||||
AES_ctr128_encrypt 3216 EXIST::FUNCTION:AES
|
||||
AES_cfb128_encrypt 3217 EXIST::FUNCTION:AES
|
||||
-ENGINE_load_4758cca 3218 EXIST::FUNCTION:ENGINE,STATIC_ENGINE
|
||||
_ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES
|
||||
EVP_aes_256_ofb 3220 EXIST::FUNCTION:AES
|
||||
EVP_aes_192_ofb 3221 EXIST::FUNCTION:AES
|
||||
@@ -3111,7 +3103,6 @@ EC_GFp_nist_method
|
||||
STORE_meth_set_modify_fn 3530 NOEXIST::FUNCTION:
|
||||
STORE_method_set_modify_function 3530 NOEXIST::FUNCTION:
|
||||
STORE_parse_attrs_next 3531 NOEXIST::FUNCTION:
|
||||
-ENGINE_load_padlock 3532 EXIST::FUNCTION:ENGINE,STATIC_ENGINE
|
||||
EC_GROUP_set_curve_name 3533 EXIST::FUNCTION:EC
|
||||
X509_CERT_PAIR_it 3534 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
X509_CERT_PAIR_it 3534 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
58
package/libs/openssl/patches/160-disable_doc_tests.patch
Normal file
58
package/libs/openssl/patches/160-disable_doc_tests.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -139,7 +139,7 @@ FIPSCANLIB=
|
||||
|
||||
BASEADDR=0xFB00000
|
||||
|
||||
-DIRS= crypto ssl engines apps test tools
|
||||
+DIRS= crypto ssl engines apps tools
|
||||
ENGDIRS= ccgost
|
||||
SHLIBDIRS= crypto ssl
|
||||
|
||||
@@ -157,7 +157,7 @@ SDIRS= \
|
||||
|
||||
# tests to perform. "alltests" is a special word indicating that all tests
|
||||
# should be performed.
|
||||
-TESTS = alltests
|
||||
+TESTS =
|
||||
|
||||
MAKEFILE= Makefile
|
||||
|
||||
@@ -171,7 +171,7 @@ SHELL=/bin/sh
|
||||
|
||||
TOP= .
|
||||
ONEDIRS=out tmp
|
||||
-EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
||||
+EDIRS= times bugs util include certs ms shlib mt demos perl sf dep VMS
|
||||
WDIRS= windows
|
||||
LIBS= libcrypto.a libssl.a
|
||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||
@@ -276,7 +276,7 @@ reflect:
|
||||
|
||||
sub_all: build_all
|
||||
|
||||
-build_all: build_libs build_apps build_tests build_tools
|
||||
+build_all: build_libs build_apps build_tools
|
||||
|
||||
build_libs: build_libcrypto build_libssl openssl.pc
|
||||
|
||||
@@ -542,7 +542,7 @@ dist:
|
||||
@$(MAKE) SDIRS='$(SDIRS)' clean
|
||||
@$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
|
||||
|
||||
-install: all install_docs install_sw
|
||||
+install: all install_sw
|
||||
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
--- a/Makefile.org
|
||||
+++ b/Makefile.org
|
||||
@@ -540,7 +540,7 @@ dist:
|
||||
@$(MAKE) SDIRS='$(SDIRS)' clean
|
||||
@$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
|
||||
|
||||
-install: all install_docs install_sw
|
||||
+install: all install_sw
|
||||
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
8
package/libs/openssl/patches/170-bash_path.patch
Normal file
8
package/libs/openssl/patches/170-bash_path.patch
Normal file
@@ -0,0 +1,8 @@
|
||||
--- a/util/domd
|
||||
+++ b/util/domd
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!/usr/bin/env bash
|
||||
# Do a makedepend, only leave out the standard headers
|
||||
# Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
|
||||
|
||||
18
package/libs/openssl/patches/180-fix_link_segfault.patch
Normal file
18
package/libs/openssl/patches/180-fix_link_segfault.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- a/Makefile.shared
|
||||
+++ b/Makefile.shared
|
||||
@@ -95,7 +95,6 @@ LINK_APP= \
|
||||
LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
|
||||
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
$${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} )
|
||||
|
||||
LINK_SO= \
|
||||
@@ -105,7 +104,6 @@ LINK_SO= \
|
||||
SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
|
||||
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
|
||||
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
|
||||
- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
|
||||
$${SHAREDCMD} $${SHAREDFLAGS} \
|
||||
-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
|
||||
$$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
|
||||
@@ -0,0 +1,23 @@
|
||||
--- a/Makefile.org
|
||||
+++ b/Makefile.org
|
||||
@@ -185,7 +185,7 @@ TARFILE= ../$(NAME).tar
|
||||
EXHEADER= e_os2.h
|
||||
HEADER= e_os.h
|
||||
|
||||
-all: Makefile build_all
|
||||
+all: build_all
|
||||
|
||||
# as we stick to -e, CLEARENV ensures that local variables in lower
|
||||
# Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
|
||||
@@ -404,11 +404,6 @@ openssl.pc: Makefile
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: libssl libcrypto' ) > openssl.pc
|
||||
|
||||
-Makefile: Makefile.org Configure config
|
||||
- @echo "Makefile is older than Makefile.org, Configure or config."
|
||||
- @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
|
||||
- @false
|
||||
-
|
||||
libclean:
|
||||
rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
|
||||
|
||||
184
package/libs/openssl/patches/200-parallel_build.patch
Normal file
184
package/libs/openssl/patches/200-parallel_build.patch
Normal file
@@ -0,0 +1,184 @@
|
||||
--- a/Makefile.org
|
||||
+++ b/Makefile.org
|
||||
@@ -282,17 +282,17 @@ build_libcrypto: build_crypto build_engi
|
||||
build_libssl: build_ssl libssl.pc
|
||||
|
||||
build_crypto:
|
||||
- @dir=crypto; target=all; $(BUILD_ONE_CMD)
|
||||
+ +@dir=crypto; target=all; $(BUILD_ONE_CMD)
|
||||
build_ssl: build_crypto
|
||||
- @dir=ssl; target=all; $(BUILD_ONE_CMD)
|
||||
+ +@dir=ssl; target=all; $(BUILD_ONE_CMD)
|
||||
build_engines: build_crypto
|
||||
- @dir=engines; target=all; $(BUILD_ONE_CMD)
|
||||
+ +@dir=engines; target=all; $(BUILD_ONE_CMD)
|
||||
build_apps: build_libs
|
||||
- @dir=apps; target=all; $(BUILD_ONE_CMD)
|
||||
+ +@dir=apps; target=all; $(BUILD_ONE_CMD)
|
||||
build_tests: build_libs
|
||||
- @dir=test; target=all; $(BUILD_ONE_CMD)
|
||||
+ +@dir=test; target=all; $(BUILD_ONE_CMD)
|
||||
build_tools: build_libs
|
||||
- @dir=tools; target=all; $(BUILD_ONE_CMD)
|
||||
+ +@dir=tools; target=all; $(BUILD_ONE_CMD)
|
||||
|
||||
all_testapps: build_libs build_testapps
|
||||
build_testapps:
|
||||
@@ -473,7 +473,7 @@ update: errors stacks util/libeay.num ut
|
||||
@set -e; target=update; $(RECURSIVE_BUILD_CMD)
|
||||
|
||||
depend:
|
||||
- @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
|
||||
+ +@set -e; target=depend; $(RECURSIVE_BUILD_CMD)
|
||||
|
||||
lint:
|
||||
@set -e; target=lint; $(RECURSIVE_BUILD_CMD)
|
||||
@@ -535,9 +535,9 @@ dist:
|
||||
@$(MAKE) SDIRS='$(SDIRS)' clean
|
||||
@$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
|
||||
|
||||
-install: all install_sw
|
||||
+install: install_sw
|
||||
|
||||
-install_sw:
|
||||
+install_dirs:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
|
||||
@@ -546,12 +546,19 @@ install_sw:
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/private
|
||||
+ @$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man1 \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
+ $(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
+
|
||||
+install_sw: install_dirs
|
||||
@set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
|
||||
do \
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
- @set -e; target=install; $(RECURSIVE_BUILD_CMD)
|
||||
+ +@set -e; target=install; $(RECURSIVE_BUILD_CMD)
|
||||
@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
@@ -635,12 +642,7 @@ install_html_docs:
|
||||
done; \
|
||||
done
|
||||
|
||||
-install_docs:
|
||||
- @$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man1 \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
- $(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
+install_docs: install_dirs
|
||||
@pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
|
||||
here="`pwd`"; \
|
||||
filecase=; \
|
||||
--- a/Makefile.shared
|
||||
+++ b/Makefile.shared
|
||||
@@ -120,6 +120,7 @@ SYMLINK_SO= \
|
||||
done; \
|
||||
fi; \
|
||||
if [ -n "$$SHLIB_SOVER" ]; then \
|
||||
+ [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
|
||||
( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
|
||||
ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
|
||||
fi; \
|
||||
--- a/crypto/Makefile
|
||||
+++ b/crypto/Makefile
|
||||
@@ -87,11 +87,11 @@ testapps:
|
||||
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
|
||||
|
||||
subdirs:
|
||||
- @target=all; $(RECURSIVE_MAKE)
|
||||
+ +@target=all; $(RECURSIVE_MAKE)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
|
||||
- @target=files; $(RECURSIVE_MAKE)
|
||||
+ +@target=files; $(RECURSIVE_MAKE)
|
||||
|
||||
links:
|
||||
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
|
||||
@@ -102,7 +102,7 @@ links:
|
||||
# lib: $(LIB): are splitted to avoid end-less loop
|
||||
lib: $(LIB)
|
||||
@touch lib
|
||||
-$(LIB): $(LIBOBJ)
|
||||
+$(LIB): $(LIBOBJ) | subdirs
|
||||
$(AR) $(LIB) $(LIBOBJ)
|
||||
test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
|
||||
$(RANLIB) $(LIB) || echo Never mind.
|
||||
@@ -113,7 +113,7 @@ shared: buildinf.h lib subdirs
|
||||
fi
|
||||
|
||||
libs:
|
||||
- @target=lib; $(RECURSIVE_MAKE)
|
||||
+ +@target=lib; $(RECURSIVE_MAKE)
|
||||
|
||||
install:
|
||||
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
||||
@@ -122,7 +122,7 @@ install:
|
||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
||||
done;
|
||||
- @target=install; $(RECURSIVE_MAKE)
|
||||
+ +@target=install; $(RECURSIVE_MAKE)
|
||||
|
||||
lint:
|
||||
@target=lint; $(RECURSIVE_MAKE)
|
||||
--- a/engines/Makefile
|
||||
+++ b/engines/Makefile
|
||||
@@ -72,7 +72,7 @@ top:
|
||||
|
||||
all: lib subdirs
|
||||
|
||||
-lib: $(LIBOBJ)
|
||||
+lib: $(LIBOBJ) | subdirs
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
set -e; \
|
||||
for l in $(LIBNAMES); do \
|
||||
@@ -89,7 +89,7 @@ lib: $(LIBOBJ)
|
||||
|
||||
subdirs:
|
||||
echo $(EDIRS)
|
||||
- @target=all; $(RECURSIVE_MAKE)
|
||||
+ +@target=all; $(RECURSIVE_MAKE)
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
|
||||
@@ -128,7 +128,7 @@ install:
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
|
||||
done; \
|
||||
fi
|
||||
- @target=install; $(RECURSIVE_MAKE)
|
||||
+ +@target=install; $(RECURSIVE_MAKE)
|
||||
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
--- a/test/Makefile
|
||||
+++ b/test/Makefile
|
||||
@@ -145,7 +145,7 @@ install:
|
||||
tags:
|
||||
ctags $(SRC)
|
||||
|
||||
-tests: exe apps $(TESTS)
|
||||
+tests: exe $(TESTS)
|
||||
|
||||
apps:
|
||||
@(cd ..; $(MAKE) DIRS=apps all)
|
||||
@@ -593,7 +593,7 @@ $(DTLSTEST)$(EXE_EXT): $(DTLSTEST).o ssl
|
||||
# fi
|
||||
|
||||
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
|
||||
- @target=dummytest; $(BUILD_CMD)
|
||||
+ +@target=dummytest; $(BUILD_CMD)
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
Reference in New Issue
Block a user