363N/A/*
7161N/A * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
363N/A */
363N/A
363N/A/*
363N/A * This product includes software developed by the OpenSSL Project for
363N/A * use in the OpenSSL Toolkit (http://www.openssl.org/).
363N/A *
363N/A * This project also referenced hw_pkcs11-0.9.7b.patch written by
363N/A * Afchine Madjlessi.
363N/A */
363N/A/*
363N/A * ====================================================================
363N/A * Copyright (c) 2000-2001 The OpenSSL Project. All rights reserved.
363N/A *
363N/A * Redistribution and use in source and binary forms, with or without
363N/A * modification, are permitted provided that the following conditions
363N/A * are met:
363N/A *
363N/A * 1. Redistributions of source code must retain the above copyright
363N/A * notice, this list of conditions and the following disclaimer.
363N/A *
363N/A * 2. Redistributions in binary form must reproduce the above copyright
363N/A * notice, this list of conditions and the following disclaimer in
363N/A * the documentation and/or other materials provided with the
363N/A * distribution.
363N/A *
363N/A * 3. All advertising materials mentioning features or use of this
363N/A * software must display the following acknowledgment:
363N/A * "This product includes software developed by the OpenSSL Project
363N/A * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
363N/A *
363N/A * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
363N/A * endorse or promote products derived from this software without
363N/A * prior written permission. For written permission, please contact
363N/A * licensing@OpenSSL.org.
363N/A *
363N/A * 5. Products derived from this software may not be called "OpenSSL"
363N/A * nor may "OpenSSL" appear in their names without prior written
363N/A * permission of the OpenSSL Project.
363N/A *
363N/A * 6. Redistributions of any form whatsoever must retain the following
363N/A * acknowledgment:
363N/A * "This product includes software developed by the OpenSSL Project
363N/A * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
363N/A *
363N/A * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
363N/A * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
363N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
363N/A * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
363N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
363N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
363N/A * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
363N/A * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
363N/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
363N/A * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
363N/A * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
363N/A * OF THE POSSIBILITY OF SUCH DAMAGE.
363N/A * ====================================================================
363N/A *
363N/A * This product includes cryptographic software written by Eric Young
363N/A * (eay@cryptsoft.com). This product includes software written by Tim
363N/A * Hudson (tjh@cryptsoft.com).
363N/A *
363N/A */
363N/A
2385N/A#ifndef E_PK11_ERR_H
2385N/A#define E_PK11_ERR_H
363N/A
419N/A#ifdef __cplusplus
419N/Aextern "C" {
419N/A#endif
419N/A
363N/Avoid ERR_pk11_error(int function, int reason, char *file, int line);
363N/Avoid PK11err_add_data(int function, int reason, CK_RV rv);
363N/A#define PK11err(f, r) ERR_pk11_error((f), (r), __FILE__, __LINE__)
363N/A
363N/A/* Error codes for the PK11 functions. */
363N/A
363N/A/* Function codes. */
363N/A
363N/A#define PK11_F_INIT 100
363N/A#define PK11_F_FINISH 101
363N/A#define PK11_F_DESTROY 102
363N/A#define PK11_F_CTRL 103
363N/A#define PK11_F_RSA_INIT 104
363N/A#define PK11_F_RSA_FINISH 105
363N/A#define PK11_F_GET_PUB_RSA_KEY 106
363N/A#define PK11_F_GET_PRIV_RSA_KEY 107
363N/A#define PK11_F_RSA_GEN_KEY 108
363N/A#define PK11_F_RSA_PUB_ENC 109
363N/A#define PK11_F_RSA_PRIV_ENC 110
363N/A#define PK11_F_RSA_PUB_DEC 111
363N/A#define PK11_F_RSA_PRIV_DEC 112
363N/A#define PK11_F_RSA_SIGN 113
363N/A#define PK11_F_RSA_VERIFY 114
363N/A#define PK11_F_RAND_ADD 115
363N/A#define PK11_F_RAND_BYTES 116
363N/A#define PK11_F_GET_SESSION 117
363N/A#define PK11_F_FREE_SESSION 118
363N/A#define PK11_F_LOAD_PUBKEY 119
363N/A#define PK11_F_LOAD_PRIVKEY 120
363N/A#define PK11_F_RSA_PUB_ENC_LOW 121
363N/A#define PK11_F_RSA_PRIV_ENC_LOW 122
363N/A#define PK11_F_RSA_PUB_DEC_LOW 123
363N/A#define PK11_F_RSA_PRIV_DEC_LOW 124
363N/A#define PK11_F_DSA_SIGN 125
363N/A#define PK11_F_DSA_VERIFY 126
363N/A#define PK11_F_DSA_INIT 127
363N/A#define PK11_F_DSA_FINISH 128
363N/A#define PK11_F_GET_PUB_DSA_KEY 129
363N/A#define PK11_F_GET_PRIV_DSA_KEY 130
363N/A#define PK11_F_DH_INIT 131
363N/A#define PK11_F_DH_FINISH 132
363N/A#define PK11_F_MOD_EXP_DH 133
363N/A#define PK11_F_GET_DH_KEY 134
363N/A#define PK11_F_FREE_ALL_SESSIONS 135
363N/A#define PK11_F_SETUP_SESSION 136
363N/A#define PK11_F_DESTROY_OBJECT 137
363N/A#define PK11_F_CIPHER_INIT 138
363N/A#define PK11_F_CIPHER_DO_CIPHER 139
363N/A#define PK11_F_GET_CIPHER_KEY 140
363N/A#define PK11_F_DIGEST_INIT 141
363N/A#define PK11_F_DIGEST_UPDATE 142
363N/A#define PK11_F_DIGEST_FINAL 143
363N/A#define PK11_F_CHOOSE_SLOT 144
363N/A#define PK11_F_CIPHER_FINAL 145
363N/A#define PK11_F_LIBRARY_INIT 146
363N/A#define PK11_F_LOAD 147
363N/A#define PK11_F_DH_GEN_KEY 148
363N/A#define PK11_F_DH_COMP_KEY 149
363N/A#define PK11_F_DIGEST_COPY 150
363N/A#define PK11_F_CIPHER_CLEANUP 151
363N/A#define PK11_F_ACTIVE_ADD 152
363N/A#define PK11_F_ACTIVE_DELETE 153
363N/A#define PK11_F_CHECK_HW_MECHANISMS 154
363N/A#define PK11_F_INIT_SYMMETRIC 155
363N/A#define PK11_F_ADD_AES_CTR_NIDS 156
363N/A#define PK11_F_INIT_ALL_LOCKS 157
363N/A#define PK11_F_RETURN_SESSION 158
363N/A#define PK11_F_GET_PIN 159
363N/A#define PK11_F_FIND_ONE_OBJECT 160
363N/A#define PK11_F_CHECK_TOKEN_ATTRS 161
363N/A#define PK11_F_CACHE_PIN 162
363N/A#define PK11_F_MLOCK_PIN_IN_MEMORY 163
363N/A#define PK11_F_TOKEN_LOGIN 164
363N/A#define PK11_F_TOKEN_RELOGIN 165
363N/A#define PK11_F_RUN_ASKPASS 166
363N/A
363N/A/* Reason codes. */
363N/A#define PK11_R_ALREADY_LOADED 100
363N/A#define PK11_R_DSO_FAILURE 101
363N/A#define PK11_R_NOT_LOADED 102
363N/A#define PK11_R_PASSED_NULL_PARAMETER 103
363N/A#define PK11_R_COMMAND_NOT_IMPLEMENTED 104
363N/A#define PK11_R_INITIALIZE 105
363N/A#define PK11_R_FINALIZE 106
363N/A#define PK11_R_GETINFO 107
363N/A#define PK11_R_GETSLOTLIST 108
363N/A#define PK11_R_NO_MODULUS_OR_NO_EXPONENT 109
363N/A#define PK11_R_ATTRIBUT_SENSITIVE_OR_INVALID 110
363N/A#define PK11_R_GETATTRIBUTVALUE 111
363N/A#define PK11_R_NO_MODULUS 112
363N/A#define PK11_R_NO_EXPONENT 113
363N/A#define PK11_R_FINDOBJECTSINIT 114
363N/A#define PK11_R_FINDOBJECTS 115
363N/A#define PK11_R_FINDOBJECTSFINAL 116
363N/A#define PK11_R_CREATEOBJECT 118
363N/A#define PK11_R_DESTROYOBJECT 119
363N/A#define PK11_R_OPENSESSION 120
363N/A#define PK11_R_CLOSESESSION 121
363N/A#define PK11_R_ENCRYPTINIT 122
363N/A#define PK11_R_ENCRYPT 123
363N/A#define PK11_R_SIGNINIT 124
363N/A#define PK11_R_SIGN 125
363N/A#define PK11_R_DECRYPTINIT 126
363N/A#define PK11_R_DECRYPT 127
363N/A#define PK11_R_VERIFYINIT 128
363N/A#define PK11_R_VERIFY 129
363N/A#define PK11_R_VERIFYRECOVERINIT 130
363N/A#define PK11_R_VERIFYRECOVER 131
363N/A#define PK11_R_GEN_KEY 132
363N/A#define PK11_R_SEEDRANDOM 133
363N/A#define PK11_R_GENERATERANDOM 134
363N/A#define PK11_R_INVALID_MESSAGE_LENGTH 135
363N/A#define PK11_R_UNKNOWN_ALGORITHM_TYPE 136
363N/A#define PK11_R_UNKNOWN_ASN1_OBJECT_ID 137
363N/A#define PK11_R_UNKNOWN_PADDING_TYPE 138
363N/A#define PK11_R_PADDING_CHECK_FAILED 139
363N/A#define PK11_R_DIGEST_TOO_BIG 140
363N/A#define PK11_R_MALLOC_FAILURE 141
363N/A#define PK11_R_CTRL_COMMAND_NOT_IMPLEMENTED 142
363N/A#define PK11_R_DATA_GREATER_THAN_MOD_LEN 143
363N/A#define PK11_R_DATA_TOO_LARGE_FOR_MODULUS 144
363N/A#define PK11_R_MISSING_KEY_COMPONENT 145
363N/A#define PK11_R_INVALID_SIGNATURE_LENGTH 146
363N/A#define PK11_R_INVALID_DSA_SIGNATURE_R 147
363N/A#define PK11_R_INVALID_DSA_SIGNATURE_S 148
363N/A#define PK11_R_INCONSISTENT_KEY 149
363N/A#define PK11_R_ENCRYPTUPDATE 150
363N/A#define PK11_R_DECRYPTUPDATE 151
363N/A#define PK11_R_DIGESTINIT 152
363N/A#define PK11_R_DIGESTUPDATE 153
363N/A#define PK11_R_DIGESTFINAL 154
363N/A#define PK11_R_ENCRYPTFINAL 155
363N/A#define PK11_R_DECRYPTFINAL 156
363N/A#define PK11_R_NO_PRNG_SUPPORT 157
363N/A#define PK11_R_GETTOKENINFO 158
363N/A#define PK11_R_DERIVEKEY 159
363N/A#define PK11_R_GET_OPERATION_STATE 160
363N/A#define PK11_R_SET_OPERATION_STATE 161
363N/A#define PK11_R_INVALID_HANDLE 162
363N/A#define PK11_R_KEY_OR_IV_LEN_PROBLEM 163
363N/A#define PK11_R_INVALID_OPERATION_TYPE 164
363N/A#define PK11_R_ADD_NID_FAILED 165
363N/A#define PK11_R_ATFORK_FAILED 166
363N/A#define PK11_R_TOKEN_LOGIN_FAILED 167
363N/A#define PK11_R_MORE_THAN_ONE_OBJECT_FOUND 168
363N/A#define PK11_R_INVALID_PKCS11_URI 169
363N/A#define PK11_R_COULD_NOT_READ_PIN 170
363N/A#define PK11_R_COULD_NOT_OPEN_COMMAND 171
363N/A#define PK11_R_PIPE_FAILED 172
363N/A#define PK11_R_PIN_NOT_READ_FROM_COMMAND 173
363N/A#define PK11_R_BAD_PASSPHRASE_SPEC 174
363N/A#define PK11_R_TOKEN_NOT_INITIALIZED 175
363N/A#define PK11_R_TOKEN_PIN_NOT_SET 176
363N/A#define PK11_R_TOKEN_PIN_NOT_PROVIDED 177
363N/A#define PK11_R_MISSING_OBJECT_LABEL 178
363N/A#define PK11_R_TOKEN_ATTRS_DO_NOT_MATCH 179
363N/A#define PK11_R_PRIV_KEY_NOT_FOUND 180
363N/A#define PK11_R_NO_OBJECT_FOUND 181
363N/A#define PK11_R_PIN_CACHING_POLICY_INVALID 182
363N/A#define PK11_R_SYSCONF_FAILED 183
363N/A#define PK11_R_MMAP_FAILED 183
363N/A#define PK11_R_PRIV_PROC_LOCK_MEMORY_MISSING 184
363N/A#define PK11_R_MLOCK_FAILED 185
363N/A#define PK11_R_FORK_FAILED 186
363N/A
419N/A#ifdef __cplusplus
419N/A}
419N/A#endif
2385N/A#endif /* E_PK11_ERR_H */