Re: implement subject alternative names support for SSL connections - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: implement subject alternative names support for SSL connections
Date
Msg-id CABUevEyCK=-S0p4+G6UFZ3AB6iyfn1BmF_sgoMfO5TtNrpsDGw@mail.gmail.com
Whole thread Raw
In response to Re: implement subject alternative names support for SSL connections  (Alexey Klyukin <alexk@hintbits.com>)
Responses Re: implement subject alternative names support for SSL connections
List pgsql-hackers
On Fri, Jul 25, 2014 at 7:15 PM, Alexey Klyukin <alexk@hintbits.com> wrote:
> On Fri, Jul 25, 2014 at 6:34 PM, Magnus Hagander <magnus@hagander.net>
> wrote:
>>
>>
>> I just took a very quick look at the code, and just noticed one thing:
>>
>> Why keep looping once you've found a match? When you set result=true
>> you should break; from the loop I think. Not necessarily for
>> performance, but there might be something about a different extension
>> we can't parse for example, no need to fail in that case.
>
>
>
> The for loop header is for (i = 0; i < alt_names_total && !result; i++), so
> the loop
> should terminate right when the result becomes true, which happens if the
> pg_strcasecmp
> finds a match between the given dNSName and the name supplied by the client.

oh, ha. So yeah, that was too quick to count as a review - clearly :)



-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/



pgsql-hackers by date:

Previous
From: Alexey Klyukin
Date:
Subject: Re: implement subject alternative names support for SSL connections
Next
From: Claudio Freire
Date:
Subject: Re: Proposal: Incremental Backup