krzyzanowskim / OpenSSL

OpenSSL package for SwiftPM, CocoaPod, and Carthage, multiplatform
https://swift.best
Other
928 stars 340 forks source link

Cannot find 'BIO_set_conn_hostname' in scope #187

Closed cuongv closed 1 year ago

cuongv commented 1 year ago

Hi, I am using the prebuilt version in the main branch (3.1.3001) and facing the issue that many C API interfaces are not exposed in Swift. For example:

BIO_set_conn_hostname(bio, hostname)  //Cannot find 'BIO_set_conn_hostname' in scope
BIO_set_conn_port(bio, port) //Cannot find 'BIO_set_conn_port' in scope

let ssl = SSL_new(ctx)
BIO_get_ssl(bio, &ssl) //Cannot find 'BIO_get_ssl' in scope

I appreciate any help!

krzyzanowskim commented 1 year ago

BIO_set_conn_hostname is a C macro, and Swift does not import C macros.