Commit 9c17d5d
committed
support ASN ShortInts up to 4 bytes (2^32-1):
* parameterize MAX_LENGTH_SZ using overrideable WOLFSSL_ASN_MAX_LENGTH_SZ, default value 5 (raised from 4).
* refactor other Misc_ASN constants to refer to MAX_LENGTH_SZ as appropriate.
* tweak BytePrecision() appropriately.
* refactor SetShortInt() to use BytePrecision() and include a length assert against MAX_SHORT_SZ to assure no buffer overruns with reduced WOLFSSL_ASN_MAX_LENGTH_SZ.1 parent 03a8271 commit 9c17d5d
2 files changed
Lines changed: 32 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
320 | 318 | | |
321 | 319 | | |
322 | 320 | | |
323 | 321 | | |
324 | 322 | | |
325 | 323 | | |
326 | 324 | | |
327 | | - | |
| 325 | + | |
328 | 326 | | |
329 | 327 | | |
330 | 328 | | |
| |||
3139 | 3137 | | |
3140 | 3138 | | |
3141 | 3139 | | |
3142 | | - | |
| 3140 | + | |
3143 | 3141 | | |
3144 | 3142 | | |
3145 | | - | |
| 3143 | + | |
3146 | 3144 | | |
3147 | | - | |
3148 | 3145 | | |
3149 | | - | |
3150 | | - | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
3151 | 3153 | | |
3152 | 3154 | | |
3153 | | - | |
3154 | | - | |
3155 | | - | |
| 3155 | + | |
| 3156 | + | |
3156 | 3157 | | |
3157 | 3158 | | |
3158 | | - | |
3159 | | - | |
3160 | | - | |
3161 | | - | |
3162 | | - | |
3163 | | - | |
3164 | | - | |
3165 | | - | |
| 3159 | + | |
| 3160 | + | |
3166 | 3161 | | |
3167 | | - | |
3168 | | - | |
3169 | | - | |
3170 | | - | |
3171 | | - | |
3172 | | - | |
3173 | | - | |
3174 | | - | |
| 3162 | + | |
| 3163 | + | |
3175 | 3164 | | |
3176 | | - | |
3177 | | - | |
3178 | | - | |
| 3165 | + | |
3179 | 3166 | | |
3180 | 3167 | | |
3181 | | - | |
| 3168 | + | |
3182 | 3169 | | |
3183 | 3170 | | |
3184 | 3171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
901 | 901 | | |
902 | 902 | | |
903 | 903 | | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
904 | 908 | | |
905 | 909 | | |
906 | 910 | | |
| |||
943 | 947 | | |
944 | 948 | | |
945 | 949 | | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
953 | 957 | | |
954 | | - | |
| 958 | + | |
955 | 959 | | |
956 | | - | |
957 | | - | |
| 960 | + | |
| 961 | + | |
958 | 962 | | |
959 | 963 | | |
960 | 964 | | |
| |||
0 commit comments