2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A#
define LOG_STDERR -
1 /* cryptoerror() log to stderr, not syslog */ 2N/A/* keywords and delimiters for parsing configuration files */ 2N/A * Define the following softtoken values that are used by softtoken 2N/A * library, cryptoadm and pktool command. 2N/A "Sun Crypto Softtoken " \
2N/A/* Return codes for pkcs11_parse_uri() */ 2N/A * There is no limit for the attribute length in the spec. 256 bytes should be 2N/A * enough for the object name. 2N/A * CKA_ID is of type "byte array" which can be of arbitrary length. 256 bytes 2N/A * should be sufficient though. 2N/A/* Structure for the PKCS#11 URI. */ 2N/A /* CKA_LABEL attribute to the C_FindObjectsInit function. */ 2N/A * CKA_CLASS attribute to the C_FindObjectsInit function. The 2N/A * "objecttype" URI attribute can have a value one of "private", 2N/A * "public", "cert", "secretkey", and "data". The "objecttype" field can 2N/A * have a value of CKO_PUBLIC_KEY, CKO_PRIVATE_KEY, CKO_CERTIFICATE, 2N/A * CKO_SECRET_KEY, and CKO_DATA. This attribute cannot be empty in the 2N/A /* CKO_DATA is 0 so we need this flag. Not part of the URI itself. */ 2N/A * Token, manufacturer, serial and model are of fixed size length in 2N/A * the specification. We allocate memory on the fly to distinguish 2N/A * between an attribute not present and an empty value. We check for 2N/A * overflows. We always terminate the string with '\0' even when that is 2N/A * not used in the PKCS#11's CK_TOKEN_INFO structure (fields are padded 2N/A /* Token label from CK_TOKEN_INFO. */ 2N/A /* ManufacturerID from CK_TOKEN_INFO. */ 2N/A /* SerialNumber from CK_TOKEN_INFO. */ 2N/A /* Model from CK_TOKEN_INFO. */ 2N/A /* This is a byte array, we need a length parameter as well. */ 2N/A * Location of the file with a token PIN. Application can overload this, 2N/A * eg. "/bin/askpass|" may mean to read the PIN from a command. However, 2N/A * the pkcs11_parse_uri() function does not interpret this field in any 2N/A#
endif /* _CRYPTOUTIL_H */