check-apt-key.sh 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #!/bin/bash
  2. #Verify with the key fatch from https://ftp-master.debian.org/keys.html
  3. #---------------------------------------------------------------------------
  4. #"Debian Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>"
  5. STRETCHARCHIVEKEY="E1CF 20DD FFE4 B89E 8026 58F1 E0B1 1894 F66A EC98"
  6. CHECKTMP=$(apt-key finger | grep -B 1 "Debian Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>" | head -n1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
  7. if [ "$CHECKTMP" == "$STRETCHARCHIVEKEY" ];then
  8. echo Good
  9. :
  10. else
  11. echo bad
  12. exit 1
  13. fi
  14. #---------------------------------------------------------------------------
  15. #"Debian Security Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>"
  16. STRETCHSECURITYKEY="6ED6 F5CB 5FA6 FB2F 460A E88E EDA0 D238 8AE2 2BA9"
  17. CHECKTMP=$(apt-key finger | grep -B 1 "Debian Security Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>" | head -n1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
  18. if [ "$CHECKTMP" == "$STRETCHSECURITYKEY" ];then
  19. echo Good
  20. :
  21. else
  22. echo bad
  23. exit 1
  24. fi
  25. #---------------------------------------------------------------------------
  26. #"Debian Stable Release Key (9/stretch) <debian-release@lists.debian.org>"
  27. STRETCHSTABLEKEY="067E 3C45 6BAE 240A CEE8 8F6F EF0F 382A 1A7B 6500"
  28. CHECKTMP=$(apt-key finger | grep -B 1 "Debian Stable Release Key (9/stretch) <debian-release@lists.debian.org>" | head -n1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
  29. if [ "$CHECKTMP" == "$STRETCHSTABLEKEY" ];then
  30. echo Good
  31. :
  32. else
  33. echo bad
  34. exit 1
  35. fi
  36. #---------------------------------------------------------------------------
  37. #"Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>"
  38. JESSIEARCHIVEKEY="126C 0D24 BD8A 2942 CC7D F8AC 7638 D044 2B90 D010"
  39. CHECKTMP=$(apt-key finger | grep -B 1 "Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>" | head -n1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
  40. if [ "$CHECKTMP" == "$JESSIEARCHIVEKEY" ];then
  41. echo Good
  42. :
  43. else
  44. echo bad
  45. exit 1
  46. fi
  47. #---------------------------------------------------------------------------
  48. #"Debian Security Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>"
  49. JESSIESECURITYKEY="D211 6914 1CEC D440 F2EB 8DDA 9D6D 8F6B C857 C906"
  50. CHECKTMP=$(apt-key finger | grep -B 1 "Debian Security Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>" | head -n1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
  51. if [ "$CHECKTMP" == "$JESSIESECURITYKEY" ];then
  52. echo Good
  53. :
  54. else
  55. echo bad
  56. exit 1
  57. fi
  58. #---------------------------------------------------------------------------
  59. #"Jessie Stable Release Key <debian-release@lists.debian.org>"
  60. JESSIESTABLEKEY="75DD C3C4 A499 F1A1 8CB5 F3C8 CBF8 D6FD 518E 17E1"
  61. CHECKTMP=$(apt-key finger | grep -B 1 "Jessie Stable Release Key <debian-release@lists.debian.org>" | head -n1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
  62. if [ "$CHECKTMP" == "$JESSIESTABLEKEY" ];then
  63. echo Good
  64. :
  65. else
  66. echo bad
  67. exit 1
  68. fi
  69. #---------------------------------------------------------------------------
  70. #"Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>"
  71. WHEEZYARCHIVEKEY="A1BD 8E9D 78F7 FE5C 3E65 D8AF 8B48 AD62 4692 5553"
  72. CHECKTMP=$(apt-key finger | grep -B 1 "Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>" | head -n1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
  73. if [ "$CHECKTMP" == "$WHEEZYARCHIVEKEY" ];then
  74. echo Good
  75. :
  76. else
  77. echo bad
  78. exit 1
  79. fi
  80. #---------------------------------------------------------------------------
  81. #"Wheezy Stable Release Key <debian-release@lists.debian.org>"
  82. WHEEZYSTABLEKEY="ED6D 6527 1AAC F0FF 15D1 2303 6FB2 A1C2 65FF B764"
  83. CHECKTMP=$(apt-key finger | grep -B 1 "Wheezy Stable Release Key <debian-release@lists.debian.org>" | head -n1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
  84. if [ "$CHECKTMP" == "$WHEEZYSTABLEKEY" ];then
  85. echo Good
  86. :
  87. else
  88. echo bad
  89. exit 1
  90. fi