[Swan-dev] lib/libswan/asn1.c: eliminate loop from is_printablestring()
Andrew Cagney
andrew.cagney at gmail.com
Sat Nov 3 20:38:15 UTC 2018
On Sat, 3 Nov 2018 at 10:40, D. Hugh Redelmeier <hugh at vault.libreswan.fi> wrote:
> commit 62a04f2022e4b450d87b0f9eacb1ea7840c2701f
> Author: D. Hugh Redelmeier <hugh at mimosa.com>
> Date: Sat Nov 3 10:28:49 2018 -0400
>
> lib/libswan/asn1.c: eliminate loop from is_printablestring()
>
> A bounded version of strspn(3) would be the best for this routine but
> none exists so a bit of a dance must be done with the last byte of the
> chunk.
I have to ask. Could isprint() be used, or is there ASN.1 magic
involved in the decision of what is printable?
(yea, there isn't shunk_strspn())
Andrew
More information about the Swan-dev
mailing list