git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] imap-send: use ASN1_STRING_length

From
Beat Bolli <dev+git@drbeat.li>
Date
Oct 12, 2026, 20:09 UTC
Message-ID
<5d5dfa51-abc3-4a8f-badd-48ee398ad73f@drbeat.li>
In-Reply-To
<xmqqv77696sf.fsf@gitster.g>
On 12.10.2026 19:18, Junio C Hamano wrote:
Show 24 quoted lines
> Aniket Gupta <aniketgupta3001@gmail.com> writes:
> >> Hello Xiangfei,
>>
>>> +	int pat_len = ASN1_STRING_length(asn1_str);
>>
>> It seems that with OpenSSL 4.1.0-beta2 this is deprecated
>> (ASN1_STRING_get_length() is the replacement), so it warns, and
>> fails with DEVELOPER=1. The patch adds a second use at the error
>> message. Beat Bolli has a series from 7 Sept ("imap-send: future
>> proofing and two correctness fixes") that also touches
>> host_matches(), maybe we can check how the two can fit together?
>>
>> Thanks,
>> Aniket
> > [jch: rewrapped long unreadable lines]
> > That topic also needs rework, unfortunately.
> >    https://lore.kernel.org/git/20260907211210.2621693-1-dev+git@drbeat.li/
> > I guess we can salvage the patches 1 and 2 with fairly trivial
> changes, namely with the style fix in [1/3], and pointer arithmetic
> that breaks later free() fix in [2/3].  I am not sure how involved
> it would be to fix [3/3] in such a way suggested by brian in the
> thread.
> > Thanks for reminding us of the old thread.
> I'm working on a new branch that uses OpenSSL's built-in hostname
verification. All this low level ASN.1 code will disappear as a result.
Best regards, Beat
Previous: Junio C HamanoNext: Xiangfei Ding
Message 5 of 6 in “imap-send: use ASN1_STRING_length”
  1. imap-send: use ASN1_STRING_lengthXiangfei Ding, Oct 11, 2026
  2. Junio C HamanoOct 11, 2026
  3. Aniket GuptaOct 12, 2026
  4. Junio C HamanoOct 12, 2026
  5. Beat BolliOct 12, 2026
  6. Xiangfei DingOct 19, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.