Type Property
versionString
The OpenSSL version string compiled into this package’s libcrypto.
static var versionString: String { get }
Return Value
A human-readable string beginning with the literal "OpenSSL " followed by the version triple and build date. Use String.hasPrefix(_:) to gate on the major version.
Mentioned In
Discussion
The value comes from OpenSSL_version(OPENSSL_VERSION) and takes the form "OpenSSL x.y.z <day> <Mon> <YYYY>" — for example "OpenSSL 3.6.2 14 Nov 2025". Cross-reference the major/minor/patch triple against the OpenSSL security advisories before cutting a release build; the string is the canonical way to tell which CVE surface the deployed binary carries.
The value is deterministic for a given build of this package: it reflects the libcrypto source vendored via subtree.yaml and is not read from any system-provided OpenSSL library. Across repeated calls, reference identity of the returned String is not guaranteed, but equality (via ==) is.
Note
Because libcrypto is statically linked into the package, this reports the compiled-in version. Applications that swap in a different OpenSSL runtime at load time (not supported by this package) would need to query that runtime directly.