Skip to content

Commit

Permalink
Merge branch 'hmac_support' of github.com:mrash/fwknop into hmac_support
Browse files Browse the repository at this point in the history
Conflicts:
	client/fwknop.c
	lib/fko_hmac.c
  • Loading branch information
mrash committed Mar 10, 2013
2 parents 22dde8e + 6fa3be3 commit 7821e83
Show file tree
Hide file tree
Showing 10 changed files with 632 additions and 58 deletions.
4 changes: 2 additions & 2 deletions client/fwknop.c
Expand Up @@ -970,10 +970,10 @@ get_keys(fko_ctx_t ctx, fko_cli_options_t *options,

if (use_hmac)
{
res = fko_set_hmac_type(ctx, options->hmac_type);
res = fko_set_spa_hmac_type(ctx, options->hmac_type);
if(res != FKO_SUCCESS)
{
errmsg("fko_set_hmac_type", res);
errmsg("fko_set_spa_hmac_type", res);
exit(EXIT_FAILURE);
}
}
Expand Down
2 changes: 1 addition & 1 deletion fwknop.spec
Expand Up @@ -13,7 +13,7 @@
%define _mandir /usr/share/man

Name: fwknop
Version: 2.0.4
Version: 2.5.0b
Epoch: 1
Release: 1%{?dist}
Summary: Firewall Knock Operator client. An implementation of Single Packet Authorization.
Expand Down
4 changes: 2 additions & 2 deletions lib/fko.h
Expand Up @@ -53,7 +53,7 @@ extern "C" {

/* General params
*/
#define FKO_PROTOCOL_VERSION "2.0.4" /* The fwknop protocol version */
#define FKO_PROTOCOL_VERSION "2.5.0" /* The fwknop protocol version */

/* Supported FKO Message types...
*/
Expand Down Expand Up @@ -260,7 +260,7 @@ DLL_API int fko_set_raw_spa_digest(fko_ctx_t ctx);
DLL_API int fko_set_spa_encryption_type(fko_ctx_t ctx, const short encrypt_type);
DLL_API int fko_set_spa_encryption_mode(fko_ctx_t ctx, const int encrypt_mode);
DLL_API int fko_set_spa_data(fko_ctx_t ctx, const char * const enc_msg);
DLL_API int fko_set_hmac_type(fko_ctx_t ctx, const short hmac_type);
DLL_API int fko_set_spa_hmac_type(fko_ctx_t ctx, const short hmac_type);

/* Data processing and misc utility functions
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/fko_funcs.c
Expand Up @@ -218,7 +218,7 @@ fko_new_with_data(fko_ctx_t *r_ctx, const char * const enc_msg,
/* HMAC digest type
*/
ctx->initval = FKO_CTX_INITIALIZED;
res = fko_set_hmac_type(ctx, hmac_type);
res = fko_set_spa_hmac_type(ctx, hmac_type);
if(res != FKO_SUCCESS)
{
fko_destroy(ctx);
Expand Down
4 changes: 2 additions & 2 deletions lib/fko_hmac.c
Expand Up @@ -106,7 +106,7 @@ int fko_verify_hmac(fko_ctx_t ctx,
/* Calculate the HMAC from the encrypted data and then
* compare
*/
res = fko_set_hmac_type(ctx, ctx->hmac_type);
res = fko_set_spa_hmac_type(ctx, ctx->hmac_type);
if(res == FKO_SUCCESS)
{
res = fko_calculate_hmac(ctx, hmac_key, hmac_key_len);
Expand Down Expand Up @@ -143,7 +143,7 @@ fko_get_hmac_data(fko_ctx_t ctx, char **hmac_data)
/* Set the HMAC type
*/
int
fko_set_hmac_type(fko_ctx_t ctx, const short hmac_type)
fko_set_spa_hmac_type(fko_ctx_t ctx, const short hmac_type)
{
/* Must be initialized
*/
Expand Down
2 changes: 1 addition & 1 deletion perl/FKO/FKO.xs
Expand Up @@ -184,7 +184,7 @@ _set_hmac_type(ctx, hmac_type)
fko_ctx_t ctx;
short hmac_type;
CODE:
RETVAL = fko_set_hmac_type(ctx, hmac_type);
RETVAL = fko_set_spa_hmac_type(ctx, hmac_type);
OUTPUT:
RETVAL

Expand Down

0 comments on commit 7821e83

Please sign in to comment.