Permalink
Browse files

let's have that openssl error message (e.g. "OpenSSL couldn't read th…

…e public key: error:0906D064:PEM routines:PEM_read_bio:bad base64 decode") when the public key can't be read
  • Loading branch information...
1 parent 5b0aa28 commit ba49865c8372c102d1880ab2d48bb50f084fce39 @billymeltdown billymeltdown committed Nov 20, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 objc/CFobLicVerifier.m
View
@@ -124,7 +124,8 @@ - (BOOL)setPublicKey:(NSString *)pubKey error:(NSError **)err
BOOL result = YES;
if (!self.dsa->pub_key) {
- CFobAssignErrorWithDescriptionAndCode(err, @"Unable to decode key.", CFobErrorCodeCouldNotDecode);
+ NSString *message = [NSString stringWithFormat:@"Unable to decode public key: %s", ERR_error_string(ERR_get_error (), NULL)];
+ CFobAssignErrorWithDescriptionAndCode(err, message, CFobErrorCodeCouldNotDecode);
result = NO;
}

0 comments on commit ba49865

Please sign in to comment.