svn rev #24682: trunk/src/lib/crypto/ krb/ nss/ nss/enc_provider/ openssl/enc_provider/
ghudson@MIT.EDU
ghudson at MIT.EDU
Sat Mar 5 09:00:38 EST 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=24682
Commit By: ghudson
Log Message:
Make enc provider free_state function return void.
Changed Files:
U trunk/src/lib/crypto/krb/crypto_int.h
U trunk/src/lib/crypto/krb/default_state.c
U trunk/src/lib/crypto/nss/enc_provider/enc_gen.c
U trunk/src/lib/crypto/nss/enc_provider/rc4.c
U trunk/src/lib/crypto/nss/nss_gen.h
U trunk/src/lib/crypto/openssl/enc_provider/rc4.c
Modified: trunk/src/lib/crypto/krb/crypto_int.h
===================================================================
--- trunk/src/lib/crypto/krb/crypto_int.h 2011-03-05 13:51:00 UTC (rev 24681)
+++ trunk/src/lib/crypto/krb/crypto_int.h 2011-03-05 14:00:38 UTC (rev 24682)
@@ -54,7 +54,7 @@
krb5_error_code (*init_state)(const krb5_keyblock *key,
krb5_keyusage keyusage,
krb5_data *out_state);
- krb5_error_code (*free_state)(krb5_data *state);
+ void (*free_state)(krb5_data *state);
/* May be NULL if there is no key-derived data cached. */
void (*key_cleanup)(krb5_key key);
@@ -369,7 +369,7 @@
krb5_data *new_state);
/* Default state cleanup handler (used by module enc providers). */
-krb5_error_code krb5int_default_free_state(krb5_data *state);
+void krb5int_default_free_state(krb5_data *state);
/*** Input/output vector processing declarations **/
Modified: trunk/src/lib/crypto/krb/default_state.c
===================================================================
--- trunk/src/lib/crypto/krb/default_state.c 2011-03-05 13:51:00 UTC (rev 24681)
+++ trunk/src/lib/crypto/krb/default_state.c 2011-03-05 14:00:38 UTC (rev 24682)
@@ -32,8 +32,9 @@
#include "crypto_int.h"
-krb5_error_code krb5int_des_init_state
-(const krb5_keyblock *key, krb5_keyusage usage, krb5_data *new_state )
+krb5_error_code
+krb5int_des_init_state(const krb5_keyblock *key, krb5_keyusage usage,
+ krb5_data *new_state)
{
new_state->length = 8;
new_state->data = (void *) malloc(8);
@@ -49,13 +50,12 @@
return 0;
}
-krb5_error_code krb5int_default_free_state
-(krb5_data *state)
+void
+krb5int_default_free_state(krb5_data *state)
{
if (state->data) {
free (state->data);
state-> data = NULL;
state->length = 0;
}
- return 0;
}
Modified: trunk/src/lib/crypto/nss/enc_provider/enc_gen.c
===================================================================
--- trunk/src/lib/crypto/nss/enc_provider/enc_gen.c 2011-03-05 13:51:00 UTC (rev 24681)
+++ trunk/src/lib/crypto/nss/enc_provider/enc_gen.c 2011-03-05 14:00:38 UTC (rev 24682)
@@ -269,7 +269,7 @@
return 0;
}
-krb5_error_code
+void
k5_nss_stream_free_state(krb5_data *state)
{
struct stream_state *sstate = (struct stream_state *) state->data;
@@ -280,7 +280,6 @@
PK11_DestroyContext(sstate->ctx, PR_TRUE);
}
free(sstate);
- return 0;
}
krb5_error_code
Modified: trunk/src/lib/crypto/nss/enc_provider/rc4.c
===================================================================
--- trunk/src/lib/crypto/nss/enc_provider/rc4.c 2011-03-05 13:51:00 UTC (rev 24681)
+++ trunk/src/lib/crypto/nss/enc_provider/rc4.c 2011-03-05 14:00:38 UTC (rev 24682)
@@ -67,10 +67,10 @@
data, num_data);
}
-static krb5_error_code
+static void
k5_arcfour_free_state(krb5_data *state)
{
- return k5_nss_stream_free_state(state);
+ (void)k5_nss_stream_free_state(state);
}
static krb5_error_code
Modified: trunk/src/lib/crypto/nss/nss_gen.h
===================================================================
--- trunk/src/lib/crypto/nss/nss_gen.h 2011-03-05 13:51:00 UTC (rev 24681)
+++ trunk/src/lib/crypto/nss/nss_gen.h 2011-03-05 14:00:38 UTC (rev 24682)
@@ -98,7 +98,7 @@
/* Stream state management calls. */
krb5_error_code k5_nss_stream_init_state(krb5_data *new_state);
-krb5_error_code k5_nss_stream_free_state(krb5_data *state);
+void k5_nss_stream_free_state(krb5_data *state);
/*
* Common hash functions
Modified: trunk/src/lib/crypto/openssl/enc_provider/rc4.c
===================================================================
--- trunk/src/lib/crypto/openssl/enc_provider/rc4.c 2011-03-05 13:51:00 UTC (rev 24681)
+++ trunk/src/lib/crypto/openssl/enc_provider/rc4.c 2011-03-05 14:00:38 UTC (rev 24682)
@@ -53,15 +53,8 @@
#define RC4_KEY_SIZE 16
#define RC4_BLOCK_SIZE 1
-/* Interface layer to kerb5 crypto layer */
+/* Interface layer to krb5 crypto layer */
-/* prototypes */
-static krb5_error_code
-k5_arcfour_free_state ( krb5_data *state);
-static krb5_error_code
-k5_arcfour_init_state (const krb5_keyblock *key,
- krb5_keyusage keyusage, krb5_data *new_state);
-
/* The workhorse of the arcfour system,
* this impliments the cipher
*/
@@ -119,8 +112,8 @@
return 0;
}
-static krb5_error_code
-k5_arcfour_free_state ( krb5_data *state)
+static void
+k5_arcfour_free_state(krb5_data *state)
{
struct arcfour_state *arcstate = (struct arcfour_state *) state->data;
@@ -128,12 +121,11 @@
if (arcstate && arcstate->loopback == arcstate)
EVP_CIPHER_CTX_cleanup(&arcstate->ctx);
free(arcstate);
- return 0;
}
static krb5_error_code
-k5_arcfour_init_state (const krb5_keyblock *key,
- krb5_keyusage keyusage, krb5_data *new_state)
+k5_arcfour_init_state(const krb5_keyblock *key,
+ krb5_keyusage keyusage, krb5_data *new_state)
{
struct arcfour_state *arcstate;
More information about the cvs-krb5
mailing list