REMOVE

2004-08-24 Thread Kevin Eppinger








REMOVE








RE: Linking Error.

2004-07-28 Thread Kevin Eppinger








Layla, I havent used VC++ in a
whileand have never used it from the cmd linebut I would try something
from the makefile suggestion below. Again, Im not familiar with
VC++, but will this work:



cl I/path/to/openssl/headerfiles
clientf.cpp



??





-kevin













From: owner-[EMAIL PROTECTED] [mailto:owner-[EMAIL PROTECTED]] On Behalf Of Layla
Sent: Wednesday, July 28, 2004
8:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Linking Error.







Weijie,





Thank you for replying, does it make any difference if I compile from
the command line or GUI? cause as I've mentioned, when I compile from Visual
studio I get no error messages which indicates that it can see my
include files, but when I tried running the compiler from the command line I
got the following error:











D:\Program Files\Microsoft Visual
Studio\MyProjects\clientsidecl clientf.cpp





Microsoft R 32-bit C/C++
Optimizing Compiler Version 12.00.8168 for 80x86





Copyright C Microsoft Corp
1984-1998. ALL rights reserved.





clientf.cpp





clientf.cpp17 : fatal error
C1083: Cannot open include file: 'openssl/crypto.h' : No such





file or directory.







Weijie Zhang
[EMAIL PROTECTED] wrote:







You need to make sure that you are linking to the (or, maybe,
the proper) libaray. Type set in your dos prompt and check the
corresponding path which define where linker goes to find your lib etc.I
believe the VC++ can show you somewhere of the enviornment set.You can
get clues byexaming the difference too. 











Weijie







- Original Message - 





From: Layla 





To: [EMAIL PROTECTED]






Sent: Wednesday, July
28, 2004 11:10 AM





Subject: Re: Linking Error.











Thanks for the response Vio,





Actually I'm not familiar with the method you've proposed. but I tried
to compile the program from command line and It failed! I can't understand why
its compiling by using GUI but not from the command prompt. I'm so new to this
and this project is really very important to me. Any one PLEASE help me.











Thank you.

Vio
[EMAIL PROTECTED] wrote:





I'm not too familiar with VC++ (ever tried DevC++ or MingwStudio? If
old 
old VC++6 fails to do what you want, both free IDE alternatives), but 
whatever, doesn't VC generate some kind of Makefile between the 
curtains? Maybe you could create what's missing by hand?
A Makefile looks something like this:

---

#
# File: Makefile for samples
# Author: Robert Roebling
# Created: 1999
# Updated: 
# Copyright: (c) 1998 Robert Roebling
#
# This makefile requires a Unix version of wxWindows
# to be installed on your system. This is most often
# done typing make install when using the complete
# sources of wxWindows or by installing the two
# RPM packages wxGTK.XXX.rpm and wxGTK-devel.XXX.rpm
# under Linux.
#

CXX = $(shell wx-config --cxx)

PROGRAM = MyApp

OBJECTS = $(PROGRAM).o MySSL.o MyFrame.o MyCustom.o
MYFLAGS = -I/d/ssl/run/include -I./ssl
MYLIBS = -L/d/ssl/run/lib -lssl -lcrypto

.SUFFIXES: .o .cpp .c

.cpp.o :
$(CXX) -g -c `wx-config --cxxflags` $(MYFLAGS) \
-Wall -pthread -o $@ $

.c.o :
gcc -g -c $(MYFLAGS) -Wall -pthread -o $@ $


all: $(PROGRAM)

$(PROGRAM): $(OBJECTS)
$(CXX) -g -o $(PROGRAM) $(OBJECTS) `wx-config --libs` \
$(MYLIBS) -Wall -pthread

clean: 
rm -f *.o $(PROGRAM)

---


What it does is that it generates compiling and linking commands,
for instance the previous Makefile generates the following:

g++ -g -c `wx-config --cxxflags` -I/d/ssl/run/include -I./ssl -Wall 
-pthread -o MyFrame.o MyFrame.cpp
g++ -g -o MyApp MyApp.o MySSL.o MyFrame.o MyCustom.o `wx-config --libs` 
-L/d/ssl/run/lib -lssl -lcrypto -Wall -pthread

First one is a compile command, second is a linking command.
So you need the second one.

Hope this helps somewhat,
Vio




Layla wrote:

 David,
 Thanks for responding. didn't work is actually missing a word
:), 
 what i meant to say is when /that/ didn't work in reference to
the 
 specified path.
 
 You're right, I can compile, its linking that is giving me an error.
 
 
 You have told the linker where the libraries are, but you didn't 
 actually link them in.
 -So how can I actually link the library?
 
 Note: As I said before I'm using VC++ 6, therefore I'm compiling and 
 linking using GUI not from the command line, would that be an issue?
 
 -In the INSTALL file, I couldn't find reference to creating an 
 environment variable that points to the root directory of OpenSSL, and 
 I'm sure that I've read about this in one of the sites. Could this be 
 the cau se of my problem?
 
 Your help is highly appreciated.
 Layla.



 */David Schwartz <[EMAIL PROTECTED]>/* wrote:


  1) D:\Documents and Settings\Administrator\My
 Documents\openssl-0.9.7d\inc32
  this is the directory where OpenSSL was extracted to. when
 didn't work I
 tried:

 What does didn't work mean?

  2) D:\openssl\include
  this is the directory which I have created and copied to the

New to OpenSSL-Need a little help

2004-07-21 Thread Kevin Eppinger








I have been tasked with a project that involves writing a process
(not a CGI invoked from Apache) that sends a secure request to a https website
and reads the response back, parses it..blah, blah, blah. Its has to be
done this way because this certain third party doesnt have a Linux/C/C++
API available. I have started to write an OpenSSL client, but, as I said,
I am very new to it and would appreciate an overview of what I need to
do. Here is what I know:




 Initialize the SSL library
 (SSL_library_init()SSL_CTX_new(SSLv23_client_method())SSL_new(),
 etc)
 Setup/connect an underlying BIO
 (in this case, a TCP socket)
 Bind the BIO
 connection (a socket descriptor) to the SSL object (SSL_set_fd())
 SSL_write(), SSL_read(), etc.




Here is what I dont know:




 How to properly use
 SSL_connect() i.e.-What do I need in the way of certificates and
 public/private keys? How does the handshake take place? Do I
 need to verify their certificate once the connect is completed? Etc
 If Im going to *their* secure site, arent *they* the ones who need to provide the
 secure certificate?
 Im using non-blocking
 sockets. Is there any special treatment I need to give the
 SSL_write/read ops?




Im going out to buy a book now, but Im sure
there will be other questions from me. Thanks for any help!



-kevin