Lim::Plugin::SoftHSM - SoftHSM management plugin for Lim
Version 0.14
use Lim::Plugin::SoftHSM; # Create a Server object $server = Lim::Plugin::SoftHSM->Server; # Create a Client object $client = Lim::Plugin::SoftHSM->Client; # Create a CLI object $cli = Lim::Plugin::SoftHSM->CLI;
This plugin lets you manage a SoftHSM installation via Lim.
Returns the plugin's name.
Returns the plugin's description.
Returns a hash reference to the calls that can be made to this plugin, used both in Server and Client to verify input and output arguments.
See CALLS for list of calls and arguments.
Returns a hash reference to the CLI commands that can be made by this plugin.
See COMMANDS for list of commands and arguments.
See Lim::Component::Client on how calls and callback functions should be used.
Get the version of the plugin and version of SoftHSM found.
$response = { version => string, # Version of the plugin program => # Single hash or an array of hashes as below: { name => string, # Program name version => string, # Program version } };
Get a list of all config files that can be managed by this plugin.
$response = { file => # Single hash or an array of hashes as below: { name => string, # Full path file name read => bool, # True if readable write => bool, # True if writable } };
Create a new config file, returns an error if it failed to create the config file otherwise there is no response.
$input = { file => # Single hash or an array of hashes as below: { name => string, # Full path file name content => string, # Configuration content } };
Returns a config file as a content.
$input = { file => # Single hash or an array of hashes as below: { name => string, # Full path file name } }; $response = { file => # Single hash or an array of hashes as below: { name => string, # Full path file name content => string, # Configuration content } };
Update a config file, this will overwrite the file. Returns an error if it failed to update the config file otherwise there is no reponse.
Delete a config file, returns an error if it failed to delete the config file otherwise there is no reponse.
$input = { file => # Single hash or an array of hashes as below: { name => string, # Full path file name } };
Get a list of all SoftHSM slots that are available.
$response = { slot => # Single hash or an array of hashes as below: { id => integer, # Slot id token_initialized => bool, # True if the token has been initialized token_label => string, # Token label token_present => bool, # True if there is a token present user_pin_initialized => bool, # True if the user pin for the token has # been initialized } };
Initialize a slot, returns an error if it failed to initialize the slot otherwise there is no response.
$input = { token => # Single hash or an array of hashes as below: { slot => integer, # Slot id label => string, # Label pin => string, # User pin so_pin => string, # Security Officer pin } };
Import a key into a slot, returns an error if it failed to import the key otherwise there is no response.
$input = { key_pair => # Single hash or an array of hashes as below: { slot => integer, # Slot to import to id => string, # Key id label => string, # Key label pin => string, # User pin content => string, # Key in PKCS#8 format file_pin => string, # File pin if encrypted (optional) } };
Export a key from a slot, returns an error if it failed to export the key.
$input = { key_pair => # Single hash or an array of hashes as below: { slot => integer, # Slot to export from id => string, # Key id pin => string, # User pin file_pin => string, # File pin to use for encryption (optional) } }; $response = { key_pair => # Single hash or an array of hashes as below: { id => string, # Key id content => string, # Key in PKCS#8 format } };
Optimize the SoftHSM database, returns an error if it failed to optimize the database otherwise there is no response.
WARNING: Make sure that no application is currently using SoftHSM and session objects.
$input = { slot => # Single hash or an array of hashes as below: { id => integer, # Slot id pin => string, # User pin } };
Update the trusted status of a key, returns an error if it failed to update the key otherwise there is no response. Must have either key id or key label.
$input = { key_pair => # Single hash or an array of hashes as below: { slot => integer, # Slot where the key is id => string, # Key id (optional) label => string, # Key label (optional) type => string, # Key type so_pin => string, # Security Officer pin trusted => bool, # True if the key should be trusted } };
Show version of the plugin and SoftHSM.
List configuration files.
Display the content of a configuration file.
Edit a configuration file.
List information about SoftHSM slots.
Initialize a slot.
Import a key into SoftHSM from a local file.
Export a key from SoftHSM into a local file.
Optimize slot(s).
Mark a key as trusted.
Remove the trusted marking on a key.
Jerry Lundström, <lundstrom.jerry at gmail.com>
<lundstrom.jerry at gmail.com>
Please report any bugs or feature requests to https://github.com/jelu/lim-plugin-softhsm/issues.
You can find documentation for this module with the perldoc command.
perldoc Lim::Plugin::SoftHSM
You can also look for information at:
Lim issue tracker (report bugs here)
https://github.com/jelu/lim-plugin-softhsm/issues
Copyright 2012-2013 Jerry Lundström.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Lim::Plugin::SoftHSM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lim::Plugin::SoftHSM
CPAN shell
perl -MCPAN -e shell install Lim::Plugin::SoftHSM
For more information on module installation, please visit the detailed CPAN module installation guide.