Error when running via ssh on macOS
In SSLService.swift, the line
status = SecPKCS12Import(p12Data, options, &items)
will return status == 0 and items as an empty array if I ssh into a macOS system and exercise it there. If I log in via Screen Sharing an do the same exercise, it runs well.
I suspect this has to do with the keychain services not being available. I submitted a PR to make the error nicer (it resulted in an index-out-of-bounds before), but I don't know what to replace SecPKCS12Import with that doesn't require keychain services
Work-around is to call
security unlock-keychain security list-keychain -s "jenkins-test"
before using SSLService.
I'll take a look. Thanks.
@niklassaers I'm encountering similar issue. It works if I run my code in Xcode but doesn't work if I run it from the shell, which is what I need. Can you tell me more about the keychain? Any information will help.
When I run it in Xcode, I get a popup to give access. Not sure how I can bypass this.
It do have several Keychain when I run security list-keychain, but it seems like I need something else.