RE: OpenSSL on beagleboard

2012-08-27 Thread Paulo Roberto

Thanks for helping jeff, but it haven't worked yet.
I searched my libssl.so in my /usr/lib and I didn't find.
Does someone have any idea? I have installed the libssl-dev, libssl0.9.8.

Thanks for helping.

 Date: Thu, 23 Aug 2012 21:18:37 -0400
 Subject: Re: OpenSSL on beagleboard
 From: noloa...@gmail.com
 To: openssl-users@openssl.org
 
 On Thu, Aug 23, 2012 at 9:06 PM, Paulo Roberto bad_boy_...@hotmail.com 
 wrote:
  Hello, I am using the package libssl-dev on ubuntu in my beagleboard xm, and
  I have to run two C algorithms using the openSSL library..
  Although I can't compile using the command: gcc test.c -lssl -o test. It
  seems the compiler isn't recognizing the -lssl command.
  Does someone know how to solve this?
  Do I have to set some path, or something like that?
 You specify linker commands (such as libraries) at the very end of the
 compiler drive command. From the g++ man pages (around line 25):
 ...the placement of the -l option is significant.
 
 gcc test.c -o test -lssl
 
 You might also want to add -Wl,-Bstatic unless you want to do the
 shared object thing.
 
 Jeff
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   majord...@openssl.org
  

RE: OpenSSL on beagleboard

2012-08-27 Thread Paulo Roberto

When I use the command gcc teste.c -lssl -o teste: 

Error:
ubuntu@omap:~/arquivos$ gcc rsa.c -lssl -o teste
/tmp/ccyvrO2i.o: In function `main':
rsa.c:(.text+0x8): undefined reference to `BN_new'
rsa.c:(.text+0xe): undefined reference to `BN_new'
rsa.c:(.text+0x14): undefined reference to `BN_new'
rsa.c:(.text+0x1a): undefined reference to `BN_new'
rsa.c:(.text+0x20): undefined reference to `BN_new'
/tmp/ccyvrO2i.o:rsa.c:(.text+0x26): more undefined references to `BN_new' follow
/tmp/ccyvrO2i.o: In function `main':
rsa.c:(.text+0x5c): undefined reference to `BN_set_word'
rsa.c:(.text+0x66): undefined reference to `BN_set_word'
rsa.c:(.text+0x70): undefined reference to `BN_set_word'
rsa.c:(.text+0x98): undefined reference to `BN_generate_prime'
rsa.c:(.text+0xba): undefined reference to `BN_generate_prime'
rsa.c:(.text+0xbe): undefined reference to `BN_CTX_new'
rsa.c:(.text+0xca): undefined reference to `BN_mul'
rsa.c:(.text+0xd4): undefined reference to `BN_sub'
rsa.c:(.text+0xe2): undefined reference to `BN_bn2dec'
rsa.c:(.text+0xf6): undefined reference to `BN_sub'
rsa.c:(.text+0xfa): undefined reference to `BN_CTX_new'
rsa.c:(.text+0x106): undefined reference to `BN_mul'
rsa.c:(.text+0x114): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x11c): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x124): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x140): undefined reference to `BN_rand'
rsa.c:(.text+0x1b8): undefined reference to `BN_mul'
rsa.c:(.text+0x1c6): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x1de): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x1f6): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x204): undefined reference to `BN_CTX_new'
rsa.c:(.text+0x216): undefined reference to `BN_div'
rsa.c:(.text+0x224): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x236): undefined reference to `BN_cmp'
rsa.c:(.text+0x24a): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x252): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x25a): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x262): undefined reference to `BN_bn2dec'
rsa.c:(.text+0x26a): undefined reference to `BN_bn2dec'
collect2: ld returned 1 exit status

Another attempt: 

ubuntu@omap:~/arquivos$ gcc rsa.c -Wl, -lssl, -lcrypto -o teste
/usr/bin/ld: cannot find : No such file or directory
/usr/bin/ld: cannot find -lssl,
collect2: ld returned 1 exit status

Any idea? 

I haven't found the libssl.so in my directory /usr/lib.

Thanks everybody.


 Date: Fri, 24 Aug 2012 09:45:15 +0100
 Subject: Re: OpenSSL on beagleboard
 From: b...@links.org
 To: openssl-users@openssl.org
 
 On Fri, Aug 24, 2012 at 2:18 AM, Jeffrey Walton noloa...@gmail.com wrote:
  On Thu, Aug 23, 2012 at 9:06 PM, Paulo Roberto bad_boy_...@hotmail.com 
  wrote:
  Hello, I am using the package libssl-dev on ubuntu in my beagleboard xm, 
  and
  I have to run two C algorithms using the openSSL library..
  Although I can't compile using the command: gcc test.c -lssl -o test. It
  seems the compiler isn't recognizing the -lssl command.
 
 You really need to show the error, I doubt it is not recognizing it.
 
  Does someone know how to solve this?
  Do I have to set some path, or something like that?
 
 You might do, use -L for this.
 
  You specify linker commands (such as libraries) at the very end of the
  compiler drive command. From the g++ man pages (around line 25):
  ...the placement of the -l option is significant.
 
 Significant relative to .o and other libraries, not to the output
 file, so this should make no difference.
 
 
  gcc test.c -o test -lssl
 
  You might also want to add -Wl,-Bstatic unless you want to do the
  shared object thing.
 
  Jeff
  __
  OpenSSL Project http://www.openssl.org
  User Support Mailing Listopenssl-users@openssl.org
  Automated List Manager   majord...@openssl.org
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   majord...@openssl.org
  

RE: OpenSSL on beagleboard

2012-08-27 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of Paulo Roberto
Sent: Monday, 27 August, 2012 18:37

Can no one help me? Isn't there a way of specifying the local 
the openssl is installed?

You mean location i.e. in the file system? As far as I know 
packages on most Linuxes, including ubuntu, install into system 
standard locations, maybe something like /usr/lib or /opt/ssl .
System locations vary for different Unixes but are usually the same 
for different libraries on the same Unix, so you might be better off 
asking people who know about ubuntu in particular.

If it is in a standard location, your gcc (assuming your gcc is 
the correct package of gcc for your Unix) should find it. 
If you have some kind of nonstandard perhaps experimental package, 
and you know where it is installed, -L/path/to/libdir is the gcc way 
to specify additional library directories. (The -Ldir must occur 
before the/any -llib that's lower-ell that needs it.) 

You always need to make sure you *compile* with headers that are 
compatible with the library(ies) you *link* with; if you are linking 
with libraries in a nonstandard location you may need -I/path/to/incdir 
that's upper-eye (for gcc) to find the corresponding headers. I'm not sure 
if -I must precede the sourcefile(s) but I put it there for clarity.

And if you have a non-package build, such as one you did yourself 
from source, both of these (-L and -I) are much more likely.

From: bad_boy_...@hotmail.com
Date: Thu, 23 Aug 2012 22:06:59 -0300

Hello, I am using the package libssl-dev on ubuntu in my beagleboard xm, 
and I have to run two C algorithms using the openSSL library..
   Although I can't compile using the command: gcc test.c -lssl -o
test. 
It seems the compiler isn't recognizing the -lssl command.
Does someone know how to solve this?
Do I have to set some path, or something like that?

You haven't obeyed the response Friday asking for the actual error.
There are many possible errors and exactly which one you have may 
point to very different causes and solutions. 


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


RE: OpenSSL on beagleboard

2012-08-27 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of Paulo Roberto
Sent: Monday, 27 August, 2012 20:21

Okay, this time you did post the error.

When I use the command gcc teste.c -lssl -o teste: 
/tmp/ccyvrO2i.o: In function `main':
rsa.c:(.text+0x8): undefined reference to `BN_new'
snip many more BN

BN_* are in libcrypto not libssl.

Another attempt: 

ubuntu@omap:~/arquivos$ gcc rsa.c -Wl, -lssl, -lcrypto -o teste
/usr/bin/ld: cannot find : No such file or directory
/usr/bin/ld: cannot find -lssl,
collect2: ld returned 1 exit status

That's closer, but you've mixed up two different things.
-Wl,x,y -- comma(s) and NO space -- passes opaque linker 
arguments, like -Wl,-Bstatic in a previous response.
-lxxx is not opaque (driver knows it) so don't use -Wl .
You do want -lssl -lcrypto (space but no comma).

Any idea? 

If you need both SSL and low-level routines like BN_*,
use -lssl -lcrypto . If only need low-level, just -lcrypto .
If you need both depending on your linker order may matter, 
in which case -lssl should be first.

I haven't found the libssl.so in my directory /usr/lib.

Then that's (probably) not the right location on your Unix/distro. 
If it is dynamic, on Linux at least, ldd should work. Do 
  ldd `which openssl`
and look to see where libssl.* and libcrypto.* are.


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: OpenSSL on beagleboard

2012-08-24 Thread Ben Laurie
On Fri, Aug 24, 2012 at 2:18 AM, Jeffrey Walton noloa...@gmail.com wrote:
 On Thu, Aug 23, 2012 at 9:06 PM, Paulo Roberto bad_boy_...@hotmail.com 
 wrote:
 Hello, I am using the package libssl-dev on ubuntu in my beagleboard xm, and
 I have to run two C algorithms using the openSSL library..
 Although I can't compile using the command: gcc test.c -lssl -o test. It
 seems the compiler isn't recognizing the -lssl command.

You really need to show the error, I doubt it is not recognizing it.

 Does someone know how to solve this?
 Do I have to set some path, or something like that?

You might do, use -L for this.

 You specify linker commands (such as libraries) at the very end of the
 compiler drive command. From the g++ man pages (around line 25):
 ...the placement of the -l option is significant.

Significant relative to .o and other libraries, not to the output
file, so this should make no difference.


 gcc test.c -o test -lssl

 You might also want to add -Wl,-Bstatic unless you want to do the
 shared object thing.

 Jeff
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   majord...@openssl.org
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: OpenSSL on beagleboard

2012-08-23 Thread Jeffrey Walton
On Thu, Aug 23, 2012 at 9:06 PM, Paulo Roberto bad_boy_...@hotmail.com wrote:
 Hello, I am using the package libssl-dev on ubuntu in my beagleboard xm, and
 I have to run two C algorithms using the openSSL library..
 Although I can't compile using the command: gcc test.c -lssl -o test. It
 seems the compiler isn't recognizing the -lssl command.
 Does someone know how to solve this?
 Do I have to set some path, or something like that?
You specify linker commands (such as libraries) at the very end of the
compiler drive command. From the g++ man pages (around line 25):
...the placement of the -l option is significant.

gcc test.c -o test -lssl

You might also want to add -Wl,-Bstatic unless you want to do the
shared object thing.

Jeff
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org