diff options
| author | tb <> | 2025-12-21 07:14:47 +0000 |
|---|---|---|
| committer | tb <> | 2025-12-21 07:14:47 +0000 |
| commit | f6a49b32fda99b726ad5b4434bcade613dccf49e (patch) | |
| tree | 0c1d11bfbfc0e5a5ef4e43b8e2b2f81f56cda4ff /src/lib/libcrypto/stack/stack_local.h | |
| parent | 6ed4f26853f67c46fbd8cc721454414ad7318eae (diff) | |
| download | openbsd-f6a49b32fda99b726ad5b4434bcade613dccf49e.tar.gz openbsd-f6a49b32fda99b726ad5b4434bcade613dccf49e.tar.bz2 openbsd-f6a49b32fda99b726ad5b4434bcade613dccf49e.zip | |
Reimplement ASN1_PRINTABLE_type() dance in ca.c
In ca.c, there is some minimal validation of strings in the subject of
a certificate. ASN1_PRINTABLE_type() is silly API that only exists for
this one call. I want to remove a_print.c in the next major bump.
ASN1_PRINTABLE_type() returns V_ASN1_PRINTABLESTRING if all characters
belong to the specific subset of ASCII listed in X.680, 41.4, Table 10.
Otherwise it returns V_ASN1_T61STRING or V_ASN1_IA5STRING depending on
whether there is a character with the high bit set or not.
With this in mind, the logic in ca.c comes down to this: blindly allow
UTF-8, BMP and T61 strings. All other strings get rejected if the high
bit of some character is set, or if the string is printable and there
is a non-printable character.
ok jsing kenjiro
Diffstat (limited to 'src/lib/libcrypto/stack/stack_local.h')
0 files changed, 0 insertions, 0 deletions
