From 8e3f069c6d8a9607acd31996adc8e4ed3ccb458b Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Thu, 27 Jul 2023 02:46:28 +0800 Subject: [PATCH] auth: add .eid/authorized_certificates for pam pkcs11 auth --- .eid/authorized_certificates | 30 ++++++++++++++++++++++++++++++ install.sh | 2 ++ tools/test.zsh | 1 + 3 files changed, 33 insertions(+) create mode 100644 .eid/authorized_certificates diff --git a/.eid/authorized_certificates b/.eid/authorized_certificates new file mode 100644 index 0000000..ab088e6 --- /dev/null +++ b/.eid/authorized_certificates @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFIDCCAwigAwIBAgIUK1zXH5UosBim7i+kIZyPGpowU9cwDQYJKoZIhvcNAQEL +BQAwgZUxCzAJBgNVBAYTAkNOMRAwDgYDVQQIDAdCRUlKSU5HMRAwDgYDVQQHDAdC +RUlKSU5HMRIwEAYDVQQKDAlEaWN0IFRlY2gxEDAOBgNVBAsMB1Jvb3QgQ0ExHjAc +BgNVBAMMFURpY3QgVGVjaCBSb290IENBIC0gMDEcMBoGCSqGSIb3DQEJARYNbWVA +YmVhcmRpYy5jbjAeFw0yMjA3MjIxNzU5MjNaFw0yNTA3MjExNzU5MjNaMEkxEjAQ +BgNVBAoMCURpY3QgVGVjaDEQMA4GA1UECAwHQkVJSklORzELMAkGA1UEBhMCQ04x +FDASBgNVBAMMC3NrMC5pYmQuaW5rMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAlDeyFxeJ5RXFX4B3rIIpNyyAIl5VTGCT5t8g9dxFWq0MeY6nQYJPA8IJ +IH+KzzujBabyKYpzshDvMzkuhx0Kwi2VL+ckxWg5FLge3kNBJqYnBm5pPWx6o9R5 +DmcWqG5KRH0FJhSmL5KeBHsVcOurDtKn174x2eB+sggCSyuWlJyn4KxPLTg8z/Nr +FP5qSY1vj6t7mpzau+eIGh8IcQiFxteN/86fKswQHint/MVaqg6vX05BuIb8xb5E +XUvPIupdc/vt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sh b/install.sh index b58d7f7..e44a337 100755 --- a/install.sh +++ b/install.sh @@ -26,6 +26,8 @@ declare -a HOME_SYMLINKS_SRC declare -a HOME_SYMLINKS_DST HOME_SYMLINKS_SRC[0]=".ssh/authorized_keys2" HOME_SYMLINKS_DST[0]=".ssh/authorized_keys2" +HOME_SYMLINKS_SRC[1]=".eid/authorized_certificates" +HOME_SYMLINKS_DST[1]=".eid/authorized_certificates" install_dependencies() { diff --git a/tools/test.zsh b/tools/test.zsh index 039d7c6..97477a9 100644 --- a/tools/test.zsh +++ b/tools/test.zsh @@ -13,6 +13,7 @@ l pwd test -f .zshrc2 diff -q ./.ssh/authorized_keys2 ~/.ssh/authorized_keys2 +diff -q ./.eid/authorized_certificates ~/.eid/authorized_certificates grep -q ".zshrc2" ~/.zshrc # check scripts and functions