krzyzanowskim / OpenSSL

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

Cannot find 'BIO_set_conn_hostname' in scope #187

Closed cuongv closed 8 months ago

cuongv commented 8 months 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 8 months ago

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