-
Notifications
You must be signed in to change notification settings - Fork 25
Not connecting to secured database #17
Comments
What platform is your code on? Are you building from Carthage? This issue will occur with Carthage because openssl is deprecated on OSX and not available on iOS. The folks behind libmongoc told me that they were working on it but I don't think they got to it yet. On the other hand, if you build with the Swift Package Manager, you won't have the same issue because you can just rebuild libmongoc with the |
My code is on iOS using Xcode 7.2. I did install using Carthage. What would I have to build to make this work? Would I build all the packages in Carthage/Checkout or just one part in specific? |
Sorry for the delay. Unfortunately I have not thoroughly experimented building with ssl on iOS. If you can figure out how to link them together, simply changing the 0 in this file to a 1 should enable most ssl-related features. Let me know if you get anywhere. |
I'm interested in the also, @mougli123 were you able to get it to work? |
I'm trying to connect directly to mLab service. That is a secured database. Did you get this working with a secured database? |
@RafaelRViana which version are you using? |
I'm using the version available on Cocoapods. |
Oh jeez, that version is way too old! I've been trying to remove it from cocoa pods for a long time now but trunk is very buggy... Please use the version provided by SPM or at the very least Carthage :) |
I've tried to install it using Carthage, however I'm getting the following error:
Maybe, could it be a problem of using Carthage in the same project it's being used CocoaPods? |
I'm trying to connect to a remote database that's secured with a username and password. I tried this code to test the connection:
do{
let client = try MongoClient(host: host, port: port, database: db, usernameAndPassword: (user,password))
print(try client.checkConnection())
}catch{
print(error)
}
This results in the following appearing in the console:
DEBUG: cluster: Authentication failed: The "SCRAM-SHA-1" authentication mechanism requires libmongoc built with --enable-ssl
The text was updated successfully, but these errors were encountered: