virtuoso: update to 6.1.8; switch to libressl with OpenBSD patches.

This commit is contained in:
Juan RP 2014-07-24 15:17:17 +02:00
parent 6f84fca64d
commit 69615352c6
4 changed files with 348 additions and 7 deletions

View File

@ -0,0 +1,134 @@
$OpenBSD: patch-libsrc_Wi_xmlenc_algos_c,v 1.1 2014/04/15 11:25:42 naddy Exp $
--- libsrc/Wi/xmlenc_algos.c.orig Fri Mar 23 13:28:31 2012
+++ libsrc/Wi/xmlenc_algos.c Tue Apr 15 00:27:50 2014
@@ -1162,10 +1162,10 @@ dsig_hmac_sha256_digest (dk_session_t * ses_in, long l
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 @@ dsig_hmac_sha256_verify (dk_session_t * ses_in, long l
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 @@ dsig_hmac_sha1_digest (dk_session_t * ses_in, long len
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 @@ dsig_hmac_sha1_verify (dk_session_t * ses_in, long len
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:
@@ -2240,13 +2240,13 @@ int xenc_des3_encryptor (dk_session_t * ses_in, long s
}
- 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++;
@@ -2310,7 +2310,7 @@ int xenc_des3_decryptor (dk_session_t * ses_in_base64,
char *text, *text_beg;
dk_session_t *ses_in;
long text_len;
- des_cblock iv;
+ DES_cblock iv;
if (!seslen)
return 0;
@@ -2352,12 +2352,12 @@ int xenc_des3_decryptor (dk_session_t * ses_in_base64,
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)
@@ -2404,7 +2404,7 @@ int xenc_des3_decryptor (dk_session_t * ses_in_base64,
char out_buf[DES_BLOCK_LEN + 1];
char *text, *text_beg;
long text_len;
- des_cblock iv;
+ DES_cblock iv;
int blocks;
if (!seslen)
@@ -2440,12 +2440,12 @@ int xenc_des3_decryptor (dk_session_t * ses_in_base64,
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);

View File

@ -0,0 +1,182 @@
$OpenBSD: patch-libsrc_Wi_xmlenc_c,v 1.1 2014/04/15 11:25:42 naddy Exp $
--- libsrc/Wi/xmlenc.c.orig Wed Aug 1 22:54:31 2012
+++ libsrc/Wi/xmlenc.c Tue Apr 15 00:34:07 2014
@@ -1762,7 +1762,7 @@ xenc_key_len_get (const char * algo)
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))
@@ -1814,7 +1814,7 @@ xenc_key_create_from_utok (u_tok_t * utok, caddr_t see
{
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);
@@ -1843,13 +1843,13 @@ xenc_key_create_from_utok (u_tok_t * utok, caddr_t see
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);
+ 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));
+ 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
@@ -2073,7 +2073,7 @@ static
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)
@@ -2093,13 +2093,13 @@ int __xenc_key_3des_init (char *name, char *pwd, int l
(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);
+ 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));
+ 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;
@@ -2107,13 +2107,13 @@ int __xenc_key_3des_init (char *name, char *pwd, int l
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));
+ 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);
+ 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);
}
@@ -2145,20 +2145,20 @@ caddr_t bif_xenc_key_3des_rand_create (caddr_t * qst,
{
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_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);
+ 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) )
+ 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);
@@ -2169,13 +2169,13 @@ caddr_t bif_xenc_key_3des_rand_create (caddr_t * qst,
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.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.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);
@@ -2565,9 +2565,9 @@ caddr_t bif_xenc_key_serialize (caddr_t * qst, caddr_t
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)
{
@@ -5980,7 +5980,7 @@ void xenc_kt_test ()
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);
@@ -5988,13 +5988,13 @@ void xenc_kt_test ()
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);

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-libsrc_Wi_xmlenc_h,v 1.1 2014/04/15 11:25:42 naddy Exp $
--- libsrc/Wi/xmlenc.h.orig Fri Mar 23 13:28:31 2012
+++ libsrc/Wi/xmlenc.h Tue Apr 15 00:16:35 2014
@@ -312,15 +312,15 @@ struct xenc_key_s
} dsa;
struct dsig_des3_keyinfo_s
{
- des_cblock k1;
- des_cblock k2;
- des_cblock k3;
+ 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_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;

View File

@ -1,22 +1,22 @@
# Template file for 'virtuoso'
pkgname=virtuoso
version=6.1.7
revision=3
lib32disabled=yes
version=6.1.8
revision=1
build_style=gnu-configure
wrksrc="${pkgname}-opensource-${version}"
hostmakedepends="flex gperf net-tools"
makedepends="libldap-devel readline-devel>=6.3 libxml2-devel openssl-devel mit-krb5-devel"
makedepends="libressl-devel libldap-devel readline-devel>=6.3 libxml2-devel mit-krb5-devel"
short_desc="A scalable cross-platform server of virtuoso"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://virtuoso.openlinksw.com/wiki/main/Main/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-opensource-${version}.tar.gz"
checksum=c82c1ee90810db5ccd725f7d0d68b42aa6db9a1c8bf6fe2a4dd0ca91a271aa7f
checksum=08d05c6165117de0370e81aa89ddab618e645b5110be301f72e6ffea7044ca50
do_configure() {
./configure ${configure_args} --without-internal-zlib --with-readline \
--with-layout=debian --program-transform-name='s/isql$$/isql-vt/;s/isqlw/isqlw-vt/'
--with-layout=debian \
--program-transform-name='s/isql$$/isql-vt/;s/isqlw/isqlw-vt/'
}
post_install() {
@ -33,7 +33,6 @@ post_install() {
}
virtuoso-base_package() {
lib32disabled=yes
short_desc+=" (very minimal installation)"
pkg_install() {
cd ${wrksrc}/binsrc/virtuoso