Commit abdca673 authored by Geoff Simmons's avatar Geoff Simmons

Forgot to add vfp_set_salt.c to Makefile.am.

This has entailed compiling it to an object file (rather than just
including it in vfp.c).
parent 4503d3aa
...@@ -12,6 +12,7 @@ libvmod_ece_la_SOURCES = \ ...@@ -12,6 +12,7 @@ libvmod_ece_la_SOURCES = \
rfc8188.h \ rfc8188.h \
vfp.c \ vfp.c \
vfp.h \ vfp.h \
vfp_set_salt.c \
foreign/vend.h \ foreign/vend.h \
keys.h keys.h
......
...@@ -105,11 +105,11 @@ struct ece { ...@@ -105,11 +105,11 @@ struct ece {
}; };
/* /*
* Include the set_salt() function if set-salt was enabled at configure * Declare the set_salt() function if set-salt was enabled at configure
* time * time.
*/ */
#ifdef ENABLE_SET_SALT #ifdef ENABLE_SET_SALT
#include "vfp_set_salt.c" enum vfp_status set_salt(struct vfp_ctx *ctx, uint8_t *salt);
#endif #endif
static inline void static inline void
......
...@@ -26,7 +26,18 @@ ...@@ -26,7 +26,18 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* Included from vfp.c only if set-salt was enabled at configure time. */ #include "config.h"
/* Used only if set-salt was enabled at configure time. */
#ifdef ENABLE_SET_SALT
#include <stdint.h>
#include <string.h>
#include "rfc8188.h"
#include "cache/cache.h"
#include "cache/cache_filter.h"
/* /*
* libcrypto base64 encodings use the alphabet [a-ZA-Z0-9/+] and = padding * libcrypto base64 encodings use the alphabet [a-ZA-Z0-9/+] and = padding
...@@ -41,7 +52,7 @@ ...@@ -41,7 +52,7 @@
#define SALT_B64_LEN 24 #define SALT_B64_LEN 24
#define SALT_DECODED_LEN (SALT_LEN + 2) #define SALT_DECODED_LEN (SALT_LEN + 2)
static enum vfp_status enum vfp_status
set_salt(struct vfp_ctx *ctx, uint8_t *salt) set_salt(struct vfp_ctx *ctx, uint8_t *salt)
{ {
const char *salt_b64; const char *salt_b64;
...@@ -62,3 +73,5 @@ set_salt(struct vfp_ctx *ctx, uint8_t *salt) ...@@ -62,3 +73,5 @@ set_salt(struct vfp_ctx *ctx, uint8_t *salt)
memcpy(salt, decoded, SALT_LEN); memcpy(salt, decoded, SALT_LEN);
return (VFP_OK); return (VFP_OK);
} }
#endif // ENABLE_SET_SALT
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