Re: Loading a certifcate from file into a X509 struct

2002-10-02 Thread Nils Larsch

On Mittwoch, 2. Oktober 2002 15:13, Radboud Platvoet wrote:
> I am sure that works on a Unix machine, but unfortunately I am on Windows.
> Could you maybe copy and paste the output of "man pem" in an email?

see: http://www.openssl.org/docs/crypto/pem.html
or use the pod2html command.

Regards,
Nils
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: Loading a certifcate from file into a X509 struct

2002-10-02 Thread Steve Haslam

On Wed, Oct 02, 2002 at 03:13:55PM +0200, Radboud Platvoet wrote:
> I am sure that works on a Unix machine, but unfortunately I am on Windows.
> Could you maybe copy and paste the output of "man pem" in an email?
> 
> Thanks,
> Radboud
> 
> PS: I am sure that the documentation for OpenSSL on Unix machines is
> adequate, however on Windows machines, with the lack of a working 'man'
> command and no help files available, it is quite impossible to make heads or
> tails out of it. Most of the time I need to get into the source code to
> figure out how it works!!

Well, the manpages appear to be on the openssl.org website, so:
 http://www.openssl.org/docs/crypto/pem.html

And the callback I should imagine is for reading the poassword from the user
if requried. and u will be a pointer to pass to the callback function, like
practically all C callbacks. (Don't you just long for Perl-style closures
sometimtes?)

SRH
-- 
Steve Haslam  Reading, UK   [EMAIL PROTECTED]
Debian GNU/Linux Maintainer   [EMAIL PROTECTED]
   maybe the human race deserves to be wiped out
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



RE: Loading a certifcate from file into a X509 struct

2002-10-02 Thread Radboud Platvoet

I am sure that works on a Unix machine, but unfortunately I am on Windows.
Could you maybe copy and paste the output of "man pem" in an email?

Thanks,
Radboud

PS: I am sure that the documentation for OpenSSL on Unix machines is
adequate, however on Windows machines, with the lack of a working 'man'
command and no help files available, it is quite impossible to make heads or
tails out of it. Most of the time I need to get into the source code to
figure out how it works!!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Nils Larsch
Sent: Wednesday, October 02, 2002 2:46 PM
To: [EMAIL PROTECTED]
Subject: Re: Loading a certifcate from file into a X509 struct


Radboud Platvoet wrote:
[...]
> This is the definition (after you resolve the macro):
>
> (X509 *) PEM_read_X509( FILE *fp, X509 **x, pem_password_cb *cb, void
*u );
>
> These I figured out:
> - fp  is most likely an open file pointer to the certificate file.
> - x   is most likely a double pointer to an X509 struct.
>
> But what is a pem_password_cb and what do I do with it?
> It is defined as:
> typedef int pem_password_cb(char *buf, int size, int rwflag, void
> *userdata);
> And what is this void *u at the end supposed to do??
>
> Any help, or even better: an example, would be greatly appreciated!!

man pem

Regards,
Nils
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]

__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: Loading a certifcate from file into a X509 struct

2002-10-02 Thread Nils Larsch

Radboud Platvoet wrote:
[...]
> This is the definition (after you resolve the macro):
> 
> (X509 *) PEM_read_X509( FILE *fp, X509 **x, pem_password_cb *cb, void *u );
> 
> These I figured out:
> - fp  is most likely an open file pointer to the certificate file.
> - x   is most likely a double pointer to an X509 struct.
> 
> But what is a pem_password_cb and what do I do with it?
> It is defined as:
> typedef int pem_password_cb(char *buf, int size, int rwflag, void
> *userdata);
> And what is this void *u at the end supposed to do??
> 
> Any help, or even better: an example, would be greatly appreciated!!

man pem

Regards,
Nils
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]