{"record":{"id":"e2e66ccf073a2d9a","repo":"ruby/rubygems","slug":"certificate-signer-subject-does-not-match-the-s","errorCode":null,"errorMessage":"certificate #{signer.subject} does not match the signing key","messagePattern":"certificate #(.+?) does not match the signing key","errorType":"exception","errorClass":"Gem::Security::Exception","httpStatus":null,"severity":"error","filePath":"lib/rubygems/security/policy.rb","lineNumber":119,"sourceCode":"    if issuer && !signer.verify(issuer.public_key)\n      raise Gem::Security::Exception,\n            \"#{message} was not issued by #{issuer.subject}\"\n    end\n\n    true\n  end\n\n  ##\n  # Ensures the public key of +key+ matches the public key in +signer+\n\n  def check_key(signer, key)\n    unless signer && key\n      return true unless @only_signed\n\n      raise Gem::Security::Exception, \"missing key or signature\"\n    end\n\n    raise Gem::Security::Exception,\n      \"certificate #{signer.subject} does not match the signing key\" unless\n        signer.check_private_key(key)\n\n    true\n  end\n\n  ##\n  # Ensures the root certificate in +chain+ is self-signed and valid for\n  # +time+.\n\n  def check_root(chain, time)\n    raise Gem::Security::Exception, \"missing signing chain\" unless chain\n\n    root = chain.first\n\n    raise Gem::Security::Exception, \"missing root certificate\" unless root\n\n    raise Gem::Security::Exception,","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/security/policy.rb#L101-L137","documentation":"Error \"certificate #{signer.subject} does not match the signing key\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/security/policy.rb:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the certificate that matches the gem's signing key (correct cert/key pair)"],"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"}