Skip to content

p11tool: fix admin user PIN initialization

Nikos Mavrogiannopoulos requested to merge tmp-initialize-so-pin-fix into master

Previously we would call gnutls_pkcs11_token_set_pin() without an old PIN provided, which will result to the use of C_InitPIN() on the underlying module. The C_InitPIN() in contrast with C_SetPIN() will only work for the user and not for the administrator. As such, we always provide the oldpin for when we change the admin's PIN.

Checklist

  • Code modified for feature
  • Test suite updated with functionality tests
  • Documentation updated

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTION.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Nikos Mavrogiannopoulos

Merge request reports