RE: Re:Re: How to retrieve error about private key loading.

2011-03-03 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of ikuzar > Sent: Friday, 25 February, 2011 09:57 > 2011/2/25 lzyzizi > You can use ERR_GET_FUNC(l) with the error code to get > the error function ID that is defined in the module's header(here is ssl.h). > You c

Re: Re: How to retrieve error about private key loading.

2011-02-25 Thread ikuzar
Thanks, I missed "!" ... 2011/2/25 lzyzizi > I think you missed the logic about the function return value. > > If SSL_set_fd( ) is ok , it will return "1". > > Your code may write this way: > > if(* !*SSL_set_fd(si->ssl, sock)){ > int err_tmp = ERR_get_error(); > char buf_tmp[256];

Re: Re:Re: How to retrieve error about private key loading.

2011-02-25 Thread ikuzar
; printf("*** %s\n", buf); > > } > > > >Best regards, > >-- > >Marek Marcola > > > > > >owner-openssl-us...@openssl.org wrote on 02/25/2011 12:06:47 PM: > > > >> Aro RANAIVONDRAMBOLA > >> Sent by: owner-openssl-us...@op

Re: Re:Re: How to retrieve error about private key loading.

2011-02-25 Thread ikuzar
s...@openssl.org wrote on 02/25/2011 12:06:47 PM: > > > >> Aro RANAIVONDRAMBOLA > >> Sent by: owner-openssl-us...@openssl.org > >> > >> 02/25/2011 12:08 PM > >> > >> Please respond to > >> openssl-users@openssl.org > >> &g

Re:Re: How to retrieve error about private key loading.

2011-02-25 Thread lzyzizi
I think you missed the logic about the function return value. If SSL_set_fd( ) is ok , it will return "1". Your code may write this way: if( !SSL_set_fd(si->ssl, sock)){ int err_tmp = ERR_get_error(); char buf_tmp[256]; ERR_error_string_n(err_tmp, buf_tmp, sizeof(buf_tmp));

Re:Re:Re: How to retrieve error about private key loading.

2011-02-25 Thread lzyzizi
RANAIVONDRAMBOLA >> Sent by: owner-openssl-us...@openssl.org >> >> 02/25/2011 12:08 PM >> >> Please respond to >> openssl-users@openssl.org >> >> To >> >> openssl-users@openssl.org >> >> cc >> >> Subject >&

Re: How to retrieve error about private key loading.

2011-02-25 Thread ikuzar
SSL_set_fd( ) also fails. to know what exactly happened, I tried somthing like this : if(SSL_set_fd(si->ssl, sock)){ int err_tmp = ERR_get_error(); char buf_tmp[256]; ERR_error_string_n(err_tmp, buf_tmp, sizeof(buf_tmp)); log(ERROR, buf_tmp); fsl_err = FSL_ERROR_CANN

Re:Re: How to retrieve error about private key loading.

2011-02-25 Thread Marek . Marcola
s@openssl.org > > To > > openssl-users@openssl.org > > cc > > Subject > > Re:Re: How to retrieve error about private key loading. > > > I think ERR_load_RSA_strings(void) should be called first. > > At 2011-02-25 19:25:51,marek.marc...@malkom.p

Re:Re: How to retrieve error about private key loading.

2011-02-25 Thread lzyzizi
nssl-us...@openssl.org >> >> 02/25/2011 12:08 PM >> >> Please respond to >> openssl-users@openssl.org >> >> To >> >> openssl-users@openssl.org >> >> cc >> >> Subject >> >> How to retrieve error about private

Re: How to retrieve error about private key loading.

2011-02-25 Thread Marek . Marcola
.org wrote on 02/25/2011 12:06:47 PM: > Aro RANAIVONDRAMBOLA > Sent by: owner-openssl-us...@openssl.org > > 02/25/2011 12:08 PM > > Please respond to > openssl-users@openssl.org > > To > > openssl-users@openssl.org > > cc > > Subject > >

How to retrieve error about private key loading.

2011-02-25 Thread Aro RANAIVONDRAMBOLA
Hello, I realize that when my program calls SSL_CTX_use_certificate_file, it returns an error because the certificate does not match the private key. I would to process this kind of error. SSL_get_error( ) does not treat this case. I would like to know what is THE function wich enable me to extract