diff options
author | Gerald Combs <gerald@wireshark.org> | 2007-01-02 22:49:57 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2007-01-02 22:49:57 +0000 |
commit | 53689800e6eff70913b237b513ab5db7ce742da2 (patch) | |
tree | 67e32c486f4dfc1e2784b27c71eb2aadb8a2dd09 /asn1/cms | |
parent | 77694f8b8e69ac9c074e0ff1076bcda0a9a6877d (diff) |
Move epan/crypt-md5.[ch] to epan/crypt. Remove
epan/crypt/airpdcap_md5.[ch]. Fix up whitespace.
svn path=/trunk/; revision=20277
Diffstat (limited to 'asn1/cms')
-rw-r--r-- | asn1/cms/packet-cms-template.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/asn1/cms/packet-cms-template.c b/asn1/cms/packet-cms-template.c index d8bda3f085..1364a58dbb 100644 --- a/asn1/cms/packet-cms-template.c +++ b/asn1/cms/packet-cms-template.c @@ -41,7 +41,7 @@ #include "packet-x509if.h" #include <epan/sha1.h> -#include <epan/crypt-md5.h> +#include <epan/crypt/crypt-md5.h> #define PNAME "Cryptographic Message Syntax" #define PSNAME "CMS" @@ -92,7 +92,7 @@ cms_verify_msg_digest(proto_item *pi, tvbuff_t *content, const char *alg, tvbuff sha1_starts(&sha1_ctx); - sha1_update(&sha1_ctx, tvb_get_ptr(content, 0, tvb_length(content)), + sha1_update(&sha1_ctx, tvb_get_ptr(content, 0, tvb_length(content)), tvb_length(content)); sha1_finish(&sha1_ctx, digest_buf); @@ -103,19 +103,19 @@ cms_verify_msg_digest(proto_item *pi, tvbuff_t *content, const char *alg, tvbuff md5_init(&md5_ctx); - md5_append(&md5_ctx, tvb_get_ptr(content, 0, tvb_length(content)), + md5_append(&md5_ctx, tvb_get_ptr(content, 0, tvb_length(content)), tvb_length(content)); - + md5_finish(&md5_ctx, digest_buf); buffer_size = MD5_BUFFER_SIZE; } if(buffer_size) { - /* compare our computed hash with what we have received */ + /* compare our computed hash with what we have received */ if(tvb_bytes_exist(tvb, offset, buffer_size) && - (memcmp(tvb_get_ptr(tvb, offset, buffer_size), digest_buf, buffer_size) != 0)) { + (memcmp(tvb_get_ptr(tvb, offset, buffer_size), digest_buf, buffer_size) != 0)) { proto_item_append_text(pi, " [incorrect, should be "); for(i = 0; i < buffer_size; i++) proto_item_append_text(pi, "%02X", digest_buf[i]); |