{"id":253,"date":"2011-03-15T08:58:49","date_gmt":"2011-03-15T13:58:49","guid":{"rendered":"http:\/\/somethingdoug.com\/thoughts\/?p=253"},"modified":"2011-03-17T18:28:20","modified_gmt":"2011-03-17T23:28:20","slug":"cpan-testers-metabase-has-a-certificate","status":"publish","type":"post","link":"https:\/\/somethingdoug.com\/thoughts\/2011\/03\/15\/cpan-testers-metabase-has-a-certificate\/","title":{"rendered":"CPAN Testers Metabase has a certificate"},"content":{"rendered":"<p>As an update to <a title=\"CPAN::Reporter, Transport::Metabase, and libwww-lwp 6\" href=\"http:\/\/somethingdoug.com\/thoughts\/2011\/03\/13\/cpanreporter-transportmetabase-and-libwww-lwp-6\/\">my previous post<\/a>, <a href=\"http:\/\/www.dagolden.com\/index.php\/1391\/fixed-cpan-testers-reporting-with-lwp-6\/\">David Golden has posted an update<\/a> that the certificate for metabase.cpantesters.org is now signed by a certificate authority that is included in <a href=\"http:\/\/search.cpan.org\/dist\/Mozilla-CA\/\">Mozilla-CA<\/a>! This means anyone who was using my <a href=\"https:\/\/gist.github.com\/867743\">hypothetical distribution<\/a> as a work-around in the mean time should not only stop using it, but it will no longer connect as the certificate has changed! You&#8217;d end up with the following error:<\/p>\n<pre>CPAN::Reporter: Test::Reporter: error from 'Test::Reporter::Transport::Metabase::CPANTesters:'\r\nfact submission failed: Can't connect to metabase.cpantesters.org:443 (certificate verify failed) at C:\\strawberry\\perl\\site\\lib\/Metabase\/Client\/Simple.pm line 111\r\n...\r\n        Test::Reporter::Transport::Metabase::CPANTesters::send('Test::Reporter::Transport::Metabase::CPANTesters=HASH(0x7a932b8)', 'Test::Reporter=HASH(0x62cb790)') called at C:\\strawberry\\perl\\site\\lib\/Test\/Reporter.pm line 279\r\n...<\/pre>\n<p>Simply modify your CPAN::Reporter configuration to use the standard Metabase transport with the CPAN Testers metabase URI. Here is a short script you can run to automatically update your configuration:<\/p>\n<pre lang=\"perl\">#!\/usr\/bin\/env perl\r\n\r\nuse 5.006;\r\nuse CPAN::Reporter::Config;\r\n\r\nmy $config_file = CPAN::Reporter::Config::_get_config_file();\r\nmy $config = CPAN::Reporter::Config::_open_config_file();\r\n\r\nmy ($class, %args) = split m{\\s+}mosx, $config-&gt;{_}-&gt;{transport};\r\n\r\nif ($class eq 'Metabase::CPANTesters') {\r\n    print \"Modifying configuration file transport line from\\n\", $config-&gt;{_}-&gt;{transport}, \"\\n\";\r\n    # Correct the transport information\r\n    $class = 'Metabase';\r\n    $args{uri} = 'https:\/\/metabase.cpantesters.org\/api\/v1\/';\r\n    $config-&gt;{_}-&gt;{transport} = \"$class \" . join q{ }, %args;\r\n    print \"to\\n\", $config-&gt;{_}-&gt;{transport}, \"\\n\";\r\n    # Write the configuration\r\n    $config-&gt;write($config_file);\r\n    print \"Done\\n\";\r\n}\r\nelsif ($config-&gt;{_}-&gt;{transport}) {\r\n    # Modification does not look necessary\r\n    print \"Leaving transport configuration set to\\n\", $config-&gt;{_}-&gt;{transport}, \"\\n\";\r\n}\r\nelse {\r\n    # Modification does not look like it should occur\r\n    print \"Not modifying configuration without transport directive\\n\";\r\n}\r\n\r\nexit 0;<\/pre>\n<p>In order to be fully capable of submitting reports through CPAN::Reporter, be sure to have the following modules installed:<\/p>\n<pre>IO::Socket::SSL\r\nMozilla::CA<\/pre>\n<p>For a full uninstall of the hypothetical distribution, please see the <a href=\"https:\/\/gist.github.com\/867743#file_uninstall\">UNINSTALL<\/a> file now included with the distribution.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As an update to my previous post, David Golden has posted an update that the certificate for metabase.cpantesters.org is now signed by a certificate authority that is included in Mozilla-CA! This means anyone who was using my hypothetical distribution as a work-around in the mean time should not only stop using it, but it will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[12,24,27,19],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-perl","tag-cpan","tag-metabase","tag-perl","tag-perl5"],"_links":{"self":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":9,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts\/253\/revisions"}],"predecessor-version":[{"id":261,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts\/253\/revisions\/261"}],"wp:attachment":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/media?parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/categories?post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/tags?post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}