emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netrc field encryption in auth-source


From: Ted Zlatanov
Subject: Re: netrc field encryption in auth-source
Date: Wed, 15 Jun 2011 22:49:40 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

On Wed, 15 Jun 2011 18:20:35 +0200 Lars Magne Ingebrigtsen <address@hidden> 
wrote: 

LMI> Ted Zlatanov <address@hidden> writes:
>> If you want this done by Wednesday (including the creation code), please
>> let me know if my code looked OK and if you find the interface
>> acceptable.  I won't be able to do it in time otherwise.

LMI> So please apply and I'll get started with the smtpmail.el stuff.  :-)

Applied.  See `auth-source-save-secrets' for the only user-controllable
piece of the code.  It should really be using the EPA functions directly
instead of relying on the file handlers but I wasn't able to get that
working.  Maybe Daiki Ueno could give me a hint.  Or I will get to it
eventually...

I think I DTRT with `unwind-protect' and `delete-file' to ensure the
temporary stashfile is always cleaned out.

Test with this netrc entry:

machine supertest password 
gpg:jA0EAwMC2tUEaZgM7A5gyWM/owySdCOS/cjoFCuf8LI1d1kYX7z6cjsNkakM04u1geh/iesqyH3XQFI+SEVLb/oEC/EoQ0LIgRRoBiLyu9XZWN1ytY7MQxpPZniFz13oGV4/Dwl8yrP3Hba5LfQpHy2FZRM=

(funcall (plist-get (nth 0 (auth-source-search :host "supertest")) :secret))

which, with passphrase "123", should give you "hellfdhfhdkjfhskdjfhkdj 
fsdhkjfdshk fdshkj fdsfsdhkj fsdhkj fdshkj fd k fhdjk hjfsdkhjfd sk kfsd 
khfdskhjfskd  kfsdkhjfsdkhjfsdkhjfsdkhfdo"[1]

Thanks
Ted

[1] "Good morning" in Icelandic, according to Wikipedia.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]