LoginSignup
0
0

More than 5 years have passed since last update.

SSL証明書の期限を出力するワンライナー

Posted at

某ニュースを見て、証明書といえばWebサーバの証明書も心配かもということで書いてみた。

curl --verbose https://www.yahoo.co.jp/ 2>&1 | grep 'expire date'

本当はGoogle Apps Scriptで書けたら、気になるURLをコピペするだけで一気に取得できるかもと妄想したが、下々の者が触らせてもらえるAPIは公開されてないようで。

function getCertifiateExpireDate(url) {
  var response = UrlFetchApp.fetch(url);
  expire_date = hogehoge...;
  return(expire_date);
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0