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: Mon, 6 Jun 2011 22:34:06 -0500 Message-ID: References: <8739jmso4c.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=000325554dbea0c80004a516e507 X-Trace: dough.gmane.org 1307417692 5560 80.91.229.12 (7 Jun 2011 03:34:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Jun 2011 03:34:52 +0000 (UTC) Cc: tzz@lifelogs.com, Emacs Development To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 07 05:34:45 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 1QTn41-0002wp-6t for ged-emacs-devel@m.gmane.org; Tue, 07 Jun 2011 05:34:45 +0200 Original-Received: from localhost ([::1]:55739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTn40-0005Bb-4W for ged-emacs-devel@m.gmane.org; Mon, 06 Jun 2011 23:34:44 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTn3m-0005BQ-8V for Emacs-devel@gnu.org; Mon, 06 Jun 2011 23:34:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTn3l-0000Np-CZ for Emacs-devel@gnu.org; Mon, 06 Jun 2011 23:34:30 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:54632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTn3k-0000NO-UB for Emacs-devel@gnu.org; Mon, 06 Jun 2011 23:34:29 -0400 Original-Received: by bwz17 with SMTP id 17so4911016bwz.0 for ; Mon, 06 Jun 2011 20:34:27 -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:cc:content-type; bh=PCN2GKDKskxE49kx4jCPwApMd4/I84i0EIjm1WE+HMU=; b=WUYGKF6+g/jR/7EvF4LMsmwZDO0I+VrvE7YA+nGUX1aD/AFsM4Qmyv/bvouZzseFye sZZ9OsV9sNUOpCb0FRppXToqtrvamClGqKv1Cve9eI9nbUBTPg3rvlKjCw6vnIqiw/ZP 22YG5LmS4IDiaN2ofN+4cr73fQ9yy9t6OIeGc= 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 :cc:content-type; b=Qhzs2SfpGnqTIWmvesmDjl9ONJOZr0UgIFbT6//fvlGc7c4uvBpo19MFBVZAcp/0Xr FhzTuk4brTtWEV5tW7Dt2YgM26YiE8JzY6xHXz7h9z3K7GFQtYoyZG7MRgfEr8sJ8YqB 33GnVnc/yrkraqpnKjyFuK7aSbMbIN+XGvwSk= Original-Received: by 10.204.26.200 with SMTP id f8mr676909bkc.99.1307417667225; Mon, 06 Jun 2011 20:34:27 -0700 (PDT) Original-Received: by 10.204.59.212 with HTTP; Mon, 6 Jun 2011 20:34:06 -0700 (PDT) In-Reply-To: <8739jmso4c.fsf@gmx.de> 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:140255 Archived-At: --000325554dbea0c80004a516e507 Content-Type: text/plain; charset=ISO-8859-1 Hello Michael, I am not certain which interpretation of the collection parameter you are advocating. It sounds like you are suggesting that I use the collection parameter to specify which keychain file to store the data in but I am not certain. In this implementation I could interpret the value "default" to mean the default keychain (use nil for the keychain parameter for the various Keychain Services API functions) and the value "login" or "secrets:Login" to mean the login keychain (which is found at ~/Library/Keychains/login.keychain). Note that the various Keychain Services API functions accept a keychain parameter. This parameter can be nil to indicate that the default keychain should be used or a keychain reference opened by either SecKeychainOpen or SecKeychainCreate. Both SecKeychainOpen or SecKeychainCreate provide a reference to a keychain file specified by a full path and file name. As a result, in this implementation if the collection parameter is "login" or "secrets:Login" I would use SecKeychainOpen to open the keychain file keychain file ~/Library/Keychains/login.keychain and use the returned keychain reference. There is no direct equivalent to the session keychain in Mac OS X. I suppose I could make an Emacs session keychain by using the file ~/Library/Keychains/emacs-session.keychain and using the function SecKeychainDelete to clear the keychain file on first use. Is this the interpretation of the collection parameter that I should use? If so, just let me know. --000325554dbea0c80004a516e507 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Michael,

I am not certain which interpretatio= n of the collection parameter you are advocating.=A0 It sounds like you are= suggesting that I use the collection parameter to specify which keychain f= ile to store the data in but I am not certain.

In this implementation I could interpret the value "default" = to mean the default keychain (use nil for the keychain parameter for the va= rious Keychain Services API functions) and the value "login" or &= quot;secrets:Login" to mean the login keychain (which is found at ~/Li= brary/Keychains/login.keychain).

Note that the various Keychain Services API functions accept a keychain= parameter.=A0 This parameter can be nil to indicate that the default keych= ain should be used or a keychain reference opened by either SecKeychainOpen= or SecKeychainCreate.=A0 Both SecKeychainOpen or SecKeychainCreate provide= a reference to a keychain file specified by a full path and file name.=A0 = As a result, in this implementation if the collection parameter is "lo= gin" or "secrets:Login" I would use SecKeychainOpen to open = the keychain file keychain file ~/Library/Keychains/login.keychain and use = the returned keychain reference.

There is no direct equivalent to the session keychain in Mac OS X.=A0 I= suppose I could make an Emacs session keychain by using the file ~/Library= /Keychains/emacs-session.keychain and using the function SecKeychainDelete = to clear the keychain file on first use.

Is this the interpretation of the collection parameter that I should us= e?=A0 If so, just let me know.


--000325554dbea0c80004a516e507--