2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A#include <cryptoutil.h>
2N/A#include "softGlobal.h"
2N/A#include "softCrypt.h"
2N/A#include "softSession.h"
2N/A#include "softObject.h"
2N/A#include "softKeys.h"
2N/A#include "softKeystore.h"
2N/A#include "softKeystoreUtil.h"
2N/A * to hold some information during encryption/decryption and
2N/A if (pin_initialized) {
2N/A * encryption/decryption of the private objects in
2N/A if (ks_cryptpin)
2N/A if (pin_initialized) {
2N/A ulOldPinLen) != 0) {
2N/A if (ks_cryptpin)
2N/A if (tmp_old_pin)
2N/A if (tmp_new_pin)
2N/A while (extra_attr) {
2N/A return (CKR_HOST_MEMORY);
2N/A return (CKR_HOST_MEMORY);
2N/A return (CKR_HOST_MEMORY);
2N/A case CKO_PUBLIC_KEY:
2N/A case CKK_X9_42_DH:
2N/A case CKO_PRIVATE_KEY:
2N/A case CKK_X9_42_DH:
2N/A case CKO_SECRET_KEY:
2N/A case CKO_CERTIFICATE:
2N/A case CKC_X_509_ATTR_CERT:
2N/A case CKO_DOMAIN_PARAMETERS:
2N/A case CKO_PUBLIC_KEY:
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A case CKK_X9_42_DH:
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A case CKO_PRIVATE_KEY:
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A case CKK_X9_42_DH:
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A ((biginteger_t *)
2N/A case CKO_SECRET_KEY:
2N/A case CKO_CERTIFICATE:
2N/A ((cert_attr_t *)
2N/A ((cert_attr_t *)
2N/A case CKC_X_509_ATTR_CERT:
2N/A ((cert_attr_t *)
2N/A ((cert_attr_t *)
2N/A case CKO_DOMAIN_PARAMETERS:
2N/A case CKO_PUBLIC_KEY:
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pri_cleanup;
2N/A case CKK_X9_42_DH:
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A goto pub_cleanup;
2N/A case CKO_PRIVATE_KEY:
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A case CKK_X9_42_DH:
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A goto pri_cleanup;
2N/A case CKO_SECRET_KEY:
2N/A return (CKR_HOST_MEMORY);
2N/A return (CKR_HOST_MEMORY);
2N/A case CKO_CERTIFICATE:
2N/A return (CKR_HOST_MEMORY);
2N/A case CKC_X_509_ATTR_CERT:
2N/A case CKO_DOMAIN_PARAMETERS:
2N/A return (CKR_FUNCTION_FAILED);
2N/A return (CKR_FUNCTION_FAILED);
2N/A return (CKR_FUNCTION_FAILED);
2N/A return (CKR_FUNCTION_FAILED);
2N/A return (CKR_HOST_MEMORY);
2N/A return (CKR_HOST_MEMORY);
2N/A return (CKR_FUNCTION_FAILED);
2N/A return (CKR_HOST_MEMORY);
2N/A return (CKR_HOST_MEMORY);
2N/A return (CKR_CANT_LOCK);
2N/A return (CKR_HOST_MEMORY);
2N/A * are doing the real encryption/decryption this time.