OpenSSL win error Openssl_uplink (58d46000,08): No Openssl_applink

Source: Internet
Author: User

Python uses M2crypto to read and write files, always quote:
Openssl_uplink (58d46000,08): No Openssl_applink
Functions related to file IO cannot be directly manipulated when using OpenSSL under the Windows platform. Because MS/UPLINK.C will get the MS/APPLINK.C function table dynamically from the current EXE, the logic is
void Openssl_uplink (volatile void **table, int index)
{
HANDLE h = getmodulehandle (NULL) GetProcAddress (H, "Openssl_applink") }
。 If you want to use it, you must also link MS/UPLINK.C when you link the exe. When Python uses m2crypto, if you manipulate the file, you can first create a Memorybuffer BIO object, and then read Memorybuffer as a string and manually write the string to the file.
Print "generating a private/public-bit key pair for Bob ..."Bob= M2Crypto.RSA.gen_key (1024, 65537)ifOs.name = ='NT': MB=M2Crypto.BIO.MemoryBuffer () bob.save_key_bio (MB, None) with open ('Bob-private.pem','WB') as F:f.write (Mb.read_all ())Else: Bob.save_key ('Bob-private.pem', None)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.