Re: 4 pgcrypto regressions failures - 1 unsolved

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marko Kreen <marko(at)l-t(dot)ee>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 4 pgcrypto regressions failures - 1 unsolved
Date: 2005-07-11 14:10:12
Message-ID: 8090.1121091012@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Marko Kreen <marko(at)l-t(dot)ee> writes:
> Result is - it's not so bad. As I used rijndael.c to provide
> OpenSSL's own interface, I even got rid of all the ifdefs inside
> the code.

Looks good, but I'm still getting these compile warnings:

openssl.c: In function `ossl_des3_ecb_encrypt':
openssl.c:484: warning: passing arg 1 of `DES_ecb3_encrypt' from incompatible pointer type
openssl.c:484: warning: passing arg 2 of `DES_ecb3_encrypt' from incompatible pointer type
openssl.c: In function `ossl_des3_ecb_decrypt':
openssl.c:498: warning: passing arg 1 of `DES_ecb3_encrypt' from incompatible pointer type
openssl.c:498: warning: passing arg 2 of `DES_ecb3_encrypt' from incompatible pointer type

The following addition to the patch shuts up gcc with openssl 0.9.7a,
but I'm not sure if it will break anything with older openssl ---
comments?

regards, tom lane

*** /home/postgres/pgsql/contrib/pgcrypto/openssl.c Sun Jul 10 12:35:38 2005
--- new/openssl.c Mon Jul 11 10:06:30 2005
***************
*** 446,452 ****
ossldata *od = c->ptr;

for (i = 0; i < dlen / bs; i++)
! DES_ecb3_encrypt(data + i * bs, res + i * bs,
&od->u.des3.k1, &od->u.des3.k2, &od->u.des3.k3, 1);
return 0;
}
--- 480,487 ----
ossldata *od = c->ptr;

for (i = 0; i < dlen / bs; i++)
! DES_ecb3_encrypt((const_DES_cblock *) (data + i * bs),
! (DES_cblock *) (res + i * bs),
&od->u.des3.k1, &od->u.des3.k2, &od->u.des3.k3, 1);
return 0;
}
***************
*** 460,466 ****
ossldata *od = c->ptr;

for (i = 0; i < dlen / bs; i++)
! DES_ecb3_encrypt(data + i * bs, res + i * bs,
&od->u.des3.k1, &od->u.des3.k2, &od->u.des3.k3, 0);
return 0;
}
--- 495,502 ----
ossldata *od = c->ptr;

for (i = 0; i < dlen / bs; i++)
! DES_ecb3_encrypt((const_DES_cblock *) (data + i * bs),
! (DES_cblock *) (res + i * bs),
&od->u.des3.k1, &od->u.des3.k2, &od->u.des3.k3, 0);
return 0;
}

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-07-11 14:13:22 Re: 4 pgcrypto regressions failures - 1 unsolved
Previous Message Andrew Dunstan 2005-07-11 13:31:25 Re: suspicious pointer/integer coersion

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-07-11 14:13:22 Re: 4 pgcrypto regressions failures - 1 unsolved
Previous Message Marko Kreen 2005-07-11 13:13:28 Re: 4 pgcrypto regressions failures - 1 unsolved