Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Mar 2015 20:29:42 +0000 (UTC)
From:      Max Khon <fjoe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r381865 - in head/databases/virtuoso: . files
Message-ID:  <201503212029.t2LKTgmT012150@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fjoe
Date: Sat Mar 21 20:29:41 2015
New Revision: 381865
URL: https://svnweb.freebsd.org/changeset/ports/381865
QAT: https://qat.redports.org/buildarchive/r381865/

Log:
  - Replace deprecated des_ methods with DES_ (fixed the build with LibreSSL)
  - Bump PORTREVISION
  
  PR:		198368
  Submitted by:	Bernard Spil

Added:
  head/databases/virtuoso/files/patch-openssl   (contents, props changed)
Modified:
  head/databases/virtuoso/Makefile

Modified: head/databases/virtuoso/Makefile
==============================================================================
--- head/databases/virtuoso/Makefile	Sat Mar 21 20:08:12 2015	(r381864)
+++ head/databases/virtuoso/Makefile	Sat Mar 21 20:29:41 2015	(r381865)
@@ -3,7 +3,7 @@
 
 PORTNAME=	virtuoso
 PORTVERSION=	7.1.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases
 MASTER_SITES=	SF
 DISTNAME=	${PORTNAME}-opensource-${PORTVERSION}

Added: head/databases/virtuoso/files/patch-openssl
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/virtuoso/files/patch-openssl	Sat Mar 21 20:29:41 2015	(r381865)
@@ -0,0 +1,346 @@
+--- libsrc/Wi/xmlenc.c.orig	2014-02-17 18:33:14.000000000 +0100
++++ libsrc/Wi/xmlenc.c	2015-02-27 20:50:15.729249333 +0100
+@@ -1775,7 +1775,7 @@
+   if (!algo)
+     len = 0;
+   else if (!strcmp (algo, XENC_TRIPLEDES_ALGO))
+-    len = 3 * sizeof (des_cblock);
++    len = 3 * sizeof (DES_cblock);
+   else if (!strcmp (algo, XENC_AES128_ALGO))
+     len = 128;
+   else if (!strcmp (algo, XENC_AES256_ALGO))
+@@ -1826,7 +1826,7 @@
+ {
+   xenc_key_t * key;
+   P_SHA1_CTX * psha1;
+-  des_cblock _key[5];
++  DES_cblock _key[5];
+   int key_len = 0;
+   caddr_t * utok_opts = (caddr_t *) xenc_get_option (ctx->wc_opts, "UsernameToken", NULL);
+   caddr_t key_algo = xenc_get_option (utok_opts, "keyAlgorithm", XENC_TRIPLEDES_ALGO);
+@@ -1855,13 +1855,13 @@
+ 	      memset (&key->ki.triple_des.ks3, 0, sizeof (key->ki.triple_des.ks3));
+ 	      memset (&key->ki.triple_des.iv,  0, sizeof (key->ki.triple_des.iv));
+ 
+-	      des_set_key_unchecked(&_key[0], key->ki.triple_des.ks1);
+-	      des_set_key_unchecked(&_key[1], key->ki.triple_des.ks2);
+-	      des_set_key_unchecked(&_key[2], key->ki.triple_des.ks3);
+-
+-	      memcpy (key->ki.triple_des.k1, &_key[0], sizeof (des_cblock));
+-	      memcpy (key->ki.triple_des.k2, &_key[1], sizeof (des_cblock));
+-	      memcpy (key->ki.triple_des.k3, &_key[2], sizeof (des_cblock));
++	      DES_set_key_unchecked(&_key[0], &key->ki.triple_des.ks1);
++	      DES_set_key_unchecked(&_key[1], &key->ki.triple_des.ks2);
++	      DES_set_key_unchecked(&_key[2], &key->ki.triple_des.ks3);
++
++	      memcpy (key->ki.triple_des.k1, &_key[0], sizeof (DES_cblock));
++	      memcpy (key->ki.triple_des.k2, &_key[1], sizeof (DES_cblock));
++	      memcpy (key->ki.triple_des.k3, &_key[2], sizeof (DES_cblock));
+ 	      break;
+ 	    }
+ #ifdef AES_ENC_ENABLE
+@@ -2084,7 +2084,7 @@
+ int __xenc_key_3des_init (char *name, char *pwd, int lock)
+ {
+   char _key[KEYSIZB+1];
+-  des_cblock key[3];
++  DES_cblock key[3];
+ 
+   xenc_key_t * pkey = xenc_get_key_by_name (name, lock);
+   if (NULL == pkey)
+@@ -2104,13 +2104,13 @@
+ 	(unsigned char *)_key,
+ 	strlen(_key), 1, (unsigned char*) &key[0], pkey->ki.triple_des.iv);
+ 
+-  des_set_key_unchecked(&key[0], pkey->ki.triple_des.ks1);
+-  des_set_key_unchecked(&key[1], pkey->ki.triple_des.ks2);
+-  des_set_key_unchecked(&key[2], pkey->ki.triple_des.ks3);
+-
+-  memcpy (pkey->ki.triple_des.k1, &key[0], sizeof (des_cblock));
+-  memcpy (pkey->ki.triple_des.k2, &key[1], sizeof (des_cblock));
+-  memcpy (pkey->ki.triple_des.k3, &key[2], sizeof (des_cblock));
++  DES_set_key_unchecked(&key[0], &pkey->ki.triple_des.ks1);
++  DES_set_key_unchecked(&key[1], &pkey->ki.triple_des.ks2);
++  DES_set_key_unchecked(&key[2], &pkey->ki.triple_des.ks3);
++
++  memcpy (pkey->ki.triple_des.k1, &key[0], sizeof (DES_cblock));
++  memcpy (pkey->ki.triple_des.k2, &key[1], sizeof (DES_cblock));
++  memcpy (pkey->ki.triple_des.k3, &key[2], sizeof (DES_cblock));
+ 
+   xenc_store_key (pkey, lock);
+   return 0;
+@@ -2118,13 +2118,13 @@
+ 
+ void xenc_key_3des_init (xenc_key_t * pkey, unsigned char * k1, unsigned char * k2, unsigned char * k3)
+ {
+-  memcpy (pkey->ki.triple_des.k1, k1, sizeof (des_cblock));
+-  memcpy (pkey->ki.triple_des.k2, k2, sizeof (des_cblock));
+-  memcpy (pkey->ki.triple_des.k3, k3, sizeof (des_cblock));
+-
+-  des_set_key_unchecked((const_des_cblock*) k1, pkey->ki.triple_des.ks1);
+-  des_set_key_unchecked((const_des_cblock*) k2, pkey->ki.triple_des.ks2);
+-  des_set_key_unchecked((const_des_cblock*) k3, pkey->ki.triple_des.ks3);
++  memcpy (pkey->ki.triple_des.k1, k1, sizeof (DES_cblock));
++  memcpy (pkey->ki.triple_des.k2, k2, sizeof (DES_cblock));
++  memcpy (pkey->ki.triple_des.k3, k3, sizeof (DES_cblock));
++
++  DES_set_key_unchecked((const_DES_cblock*) k1, &pkey->ki.triple_des.ks1);
++  DES_set_key_unchecked((const_DES_cblock*) k2, &pkey->ki.triple_des.ks2);
++  DES_set_key_unchecked((const_DES_cblock*) k3, &pkey->ki.triple_des.ks3);
+ }
+ 
+ 
+@@ -2156,20 +2156,20 @@
+ {
+   caddr_t name = bif_key_name_arg (qst, args, 0, "xenc_key_3DES_rand_create");
+   xenc_key_t * k = 0;
+-  des_cblock k1;
+-  des_cblock k2;
+-  des_cblock k3;
+-  des_key_schedule ks1;
+-  des_key_schedule ks2;
+-  des_key_schedule ks3;
+-
+-  des_random_key (&k1);
+-  des_random_key (&k2);
+-  des_random_key (&k3);
+-
+-  if ( (des_set_key_checked (&k1, ks1) < 0) ||
+-       (des_set_key_checked (&k2, ks2) < 0) ||
+-       (des_set_key_checked (&k3, ks3) < 0) )
++  DES_cblock k1;
++  DES_cblock k2;
++  DES_cblock k3;
++  DES_key_schedule ks1;
++  DES_key_schedule ks2;
++  DES_key_schedule ks3;
++
++  DES_random_key (&k1);
++  DES_random_key (&k2);
++  DES_random_key (&k3);
++
++  if ( (DES_set_key_checked (&k1, &ks1) < 0) ||
++       (DES_set_key_checked (&k2, &ks2) < 0) ||
++       (DES_set_key_checked (&k3, &ks3) < 0) )
+     GPF_T; /* parity check failed, library error - could not check result of it's own work */
+ 
+   mutex_enter (xenc_keys_mtx);
+@@ -2180,13 +2180,13 @@
+       mutex_leave (xenc_keys_mtx);
+       SQLR_NEW_KEY_EXIST_ERROR (name);
+     }
+-  memcpy (&k->ki.triple_des.k1, &k1, sizeof (des_cblock));
+-  memcpy (&k->ki.triple_des.k2, &k2, sizeof (des_cblock));
+-  memcpy (&k->ki.triple_des.k3, &k3, sizeof (des_cblock));
+-
+-  memcpy (&k->ki.triple_des.ks1, &ks1, sizeof (des_key_schedule));
+-  memcpy (&k->ki.triple_des.ks2, &ks2, sizeof (des_key_schedule));
+-  memcpy (&k->ki.triple_des.ks3, &ks3, sizeof (des_key_schedule));
++  memcpy (&k->ki.triple_des.k1, &k1, sizeof (DES_cblock));
++  memcpy (&k->ki.triple_des.k2, &k2, sizeof (DES_cblock));
++  memcpy (&k->ki.triple_des.k3, &k3, sizeof (DES_cblock));
++
++  memcpy (&k->ki.triple_des.ks1, &ks1, sizeof (DES_key_schedule));
++  memcpy (&k->ki.triple_des.ks2, &ks2, sizeof (DES_key_schedule));
++  memcpy (&k->ki.triple_des.ks3, &ks3, sizeof (DES_key_schedule));
+ 
+   mutex_leave (xenc_keys_mtx);
+ 
+@@ -2594,9 +2594,9 @@
+ 
+   if (k->xek_type == DSIG_KEY_3DES)
+     {
+-      memcpy (in_buf, k->ki.triple_des.k1, sizeof (des_cblock));
+-      memcpy (in_buf + sizeof (des_cblock), k->ki.triple_des.k2, sizeof (des_cblock));
+-      memcpy (in_buf + 2*sizeof (des_cblock), k->ki.triple_des.k3, sizeof (des_cblock));
++      memcpy (in_buf, k->ki.triple_des.k1, sizeof (DES_cblock));
++      memcpy (in_buf + sizeof (DES_cblock), k->ki.triple_des.k2, sizeof (DES_cblock));
++      memcpy (in_buf + 2*sizeof (DES_cblock), k->ki.triple_des.k3, sizeof (DES_cblock));
+     }
+   else if (k->xek_type == DSIG_KEY_RSA)
+     {
+@@ -6018,7 +6018,7 @@
+       xenc_des3_decryptor (out, strses_length (out), in, key, &t);
+       key_data_2 = strses_string (in);
+ 
+-      if (memcmp (key_data, key_data_2, 3 * sizeof (des_cblock)))
++      if (memcmp (key_data, key_data_2, 3 * sizeof (DES_cblock)))
+ 	xenc_assert (0);
+       dk_free_box (key_data_2);
+       dk_free_box (key_data);
+@@ -6026,13 +6026,13 @@
+       new_key = xenc_build_encrypted_key ("virtdev_test_rest", in, XENC_TRIPLEDES_ALGO, &t);
+ 
+       if (memcmp (new_key->ki.triple_des.k1,
+-		  key->ki.triple_des.k1, sizeof (des_cblock)))
++		  key->ki.triple_des.k1, sizeof (DES_cblock)))
+ 	xenc_assert (0);
+       if (memcmp (new_key->ki.triple_des.k2,
+-		  key->ki.triple_des.k2, sizeof (des_cblock)))
++		  key->ki.triple_des.k2, sizeof (DES_cblock)))
+ 	xenc_assert (0);
+       if (memcmp (new_key->ki.triple_des.k3,
+-		  key->ki.triple_des.k3, sizeof (des_cblock)))
++		  key->ki.triple_des.k3, sizeof (DES_cblock)))
+ 	xenc_assert (0);
+ 
+       strses_flush (in);
+--- libsrc/Wi/xmlenc.h.orig	2014-02-17 18:33:14.000000000 +0100
++++ libsrc/Wi/xmlenc.h	2015-02-25 21:57:27.433398091 +0100
+@@ -312,15 +312,15 @@
+     } dsa;
+     struct dsig_des3_keyinfo_s
+     {
+-      des_cblock k1;
+-      des_cblock k2;
+-      des_cblock k3;
+-
+-      des_key_schedule ks1;/* key schedule */
+-      des_key_schedule ks2;/* key schedule (for ede) */
+-      des_key_schedule ks3;/* key schedule (for ede3) */
++      DES_cblock k1;
++      DES_cblock k2;
++      DES_cblock k3;
++
++      DES_key_schedule ks1;/* key schedule */
++      DES_key_schedule ks2;/* key schedule (for ede) */
++      DES_key_schedule ks3;/* key schedule (for ede3) */
+ 
+-      des_cblock iv;
++      DES_cblock iv;
+ #define PKCS5_SALT_LEN			8
+       unsigned char salt[PKCS5_SALT_LEN];
+     } triple_des;
+--- libsrc/Wi/xmlenc_algos.c.orig	2014-02-17 18:33:14.000000000 +0100
++++ libsrc/Wi/xmlenc_algos.c	2015-02-27 20:33:18.743456726 +0100
+@@ -1162,10 +1162,10 @@
+   switch (key->xek_type)
+     {
+       case DSIG_KEY_3DES:
+-	  memcpy (key_data, key->ki.triple_des.k1, sizeof (des_cblock));
+-	  memcpy (key_data + 8, key->ki.triple_des.k2, sizeof (des_cblock));
+-	  memcpy (key_data + 16, key->ki.triple_des.k3, sizeof (des_cblock));
+-	  key_len = 3 * sizeof (des_cblock);
++	  memcpy (key_data, key->ki.triple_des.k1, sizeof (DES_cblock));
++	  memcpy (key_data + 8, key->ki.triple_des.k2, sizeof (DES_cblock));
++	  memcpy (key_data + 16, key->ki.triple_des.k3, sizeof (DES_cblock));
++	  key_len = 3 * sizeof (DES_cblock);
+ 	  break;
+ #ifdef AES_ENC_ENABLE
+       case DSIG_KEY_AES:
+@@ -1234,10 +1234,10 @@
+   switch (key->xek_type)
+     {
+       case DSIG_KEY_3DES:
+-	  memcpy (key_data, key->ki.triple_des.k1, sizeof (des_cblock));
+-	  memcpy (key_data + 8, key->ki.triple_des.k2, sizeof (des_cblock));
+-	  memcpy (key_data + 16, key->ki.triple_des.k3, sizeof (des_cblock));
+-	  key_len = 3 * sizeof (des_cblock);
++	  memcpy (key_data, key->ki.triple_des.k1, sizeof (DES_cblock));
++	  memcpy (key_data + 8, key->ki.triple_des.k2, sizeof (DES_cblock));
++	  memcpy (key_data + 16, key->ki.triple_des.k3, sizeof (DES_cblock));
++	  key_len = 3 * sizeof (DES_cblock);
+ 	  break;
+ #ifdef AES_ENC_ENABLE
+       case DSIG_KEY_AES:
+@@ -1599,10 +1599,10 @@
+   switch (key->xek_type)
+     {
+       case DSIG_KEY_3DES:
+-	  memcpy (key_data, key->ki.triple_des.k1, sizeof (des_cblock));
+-	  memcpy (key_data + 8, key->ki.triple_des.k2, sizeof (des_cblock));
+-	  memcpy (key_data + 16, key->ki.triple_des.k3, sizeof (des_cblock));
+-	  key_len = 3 * sizeof (des_cblock);
++	  memcpy (key_data, key->ki.triple_des.k1, sizeof (DES_cblock));
++	  memcpy (key_data + 8, key->ki.triple_des.k2, sizeof (DES_cblock));
++	  memcpy (key_data + 16, key->ki.triple_des.k3, sizeof (DES_cblock));
++	  key_len = 3 * sizeof (DES_cblock);
+ 	  break;
+ #ifdef AES_ENC_ENABLE
+       case DSIG_KEY_AES:
+@@ -1671,10 +1671,10 @@
+   switch (key->xek_type)
+     {
+       case DSIG_KEY_3DES:
+-	  memcpy (key_data, key->ki.triple_des.k1, sizeof (des_cblock));
+-	  memcpy (key_data + 8, key->ki.triple_des.k2, sizeof (des_cblock));
+-	  memcpy (key_data + 16, key->ki.triple_des.k3, sizeof (des_cblock));
+-	  key_len = 3 * sizeof (des_cblock);
++	  memcpy (key_data, key->ki.triple_des.k1, sizeof (DES_cblock));
++	  memcpy (key_data + 8, key->ki.triple_des.k2, sizeof (DES_cblock));
++	  memcpy (key_data + 16, key->ki.triple_des.k3, sizeof (DES_cblock));
++	  key_len = 3 * sizeof (DES_cblock);
+ 	  break;
+ #ifdef AES_ENC_ENABLE
+       case DSIG_KEY_AES:
+@@ -2245,13 +2245,13 @@
+ 	}
+ 
+ 
+-      des_ede3_cbc_encrypt ((const unsigned char *)buf,
++      DES_ede3_cbc_encrypt ((const unsigned char *)buf,
+ 		(unsigned char *)out_buf,
+ 		(long)DES_BLOCK_LEN,
+-		key->ki.triple_des.ks1,
+-		key->ki.triple_des.ks2,
+-		key->ki.triple_des.ks3,
+-		(des_cblock*) _iv,
++		&key->ki.triple_des.ks1,
++		&key->ki.triple_des.ks2,
++		&key->ki.triple_des.ks3,
++		(DES_cblock*) _iv,
+ 		DES_ENCRYPT);
+       total_blocks++;
+ 
+@@ -2315,7 +2315,7 @@
+   char *text, *text_beg;
+   dk_session_t *ses_in;
+   long text_len;
+-  des_cblock iv;
++  DES_cblock iv;
+ 
+   if (!seslen)
+     return 0;
+@@ -2357,12 +2357,12 @@
+   END_READ_FAIL (ses_in);
+   for (;!failed;)
+     {
+-      des_ede3_cbc_encrypt ((const unsigned char *)buf,
++      DES_ede3_cbc_encrypt ((const unsigned char *)buf,
+ 	(unsigned char *)out_buf,
+ 	(long)DES_BLOCK_LEN,
+-	key->ki.triple_des.ks1,
+-	key->ki.triple_des.ks2,
+-	key->ki.triple_des.ks3,
++	&key->ki.triple_des.ks1,
++	&key->ki.triple_des.ks2,
++	&key->ki.triple_des.ks3,
+ 	&iv,
+ 	DES_DECRYPT);
+       CATCH_READ_FAIL (ses_in)
+@@ -2409,7 +2409,7 @@
+   char out_buf[DES_BLOCK_LEN + 1];
+   char *text, *text_beg;
+   long text_len;
+-  des_cblock iv;
++  DES_cblock iv;
+   int blocks;
+ 
+   if (!seslen)
+@@ -2445,12 +2445,12 @@
+       memcpy (buf, text, DES_BLOCK_LEN);
+       text += DES_BLOCK_LEN;
+ 
+-      des_ede3_cbc_encrypt ((const unsigned char *)buf,
++      DES_ede3_cbc_encrypt ((const unsigned char *)buf,
+ 	(unsigned char *)out_buf,
+ 	(long)DES_BLOCK_LEN,
+-	key->ki.triple_des.ks1,
+-	key->ki.triple_des.ks2,
+-	key->ki.triple_des.ks3,
++	&key->ki.triple_des.ks1,
++	&key->ki.triple_des.ks2,
++	&key->ki.triple_des.ks3,
+ 	&iv,
+ 	DES_DECRYPT);
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503212029.t2LKTgmT012150>