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

github.com/mumble-voip/mumble-iphoneos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2017-09-03 20:09:03 +0300
committerMikkel Krautz <mikkel@krautz.dk>2017-09-03 20:10:03 +0300
commitc2ee0200c70f107a7201680388edcfd7ee0c7b2b (patch)
tree1c0d0ec1090e35e2973596add607289f3c20b73b
parentda8484d0d277dadb494acd5a8b416c7bb25f5197 (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.
-rw-r--r--Source/Classes/MUCertificateViewController.m10
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;