4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
33 #include <security/pkcs11t.h>
34 #include "softObject.h"
35 #include "softSession.h"
38 * Function Prototypes.
40 CK_RV
soft_digest_init(soft_session_t
*, CK_MECHANISM_PTR
);
42 CK_RV
soft_digest(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
, CK_BYTE_PTR
,
45 CK_RV
soft_digest_update(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
);
47 CK_RV
soft_digest_final(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG_PTR
);
49 CK_RV
soft_digest_init_internal(soft_session_t
*, CK_MECHANISM_PTR
);
51 CK_RV
soft_digest_key(soft_session_t
*, soft_object_t
*);
53 CK_RV
soft_encrypt_init(soft_session_t
*, CK_MECHANISM_PTR
, soft_object_t
*);
55 CK_RV
soft_encrypt(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
, CK_BYTE_PTR
,
58 CK_RV
soft_encrypt_update(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
,
59 CK_BYTE_PTR
, CK_ULONG_PTR
);
61 CK_RV
soft_encrypt_final(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG_PTR
);
63 CK_RV
soft_encrypt_init_internal(soft_session_t
*, CK_MECHANISM_PTR
,
66 CK_RV
soft_decrypt_init(soft_session_t
*, CK_MECHANISM_PTR
, soft_object_t
*);
68 CK_RV
soft_decrypt(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
, CK_BYTE_PTR
,
71 CK_RV
soft_decrypt_update(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
,
72 CK_BYTE_PTR
, CK_ULONG_PTR
);
74 CK_RV
soft_decrypt_final(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG_PTR
);
76 CK_RV
soft_sign_init(soft_session_t
*, CK_MECHANISM_PTR
, soft_object_t
*);
78 CK_RV
soft_sign(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
, CK_BYTE_PTR
,
81 CK_RV
soft_sign_update(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
);
83 CK_RV
soft_sign_final(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG_PTR
);
85 CK_RV
soft_verify_init(soft_session_t
*, CK_MECHANISM_PTR
, soft_object_t
*);
87 CK_RV
soft_verify(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
, CK_BYTE_PTR
,
90 CK_RV
soft_verify_update(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
);
92 CK_RV
soft_verify_final(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
);
94 CK_RV
soft_sign_recover_init(soft_session_t
*, CK_MECHANISM_PTR
,
97 CK_RV
soft_sign_recover(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
, CK_BYTE_PTR
,
100 CK_RV
soft_verify_recover_init(soft_session_t
*, CK_MECHANISM_PTR
,
103 CK_RV
soft_verify_recover(soft_session_t
*, CK_BYTE_PTR
, CK_ULONG
, CK_BYTE_PTR
,
106 void soft_crypt_cleanup(soft_session_t
*, boolean_t
, boolean_t
);
108 void soft_sign_verify_cleanup(soft_session_t
*, boolean_t
, boolean_t
);
110 void soft_digest_cleanup(soft_session_t
*, boolean_t
);
116 #endif /* _SOFTOPS_H */