Re: New functions for sslinfo extension

Lists: pgsql-hackers
From: Воронин Дмитрий <carriingfate92(at)yandex(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: New functions for sslinfo extension
Date: 2014-04-16 18:30:46
Message-ID: 1135491397673046@web9m.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Attachment Content-Type Size
unknown_filename text/html 836 bytes
sslextensions.c text/x-c 3.8 KB
sslextensions.control application/octet-stream 169 bytes
sslextensions--1.0.sql application/x-sql 567 bytes

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Воронин Дмитрий <carriingfate92(at)yandex(dot)ru>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New functions for sslinfo extension
Date: 2014-04-17 05:29:10
Message-ID: CAB7nPqRVFhnPnQL9ND+K=WA-YF_N1fAirx=s6fawk9F6ANLwBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

On Thu, Apr 17, 2014 at 3:30 AM, Воронин Дмитрий
<carriingfate92(at)yandex(dot)ru> wrote:
> I want to present some functions to sslinfo extension module:
> 1) ssl_get_count_of_extensions() --- get count of X509v3 extensions from
> client certificate;
> 2) ssl_get_extension_names() --- get short names of X509v3 extensions from
> client certificate;
> 3) ssl_get_extension_value(text) --- get value of extension from certificate
> (argument --- short name of extension);
> 4) ssl_is_critical_extension(text) --- returns true, if extension is
> critical and false, if is not (argument --- short name of extension).
>
> I write those functions with libpq on C.
This looks interesting. This is unfortunately too late for 9.4, but
you can submit it for 9.5 in the next commit fest but registering a
new patch:
https://commitfest.postgresql.org/action/commitfest_view?id=22

Here are as well some guidelines that will help you submitting
nicely-formatted patches:
https://wiki.postgresql.org/wiki/Submitting_a_Patch
https://wiki.postgresql.org/wiki/Working_with_Git
https://wiki.postgresql.org/wiki/Creating_Clean_Patches

You should not send a patch in the shape of each file sent
individually, but something that is generated based on diffs on the
Postgres code. Also, I looked at your code, you should avoid the
following things, that are not conform to the code format of the
project:
- Some tabs of your code are made of 4 spaces, and are not tabs
- Postgres avoids conditions like (constant == variable) and it is
preferable to use (variable == constant).

Here is the documentation explaining the coding convention:
http://www.postgresql.org/docs/devel/static/source.html
Regards,
--
Michael