# openssl-pkcs11-export **Repository Path**: mirrors_kernel_googlesource/openssl-pkcs11-export ## Basic Information - **Project Name**: openssl-pkcs11-export - **Description**: No description available - **Primary Language**: Unknown - **License**: LGPL-2.1 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-19 - **Last Updated**: 2025-12-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README PKCS11 Token support for openssl keys ===================================== This system is designed to build a PKCS11 token library (openssl-pkcs11.so) which is usable by any PKCS11 accepting program (like p11-kit, libp11 or ssh). It has mostly been tested with p11-kit and the pkcs11 engine of openssl. Architecture ------------ Architecturally, PKCS11 has one shared object that drives multiple "slots" which may or may not be populated with "tokens", but which may only have zero or one token. Each token may have multiple objects, of which one type is key. Each key has a public component, viewable without logging into the token and a private component which can only be used if the token has been logged into. The login occurs at the token level, so every object in the token is unlocked by the single token login event. Openssl has public and private key files. Public key files are technically unnecessary because the private key files contain all the data. However if a private key file is locked with a password, all the data, including the public parts is encyrpted. Since a token is required to show public data without requiring a login, *both* the public and private openssl keys must be specified to build the token. Further, since it is impossible to know if key files have identical passwords, the mapping paradigm is going to have to be one public/private key pair per token, meaning each token in the openssl engine will have two and only two key objects. Configuration ------------- Each key pair token must be configured. By default this is with a file in your home directory under ${HOME}/.config/openssl-pkcs11/openssl-pkcs11.conf But the file may be overridden by setting the OPENSSL_PKCS11_CONF environment variable to point to the config file. The configuration file is a classic ini file format. It has a global section which sets the library manufacturere and description with manufacturer id = library description = However, these aren't necessary: they will show up in p11-kit list-modules, but they're not part of the token URIs. Keys are specified as [] private key = public key = And the following are optional and add to the token parameters id = label =