How to get client's IP after SSL handshake in OpenSSL

Mathew

The problem is that after doing this:

    SSL* ssl;
    ssl = SSL_new(ctx);
    SSL_set_fd(ssl, sock);
    int err = SSL_accept(ssl);

I can't get acces to client's socket 'sock', so I neither can get acces to client's IP. Is there anyway I can get it from SSL structure? Couldn't find that at docs.

Thanks.

Steffen Ullrich

There is no information about IP in the SSL structure and you can use SSL even without any IP address. You will find the necessary information with getpeername on the socket itself. In case you need to get the socket for the SSL object use SSL_get_fd.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to get client's IP after SSL handshake in OpenSSL

From Dev

"openssl s_client -connect" exit after handshake

From Dev

How to get client's IP address

From Dev

How to get the client's IP address in Roda?

From Dev

Get a server's SSL/TLS certificate using "openssl s_client"

From Dev

OpenSSL::SSL::SSLError Handshake Failure with Homebrew OpenSSL

From Dev

How to get the client's IP after receiving a UDP packet with recvfrom() in C?

From Dev

What's wrong with this SSL Handshake Client Hello record?

From Dev

Get the client's IP address

From Dev

How to handle SSL Handshake

From Dev

Openstack: how to get client's IP in the python API

From Dev

How can I get a connected client's IP address?

From Dev

How to get real request client's ip from App Engine

From Dev

How to get real request client's ip from App Engine

From Dev

PayPal IPN OPENSSL error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

From Dev

How do I get symmetric key generated in SSL handshake?

From Dev

How to give CRL to openssl s_client?

From Dev

.NET Mutual SSL handshake 'Client Authentication'

From Dev

Boost Asio SSL Client Handshake Problems

From Dev

.NET Mutual SSL handshake 'Client Authentication'

From Dev

No client certificate was presented during SSL Handshake

From Dev

Why do I get an a SSL handshake failure with .Net Client to RabbitMQ with Erlang 19.1.1 but do not in 17.4 18.1 and 18.2?

From Dev

Node.js: Get client's IP

From Dev

Get client's real IP address on Heroku

From Dev

When setting up VLC streaming server over SSL, I get an empty response after the handshake is done

From Dev

Not able to GET resource using openssl s_client

From Dev

Nginx ingress controller how to fix SSL_do_handshake tls_process_client_hello:version too low) while SSL handshaking

From Dev

How to get the local IP of the client in Netty Framework?

From Dev

How to get client IP behind an AWS ELB?

Related Related

  1. 1

    How to get client's IP after SSL handshake in OpenSSL

  2. 2

    "openssl s_client -connect" exit after handshake

  3. 3

    How to get client's IP address

  4. 4

    How to get the client's IP address in Roda?

  5. 5

    Get a server's SSL/TLS certificate using "openssl s_client"

  6. 6

    OpenSSL::SSL::SSLError Handshake Failure with Homebrew OpenSSL

  7. 7

    How to get the client's IP after receiving a UDP packet with recvfrom() in C?

  8. 8

    What's wrong with this SSL Handshake Client Hello record?

  9. 9

    Get the client's IP address

  10. 10

    How to handle SSL Handshake

  11. 11

    Openstack: how to get client's IP in the python API

  12. 12

    How can I get a connected client's IP address?

  13. 13

    How to get real request client's ip from App Engine

  14. 14

    How to get real request client's ip from App Engine

  15. 15

    PayPal IPN OPENSSL error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

  16. 16

    How do I get symmetric key generated in SSL handshake?

  17. 17

    How to give CRL to openssl s_client?

  18. 18

    .NET Mutual SSL handshake 'Client Authentication'

  19. 19

    Boost Asio SSL Client Handshake Problems

  20. 20

    .NET Mutual SSL handshake 'Client Authentication'

  21. 21

    No client certificate was presented during SSL Handshake

  22. 22

    Why do I get an a SSL handshake failure with .Net Client to RabbitMQ with Erlang 19.1.1 but do not in 17.4 18.1 and 18.2?

  23. 23

    Node.js: Get client's IP

  24. 24

    Get client's real IP address on Heroku

  25. 25

    When setting up VLC streaming server over SSL, I get an empty response after the handshake is done

  26. 26

    Not able to GET resource using openssl s_client

  27. 27

    Nginx ingress controller how to fix SSL_do_handshake tls_process_client_hello:version too low) while SSL handshaking

  28. 28

    How to get the local IP of the client in Netty Framework?

  29. 29

    How to get client IP behind an AWS ELB?

HotTag

Archive