1

I trying to develop simple client/server programming by using TCP/IP sockets with SSL in the OpenVMS. We are accessing the Proc APIs in our code. So, I used the lnproc option to link my programs with SSL libraries. It throws the following error when I used following options while linking. Its 64 bit compiler so I used the below, option 1. Compiled using the below command and options,

cc/noopt/POINTER_SIZE=64/PREFIX=ALL stand=vaxc /nolist/object=<PROJ_PATH>client.obj /nodebug/include=(<PROJ_PATH>,SSL$INCLUDE,tcpware_include:)/nested_include_directory=primary_file <PROJ_PATH>client.c
lnproc <PROJ_PATH>client.EXE <PROJ_PATH>client.obj

%LINK-W-NUDFSYMS, 6 undefined symbols:
%LINK-I-UDFSYM,         BERR_EXIT
%LINK-I-UDFSYM,         ERR_EXIT
%LINK-I-UDFSYM,         SSL_GET_PEER_CERTIFICATE
%LINK-I-UDFSYM,         SSL_GET_VERIFY_RESULT
%LINK-I-UDFSYM,         X509_GET_SUBJECT_NAME
%LINK-I-UDFSYM,         X509_NAME_GET_TEXT_BY_NID
%LINK-W-USEUNDEF, undefined symbol ERR_EXIT referenced
    in psect $LINK$ offset %X00000030
    in module CLIENT file <PROJ_PATH>CLIENT.OBJ;1
%LINK-W-USEUNDEF, undefined symbol BERR_EXIT referenced
    in psect $LINK$ offset %X00000040
    in module CLIENT file <PROJ_PATH>CLIENT.OBJ;1
%LINK-W-USEUNDEF, undefined symbol SSL_GET_PEER_CERTIFICATE referenced
    in psect $LINK$ offset %X000000C0
    in module CLIENT file <PROJ_PATH>CLIENT.OBJ;1
%LINK-W-USEUNDEF, undefined symbol SSL_GET_VERIFY_RESULT referenced
    in psect $LINK$ offset %X000000D0

Option2:

cc/noopt/POINTER_SIZE=64/PREFIX=ALL PREFIX=ALL/stand=vaxc /nolist/object=<PROJ_PATH>client.obj /nodebug/include=(<PROJ_PATH>,SSL$INCLUDE,tcpware_include:)/nested_include_directory=primary_file <PROJ_PATH>client.c

I have doubt that whether I need to use the LIBSSL32.OLB,LIBCRYPTO32.OLB libraries while link with lnproc. So, I have asked my system admin to install the libraries for this but they said that use the shareble object for this. Linked with shareable object

lnproc/MAP <PROJ_PATH>client.EXE <PROJ_PATH>client.obj ,LINKER_OPT/OPTIONS

It throws the following error

%DCL-W-IVQUAL, unrecognized qualifier - check validity, spelling, and placement

Note that, In these commands, LINKER_OPT.OPT is a simple text file that contains the following lines:

SYS$SHARE:SSL$LIBSSL_SHR/SHARE
SYS$SHARE:SSL$LIBCRYPTO_SHR/SHARE

What do I missing here.

Lanorkin
  • 7,310
  • 2
  • 42
  • 60
  • 'lnproc' is no VMS link command; it very likely is a DCL symbol. What does 'show symbol lnproc' give? Usually after %DCL-W-IVQUAL, there is the invalid qualifier displayed - in the following line, delimited by backslashes (\). What was it? Linking with the shareable images is OK and these seem to be the ones you need for the ssl_* and x509* symbols. I have no idea where the *err_exit comes from. I wonder if you include tcpware stuff whether you need tcpware objects or images. I would expect that you will get further, once you identify and remove the 'unrecognized qualifier'. – user2116290 Aug 04 '14 at 21:38

1 Answers1

0

lnproc appears to be a component used with the Oracle C pre-compiler as documented here. Try entering "set verify" and then rerun that final lnproc command to see if any more detail shows up regarding where the invalid qualifier is encountered. Then "set noverify" to turn it off.