Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use unArmor

  • Loading branch information...
commit c44f5f40d00e559bcf880fcbdcc155eae251c313 1 parent 69f7c5f
@Mento Mento authored
2  Dependencies/GPGTools_Core
@@ -1 +1 @@
-Subproject commit b016a277fa646d9f1206089c14583f8969f6a2a2
+Subproject commit bb5ba95ac3479fe8717882733b81e386565ca4b8
View
11 Source/GPGController.m
@@ -456,6 +456,7 @@ - (NSData *)decryptData:(NSData *)data {
@try {
[self operationDidStart];
+ data = [GPGPacket unArmor:data];
gpgTask = [GPGTask gpgTask];
[self addArgumentsForOptions];
@@ -488,6 +489,7 @@ - (NSArray *)verifySignature:(NSData *)signatureData originalData:(NSData *)orig
@try {
[self operationDidStart];
+ signatureData = [GPGPacket unArmor:signatureData];
gpgTask = [GPGTask gpgTask];
[self addArgumentsForOptions];
@@ -980,25 +982,22 @@ - (NSString *)importFromData:(NSData *)data fullImport:(BOOL)fullImport {
return nil;
}
@try {
+ data = [GPGPacket unArmor:data];
NSSet *keys = [self keysInExportedData:data];
if ([keys count] == 0) {
//Get keys from RTF data.
NSData *data2 = [[[[[NSAttributedString alloc] initWithData:data options:nil documentAttributes:nil error:nil] autorelease] string] dataUsingEncoding:NSUTF8StringEncoding];
if (data2) {
+ data2 = [GPGPacket unArmor:data2];
keys = [self keysInExportedData:data2];
if ([keys count] > 0) {
data = data2;
}
}
}
- /*if ([keys count] == 0) {
- NSData *data2 = [GPGPacket repairPacketData:data];
- }*/
-
-
- //TODO: Uncomment the following lines when keysInExportedData: fully work!
+ //TODO: Uncomment the following lines when keysInExportedData: fully works!
/*if ([keys count] == 0) {
[NSException raise:NSInvalidArgumentException format:@"No keys to import!"];
}*/
View
1  Source/GPGPacket.m
@@ -177,7 +177,6 @@ - (id)initWithBytes:(const uint8_t *)bytes length:(NSUInteger)dataLength nextPac
default:
length = dataLength - 1;
break;
- //abortInit;
}
}
canRead(length);
Please sign in to comment.
Something went wrong with that request. Please try again.