|
a tiny testing program:
#include <openssl/ssl.h>
#include <stdio.h> main()
{ int ret; SSL_METHOD *meth; SSL_CTX *ctx; ret = SSL_library_init();
if (ret < 1) { fprintf(stderr, "Can't init SSL.\n"); exit(1); } SSL_load_error_strings(); meth = SSLv3_client_method();
if (!meth) { fprintf(stderr, "Can't get meth.\n"); exit(1); } ctx = SSL_CTX_new(meth);
if (!ctx) { fprintf(stderr, "Can't get ctx.\n"); exit(1); } printf("Success.\n");
exit(0); } followed are the testing result:
bash-2.02$ gcc -g -I../include -DSUNOS test2.cpp -lsocket
-L../lib -lssl -lcrypto
bash-2.02$ a.out Success. bash-2.02$ purify gcc -g -I../include -DSUNOS test2.cpp -lsocket -L../lib -lssl -lcrypto Purify 5.1 Solaris 2 (32-bit), Copyright (C) 1992-2000 Rational Software Corp. All rights reserved. Instrumenting: cchc1iI0.o Linking gcc: file path prefix `/usr/local/pure/purify-5.1-solaris2/nld32/' never used bash-2.02$ a.out Purify or PureCoverage slave: Warning: Unknown language "zh", using English. Can't get ctx. my openssl install steps:
./config --prefix=/xxx/xxx/xxx/ --openssldir=/xxx/xxx/xxx/openssl
(/xxx/xxx/xxx/ is not /usr/local)
./make ./make test ./make install can anyone reproduct this error on his machine?
|
