tags:

views:

34

answers:

1

Fairly new to socket programming, but I've been assigned with a whopper of project.

My issue is this: I try initiating an SSL handshake with both SSL_accept() and SSL_connect(), as well as renegotiating the handshake and then attempting to reconnect with SSL_renegotiate() and SSL_do_handshake() in succession, but all of these give me the error of BIO routines:BIO_write:unsupported method

Before making any calls, I make sure to set my BIO and initialize all SSL libraries.

The BIO and SSL pointers are not null during the time of execution.

Any ideas?

A: 

It is hard to tell without seeing any code but the error 'unsupported method' means that you are problably trying to call a function with the wrong BIO as parameter. In other words, you cannot call BIO_write with an accept BIO (one created with, eg, a call to BIO_new_accept()). An accept BIO is for, well, accepting connections.

josuegomes
Ah, so the BIO itself needs to be created specifically for the server or the client, then attached to the SSL before the transaction? Makes sense. I'll update with more information once I try this. Thanks in advance!
kelly.dunn