07-01-2011
Linking in OpenSSL libcrypto Statically
I have a C++ program which includes lots of libraries, including openssl libcrypto. In fact, the g++ switches are:
-lxml2 -lcrypto -lcurl etc.
The problem is that when I try to run it on a different flavor of Linux, it complains that it cannot load libcrypto.so.8. I did some research and learned about the difference between static and shared libraries, but can't quite figure out what steps to take to compile the libcrypto library in such a way that everything goes into the executable so that my program can be portable. Thanks in advance for any help you can give me.
Brandon
9 More Discussions You Might Find Interesting
1. Programming
Hi
I'm getting
ld: fatal: option -h and building a dynamic executable are incompatible
ld: fatal: Flags processing errors
When I run
ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o
after running
gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c
I'm... (6 Replies)
Discussion started by: laho
6 Replies
2. Programming
I need to load a dynamic library from a statically linked program. Is there a way without recompiling my program.
when i try to do that my program just crashes.
If not possible, how can I avoid crashing the program when i try to load the dynamic lib, again without recompiling.
If my... (1 Reply)
Discussion started by: disclaimer
1 Replies
3. Programming
how can i do static compilation in cc and -lldap
i have system defined and user defined header file.
Can any one suggest any site where from i can get some information about static and dynamic compilation.
Thankx (1 Reply)
Discussion started by: bhakti
1 Replies
4. UNIX for Dummies Questions & Answers
how would i link 2 files together?
is it the same as copying? (1 Reply)
Discussion started by: trob
1 Replies
5. Solaris
I use Solaris 10, compiling with a custom g++ (3.4.6) and GNU binutils (2.17). Things have gone well on two different systems, but when I tried moving to a third, it all fell over. Basically, it is now using the CC linker, but I need to use options not available to it. I believe I have found the... (0 Replies)
Discussion started by: Elric of Grans
0 Replies
6. Programming
I am attempting to port a program from OS X to Linux. It's C++ & Qt Creator and I did the original Windows to OS X port, so I tried to make it as POSIX-compliant as possible; the OS X port works well, and the Linux port builds and starts (it's on Ubuntu 9.10) but has some issues running.
The... (2 Replies)
Discussion started by: Hodapp87
2 Replies
7. Solaris
Hi Can anyone tell me the use of libcrypto.so.0.9.7 ? I know it is used for SSH. Also is there a way to look into the content of these jars?
Also is there a way to uncompress the same?
i tried
# uncompress libcrypto.so.0.9.7
libcrypto.so.0.9.7.Z: No such file or directory
# jar xvf... (6 Replies)
Discussion started by: flinders1323
6 Replies
8. UNIX for Advanced & Expert Users
Hi,
I've installed curl with all despondency but when I try to start it I get:
root@xxx> curl
ld.so.1: curl: fatal: libcrypto.so.1.0.0: open failed: No such file or directory
Killed
Looks like I have to change/make symlinks but I don't know how/where.
Any idia?
---------- Post... (3 Replies)
Discussion started by: mehrdad68
3 Replies
9. AIX
I want to create a shared lib with certain libs statically linked to it. I can generate a fully shared lib as follows:
gcc -maix64 -DHAVE_CONFIG_H -I. -I./src -DHAVE_OPENSSL -I/usr/include/openssl -I/usr/include -I/usr/include/apr-1 -D_LARGEFILE64_SOURCE -I/usr/java8_64/include -shared -o... (0 Replies)
Discussion started by: amandeepgautam
0 Replies
LEARN ABOUT NETBSD
crypto
crypto(3) OpenSSL crypto(3)
NAME
crypto - OpenSSL cryptographic library
LIBRARY
libcrypto, -lcrypto
SYNOPSIS
DESCRIPTION
The OpenSSL crypto library implements a wide range of cryptographic algorithms used in various Internet standards. The services provided by
this library are used by the OpenSSL implementations of SSL, TLS and S/MIME, and they have also been used to implement SSH, OpenPGP, and
other cryptographic standards.
OVERVIEW
libcrypto consists of a number of sub-libraries that implement the individual algorithms.
The functionality includes symmetric encryption, public key cryptography and key agreement, certificate handling, cryptographic hash
functions and a cryptographic pseudo-random number generator.
SYMMETRIC CIPHERS
openssl_blowfish(3), cast(3), openssl_des(3), idea(3), rc2(3), openssl_rc4(3), rc5(3)
PUBLIC KEY CRYPTOGRAPHY AND KEY AGREEMENT
openssl_dsa(3), openssl_dh(3), openssl_rsa(3)
CERTIFICATES
x509(3), x509v3(3)
AUTHENTICATION CODES, HASH FUNCTIONS
openssl_hmac(3), md2(3), md4(3), openssl_md5(3), openssl_mdc2(3), openssl_ripemd(3), openssl_sha(3)
AUXILIARY FUNCTIONS
openssl_err(3), openssl_threads(3), openssl_rand(3), OPENSSL_VERSION_NUMBER(3)
INPUT/OUTPUT, DATA ENCODING
asn1(3), openssl_bio(3), openssl_evp(3), pem(3), pkcs7(3), pkcs12(3)
INTERNAL FUNCTIONS
openssl_bn(3), openssl_buffer(3), openssl_lhash(3), objects(3), stack(3), txt_db(3)
NOTES
Some of the newer functions follow a naming convention using the numbers 0 and 1. For example the functions:
int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
The 0 version uses the supplied structure pointer directly in the parent and it will be freed up when the parent is freed. In the above
example crl would be freed but rev would not.
The 1 function uses a copy of the supplied structure pointer (or in some cases increases its link count) in the parent and so both (x and
obj above) should be freed up.
SEE ALSO
openssl(1), ssl(3)
1.0.1i 2009-07-20 crypto(3)