Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumblekit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2010-09-28 20:51:47 +0400
committerMikkel Krautz <mikkel@krautz.dk>2010-09-28 20:51:47 +0400
commitb6e358ec9886f209b87db467b8122057a4aad8af (patch)
tree31cb046e649664302effb65a78ca3268b8461277 /test
parente3e7591c591e017df5be9fac618226b227c61b6b (diff)
Update MKCertificate commandline utility to print the hexDigest of a certificate.
Diffstat (limited to 'test')
-rw-r--r--test/cert.m11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/cert.m b/test/cert.m
index b0a3890..da495a8 100644
--- a/test/cert.m
+++ b/test/cert.m
@@ -3,5 +3,14 @@
// This is just a temporary tool to test MKCertificate
int main(int argc, char *argv[]) {
- NSLog(@"Nothing to see, yet.");
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSData *data = [NSData dataWithContentsOfFile:@"Certificates.cer"];
+ MKCertificate *cert = [MKCertificate certificateWithCertificate:data privateKey:nil];
+ if ([cert hasCertificate]) {
+ NSLog(@"digest = %@", [cert hexDigest]);
+ }
+
+ [pool release];
+ return 0;
}