Обсуждение: New functions for sslinfo extension
Hello all, postgresmen!
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.
I put code of module and sql-file for loading with this letter.
Best regards,
Dmitry Voronin
Hi, On Thu, Apr 17, 2014 at 3:30 AM, Воронин Дмитрий <carriingfate92@yandex.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
Hello, I make an a patch, which adds 4 functions to sslinfo extension module.
You can view some information of certificate's extensions with those functions.
The descriptions of functions I posted in my first letter and in source code.
The descriptions of functions I posted in my first letter and in source code.
What do you think about it?
--
Best regards, Dmitry Voronin
Best regards, Dmitry Voronin
Hello,
I make an a patch, which adds 4 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).
You can view some information of certificate's extensions via those functions.
I want, that my functions will be included in PostgreSQL release.
What do you think about it?
--
Best regards, Dmitry Voronin
Best regards, Dmitry Voronin