Re: Modifying Emacs to use the Mac OS X Keychain Services
From:
Ben Key
Subject:
Re: Modifying Emacs to use the Mac OS X Keychain Services
Date:
Sun, 5 Jun 2011 13:54:20 -0500
Hello,
I am still working on this task. I need some more advice though.
As I mentioned before, I am attempting to add ns-keychain functions that match the secrets.el API as closely as possible. I am adding a ns-keychain function for each secrets- function that has the same parameters as the secrets- function. So far in my work, I have been mapping the collection parameter to the serviceName parameter of the various Keychain Services API functions. By default, I am using the default Keychain to store the data but adding a user configurable option to allow another keychain file to be used.
But, after taking another look at auth-source.el, I am wondering if this was the correct design decision. I am wondering if I should instead be interpreting the collection parameter as an indication of which keychain file to store the passwords in. I could interpret the value "default" for the collection parameter as an indication that the default keychain should be used. I could interpret the value "Login" or "secrets:Login" as an indication that the Login keychain should be used. Other values for collection parameter could be interpreted as an indication that the data should be stored in a file {collection}.keychain in ~/Library/Keychains.
Which interpretation of the collection parameter is the correct one? I ask because I want to be sure to get this right.