Commit b6b0966e authored by Brian Wellington's avatar Brian Wellington
Browse files

mode should be an unsigned int

parent b5da378f
......@@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: bsafe_link.c,v 1.2 1999/08/26 20:41:54 bwelling Exp $
* $Id: bsafe_link.c,v 1.3 1999/08/31 14:59:04 bwelling Exp $
*/
#include <config.h>
......@@ -81,7 +81,7 @@ static unsigned char pkcs1[] =
0x04, 0x10
};
static dst_result_t dst_bsafe_md5digest(const int mode,
static dst_result_t dst_bsafe_md5digest(const unsigned int mode,
B_ALGORITHM_OBJ *digest_obj,
isc_region_t *data,
isc_buffer_t *digest);
......@@ -89,10 +89,11 @@ static dst_result_t dst_bsafe_md5digest(const int mode,
static int dst_bsafe_key_size(RSA_Key *r_key);
static isc_boolean_t dst_s_bsafe_itemcmp(ITEM i1, ITEM i2);
static dst_result_t dst_bsafe_sign(const int mode, dst_key_t *key,
static dst_result_t dst_bsafe_sign(const unsigned int mode, dst_key_t *key,
void **context, isc_region_t *data,
isc_buffer_t *sig, isc_mem_t *mctx);
static dst_result_t dst_bsafe_verify(const int mode, dst_key_t *key,
static dst_result_t dst_bsafe_verify(const unsigned int mode,
dst_key_t *key,
void **context, isc_region_t *data,
isc_region_t *sig, isc_mem_t *mctx);
static isc_boolean_t dst_bsafe_compare(const dst_key_t *key1,
......@@ -147,7 +148,7 @@ dst_s_bsafe_init()
* !DST_R_SUCCESS Failure
*/
static dst_result_t
dst_bsafe_sign(const int mode, dst_key_t *key, void **context,
dst_bsafe_sign(const unsigned int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_buffer_t *sig, isc_mem_t *mctx)
{
int status = 0;
......@@ -272,7 +273,7 @@ dst_bsafe_sign(const int mode, dst_key_t *key, void **context,
* !DST_R_SUCCESS Failure
*/
static dst_result_t
dst_bsafe_verify(const int mode, dst_key_t *key, void **context,
dst_bsafe_verify(const unsigned int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_region_t *sig, isc_mem_t *mctx)
{
B_ALGORITHM_OBJ *md5_ctx = NULL;
......@@ -994,7 +995,7 @@ dst_bsafe_key_size(RSA_Key *key)
* if needed
*/
static dst_result_t
dst_bsafe_md5digest(const int mode, B_ALGORITHM_OBJ *digest_obj,
dst_bsafe_md5digest(const unsigned int mode, B_ALGORITHM_OBJ *digest_obj,
isc_region_t *data, isc_buffer_t *digest)
{
int status = 0;
......
......@@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.6 1999/08/27 15:56:33 bwelling Exp $
* $Id: dst_api.c,v 1.7 1999/08/31 14:59:08 bwelling Exp $
*/
#include <config.h>
......@@ -105,7 +105,7 @@ dst_supported_algorithm(const int alg) {
* !DST_R_SUCCESS Failure
*/
dst_result_t
dst_sign(const int mode, dst_key_t *key, dst_context_t *context,
dst_sign(const unsigned int mode, dst_key_t *key, dst_context_t *context,
isc_region_t *data, isc_buffer_t *sig)
{
RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
......@@ -152,7 +152,7 @@ dst_sign(const int mode, dst_key_t *key, dst_context_t *context,
*/
dst_result_t
dst_verify(const int mode, dst_key_t *key, dst_context_t *context,
dst_verify(const unsigned int mode, dst_key_t *key, dst_context_t *context,
isc_region_t *data, isc_region_t *sig)
{
RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
......
......@@ -57,12 +57,12 @@ struct dst_key {
};
struct dst_func {
dst_result_t (*sign)(const int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_buffer_t *sig,
isc_mem_t *mctx);
dst_result_t (*verify)(const int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_region_t *sig,
isc_mem_t *mctx);
dst_result_t (*sign)(const unsigned int mode, dst_key_t *key,
void **context, isc_region_t *data,
isc_buffer_t *sig, isc_mem_t *mctx);
dst_result_t (*verify)(const unsigned int mode, dst_key_t *key,
void **context, isc_region_t *data,
isc_region_t *sig, isc_mem_t *mctx);
isc_boolean_t (*compare)(const dst_key_t *key1, const dst_key_t *key2);
dst_result_t (*generate)(dst_key_t *key, int parms, isc_mem_t *mctx);
void (*destroy)(void *key, isc_mem_t *mctx);
......
......@@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: hmac_link.c,v 1.3 1999/08/26 20:41:54 bwelling Exp $
* $Id: hmac_link.c,v 1.4 1999/08/31 14:59:08 bwelling Exp $
*/
#include <config.h>
......@@ -53,10 +53,12 @@ typedef struct hmackey {
static struct dst_func hmacmd5_functions;
static dst_result_t dst_hmacmd5_sign(const int mode, dst_key_t *key,
static dst_result_t dst_hmacmd5_sign(const unsigned int mode,
dst_key_t *key,
void **context, isc_region_t *data,
isc_buffer_t *sig, isc_mem_t *mctx);
static dst_result_t dst_hmacmd5_verify(const int mode, dst_key_t *key,
static dst_result_t dst_hmacmd5_verify(const unsigned int mode,
dst_key_t *key,
void **context, isc_region_t *data,
isc_region_t *sig, isc_mem_t *mctx);
static isc_boolean_t dst_hmacmd5_compare(const dst_key_t *key1,
......@@ -111,7 +113,7 @@ dst_s_hmacmd5_init()
* !DST_R_SUCCESS Failure
*/
static dst_result_t
dst_hmacmd5_sign(const int mode, dst_key_t *key, void **context,
dst_hmacmd5_sign(const unsigned int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_buffer_t *sig, isc_mem_t *mctx)
{
isc_region_t r;
......@@ -179,7 +181,7 @@ dst_hmacmd5_sign(const int mode, dst_key_t *key, void **context,
* !DST_R_SUCCESS Failure
*/
static dst_result_t
dst_hmacmd5_verify(const int mode, dst_key_t *key, void **context,
dst_hmacmd5_verify(const unsigned int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_region_t *sig, isc_mem_t *mctx)
{
MD5_CTX *ctx = NULL;
......
......@@ -76,7 +76,7 @@ dst_supported_algorithm(const int alg);
* will contain a signature if all operations completed successfully.
*/
dst_result_t
dst_sign(const int mode, dst_key_t *key, dst_context_t *context,
dst_sign(const unsigned int mode, dst_key_t *key, dst_context_t *context,
isc_region_t *data, isc_buffer_t *sig);
/* Verify a signature on a block of data.
......@@ -93,7 +93,7 @@ dst_sign(const int mode, dst_key_t *key, dst_context_t *context,
* All allocated memory will be freed after the FINAL call.
*/
dst_result_t
dst_verify(const int mode, dst_key_t *key, dst_context_t *context,
dst_verify(const unsigned int mode, dst_key_t *key, dst_context_t *context,
isc_region_t *data, isc_region_t *sig);
/* Reads a key from permanent storage.
......
......@@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: openssl_link.c,v 1.3 1999/08/27 21:12:28 bwelling Exp $
* $Id: openssl_link.c,v 1.4 1999/08/31 14:59:08 bwelling Exp $
*/
#include <config.h>
......@@ -45,10 +45,12 @@
static struct dst_func openssl_functions;
static dst_result_t dst_openssl_sign(const int mode, dst_key_t *key,
static dst_result_t dst_openssl_sign(const unsigned int mode,
dst_key_t *key,
void **context, isc_region_t *data,
isc_buffer_t *sig, isc_mem_t *mctx);
static dst_result_t dst_openssl_verify(const int mode, dst_key_t *key,
static dst_result_t dst_openssl_verify(const unsigned int mode,
dst_key_t *key,
void **context, isc_region_t *data,
isc_region_t *sig, isc_mem_t *mctx);
static isc_boolean_t dst_openssl_compare(const dst_key_t *key1,
......@@ -108,7 +110,7 @@ dst_s_openssl_init()
* !DST_R_SUCCESS Failure
*/
static dst_result_t
dst_openssl_sign(const int mode, dst_key_t *key, void **context,
dst_openssl_sign(const unsigned int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_buffer_t *sig, isc_mem_t *mctx)
{
isc_region_t r;
......@@ -180,7 +182,7 @@ dst_openssl_sign(const int mode, dst_key_t *key, void **context,
* !DST_R_SUCCESS Failure
*/
static dst_result_t
dst_openssl_verify(const int mode, dst_key_t *key, void **context,
dst_openssl_verify(const unsigned int mode, dst_key_t *key, void **context,
isc_region_t *data, isc_region_t *sig, isc_mem_t *mctx)
{
int status = 0;
......
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