Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I use my own compiled openssl library to replace the deps/openssl #201

Open
ruhuang2001 opened this issue Dec 3, 2024 · 3 comments
Open

Comments

@ruhuang2001
Copy link
Contributor

I currently have a hardware acceleration cryptographic card that supports SM2/SM4. The cryptographic card provides an OpenSSL interface like these:

image

Now I want to test whether pipy can use the cryptographic card for acceleration, but I am having difficulty replacing OpenSSL. Do you have any suggestions to use these .so files.

Thanks a lot!

@keveinliu
Copy link
Collaborator

Hi,

You can use -DPIPY_OPENSSL=/path/to/your/lib to replace the default openssl lib directly If your APIs are compatible with openssl. Otherwise you may need to use nmi to support your APIs.

BTW, to use NMI, you could refer to samples/nmi.
Cheers,
Kevein

@naqvis
Copy link
Contributor

naqvis commented Dec 3, 2024

To use system installed openssl, all you have to do is use -DPIPY_USE_SYSTEM_OPENSSL=ON cmake option when compiling pipy to dynamically link against system installed openssl.

Make sure system installed openssl is discoverable by cmake or else compilation will fail.

@ruhuang2001
Copy link
Contributor Author

Thanks for reply!

You can use -DPIPY_OPENSSL=/path/to/your/lib to replace the default openssl lib directly If your APIs are compatible with openssl. Otherwise you may need to use nmi to support your APIs.

The password card company only provided me with these dynamic libraries. I noticed that pipy uses static libraries, so build failed. I am asking them if they can provide static libraries to attempt the build.

To use system installed openssl, all you have to do is use -DPIPY_USE_SYSTEM_OPENSSL=ON cmake option when compiling pipy to dynamically link against system installed openssl.

I might only use these .so or .a files, not sure whether the system installed openssl is being used.

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

No branches or pull requests

3 participants