robbiehanson / CocoaHTTPServer

A small, lightweight, embeddable HTTP server for Mac OS X or iOS applications
Other
5.6k stars 1.31k forks source link

Add identity to keychain - Trust always #139

Open ashrafulkarim opened 9 years ago

ashrafulkarim commented 9 years ago

Hi, Is it possible to add/import the identity (private key and certificate) used in SecureHttpServer to the keychain "trusted as always" so that Safari or Chrome will not complain when using https://localhost ?

And is it possible to change the deprecated API SecKeychainItemImport to use the latest API SecItemAdd() for the same above purpose?

By using SecTrustSettingsSetTrustSettings, I found it possible to change the trust settings. But it is for the current login user. How can it be set System wide, for all user?