Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This project derives content heavily from iOS Certificate, Key, and Trust Programming guide. It's primary purpose is to give the user the ability to quickly import/export RSA private keys from the keychain to the console.
Branch: master
Pull request Compare This branch is 12 commits ahead, 3 commits behind kuapay:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
CertificateKeyAndTrust.xcodeproj
CertificateKeyAndTrust
.DS_Store
README

README

This iOS 4.3 project was created in Xcode 4.  The most important class in this project is "Crypto".  It contains the following functions in its public interface:

These functions are slightly modified (fixing typos) from functions given in Apple's Certificate, Key, and Trust Programming Guide:

+(void)generateKeyPairWithPublicTag:(NSString *)publicTagString privateTag:(NSString *)privateTagString;

The following methods are designed to import PEM formatted RSA keys from strings and place in your keychain (slightly modified from these wonderful resources: http://blog.wingsofhermes.org/?p=42 and http://blog.wingsofhermes.org/?p=75):

+(void)setPrivateKey:(NSString *)pemPrivateKeyString tag:(NSString *)tag;
+(void)setPublicKey:(NSString *)pemPublicKeyString tag:(NSString *)tag;

// These methods are here to export RSA keys from keychain to strings in PEM format (Also taken from http://blog.wingsofhermes.org/?p=42 and http://blog.wingsofhermes.org/?p=75):

+(NSString *)getX509FormattedPublicKey:(NSString *)tag;
+(NSString *)getPEMFormattedPrivateKey:(NSString *)tag;

// Method to remove key from keychain:

+(void)removeKey:(NSString *)tag;

// See ViewController viewDidLoad method for example usage
Something went wrong with that request. Please try again.