mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
When keys are generated concurrently in EKMF Web from multiple clients, and the key labels use a sequence number tag, then the assignment logic of the sequence number may cause a duplicate sequence number to be used, because another key might have already been generated with the same sequence number, since the next-to-use sequence number has been retrieved from EKMF Web. This results in a HTTP response code of 409 and a -EEXIST return code from ekmf_generate_key(). Instead of getting the last used sequence number from EKMFWeb, tell EKMFWeb to automatically use the next available sequence number when generating a key. When the sequence number label tag value is 'next' then EKMFWeb will automatically assign the next available sequence number to the label tag and increment the sequence number in an atomic way. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>