{"record":{"id":"e63c209202a64db6","repo":"ruby/rubygems","slug":"no-certs-provided","errorCode":null,"errorMessage":"no certs provided","messagePattern":"no certs provided","errorType":"exception","errorClass":"Gem::Security::Exception","httpStatus":null,"severity":"error","filePath":"lib/rubygems/security/signer.rb","lineNumber":143,"sourceCode":"  def load_cert_chain # :nodoc:\n    return if @cert_chain.empty?\n\n    while @cert_chain.first.issuer.to_s != @cert_chain.first.subject.to_s do\n      issuer = Gem::Security.trust_dir.issuer_of @cert_chain.first\n\n      break unless issuer # cert chain is verified later\n\n      @cert_chain.unshift issuer\n    end\n  end\n\n  ##\n  # Sign data with given digest algorithm\n\n  def sign(data)\n    return unless @key\n\n    raise Gem::Security::Exception, \"no certs provided\" if @cert_chain.empty?\n\n    if @cert_chain.length == 1 && @cert_chain.last.not_after < Time.now\n      alert(\"Your certificate has expired, trying to re-sign it...\")\n\n      re_sign_key(\n        expiration_length: (Gem::Security::ONE_DAY * options[:expiration_length_days])\n      )\n    end\n\n    full_name = extract_name @cert_chain.last\n\n    Gem::Security::SigningPolicy.verify @cert_chain, @key, {}, {}, full_name\n\n    @key.sign @digest_algorithm.new, data\n  end\n\n  ##\n  # Attempts to re-sign the private key if the signing certificate is expired.","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/security/signer.rb#L125-L161","documentation":"Error \"no certs provided\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/security/signer.rb:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a certificate (and chain) to Gem::Security::Signer, e.g. via `gem cert --build` and signing config"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}