begin Match::Encryption::MatchFileEncryption.new.send(method_name, file_path: input_file, password: password, output_path: output_file) rescue => e puts("ERROR #{method_name}ing. [#{e}]. Check your password") usage end
begin Match::Encryption::MatchFileEncryption.new.send(method_name, file_path: input_file, password: password, output_path: output_file) rescue => e UI.user_error!("ERROR #{method_name}ing. [#{e}]. Check your password") end end end
# Extract Subject Alternative Names if present ext = cert.extensions.find { |e| e.oid == 'subjectAltName' } info[:subject_alt_names] = ext.value if ext
return info rescueOpenSSL::X509::CertificateError => e UI.user_error!("Failed to read certificate: #{e.message}") rescue => e UI.user_error!("An error occurred: #{e.message}") end end
defself.parse_subject(subject) subject.to_a.each_with_object({}) do |field, hash| hash[field[0]] = field[1] end end
defself.extract_team_id(subject) subject['OU'] || "Not found" end
defself.extract_description(subject) cn = subject['CN'] || "" o = subject['O'] || "" "#{cn}#{o.empty? ? '' : " (#{o})"}" end end