{"record":{"id":"cb6255213785779e","repo":"ruby/rubygems","slug":"root-certificate-root-subject-is-not-self-signe","errorCode":null,"errorMessage":"root certificate #{root.subject} is not self-signed (issuer #{root.issuer})","messagePattern":"root certificate #(.+?) is not self-signed \\(issuer #(.+?)\\)","errorType":"exception","errorClass":"Gem::Security::Exception","httpStatus":null,"severity":"error","filePath":"lib/rubygems/security/policy.rb","lineNumber":137,"sourceCode":"    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,\n          \"root certificate #{root.subject} is not self-signed \" \\\n          \"(issuer #{root.issuer})\" if\n      root.issuer != root.subject\n\n    check_cert root, root, time\n  end\n\n  ##\n  # Ensures the root of +chain+ has a trusted certificate in Gem::Security.trust_dir and\n  # the digests of the two certificates match according to +digester+\n\n  def check_trust(chain, digester, trust_dir)\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","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/security/policy.rb#L119-L155","documentation":"Error \"root certificate #{root.subject} is not self-signed (issuer #{root.issuer})\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/security/policy.rb:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The chain's root must be self-signed; rebuild the chain with the correct root certificate"],"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"}