RE: Adding parameters to passphrase callbacks.

1999-06-17 Thread Anonymous
-Original Message- From: Ben Laurie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 15, 1999 5:35 AM To: [EMAIL PROTECTED] Subject: Re: Adding parameters to passphrase callbacks. Bodo Moeller wrote: "Wade L. Scholine" [EMAIL PROTECTED]: An alternative not

Re: Adding parameters to passphrase callbacks.

1999-06-16 Thread Anonymous
Bodo Moeller wrote: On Tue, Jun 15, 1999 at 05:37:27PM +0100, Ben Laurie wrote: Under Windoze, callbacks are traditionally declared with CALLBACK in the prototype, which, I think, uses Pascal linkage (the afore-mentioned "non-C" calling convention). But many of the callback pointers

Re: Adding parameters to passphrase callbacks.

1999-06-15 Thread Anonymous
Bodo Moeller wrote: [...] #undef PEM_read_PrivateKey EVP_PKEY *PEM_read_PrivateKey(FILE *fp,EVP_PKEY **x, pem_password_cb *cb) { return PEM_read_PrivateKey_ex(fp, x, cb, NULL); } two notes: 1) on compilers that support inlining, defining the above function with *static* qualifiers

Re: Adding parameters to passphrase callbacks.

1999-06-15 Thread Anonymous
Bodo Moeller wrote: "Wade L. Scholine" [EMAIL PROTECTED]: An alternative not mentioned is to make the callback type have a variable number of arguments, like typedef int (*password_cb(char *buf, int size, int rwflag, ...)); where the arg list is terminated with a null pointer

Re: Adding parameters to passphrase callbacks.

1999-06-15 Thread Anonymous
On Tue, Jun 15, 1999 at 10:03:18AM +0200, Alessandro Vesely wrote: Bodo Moeller wrote: [...] #undef PEM_read_PrivateKey EVP_PKEY *PEM_read_PrivateKey(FILE *fp,EVP_PKEY **x, pem_password_cb *cb) { return PEM_read_PrivateKey_ex(fp, x, cb, NULL); } two notes: 1) on compilers that

Re: Adding parameters to passphrase callbacks.

1999-06-15 Thread Anonymous
On Tue, Jun 15, 1999 at 10:35:22AM +0100, Ben Laurie wrote: /* crypto/pem/pem_stubs.c */ #include openssl/pem.h #undef PEM_read_PrivateKey EVP_PKEY *PEM_read_PrivateKey(FILE *fp,EVP_PKEY **x, pem_password_cb *cb) { return PEM_read_PrivateKey_ex(fp, x, cb, NULL); } Not sure

Re: Adding parameters to passphrase callbacks.

1999-06-15 Thread Anonymous
On Tue, Jun 15, 1999 at 05:37:27PM +0100, Ben Laurie wrote: Under Windoze, callbacks are traditionally declared with CALLBACK in the prototype, which, I think, uses Pascal linkage (the afore-mentioned "non-C" calling convention). But many of the callback pointers in OpenSSL have just "int

Re: Adding parameters to passphrase callbacks.

1999-06-14 Thread Anonymous
"Wade L. Scholine" [EMAIL PROTECTED]: An alternative not mentioned is to make the callback type have a variable number of arguments, like typedef int (*password_cb(char *buf, int size, int rwflag, ...)); where the arg list is terminated with a null pointer constant or something.

RE: Adding parameters to passphrase callbacks.

1999-06-10 Thread Anonymous
An alternative not mentioned is to make the callback type have a variable number of arguments, like This requires all callbacks to be written as varargs programs. (It often also means a different, slower, calling sequence.) This would still break existing code, but which would allow for more

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread Alessandro Vesely
Hi Steve, Received: from celocom.com Tue, 8 Jun 1999 20:57:29 + [...] 3. Do something evil with the cb parameter... looks like the easy way to go, although quite unelegant. EVP_PKEY *PEM_read_PrivateKey(FILE *fp,EVP_PKEY **x, void *x); This has a companion "default callback":

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread Ben Laurie
Dr Stephen Henson wrote: From time to time someone needs to pass a parameter to a passphrase callback. For example the prompt for the password can be set to a meaningful phrase or the passphrase itself could be set by this method. Currently this isn't directly possible and the only

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread Goetz Babin-Ebell
At 21:54 08.06.99 +0100, you wrote: Hallo, From time to time someone needs to pass a parameter to a passphrase callback. For example the prompt for the password can be set to a meaningful phrase or the passphrase itself could be set by this method. Currently this isn't directly possible and the

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread ca
Hi Steve, Received: from celocom.com Tue, 8 Jun 1999 20:57:29 + [...] 3. Do something evil with the cb parameter... looks like the easy way to go, although quite unelegant. EVP_PKEY *PEM_read_PrivateKey(FILE *fp,EVP_PKEY **x, void *x); This has a companion "default callback":

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread Goetz Babin-Ebell
At 10:26 09.06.99 +0100, you wrote: Dr Stephen Henson wrote: I think 3 is too disgusting to contemplate. 1 is OK with me: we regularly break all existing code, anyway (speaking of which, I tried to get demos/selfsign.c going the other day, but X509v3 support has changed so drastically I

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread Ben Laurie
Goetz Babin-Ebell wrote: We could do domething like #define PEM_read_PrivateKey(fp,pkeyp,callback)\ PEM_read_PrivateKey_ex(fp,pkeyp,callback,NULL) Would be no overkill, cause we still have only one set of functions Oh yes. That's sensible. Cheers, Ben. --

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread Ralf S. Engelschall
In article [EMAIL PROTECTED] you wrote: From time to time someone needs to pass a parameter to a passphrase [...] 1. Just add an extra parameter. With this method the callback would become: int pem_password_cb(char *buf, int size, int rwflag, void *arg); [...] +1, this is ok for me,

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread Dr Stephen Henson
Ben Laurie wrote: Dr Stephen Henson wrote: From time to time someone needs to pass a parameter to a passphrase callback. For example the prompt for the password can be set to a meaningful phrase or the passphrase itself could be set by this method. Currently this isn't directly

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread Richard Levitte - VMS Whacker
From: Ben Laurie [EMAIL PROTECTED] ben Goetz Babin-Ebell wrote: ben We could do domething like ben ben #define PEM_read_PrivateKey(fp,pkeyp,callback)\ ben PEM_read_PrivateKey_ex(fp,pkeyp,callback,NULL) ben ben Would be no overkill, cause we still have only one set of functions ben ben

Re: Adding parameters to passphrase callbacks.

1999-06-09 Thread Ben Laurie
Richard Levitte - VMS Whacker wrote: From: Ben Laurie [EMAIL PROTECTED] ben Goetz Babin-Ebell wrote: ben We could do domething like ben ben #define PEM_read_PrivateKey(fp,pkeyp,callback)\ ben PEM_read_PrivateKey_ex(fp,pkeyp,callback,NULL) ben ben Would be no overkill, cause we

RE: Adding parameters to passphrase callbacks.

1999-06-09 Thread Wade L. Scholine
-Original Message- From: Dr Stephen Henson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 08, 1999 4:54 PM To: [EMAIL PROTECTED] Subject: Adding parameters to passphrase callbacks. From time to time someone needs to pass a parameter to a passphrase callback. For example