• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Keychain and X509 Certificates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Keychain and X509 Certificates


  • Subject: Keychain and X509 Certificates
  • From: Geoff Sheehan <email@hidden>
  • Date: Tue, 11 Mar 2008 14:27:01 +1000

Hi All

How does one access an X509 certificate in Applescript?

I've tried various versions of this basic code without any success whatsoever.

Cheers
MacP

on getCredentials(serverName)
	tell application "Keychain Scripting"

		unlock with password "abc123"
		set myCert to first key of current keychain whose name is serverName
		tell myCert
			-- first Internet key of myCert whose server is serverName
			set ourCredentials to (account of myCert & ":" & password of myCert)
		end tell
		return ourCredentials
	end tell
end getCredentials

--- shell out to curl to download the accounts listing in XML
on downloadAccounts(credentials)
set curlCommand to "/usr/bin/curl --silent --show-error --user " & quoted form of credentials & " https://digitaldj.net/bigpondusage/bigpondusage.aspx "
set results to do shell script curlCommand
return results
end downloadAccounts


set xmlData to downloadAccounts(getCredentials("digitaldj.net"))

display dialog xmlData
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: Applescript "Excessively" Slow in Leopard
  • Next by Date: Re: AS newbie Filemaker question
  • Previous by thread: Re: Applescript "Excessively" Slow in Leopard
  • Next by thread: Key Code For Option Key
  • Index(es):
    • Date
    • Thread