Hello,

 

I have an application where we want to connect via SSL on both TCP and on named pipes under windows.  The TCP code works well, however I get the following error when using pipes and I call SSL_connect:

 

288:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:.\ssl\s3_pkt.c:288

 

Because TCP versions of the same client and server connect fine, I’m presuming I’m using the pipe wrong.  This is how I convert the pipe from a HANDLE, created with CreateNamedPipe (on the server) or CreateFile (on the client), to a BIO to use with SSL:

 

       ssl = SSL_new(ctx);

      int fd = _open_osfhandle((long)hPipe, _O_RDWR | _O_BINARY);

      FILE *fp = _fdopen( fd, "r+b" );

      sbio = BIO_new_fp( fp , BIO_CLOSE);

      SSL_set_bio(ssl, sbio, sbio);

 

Does this yield a valid BIO?  If so, why the version mismatch error?

 

Thanks for any ideas you can give me,

  -- Justin

Reply via email to