Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions RSA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ C<-----BEGIN...-----> and C<-----END...-----> lines.
The padding is set to PKCS1_OAEP, but can be changed with the
C<use_xxx_padding> methods.

Note, PKCS1_OAEP can only be used for encryption. You must specifically
call use_pkcs1_pss_padding (or use_pkcs1_pss_padding) prior to signing
operations.
Note, PKCS1_OAEP can only be used for encryption. You must call
C<use_pkcs1_pss_padding> prior to signing operations.

=item new_private_key

Expand Down Expand Up @@ -252,7 +251,7 @@ While B<use_no_padding> can be used for encryption or signature operations
B<use_pkcs1_pss_padding> is used for signature operations and
B<use_pkcs1_oaep_padding> is used for encryption operations.

Version 0.38 sets the appropriate padding for each operation unless
On OpenSSL 3.x, the appropriate padding is set for each operation unless
B<use_no_padding> is called before either operation.

B<Note:> while C<pkcs1-pss> is the effective replacement for <pkcs1> your
Expand Down Expand Up @@ -374,7 +373,7 @@ C<Crypt::OpenSSL::Bignum> module must be installed for this to work.

=item is_private

Return true if this is a private key, and false if it is private only.
Return true if this is a private key, and false if it is public only.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice catch


=back

Expand Down
1 change: 0 additions & 1 deletion RSA.xs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ generate_key(proto, bitsSV, exponent = 65537)
CHECK_OPEN_SSL(EVP_PKEY_generate(ctx, &rsa) == 1);
CHECK_OPEN_SSL(rsa != NULL);

e = NULL;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice catch too, why setting it to null before calling free?

BN_free(e);
EVP_PKEY_CTX_free(ctx);
#endif
Expand Down