query

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

query

akhil khandelwal
hi friends
i m beginner in openssl. while writing a code  in borland C (windows platform) and openssl, i was able to compile my code but couldnot link the same.Can anybody help me?
ak


Free antispam, antivirus and 1GB to save all your messages
Only in Yahoo! Mail: http://in.mail.yahoo.com
Reply | Threaded
Open this post in threaded view
|

Re: query

Bernhard Fröhlich-2
akhil khandelwal wrote:

> hi friends
> i m beginner in openssl. while writing a code  in borland C (windows
> platform) and openssl, i was able to compile my code but couldnot
> link the same.Can anybody help me?
> ak
>
> ------------------------------------------------------------------------
> **

I also had problems with Borland C++ 5.01. The problem seems to have something to do with Borland expecting function names with leading underline if linking C-code. You can turn off that, but then you'll have difficulties linking the standard libraries.

The solution I found was using a .def-File. I am using the example attached, but it only contains functions I needed so far, so if you need others you'll have to add them yourself.

Hope it helps,
Ted
;)
--
PGP Public Key Information
Download complete Key from http://www.convey.de/ted/tedkey_convey.asc
Key fingerprint = 31B0 E029 BCF9 6605 DAC1  B2E1 0CC8 70F4 7AFB 8D26


IMPORTS

  _BIO_free=LIBEAY32.BIO_free
  _BIO_new_file=LIBEAY32.BIO_new_file
  _BIO_new_mem_buf=LIBEAY32.BIO_new_mem_buf

  _CRYPTO_free=LIBEAY32.CRYPTO_free

  _DH_check=LIBEAY32.DH_check
  _DH_free=LIBEAY32.DH_free
  _DH_generate_parameters=LIBEAY32.DH_generate_parameters

  _ERR_error_string=LIBEAY32.ERR_error_string
  _ERR_error_string_n=LIBEAY32.ERR_error_string_n
  _ERR_get_error=LIBEAY32.ERR_get_error
  _ERR_get_error_line_data=LIBEAY32.ERR_get_error_line_data
  _ERR_peek_error=LIBEAY32.ERR_peek_error
  _ERR_print_errors_fp=LIBEAY32.ERR_print_errors_fp

  _EVP_PKEY_free=LIBEAY32.EVP_PKEY_free

  _PEM_read_bio_DHparams=LIBEAY32.PEM_read_bio_DHparams
  _PEM_read_bio_PrivateKey=LIBEAY32.PEM_read_bio_PrivateKey
  _PEM_read_bio_X509=LIBEAY32.PEM_read_bio_X509
  _PEM_write_bio_DHparams=LIBEAY32.PEM_write_bio_DHparams

  _RAND_add=LIBEAY32.RAND_add
  _RAND_load_file=LIBEAY32.RAND_load_file
  _RAND_write_file=LIBEAY32.RAND_write_file

  _OBJ_obj2nid=LIBEAY32.OBJ_obj2nid
  _OBJ_nid2sn=LIBEAY32.OBJ_nid2sn

  _sk_value=LIBEAY32.sk_value
  _sk_num=LIBEAY32.sk_num

  _SSL_CIPHER_get_name=SSLEAY32.SSL_CIPHER_get_name
  _SSL_connect=SSLEAY32.SSL_connect
  _SSL_CTX_ctrl=SSLEAY32.SSL_CTX_ctrl
  _SSL_CTX_load_verify_locations=SSLEAY32.SSL_CTX_load_verify_locations
  _SSL_CTX_new=SSLEAY32.SSL_CTX_new
  _SSL_CTX_free=SSLEAY32.SSL_CTX_free
  _SSL_CTX_set_cipher_list=SSLEAY32.SSL_CTX_set_cipher_list
  _SSL_CTX_set_tmp_dh_callback=SSLEAY32.SSL_CTX_set_tmp_dh_callback
  _SSL_CTX_set_verify=SSLEAY32.SSL_CTX_set_verify
  _SSL_CTX_use_certificate=SSLEAY32.SSL_CTX_use_certificate
  _SSL_CTX_use_certificate_chain_file=SSLEAY32.SSL_CTX_use_certificate_chain_file
  _SSL_CTX_use_PrivateKey=SSLEAY32.SSL_CTX_use_PrivateKey
  _SSL_CTX_use_PrivateKey_file=SSLEAY32.SSL_CTX_use_PrivateKey_file
  _SSL_free=SSLEAY32.SSL_free
  _SSL_get1_session=SSLEAY32.SSL_get1_session
  _SSL_get_cipher=SSLEAY32.SSL_get_cipher
  _SSL_get_current_cipher=SSLEAY32.SSL_get_current_cipher
  _SSL_get_error=SSLEAY32.SSL_get_error
  _SSL_get_peer_certificate=SSLEAY32.SSL_get_peer_certificate
  _SSL_get_verify_result=SSLEAY32.SSL_get_verify_result
  _SSL_library_init=SSLEAY32.SSL_library_init
  _SSL_load_error_strings=SSLEAY32.SSL_load_error_strings
  _SSL_new=SSLEAY32.SSL_new
  _SSL_pending=SSLEAY32.SSL_pending
  _SSL_read=SSLEAY32.SSL_read
  _SSL_SESSION_free=SSLEAY32.SSL_SESSION_free
  _SSL_set_fd=SSLEAY32.SSL_set_fd
  _SSL_set_read_ahead=SSLEAY32.SSL_set_read_ahead
  _SSL_set_session=SSLEAY32.SSL_set_session
  _SSL_shutdown=SSLEAY32.SSL_shutdown
  _SSL_state=SSLEAY32.SSL_state
  _SSL_write=SSLEAY32.SSL_write
  _SSLv2_client_method=SSLEAY32.SSLv2_client_method
  _SSLv23_client_method=SSLEAY32.SSLv23_client_method
  _SSLv3_client_method=SSLEAY32.SSLv3_client_method

  _X509_EXTENSION_get_object=LIBEAY32.X509_EXTENSION_get_object
  _X509_free=LIBEAY32.X509_free
  _X509_get_ext=LIBEAY32.X509_get_ext
  _X509_get_ext_count=LIBEAY32.X509_get_ext_count
  _X509_get_issuer_name=LIBEAY32.X509_get_issuer_name
  _X509_get_subject_name=LIBEAY32.X509_get_subject_name
  _X509_NAME_get_text_by_NID=LIBEAY32.X509_NAME_get_text_by_NID
  _X509_NAME_oneline=LIBEAY32.X509_NAME_oneline

  _X509V3_EXT_get=LIBEAY32.X509V3_EXT_get

        CNVUT32.CnvUtilInit
        CNVUT32.CnvUtilWEP
        CNVUT32._AddBin2BinArr
        CNVUT32._AddBin2BinArrEx
        CNVUT32._AddChar2Str
        CNVUT32._AddFreeHGlobal2StrArr
        CNVUT32._AddHGlobal2StrArr
        CNVUT32._AddInt2Str
        CNVUT32._AddLine2Str
        CNVUT32._AddLong2BigStr
        CNVUT32._AddLong2Str
        CNVUT32._AddStr2BigStr
        CNVUT32._AddStr2Str
        CNVUT32._AddStr2StrArr
        CNVUT32._AddULong2BigStr
        CNVUT32._AddULong2Str
        CNVUT32._BTcalloc
        CNVUT32._BTfree
        CNVUT32._BTmalloc
        CNVUT32._CheckExistFile
        CNVUT32._CheckExistFileEx
        CNVUT32._CheckMemSettings
        CNVUT32._CheckThePath
        CNVUT32._CheckUsedMem
        CNVUT32._CloseTheFile
        CNVUT32._CnvFileCopy
        CNVUT32._CopyStrArr2StrArr
        CNVUT32._CopyTheFile
        CNVUT32._CreateTheDirectory
        CNVUT32._DecodeFromBase64
        CNVUT32._DeleteTheDirectory
        CNVUT32._DeleteTheFile
        CNVUT32._EncodeToBase64
        CNVUT32._FindMacros
        CNVUT32._FindTheNextFile
        CNVUT32._FreeBinArray
        CNVUT32._FreeBinArrayEx
        CNVUT32._FreeHGlobal2StrArr
        CNVUT32._FreeMacroList
        CNVUT32._FreeMem
        CNVUT32._FreeStrArr2HGlobal
        CNVUT32._FreeStringArray
        CNVUT32._GenerateProjectID
        CNVUT32._GetMacroDefaultParams
        CNVUT32._GetNumProjectLicenses
        CNVUT32._GetTheFileInfo
        CNVUT32._HGlobal2StrArr
        CNVUT32._InitMem
        CNVUT32._IsValidBTalloc
        CNVUT32._KillDir
        CNVUT32._Leftn2Str
        CNVUT32._MakePath
        CNVUT32._MoveStr2Str
        CNVUT32._MoveTheFile
        CNVUT32._NoGlobalMem
        CNVUT32._OpenTheFile
        CNVUT32._ReadTheFile
        CNVUT32._RetrieveProjectID
        CNVUT32._RetrieveProjectLicence
        CNVUT32._StartStop2Str
        CNVUT32._StoreProjectLicenses
        CNVUT32._StrArr2HGlobal
        CNVUT32._WriteTheFile
        CNVUT32._cnv_strchr
        CNVUT32._cnv_strchri
        CNVUT32._cnv_strnstr
        CNVUT32._cnv_strnstri
        CNVUT32._cnv_strrchr
        CNVUT32._cnv_strrchri
        CNVUT32._cnv_strrnstr
        CNVUT32._cnv_strrnstri
        CNVUT32._cnv_strrstr
        CNVUT32._cnv_strrstri
        CNVUT32._cnv_strstr
        CNVUT32._cnv_strstri
        CNVUT32._sformatf

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: query

Bernhard Fröhlich-2
Bernhard Froehlich wrote:

> The solution I found was using a .def-File. I am using the example
> attached, but it only contains functions I needed so far, so if you
> need others you'll have to add them yourself.

Oh, I just see I forgot to remove references to other Libraries
(CNVUT32). They should be removed since I doubt you have this DLL... ;)

>
> Hope it helps,
> Ted
> ;)



--
PGP Public Key Information
Download complete Key from http://www.convey.de/ted/tedkey_convey.asc
Key fingerprint = 31B0 E029 BCF9 6605 DAC1  B2E1 0CC8 70F4 7AFB 8D26


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

problem in linking

akhil khandelwal

hi all

even after implementing various suggestions by openssl users i couldnot link my code .the linker shows error of undefined reference to various openssl functions like bio_write etc.

can anybody provide some light.

ak


Free antispam, antivirus and 1GB to save all your messages
Only in Yahoo! Mail: http://in.mail.yahoo.com