From 97376d86151ac7d66aa360248c7585b8633d689a Mon Sep 17 00:00:00 2001 From: lianglibao Date: Sun, 18 Feb 2024 14:08:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(bug):=20=E4=BF=AE=E5=A4=8D=E9=A2=84?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E8=AF=81=E4=B9=A6=E6=95=B0=E6=8D=AE=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SmartPush/PushViewController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SmartPush/PushViewController.m b/SmartPush/PushViewController.m index cb84089..601668a 100644 --- a/SmartPush/PushViewController.m +++ b/SmartPush/PushViewController.m @@ -220,7 +220,8 @@ - (void)prepareCerData{ } // Create identity. - _connectResult = SecIdentityCreateWithCertificate(_keychain, _currentSec.certificateRef, &_identity); + SecCertificateRef certificateRef = _currentSec.certificateRef; + _connectResult = SecIdentityCreateWithCertificate(NULL, certificateRef, &_identity); // NSLog(@"SecIdentityCreateWithCertificate(): %d", result); if(_connectResult != errSecSuccess ){ [self log:[NSString stringWithFormat:@"SSL端点域名不能被设置 %d",_connectResult] warning:YES];