diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2017-09-03 20:09:03 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2017-09-03 20:10:03 +0300 |
commit | c2ee0200c70f107a7201680388edcfd7ee0c7b2b (patch) | |
tree | 1c0d0ec1090e35e2973596add607289f3c20b73b /Source | |
parent | da8484d0d277dadb494acd5a8b416c7bb25f5197 (diff) |
MUCertificateViewController: avoid fancy newline formatting of cert digests.
This only looks good on devices that use the traditional iPhone screen width.
Now that we support multiple widths, avoid any fancy formatting.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Classes/MUCertificateViewController.m | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/Classes/MUCertificateViewController.m b/Source/Classes/MUCertificateViewController.m index 354bdaf..89cd7e3 100644 --- a/Source/Classes/MUCertificateViewController.m +++ b/Source/Classes/MUCertificateViewController.m @@ -285,9 +285,7 @@ static const NSUInteger CertificateViewSectionTotal = 4; MKCertificate *cert = [_certificates objectAtIndex:_curIdx]; NSString *hexDigest = [cert hexDigestOfKind:@"sha1"]; if ([indexPath row] == 0 && hexDigest.length == 40) { - cell.textLabel.text = [NSString stringWithFormat:@"%@\n%@", - [MUCertificateController fingerprintFromHexString:[hexDigest substringToIndex:20]], - [MUCertificateController fingerprintFromHexString:[hexDigest substringFromIndex:20]]]; + cell.textLabel.text = hexDigest; cell.textLabel.textColor = [MUColor selectedTextColor]; cell.textLabel.font = [UIFont fontWithName:@"Courier" size:16]; cell.textLabel.numberOfLines = 0; @@ -298,11 +296,7 @@ static const NSUInteger CertificateViewSectionTotal = 4; MKCertificate *cert = [_certificates objectAtIndex:_curIdx]; NSString *hexDigest = [cert hexDigestOfKind:@"sha256"]; if ([indexPath row] == 0 && hexDigest.length == 64) { - cell.textLabel.text = [NSString stringWithFormat:@"%@\n%@\n%@\n%@", - [MUCertificateController fingerprintFromHexString:[hexDigest substringWithRange:NSMakeRange(0, 20)]], - [MUCertificateController fingerprintFromHexString:[hexDigest substringWithRange:NSMakeRange(20, 20)]], - [MUCertificateController fingerprintFromHexString:[hexDigest substringWithRange:NSMakeRange(40, 20)]], - [MUCertificateController fingerprintFromHexString:[hexDigest substringWithRange:NSMakeRange(60, 4)]]]; + cell.textLabel.text = hexDigest; cell.textLabel.textColor = [MUColor selectedTextColor]; cell.textLabel.font = [UIFont fontWithName:@"Courier" size:16]; cell.textLabel.numberOfLines = 0; |