diff options
author | David Howells <dhowells@redhat.com> | 2012-12-05 11:55:30 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-12-14 13:06:42 +1030 |
commit | 99cca91e370ab9224755365dda98b78eb5a5417f (patch) | |
tree | 03a7b0db1f061657a7498fc2c46b616bf877ae0b | |
parent | facc0a6bd494ce21e31b34fc355ecf702518272b (diff) | |
download | linux-99cca91e370ab9224755365dda98b78eb5a5417f.tar.gz linux-99cca91e370ab9224755365dda98b78eb5a5417f.tar.bz2 linux-99cca91e370ab9224755365dda98b78eb5a5417f.zip |
ASN.1: Use the ASN1_LONG_TAG and ASN1_INDEFINITE_LENGTH constants
Use the ASN1_LONG_TAG and ASN1_INDEFINITE_LENGTH constants in the ASN.1
general decoder instead of the equivalent numbers.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | lib/asn1_decoder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c index de2c8b5a715b..7bd2188ed939 100644 --- a/lib/asn1_decoder.c +++ b/lib/asn1_decoder.c @@ -81,7 +81,7 @@ next_tag: goto next_tag; } - if (unlikely((tag & 0x1f) == 0x1f)) { + if (unlikely((tag & 0x1f) == ASN1_LONG_TAG)) { do { if (unlikely(datalen - dp < 2)) goto data_overrun_error; @@ -96,7 +96,7 @@ next_tag: goto next_tag; } - if (unlikely(len == 0x80)) { + if (unlikely(len == ASN1_INDEFINITE_LENGTH)) { /* Indefinite length */ if (unlikely((tag & ASN1_CONS_BIT) == ASN1_PRIM << 5)) goto indefinite_len_primitive; @@ -222,7 +222,7 @@ next_op: if (unlikely(dp >= datalen - 1)) goto data_overrun_error; tag = data[dp++]; - if (unlikely((tag & 0x1f) == 0x1f)) + if (unlikely((tag & 0x1f) == ASN1_LONG_TAG)) goto long_tag_not_supported; if (op & ASN1_OP_MATCH__ANY) { @@ -254,7 +254,7 @@ next_op: len = data[dp++]; if (len > 0x7f) { - if (unlikely(len == 0x80)) { + if (unlikely(len == ASN1_INDEFINITE_LENGTH)) { /* Indefinite length */ if (unlikely(!(tag & ASN1_CONS_BIT))) goto indefinite_len_primitive; |