diff options
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> | 2013-07-29 16:16:59 -0400 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2013-07-29 16:18:07 -0400 |
commit | 694c35faa87b858ecdadfe4fc592615f4eefbb07 (patch) | |
tree | 2a78abdba3549d11ff88460d03ff67ce152ae59c /usr/src/uts/common/crypto | |
parent | 36f7455d36b60be70d7aae5959fa19e71954678e (diff) | |
download | illumos-joyent-694c35faa87b858ecdadfe4fc592615f4eefbb07.tar.gz |
3882 Remove xmod & friends
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/uts/common/crypto')
-rw-r--r-- | usr/src/uts/common/crypto/io/Makefile | 59 | ||||
-rw-r--r-- | usr/src/uts/common/crypto/io/aes.c | 42 | ||||
-rw-r--r-- | usr/src/uts/common/crypto/io/arcfour.c | 14 | ||||
-rw-r--r-- | usr/src/uts/common/crypto/io/blowfish.c | 34 | ||||
-rw-r--r-- | usr/src/uts/common/crypto/io/rsa.c | 40 |
5 files changed, 0 insertions, 189 deletions
diff --git a/usr/src/uts/common/crypto/io/Makefile b/usr/src/uts/common/crypto/io/Makefile deleted file mode 100644 index 7288a6a061..0000000000 --- a/usr/src/uts/common/crypto/io/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# uts/common/crypto/io/Makefile -# -# include global definitions -include ../../../../Makefile.master - -.KEEP_STATE: - -# EXPORT DELETE START -EXPORT_SRC: - $(RM) Makefile+ aes.c+ arcfour.c+ blowfish.c+ dprov.c+ rsa.c+ - sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ - < aes.c > aes.c+ - $(MV) aes.c+ aes.c - sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ - < arcfour.c > arcfour.c+ - $(MV) arcfour.c+ arcfour.c - sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ - < blowfish.c > blowfish.c+ - $(MV) blowfish.c+ blowfish.c - sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ - < dprov.c > dprov.c+ - $(MV) dprov.c+ dprov.c - sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ - < rsa.c > rsa.c+ - $(MV) rsa.c+ rsa.c - sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ - < Makefile > Makefile+ - $(RM) Makefile - $(MV) Makefile+ Makefile - $(CHMOD) 444 Makefile aes.c arcfour.c blowfish.c dprov.c rsa.c - -# EXPORT DELETE END diff --git a/usr/src/uts/common/crypto/io/aes.c b/usr/src/uts/common/crypto/io/aes.c index 626058cefa..4ce7e51380 100644 --- a/usr/src/uts/common/crypto/io/aes.c +++ b/usr/src/uts/common/crypto/io/aes.c @@ -306,8 +306,6 @@ aes_check_mech_param(crypto_mechanism_t *mechanism, aes_ctx_t **ctx, int kmflag) return (rv); } -/* EXPORT DELETE START */ - /* * Initialize key schedules for AES */ @@ -336,8 +334,6 @@ init_keysched(crypto_key_t *key, void *newbie) return (CRYPTO_SUCCESS); } -/* EXPORT DELETE END */ - /* * KCF software provider control entry points. */ @@ -372,9 +368,6 @@ aes_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, boolean_t is_encrypt_init) { - -/* EXPORT DELETE START */ - aes_ctx_t *aes_ctx; int rv; int kmflag; @@ -400,8 +393,6 @@ aes_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, ctx->cc_provider_private = aes_ctx; -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -427,8 +418,6 @@ aes_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext, { int ret = CRYPTO_FAILED; -/* EXPORT DELETE START */ - aes_ctx_t *aes_ctx; size_t saved_length, saved_offset, length_needed; @@ -534,8 +523,6 @@ aes_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext, ASSERT(aes_ctx->ac_remainder_len == 0); (void) aes_free_context(ctx); -/* EXPORT DELETE END */ - return (ret); } @@ -546,8 +533,6 @@ aes_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, { int ret = CRYPTO_FAILED; -/* EXPORT DELETE START */ - aes_ctx_t *aes_ctx; off_t saved_offset; size_t saved_length, length_needed; @@ -652,8 +637,6 @@ aes_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, cleanup: (void) aes_free_context(ctx); -/* EXPORT DELETE END */ - return (ret); } @@ -825,9 +808,6 @@ static int aes_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) { - -/* EXPORT DELETE START */ - aes_ctx_t *aes_ctx; int ret; @@ -878,8 +858,6 @@ aes_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, (void) aes_free_context(ctx); -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -888,9 +866,6 @@ static int aes_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) { - -/* EXPORT DELETE START */ - aes_ctx_t *aes_ctx; int ret; off_t saved_offset; @@ -987,8 +962,6 @@ aes_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, (void) aes_free_context(ctx); -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -1294,9 +1267,6 @@ aes_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; @@ -1327,8 +1297,6 @@ aes_create_ctx_template(crypto_provider_handle_t provider, *tmpl = keysched; *tmpl_size = size; -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -1336,9 +1304,6 @@ aes_create_ctx_template(crypto_provider_handle_t provider, static int aes_free_context(crypto_ctx_t *ctx) { - -/* EXPORT DELETE START */ - aes_ctx_t *aes_ctx = ctx->cc_provider_private; if (aes_ctx != NULL) { @@ -1352,8 +1317,6 @@ aes_free_context(crypto_ctx_t *ctx) ctx->cc_provider_private = NULL; } -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -1364,9 +1327,6 @@ aes_common_init_ctx(aes_ctx_t *aes_ctx, crypto_spi_ctx_template_t *template, boolean_t is_encrypt_init) { int rv = CRYPTO_SUCCESS; - -/* EXPORT DELETE START */ - void *keysched; size_t size; @@ -1444,8 +1404,6 @@ aes_common_init_ctx(aes_ctx_t *aes_ctx, crypto_spi_ctx_template_t *template, } } -/* EXPORT DELETE END */ - return (rv); } diff --git a/usr/src/uts/common/crypto/io/arcfour.c b/usr/src/uts/common/crypto/io/arcfour.c index fe6a64497d..81fe549684 100644 --- a/usr/src/uts/common/crypto/io/arcfour.c +++ b/usr/src/uts/common/crypto/io/arcfour.c @@ -201,9 +201,6 @@ rc4_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 */ - ARCFour_key *keystream; if ((mechanism)->cm_type != RC4_MECH_INFO_TYPE) @@ -229,8 +226,6 @@ rc4_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, ctx->cc_provider_private = keystream; -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -255,8 +250,6 @@ rc4_crypt_update(crypto_ctx_t *ctx, crypto_data_t *input, crypto_data_t *output, { int ret = CRYPTO_SUCCESS; -/* EXPORT DELETE START */ - ARCFour_key *key; off_t saveoffset; @@ -484,8 +477,6 @@ rc4_crypt_update(crypto_ctx_t *ctx, crypto_data_t *input, crypto_data_t *output, output->cd_offset = saveoffset; output->cd_length = input->cd_length; -/* EXPORT DELETE END */ - return (ret); } @@ -527,9 +518,6 @@ rc4_crypt_atomic(crypto_provider_handle_t handle, crypto_session_id_t session, static int rc4_free_context(crypto_ctx_t *ctx) { - -/* EXPORT DELETE START */ - ARCFour_key *keystream = ctx->cc_provider_private; if (keystream != NULL) { @@ -538,8 +526,6 @@ rc4_free_context(crypto_ctx_t *ctx) ctx->cc_provider_private = NULL; } -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } diff --git a/usr/src/uts/common/crypto/io/blowfish.c b/usr/src/uts/common/crypto/io/blowfish.c index f475f1e961..6c53ae2f13 100644 --- a/usr/src/uts/common/crypto/io/blowfish.c +++ b/usr/src/uts/common/crypto/io/blowfish.c @@ -240,7 +240,6 @@ _info(struct modinfo *modinfop) static int init_keysched(crypto_key_t *key, void *keysched) { -/* EXPORT DELETE START */ /* * Only keys by value are supported by this module. */ @@ -256,7 +255,6 @@ init_keysched(crypto_key_t *key, void *keysched) } blowfish_init_keysched(key->ck_data, key->ck_length, keysched); -/* EXPORT DELETE END */ return (CRYPTO_SUCCESS); } @@ -278,9 +276,6 @@ 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; @@ -320,8 +315,6 @@ blowfish_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, ctx->cc_provider_private = blowfish_ctx; -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -345,8 +338,6 @@ blowfish_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext, { int ret; -/* EXPORT DELETE START */ - blowfish_ctx_t *blowfish_ctx; /* @@ -378,8 +369,6 @@ blowfish_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext, ASSERT(blowfish_ctx->bc_remainder_len == 0); (void) blowfish_free_context(ctx); -/* EXPORT DELETE END */ - /* LINTED */ return (ret); } @@ -391,8 +380,6 @@ blowfish_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, { int ret; -/* EXPORT DELETE START */ - blowfish_ctx_t *blowfish_ctx; /* @@ -424,8 +411,6 @@ blowfish_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, ASSERT(blowfish_ctx->bc_remainder_len == 0); (void) blowfish_free_context(ctx); -/* EXPORT DELETE END */ - /* LINTED */ return (ret); } @@ -561,9 +546,6 @@ 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); @@ -580,8 +562,6 @@ blowfish_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, (void) blowfish_free_context(ctx); data->cd_length = 0; -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -590,9 +570,6 @@ 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); @@ -609,8 +586,6 @@ blowfish_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, (void) blowfish_free_context(ctx); data->cd_length = 0; -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -797,9 +772,6 @@ 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; @@ -825,8 +797,6 @@ blowfish_create_ctx_template(crypto_provider_handle_t provider, *tmpl = keysched; *tmpl_size = size; -/* EXPORT DELETE END */ - return (CRYPTO_SUCCESS); } @@ -859,8 +829,6 @@ blowfish_common_init_ctx(blowfish_ctx_t *blowfish_ctx, { int rv = CRYPTO_SUCCESS; -/* EXPORT DELETE START */ - void *keysched; size_t size; @@ -898,7 +866,5 @@ blowfish_common_init_ctx(blowfish_ctx_t *blowfish_ctx, } } -/* EXPORT DELETE END */ - return (rv); } diff --git a/usr/src/uts/common/crypto/io/rsa.c b/usr/src/uts/common/crypto/io/rsa.c index 6bb2f5b181..3542051a96 100644 --- a/usr/src/uts/common/crypto/io/rsa.c +++ b/usr/src/uts/common/crypto/io/rsa.c @@ -315,13 +315,9 @@ static int rsa_verify_common(rsa_mech_type_t, crypto_key_t *, crypto_data_t *, crypto_data_t *); static int compare_data(crypto_data_t *, uchar_t *); -/* EXPORT DELETE START */ - static int core_rsa_encrypt(crypto_key_t *, uchar_t *, int, uchar_t *, int); static int core_rsa_decrypt(crypto_key_t *, uchar_t *, int, uchar_t *); -/* EXPORT DELETE END */ - static crypto_kcf_provider_handle_t rsa_prov_handle = NULL; int @@ -373,8 +369,6 @@ check_mech_and_key(crypto_mechanism_t *mechanism, crypto_key_t *key) { int rv = CRYPTO_FAILED; -/* EXPORT DELETE START */ - uchar_t *modulus; ssize_t modulus_len; /* In bytes */ @@ -397,8 +391,6 @@ check_mech_and_key(crypto_mechanism_t *mechanism, crypto_key_t *key) modulus_len > MAX_RSA_KEYLENGTH_IN_BYTES) return (CRYPTO_KEY_SIZE_RANGE); -/* EXPORT DELETE END */ - return (rv); } @@ -598,8 +590,6 @@ rsa_encrypt_common(rsa_mech_type_t mech_type, crypto_key_t *key, { int rv = CRYPTO_FAILED; -/* EXPORT DELETE START */ - int plen; uchar_t *ptptr; uchar_t *modulus; @@ -656,13 +646,9 @@ rsa_encrypt_common(rsa_mech_type_t mech_type, crypto_key_t *key, ciphertext->cd_length = modulus_len; } -/* EXPORT DELETE END */ - return (rv); } -/* EXPORT DELETE START */ - static int core_rsa_encrypt(crypto_key_t *key, uchar_t *in, int in_len, uchar_t *out, int is_public) @@ -704,8 +690,6 @@ core_rsa_encrypt(crypto_key_t *key, uchar_t *in, return (rv); } -/* EXPORT DELETE END */ - /* ARGSUSED */ static int rsaprov_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, @@ -752,8 +736,6 @@ rsa_decrypt_common(rsa_mech_type_t mech_type, crypto_key_t *key, { int rv = CRYPTO_FAILED; -/* EXPORT DELETE START */ - size_t plain_len; uchar_t *ctptr; uchar_t *modulus; @@ -802,13 +784,9 @@ rsa_decrypt_common(rsa_mech_type_t mech_type, crypto_key_t *key, plaintext->cd_length = plain_len; } -/* EXPORT DELETE END */ - return (rv); } -/* EXPORT DELETE START */ - static int core_rsa_decrypt(crypto_key_t *key, uchar_t *in, int in_len, uchar_t *out) { @@ -863,8 +841,6 @@ core_rsa_decrypt(crypto_key_t *key, uchar_t *in, int in_len, uchar_t *out) return (rv); } -/* EXPORT DELETE END */ - /* ARGSUSED */ static int rsa_sign_verify_common_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, @@ -961,8 +937,6 @@ rsa_digest_svrfy_common(digest_rsa_ctx_t *ctxp, crypto_data_t *data, { int rv = CRYPTO_FAILED; -/* EXPORT DELETE START */ - uchar_t digest[SHA512_DIGEST_LENGTH]; /* The der_data size is enough for MD5 also */ uchar_t der_data[SHA512_DIGEST_LENGTH + SHA2_DER_PREFIX_Len]; @@ -1068,8 +1042,6 @@ rsa_digest_svrfy_common(digest_rsa_ctx_t *ctxp, crypto_data_t *data, rv = rsa_verify_common(mech_type, ctxp->key, &der_cd, signature); -/* EXPORT DELETE END */ - return (rv); } @@ -1079,8 +1051,6 @@ rsa_sign_common(rsa_mech_type_t mech_type, crypto_key_t *key, { int rv = CRYPTO_FAILED; -/* EXPORT DELETE START */ - int dlen; uchar_t *dataptr, *modulus; ssize_t modulus_len; @@ -1149,8 +1119,6 @@ rsa_sign_common(rsa_mech_type_t mech_type, crypto_key_t *key, signature->cd_length = modulus_len; } -/* EXPORT DELETE END */ - return (rv); } @@ -1297,8 +1265,6 @@ rsa_verify_common(rsa_mech_type_t mech_type, crypto_key_t *key, { int rv = CRYPTO_FAILED; -/* EXPORT DELETE START */ - uchar_t *sigptr, *modulus; ssize_t modulus_len; uchar_t plain_data[MAX_RSA_KEYLENGTH_IN_BYTES]; @@ -1346,8 +1312,6 @@ rsa_verify_common(rsa_mech_type_t mech_type, crypto_key_t *key, rv = CRYPTO_SIGNATURE_INVALID; } -/* EXPORT DELETE END */ - return (rv); } @@ -1503,8 +1467,6 @@ rsa_verify_recover_common(rsa_mech_type_t mech_type, crypto_key_t *key, { int rv = CRYPTO_FAILED; -/* EXPORT DELETE START */ - size_t data_len; uchar_t *sigptr, *modulus; ssize_t modulus_len; @@ -1551,8 +1513,6 @@ rsa_verify_recover_common(rsa_mech_type_t mech_type, crypto_key_t *key, return (rv); data->cd_length = data_len; -/* EXPORT DELETE END */ - return (rv); } |