Skip to content

Commit

Permalink
Fixes throwing error within SecCertificateConvertible
Browse files Browse the repository at this point in the history
  • Loading branch information
dm-zharov committed May 23, 2024
1 parent a10fdca commit c26f18a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public struct Certificate: SecCertificateConvertible {
return Data(bytes)
}
guard let certificateRef = SecCertificateCreateWithData(nil, derRepresentation as CFData) else {
throw SwiftSecurityError.pkcs12VerifyFailure
throw SwiftSecurityError.invalidParameter
}
self.rawRepresentation = certificateRef
}
Expand All @@ -84,5 +84,4 @@ public struct Certificate: SecCertificateConvertible {
self.rawRepresentation = certificateRef
}
}

#endif

0 comments on commit c26f18a

Please sign in to comment.