{"record":{"id":"cf0bf43ba0c557ae","repo":"puppetlabs/puppet","slug":"unsupported-key-type","errorCode":null,"errorMessage":"Unsupported key '%{type}'","messagePattern":"Unsupported key '%(.+?)'","errorType":"exception","errorClass":"Puppet::SSL::SSLError","httpStatus":null,"severity":"error","filePath":"lib/puppet/ssl/ssl_provider.rb","lineNumber":285,"sourceCode":"  end\n\n  def revocation_mode(mode)\n    case mode\n    when false\n      0\n    when :leaf\n      OpenSSL::X509::V_FLAG_CRL_CHECK\n    else\n      # :chain is the default\n      OpenSSL::X509::V_FLAG_CRL_CHECK | OpenSSL::X509::V_FLAG_CRL_CHECK_ALL\n    end\n  end\n\n  def resolve_client_chain(store, client_cert, private_key)\n    client_chain = verify_cert_with_store(store, client_cert)\n\n    if !private_key.is_a?(OpenSSL::PKey::RSA) && !private_key.is_a?(OpenSSL::PKey::EC)\n      raise Puppet::SSL::SSLError, _(\"Unsupported key '%{type}'\") % { type: private_key.class.name }\n    end\n\n    unless client_cert.check_private_key(private_key)\n      raise Puppet::SSL::SSLError, _(\"The certificate for '%{name}' does not match its private key\") % { name: subject(client_cert) }\n    end\n\n    client_chain\n  end\n\n  def verify_cert_with_store(store, cert)\n    # StoreContext#initialize accepts a chain argument, but it's set to [] because\n    # puppet requires any intermediate CA certs needed to complete the client's\n    # chain to be in the CA bundle that we downloaded from the server, and\n    # they've already been added to the store. See PUP-9500.\n\n    store_context = OpenSSL::X509::StoreContext.new(store, cert, [])\n    unless store_context.verify\n      current_cert = store_context.current_cert","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/ssl/ssl_provider.rb#L267-L303","documentation":"Error \"Unsupported key '%{type}'\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/ssl/ssl_provider.rb:285 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}