Обсуждение: New functions for sslinfo extension
<div>Hello all, postgresmen!</div><div> </div><div>I want to present some functions to sslinfo extension module:</div><div>1)ssl_get_count_of_extensions() --- get count of X509v3 extensions from client certificate;</div><div>2)ssl_get_extension_names() --- get short names of X509v3 extensions from client certificate;</div><div>3)ssl_get_extension_value(text) --- get value of extension from certificate (argument --- short nameof extension);</div><div>4) ssl_is_critical_extension(text) --- returns true, if extension is critical and false, ifis not (argument --- short name of extension).</div><div> </div><div>I write those functions with libpq on C.</div><div> </div><div>Iput code of module and sql-file for loading with this letter.</div><div> </div><div> </div><div>Bestregards,</div><div>Dmitry Voronin</div><div> </div>
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
<div>Hello, I make an a patch, which adds 4 functions to sslinfo extension module. </div><div> </div><div>You can view someinformation of certificate's extensions with those functions. <br />The descriptions of functions I posted in my firstletter and in source code.</div><div> </div><div>What do you think about it?</div><div> </div><div>-- <br />Best regards,Dmitry Voronin</div><div> </div>
<div><div>Hello,</div><div> </div><div>I make an a patch, which adds 4 functions to sslinfo extension module:</div><div><div>1)ssl_get_count_of_extensions() --- get count of X509v3 extensions from client certificate;</div><div>2)ssl_get_extension_names() --- get short names of X509v3 extensions from client certificate;</div><div>3)ssl_get_extension_value(text) --- get value of extension from certificate (argument --- short nameof extension);</div><div>4) ssl_is_critical_extension(text) --- returns true, if extension is critical and false, ifis not (argument --- short name of extension).</div><div> </div></div><div>You can view some information of certificate'sextensions via those functions.</div><div>I want, that my functions will be included in PostgreSQL release.</div><div> </div><div>Whatdo you think about it?</div><div> </div><div>-- <br />Best regards, Dmitry Voronin</div></div><div> </div>