hello,
#include <openssl/bio.h>
2 int main() {
3 BIO * b;
4 char buf[100] = "hello world \n";
5 b = BIO_new(BIO_s_file());
6 BIO_set_fp(b, stdout, BIO_NOCLOSE);
7 BIO_write(b, buf, sizeof(buf));
8 return 0;
9 }
after compile , and run, i can see the hello world
but if the source code be changed like this
1 #include <openssl/bio.h>
2 int biotest(char * buf) {
3 BIO * b;
4 // char buf[100] = "hello world \n";
5 b = BIO_new(BIO_s_file());
6 BIO_set_fp(b, stdout, BIO_NOCLOSE);
7 BIO_write(b, buf, sizeof(buf));
8 return 0;
9 }
10 int main()
11 {
12 char buf[100] = "hello world\n";
13 biotest(buf);
14 return 0;
15 }
compile and run, i can only see the hell on my terminal , who knows why, thank
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org