I'm experimenting with implementing a SSL server with SNI.
Once the peer has negotiated the connection, and has connected successfully, I want to access the hostname that was used. I thought this would be accessible on the server side through peer.hostname but it's nil. The only thing I can access is peer.cert which does have the right subject.
Would it be safe (on the server side) to set peer.hostname in severname_cb? Another question is, should this be done automatically?
I'm experimenting with implementing a SSL server with SNI.
Once the peer has negotiated the connection, and has connected successfully, I want to access the hostname that was used. I thought this would be accessible on the server side through
peer.hostnamebut it's nil. The only thing I can access ispeer.certwhich does have the right subject.Would it be safe (on the server side) to set
peer.hostnameinsevername_cb? Another question is, should this be done automatically?