1*ebfedea0SLionel Sambuc$! BUILD.COM -- Building procedure for the RSAref engine 2*ebfedea0SLionel Sambuc$ 3*ebfedea0SLionel Sambuc$ if f$search("source.dir") .eqs. "" - 4*ebfedea0SLionel Sambuc .or. f$search("install.dir") .eqs. "" 5*ebfedea0SLionel Sambuc$ then 6*ebfedea0SLionel Sambuc$ write sys$error "RSAref 2.0 hasn't been properly extracted." 7*ebfedea0SLionel Sambuc$ exit 8*ebfedea0SLionel Sambuc$ endif 9*ebfedea0SLionel Sambuc$ 10*ebfedea0SLionel Sambuc$ if (f$getsyi("cpu").lt.128) 11*ebfedea0SLionel Sambuc$ then 12*ebfedea0SLionel Sambuc$ arch := vax 13*ebfedea0SLionel Sambuc$ else 14*ebfedea0SLionel Sambuc$ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") 15*ebfedea0SLionel Sambuc$ if (arch .eqs. "") then arch = "UNK" 16*ebfedea0SLionel Sambuc$ endif 17*ebfedea0SLionel Sambuc$ 18*ebfedea0SLionel Sambuc$ _save_default = f$environment("default") 19*ebfedea0SLionel Sambuc$ set default [.install] 20*ebfedea0SLionel Sambuc$ files := desc,digit,md2c,md5c,nn,prime,- 21*ebfedea0SLionel Sambuc rsa,r_encode,r_dh,r_enhanc,r_keygen,r_random,- 22*ebfedea0SLionel Sambuc r_stdlib 23*ebfedea0SLionel Sambuc$ delete rsaref.olb;* 24*ebfedea0SLionel Sambuc$ library/create/object rsaref.olb 25*ebfedea0SLionel Sambuc$ files_i = 0 26*ebfedea0SLionel Sambuc$ rsaref_loop: 27*ebfedea0SLionel Sambuc$ files_e = f$edit(f$element(files_i,",",files),"trim") 28*ebfedea0SLionel Sambuc$ files_i = files_i + 1 29*ebfedea0SLionel Sambuc$ if files_e .eqs. "," then goto rsaref_loop_end 30*ebfedea0SLionel Sambuc$ cc/include=([-.source],[])/define=PROTOTYPES=1/object=[]'files_e'.obj - 31*ebfedea0SLionel Sambuc [-.source]'files_e'.c 32*ebfedea0SLionel Sambuc$ library/replace/object rsaref.olb 'files_e'.obj 33*ebfedea0SLionel Sambuc$ goto rsaref_loop 34*ebfedea0SLionel Sambuc$ rsaref_loop_end: 35*ebfedea0SLionel Sambuc$ 36*ebfedea0SLionel Sambuc$ set default [-] 37*ebfedea0SLionel Sambuc$ define/user openssl [---.include.openssl] 38*ebfedea0SLionel Sambuc$ cc/define=ENGINE_DYNAMIC_SUPPORT rsaref.c 39*ebfedea0SLionel Sambuc$ 40*ebfedea0SLionel Sambuc$ if arch .eqs. "VAX" 41*ebfedea0SLionel Sambuc$ then 42*ebfedea0SLionel Sambuc$ macro/object=rsaref_vec.obj sys$input: 43*ebfedea0SLionel Sambuc; 44*ebfedea0SLionel Sambuc; Transfer vector for VAX shareable image 45*ebfedea0SLionel Sambuc; 46*ebfedea0SLionel Sambuc .TITLE librsaref 47*ebfedea0SLionel Sambuc; 48*ebfedea0SLionel Sambuc; Define macro to assist in building transfer vector entries. Each entry 49*ebfedea0SLionel Sambuc; should take no more than 8 bytes. 50*ebfedea0SLionel Sambuc; 51*ebfedea0SLionel Sambuc .MACRO FTRANSFER_ENTRY routine 52*ebfedea0SLionel Sambuc .ALIGN QUAD 53*ebfedea0SLionel Sambuc .TRANSFER routine 54*ebfedea0SLionel Sambuc .MASK routine 55*ebfedea0SLionel Sambuc JMP routine+2 56*ebfedea0SLionel Sambuc .ENDM FTRANSFER_ENTRY 57*ebfedea0SLionel Sambuc; 58*ebfedea0SLionel Sambuc; Place entries in own program section. 59*ebfedea0SLionel Sambuc; 60*ebfedea0SLionel Sambuc .PSECT $$LIBRSAREF,QUAD,PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT 61*ebfedea0SLionel Sambuc 62*ebfedea0SLionel SambucLIBRSAREF_xfer: 63*ebfedea0SLionel Sambuc FTRANSFER_ENTRY bind_engine 64*ebfedea0SLionel Sambuc FTRANSFER_ENTRY v_check 65*ebfedea0SLionel Sambuc 66*ebfedea0SLionel Sambuc; 67*ebfedea0SLionel Sambuc; Allocate extra storage at end of vector to allow for expansion. 68*ebfedea0SLionel Sambuc; 69*ebfedea0SLionel Sambuc .BLKB 512-<.-LIBRSAREF_xfer> ; 1 page. 70*ebfedea0SLionel Sambuc .END 71*ebfedea0SLionel Sambuc$ link/share=librsaref.exe sys$input:/option 72*ebfedea0SLionel Sambuc! 73*ebfedea0SLionel Sambuc! Ensure transfer vector is at beginning of image 74*ebfedea0SLionel Sambuc! 75*ebfedea0SLionel SambucCLUSTER=FIRST 76*ebfedea0SLionel SambucCOLLECT=FIRST,$$LIBRSAREF 77*ebfedea0SLionel Sambuc! 78*ebfedea0SLionel Sambuc! make psects nonshareable so image can be installed. 79*ebfedea0SLionel Sambuc! 80*ebfedea0SLionel SambucPSECT_ATTR=$CHAR_STRING_CONSTANTS,NOWRT 81*ebfedea0SLionel Sambuc[]rsaref_vec.obj 82*ebfedea0SLionel Sambuc[]rsaref.obj 83*ebfedea0SLionel Sambuc[.install]rsaref.olb/lib 84*ebfedea0SLionel Sambuc[---.vax.exe.crypto]libcrypto.olb/lib 85*ebfedea0SLionel Sambuc$ else 86*ebfedea0SLionel Sambuc$ if arch_name .eqs. "ALPHA" 87*ebfedea0SLionel Sambuc$ then 88*ebfedea0SLionel Sambuc$ link/share=librsaref.exe sys$input:/option 89*ebfedea0SLionel Sambuc[]rsaref.obj 90*ebfedea0SLionel Sambuc[.install]rsaref.olb/lib 91*ebfedea0SLionel Sambuc[---.alpha.exe.crypto]libcrypto.olb/lib 92*ebfedea0SLionel Sambucsymbol_vector=(bind_engine=procedure,v_check=procedure) 93*ebfedea0SLionel Sambuc$ else 94*ebfedea0SLionel Sambuc$ if arch_name .eqs. "IA64" 95*ebfedea0SLionel Sambuc$ then 96*ebfedea0SLionel Sambuc$ link /shareable=librsaref.exe sys$input: /options 97*ebfedea0SLionel Sambuc[]rsaref.obj 98*ebfedea0SLionel Sambuc[.install]rsaref.olb/lib 99*ebfedea0SLionel Sambuc[---.ia64.exe.crypto]libcrypto.olb/lib 100*ebfedea0SLionel Sambucsymbol_vector=(bind_engine=procedure,v_check=procedure) 101*ebfedea0SLionel Sambuc$ endif 102*ebfedea0SLionel Sambuc$ endif 103*ebfedea0SLionel Sambuc$ endif 104*ebfedea0SLionel Sambuc$ 105*ebfedea0SLionel Sambuc$ set default '_save_default' 106