-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work with macOS in Terminal #55
Comments
This looks like the certificate you're looking to load is not being found on the path provided. Try passing in a complete fully qualified pathname. I ran some tests here and all seems to be working however, I was able to reproduce the error when I changed the path to a different place. Let me know how you make out. |
In that case it will throw |
Actually I just ran it on Xcode and it works. It doesn't work when the program is ran directly from the shell, which is what I need. The error seems to be similar to this one: #32 Do you know anything about Keychain Access usage when running this from the terminal? |
The difference between running it on the terminal and in Xcode primarily has to do with the path. I suggest that you use the fully qualified pathname of the certificate. Then execute the following commands from the terminal:
Let me know how you make out... |
Thanks for getting back. Yes I'm using the full path. I tried the above commands but it didn't work. I need to run this program as |
Are you still having this problem? Thanks. |
After digging through the code and documentation, I learned that
SSLService.Configuration(withChainFilePath ...
is the only supported method on macOS. This wasn't clear to me from the README, but this PKCS12 method is also not working for me.When I try to connect, it gives me an error:
Error code: 2(0x2), ERROR: Could not load content of PKCS12 file
Here is my code:
I thought it could've been my certificate so I've also tried generating PKCS12 from following this blog but gave me the same error
https://developer.ibm.com/swift/2016/09/22/securing-kitura-part-1-enabling-ssltls-on-your-swift-server/
The text was updated successfully, but these errors were encountered: