]> git.proxmox.com Git - proxmox-acme.git/blobdiff - src/proxmox-acme
proxmox-acme: add empty _clearaccountconf_mutable helper
[proxmox-acme.git] / src / proxmox-acme
index a00d23a2a120e39e05c93837780e490eb2c5e916..a7965477725d6be4261f14a746cc7e94a1fbfc61 100644 (file)
@@ -649,6 +649,24 @@ _stat() {
   stat -c '%U:%G' "$1" 2>/dev/null
 }
 
+#keyfile
+_isRSA() {
+  keyfile=$1
+  if grep "BEGIN RSA PRIVATE KEY" "$keyfile" >/dev/null 2>&1 || ${ACME_OPENSSL_BIN:-openssl} rsa -in "$keyfile" -noout -text | grep "^publicExponent:" >/dev/null 2>&1; then
+    return 0
+  fi
+  return 1
+}
+
+#keyfile
+_isEcc() {
+  keyfile=$1
+  if grep "BEGIN EC PRIVATE KEY" "$keyfile" >/dev/null 2>&1 || ${ACME_OPENSSL_BIN:-openssl} ec -in "$keyfile" -noout -text 2>/dev/null | grep "^NIST CURVE:" >/dev/null 2>&1; then
+    return 0
+  fi
+  return 1
+}
+
 _time() {
   date -u "+%s"
 }
@@ -696,11 +714,20 @@ _readaccountconf_mutable() {
   _readaccountconf "$1"
 }
 
+# key
+_readdomainconf() {
+  echo "${!1}"
+}
+
 # no-ops:
 _clearaccountconf() {
   return 0
 }
 
+_clearaccountconf_mutable() {
+  return 0
+}
+
 _cleardomainconf() {
   return 0
 }