Skip to content

Commit

Permalink
Add github pem chain
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Foti <[email protected]>
  • Loading branch information
MocioF committed Apr 22, 2024
1 parent b7d5f48 commit 390de21
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
69 changes: 69 additions & 0 deletions admin/assets/github.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
-----BEGIN CERTIFICATE-----
MIIHOTCCBiGgAwIBAgIQBj1JF0BNOeUTyz/uzRsuGzANBgkqhkiG9w0BAQsFADBZ
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMTMwMQYDVQQDEypE
aWdpQ2VydCBHbG9iYWwgRzIgVExTIFJTQSBTSEEyNTYgMjAyMCBDQTEwHhcNMjQw
MzE1MDAwMDAwWhcNMjUwMzE0MjM1OTU5WjBnMQswCQYDVQQGEwJVUzETMBEGA1UE
CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEVMBMGA1UEChMM
R2l0SHViLCBJbmMuMRQwEgYDVQQDDAsqLmdpdGh1Yi5pbzCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAK0rFKU6TEGvuLCY3ZOuXlG+3jerD6EP1gc1qe35
g68FqyGuVPOUddYNZiymjYMZxywoNp3qxlbFFBTf9etsayavT+uW+2UMjqCotAdK
KicBEspuExoACFuNgTi7sSUT7A55+k4/+5O+VtpaxQ5dmQk7HxcqvMYx5owBU+fB
wYDD+hXeg3YvxLZNeIlN8OlqWL8w9HbG+3ccegVEjOJQbkrcrW7IQMq2Uk92XjxI
PmMVIvaefqcC1poGYvS4VvEh3x64vJK1hEM4YLMKBaE/hqFtcMozi+H/8JqTCfzP
Qhnu21HIop9rSucxxnZbe9AeHz2LERpUTf3rjgOMg9PB1RUCAwEAAaOCA+0wggPp
MB8GA1UdIwQYMBaAFHSFgMBmx9833s+9KTeqAx2+7c0XMB0GA1UdDgQWBB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GyZm0pGrFmCW3R
bpD0ufovARTFXFZkAdl9h6g4U5+LXUZtXMYnhIHUfoyMo5tS58aI7Dd8KvvwVVo4
chDYABPPTHPbqjc1qCmBaZx2vN4Ye5DUys/vZwP9BFohFrH/6j/f3IL16/RZkiMN
JCqVJUzKoZHm1Lesh3Sz8W2jmdv51b2EQJ8HmA==
-----END CERTIFICATE-----
8 changes: 7 additions & 1 deletion admin/class-gcmi-activator.php
Original file line number Diff line number Diff line change
Expand Up @@ -796,9 +796,15 @@ public static function download_file( $remoteurl, $tmp_dwld_dir, $filename ) {
'timeout' => 300,
'stream' => true,
'sslverify' => true,
'sslcertificates' => GCMI_PLUGIN_DIR . '/admin/assets/istat-it-catena.pem',
/* 'sslcertificates' => GCMI_PLUGIN_DIR . '/admin/assets/istat-it-catena.pem', */
'filename' => $tmpfname,
);
if( strpos( $remoteurl, 'istat.it' ) !== false ) {
$args['sslcertificates'] = GCMI_PLUGIN_DIR . '/admin/assets/istat-it-catena.pem';
}
if( strpos( $remoteurl, 'raw.githubusercontent.com' ) !== false ) {
$args['sslcertificates'] = GCMI_PLUGIN_DIR . '/admin/assets/github.pem';
}

$response = wp_remote_get( $remoteurl, $args );

Expand Down

0 comments on commit 390de21

Please sign in to comment.