diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/openssl/patches/patch-Configure | 6 | ||||
-rw-r--r-- | package/openssl/patches/patch-Makefile | 96 | ||||
-rw-r--r-- | package/openssl/patches/patch-crypto_engine_eng_cryptodev_c | 380 | ||||
-rw-r--r-- | package/openssl/patches/patch-crypto_opensslconf_h | 213 | ||||
-rw-r--r-- | package/openssl/patches/patch-crypto_ui_ui_openssl_c | 6 | ||||
-rw-r--r-- | package/openssl/patches/patch-tools_c_rehash | 13 |
6 files changed, 708 insertions, 6 deletions
diff --git a/package/openssl/patches/patch-Configure b/package/openssl/patches/patch-Configure index 808662d33..2f1213e0e 100644 --- a/package/openssl/patches/patch-Configure +++ b/package/openssl/patches/patch-Configure @@ -1,6 +1,6 @@ ---- openssl-1.0.1c.orig/Configure 2012-03-14 23:20:40.000000000 +0100 -+++ openssl-1.0.1c/Configure 2013-01-31 14:32:14.000000000 +0100 -@@ -400,6 +400,8 @@ my %table=( +--- openssl-1.0.1e.orig/Configure 2013-02-11 16:26:04.000000000 +0100 ++++ openssl-1.0.1e/Configure 2013-08-17 16:07:11.782623643 +0200 +@@ -402,6 +402,8 @@ my %table=( "linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-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 -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", diff --git a/package/openssl/patches/patch-Makefile b/package/openssl/patches/patch-Makefile new file mode 100644 index 000000000..26e7be2f2 --- /dev/null +++ b/package/openssl/patches/patch-Makefile @@ -0,0 +1,96 @@ +--- openssl-1.0.1e.orig/Makefile 2013-02-11 16:26:04.000000000 +0100 ++++ openssl-1.0.1e/Makefile 2013-08-17 16:07:12.622613083 +0200 +@@ -11,11 +11,11 @@ SHLIB_VERSION_NUMBER=1.0.0 + SHLIB_VERSION_HISTORY= + SHLIB_MAJOR=1 + SHLIB_MINOR=0.0 +-SHLIB_EXT= +-PLATFORM=dist +-OPTIONS= no-ec_nistp_64_gcc_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-shared no-store no-zlib no-zlib-dynamic static-engine +-CONFIGURE_ARGS=dist +-SHLIB_TARGET= ++SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR) ++PLATFORM=linux-embedded ++OPTIONS=--prefix=/usr --openssldir=/etc/ssl -I/home/wbx/openadk/target_arm_musl/usr/include -L/home/wbx/openadk/target_arm_musl/usr/lib -ldl -DOPENSSL_SMALL_FOOTPRINT enable-shared enable-zlib-dynamic no-aes192 no-camellia no-cast no-ec no-ec_nistp_64_gcc_128 no-ecdh no-ecdsa no-engines no-err no-gmp no-gost no-idea no-jpake no-krb5 no-md2 no-mdc2 no-rc5 no-rfc3779 no-ripemd no-sctp no-sha0 no-smime no-store no-threads no-static-engine ++CONFIGURE_ARGS=linux-embedded --prefix=/usr --openssldir=/etc/ssl -I/home/wbx/openadk/target_arm_musl/usr/include -L/home/wbx/openadk/target_arm_musl/usr/lib -ldl -DOPENSSL_SMALL_FOOTPRINT shared no-err no-krb5 no-threads zlib-dynamic no-engines no-camellia no-idea no-rc5 no-mdc2 no-sha0 no-smime no-aes192 no-ripemd no-cast no-ec ++SHLIB_TARGET=linux-shared + + # HERE indicates where this Makefile lives. This can be used to indicate + # where sub-Makefiles are expected to be. Currently has very limited usage, +@@ -26,10 +26,10 @@ HERE=. + # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/. + # Normally it is left empty. + INSTALL_PREFIX= +-INSTALLTOP=/usr/local/ssl ++INSTALLTOP=/usr + + # Do not edit this manually. Use Configure --openssldir=DIR do change this! +-OPENSSLDIR=/usr/local/ssl ++OPENSSLDIR=/etc/ssl + + # NO_IDEA - Define to build without the IDEA algorithm + # NO_RC4 - Define to build without the RC4 algorithm +@@ -59,15 +59,15 @@ OPENSSLDIR=/usr/local/ssl + # equal 4. + # PKCS1_CHECK - pkcs1 tests. + +-CC= cc +-CFLAG= -O +-DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE ++CC= /home/wbx/openadk/host_arm_musl/bin/arm-openadk-linux-muslgnueabi-gcc ++CFLAG= -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/wbx/openadk/target_arm_musl/usr/include -DOPENSSL_SMALL_FOOTPRINT -DOPENSSL_NO_ERR -DTERMIOS $(OPTIMIZATION_FLAGS) -Wall ++DEPFLAG= -DOPENSSL_NO_AES192 -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAST -DOPENSSL_NO_EC -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_ECDH -DOPENSSL_NO_ECDSA -DOPENSSL_NO_ENGINES -DOPENSSL_NO_GMP -DOPENSSL_NO_GOST -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_RIPEMD -DOPENSSL_NO_SCTP -DOPENSSL_NO_SHA0 -DOPENSSL_NO_SMIME -DOPENSSL_NO_STORE + PEX_LIBS= +-EX_LIBS= ++EX_LIBS= -L/home/wbx/openadk/target_arm_musl/usr/lib -ldl -ldl + EXE_EXT= + ARFLAGS= +-AR= ar $(ARFLAGS) r +-RANLIB= /usr/bin/ranlib ++AR= /home/wbx/openadk/host_arm_musl/bin/arm-openadk-linux-muslgnueabi-ar $(ARFLAGS) r ++RANLIB= /home/wbx/openadk/host_arm_musl/bin/arm-openadk-linux-muslgnueabi-ranlib + NM= nm + PERL= /usr/bin/perl + TAR= tar +@@ -103,7 +103,7 @@ WP_ASM_OBJ= wp_block.o + CMLL_ENC= camellia.o cmll_misc.o cmll_cbc.o + MODES_ASM_OBJ= + ENGINES_ASM_OBJ= +-PERLASM_SCHEME= ++PERLASM_SCHEME= void + + # KRB5 stuff + KRB5_INCLUDES= +@@ -137,16 +137,16 @@ FIPSCANLIB= + + BASEADDR=0xFB00000 + +-DIRS= crypto ssl engines apps test tools +-ENGDIRS= ccgost ++DIRS= crypto ssl engines apps tools ++ENGDIRS= + SHLIBDIRS= crypto ssl + + # dirs in crypto to build + SDIRS= \ + objects \ +- md4 md5 sha mdc2 hmac ripemd whrlpool \ +- des aes rc2 rc4 idea bf cast camellia seed modes \ +- bn ec rsa dsa ecdsa dh ecdh dso engine \ ++ md4 md5 sha hmac whrlpool \ ++ des aes rc2 rc4 bf seed modes \ ++ bn rsa dsa dh dso engine \ + buffer bio stack lhash rand err \ + evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \ + cms pqueue ts srp cmac +@@ -174,8 +174,8 @@ WDIRS= windows + LIBS= libcrypto.a libssl.a + SHARED_CRYPTO=libcrypto$(SHLIB_EXT) + SHARED_SSL=libssl$(SHLIB_EXT) +-SHARED_LIBS= +-SHARED_LIBS_LINK_EXTS= ++SHARED_LIBS=$(SHARED_CRYPTO) $(SHARED_SSL) ++SHARED_LIBS_LINK_EXTS=.so.$(SHLIB_MAJOR) .so + SHARED_LDFLAGS= + + GENERAL= Makefile diff --git a/package/openssl/patches/patch-crypto_engine_eng_cryptodev_c b/package/openssl/patches/patch-crypto_engine_eng_cryptodev_c new file mode 100644 index 000000000..7b8898a5d --- /dev/null +++ b/package/openssl/patches/patch-crypto_engine_eng_cryptodev_c @@ -0,0 +1,380 @@ +--- openssl-1.0.1e.orig/crypto/engine/eng_cryptodev.c 2013-02-11 16:26:04.000000000 +0100 ++++ openssl-1.0.1e/crypto/engine/eng_cryptodev.c 2013-08-09 16:51:49.915851335 +0200 +@@ -2,6 +2,7 @@ + * Copyright (c) 2002 Bob Beck <beck@openbsd.org> + * Copyright (c) 2002 Theo de Raadt + * Copyright (c) 2002 Markus Friedl ++ * Copyright (c) 2012 Nikos Mavrogiannopoulos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -74,9 +75,7 @@ struct dev_crypto_state { + int d_fd; + + #ifdef USE_CRYPTODEV_DIGESTS +- char dummy_mac_key[HASH_MAX_LEN]; +- +- unsigned char digest_res[HASH_MAX_LEN]; ++ unsigned char digest_res[64]; + char *mac_data; + int mac_len; + #endif +@@ -157,15 +156,21 @@ static struct { + static struct { + int id; + int nid; +- int keylen; ++ int digestlen; + } digests[] = { ++#if 0 ++ /* HMAC is not supported */ + { CRYPTO_MD5_HMAC, NID_hmacWithMD5, 16}, + { CRYPTO_SHA1_HMAC, NID_hmacWithSHA1, 20}, +- { CRYPTO_RIPEMD160_HMAC, NID_ripemd160, 16/*?*/}, +- { CRYPTO_MD5_KPDK, NID_undef, 0}, +- { CRYPTO_SHA1_KPDK, NID_undef, 0}, ++ { CRYPTO_SHA2_256_HMAC, NID_hmacWithSHA256, 32}, ++ { CRYPTO_SHA2_384_HMAC, NID_hmacWithSHA384, 48}, ++ { CRYPTO_SHA2_512_HMAC, NID_hmacWithSHA512, 64}, ++#endif + { CRYPTO_MD5, NID_md5, 16}, + { CRYPTO_SHA1, NID_sha1, 20}, ++ { CRYPTO_SHA2_256, NID_sha256, 32}, ++ { CRYPTO_SHA2_384, NID_sha384, 48}, ++ { CRYPTO_SHA2_512, NID_sha512, 64}, + { 0, NID_undef, 0}, + }; + #endif +@@ -182,7 +187,7 @@ open_dev_crypto(void) + if ((fd = open("/dev/crypto", O_RDWR, 0)) == -1) + return (-1); + /* close on exec */ +- if (fcntl(fd, F_SETFD, 1) == -1) { ++ if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) { + close(fd); + fd = -1; + return (-1); +@@ -243,13 +248,14 @@ get_cryptodev_ciphers(const int **cnids) + static int nids[CRYPTO_ALGORITHM_MAX]; + struct session_op sess; + int fd, i, count = 0; ++ unsigned char fake_key[EVP_MAX_KEY_LENGTH]; + + if ((fd = get_dev_crypto()) < 0) { + *cnids = NULL; + return (0); + } + memset(&sess, 0, sizeof(sess)); +- sess.key = (caddr_t)"123456789abcdefghijklmno"; ++ sess.key = (void*)fake_key; + + for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { + if (ciphers[i].nid == NID_undef) +@@ -281,6 +287,7 @@ static int + get_cryptodev_digests(const int **cnids) + { + static int nids[CRYPTO_ALGORITHM_MAX]; ++ unsigned char fake_key[EVP_MAX_KEY_LENGTH]; + struct session_op sess; + int fd, i, count = 0; + +@@ -289,12 +296,12 @@ get_cryptodev_digests(const int **cnids) + return (0); + } + memset(&sess, 0, sizeof(sess)); +- sess.mackey = (caddr_t)"123456789abcdefghijklmno"; ++ sess.mackey = fake_key; + for (i = 0; digests[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { + if (digests[i].nid == NID_undef) + continue; + sess.mac = digests[i].id; +- sess.mackeylen = digests[i].keylen; ++ sess.mackeylen = 8; + sess.cipher = 0; + if (ioctl(fd, CIOCGSESSION, &sess) != -1 && + ioctl(fd, CIOCFSESSION, &sess.ses) != -1) +@@ -382,14 +389,14 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, un + cryp.ses = sess->ses; + cryp.flags = 0; + cryp.len = inl; +- cryp.src = (caddr_t) in; +- cryp.dst = (caddr_t) out; ++ cryp.src = (void*) in; ++ cryp.dst = (void*) out; + cryp.mac = 0; + + cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; + + if (ctx->cipher->iv_len) { +- cryp.iv = (caddr_t) ctx->iv; ++ cryp.iv = (void*) ctx->iv; + if (!ctx->encrypt) { + iiv = in + inl - ctx->cipher->iv_len; + memcpy(save_iv, iiv, ctx->cipher->iv_len); +@@ -440,7 +447,7 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, + if ((state->d_fd = get_dev_crypto()) < 0) + return (0); + +- sess->key = (caddr_t)key; ++ sess->key = (void*)key; + sess->keylen = ctx->key_len; + sess->cipher = cipher; + +@@ -660,18 +667,6 @@ digest_nid_to_cryptodev(int nid) + } + + +-static int +-digest_key_length(int nid) +-{ +- int i; +- +- for (i = 0; digests[i].id; i++) +- if (digests[i].nid == nid) +- return digests[i].keylen; +- return (0); +-} +- +- + static int cryptodev_digest_init(EVP_MD_CTX *ctx) + { + struct dev_crypto_state *state = ctx->md_data; +@@ -682,7 +677,6 @@ static int cryptodev_digest_init(EVP_MD_ + printf("cryptodev_digest_init: Can't get digest \n"); + return (0); + } +- + memset(state, 0, sizeof(struct dev_crypto_state)); + + if ((state->d_fd = get_dev_crypto()) < 0) { +@@ -690,8 +684,8 @@ static int cryptodev_digest_init(EVP_MD_ + return (0); + } + +- sess->mackey = state->dummy_mac_key; +- sess->mackeylen = digest_key_length(ctx->digest->type); ++ sess->mackey = NULL; ++ sess->mackeylen = 0; + sess->mac = digest; + + if (ioctl(state->d_fd, CIOCGSESSION, sess) < 0) { +@@ -707,8 +701,8 @@ static int cryptodev_digest_init(EVP_MD_ + static int cryptodev_digest_update(EVP_MD_CTX *ctx, const void *data, + size_t count) + { +- struct crypt_op cryp; + struct dev_crypto_state *state = ctx->md_data; ++ struct crypt_op cryp; + struct session_op *sess = &state->d_sess; + + if (!data || state->d_fd < 0) { +@@ -717,7 +711,7 @@ static int cryptodev_digest_update(EVP_M + } + + if (!count) { +- return (0); ++ return (1); + } + + if (!(ctx->flags & EVP_MD_CTX_FLAG_ONESHOT)) { +@@ -740,9 +734,9 @@ static int cryptodev_digest_update(EVP_M + cryp.ses = sess->ses; + cryp.flags = 0; + cryp.len = count; +- cryp.src = (caddr_t) data; ++ cryp.src = (void*) data; + cryp.dst = NULL; +- cryp.mac = (caddr_t) state->digest_res; ++ cryp.mac = (void*) state->digest_res; + if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) { + printf("cryptodev_digest_update: digest failed\n"); + return (0); +@@ -757,8 +751,6 @@ static int cryptodev_digest_final(EVP_MD + struct dev_crypto_state *state = ctx->md_data; + struct session_op *sess = &state->d_sess; + +- int ret = 1; +- + if (!md || state->d_fd < 0) { + printf("cryptodev_digest_final: illegal input\n"); + return(0); +@@ -772,7 +764,7 @@ static int cryptodev_digest_final(EVP_MD + cryp.len = state->mac_len; + cryp.src = state->mac_data; + cryp.dst = NULL; +- cryp.mac = (caddr_t)md; ++ cryp.mac = (void*)md; + if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) { + printf("cryptodev_digest_final: digest failed\n"); + return (0); +@@ -783,7 +775,7 @@ static int cryptodev_digest_final(EVP_MD + + memcpy(md, state->digest_res, ctx->digest->md_size); + +- return (ret); ++ return 1; + } + + +@@ -835,8 +827,8 @@ static int cryptodev_digest_copy(EVP_MD_ + + digest = digest_nid_to_cryptodev(to->digest->type); + +- sess->mackey = dstate->dummy_mac_key; +- sess->mackeylen = digest_key_length(to->digest->type); ++ sess->mackey = NULL; ++ sess->mackeylen = 0; + sess->mac = digest; + + dstate->d_fd = get_dev_crypto(); +@@ -861,34 +853,79 @@ static int cryptodev_digest_copy(EVP_MD_ + } + + +-const EVP_MD cryptodev_sha1 = { ++static const EVP_MD cryptodev_sha1 = { + NID_sha1, +- NID_undef, ++ NID_sha1WithRSAEncryption, + SHA_DIGEST_LENGTH, +- EVP_MD_FLAG_ONESHOT, ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_ONESHOT, + cryptodev_digest_init, + cryptodev_digest_update, + cryptodev_digest_final, + cryptodev_digest_copy, + cryptodev_digest_cleanup, +- EVP_PKEY_NULL_method, ++ EVP_PKEY_RSA_method, + SHA_CBLOCK, +- sizeof(struct dev_crypto_state), ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), + }; + +-const EVP_MD cryptodev_md5 = { ++static const EVP_MD cryptodev_sha256 = { ++ NID_sha256, ++ NID_sha256WithRSAEncryption, ++ SHA256_DIGEST_LENGTH, ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_ONESHOT, ++ cryptodev_digest_init, ++ cryptodev_digest_update, ++ cryptodev_digest_final, ++ cryptodev_digest_copy, ++ cryptodev_digest_cleanup, ++ EVP_PKEY_RSA_method, ++ SHA256_CBLOCK, ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), ++}; ++ ++static const EVP_MD cryptodev_sha384 = { ++ NID_sha384, ++ NID_sha384WithRSAEncryption, ++ SHA384_DIGEST_LENGTH, ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_ONESHOT, ++ cryptodev_digest_init, ++ cryptodev_digest_update, ++ cryptodev_digest_final, ++ cryptodev_digest_copy, ++ cryptodev_digest_cleanup, ++ EVP_PKEY_RSA_method, ++ SHA512_CBLOCK, ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), ++}; ++ ++static const EVP_MD cryptodev_sha512 = { ++ NID_sha512, ++ NID_sha512WithRSAEncryption, ++ SHA512_DIGEST_LENGTH, ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_ONESHOT, ++ cryptodev_digest_init, ++ cryptodev_digest_update, ++ cryptodev_digest_final, ++ cryptodev_digest_copy, ++ cryptodev_digest_cleanup, ++ EVP_PKEY_RSA_method, ++ SHA512_CBLOCK, ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), ++}; ++ ++static const EVP_MD cryptodev_md5 = { + NID_md5, +- NID_undef, ++ NID_md5WithRSAEncryption, + 16 /* MD5_DIGEST_LENGTH */, +- EVP_MD_FLAG_ONESHOT, ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT|EVP_MD_FLAG_ONESHOT, + cryptodev_digest_init, + cryptodev_digest_update, + cryptodev_digest_final, + cryptodev_digest_copy, + cryptodev_digest_cleanup, +- EVP_PKEY_NULL_method, ++ EVP_PKEY_RSA_method, + 64 /* MD5_CBLOCK */, +- sizeof(struct dev_crypto_state), ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), + }; + + #endif /* USE_CRYPTODEV_DIGESTS */ +@@ -909,6 +946,15 @@ cryptodev_engine_digests(ENGINE *e, cons + case NID_sha1: + *digest = &cryptodev_sha1; + break; ++ case NID_sha256: ++ *digest = &cryptodev_sha256; ++ break; ++ case NID_sha384: ++ *digest = &cryptodev_sha384; ++ break; ++ case NID_sha512: ++ *digest = &cryptodev_sha512; ++ break; + default: + #endif /* USE_CRYPTODEV_DIGESTS */ + *digest = NULL; +@@ -940,7 +986,7 @@ bn2crparam(const BIGNUM *a, struct crpar + return (1); + memset(b, 0, bytes); + +- crp->crp_p = (caddr_t) b; ++ crp->crp_p = (void*) b; + crp->crp_nbits = bits; + + for (i = 0, j = 0; i < a->top; i++) { +@@ -1193,7 +1239,7 @@ cryptodev_dsa_do_sign(const unsigned cha + kop.crk_op = CRK_DSA_SIGN; + + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ +- kop.crk_param[0].crp_p = (caddr_t)dgst; ++ kop.crk_param[0].crp_p = (void*)dgst; + kop.crk_param[0].crp_nbits = dlen * 8; + if (bn2crparam(dsa->p, &kop.crk_param[1])) + goto err; +@@ -1233,7 +1279,7 @@ cryptodev_dsa_verify(const unsigned char + kop.crk_op = CRK_DSA_VERIFY; + + /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ +- kop.crk_param[0].crp_p = (caddr_t)dgst; ++ kop.crk_param[0].crp_p = (void*)dgst; + kop.crk_param[0].crp_nbits = dlen * 8; + if (bn2crparam(dsa->p, &kop.crk_param[1])) + goto err; +@@ -1311,7 +1357,7 @@ cryptodev_dh_compute_key(unsigned char * + goto err; + kop.crk_iparams = 3; + +- kop.crk_param[3].crp_p = (caddr_t) key; ++ kop.crk_param[3].crp_p = (void*) key; + kop.crk_param[3].crp_nbits = keylen * 8; + kop.crk_oparams = 1; + +@@ -1385,7 +1431,7 @@ ENGINE_load_cryptodev(void) + put_dev_crypto(fd); + + if (!ENGINE_set_id(engine, "cryptodev") || +- !ENGINE_set_name(engine, "BSD cryptodev engine") || ++ !ENGINE_set_name(engine, "cryptodev engine") || + !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || + !ENGINE_set_digests(engine, cryptodev_engine_digests) || + !ENGINE_set_ctrl_function(engine, cryptodev_ctrl) || diff --git a/package/openssl/patches/patch-crypto_opensslconf_h b/package/openssl/patches/patch-crypto_opensslconf_h new file mode 100644 index 000000000..77701e9b4 --- /dev/null +++ b/package/openssl/patches/patch-crypto_opensslconf_h @@ -0,0 +1,213 @@ +--- openssl-1.0.1e.orig/crypto/opensslconf.h 2013-02-11 16:26:04.000000000 +0100 ++++ openssl-1.0.1e/crypto/opensslconf.h 2013-08-17 16:07:12.626613032 +0200 +@@ -5,12 +5,39 @@ + #ifndef OPENSSL_DOING_MAKEDEPEND + + ++#ifndef OPENSSL_NO_AES192 ++# define OPENSSL_NO_AES192 ++#endif ++#ifndef OPENSSL_NO_CAMELLIA ++# define OPENSSL_NO_CAMELLIA ++#endif ++#ifndef OPENSSL_NO_CAST ++# define OPENSSL_NO_CAST ++#endif ++#ifndef OPENSSL_NO_EC ++# define OPENSSL_NO_EC ++#endif + #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 + # define OPENSSL_NO_EC_NISTP_64_GCC_128 + #endif ++#ifndef OPENSSL_NO_ECDH ++# define OPENSSL_NO_ECDH ++#endif ++#ifndef OPENSSL_NO_ECDSA ++# define OPENSSL_NO_ECDSA ++#endif ++#ifndef OPENSSL_NO_ENGINES ++# define OPENSSL_NO_ENGINES ++#endif + #ifndef OPENSSL_NO_GMP + # define OPENSSL_NO_GMP + #endif ++#ifndef OPENSSL_NO_GOST ++# define OPENSSL_NO_GOST ++#endif ++#ifndef OPENSSL_NO_IDEA ++# define OPENSSL_NO_IDEA ++#endif + #ifndef OPENSSL_NO_JPAKE + # define OPENSSL_NO_JPAKE + #endif +@@ -20,23 +47,38 @@ + #ifndef OPENSSL_NO_MD2 + # define OPENSSL_NO_MD2 + #endif ++#ifndef OPENSSL_NO_MDC2 ++# define OPENSSL_NO_MDC2 ++#endif + #ifndef OPENSSL_NO_RC5 + # define OPENSSL_NO_RC5 + #endif + #ifndef OPENSSL_NO_RFC3779 + # define OPENSSL_NO_RFC3779 + #endif ++#ifndef OPENSSL_NO_RIPEMD ++# define OPENSSL_NO_RIPEMD ++#endif + #ifndef OPENSSL_NO_SCTP + # define OPENSSL_NO_SCTP + #endif ++#ifndef OPENSSL_NO_SHA0 ++# define OPENSSL_NO_SHA0 ++#endif ++#ifndef OPENSSL_NO_SMIME ++# define OPENSSL_NO_SMIME ++#endif + #ifndef OPENSSL_NO_STORE + # define OPENSSL_NO_STORE + #endif + + #endif /* OPENSSL_DOING_MAKEDEPEND */ + +-#ifndef OPENSSL_NO_DYNAMIC_ENGINE +-# define OPENSSL_NO_DYNAMIC_ENGINE ++#ifndef OPENSSL_NO_ERR ++# define OPENSSL_NO_ERR ++#endif ++#ifndef OPENSSL_NO_STATIC_ENGINE ++# define OPENSSL_NO_STATIC_ENGINE + #endif + + /* The OPENSSL_NO_* macros are also defined as NO_* if the application +@@ -44,12 +86,39 @@ + who haven't had the time to do the appropriate changes in their + applications. */ + #ifdef OPENSSL_ALGORITHM_DEFINES ++# if defined(OPENSSL_NO_AES192) && !defined(NO_AES192) ++# define NO_AES192 ++# endif ++# if defined(OPENSSL_NO_CAMELLIA) && !defined(NO_CAMELLIA) ++# define NO_CAMELLIA ++# endif ++# if defined(OPENSSL_NO_CAST) && !defined(NO_CAST) ++# define NO_CAST ++# endif ++# if defined(OPENSSL_NO_EC) && !defined(NO_EC) ++# define NO_EC ++# endif + # if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128) + # define NO_EC_NISTP_64_GCC_128 + # endif ++# if defined(OPENSSL_NO_ECDH) && !defined(NO_ECDH) ++# define NO_ECDH ++# endif ++# if defined(OPENSSL_NO_ECDSA) && !defined(NO_ECDSA) ++# define NO_ECDSA ++# endif ++# if defined(OPENSSL_NO_ENGINES) && !defined(NO_ENGINES) ++# define NO_ENGINES ++# endif + # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) + # define NO_GMP + # endif ++# if defined(OPENSSL_NO_GOST) && !defined(NO_GOST) ++# define NO_GOST ++# endif ++# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA) ++# define NO_IDEA ++# endif + # if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE) + # define NO_JPAKE + # endif +@@ -59,15 +128,27 @@ + # if defined(OPENSSL_NO_MD2) && !defined(NO_MD2) + # define NO_MD2 + # endif ++# if defined(OPENSSL_NO_MDC2) && !defined(NO_MDC2) ++# define NO_MDC2 ++# endif + # if defined(OPENSSL_NO_RC5) && !defined(NO_RC5) + # define NO_RC5 + # endif + # if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779) + # define NO_RFC3779 + # endif ++# if defined(OPENSSL_NO_RIPEMD) && !defined(NO_RIPEMD) ++# define NO_RIPEMD ++# endif + # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) + # define NO_SCTP + # endif ++# if defined(OPENSSL_NO_SHA0) && !defined(NO_SHA0) ++# define NO_SHA0 ++# endif ++# if defined(OPENSSL_NO_SMIME) && !defined(NO_SMIME) ++# define NO_SMIME ++# endif + # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) + # define NO_STORE + # endif +@@ -80,8 +161,8 @@ + + #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ + #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) +-#define ENGINESDIR "/usr/local/ssl/lib/engines" +-#define OPENSSLDIR "/usr/local/ssl" ++#define ENGINESDIR "/usr/lib/engines" ++#define OPENSSLDIR "/etc/ssl" + #endif + #endif + +@@ -112,14 +193,14 @@ + * - Intel P6 because partial register stalls are very expensive; + * - elder Alpha because it lacks byte load/store instructions; + */ +-#define RC4_INT unsigned int ++#define RC4_INT unsigned char + #endif + #if !defined(RC4_CHUNK) + /* + * This enables code handling data aligned at natural CPU word + * boundary. See crypto/rc4/rc4_enc.c for further details. + */ +-#undef RC4_CHUNK ++#define RC4_CHUNK unsigned long + #endif + #endif + +@@ -127,13 +208,13 @@ + /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a + * %20 speed up (longs are 8 bytes, int's are 4). */ + #ifndef DES_LONG +-#define DES_LONG unsigned long ++#define DES_LONG unsigned int + #endif + #endif + + #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) + #define CONFIG_HEADER_BN_H +-#undef BN_LLONG ++#define BN_LLONG + + /* Should we define BN_DIV2W here? */ + +@@ -152,7 +233,7 @@ + + #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) + #define CONFIG_HEADER_BF_LOCL_H +-#undef BF_PTR ++#define BF_PTR + #endif /* HEADER_BF_LOCL_H */ + + #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) +@@ -182,7 +263,7 @@ YOU SHOULD NOT HAVE BOTH DES_RISC1 AND D + /* Unroll the inner loop, this sometimes helps, sometimes hinders. + * Very mucy CPU dependant */ + #ifndef DES_UNROLL +-#undef DES_UNROLL ++#define DES_UNROLL + #endif + + /* These default values were supplied by diff --git a/package/openssl/patches/patch-crypto_ui_ui_openssl_c b/package/openssl/patches/patch-crypto_ui_ui_openssl_c index f9e3a7069..ac6d2a91f 100644 --- a/package/openssl/patches/patch-crypto_ui_ui_openssl_c +++ b/package/openssl/patches/patch-crypto_ui_ui_openssl_c @@ -1,6 +1,6 @@ ---- openssl-1.0.1c.orig/crypto/ui/ui_openssl.c 2012-02-12 00:38:49.000000000 +0100 -+++ openssl-1.0.1c/crypto/ui/ui_openssl.c 2013-08-15 12:11:24.652833590 +0200 -@@ -184,12 +184,6 @@ +--- openssl-1.0.1e.orig/crypto/ui/ui_openssl.c 2013-02-11 16:26:04.000000000 +0100 ++++ openssl-1.0.1e/crypto/ui/ui_openssl.c 2013-08-17 16:07:11.798623440 +0200 +@@ -190,12 +190,6 @@ # undef SGTTY #endif diff --git a/package/openssl/patches/patch-tools_c_rehash b/package/openssl/patches/patch-tools_c_rehash new file mode 100644 index 000000000..ae682d661 --- /dev/null +++ b/package/openssl/patches/patch-tools_c_rehash @@ -0,0 +1,13 @@ +--- openssl-1.0.1e.orig/tools/c_rehash 2013-02-11 16:26:11.000000000 +0100 ++++ openssl-1.0.1e/tools/c_rehash 2013-08-17 16:07:16.970558422 +0200 +@@ -6,8 +6,8 @@ + + my $openssl; + +-my $dir = "/usr/local/ssl"; +-my $prefix = "/usr/local/ssl"; ++my $dir = "/etc/ssl"; ++my $prefix = "/usr"; + + if(defined $ENV{OPENSSL}) { + $openssl = $ENV{OPENSSL}; |