(Objective-C) Example: Crypt2.GetSignatureSigningTimeStr method
Demonstrates how to call the GetSignatureSigningTimeStr method.
#import <CkoCrypt2.h>
CkoCrypt2 *crypt = [[CkoCrypt2 alloc] init];
BOOL success = [crypt VerifyP7M: @"qa_data/cades/CAdES-T/Signature-C-T-1.p7m" destPath: @"qa_output/out.dat"];
if (success == NO) {
NSLog(@"%@",crypt.LastErrorText);
return;
}
int numSigners = [crypt.NumSignerCerts intValue];
NSLog(@"%@%d",@"Num Signers = ",numSigners);
int i = 0;
while (i < numSigners) {
if ([crypt HasSignatureSigningTime: [NSNumber numberWithInt: i]] == YES) {
NSLog(@"%d%@%@",i + 1,@": ",[crypt GetSignatureSigningTimeStr: [NSNumber numberWithInt: i]]);
}
else {
NSLog(@"%d%@",i + 1,@": has no signing time.");
}
i = i + 1;
}
// Sample output:
// Num Signers = 1
// 1: Sun, 03 Dec 2013 06:57:41 GMT
|