Skip to content

Support RSA_NO_PADDING signature requests from OpenSSL#22

Closed
selvanair wants to merge 1 commit intoOpenSC:masterfrom
selvanair:raw-rsa-sign
Closed

Support RSA_NO_PADDING signature requests from OpenSSL#22
selvanair wants to merge 1 commit intoOpenSC:masterfrom
selvanair:raw-rsa-sign

Conversation

@selvanair
Copy link
Contributor

When PSS padding is in use, OpenSSL pre-pads the data and
requests signature with padding=RSA_NO_PADDING. Handle this
using CKM_RSA_X_509 as the mechanism.

Signed-off-by: Selva Nair selva.nair@gmail.com

Copy link
Member

@alonbl alonbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

else if (padding == RSA_NO_PADDING) {
mech = CKM_RSA_X_509;
}
else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please convert this to switch statement?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also sync __pkcs11h_openssl_rsa_dec?

@alonbl
Copy link
Member

alonbl commented Apr 22, 2019

Please also rename patch title to:

openssl: Support RSA_NO_PADDING padding

Or something similar.

Thanks!

When PSS padding is in use, OpenSSL pre-pads the data and
requests signature with padding=RSA_NO_PADDING. Handle this
using CKM_RSA_X_509 as the mechanism.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
@selvanair
Copy link
Contributor Author

Changes:

  • if .. else --> switch
  • handle RSA_NO_PADDING in the decrypt callback as well
  • update the patch title

@alonbl
Copy link
Member

alonbl commented Apr 22, 2019

Thanks!

@alonbl alonbl closed this Apr 22, 2019
@selvanair selvanair deleted the raw-rsa-sign branch April 22, 2019 14:56
@asomers
Copy link

asomers commented Dec 11, 2019

Why was this PR closed? The issue is still present, and the patch works for me.

@selvanair
Copy link
Contributor Author

It was committed to master in April see commit c192bb4 ...

@asomers
Copy link

asomers commented Dec 11, 2019

Sorry; I missed that somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants