diff options
| author | Glenn Morris | 2018-07-20 10:00:32 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-07-20 10:00:32 -0700 |
| commit | 6ee00324619673b402dadb3c28e791b79527868f (patch) | |
| tree | 57070a6bb9dcf0620107f113f67551fe622c7385 /src | |
| parent | 144bcc0132e61cc932348312720d592764022844 (diff) | |
| parent | 3e722980df9d4a705394c843a2a5e051e9c682b6 (diff) | |
| download | emacs-6ee00324619673b402dadb3c28e791b79527868f.tar.gz emacs-6ee00324619673b402dadb3c28e791b79527868f.zip | |
Merge from origin/emacs-26
3e72298 Improve documentation of 'pcase-defmacro rx'
ba9b9bb Fix TTY colors breakage by 'clear-face-cache'
f56ad42 * admin/MAINTAINERS: Add files maintained by me (Michael Albi...
7a258fa Adapt shadowfile.el for Tramp (Bug#4526, Bug#4846)
cb50077 Fix auth-source-delete (Bug#26184)
a4767a6 Avoid assertion violations in gnutls.c
90110f8 Don't use a literal "C-u" in ispell.el help message text
f4e7f6d Improve documentation of 'seqp'
ed13639 Clarify usage and dependencies between several Flyspell features
Conflicts:
etc/NEWS
test/lisp/auth-source-tests.el
Diffstat (limited to 'src')
| -rw-r--r-- | src/gnutls.c | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/src/gnutls.c b/src/gnutls.c index d7a4ee474f7..4e98f16f484 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -2071,7 +2071,14 @@ gnutls_symmetric (bool encrypting, Lisp_Object cipher, | |||
| 2071 | cipher = intern (SSDATA (cipher)); | 2071 | cipher = intern (SSDATA (cipher)); |
| 2072 | 2072 | ||
| 2073 | if (SYMBOLP (cipher)) | 2073 | if (SYMBOLP (cipher)) |
| 2074 | info = XCDR (Fassq (cipher, Fgnutls_ciphers ())); | 2074 | { |
| 2075 | info = Fassq (cipher, Fgnutls_ciphers ()); | ||
| 2076 | if (!CONSP (info)) | ||
| 2077 | xsignal2 (Qerror, | ||
| 2078 | build_string ("GnuTLS cipher is invalid or not found"), | ||
| 2079 | cipher); | ||
| 2080 | info = XCDR (info); | ||
| 2081 | } | ||
| 2075 | else if (TYPE_RANGED_INTEGERP (gnutls_cipher_algorithm_t, cipher)) | 2082 | else if (TYPE_RANGED_INTEGERP (gnutls_cipher_algorithm_t, cipher)) |
| 2076 | gca = XINT (cipher); | 2083 | gca = XINT (cipher); |
| 2077 | else | 2084 | else |
| @@ -2086,7 +2093,8 @@ gnutls_symmetric (bool encrypting, Lisp_Object cipher, | |||
| 2086 | 2093 | ||
| 2087 | ptrdiff_t key_size = gnutls_cipher_get_key_size (gca); | 2094 | ptrdiff_t key_size = gnutls_cipher_get_key_size (gca); |
| 2088 | if (key_size == 0) | 2095 | if (key_size == 0) |
| 2089 | error ("GnuTLS cipher is invalid or not found"); | 2096 | xsignal2 (Qerror, |
| 2097 | build_string ("GnuTLS cipher is invalid or not found"), cipher); | ||
| 2090 | 2098 | ||
| 2091 | ptrdiff_t kstart_byte, kend_byte; | 2099 | ptrdiff_t kstart_byte, kend_byte; |
| 2092 | const char *kdata = extract_data_from_object (key, &kstart_byte, &kend_byte); | 2100 | const char *kdata = extract_data_from_object (key, &kstart_byte, &kend_byte); |
| @@ -2342,7 +2350,14 @@ itself. */) | |||
| 2342 | hash_method = intern (SSDATA (hash_method)); | 2350 | hash_method = intern (SSDATA (hash_method)); |
| 2343 | 2351 | ||
| 2344 | if (SYMBOLP (hash_method)) | 2352 | if (SYMBOLP (hash_method)) |
| 2345 | info = XCDR (Fassq (hash_method, Fgnutls_macs ())); | 2353 | { |
| 2354 | info = Fassq (hash_method, Fgnutls_macs ()); | ||
| 2355 | if (!CONSP (info)) | ||
| 2356 | xsignal2 (Qerror, | ||
| 2357 | build_string ("GnuTLS MAC-method is invalid or not found"), | ||
| 2358 | hash_method); | ||
| 2359 | info = XCDR (info); | ||
| 2360 | } | ||
| 2346 | else if (TYPE_RANGED_INTEGERP (gnutls_mac_algorithm_t, hash_method)) | 2361 | else if (TYPE_RANGED_INTEGERP (gnutls_mac_algorithm_t, hash_method)) |
| 2347 | gma = XINT (hash_method); | 2362 | gma = XINT (hash_method); |
| 2348 | else | 2363 | else |
| @@ -2357,7 +2372,9 @@ itself. */) | |||
| 2357 | 2372 | ||
| 2358 | ptrdiff_t digest_length = gnutls_hmac_get_len (gma); | 2373 | ptrdiff_t digest_length = gnutls_hmac_get_len (gma); |
| 2359 | if (digest_length == 0) | 2374 | if (digest_length == 0) |
| 2360 | error ("GnuTLS MAC-method is invalid or not found"); | 2375 | xsignal2 (Qerror, |
| 2376 | build_string ("GnuTLS MAC-method is invalid or not found"), | ||
| 2377 | hash_method); | ||
| 2361 | 2378 | ||
| 2362 | ptrdiff_t kstart_byte, kend_byte; | 2379 | ptrdiff_t kstart_byte, kend_byte; |
| 2363 | const char *kdata = extract_data_from_object (key, &kstart_byte, &kend_byte); | 2380 | const char *kdata = extract_data_from_object (key, &kstart_byte, &kend_byte); |
| @@ -2423,7 +2440,14 @@ the number itself. */) | |||
| 2423 | digest_method = intern (SSDATA (digest_method)); | 2440 | digest_method = intern (SSDATA (digest_method)); |
| 2424 | 2441 | ||
| 2425 | if (SYMBOLP (digest_method)) | 2442 | if (SYMBOLP (digest_method)) |
| 2426 | info = XCDR (Fassq (digest_method, Fgnutls_digests ())); | 2443 | { |
| 2444 | info = Fassq (digest_method, Fgnutls_digests ()); | ||
| 2445 | if (!CONSP (info)) | ||
| 2446 | xsignal2 (Qerror, | ||
| 2447 | build_string ("GnuTLS digest-method is invalid or not found"), | ||
| 2448 | digest_method); | ||
| 2449 | info = XCDR (info); | ||
| 2450 | } | ||
| 2427 | else if (TYPE_RANGED_INTEGERP (gnutls_digest_algorithm_t, digest_method)) | 2451 | else if (TYPE_RANGED_INTEGERP (gnutls_digest_algorithm_t, digest_method)) |
| 2428 | gda = XINT (digest_method); | 2452 | gda = XINT (digest_method); |
| 2429 | else | 2453 | else |
| @@ -2438,7 +2462,9 @@ the number itself. */) | |||
| 2438 | 2462 | ||
| 2439 | ptrdiff_t digest_length = gnutls_hash_get_len (gda); | 2463 | ptrdiff_t digest_length = gnutls_hash_get_len (gda); |
| 2440 | if (digest_length == 0) | 2464 | if (digest_length == 0) |
| 2441 | error ("GnuTLS digest-method is invalid or not found"); | 2465 | xsignal2 (Qerror, |
| 2466 | build_string ("GnuTLS digest-method is invalid or not found"), | ||
| 2467 | digest_method); | ||
| 2442 | 2468 | ||
| 2443 | gnutls_hash_hd_t hash; | 2469 | gnutls_hash_hd_t hash; |
| 2444 | int ret = gnutls_hash_init (&hash, gda); | 2470 | int ret = gnutls_hash_init (&hash, gda); |