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);
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 **/
#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);
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;
}
return 0;
}
-krb5_error_code
+void
k5_nss_stream_free_state(krb5_data *state)
{
struct stream_state *sstate = (struct stream_state *) state->data;
PK11_DestroyContext(sstate->ctx, PR_TRUE);
}
free(sstate);
- return 0;
}
krb5_error_code
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
/* 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
#define RC4_KEY_SIZE 16
#define RC4_BLOCK_SIZE 1
-/* Interface layer to kerb5 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);
+/* Interface layer to krb5 crypto layer */
/* The workhorse of the arcfour system,
* this impliments the cipher
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;
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;