Print this page
3882 remove xmod & friends
@@ -238,11 +238,10 @@
* Initialize key schedules for blowfish
*/
static int
init_keysched(crypto_key_t *key, void *keysched)
{
-/* EXPORT DELETE START */
/*
* Only keys by value are supported by this module.
*/
switch (key->ck_format) {
case CRYPTO_KEY_RAW:
@@ -254,11 +253,10 @@
default:
return (CRYPTO_KEY_TYPE_INCONSISTENT);
}
blowfish_init_keysched(key->ck_data, key->ck_length, keysched);
-/* EXPORT DELETE END */
return (CRYPTO_SUCCESS);
}
/*
* KCF software provider control entry points.
@@ -276,13 +274,10 @@
static int
blowfish_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism,
crypto_key_t *key, crypto_spi_ctx_template_t template,
crypto_req_handle_t req)
{
-
-/* EXPORT DELETE START */
-
blowfish_ctx_t *blowfish_ctx;
int rv;
int kmflag;
/*
@@ -318,12 +313,10 @@
return (rv);
}
ctx->cc_provider_private = blowfish_ctx;
-/* EXPORT DELETE END */
-
return (CRYPTO_SUCCESS);
}
static void
blowfish_copy_block64(uint8_t *in, uint64_t *out)
@@ -343,12 +336,10 @@
blowfish_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext,
crypto_data_t *ciphertext, crypto_req_handle_t req)
{
int ret;
-/* EXPORT DELETE START */
-
blowfish_ctx_t *blowfish_ctx;
/*
* Plaintext must be a multiple of blowfish block size.
* This test only works for non-padded mechanisms
@@ -376,12 +367,10 @@
*/
ret = blowfish_encrypt_update(ctx, plaintext, ciphertext, req);
ASSERT(blowfish_ctx->bc_remainder_len == 0);
(void) blowfish_free_context(ctx);
-/* EXPORT DELETE END */
-
/* LINTED */
return (ret);
}
/* ARGSUSED */
@@ -389,12 +378,10 @@
blowfish_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
crypto_data_t *plaintext, crypto_req_handle_t req)
{
int ret;
-/* EXPORT DELETE START */
-
blowfish_ctx_t *blowfish_ctx;
/*
* Ciphertext must be a multiple of blowfish block size.
* This test only works for non-padded mechanisms
@@ -422,12 +409,10 @@
*/
ret = blowfish_decrypt_update(ctx, ciphertext, plaintext, req);
ASSERT(blowfish_ctx->bc_remainder_len == 0);
(void) blowfish_free_context(ctx);
-/* EXPORT DELETE END */
-
/* LINTED */
return (ret);
}
/* ARGSUSED */
@@ -559,13 +544,10 @@
/* ARGSUSED */
static int
blowfish_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_req_handle_t req)
{
-
-/* EXPORT DELETE START */
-
blowfish_ctx_t *blowfish_ctx;
ASSERT(ctx->cc_provider_private != NULL);
blowfish_ctx = ctx->cc_provider_private;
@@ -578,23 +560,18 @@
return (CRYPTO_DATA_LEN_RANGE);
(void) blowfish_free_context(ctx);
data->cd_length = 0;
-/* EXPORT DELETE END */
-
return (CRYPTO_SUCCESS);
}
/* ARGSUSED */
static int
blowfish_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data,
crypto_req_handle_t req)
{
-
-/* EXPORT DELETE START */
-
blowfish_ctx_t *blowfish_ctx;
ASSERT(ctx->cc_provider_private != NULL);
blowfish_ctx = ctx->cc_provider_private;
@@ -607,12 +584,10 @@
return (CRYPTO_ENCRYPTED_DATA_LEN_RANGE);
(void) blowfish_free_context(ctx);
data->cd_length = 0;
-/* EXPORT DELETE END */
-
return (CRYPTO_SUCCESS);
}
/* ARGSUSED */
static int
@@ -795,13 +770,10 @@
static int
blowfish_create_ctx_template(crypto_provider_handle_t provider,
crypto_mechanism_t *mechanism, crypto_key_t *key,
crypto_spi_ctx_template_t *tmpl, size_t *tmpl_size, crypto_req_handle_t req)
{
-
-/* EXPORT DELETE START */
-
void *keysched;
size_t size;
int rv;
if (!BLOWFISH_VALID_MECH(mechanism))
@@ -823,12 +795,10 @@
}
*tmpl = keysched;
*tmpl_size = size;
-/* EXPORT DELETE END */
-
return (CRYPTO_SUCCESS);
}
/* ARGSUSED */
static int
@@ -857,12 +827,10 @@
crypto_spi_ctx_template_t *template, crypto_mechanism_t *mechanism,
crypto_key_t *key, int kmflag)
{
int rv = CRYPTO_SUCCESS;
-/* EXPORT DELETE START */
-
void *keysched;
size_t size;
if (template == NULL) {
if ((keysched = blowfish_alloc_keysched(&size, kmflag)) == NULL)
@@ -896,9 +864,7 @@
bzero(keysched, size);
kmem_free(keysched, size);
}
}
-/* EXPORT DELETE END */
-
return (rv);
}