&TRACE ON

* Set the LE runtime library and various global values

GLOBAL LOADLIB SCEERUN

&LIBNAME = CRYPTLIB

* Compile all cryptlib modules

&TYPE Building cryptlib modules...

* Main
EXEC CC cryptapi c (def(__VMCMS__) lo
EXEC CC cryptcfg c (def(__VMCMS__) lo
EXEC CC cryptcrt c (def(__VMCMS__) lo
EXEC CC cryptctx c (def(__VMCMS__) lo
EXEC CC cryptdev c (def(__VMCMS__) lo
EXEC CC cryptenv c (def(__VMCMS__) lo
EXEC CC cryptkey c (def(__VMCMS__) lo
EXEC CC cryptlib c (def(__VMCMS__) lo
EXEC CC cryptses c (def(__VMCMS__) lo
EXEC CC cryptusr c (def(__VMCMS__) lo

* Bignum
EXEC CC bn_add c (def(__VMCMS__) lo
EXEC CC bn_ctx c (def(__VMCMS__) lo
EXEC CC bn_div c (def(__VMCMS__) lo
EXEC CC bn_exp c (def(__VMCMS__) lo
EXEC CC bn_exp2 c (def(__VMCMS__) lo
EXEC CC bn_gcd c (def(__VMCMS__) lo
EXEC CC bn_lib c (def(__VMCMS__) lo
EXEC CC bn_mod c (def(__VMCMS__) lo
EXEC CC bn_mont c (def(__VMCMS__) lo
EXEC CC bn_mul c (def(__VMCMS__) lo
EXEC CC bn_recp c (def(__VMCMS__) lo
EXEC CC bn_shift c (def(__VMCMS__) lo
EXEC CC bn_sqr c (def(__VMCMS__) lo
EXEC CC bn_word c (def(__VMCMS__) lo

* Cert
EXEC CC certrev c (def(__VMCMS__) lo
EXEC CC certschk c (def(__VMCMS__) lo
EXEC CC certsign c (def(__VMCMS__) lo
EXEC CC certval c (def(__VMCMS__) lo
EXEC CC chain c (def(__VMCMS__) lo
EXEC CC chk_cert c (def(__VMCMS__) lo
EXEC CC chk_chn c (def(__VMCMS__) lo
EXEC CC chk_use c (def(__VMCMS__) lo
EXEC CC comp_get c (def(__VMCMS__) lo
EXEC CC comp_set c (def(__VMCMS__) lo
EXEC CC dn c (def(__VMCMS__) lo
EXEC CC dnstring c (def(__VMCMS__) lo
EXEC CC ext c (def(__VMCMS__) lo
EXEC CC ext_add c (def(__VMCMS__) lo
EXEC CC ext_chk c (def(__VMCMS__) lo
EXEC CC ext_copy c (def(__VMCMS__) lo
EXEC CC ext_def c (def(__VMCMS__) lo
EXEC CC ext_rd c (def(__VMCMS__) lo
EXEC CC ext_wr c (def(__VMCMS__) lo
EXEC CC imp_exp c (def(__VMCMS__) lo
EXEC CC read c (def(__VMCMS__) lo
EXEC CC trustmgr c (def(__VMCMS__) lo
EXEC CC write c (def(__VMCMS__) lo

* Context
EXEC CC ctx_3des c (def(__VMCMS__) lo
EXEC CC ctx_aes c (def(__VMCMS__) lo
EXEC CC ctx_bf c (def(__VMCMS__) lo
EXEC CC ctx_cast c (def(__VMCMS__) lo
EXEC CC ctx_des c (def(__VMCMS__) lo
EXEC CC ctx_dh c (def(__VMCMS__) lo
EXEC CC ctx_dsa c (def(__VMCMS__) lo
EXEC CC ctx_elg c (def(__VMCMS__) lo
EXEC CC ctx_hmd5 c (def(__VMCMS__) lo
EXEC CC ctx_hrmd c (def(__VMCMS__) lo
EXEC CC ctx_hsha c (def(__VMCMS__) lo
EXEC CC ctx_idea c (def(__VMCMS__) lo
EXEC CC ctx_md2 c (def(__VMCMS__) lo
EXEC CC ctx_md4 c (def(__VMCMS__) lo
EXEC CC ctx_md5 c (def(__VMCMS__) lo
EXEC CC ctx_misc c (def(__VMCMS__) lo
EXEC CC ctx_rc2 c (def(__VMCMS__) lo
EXEC CC ctx_rc4 c (def(__VMCMS__) lo
EXEC CC ctx_rc5 c (def(__VMCMS__) lo
EXEC CC ctx_ripe c (def(__VMCMS__) lo
EXEC CC ctx_rsa c (def(__VMCMS__) lo
EXEC CC ctx_sha c (def(__VMCMS__) lo
EXEC CC ctx_sha2 c (def(__VMCMS__) lo
EXEC CC ctx_skip c (def(__VMCMS__) lo
EXEC CC kg_dlp c (def(__VMCMS__) lo
EXEC CC kg_prime c (def(__VMCMS__) lo
EXEC CC kg_rsa c (def(__VMCMS__) lo
EXEC CC keyload c (def(__VMCMS__) lo
EXEC CC key_rd c (def(__VMCMS__) lo
EXEC CC key_wr c (def(__VMCMS__) lo

* Crypt (encryption algorithms)
EXEC CC aes_modes c (def(__VMCMS__) lo
EXEC CC aescrypt c (def(__VMCMS__) lo
EXEC CC aeskey c (def(__VMCMS__) lo
EXEC CC aestab c (def(__VMCMS__) lo
EXEC CC bfecb c (def(__VMCMS__) lo
EXEC CC bfenc c (def(__VMCMS__) lo
EXEC CC bfskey c (def(__VMCMS__) lo
EXEC CC castecb c (def(__VMCMS__) lo
EXEC CC castenc c (def(__VMCMS__) lo
EXEC CC castskey c (def(__VMCMS__) lo
EXEC CC descbc c (def(__VMCMS__) lo
EXEC CC desecb c (def(__VMCMS__) lo
EXEC CC desecb3 c (def(__VMCMS__) lo
EXEC CC desenc c (def(__VMCMS__) lo
EXEC CC desskey c (def(__VMCMS__) lo
EXEC CC icbc c (def(__VMCMS__) lo
EXEC CC iecb c (def(__VMCMS__) lo
EXEC CC iskey c (def(__VMCMS__) lo
EXEC CC rc2cbc c (def(__VMCMS__) lo
EXEC CC rc2ecb c (def(__VMCMS__) lo
EXEC CC rc2skey c (def(__VMCMS__) lo
EXEC CC rc4enc c (def(__VMCMS__) lo
EXEC CC rc4skey c (def(__VMCMS__) lo
EXEC CC rc5ecb c (def(__VMCMS__) lo
EXEC CC rc5enc c (def(__VMCMS__) lo
EXEC CC rc5skey c (def(__VMCMS__) lo
EXEC CC skipjack c (def(__VMCMS__) lo

* Crypt (hash algorithms)
EXEC CC md2dgst c (def(__VMCMS__) lo
EXEC CC md4dgst c (def(__VMCMS__) lo
EXEC CC md5dgst c (def(__VMCMS__) lo
EXEC CC rmddgst c (def(__VMCMS__) lo
EXEC CC sha1dgst c (def(__VMCMS__) lo
EXEC CC sha2 c (def(__VMCMS__) lo

* Device
EXEC CC system c (def(__VMCMS__) lo

* Envelope
EXEC CC cms_denv c (def(__VMCMS__) lo
EXEC CC cms_env c (def(__VMCMS__) lo
EXEC CC decode c (def(__VMCMS__) lo
EXEC CC encode c (def(__VMCMS__) lo
EXEC CC pgp_denv c (def(__VMCMS__) lo
EXEC CC pgp_env c (def(__VMCMS__) lo
EXEC CC res_actn c (def(__VMCMS__) lo
EXEC CC res_denv c (def(__VMCMS__) lo
EXEC CC res_env c (def(__VMCMS__) lo

* I/O
EXEC CC file c (def(__VMCMS__) lo
EXEC CC memory c (def(__VMCMS__) lo
EXEC CC stream c (def(__VMCMS__) lo

* Kernel
EXEC CC attr_acl c (def(__VMCMS__) lo
EXEC CC certm_acl c (def(__VMCMS__) lo
EXEC CC init c (def(__VMCMS__) lo
EXEC CC int_msg c (def(__VMCMS__) lo
EXEC CC key_acl c (def(__VMCMS__) lo
EXEC CC mech_acl c (def(__VMCMS__) lo
EXEC CC msg_acl c (def(__VMCMS__) lo
EXEC CC obj_acc c (def(__VMCMS__) lo
EXEC CC objects c (def(__VMCMS__) lo
EXEC CC sec_mem c (def(__VMCMS__) lo
EXEC CC semaphore c (def(__VMCMS__) lo
EXEC CC sendmsg c (def(__VMCMS__) lo

* Keyset
EXEC CC pgp c (def(__VMCMS__) lo
EXEC CC pkcs12 c (def(__VMCMS__) lo
EXEC CC pkcs15 c (def(__VMCMS__) lo
EXEC CC pkcs15_add c (def(__VMCMS__) lo
EXEC CC pkcs15_att c (def(__VMCMS__) lo
EXEC CC pkcs15_rd c (def(__VMCMS__) lo
EXEC CC pkcs15_wr c (def(__VMCMS__) lo

* Mechanism
EXEC CC keyex c (def(__VMCMS__) lo
EXEC CC keyex_int c (def(__VMCMS__) lo
EXEC CC keyex_rw c (def(__VMCMS__) lo
EXEC CC mech_drv c (def(__VMCMS__) lo
EXEC CC mech_enc c (def(__VMCMS__) lo
EXEC CC mech_int c (def(__VMCMS__) lo
EXEC CC mech_sig c (def(__VMCMS__) lo
EXEC CC mech_wrp c (def(__VMCMS__) lo
EXEC CC obj_qry c (def(__VMCMS__) lo
EXEC CC sign c (def(__VMCMS__) lo
EXEC CC sign_cms c (def(__VMCMS__) lo
EXEC CC sign_int c (def(__VMCMS__) lo
EXEC CC sign_pgp c (def(__VMCMS__) lo
EXEC CC sign_rw c (def(__VMCMS__) lo
EXEC CC sign_x509 c (def(__VMCMS__) lo

* Misc
EXEC CC asn1_chk c (def(__VMCMS__) lo
EXEC CC asn1_ext c (def(__VMCMS__) lo
EXEC CC asn1_rd c (def(__VMCMS__) lo
EXEC CC asn1_wr c (def(__VMCMS__) lo
EXEC CC base64 c (def(__VMCMS__) lo
EXEC CC int_api c (def(__VMCMS__) lo
EXEC CC int_attr c (def(__VMCMS__) lo
EXEC CC int_env c (def(__VMCMS__) lo
EXEC CC misc_rw c (def(__VMCMS__) lo
EXEC CC os_spec c (def(__VMCMS__) lo
EXEC CC pgp_misc c (def(__VMCMS__) lo
EXEC CC random c (def(__VMCMS__) lo
EXEC CC user c (def(__VMCMS__) lo
EXEC CC user_cfg c (def(__VMCMS__) lo
EXEC CC vmcms c (def(__VMCMS__) lo

* Zlib
EXEC CC adler32 c (def(__VMCMS__) lo
EXEC CC deflate c (def(__VMCMS__) lo
EXEC CC inffast c (def(__VMCMS__) lo
EXEC CC inflate c (def(__VMCMS__) lo
EXEC CC inftrees c (def(__VMCMS__) lo
EXEC CC trees c (def(__VMCMS__) lo
EXEC CC zutil c (def(__VMCMS__) lo

* Build the cryptlib library from the object modules

&TYPE Building cryptlib...
EXEC C370LIB GEN &LIBNAME cryptapi cryptcfg cryptcrt cryptctx cryptdev
EXEC C370LIB ADD &LIBNAME cryptenv cryptkey cryptlib cryptses cryptusr
EXEC C370LIB ADD &LIBNAME bn_add bn_ctx bn_div bn_exp bn_exp2 bn_gcd
EXEC C370LIB ADD &LIBNAME bn_lib bn_mod bn_mont bn_mul bn_recp bn_shift
EXEC C370LIB ADD &LIBNAME bn_sqr bn_word
EXEC C370LIB ADD &LIBNAME certrev certschk certsign certval chain chk_cert
EXEC C370LIB ADD &LIBNAME chk_chn chk_use comp_get comp_set dn dnstring
EXEC C370LIB ADD &LIBNAME ext ext_add ext_chk ext_copy ext_def ext_rd
EXEC C370LIB ADD &LIBNAME ext_wr imp_exp read trustmgr write
EXEC C370LIB ADD &LIBNAME ctx_3des ctx_aes ctx_bf ctx_cast ctx_des ctx_dh
EXEC C370LIB ADD &LIBNAME ctx_dsa ctx_elg ctx_hmd5 ctx_hrmd ctx_hsha
EXEC C370LIB ADD &LIBNAME ctx_idea ctx_md2 ctx_md4 ctx_md5 ctx_misc
EXEC C370LIB ADD &LIBNAME ctx_rc2 ctx_rc4 ctx_rc5 ctx_ripe ctx_rsa
EXEC C370LIB ADD &LIBNAME ctx_sha ctx_sha2 ctx_skip kg_dlp kg_prime
EXEC C370LIB ADD &LIBNAME kg_rsa keyload key_rd key_wr
EXEC C370LIB ADD &LIBNAME aes_modes aescrypt aeskey aestab bfecb bfenc
EXEC C370LIB ADD &LIBNAME bfskey castecb castenc castskey descbc desecb
EXEC C370LIB ADD &LIBNAME desecb3 desenc desskey icbc iecb iskey rc2cbc
EXEC C370LIB ADD &LIBNAME rc2ecb rc2skey rc4enc rc4skey rc5ecb rc5enc
EXEC C370LIB ADD &LIBNAME rc5skey skipjack
EXEC C370LIB ADD &LIBNAME md2dgst md4dgst md5dgst rmddgst sha1dgst sha2
EXEC C370LIB ADD &LIBNAME system
EXEC C370LIB ADD &LIBNAME cms_denv cms_env decode encode pgp_denv
EXEC C370LIB ADD &LIBNAME pgp_env res_actn res_denv res_env
EXEC C370LIB ADD &LIBNAME file memory stream
EXEC C370LIB ADD &LIBNAME attr_acl certm_acl init int_msg key_acl
EXEC C370LIB ADD &LIBNAME mech_acl msg_acl obj_acc objects sec_mem
EXEC C370LIB ADD &LIBNAME semaphore sendmsg
EXEC C370LIB ADD &LIBNAME pgp pkcs12 pkcs15 pkcs15_add pkcs15_att
EXEC C370LIB ADD &LIBNAME pkcs15_rd pkcs15_wr
EXEC C370LIB ADD &LIBNAME keyex keyex_int keyex_rw mech_drv mech_enc
EXEC C370LIB ADD &LIBNAME mech_int mech_sig mech_wrp obj_qry sign
EXEC C370LIB ADD &LIBNAME sign_cms sign_int sign_pgp sign_rw sign_x509
EXEC C370LIB ADD &LIBNAME asn1_chk asn1_ext asn1_rd asn1_wr base64
EXEC C370LIB ADD &LIBNAME int_api int_attr int_env misc_rw os_spec
EXEC C370LIB ADD &LIBNAME pgp_misc random user user_cfg vmcms
EXEC C370LIB ADD &LIBNAME adler32 deflate inffast inflate inftrees
EXEC C370LIB ADD &LIBNAME trees zutil

* Make the newly-generated modules available for use

GLOBAL TXTLIB &LIBNAME

* Compile the test code

&TYPE Building test routines...

EXEC CC utils c (def(__VMCMS__) lo
EXEC CC certs c (def(__VMCMS__) lo
EXEC CC devices c (def(__VMCMS__) lo
EXEC CC envelope c (def(__VMCMS__) lo
EXEC CC highlvl c (def(__VMCMS__) lo
EXEC CC keydbx c (def(__VMCMS__) lo
EXEC CC keyfile c (def(__VMCMS__) lo
EXEC CC loadkey c (def(__VMCMS__) lo
EXEC CC lowlvl c (def(__VMCMS__) lo
EXEC CC scert c (def(__VMCMS__) lo
EXEC CC sreqresp c (def(__VMCMS__) lo
EXEC CC ssh c (def(__VMCMS__) lo
EXEC CC ssl c (def(__VMCMS__) lo
EXEC CC stress c (def(__VMCMS__) lo
EXEC CC testlib c (def(__VMCMS__) lo

* Build the executable

&TYPE Building test program...
EXEC CMOD testlib utils certs devices envelope highlvl keydbx keyfile loadkey lowlvl scert sreqresp ssh ssl stress
