<div dir="ltr"><div>Hi</div><div><br></div><div>I'm fairly certain I've found a bug in the pkcs11 plugin of libstrongswan and have created a fix and pull request for it: <a href="https://github.com/strongswan/strongswan/pull/96">https://github.com/strongswan/strongswan/pull/96</a> .</div><div>The issue is that it's not checked whether the second call to C_GetMechanismList is successful.</div><div>The code inside the if on line 904 (see [1]) will never be executed since rv must be equal to CKR_OK (since it hasn't changed since line 894 (see [2]) and the other path returns).</div><div><br></div><div>Please let me know what you think!</div><div><br></div><div>Best regards,</div><div>Leander <br></div><div><br></div><div>[1]: <a href="https://github.com/strongswan/strongswan/pull/96/files#diff-577eda617d31f6956747f215423b7941L904">https://github.com/strongswan/strongswan/pull/96/files#diff-577eda617d31f6956747f215423b7941L904</a> (rv != CKR_OK is always false)</div><div>[2]: <a href="https://github.com/strongswan/strongswan/pull/96/files#diff-577eda617d31f6956747f215423b7941L894">https://github.com/strongswan/strongswan/pull/96/files#diff-577eda617d31f6956747f215423b7941L894</a> (first assignment)</div></div>