mbedtls: Fix setting allowed cipher suites
[project/ustream-ssl.git] / ustream-io-openssl.c
index 41e69f7..6711055 100644 (file)
@@ -88,6 +88,9 @@ s_ustream_write(BIO *b, const char *buf, int len)
        if (!s)
                return 0;
 
+       if (s->write_error)
+               return len;
+
        return ustream_write(s, buf, len, false);
 }
 
@@ -135,7 +138,7 @@ static BIO *ustream_bio_new(struct ustream *s)
        return bio;
 }
 
-__hidden void ustream_set_io(void *ctx, void *ssl, struct ustream *conn)
+__hidden void ustream_set_io(struct ustream_ssl_ctx *ctx, void *ssl, struct ustream *conn)
 {
        BIO *bio = ustream_bio_new(conn);
        SSL_set_bio(ssl, bio, bio);