Skip to content

Commit 63c116c

Browse files
committed
Removes warnings
1 parent f7716d5 commit 63c116c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Sources/SwiftSecurity/CryptoKit/SecIdentityConvertible.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ public struct Identity: SecIdentityConvertible {
2929
import Security
3030

3131
extension 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 {

Sources/SwiftSecurity/Keychain/Keychain.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)