Re: [openssl-users] SSL alert number 48

2017-12-19 Thread Jan Just Keijser
Hi, On 12/12/17 11:06, wizard2...@gmail.com wrote: Hi. Ok, I agree with you that the way I generate the certificates could not be the right one, but now I change the way and the problem remains. Please check the way I'm creating the certificates. I create a ROOT-CA entity and a INTERMEDIATE-C

Re: [openssl-users] SSL alert number 48

2017-12-07 Thread Jan Just Keijser
Hi, On 04/12/17 09:10, wizard2...@gmail.com wrote: Hi , Please see in attach the files that I'm using. I've just taken a look at your certificates and they've not been generated correctly: $ openssl x509 -subject -issuer -noout -in ca.crt -dates -serial subject= /C=AU/ST=Some-State/O=Inter

Re: [openssl-users] SSL alert number 48

2017-12-04 Thread wizard2010
On Mon, Dec 4, 2017 at 10:27 AM, Kyle Hamilton wrote: > SSL alert number 48 is specified in the documents that define SSL/TLS. > It is the code for "unknown_ca", which means that verification failed > because it didn't get set up with the correct CA to verify against. > You might wish to look up

Re: [openssl-users] SSL alert number 48

2017-12-04 Thread Kyle Hamilton
SSL alert number 48 is specified in the documents that define SSL/TLS. It is the code for "unknown_ca", which means that verification failed because it didn't get set up with the correct CA to verify against. You might wish to look up SSL_CTX_load_verify_locations(3). There may also be other API c

Re: [openssl-users] SSL alert number 48

2017-12-04 Thread wizard2010
Hi , Please see in attach the files that I'm using. I generate the certificates with the following commands: 1. ## Create CA 2. openssl genrsa -out ca.key 4096 3. openssl req -new -x509 -days 365 -key ca.key -out ca.crt 4. openssl x509 -in ca.crt -out ca.pem -outform PEM 5. 1

Re: [openssl-users] SSL alert number 48

2017-11-30 Thread Jan Just Keijser
Hi, On 29/11/17 14:37, wizard2...@gmail.com wrote: Hi JJK, I test you function and I've got this result: ok = 0 cert DN: /C=AU/ST=Some-State/O=Internet Widgits Pty Ltd ok = 1 cert DN: /C=AU/ST=Some-State/O=Internet Widgits Pty Ltd Why I see this 2 time? When I create the cert

Re: [openssl-users] SSL alert number 48

2017-11-29 Thread wizard2010
On Wed, Nov 29, 2017 at 1:54 PM, Viktor Dukhovni wrote: > On Wed, Nov 29, 2017 at 09:56:35AM +0100, Jan Just Keijser wrote: > > > Try adding this to the verify_callback > > > > > > static int verify_callback(int ok, X509_STORE_CTX *ctx) > > { > > X509 *cert = NULL; > > char

Re: [openssl-users] SSL alert number 48

2017-11-29 Thread Viktor Dukhovni
On Wed, Nov 29, 2017 at 09:56:35AM +0100, Jan Just Keijser wrote: > Try adding this to the verify_callback > > > static int verify_callback(int ok, X509_STORE_CTX *ctx) > { >     X509   *cert = NULL; >     char   *cert_DN = NULL; > >     printf("ok = %d\n", ok); >     cert    =

Re: [openssl-users] SSL alert number 48

2017-11-29 Thread Viktor Dukhovni
On Wed, Nov 29, 2017 at 01:44:01PM +, wizard2...@gmail.com wrote: > > > > int verify_callback (int ok, X509_STORE_CTX *ctx) > > > > { > > > > printf("Verification callback OK!\n"); > > > > return 1; > > > > } > > > > ... > > > > SSL_CTX_set_verify(ssl_server_ctx, SSL_VERIFY_PEER | > >

Re: [openssl-users] SSL alert number 48

2017-11-29 Thread wizard2010
On Tue, Nov 28, 2017 at 9:11 PM, Viktor Dukhovni wrote: > On Tue, Nov 28, 2017 at 10:03:12AM +, wizard2...@gmail.com wrote: > > > I guess my problem is really related to verify callback > > on SSL_CTX_set_verify function. > > I just add to my code a dummy callback returning 1 and everything w

Re: [openssl-users] SSL alert number 48

2017-11-29 Thread wizard2010
Hi JJK, I test you function and I've got this result: > ok = 0 > cert DN: /C=AU/ST=Some-State/O=Internet Widgits Pty Ltd > ok = 1 > cert DN: /C=AU/ST=Some-State/O=Internet Widgits Pty Ltd Why I see this 2 time? When I create the certificates I didn't fill with any special information, just type

Re: [openssl-users] SSL alert number 48

2017-11-29 Thread Jan Just Keijser
Hi, On 28/11/17 11:03, wizard2...@gmail.com wrote: Hi there. I guess my problem is really related to verify callback on SSL_CTX_set_verify function. I just add to my code a dummy callback returning 1 and everything works properly. int verify_callback (int ok, X509_STORE_CTX *ctx); i

Re: [openssl-users] SSL alert number 48

2017-11-28 Thread Viktor Dukhovni
On Tue, Nov 28, 2017 at 10:03:12AM +, wizard2...@gmail.com wrote: > I guess my problem is really related to verify callback > on SSL_CTX_set_verify function. > I just add to my code a dummy callback returning 1 and everything works > properly. > > > > int verify_callback (int ok, X509_STORE_

Re: [openssl-users] SSL alert number 48

2017-11-28 Thread wizard2010
Hi there. I guess my problem is really related to verify callback on SSL_CTX_set_verify function. I just add to my code a dummy callback returning 1 and everything works properly. > int verify_callback (int ok, X509_STORE_CTX *ctx); > int verify_callback (int ok, X509_STORE_CTX *ctx) > { > p

Re: [openssl-users] SSL alert number 48

2017-11-28 Thread Jan Just Keijser
Hi, On 27/11/17 17:07, wizard2...@gmail.com wrote: Hi there. I'm getting this error on a TLS server&client that I'm implementing and I can't really understand what I'm doing wrong. 139853560931992:error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:s3_pkt.c:1487:SSL alert

[openssl-users] SSL alert number 48

2017-11-27 Thread wizard2010
Hi there. I'm getting this error on a TLS server&client that I'm implementing and I can't really understand what I'm doing wrong. 139853560931992:error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert > unknown ca:s3_pkt.c:1487:SSL alert number 48 > 139853560931992:error:140790E5:SSL routines:ss