aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2015-03-22 04:29:41 +0800
committerfjoe <fjoe@FreeBSD.org>2015-03-22 04:29:41 +0800
commit70e3b04e60e20dacd95abeddd855e761460617ea (patch)
treed9ffb290a4f8b470d32da180afdfd8a077bb2159
parent53d386418be58eb67b7f0fcee2634fa35a44f150 (diff)
downloadfreebsd-ports-gnome-70e3b04e60e20dacd95abeddd855e761460617ea.tar.gz
freebsd-ports-gnome-70e3b04e60e20dacd95abeddd855e761460617ea.tar.zst
freebsd-ports-gnome-70e3b04e60e20dacd95abeddd855e761460617ea.zip
- Replace deprecated des_ methods with DES_ (fixed the build with LibreSSL)
- Bump PORTREVISION PR: 198368 Submitted by: Bernard Spil
-rw-r--r--databases/virtuoso/Makefile2
-rw-r--r--databases/virtuoso/files/patch-openssl346
2 files changed, 347 insertions, 1 deletions
diff --git a/databases/virtuoso/Makefile b/databases/virtuoso/Makefile
index 459a5ef12b66..1e539b9ab769 100644
--- a/databases/virtuoso/Makefile
+++ b/databases/virtuoso/Makefile
@@ -3,7 +3,7 @@
PORTNAME= virtuoso
PORTVERSION= 7.1.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases
MASTER_SITES= SF
DISTNAME= ${PORTNAME}-opensource-${PORTVERSION}
diff --git a/databases/virtuoso/files/patch-openssl b/databases/virtuoso/files/patch-openssl
new file mode 100644
index 000000000000..5c50c252693c
--- /dev/null
+++ b/databases/virtuoso/files/patch-openssl
@@ -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);
+