質問

I created a server in Java (Android) with SSLServerSocket with a self-signed certificate and i am trying to connect to the server with wget:

wget https://myAndroidserver:8080 -v --ca-certificate=client.pem --no-check-certificate

but it gives the following error:

OpenSSL: error: 14094410: SSL routines: SSL3_READ_BYTES: SSLv3 handshake failure alert

The following error is logged in my Java application:

error: 140890C7: SSL routines: SSL3_GET_CLIENT_CERTIFICATE: peer did not return a certificate (external/openssl/ssl/s3_srvr.c: 3271 0x5926f79c: 0x00000000)

How to solve it?

役に立ちましたか?

解決 2

Thanks for availability to help. To resolve the issue follow the steps on this website click here to create the keystore and all file necessary to client and server, and used the bcprov-jdk16-1.45.jar to create keystore (bks) and used this command on client(wget):

 wget https://myserver:port  --certificate=client.pem --no-check-certificate --private-key=client_key.pem

他のヒント

If I am reading your question correctly....

**server**:
OpenSSL: error: 14094410: SSL routines: SSL3_READ_BYTES: SSLv3 handshake failure alert

**client**:
error: 140890C7: SSL routines: SSL3_GET_CLIENT_CERTIFICATE: peer did not return a certificate (external/openssl/ssl/s3_srvr.c: 3271 0x5926f79c: 0x00000000)

SSL/TLS is not running on the server at port 8080; or its not serving a certificate.

You can also use OpenSSL's s_client with the -state flag to verify the messages sent and received:

$ openssl s_client -connect encrypted.google.com:443 -state
CONNECTED(00000003)
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL_connect:SSLv3 read server hello A
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
verify return:0
SSL_connect:SSLv3 read server certificate A
SSL_connect:SSLv3 read server key exchange A
SSL_connect:SSLv3 read server done A
SSL_connect:SSLv3 write client key exchange A
SSL_connect:SSLv3 write change cipher spec A
SSL_connect:SSLv3 write finished A
SSL_connect:SSLv3 flush data
SSL_connect:SSLv3 read server session ticket A
SSL_connect:SSLv3 read finished A

There's also a -debug flag, but its very verbose and hard to decode. If you are going to perform debug traces, you might as well use Wireshark since it breaks out all the fields in the messages.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top