Commit d9579da1 authored by Geoff Simmons's avatar Geoff Simmons

name the enum for hash algorithms

parent a03a76e4
...@@ -29,5 +29,5 @@ Makefile.in ...@@ -29,5 +29,5 @@ Makefile.in
/src/vcc_if.c /src/vcc_if.c
/src/vcc_if.h /src/vcc_if.h
/src/vmod_*rst /src/vmod_*rst
/src/parse_encoding.c /src/parse_algorithm.c
/src/parse_encoding.h /src/parse_algorithm.h
...@@ -12,15 +12,15 @@ libvmod_blobdigest_la_SOURCES = \ ...@@ -12,15 +12,15 @@ libvmod_blobdigest_la_SOURCES = \
nodist_libvmod_blobdigest_la_SOURCES = \ nodist_libvmod_blobdigest_la_SOURCES = \
vcc_if.c \ vcc_if.c \
vcc_if.h \ vcc_if.h \
parse_encoding.h \ parse_algorithm.h \
parse_encoding.c parse_algorithm.c
parse_encoding.h: parse_encoding.c parse_algorithm.h: parse_algorithm.c
parse_encoding.c: gen_enum_parse.pl parse_algorithm.c: gen_enum_parse.pl
@PERL@ $(srcdir)/gen_enum_parse.pl parse_encoding.c parse_encoding.h @PERL@ $(srcdir)/gen_enum_parse.pl parse_algorithm.c parse_algorithm.h
vmod_blobdigest.lo: vcc_if.c vcc_if.h parse_encoding.h vmod_blobdigest.lo: vcc_if.c vcc_if.h parse_algorithm.h
vcc_if.c: vcc_if.h vcc_if.c: vcc_if.h
...@@ -45,5 +45,5 @@ CLEANFILES = \ ...@@ -45,5 +45,5 @@ CLEANFILES = \
$(builddir)/vcc_if.h \ $(builddir)/vcc_if.h \
$(builddir)/vmod_blobdigest.rst \ $(builddir)/vmod_blobdigest.rst \
$(builddir)/vmod_blobdigest.man.rst \ $(builddir)/vmod_blobdigest.man.rst \
$(builddir)/parse_encoding.h \ $(builddir)/parse_algorithm.h \
$(builddir)/parse_encoding.c $(builddir)/parse_algorithm.c
...@@ -130,12 +130,12 @@ _OUT($h_out, <<'EOF'); ...@@ -130,12 +130,12 @@ _OUT($h_out, <<'EOF');
EOF EOF
_OUT($h_out, _OUT($h_out,
"enum encoding {\n\t_INVALID = 0,\n\t". "enum algorithm {\n\t_INVALID = 0,\n\t".
join(",\n\t", @vals).",\n\t__MAX_ENCODING\n};\n"); join(",\n\t", @vals).",\n\t__MAX_ALGORITHM\n};\n");
_OUT($h_out, <<'EOF'); _OUT($h_out, <<'EOF');
enum encoding parse_encoding (const char *); enum algorithm parse_algorithm (const char *);
EOF EOF
...@@ -149,10 +149,10 @@ _OUT($c_out, <<EOF); ...@@ -149,10 +149,10 @@ _OUT($c_out, <<EOF);
EOF EOF
_OUT($c_out, <<'EOF'); _OUT($c_out, <<'EOF');
enum encoding enum algorithm
parse_encoding (const char *m) { parse_algorithm (const char *m) {
int p; int p;
enum encoding r; enum algorithm r;
EOF EOF
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "vsha256.h" #include "vsha256.h"
#include "vcc_if.h" #include "vcc_if.h"
#include "parse_encoding.h" #include "parse_algorithm.h"
#define ERR(ctx, msg) \ #define ERR(ctx, msg) \
errmsg((ctx), "vmod blobcode error: " msg) errmsg((ctx), "vmod blobcode error: " msg)
...@@ -71,7 +71,7 @@ errmsg(VRT_CTX, const char *fmt, ...) ...@@ -71,7 +71,7 @@ errmsg(VRT_CTX, const char *fmt, ...)
VCL_BLOB VCL_BLOB
vmod_hash(VRT_CTX, VCL_ENUM hashs, VCL_BLOB msg) vmod_hash(VRT_CTX, VCL_ENUM hashs, VCL_BLOB msg)
{ {
/* enum encoding hash = parse_encoding(hashs); */ /* enum algorithm hash = parse_algorithm(hashs); */
struct vmod_priv *b; struct vmod_priv *b;
char *snap; char *snap;
SHA256_CTX hashctx[1]; SHA256_CTX hashctx[1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment