diff options
| author | Po Lu | 2022-12-31 09:10:23 +0800 |
|---|---|---|
| committer | Po Lu | 2022-12-31 09:10:23 +0800 |
| commit | e645bcc26d468ab6b8e16b6160c203c5db70ec6b (patch) | |
| tree | 29024ea870eb1303ee87fd9077ba9757cf48e27f /src | |
| parent | 9d0f5909afc562dc2bdda04a95f64ee25a628185 (diff) | |
| download | emacs-e645bcc26d468ab6b8e16b6160c203c5db70ec6b.tar.gz emacs-e645bcc26d468ab6b8e16b6160c203c5db70ec6b.zip | |
Fix last change in gnutls.c
* src/gnutls.c (Fgnutls_boot): Pacify
--enable-check-lisp-object-type and Haiku GCC warning involving
`key_file2_aux'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/gnutls.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/gnutls.c b/src/gnutls.c index 571f141b2ac..eb231810fae 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -1792,9 +1792,8 @@ gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist) | |||
| 1792 | 1792 | ||
| 1793 | The key :flags receives a list of symbols, each of which | 1793 | The key :flags receives a list of symbols, each of which |
| 1794 | corresponds to a GnuTLS C flag, the ORed result is to be passed to | 1794 | corresponds to a GnuTLS C flag, the ORed result is to be passed to |
| 1795 | the function gnutls_certificate_set_x509_key_file2() as its last | 1795 | the function `gnutls_certificate_set_x509_key_file2' as its last |
| 1796 | argument. | 1796 | argument. */ |
| 1797 | */ | ||
| 1798 | static unsigned int | 1797 | static unsigned int |
| 1799 | key_file2_aux (Lisp_Object flags) | 1798 | key_file2_aux (Lisp_Object flags) |
| 1800 | { | 1799 | { |
| @@ -1940,6 +1939,9 @@ one trustfile (usually a CA bundle). */) | |||
| 1940 | Lisp_Object loglevel; | 1939 | Lisp_Object loglevel; |
| 1941 | Lisp_Object hostname; | 1940 | Lisp_Object hostname; |
| 1942 | Lisp_Object prime_bits; | 1941 | Lisp_Object prime_bits; |
| 1942 | #ifdef HAVE_GNUTLS_CERTIFICATE_SET_X509_KEY_FILE2 | ||
| 1943 | unsigned int aux_key_file; | ||
| 1944 | #endiif | ||
| 1943 | struct Lisp_Process *p = XPROCESS (proc); | 1945 | struct Lisp_Process *p = XPROCESS (proc); |
| 1944 | 1946 | ||
| 1945 | CHECK_PROCESS (proc); | 1947 | CHECK_PROCESS (proc); |
| @@ -2134,10 +2136,17 @@ one trustfile (usually a CA bundle). */) | |||
| 2134 | certfile = ansi_encode_filename (certfile); | 2136 | certfile = ansi_encode_filename (certfile); |
| 2135 | # endif | 2137 | # endif |
| 2136 | # ifdef HAVE_GNUTLS_CERTIFICATE_SET_X509_KEY_FILE2 | 2138 | # ifdef HAVE_GNUTLS_CERTIFICATE_SET_X509_KEY_FILE2 |
| 2137 | if (plist_member (proplist, QCpass)) | 2139 | if (!NILP (plist_member (proplist, QCpass))) |
| 2138 | ret = gnutls_certificate_set_x509_key_file2 | 2140 | { |
| 2139 | (x509_cred, SSDATA (certfile), SSDATA (keyfile), file_format, | 2141 | aux_key_file = key_file2_aux (flags); |
| 2140 | c_pass, key_file2_aux (flags)); | 2142 | ret |
| 2143 | = gnutls_certificate_set_x509_key_file2 (x509_cred, | ||
| 2144 | SSDATA (certfile), | ||
| 2145 | SSDATA (keyfile), | ||
| 2146 | file_format, | ||
| 2147 | c_pass, | ||
| 2148 | aux_key_file); | ||
| 2149 | } | ||
| 2141 | else | 2150 | else |
| 2142 | # endif | 2151 | # endif |
| 2143 | ret = gnutls_certificate_set_x509_key_file | 2152 | ret = gnutls_certificate_set_x509_key_file |