Blame src/tests/asn.1/README
|
Packit |
fd8b60 |
krb5_encode_test runs through all the functions declared in
|
|
Packit |
fd8b60 |
src/include/krb5/asn.1/krb5_encode.h. It passes various sample
|
|
Packit |
fd8b60 |
inputs to each function and prints the result to standard
|
|
Packit |
fd8b60 |
output. This output should match the contents of the file
|
|
Packit |
fd8b60 |
"reference_encode.out".
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
Each function is first run with a relatively simple, contrived
|
|
Packit |
fd8b60 |
sample structure. Then if the structure has any optional parts,
|
|
Packit |
fd8b60 |
these parts are cleared and another run is made.
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
Some structures (namely, those containing a krb5_kdc_req_body)
|
|
Packit |
fd8b60 |
have a third run, due to the fact that two of the kdc_req_body's
|
|
Packit |
fd8b60 |
optional fields have mutually exclusive conditions under which
|
|
Packit |
fd8b60 |
they may be omitted.
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
krb5_decode_test runs through all the functions declared in
|
|
Packit |
fd8b60 |
src/include/krb5/asn.1/krb5_decode.h. It has the encodings in
|
|
Packit |
fd8b60 |
reference_encode.out hard-coded into itself. It sets up the
|
|
Packit |
fd8b60 |
krb5 structures the same way krb5_encode_test does, then passes
|
|
Packit |
fd8b60 |
its hard-coded encoding strings through the krb5 decoders.
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
The outputs of these functions are compared to the previously
|
|
Packit |
fd8b60 |
set-up structures in memory, and the results are reported to
|
|
Packit |
fd8b60 |
standard output. If every line comes out prefixed by "OK: ",
|
|
Packit |
fd8b60 |
then the decoders are working properly. If any decoder produces
|
|
Packit |
fd8b60 |
an anomalous output, then its output line will be prefixed by
|
|
Packit |
fd8b60 |
"ERROR: "
|