Re: [HACKERS] GnuTLS support

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: [HACKERS] GnuTLS support
Дата
Msg-id D78C1E01-8C4F-4BEC-B8D7-7ECDBA8683F0@yesql.se
обсуждение исходный текст
Ответ на Re: [HACKERS] GnuTLS support  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] GnuTLS support
Список pgsql-hackers
> On 25 Jan 2018, at 15:07, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
>
> On 1/19/18 13:43, Peter Eisentraut wrote:
>> Comparing the existing {be,fe}-secure-openssl.c with the proposed
>> {be,fe}-secure-gnutls.c, and with half an eye on the previously proposed
>> Apple Secure Transport implementation, I have identified a few more
>> areas of refactoring that should be done in order to avoid excessive
>> copy-and-pasting in the new implementations:
>
> And here is another place that needs cleaning up, where the OpenSSL API
> was used directly.

+1 on these cleanups.

Regarding this hunk:

 extern int    be_tls_get_cipher_bits(Port *port);
 extern bool be_tls_get_compression(Port *port);
-extern void be_tls_get_version(Port *port, char *ptr, size_t len);
-extern void be_tls_get_cipher(Port *port, char *ptr, size_t len);
+extern const char *be_tls_get_version(Port *port);
+extern const char *be_tls_get_cipher(Port *port);
 extern void be_tls_get_peerdn_name(Port *port, char *ptr, size_t len);

While only tangentially related to the issue this patch solves, converting
be_tls_get_peerdn_name() to return const char * seems reasonable too to keep
the API consistent.

cheers ./daniel

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: [HACKERS] Optional message to user when terminating/cancelling backend
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Removing WITH clause support in CREATE FUNCTION, for isCachable and isStrict