Compiling on a Mac

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Compiling on a Mac

Joel Christner
Hi everyone,

I'm having a build issue on a Mac (10.5) that resembles the problem mentioned on the FAQ page:

http://www.openssl.org/support/faq.html#BUILD9

I searched my HDD for a 'PROBLEMS' file and the only one I found was for emacs. 

mac# openssl version
OpenSSL 0.9.7l 28 Sep 2006

The issue I'm seeing is when compiling:

mac# gcc blowfish.c -o blowfish
...
Undefined symbols:
  "_incremental_send", referenced from:
      _incremental_encrypt in ccbqFUEC.o
      _incremental_finish in ccbqFUEC.o
  "_EVP_DecryptUpdate", referenced from:
      _decrypt_example in ccbqFUEC.o
  "_EVP_EncryptInit", referenced from:
      _setup_for_encryption in ccbqFUEC.o
      _main in ccbqFUEC.o
  "_EVP_bf_cbc", referenced from:
      _setup_for_encryption in ccbqFUEC.o
      _setup_for_decryption in ccbqFUEC.o
      _main in ccbqFUEC.o
      _main in ccbqFUEC.o
  "_RAND_pseudo_bytes", referenced from:
      _select_random_iv in ccbqFUEC.o
  "_EVP_DecryptFinal", referenced from:
      _main in ccbqFUEC.o
  "_EVP_EncryptUpdate", referenced from:
      _encrypt_example in ccbqFUEC.o
      _encrypt_example in ccbqFUEC.o
      _incremental_encrypt in ccbqFUEC.o
  "_EVP_DecryptInit", referenced from:
      _setup_for_decryption in ccbqFUEC.o
      _main in ccbqFUEC.o
  "_RAND_bytes", referenced from:
      _select_random_key in ccbqFUEC.o
  "_EVP_EncryptFinal", referenced from:
      _encrypt_example in ccbqFUEC.o
      _incremental_finish in ccbqFUEC.o
  "_seed_prng", referenced from:
      _setup_for_encryption in ccbqFUEC.o
      _main in ccbqFUEC.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Does anyone have any pointers or tips on how to rectify this?

Thanks for your help,
Joel

Reply | Threaded
Open this post in threaded view
|

Compiling on a Mac

Joel Christner

Hi everyone,

I'm having a build issue on a Mac (10.5) that resembles the problem mentioned on the FAQ page:

http://www.openssl.org/support/faq.html#BUILD9

I searched my HDD for a 'PROBLEMS' file and the only one I found was for emacs.  Doesn't look like what I need.

The issue I'm seeing is when compiling:

mac# openssl version
OpenSSL 0.9.7l 28 Sep 2006
mac# gcc blowfish.c -o blowfish
...
Undefined symbols:
  "_incremental_send", referenced from:
      _incremental_encrypt in ccbqFUEC.o
      _incremental_finish in ccbqFUEC.o
  "_EVP_DecryptUpdate", referenced from:
      _decrypt_example in ccbqFUEC.o
  "_EVP_EncryptInit", referenced from:
      _setup_for_encryption in ccbqFUEC.o
      _main in ccbqFUEC.o
  "_EVP_bf_cbc", referenced from:
      _setup_for_encryption in ccbqFUEC.o
      _setup_for_decryption in ccbqFUEC.o
      _main in ccbqFUEC.o
      _main in ccbqFUEC.o
  "_RAND_pseudo_bytes", referenced from:
      _select_random_iv in ccbqFUEC.o
  "_EVP_DecryptFinal", referenced from:
      _main in ccbqFUEC.o
  "_EVP_EncryptUpdate", referenced from:
      _encrypt_example in ccbqFUEC.o
      _encrypt_example in ccbqFUEC.o
      _incremental_encrypt in ccbqFUEC.o
  "_EVP_DecryptInit", referenced from:
      _setup_for_decryption in ccbqFUEC.o
      _main in ccbqFUEC.o
  "_RAND_bytes", referenced from:
      _select_random_key in ccbqFUEC.o
  "_EVP_EncryptFinal", referenced from:
      _encrypt_example in ccbqFUEC.o
      _incremental_finish in ccbqFUEC.o
  "_seed_prng", referenced from:
      _setup_for_encryption in ccbqFUEC.o
      _main in ccbqFUEC.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Does anyone have any pointers or tips on how to rectify this?

Thanks for your help,
Joel


Reply | Threaded
Open this post in threaded view
|

RE: Compiling on a Mac

JoelKatz


> mac# gcc blowfish.c -o blowfish
 
Where did you get this command from and what was it supposed to accomplish?

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Michael Sierchio
In reply to this post by Joel Christner
Joel Christner wrote:

> The issue I'm seeing is when compiling:
>
> mac# openssl version
> OpenSSL 0.9.7l 28 Sep 2006
> mac# gcc blowfish.c -o blowfish
> ...
> Undefined symbols:

Basic C compiler/linker usage error.

gcc blowfish.c -o blowfish -L<location of libcrypt.so> -lcrypto

or something very much like that.

- M
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Joel Christner
In reply to this post by JoelKatz
blowfish.c is a progam I wrote which contained a series of methods for initializing, encrypting, and decrypting. 

Joel

On Feb 3, 2008 10:51 AM, David Schwartz <[hidden email]> wrote:


> mac# gcc blowfish.c -o blowfish

Where did you get this command from and what was it supposed to accomplish?

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Compiling on a Mac

Ted Mittelstaedt
Joel,
 
 Before compiling anything on the Mac you need to read the documents on the Apple
website that discuss how to setup your environment properly and how to issue the
correct C compilation commands.  Also the make on MacOS X doesen't support all
of the features that make on some other platforms does - you might want to start by
installing gmake.
 
Note also that if your
planning on distributing it you will likely want to build a PPC version as well as an
Intel version.
 
Ted
-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of Joel Christner
Sent: Sunday, February 03, 2008 1:14 PM
To: [hidden email]
Subject: Re: Compiling on a Mac

blowfish.c is a progam I wrote which contained a series of methods for initializing, encrypting, and decrypting. 

Joel

On Feb 3, 2008 10:51 AM, David Schwartz <[hidden email]> wrote:


> mac# gcc blowfish.c -o blowfish

Where did you get this command from and what was it supposed to accomplish?

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Joel Christner
Hi Ted,

Thanks, I will do that.  Any pointers on a quick fix would be appreciated too.



On Feb 4, 2008 3:07 AM, Ted Mittelstaedt <[hidden email]> wrote:
Joel,
 
 Before compiling anything on the Mac you need to read the documents on the Apple
website that discuss how to setup your environment properly and how to issue the
correct C compilation commands.  Also the make on MacOS X doesen't support all
of the features that make on some other platforms does - you might want to start by
installing gmake.
 
Note also that if your
planning on distributing it you will likely want to build a PPC version as well as an
Intel version.
 
Ted
-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of Joel Christner
Sent: Sunday, February 03, 2008 1:14 PM
To: [hidden email]
Subject: Re: Compiling on a Mac

blowfish.c is a progam I wrote which contained a series of methods for initializing, encrypting, and decrypting. 

Joel

On Feb 3, 2008 10:51 AM, David Schwartz <[hidden email]> wrote:


> mac# gcc blowfish.c -o blowfish

Where did you get this command from and what was it supposed to accomplish?

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]


Reply | Threaded
Open this post in threaded view
|

RE: Compiling on a Mac

JoelKatz
In reply to this post by Joel Christner

>> On Feb 3, 2008 10:51 AM, David Schwartz <[hidden email]> wrote:
>>> mac# gcc blowfish.c -o blowfish

>> Where did you get this command from and what
>> was it supposed to accomplish?

> blowfish.c is a progam I wrote which contained a series of methods for
> initializing, encrypting, and decrypting.
> Joel

Okay, and you issued a command to compile and link your program in a single
step. The compilation succeeded, as you have no compiler errors. The linking
failed. You'll notice that you have an undefined symbol error for every
single symbol in the OpenSSL library that you tried to use. This means no
attempt was made to link to the OpenSSL library. That shouldn't be
surprising, since you didn't tell the compiler to link to the OpenSSL
library.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Joel Christner
Sorry I didn't update the list, but I tried with -lssl and -lcrypto, as well as -I/usr/include/openssl.  I've reinstalled openssl to no avail.

Any other thoughts?

Thanks

On Feb 4, 2008 9:43 AM, David Schwartz <[hidden email]> wrote:

>> On Feb 3, 2008 10:51 AM, David Schwartz <[hidden email]> wrote:
>>> mac# gcc blowfish.c -o blowfish

>> Where did you get this command from and what
>> was it supposed to accomplish?

> blowfish.c is a progam I wrote which contained a series of methods for
> initializing, encrypting, and decrypting.
> Joel

Okay, and you issued a command to compile and link your program in a single
step. The compilation succeeded, as you have no compiler errors. The linking
failed. You'll notice that you have an undefined symbol error for every
single symbol in the OpenSSL library that you tried to use. This means no
attempt was made to link to the OpenSSL library. That shouldn't be
surprising, since you didn't tell the compiler to link to the OpenSSL
library.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Compiling on a Mac

JoelKatz

> Sorry I didn't update the list, but I tried with
> -lssl and -lcrypto, as well as -I/usr/include/openssl.

And what happened? Did you get the same error messages or different ones?

> I've reinstalled openssl to no avail.

What directories did you install to? And did you tell your compiler/linker
to look in the right place?

> Any other thoughts?

Typical include lines look like this:

#include <openssl/opensslconf.h>

So adding "/usr/include/openssl" to the includes will only help if you
installed the opensslconf.h file as
"/usr/include/openssl/openssl/opensslconf.h" which doesn't seem to make much
sense.

Also, what file did '-lssl' actually wind up linking to? Was it the file you
installed or some other file, perhaps one that came with your system?

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Joel Christner
Hi David,

I'm down to symbol not defined for one item - incremental_send (and I can't find what file this is supposed to be in). 

I re-installed to /usr/include/openssl and used --prefix=/usr/include and --openssldir=/usr/include/openssl

I'm trying to compile now with -lssl -lcrypto -L/usr/include/openssl

I believe -lssl tried linking to a legacy version of openssl (I saw a thread on this on the openssl website FAQ section). 

I'm using the examples in the O'Reilly OpenSSL book.  I've attached the file I'm using for your review.

Here's what I'm getting now when I try and compile - this appears to be the only error.

Undefined symbols:
  "_incremental_send", referenced from:
      _incremental_encrypt in cc4DdydW.o
      _incremental_finish in cc4DdydW.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Thanks for your help,
Joel



On Feb 4, 2008 10:52 AM, David Schwartz <[hidden email]> wrote:

> Sorry I didn't update the list, but I tried with
> -lssl and -lcrypto, as well as -I/usr/include/openssl.

And what happened? Did you get the same error messages or different ones?

> I've reinstalled openssl to no avail.

What directories did you install to? And did you tell your compiler/linker
to look in the right place?

> Any other thoughts?

Typical include lines look like this:

#include <openssl/opensslconf.h>

So adding "/usr/include/openssl" to the includes will only help if you
installed the opensslconf.h file as
"/usr/include/openssl/openssl/opensslconf.h" which doesn't seem to make much
sense.

Also, what file did '-lssl' actually wind up linking to? Was it the file you
installed or some other file, perhaps one that came with your system?

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]


blowfish-test.c (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Compiling on a Mac

JoelKatz

> Hi David,

> I'm down to symbol not defined for one item - incremental_send
> (and I can't find what file this is supposed to be in).

Well, you need to do that.

> I re-installed to /usr/include/openssl and used --prefix=/usr/include
> and --openssldir=/usr/include/openssl

> I'm trying to compile now with -lssl -lcrypto -L/usr/include/openssl

Did you verify that "-lssl -lcrypto" goes to the newly installed version of
OpenSSL?

> I believe -lssl tried linking to a legacy version of openssl
> (I saw a thread on this on the openssl website FAQ section).

You need to engage in some kind of rational troubleshooting. You have a
theory -- -lssl is linking to the wrong library version -- and you haven't
either confirmed that or ruled it out. That should be the very first thing
you do.

One easy way to do that is to replace '-lssl -lcrypto' with the full path of
the libraries you just compiled.

> Here's what I'm getting now when I try and compile - this
> appears to be the only error.

> Undefined symbols:
>   "_incremental_send", referenced from:
>       _incremental_encrypt in cc4DdydW.o
>       _incremental_finish in cc4DdydW.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status

It sounds like you call a function called 'incremental_send' that doesn't
exist. What is "cc4DdydW.o"?

Did you check your own source code for the string "incremental"? Did you
check the symbol table of libraries you are linking to to figure out where
that's coming from? Did you check all available libraries on your system to
see if any of them contain an "incremental_send" function?

You need to follow some kind of troubleshooting process.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Joel Christner
Ummm, I realize that.  I've tried hunting down where the incremental_send method is and I can't find it anywhere.  Can you give some suggestions on the "rational troubleshooting" you recommend?  I have no idea what the cc4DdydW.o file is, I'm assuming this is being produced by the compiler.  Where is the symbol table and how do I examine it?  Pardon my ignorance.  I've also googled for "incremental_send", which per the OpenSSL book I'm using is supposed to be contained in one of the OpenSSL files that 'm including, and google doesn't provide me anything useful on it.

Thanks
Joel


On Feb 5, 2008 12:13 PM, David Schwartz <[hidden email]> wrote:

> Hi David,

> I'm down to symbol not defined for one item - incremental_send
> (and I can't find what file this is supposed to be in).

Well, you need to do that.

> I re-installed to /usr/include/openssl and used --prefix=/usr/include
> and --openssldir=/usr/include/openssl

> I'm trying to compile now with -lssl -lcrypto -L/usr/include/openssl

Did you verify that "-lssl -lcrypto" goes to the newly installed version of
OpenSSL?

> I believe -lssl tried linking to a legacy version of openssl
> (I saw a thread on this on the openssl website FAQ section).

You need to engage in some kind of rational troubleshooting. You have a
theory -- -lssl is linking to the wrong library version -- and you haven't
either confirmed that or ruled it out. That should be the very first thing
you do.

One easy way to do that is to replace '-lssl -lcrypto' with the full path of
the libraries you just compiled.

> Here's what I'm getting now when I try and compile - this
> appears to be the only error.

> Undefined symbols:
>   "_incremental_send", referenced from:
>       _incremental_encrypt in cc4DdydW.o
>       _incremental_finish in cc4DdydW.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status

It sounds like you call a function called 'incremental_send' that doesn't
exist. What is "cc4DdydW.o"?

Did you check your own source code for the string "incremental"? Did you
check the symbol table of libraries you are linking to to figure out where
that's coming from? Did you check all available libraries on your system to
see if any of them contain an "incremental_send" function?

You need to follow some kind of troubleshooting process.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Compiling on a Mac

JoelKatz


> Ummm, I realize that.  I've tried hunting down where the
> incremental_send method is and I can't find it anywhere.

It's in your book.

> Can you give some suggestions on the "rational troubleshooting"
> you recommend?

Check your source code for references to "incremental_send". You can use
"grep" for this purpose.

> I have no idea what the cc4DdydW.o file is, I'm assuming this
> is being produced by the compiler.

It could be, but there's really no way to tell. One good way to figure out
what it is would be to compile your code and then separately link it. This
will allow you to easily check what symbols each file defines and which
symbols it needs.

> Where is the symbol table and how do I examine it?

The "nm" command will do this.

> Pardon my ignorance.  I've also googled for "incremental_send", which
> per the OpenSSL book I'm using is supposed to be contained in one of the
> OpenSSL files that 'm including, and google doesn't provide me anything
> useful on it.

I think you are misunderstanding the book. I think it provides
"incremental_send" as an example function. You call this function without
providing the code for it, hence the reason it shows up as undefined.

Does your code call "incremental_send"?

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Kyle Hamilton
In reply to this post by Michael Sierchio
on Mac, dynamically-loaded libraries have the extension .dylib, not .so.

On Feb 3, 2008, at 11:04 AM, Michael Sierchio wrote:

> Joel Christner wrote:
>
>> The issue I'm seeing is when compiling:
>> mac# openssl version
>> OpenSSL 0.9.7l 28 Sep 2006
>> mac# gcc blowfish.c -o blowfish
>> ...
>> Undefined symbols:
>
> Basic C compiler/linker usage error.
>
> gcc blowfish.c -o blowfish -L<location of libcrypt.so> -lcrypto
>
> or something very much like that.
>
> - M
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Au

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Joel Christner
In reply to this post by JoelKatz
Hi David,

The source for incremental_send isn't in the book anywhere that I've seen.  I'm using the first edition (June 2002).  My code does call incremental_send, and the code I'm trying to compile is the example code provided in the book itself (in chapter 6 - see example 6-4).  The book provides the code for incremental_encrypt as well as incremental_finish, so my assumption is that it is a method included in the bowels of the libraries provided.  Are you saying that this is a method that I must construct myself?  The book doesn't say that, so my assumption is that it is provided.

Thanks
Joel
 

On Feb 5, 2008 6:19 PM, David Schwartz <[hidden email]> wrote:


> Ummm, I realize that.  I've tried hunting down where the
> incremental_send method is and I can't find it anywhere.

It's in your book.

> Can you give some suggestions on the "rational troubleshooting"
> you recommend?

Check your source code for references to "incremental_send". You can use
"grep" for this purpose.

> I have no idea what the cc4DdydW.o file is, I'm assuming this
> is being produced by the compiler.

It could be, but there's really no way to tell. One good way to figure out
what it is would be to compile your code and then separately link it. This
will allow you to easily check what symbols each file defines and which
symbols it needs.

> Where is the symbol table and how do I examine it?

The "nm" command will do this.

> Pardon my ignorance.  I've also googled for "incremental_send", which
> per the OpenSSL book I'm using is supposed to be contained in one of the
> OpenSSL files that 'm including, and google doesn't provide me anything
> useful on it.

I think you are misunderstanding the book. I think it provides
"incremental_send" as an example function. You call this function without
providing the code for it, hence the reason it shows up as undefined.

Does your code call "incremental_send"?

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Compiling on a Mac

JoelKatz


> The source for incremental_send isn't in the book anywhere
> that I've seen.

Well then that explains the problem. You are calling a function that does
not exist.

> I'm using the first edition (June 2002).
> My code does call incremental_send,
> and the code I'm trying to compile is the example code provided in the
> book itself (in chapter 6 - see example 6-4).

I don't have your book, but I found similar example code online that calls
"incremental_send" and it always includes the actual code for
"incremental_send".

> The book provides the code for incremental_encrypt as well as
> incremental_finish, so my assumption is that it is a method
> included in the bowels of the libraries provided.

If that were true, it would show that you are going the wrong way. You
should be using OpenSSL's documented interface, not functions deep in its
bowels.

> Are you saying that this is a method that I must construct myself?

Yes.

> The book doesn't say that, so my assumption is that it is provided.

I don't have the book you have, but every example I was able to find online
that called "incremental_send" included an implementation of it. This is one
example:

http://www.cs.odu.edu/~cs772/sourcecode/NSwO/compiled/encdec.c

I think the correct assumption is that the example *assumes* you have coded
an "incremental_send" function and is intended to demonstrate the plumbing
between OpenSSL's encryption/decryption engine and an incremental transmit
function.

This is strongly implied by the excerpt of the book I was able to find on
Amazon. This is intended to demonstrate an encryption/decryption
implementation as a stream filter. It assumes the data comes from someplace,
gets encrypted or decrypted, and then goes someplace else. The
"incremental_send" function is intended to be the "goes someplace else"
function.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Joel Christner
Can you share the code that you found, a link to it, or at least a hint as to which search engine you found it on?

On Feb 5, 2008 8:01 PM, David Schwartz <[hidden email]> wrote:


> The source for incremental_send isn't in the book anywhere
> that I've seen.

Well then that explains the problem. You are calling a function that does
not exist.

> I'm using the first edition (June 2002).
> My code does call incremental_send,
> and the code I'm trying to compile is the example code provided in the
> book itself (in chapter 6 - see example 6-4).

I don't have your book, but I found similar example code online that calls
"incremental_send" and it always includes the actual code for
"incremental_send".

> The book provides the code for incremental_encrypt as well as
> incremental_finish, so my assumption is that it is a method
> included in the bowels of the libraries provided.

If that were true, it would show that you are going the wrong way. You
should be using OpenSSL's documented interface, not functions deep in its
bowels.

> Are you saying that this is a method that I must construct myself?

Yes.

> The book doesn't say that, so my assumption is that it is provided.

I don't have the book you have, but every example I was able to find online
that called "incremental_send" included an implementation of it. This is one
example:

http://www.cs.odu.edu/~cs772/sourcecode/NSwO/compiled/encdec.c

I think the correct assumption is that the example *assumes* you have coded
an "incremental_send" function and is intended to demonstrate the plumbing
between OpenSSL's encryption/decryption engine and an incremental transmit
function.

This is strongly implied by the excerpt of the book I was able to find on
Amazon. This is intended to demonstrate an encryption/decryption
implementation as a stream filter. It assumes the data comes from someplace,
gets encrypted or decrypted, and then goes someplace else. The
"incremental_send" function is intended to be the "goes someplace else"
function.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Compiling on a Mac

JoelKatz

> Can you share the code that you found, a link to it, or at
> least a hint as to which search engine you found it on?

>> http://www.cs.odu.edu/~cs772/sourcecode/NSwO/compiled/encdec.c

There you go.

I'm curious -- do you understand what the code you are compiling is supposed
to actually *do*? Because if my understanding is correct, it only makes
sense if you have a source of a stream of bytes and a sink for the stream of
bytes and are trying to interpose an encryption/decryption step in the
middle. If you don't have these two things, the code will not work because
it will have no idea where to get its input from and where to send its
output to.

At least, that's my understanding. If your understanding is different, share
it. If you don't understand what the code is supposed to do, stop trying to
make it work. You will have no way to know when you've succeeded. ;)

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Compiling on a Mac

Larry Bugbee-2
In reply to this post by Joel Christner
> The source for incremental_send isn't in the book anywhere that I've  
> seen.  I'm using the first edition (June 2002).  My code does call  
> incremental_send, and the code I'm trying to compile is the example  
> code provided in the book itself (in chapter 6 - see example 6-4).  
> The book provides the code for incremental_encrypt as well as  
> incremental_finish, so my assumption is that it is a method included  
> in the bowels of the libraries provided.  Are you saying that this  
> is a method that I must construct myself?  The book doesn't say  
> that, so my assumption is that it is provided.

I have run into books that claim to be good but the publisher leaves  
out critical stuff.  Go to the publisher's site and look for errata  
and downloadable source files.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
12