USC CSD Home
 

Notes on OpenSSL -

 
OpenSSL on nunki.usc.edu
To access the openssl library in your programming environment on nunki.usc.edu, please note the following:
  • Add the /home/scf-22/csci551b/openssl/bin directory to your path (environment variable PATH):

    • If your shell is csh, you can do:
      set path=(/home/scf-22/csci551b/openssl/bin $path)
      rehash
    • If your shell is bash, you can do:
      export PATH=/home/scf-22/csci551b/openssl/bin:$PATH
  • Add the /home/scf-22/csci551b/openssl/lib directory to your LD_LIBRARY_PATH environment variable:

    • If your shell is csh, you can do:
      setenv LD_LIBRARY_PATH /home/scf-22/csci551b/openssl/lib:/usr/lib:/lib
    • If your shell is bash, you can do:
      export LD_LIBRARY_PATH=/home/scf-22/csci551b/openssl/lib:/usr/lib:/lib
  • Add the /home/scf-22/csci551b/openssl/ssl/man directory to your MANPATH environment variable:

    • If your shell is csh, you can do:
      setenv MANPATH /home/scf-22/csci551b/openssl/ssl/man:$MANPATH
    • If your shell is bash, you can do:
      export MANPATH=/home/scf-22/csci551b/openssl/ssl/man:$MANPATH
  • Add the following commandline option during compiling:
    -I/home/scf-22/csci551b/openssl/include
    In each source file that needs a header file, for example, "something.h" from openssl, you can add:
    #include <openssl/something.h>
    The "openssl/something.h" file is then expected to be in the /home/scf-22/csci551b/openssl/include directory.

  • Add the following commandline option during linking to link with the openssl library (after all the .o files):
    -L/home/scf-22/csci551b/openssl/lib -lcrypto -lsocket
    The "libcrypto.a" file is then expected to be in the /home/scf-22/csci551b/openssl/lib directory.

If you have configured everything correctly, when you run "openssl version" from the commandline, you should see:
    OpenSSL 0.9.8a 11 Oct 2005
This is the version of openssl installed in /home/scf-22/csci551b/openssl.

Please do not use openssl anywhere in /usr/lsd/openssl because ISD may change the content of its subdirectories in the middle of the semester.

 
Setup Environment During Login
If your shell is csh/tcsh, you can copy the lines for path, LD_LIBRARY_PATH, and MANPATH into your ~/.login file. (Please do not put them in your ~/.cshrc file.)

If your shell is bash, you can copy the lines for path, LD_LIBRARY_PATH, and MANPATH into your ~/.bash_profile file.

 

   [Please see copyright regarding copying.]