open-license-manager / licensecc

Software licensing, copy protection in C++. It has few dependencies and it's cross-platform.
http://open-license-manager.github.io/licensecc/
BSD 3-Clause "New" or "Revised" License
990 stars 315 forks source link

crash when using 4096 bits rsa key on windows #165

Open shekmun opened 5 months ago

shekmun commented 5 months ago

I'm compling licensecc on windows with ssl. And I generate the private_key.rsa with 4096 bits (the default is 1024 bits).

When I test with open-license-manager/examples/simple_pc_identifier the program crashes without any information.

I try to locate the crash points. It first crashes at acquire_license in the example.cpp. And finnaly it's at unsigned int len = BIO_read(biosig, (void*)buffer, signatureB64.size()); in the file licensecc\src\library\os\openssl\signature_verifier.cpp. I print the signatureB64.size() and it's 684 bytes long so I try to change unsigned char buffer[512]; to unsigned char buffer[1024];, no more crashes.

Maybe someone can change the 512 to 1024 and commit it.