Skip to content

Update to swift-crypto 2.4.1 #6431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
// dependency version changes here with those projects.
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.2.2")),
.package(url: "https://github.com/apple/swift-driver.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/apple/swift-crypto.git", exact: "2.4.0"),
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMinor(from: "2.4.1")),
.package(url: "https://github.com/apple/swift-system.git", .upToNextMinor(from: "1.1.1")),
.package(url: "https://github.com/apple/swift-collections.git", .upToNextMinor(from: "1.0.1")),
.package(url: "https://github.com/apple/swift-certificates.git", .upToNextMinor(from: "0.1.0")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ final class BoringSSLCertificate {
return try self.keyType(of: key)
}

private func keyType(of key: UnsafeMutablePointer<EVP_PKEY>) throws -> KeyType {
private func keyType(of key: OpaquePointer) throws -> KeyType {
let algorithm = CCryptoBoringSSL_EVP_PKEY_id(key)

switch algorithm {
Expand Down
2 changes: 1 addition & 1 deletion Sources/PackageCollectionsSigning/Key/Key+RSA.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ final class BoringSSLRSAPublicKey: PublicKey, BoringSSLKey {
/// `data` should be in the PKCS #1 format
init(data: Data) throws {
let bytes = data.copyBytes()
let key = try bytes.withUnsafeBufferPointer { (ptr: UnsafeBufferPointer<UInt8>) throws -> UnsafeMutablePointer<EVP_PKEY> in
let key = try bytes.withUnsafeBufferPointer { ptr in
var pointer = ptr.baseAddress
guard let key = CCryptoBoringSSL_d2i_PublicKey(EVP_PKEY_RSA, nil, &pointer, numericCast(data.count)) else {
throw BoringSSLKeyError.failedToLoadKeyFromBytes
Expand Down