From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ben Key Newsgroups: gmane.emacs.devel Subject: Re: Modifying Emacs to use the Mac OS X Keychain Services Date: Sun, 5 Jun 2011 13:54:20 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001517510e54e51f5f04a4fb846a X-Trace: dough.gmane.org 1307300103 16927 80.91.229.12 (5 Jun 2011 18:55:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Jun 2011 18:55:03 +0000 (UTC) To: Emacs Development , tzz@lifelogs.com, Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 05 20:54:59 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QTITS-0005ca-So for ged-emacs-devel@m.gmane.org; Sun, 05 Jun 2011 20:54:59 +0200 Original-Received: from localhost ([::1]:56386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTITR-0007S7-US for ged-emacs-devel@m.gmane.org; Sun, 05 Jun 2011 14:54:58 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTITD-0007Rl-JL for Emacs-devel@gnu.org; Sun, 05 Jun 2011 14:54:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTITC-0002Ov-JD for Emacs-devel@gnu.org; Sun, 05 Jun 2011 14:54:43 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:40433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTITC-0002Oo-Bo for Emacs-devel@gnu.org; Sun, 05 Jun 2011 14:54:42 -0400 Original-Received: by bwz17 with SMTP id 17so3612670bwz.0 for ; Sun, 05 Jun 2011 11:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=YQ6rjE7gMI/Zij/We6rAFtiia6mQnQjqIkE0YDa0SOw=; b=IcualzMBSjwdNL9VVJ8RPnNGDc5dbMBTwjg2vzJveE8rzlF7KjAEIXS2H8kwj+vk+K g6VQBLuYPdy/pqyINE0p5kvWrI6BGBahGeYlN1SmIFfp1yI8C5AT1BlZlpqVO6SSHbEa 3Z/iVgb0lBEdHC3dh7IgqNPImyICYVeVfS8qY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=w9aXapFWWdN7TpEtxkH5fQ6SXpMB6EvzyKx0DgVd2oqZMmfabWFJeWM4mP0dfc7dPf +PLI+lKgKwVQrM9YXmdAfCqH5jCunughbKLvpTw63kMuNt9rBIoWIzrYHWhn45CXBdY4 sf8hDYSD4kdtQ2J6bEMgvEVEW7uB/+bpMfSVQ= Original-Received: by 10.204.3.193 with SMTP id 1mr4139896bko.72.1307300080196; Sun, 05 Jun 2011 11:54:40 -0700 (PDT) Original-Received: by 10.204.59.212 with HTTP; Sun, 5 Jun 2011 11:54:20 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140209 Archived-At: --001517510e54e51f5f04a4fb846a Content-Type: text/plain; charset=ISO-8859-1 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. --001517510e54e51f5f04a4fb846a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I am still working on this task.=A0 I need s= ome more advice though.

As I mentioned before, I am attempting to ad= d ns-keychain functions that match the secrets.el API as closely as possibl= e.=A0 I am adding a ns-keychain function for each secrets- function that ha= s the same parameters as the secrets- function.=A0 So far in my work, I hav= e been mapping the collection parameter to the serviceName parameter of the= various Keychain Services API functions.=A0 By default, I am using the def= ault Keychain to store the data but adding a user configurable option to al= low another keychain file to be used.

But, after taking another look at auth-source.el, I am wondering if thi= s was the correct design decision.=A0 I am wondering if I should instead be= interpreting the collection parameter as an indication of which keychain f= ile to store the passwords in.=A0 I could interpret the value "default= " for the collection parameter as an indication that the default keych= ain should be used.=A0 I could interpret the value "Login" or &qu= ot;secrets:Login" as an indication that the Login keychain should be u= sed.=A0 Other values for collection parameter could be interpreted as an in= dication that the data should be stored in a file {collection}.keychain in = ~/Library/Keychains.


Which interpretation of the collection parameter i= s the correct one?=A0 I ask because I want to be sure to get this right.
--001517510e54e51f5f04a4fb846a--