まず、openssl コマンドでサーバ証明書の内容を確認しましょう。
shell
1 $ openssl s_client -connect packagist.org:443
2 CONNECTED ( 00000003 )
3 depth = 2 O = Digital Signature Trust Co., CN = DST Root CA X3
4 verify return:1
5 depth = 1 C = US, O = Let 's Encrypt, CN = Let' s Encrypt Authority X3
6 verify return:1
7 depth = 0 CN = packagist.org
8 verify return:1
9 ---
10 Certificate chain
11 0 s:/CN = packagist.org
12 i:/C = US/O = Let 's Encrypt/CN=Let' s Encrypt Authority X3
13 1 s:/C = US/O = Let 's Encrypt/CN=Let' s Encrypt Authority X3
14 i:/O = Digital Signature Trust Co./CN = DST Root CA X3
15 ---
16 Server certificate
17 -----BEGIN CERTIFICATE-----
18 MIIFmDCCBICgAwIBAgISAxzy5A0GoUWikSOPycRx9guTMA0GCSqGSIb3DQEBCwUA
19 MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
20 ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0yMDAyMDkxNzQ2MzZaFw0y
21 MDA1MDkxNzQ2MzZaMBgxFjAUBgNVBAMTDXBhY2thZ2lzdC5vcmcwggEiMA0GCSqG
22 SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyFblhd3Q6L9kLB5j74FvdRGMrYV+jXcv8
23 QLqCOGwRwz5V8deFcdQQeCv19m+MkV9Sc+EiIFhQhBo8dX6HGbRwozmk29bpEIH7
24 r9TiCivVOXEqmqqqpvyRfo7pGRihlAIW7uOqQURHWaU4y79hYY9HG715MnCJ96WE
25 Vl8sDYM8A/a7ayfQQxjtn45ztEpc50tk5PWJ29b/wyFocGcEhBgb9mM+V74b29Gu
26 071H0Mh/RzVzsGTWiwX0fP0EnwY/qeUvbLYZCcA5v+VxFtuDyQFMjN3wowIudbB7
27 xQIizHc6FBoKw/D1j+/tfM/lM4acjKLGiSY+XpHGgrzqGqJizLsfAgMBAAGjggKo
28 MIICpDAOBgNVHQ8BAf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wSN/EPTL3KQD/yFWIadtzYNLJno6iX+yuHjWBeUFXV/c3g0iMcFBsU686YmEX5YD
45 AbzIU1HeFhF2SHJZBnGVe4tEEItkJxl2xR5ErLt4Vp+hxeXeJSeNjp2gcl+xyC4u
46 EFpYXS2hwWrWmr1Kj3FtjzF9F7bcpdoHCfTN7+QDqjsHiQ4TAUOX9cZpJtsjdD49
47 icgCPQqzJJKe/84LcEmC4IwTq1xo8PiZvBocS1GIWTWU+lR4ZQjJRtAgk9g =
48 -----END CERTIFICATE-----
49 subject = /CN = packagist.org
50 issuer = /C = US/O = Let 's Encrypt/CN=Let' s Encrypt Authority X3
51 ---
52 No client certificate CA names sent
53 Peer signing digest: SHA256
54 Server Temp Key: ECDH, P-256, 256 bits
55 ---
56 SSL handshake has read 3120 bytes and written 415 bytes
57 ---
58 New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
59 Server public key is 2048 bit
60 Secure Renegotiation IS supported
61 Compression: NONE
62 Expansion: NONE
63 No ALPN negotiated
64 SSL-Session:
65 Protocol : TLSv1.2
66 Cipher : ECDHE-RSA-AES128-GCM-SHA256
67 Session-ID: 0CE88C0490908817B87D30D4AC2376823D1BA1AE9F0361A296F61E088A60D5EC
68 Session-ID-ctx:
69 Master-Key: CA052851B5E6137C94966B8E8D67EC419E61580EDDF1CA96B3D3BDBE1AD2F687F562B318D9CE4FE91BA69E9601EECD11
70 Key-Arg : None
71 Krb5 Principal: None
72 PSK identity: None
73 PSK identity hint: None
74 Start Time: 1585532856
75 Timeout : 300 ( sec )
76 Verify return code: 0 ( ok )
77 ---
78 closed
この時点でエラーが出て原因がわかる可能性が高いですが、上記の通り、packagist.org はlets encryptyの正当な証明書を使用しておりサーバ側に問題はないようです。
そうすると、怪しいのはOSのトラストストアにlets encryptyが登録されていないのではないかということです。上記で証明書の発行者は 'DST Root CA X3' なので、これがサーバのトラストストアに入っているか確認してみましょう。
shell
1 $ trust list | grep 'DST Root CA X3'
2 label: DST Root CA X3
これが入っていないよう(grepの結果が0行)であれば、トラストストアをアップデートしてみましょう。
shell
1 $ sudo yum update ca-certificates
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。