]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix the build broken by latest GnuTLS-related changes
authorEli Zaretskii <eliz@gnu.org>
Sat, 31 Dec 2022 07:24:32 +0000 (09:24 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 31 Dec 2022 07:24:32 +0000 (09:24 +0200)
* src/gnutls.c (key_file2_aux): Don't use GNUTLS_PKCS_PBES2_*
constants that are defined only in latest versions of GnuTLS.
(Bug#50507)
(Fgnutls_boot): Mention in the doc string that some flags of
'gnutls_certificate_set_x509_key_file2' are only supported since
GnuTLS 3.6.3.

src/gnutls.c

index ab50128b81cab96f40eeabe5897be9e4455ce563..e58322934de347c8775c215e8fdfe0b615ae5c62 100644 (file)
@@ -1822,18 +1822,30 @@ key_file2_aux (Lisp_Object flags)
        rv |= GNUTLS_PKCS_NULL_PASSWORD;
       else if (EQ (flag, Qgnutls_pkcs_pbes2_des))
        rv |= GNUTLS_PKCS_PBES2_DES;
+#ifdef GNUTLS_PKCS_PBES1_DES_MD5
       else if (EQ (flag, Qgnutls_pkcs_pbes1_des_md5))
        rv |= GNUTLS_PKCS_PBES1_DES_MD5;
+#endif
+#ifdef GNUTLS_PKCS_PBES2_GOST_TC26Z
       else if (EQ (flag, Qgnutls_pkcs_pbes2_gost_tc26z))
        rv |= GNUTLS_PKCS_PBES2_GOST_TC26Z;
+#endif
+#ifdef GNUTLS_PKCS_PBES2_GOST_CPA
       else if (EQ (flag, Qgnutls_pkcs_pbes2_gost_cpa))
        rv |= GNUTLS_PKCS_PBES2_GOST_CPA;
+#endif
+#ifdef GNUTLS_PKCS_PBES2_GOST_CPB
       else if (EQ (flag, Qgnutls_pkcs_pbes2_gost_cpb))
        rv |= GNUTLS_PKCS_PBES2_GOST_CPB;
+#endif
+#ifdef GNUTLS_PKCS_PBES2_GOST_CPC
       else if (EQ (flag, Qgnutls_pkcs_pbes2_gost_cpc))
        rv |= GNUTLS_PKCS_PBES2_GOST_CPC;
+#endif
+#ifdef GNUTLS_PKCS_PBES2_GOST_CPD
       else if (EQ (flag, Qgnutls_pkcs_pbes2_gost_cpd))
        rv |= GNUTLS_PKCS_PBES2_GOST_CPD;
+#endif
     }
   return rv;
 }
@@ -1893,6 +1905,7 @@ GNUTLS_PKCS_PBES2_DES_MD5, GNUTLS_PKCS_PBES2_GOST_TC26Z,
 GNUTLS_PKCS_PBES2_GOST_CPA, GNUTLS_PKCS_PBES2_GOST_CPB,
 GNUTLS_PKCS_PBES2_GOST_CPC, GNUTLS_PKCS_PBES2_GOST_CPD.  If not
 specified, or if nil, the bitflag with value 0 is used.
+Note that some of these are only supported since GnuTLS 3.6.3.
 
 The debug level will be set for this process AND globally for GnuTLS.
 So if you set it higher or lower at any point, it affects global