SF.net SVN: gar:[26297] csw/mgar/pkg/openssl1/branches/lts102
janholzh at users.sourceforge.net
janholzh at users.sourceforge.net
Fri Nov 3 10:24:05 CET 2017
Revision: 26297
http://sourceforge.net/p/gar/code/26297
Author: janholzh
Date: 2017-11-03 09:24:05 +0000 (Fri, 03 Nov 2017)
Log Message:
-----------
openssl1/branches/lts102: update to 1.0.2m
Modified Paths:
--------------
csw/mgar/pkg/openssl1/branches/lts102/Makefile
csw/mgar/pkg/openssl1/branches/lts102/checksums
csw/mgar/pkg/openssl1/branches/lts102/files/029-fork_safe.patch
Added Paths:
-----------
csw/mgar/pkg/openssl1/branches/lts102/files/0018-PRE-29_Patch_do_to_code_change.patch
Modified: csw/mgar/pkg/openssl1/branches/lts102/Makefile
===================================================================
--- csw/mgar/pkg/openssl1/branches/lts102/Makefile 2017-11-01 12:29:52 UTC (rev 26296)
+++ csw/mgar/pkg/openssl1/branches/lts102/Makefile 2017-11-03 09:24:05 UTC (rev 26297)
@@ -13,7 +13,7 @@
###### Package information #######
NAME = openssl
-VERSION = 1.0.2l
+VERSION = 1.0.2m
GARTYPE = v2
# Since version 1.0.0, soname is fixed and does not follow the minor releases
SONAME=1.0.0
@@ -165,6 +165,7 @@
# Patches taken form oracle
+PATCHFILES += 0018-PRE-29_Patch_do_to_code_change.patch
PATCHFILES += 029-fork_safe.patch
PATCHFILES += 032-aes_cbc_len_check.patch
PATCHFILES += 036-evp_leak.patch
Modified: csw/mgar/pkg/openssl1/branches/lts102/checksums
===================================================================
--- csw/mgar/pkg/openssl1/branches/lts102/checksums 2017-11-01 12:29:52 UTC (rev 26296)
+++ csw/mgar/pkg/openssl1/branches/lts102/checksums 2017-11-03 09:24:05 UTC (rev 26297)
@@ -1 +1 @@
-f85123cd390e864dfbe517e7616e6566 openssl-1.0.2l.tar.gz
+10e9e37f492094b9ef296f68f24a7666 openssl-1.0.2m.tar.gz
Added: csw/mgar/pkg/openssl1/branches/lts102/files/0018-PRE-29_Patch_do_to_code_change.patch
===================================================================
--- csw/mgar/pkg/openssl1/branches/lts102/files/0018-PRE-29_Patch_do_to_code_change.patch (rev 0)
+++ csw/mgar/pkg/openssl1/branches/lts102/files/0018-PRE-29_Patch_do_to_code_change.patch 2017-11-03 09:24:05 UTC (rev 26297)
@@ -0,0 +1,26 @@
+From 6945a594cda4f1198f3ceee20d344e6728f925ce Mon Sep 17 00:00:00 2001
+From: Jan Holzhueter <jh at opencsw.org>
+Date: Fri, 3 Nov 2017 10:05:18 +0100
+Subject: [PATCH] PRE-29_Patch_do_to_code_change
+
+---
+ crypto/cryptlib.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
+index 5fab45b..9de694f 100644
+--- a/crypto/cryptlib.c
++++ b/crypto/cryptlib.c
+@@ -478,9 +478,6 @@ int CRYPTO_THREADID_set_callback(void (*func) (CRYPTO_THREADID *))
+ if (threadid_callback)
+ return 0;
+ threadid_callback = func;
+-#ifdef OPENSSL_FIPS
+- FIPS_crypto_threadid_set_callback(func);
+-#endif
+ return 1;
+ }
+
+--
+2.4.0
+
Modified: csw/mgar/pkg/openssl1/branches/lts102/files/029-fork_safe.patch
===================================================================
--- csw/mgar/pkg/openssl1/branches/lts102/files/029-fork_safe.patch 2017-11-01 12:29:52 UTC (rev 26296)
+++ csw/mgar/pkg/openssl1/branches/lts102/files/029-fork_safe.patch 2017-11-03 09:24:05 UTC (rev 26297)
@@ -5,8 +5,8 @@
# This change was implemented in-house. The issue was brought up to
# the upstream engineers, but there was no commitment.
#
---- openssl-1.0.1f/crypto/cryptlib.c.~1~ Fri Feb 7 10:41:36 2014
-+++ openssl-1.0.1f/crypto/cryptlib.c Thu Feb 6 16:03:58 2014
+--- a/crypto/cryptlib.c 2016-05-03 06:44:42.000000000 -0700
++++ b/crypto/cryptlib.c 2016-09-02 08:47:23.640202700 -0700
@@ -116,6 +116,7 @@
#include "cryptlib.h"
@@ -34,7 +34,7 @@
+ * setting of another locking callback.
+ */
}
-
+
void CRYPTO_set_dynlock_lock_callback(void (*func) (int mode,
@@ -382,7 +388,10 @@
const char *file,
@@ -46,7 +46,7 @@
+ * setting of another locking callback.
+ */
}
-
+
void CRYPTO_set_dynlock_destroy_callback(void (*func)
@@ -389,7 +398,10 @@
(struct CRYPTO_dynlock_value *l,
@@ -58,12 +58,12 @@
+ * setting of another locking callback.
+ */
}
-
+
void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
-@@ -402,6 +414,128@@
+@@ -402,6 +414,127 @@
return (add_lock_callback);
}
-
+
+/*
+ * This is the locking callback function which all applications will be
+ * using when CRYPTO_lock() is called.
@@ -72,9 +72,9 @@
+ int line)
+{
+ if (mode & CRYPTO_LOCK) {
-+ pthread_mutex_lock(&solaris_openssl_locks[type]);
++ (void) pthread_mutex_lock(&solaris_openssl_locks[type]);
+ } else {
-+ pthread_mutex_unlock(&solaris_openssl_locks[type]);
++ (void) pthread_mutex_unlock(&solaris_openssl_locks[type]);
+ }
+}
+
@@ -93,7 +93,7 @@
+ }
+
+ ret = pthread_mutex_init(dynlock, NULL);
-+ OPENSSL_assert(ret);
++ OPENSSL_assert(ret == 0);
+
+ return ((struct CRYPTO_dynlock_value *)dynlock);
+}
@@ -119,32 +119,41 @@
+{
+ int ret;
+ ret = pthread_mutex_destroy((pthread_mutex_t *)dynlock);
-+ OPENSSL_assert(ret);
++ OPENSSL_assert(ret == 0);
+}
+
+
-+/*
-+ * This function is called when a child process is forked to setup its own
-+ * global locking callback function ptr and mutexes.
-+ */
-+static void solaris_fork_child(void)
++static void solaris_fork_prep(void)
+{
-+ /*
-+ * clear locking_callback to indicate that locks should
-+ * be reinitialized.
-+ */
-+ locking_callback = NULL;
-+ solaris_locking_setup();
++ int i;
++
++ for (i = 0; i < CRYPTO_NUM_LOCKS; i++) {
++ (void) pthread_mutex_lock(&solaris_openssl_locks[i]);
++ }
+}
+
++static void solaris_fork_post(void)
++{
++ int i;
++
++ for (i = CRYPTO_NUM_LOCKS - 1; i >= 0; i--) {
++ (void) pthread_mutex_unlock(&solaris_openssl_locks[i]);
++ }
++
++ OPENSSL_assert(dynlock_create_callback == solaris_dynlock_create);
++ OPENSSL_assert(dynlock_lock_callback == solaris_dynlock_lock);
++ OPENSSL_assert(dynlock_destroy_callback == solaris_dynlock_destroy);
++ OPENSSL_assert(locking_callback == solaris_locking_callback);
++}
++
+/*
-+ * This function allocates and initializes the global mutex array, and
-+ * sets the locking callback.
++ * This is called by the _init() function to setup locks used by OpenSSL
++ * and locking callback functions.
+ */
-+void solaris_locking_setup()
++void
++solaris_locking_setup()
+{
+ int i;
-+ int num_locks;
+
+ /* setup the dynlock callback if not already */
+ if (dynlock_create_callback == NULL) {
@@ -156,40 +165,30 @@
+ if (dynlock_destroy_callback == NULL) {
+ dynlock_destroy_callback = solaris_dynlock_destroy;
+ }
-+
-+ /* locking callback is already setup. Nothing to do */
-+ if (locking_callback != NULL) {
-+ return;
++ if (locking_callback == NULL) {
++ locking_callback = solaris_locking_callback;
+ }
+
-+ /*
-+ * Set atfork handler so that child can setup its own mutexes and
-+ * locking callbacks when it is forked
-+ */
-+ (void) pthread_atfork(NULL, NULL, solaris_fork_child);
-+
-+ /* allocate locks needed by OpenSSL */
-+ num_locks = CRYPTO_num_locks();
++ /* allocate and initialize locks needed by OpenSSL */
+ solaris_openssl_locks =
-+ OPENSSL_malloc(sizeof (pthread_mutex_t) * num_locks);
++ OPENSSL_malloc(sizeof (pthread_mutex_t) * CRYPTO_NUM_LOCKS);
+ if (solaris_openssl_locks == NULL) {
+ fprintf(stderr,
+ "solaris_locking_setup: memory allocation failure.\n");
+ abort();
+ }
-+
-+ /* initialize openssl mutexes */
-+ for (i = 0; i < num_locks; i++) {
-+ pthread_mutex_init(&solaris_openssl_locks[i], NULL);
++ for (i = 0; i < CRYPTO_NUM_LOCKS; i++) {
++ (void) pthread_mutex_init(&solaris_openssl_locks[i], NULL);
+ }
-+ locking_callback = solaris_locking_callback;
+
++ (void) pthread_atfork(solaris_fork_prep, solaris_fork_post, solaris_fork_post);
+}
+
++
void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
const char *file, int line))
{
-@@ -410,7 +486,11 @@
+@@ -410,7 +541,11 @@
* started.
*/
OPENSSL_init();
@@ -202,7 +201,7 @@
}
void CRYPTO_set_add_lock_callback(int (*func) (int *num, int mount, int type,
-@@ -471,9 +551,10 @@
+@@ -471,9 +606,10 @@
int CRYPTO_THREADID_set_callback(void (*func) (CRYPTO_THREADID *))
{
@@ -216,7 +215,7 @@
return 1;
}
-@@ -529,7 +669,10 @@
+@@ -529,7 +665,10 @@
void CRYPTO_set_id_callback(unsigned long (*func) (void))
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list