Skip to content

Commit

Permalink
PKCS11_generate_key remove from DEPRECATED
Browse files Browse the repository at this point in the history
PKCS11_generate_key was removed from the DEPRECATED list when the
internal implementation changed from generating the key material in
software and storing to the HSM to generating in the HSM directly
through the PKCS#11 call C_GenerateKeyPair.

However, commit:
  - c1c2753 C89 fixes and style unification

Added that routine back to the DEPRECATED list even though the internal
implementation was corrected. This appears to be some form of a merge
bug.

Fixes: #377

Signed-off-by: William Roberts <william.c.roberts@intel.com>
  • Loading branch information
William Roberts authored and mtrojnar committed Jan 6, 2021
1 parent d03aa89 commit d601508
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/libp11.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,22 @@ extern int PKCS11_store_private_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *l
*/
extern int PKCS11_store_public_key(PKCS11_TOKEN * token, EVP_PKEY * pk, char *label, unsigned char *id, size_t id_len);

/**
* Generate and store a private key on the token
*
* @param token token returned by PKCS11_find_token()
* @param algorithm IGNORED (still here to retro-compatibility)
* @param bits size of the modulus in bits
* @param label label for this key
* @param id bytes to use as id value
* @param id_len length of id value.
* @retval 0 success
* @retval -1 error
*/
extern int PKCS11_generate_key(PKCS11_TOKEN * token,
int algorithm, unsigned int bits,
char *label, unsigned char* id, size_t id_len);

/**
* Store certificate on a token
*
Expand Down Expand Up @@ -427,22 +443,6 @@ extern void ERR_load_PKCS11_strings(void);
* duplicate the functionality OpenSSL provides for EVP_PKEY objects
*/

/**
* Generate a private key on the token
*
* @param token token returned by PKCS11_find_token()
* @param algorithm IGNORED (still here for backward compatibility)
* @param bits size of the modulus in bits
* @param label label for this key
* @param id bytes to use as the id value
* @param id_len length of the id value
* @retval 0 success
* @retval -1 error
*/
P11_DEPRECATED_FUNC extern int PKCS11_generate_key(PKCS11_TOKEN * token,
int algorithm, unsigned int bits,
char *label, unsigned char* id, size_t id_len);

/* Get the RSA key modulus size (in bytes) */
P11_DEPRECATED_FUNC extern int PKCS11_get_key_size(PKCS11_KEY *);

Expand Down

0 comments on commit d601508

Please sign in to comment.