mirror of
https://github.com/curl/curl.git
synced 2026-08-25 15:53:39 +03:00
x509asn1: improve encodeOID
- return error on zero length input - return error on OOM or doing too large output - fix full 32-bit number support - fix the broken handling of the first and second numbers - support up to 32-bit minus 80 for the second number - a field with a leading 0x80 is now considered an error, since it only works as padding and is then no longer the shortest possible version Add unit tests in 1666 Bonus: removed the last argument to OID2str() as it was always set TRUE. Closes #21003
This commit is contained in:
parent
ce51fb493c
commit
673e14cd33
5 changed files with 285 additions and 30 deletions
|
|
@ -222,6 +222,7 @@ test1640 test1641 test1642 test1643 \
|
|||
\
|
||||
test1650 test1651 test1652 test1653 test1654 test1655 test1656 test1657 \
|
||||
test1658 test1659 test1660 test1661 test1662 test1663 test1664 test1665 \
|
||||
test1666 \
|
||||
\
|
||||
test1670 test1671 \
|
||||
\
|
||||
|
|
|
|||
20
tests/data/test1666
Normal file
20
tests/data/test1666
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="US-ASCII"?>
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
unittest
|
||||
encodeOID
|
||||
x509asn1
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<features>
|
||||
unittest
|
||||
</features>
|
||||
<name>
|
||||
encodeOID unit tests
|
||||
</name>
|
||||
</client>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue