File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ public struct Identity: SecIdentityConvertible {
2929import Security
3030
3131extension Identity {
32- public init ? < T: SecCertificateConvertible > ( certificate: T ) throws {
32+ public init ? < T: SecCertificateConvertible > ( certificate: T ) {
3333 var identityRef : SecIdentity ?
34- try SecIdentityCreateWithCertificate ( nil , certificate. rawRepresentation, & identityRef)
34+ SecIdentityCreateWithCertificate ( nil , certificate. rawRepresentation, & identityRef)
3535 if let identityRef {
3636 self . rawRepresentation = identityRef
3737 } else {
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ extension Keychain: SecItemStore {
6161 query. class = . certificate
6262 switch try retrieve ( returnType, query: query, authenticationContext: authenticationContext) {
6363 case . reference( let reference) :
64- let certificate = try Certificate ( rawRepresentation: reference as! SecCertificate )
65- if let identity = try Identity ( certificate: certificate) {
64+ let certificate = Certificate ( rawRepresentation: reference as! SecCertificate )
65+ if let identity = Identity ( certificate: certificate) {
6666 return . reference( identity. rawRepresentation)
6767 } else {
6868 return nil
@@ -409,7 +409,7 @@ extension Keychain: SecIdentityStore {
409409 return nil
410410 }
411411
412- return try T ( rawRepresentation: reference as! SecIdentity )
412+ return T ( rawRepresentation: reference as! SecIdentity )
413413 }
414414
415415 @discardableResult
You can’t perform that action at this time.
0 commit comments