Hi,

On 08/10/18 02:13, Steffan Karger wrote:
> On 07-10-18 15:36, Antonio Quartulli wrote:
>> On 07/10/18 21:28, Antonio Quartulli wrote:
>>>> +#if defined(MBEDTLS_CHACHAPOLY_C) && (MBEDTLS_VERSION_NUMBER >= 
>>>> 0x020C0000)
>>>
>>> Why do we need the dual condition? Isn't MBEDTLS_CHACHAPOLY_C enough to
>>> know mbedTLS has what we need? Or you feel like we have to demand a
>>> specific mbedTLS version when using ChaCha20?
>>
>> Just to reinforce my argument: ChaCha20-Poly1305 was introduced with
>> ce66d5e8e (in mbedTLS upstream) and a quick search shows:
>>
>> mbedtls $ git tag --contains ce66d5e8e
>> mbedtls-2.12.0
>> mbedtls-2.13.0
>> mbedtls-2.13.1
>>
>> Given that 2.12 is 0x020C0000, I am fairly sure there is no reason to
>> have both conditions in the if guard.
>> But I might still be missing something.
>>
>> (p.s. I am arguing simply because I want to avoid more version-based
>> ifdef that may become new nightmares)
> 
> Which is a good cause, but that unfortunately won't work here. That is
> because the actual implementation was introduced in dca3a5d8, 
[CUT]

mbedtls $ git tag --contains dca3a5d8
mbedtls-2.12.0
mbedtls-2.13.0
mbedtls-2.13.1

To be safe I checked out 2.9.0 and grepped the define:

mbedtls $ git checkout mbedtls-2.9.0
Note: checking out 'mbedtls-2.9.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 070e35647 Merge remote-tracking branch
'upstream-restricted/pr/481' into development-restricted
mbedtls $ grep -rn CHACHAPOLY_C
mbedtls $

am I missing something?
2.12.0 is the first release where my grep command prints something.

Cheers,


-- 
Antonio Quartulli

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to