-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
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
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
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
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
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
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
"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.
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
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":
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
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
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":
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
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.
--
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,
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
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
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
-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
20 matches
Mail list logo