From e355809b5831b6b35b4368f6a2019b2867b8c208 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Mon, 18 May 2026 19:22:46 -0400 Subject: [PATCH] Fix OpenSSL 3.x EC key parsing in Fastfile Fastlane 2.234.0 uses OpenSSL::PKey::EC.new which fails with "invalid curve name" on PKCS#8 keys under OpenSSL 3.x. Add monkey-patch to fall back to OpenSSL::PKey.read which handles both formats. --- mobile/fastlane/Fastfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mobile/fastlane/Fastfile b/mobile/fastlane/Fastfile index 74a86d2..0bd6c98 100644 --- a/mobile/fastlane/Fastfile +++ b/mobile/fastlane/Fastfile @@ -1,3 +1,23 @@ +require 'openssl' + +# Workaround: fastlane 2.234.0 uses OpenSSL::PKey::EC.new which fails on +# PKCS#8 keys with OpenSSL 3.x ("invalid curve name"). Fallback to PKey.read. +module OpenSSL + module PKey + class EC + class << self + alias_method :_orig_new, :new + def new(*args) + _orig_new(*args) + rescue OpenSSL::PKey::ECError + raise unless args.length == 1 && args[0].is_a?(String) + OpenSSL::PKey.read(args[0]) + end + end + end + end +end + default_platform(:ios) platform :ios do