<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: System Keychain Error Message</title>
	<atom:link href="http://www.animoller.com/2005/11/02/system-keychain-error-message/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/</link>
	<description>One o&#039;clock, two o&#039;clock, three o&#039;clock rock</description>
	<lastBuildDate>Fri, 10 Feb 2012 00:10:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: anon</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15475</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Wed, 28 Dec 2005 07:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15475</guid>
		<description>&lt;p&gt;I just thought I would mention that you can do the same thing with applescript no need for writing c code (and downloading XCode) in this case.&lt;/p&gt;

&lt;p&gt;tell application Keychain Scripting&lt;br /&gt;
set x to keychain System.keychain&lt;br /&gt;
tell x&lt;br /&gt;
set y to every key whose name is Enter your key name here&lt;br /&gt;
password of item 1 of y&lt;br /&gt;
end tell&lt;br /&gt;
end tell&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;The airport key will display in the applescript results tab as a hex encoded string. You can use that as is when trying to access your wireless network. Just select the proper menu item (something like 40/128 bit hex) when you connect.&lt;/p&gt;

&lt;p&gt;Just thought that would be easier.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I just thought I would mention that you can do the same thing with applescript no need for writing c code (and downloading XCode) in this case.</p>
<p>tell application Keychain Scripting<br />
set x to keychain System.keychain<br />
tell x<br />
set y to every key whose name is Enter your key name here<br />
password of item 1 of y<br />
end tell<br />
end tell</p>
<p>The airport key will display in the applescript results tab as a hex encoded string. You can use that as is when trying to access your wireless network. Just select the proper menu item (something like 40/128 bit hex) when you connect.</p>
<p>Just thought that would be easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avram</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15474</link>
		<dc:creator>Avram</dc:creator>
		<pubDate>Sun, 18 Dec 2005 20:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15474</guid>
		<description>Hello again everyone, I figured out how to complie the above.&lt;br /&gt;
&lt;br /&gt;
In XCode, under New Project, in the Command Line Utility section, choose Standard Tool.&lt;br /&gt;
&lt;br /&gt;
Delete the default code, and replace with the above. &lt;br /&gt;
&lt;br /&gt;
Then search and replace all the curly quotes with straight quotes.&lt;br /&gt;
&lt;br /&gt;
fix the #include lines by surrounding the above indicated strings (System/...) with a less-than sign, and a greater-than sign.&lt;br /&gt;
&lt;br /&gt;
As indicate also above, right click on the project icon (the blue page at the top right of the Project window), and select. Add-&gt;External Frameworks. Then select Security.framework.&lt;br /&gt;
&lt;br /&gt;
Then go into the main() function, and replace the value of keyname with the real name of the keychain you want to read.&lt;br /&gt;
&lt;br /&gt;
Then click build and run.&lt;br /&gt;
&lt;br /&gt;
Note that if it can&#8217;t find the key you are looking for, it will crash b/c even though it tells you the status, it doesn&#8217;t check to see if the call failed before it tries to read the result.</description>
		<content:encoded><![CDATA[<p>Hello again everyone, I figured out how to complie the above.</p>
<p>In XCode, under New Project, in the Command Line Utility section, choose Standard Tool.</p>
<p>Delete the default code, and replace with the above. </p>
<p>Then search and replace all the curly quotes with straight quotes.</p>
<p>fix the #include lines by surrounding the above indicated strings (System/&#8230;) with a less-than sign, and a greater-than sign.</p>
<p>As indicate also above, right click on the project icon (the blue page at the top right of the Project window), and select. Add->External Frameworks. Then select Security.framework.</p>
<p>Then go into the main() function, and replace the value of keyname with the real name of the keychain you want to read.</p>
<p>Then click build and run.</p>
<p>Note that if it can&#8217;t find the key you are looking for, it will crash b/c even though it tells you the status, it doesn&#8217;t check to see if the call failed before it tries to read the result.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avram</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15473</link>
		<dc:creator>Avram</dc:creator>
		<pubDate>Sun, 18 Dec 2005 19:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15473</guid>
		<description>Can anybody tell me the details on how to set up the X Code project for the above? Is it a Cocoa app? If it&#8217;s a command line utility, what kind is it?</description>
		<content:encoded><![CDATA[<p>Can anybody tell me the details on how to set up the X Code project for the above? Is it a Cocoa app? If it&#8217;s a command line utility, what kind is it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keavy</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15472</link>
		<dc:creator>keavy</dc:creator>
		<pubDate>Wed, 07 Dec 2005 13:38:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15472</guid>
		<description>cheers ani, that just helped me too!</description>
		<content:encoded><![CDATA[<p>cheers ani, that just helped me too!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: animoller</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15471</link>
		<dc:creator>animoller</dc:creator>
		<pubDate>Wed, 30 Nov 2005 18:27:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15471</guid>
		<description>Weird, I haven&#8217;t had that problem, and have had no problems at all since doing the fix in my post.</description>
		<content:encoded><![CDATA[<p>Weird, I haven&#8217;t had that problem, and have had no problems at all since doing the fix in my post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian M. Cepel</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15470</link>
		<dc:creator>Christian M. Cepel</dc:creator>
		<pubDate>Wed, 30 Nov 2005 18:24:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15470</guid>
		<description>People have stated in the comments that they&#8217;ve avoiding this or that update due to buggyness.&lt;br /&gt;
&lt;br /&gt;
Just so you know, I&#8217;ve had this problem with MacOS 10.3, so it has nothing to do with the update.&lt;br /&gt;
&lt;br /&gt;
I just deleted the system keychain in the utility and when it recreated it after reboot, it had the same password as my login keychain.&lt;br /&gt;
&lt;br /&gt;
What I want to know is how to get the passwords to store in my login keychain and NEVER in system.  I&#8217;m the only user, so I don&#8217;t care if &#8216;other users&#8217; have access to the wireless.&lt;br /&gt;
&lt;br /&gt;
I&#8217;ve had the most horrific trouble with the mac just not finding networks, or not searching one&#8217;s I&#8217;ve created and finding them, or duplicating a key already in my login keychain.  If it&#8217;s in my login keychain, it find the network and connects.  If it&#8217;s not, it won&#8217;t, and it won&#8217;t let me &#8216;create&#8217; an existing network.  It&#8217;s a daily pain.</description>
		<content:encoded><![CDATA[<p>People have stated in the comments that they&#8217;ve avoiding this or that update due to buggyness.</p>
<p>Just so you know, I&#8217;ve had this problem with MacOS 10.3, so it has nothing to do with the update.</p>
<p>I just deleted the system keychain in the utility and when it recreated it after reboot, it had the same password as my login keychain.</p>
<p>What I want to know is how to get the passwords to store in my login keychain and NEVER in system.  I&#8217;m the only user, so I don&#8217;t care if &#8216;other users&#8217; have access to the wireless.</p>
<p>I&#8217;ve had the most horrific trouble with the mac just not finding networks, or not searching one&#8217;s I&#8217;ve created and finding them, or duplicating a key already in my login keychain.  If it&#8217;s in my login keychain, it find the network and connects.  If it&#8217;s not, it won&#8217;t, and it won&#8217;t let me &#8216;create&#8217; an existing network.  It&#8217;s a daily pain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eljakim Schrijvers</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15469</link>
		<dc:creator>Eljakim Schrijvers</dc:creator>
		<pubDate>Wed, 09 Nov 2005 11:58:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15469</guid>
		<description>the includes are:&lt;br /&gt;
Security/SecKeychain.h&lt;br /&gt;
Security/SecKeychainSearch.h&lt;br /&gt;
Security/SecKeychainItem.h&lt;br /&gt;
&lt;br /&gt;
Make sure to include the Security Framework in XCode under External Frameworks; otherwise it won&#8217;t link.</description>
		<content:encoded><![CDATA[<p>the includes are:<br />
Security/SecKeychain.h<br />
Security/SecKeychainSearch.h<br />
Security/SecKeychainItem.h</p>
<p>Make sure to include the Security Framework in XCode under External Frameworks; otherwise it won&#8217;t link.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toby</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15468</link>
		<dc:creator>Toby</dc:creator>
		<pubDate>Tue, 08 Nov 2005 22:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15468</guid>
		<description>I too had this Keychain problem after updating to 10.4.3. Eljakim, unfortunately the message board software mangled your #includes, at least&#8230; any chance of a url for your source?</description>
		<content:encoded><![CDATA[<p>I too had this Keychain problem after updating to 10.4.3. Eljakim, unfortunately the message board software mangled your #includes, at least&#8230; any chance of a url for your source?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eljakim Schrijvers</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15467</link>
		<dc:creator>Eljakim Schrijvers</dc:creator>
		<pubDate>Mon, 07 Nov 2005 00:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15467</guid>
		<description>The above solution solves the problem. It does, however, not tell you what your stored passwords are. I have forgotten my WEP password at home, but I need it for another gadget. I could of course just reset it.&lt;br /&gt;
&lt;br /&gt;
Anyway, the following program reads a key from the System keychain. Please note that you should press &#8220;allow ONCE&#8221; when the system asks you.&lt;br /&gt;
&lt;br /&gt;
// (c) 2005 Eljakim Schrijvers&lt;br /&gt;
// NO WARRANTY WHATSOEVER &#8211; USE AT YOUR OWN RISK&lt;br /&gt;
&lt;br /&gt;
#include &lt;br /&gt;
#include &lt;br /&gt;
#include &lt;br /&gt;
&lt;br /&gt;
void printSecStatusError(char *prefix,OSStatus status) {&lt;br /&gt;
printf(&#8221;%s: (%d)&#8221;,prefix, status);&lt;br /&gt;
switch(status) {&lt;br /&gt;
case noErr: printf(&#8220;No Error&#8221;); break;&lt;br /&gt;
case errSecNoSuchKeychain: printf(&#8220;No such keychain&#8221;); break;&lt;br /&gt;
case errSecItemNotFound: printf(&#8220;The item cannot be found&#8221;); break;&lt;br /&gt;
default: printf(&#8220;An error has occurred&#8221;);&lt;br /&gt;
}&lt;br /&gt;
printf(&#8220;n&#8221;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
char *passwordData = nil;&lt;br /&gt;
char *keychain = &#8221;/Library/Keychains/System.keychain&#8221;; &lt;br /&gt;
// char *keychain = &#8220;login.keychain&#8221;; // uncomment to use your login keychain&lt;br /&gt;
char *keyname = &#8220;Eljakim&#8221;;  // what key are you looking at?&lt;br /&gt;
UInt32 passwordLength = nil;&lt;br /&gt;
SecKeychainItemRef itemRef = nil;&lt;br /&gt;
SecKeychainRef keychainRef = nil;&lt;br /&gt;
SecKeychainStatus keychainStatus = nil;&lt;br /&gt;
OSStatus status;&lt;br /&gt;
status = SecKeychainOpen(keychain,&amp;keychainRef);&lt;br /&gt;
printSecStatusError(&#8220;Open&#8221;,status);&lt;br /&gt;
status = SecKeychainGetStatus(keychainRef, &amp;keychainStatus);&lt;br /&gt;
printSecStatusError(&#8220;GetStatus&#8221;,status);&lt;br /&gt;
status = SecKeychainFindGenericPassword ( keychainRef,0,&#8221;&#8221;,strlen(keyname),keyname,&amp;passwordLength,&amp;passwordData,&amp;itemRef );&lt;br /&gt;
printSecStatusError(&#8220;FindGenericPassword&#8221;,status);&lt;br /&gt;
passwordData[passwordLength]=0;&lt;br /&gt;
printf(&#8220;Password: (%d) %sn&#8221;,passwordLength,passwordData);&lt;br /&gt;
return 0;&lt;br /&gt;
}</description>
		<content:encoded><![CDATA[<p>The above solution solves the problem. It does, however, not tell you what your stored passwords are. I have forgotten my WEP password at home, but I need it for another gadget. I could of course just reset it.</p>
<p>Anyway, the following program reads a key from the System keychain. Please note that you should press &#8220;allow ONCE&#8221; when the system asks you.</p>
<p>// (c) 2005 Eljakim Schrijvers<br />
// NO WARRANTY WHATSOEVER &#8211; USE AT YOUR OWN RISK</p>
<p>#include <br />
#include <br />
#include </p>
<p>void printSecStatusError(char *prefix,OSStatus status) {<br />
printf(&#8221;%s: (%d)&#8221;,prefix, status);<br />
switch(status) {<br />
case noErr: printf(&#8220;No Error&#8221;); break;<br />
case errSecNoSuchKeychain: printf(&#8220;No such keychain&#8221;); break;<br />
case errSecItemNotFound: printf(&#8220;The item cannot be found&#8221;); break;<br />
default: printf(&#8220;An error has occurred&#8221;);<br />
}<br />
printf(&#8220;n&#8221;);<br />
}</p>
<p>int main() {<br />
char *passwordData = nil;<br />
char *keychain = &#8221;/Library/Keychains/System.keychain&#8221;; <br />
// char *keychain = &#8220;login.keychain&#8221;; // uncomment to use your login keychain<br />
char *keyname = &#8220;Eljakim&#8221;;  // what key are you looking at?<br />
UInt32 passwordLength = nil;<br />
SecKeychainItemRef itemRef = nil;<br />
SecKeychainRef keychainRef = nil;<br />
SecKeychainStatus keychainStatus = nil;<br />
OSStatus status;<br />
status = SecKeychainOpen(keychain,&#38;keychainRef);<br />
printSecStatusError(&#8220;Open&#8221;,status);<br />
status = SecKeychainGetStatus(keychainRef, &#38;keychainStatus);<br />
printSecStatusError(&#8220;GetStatus&#8221;,status);<br />
status = SecKeychainFindGenericPassword ( keychainRef,0,&#8221;&#8221;,strlen(keyname),keyname,&#38;passwordLength,&#38;passwordData,&#38;itemRef );<br />
printSecStatusError(&#8220;FindGenericPassword&#8221;,status);<br />
passwordData[passwordLength]=0;<br />
printf(&#8220;Password: (%d) %sn&#8221;,passwordLength,passwordData);<br />
return 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Abbott</title>
		<link>http://www.animoller.com/2005/11/02/system-keychain-error-message/comment-page-1/#comment-15466</link>
		<dc:creator>Jon Abbott</dc:creator>
		<pubDate>Sun, 06 Nov 2005 02:14:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.animoller.com/2005/11/02/system-keychain-error-message/#comment-15466</guid>
		<description>Hooray, it works!  You are a genius.  Best of luck on your trans-continental move!</description>
		<content:encoded><![CDATA[<p>Hooray, it works!  You are a genius.  Best of luck on your trans-continental move!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

