Alex Graveley wrote:
>
> Hi,
>
> I am trying to import a newly connected Unix socket fd using
> PR_ImportTCPSocket(), to then use NSS for SSL. I am using the following
> sequence:
>
> PR_Init
> NSS_InitReadWrite
> NSS_SetDomesticPolicy
> ...
> socket
> connect
> ...
> PR_ImportTCPSocket
> SSL_ImportFD
> SSL_OptionSet (SSL_SECURITY)
> SSL_OptionSet (SSL_HANDSHAKE_AS_CLIENT)
> SSL_SetURL
Missing an important call here.
SSL_ResetHandshake
> SSL_ForceHandshake
> ...
> PR_Write
SSL_ResetHandshake is necessary whenever a socket is already connected
prior to calling SSL_ImportFD.
--
Nelson Bolyard