Enumeration
OpenSSLError
The unified error type thrown by every OpenSSL Swift API.
enum OpenSSLError
Mentioned In
Overview
OpenSSLError is the single failure surface for this module. Each case carries a human-readable String that describes the specific failure condition; the string is surfaced verbatim by errorDescription to Foundation’s LocalizedError machinery, so it can be displayed in logs, alerts, or error UI without further processing.
Instances are produced exclusively by this package’s Swift code — no raw ERR_get_error() C values bleed through. Equality compares the case and the associated String, which is convenient for tests but means the String contents are part of the observable API contract for those tests.
Note
Some cases are reserved for future API surface (OpenSSLError.signingFailed(_:), OpenSSLError.verificationFailed(_:), OpenSSLError.invalidSignature(_:)) and are not produced by any code path shipping today. They exist so adding the corresponding operations later is non-breaking for consumers who already pattern- match on the full case list.
See Also
init(pemRepresentation:), init(rawValue:), Foundation LocalizedError
Topics
Enumeration Cases