diff options
| author | djm <> | 2011-11-03 02:32:24 +0000 |
|---|---|---|
| committer | djm <> | 2011-11-03 02:32:24 +0000 |
| commit | bd081fc6d9aca84ff3cbde2c626c28668f73d967 (patch) | |
| tree | cf32a9eedf59bc153f2cabc7cf72bacad24c4aff | |
| parent | 75291ae343a87368ad49c13ac02f85a88159417f (diff) | |
| download | openbsd-bd081fc6d9aca84ff3cbde2c626c28668f73d967.tar.gz openbsd-bd081fc6d9aca84ff3cbde2c626c28668f73d967.tar.bz2 openbsd-bd081fc6d9aca84ff3cbde2c626c28668f73d967.zip | |
import OpenSSL 1.0.0e
Diffstat (limited to '')
179 files changed, 5399 insertions, 1799 deletions
diff --git a/src/lib/libcrypto/Attic/Makefile b/src/lib/libcrypto/Attic/Makefile index c1033f6d77..85d9f249c5 100644 --- a/src/lib/libcrypto/Attic/Makefile +++ b/src/lib/libcrypto/Attic/Makefile | |||
| @@ -74,7 +74,9 @@ x86_64cpuid.s: x86_64cpuid.pl | |||
| 74 | $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@ | 74 | $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@ |
| 75 | ia64cpuid.s: ia64cpuid.S | 75 | ia64cpuid.s: ia64cpuid.S |
| 76 | $(CC) $(CFLAGS) -E ia64cpuid.S > $@ | 76 | $(CC) $(CFLAGS) -E ia64cpuid.S > $@ |
| 77 | ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@ | 77 | ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@ |
| 78 | alphacpuid.s: alphacpuid.pl | ||
| 79 | $(PERL) $< | $(CC) -E - | tee $@ > /dev/null | ||
| 78 | 80 | ||
| 79 | testapps: | 81 | testapps: |
| 80 | [ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \ | 82 | [ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \ |
diff --git a/src/lib/libcrypto/crypto-lib.com b/src/lib/libcrypto/crypto-lib.com index a4b6635091..a29c0afd93 100644 --- a/src/lib/libcrypto/crypto-lib.com +++ b/src/lib/libcrypto/crypto-lib.com | |||
| @@ -47,11 +47,33 @@ $! P6, if defined, sets a choice of crypto methods to compile. | |||
| 47 | $! WARNING: this should only be done to recompile some part of an already | 47 | $! WARNING: this should only be done to recompile some part of an already |
| 48 | $! fully compiled library. | 48 | $! fully compiled library. |
| 49 | $! | 49 | $! |
| 50 | $! P7, if defined, specifies the C pointer size. Ignored on VAX. | ||
| 51 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) | ||
| 52 | $! Supported values are: | ||
| 53 | $! | ||
| 54 | $! "" Compile with default (/NOPOINTER_SIZE) | ||
| 55 | $! 32 Compile with /POINTER_SIZE=32 (SHORT) | ||
| 56 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]). | ||
| 57 | $! (Automatically select ARGV if compiler supports it.) | ||
| 58 | $! 64= Compile with /POINTER_SIZE=64 (LONG). | ||
| 59 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). | ||
| 60 | $! | ||
| 61 | $! P8, if defined, specifies a directory where ZLIB files (zlib.h, | ||
| 62 | $! libz.olb) may be found. Optionally, a non-default object library | ||
| 63 | $! name may be included ("dev:[dir]libz_64.olb", for example). | ||
| 64 | $! | ||
| 65 | $! | ||
| 66 | $! Announce/identify. | ||
| 67 | $! | ||
| 68 | $ proc = f$environment( "procedure") | ||
| 69 | $ write sys$output "@@@ "+ - | ||
| 70 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 50 | $! | 71 | $! |
| 51 | $! Define A TCP/IP Library That We Will Need To Link To. | 72 | $! Define A TCP/IP Library That We Will Need To Link To. |
| 52 | $! (That Is, If We Need To Link To One.) | 73 | $! (That Is, If We Need To Link To One.) |
| 53 | $! | 74 | $! |
| 54 | $ TCPIP_LIB = "" | 75 | $ TCPIP_LIB = "" |
| 76 | $ ZLIB_LIB = "" | ||
| 55 | $! | 77 | $! |
| 56 | $! Check Which Architecture We Are Using. | 78 | $! Check Which Architecture We Are Using. |
| 57 | $! | 79 | $! |
| @@ -75,6 +97,11 @@ $! End The Architecture Check. | |||
| 75 | $! | 97 | $! |
| 76 | $ ENDIF | 98 | $ ENDIF |
| 77 | $! | 99 | $! |
| 100 | $ ARCHD = ARCH | ||
| 101 | $ LIB32 = "32" | ||
| 102 | $ OPT_FILE = "" | ||
| 103 | $ POINTER_SIZE = "" | ||
| 104 | $! | ||
| 78 | $! Define The Different Encryption Types. | 105 | $! Define The Different Encryption Types. |
| 79 | $! NOTE: Some might think this list ugly. However, it's made this way to | 106 | $! NOTE: Some might think this list ugly. However, it's made this way to |
| 80 | $! reflect the SDIRS variable in [-]Makefile.org as closely as possible, | 107 | $! reflect the SDIRS variable in [-]Makefile.org as closely as possible, |
| @@ -91,17 +118,29 @@ $ ENCRYPT_TYPES = "Basic,"+ - | |||
| 91 | "EVP,EVP_2,EVP_3,ASN1,ASN1_2,PEM,X509,X509V3,"+ - | 118 | "EVP,EVP_2,EVP_3,ASN1,ASN1_2,PEM,X509,X509V3,"+ - |
| 92 | "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ - | 119 | "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ - |
| 93 | "STORE,CMS,PQUEUE,TS,JPAKE" | 120 | "STORE,CMS,PQUEUE,TS,JPAKE" |
| 94 | $! Define The OBJ Directory. | ||
| 95 | $! | 121 | $! |
| 96 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.CRYPTO] | 122 | $! Check To Make Sure We Have Valid Command Line Parameters. |
| 123 | $! | ||
| 124 | $ GOSUB CHECK_OPTIONS | ||
| 97 | $! | 125 | $! |
| 98 | $! Define The EXE Directory. | 126 | $! Define The OBJ and EXE Directories. |
| 99 | $! | 127 | $! |
| 100 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.CRYPTO] | 128 | $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.CRYPTO] |
| 129 | $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO] | ||
| 101 | $! | 130 | $! |
| 102 | $! Check To Make Sure We Have Valid Command Line Parameters. | 131 | $! Specify the destination directory in any /MAP option. |
| 103 | $! | 132 | $! |
| 104 | $ GOSUB CHECK_OPTIONS | 133 | $ if (LINKMAP .eqs. "MAP") |
| 134 | $ then | ||
| 135 | $ LINKMAP = LINKMAP+ "=''EXE_DIR'" | ||
| 136 | $ endif | ||
| 137 | $! | ||
| 138 | $! Add the location prefix to the linker options file name. | ||
| 139 | $! | ||
| 140 | $ if (OPT_FILE .nes. "") | ||
| 141 | $ then | ||
| 142 | $ OPT_FILE = EXE_DIR+ OPT_FILE | ||
| 143 | $ endif | ||
| 105 | $! | 144 | $! |
| 106 | $! Initialise logical names and such | 145 | $! Initialise logical names and such |
| 107 | $! | 146 | $! |
| @@ -109,7 +148,7 @@ $ GOSUB INITIALISE | |||
| 109 | $! | 148 | $! |
| 110 | $! Tell The User What Kind of Machine We Run On. | 149 | $! Tell The User What Kind of Machine We Run On. |
| 111 | $! | 150 | $! |
| 112 | $ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine." | 151 | $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" |
| 113 | $! | 152 | $! |
| 114 | $! | 153 | $! |
| 115 | $! Check To See If The Architecture Specific OBJ Directory Exists. | 154 | $! Check To See If The Architecture Specific OBJ Directory Exists. |
| @@ -140,11 +179,11 @@ $ ENDIF | |||
| 140 | $! | 179 | $! |
| 141 | $! Define The Library Name. | 180 | $! Define The Library Name. |
| 142 | $! | 181 | $! |
| 143 | $ LIB_NAME := 'EXE_DIR'LIBCRYPTO.OLB | 182 | $ LIB_NAME := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB |
| 144 | $! | 183 | $! |
| 145 | $! Define The CRYPTO-LIB We Are To Use. | 184 | $! Define The CRYPTO-LIB We Are To Use. |
| 146 | $! | 185 | $! |
| 147 | $ CRYPTO_LIB := 'EXE_DIR'LIBCRYPTO.OLB | 186 | $ CRYPTO_LIB := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB |
| 148 | $! | 187 | $! |
| 149 | $! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library... | 188 | $! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library... |
| 150 | $! | 189 | $! |
| @@ -193,7 +232,7 @@ $ LIB_CAST = "c_skey,c_ecb,c_enc,c_cfb64,c_ofb64" | |||
| 193 | $ LIB_CAMELLIA = "camellia,cmll_misc,cmll_ecb,cmll_cbc,cmll_ofb,"+ - | 232 | $ LIB_CAMELLIA = "camellia,cmll_misc,cmll_ecb,cmll_cbc,cmll_ofb,"+ - |
| 194 | "cmll_cfb,cmll_ctr" | 233 | "cmll_cfb,cmll_ctr" |
| 195 | $ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb" | 234 | $ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb" |
| 196 | $ LIB_MODES = "cbc128,ctr128,cfb128,ofb128" | 235 | $ LIB_MODES = "cbc128,ctr128,cts128,cfb128,ofb128" |
| 197 | $ LIB_BN_ASM = "[.asm]vms.mar,vms-helper" | 236 | $ LIB_BN_ASM = "[.asm]vms.mar,vms-helper" |
| 198 | $ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN - | 237 | $ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN - |
| 199 | LIB_BN_ASM = "bn_asm" | 238 | LIB_BN_ASM = "bn_asm" |
| @@ -301,15 +340,23 @@ $ LIB_JPAKE = "jpake,jpake_err" | |||
| 301 | $! | 340 | $! |
| 302 | $! Setup exceptional compilations | 341 | $! Setup exceptional compilations |
| 303 | $! | 342 | $! |
| 304 | $ ! Add definitions for no threads on OpenVMS 7.1 and higher | 343 | $ CC3_SHOWN = 0 |
| 344 | $ CC4_SHOWN = 0 | ||
| 345 | $ CC5_SHOWN = 0 | ||
| 346 | $ CC6_SHOWN = 0 | ||
| 347 | $! | ||
| 348 | $! The following lists must have leading and trailing commas, and no | ||
| 349 | $! embedded spaces. (They are scanned for ",name,".) | ||
| 350 | $! | ||
| 351 | $ ! Add definitions for no threads on OpenVMS 7.1 and higher. | ||
| 305 | $ COMPILEWITH_CC3 = ",bss_rtcp," | 352 | $ COMPILEWITH_CC3 = ",bss_rtcp," |
| 306 | $ ! Disable the DOLLARID warning | 353 | $ ! Disable the DOLLARID warning. Not needed with /STANDARD=RELAXED. |
| 307 | $ COMPILEWITH_CC4 = ",a_utctm,bss_log,o_time,o_dir" | 354 | $ COMPILEWITH_CC4 = "" !!! ",a_utctm,bss_log,o_time,o_dir," |
| 308 | $ ! Disable disjoint optimization | 355 | $ ! Disable disjoint optimization on VAX with DECC. |
| 309 | $ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + - | 356 | $ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + - |
| 310 | "seed,sha_dgst,sha1dgst,rmd_dgst,bf_enc," | 357 | "seed,sha_dgst,sha1dgst,rmd_dgst,bf_enc," |
| 311 | $ ! Disable the MIXLINKAGE warning | 358 | $ ! Disable the MIXLINKAGE warning. |
| 312 | $ COMPILEWITH_CC6 = ",enc_read,set_key," | 359 | $ COMPILEWITH_CC6 = "" !!! ",enc_read,set_key," |
| 313 | $! | 360 | $! |
| 314 | $! Figure Out What Other Modules We Are To Build. | 361 | $! Figure Out What Other Modules We Are To Build. |
| 315 | $! | 362 | $! |
| @@ -515,31 +562,60 @@ $ WRITE SYS$OUTPUT "Compiling The ",FILE_NAME," File. (",BUILDALL,",",STATE," | |||
| 515 | $ ENDIF | 562 | $ ENDIF |
| 516 | $ IF (MODULE_NAME.NES."") | 563 | $ IF (MODULE_NAME.NES."") |
| 517 | $ THEN | 564 | $ THEN |
| 518 | $ WRITE SYS$OUTPUT " ",FILE_NAME,"" | 565 | $ WRITE SYS$OUTPUT " ",FILE_NAME,"" |
| 519 | $ ENDIF | 566 | $ ENDIF |
| 520 | $! | 567 | $! |
| 521 | $! Compile The File. | 568 | $! Compile The File. |
| 522 | $! | 569 | $! |
| 523 | $ ON ERROR THEN GOTO NEXT_FILE | 570 | $ ON ERROR THEN GOTO NEXT_FILE |
| 524 | $ FILE_NAME0 = F$ELEMENT(0,".",FILE_NAME) | 571 | $ FILE_NAME0 = ","+ F$ELEMENT(0,".",FILE_NAME)+ "," |
| 525 | $ IF FILE_NAME - ".mar" .NES. FILE_NAME | 572 | $ IF FILE_NAME - ".mar" .NES. FILE_NAME |
| 526 | $ THEN | 573 | $ THEN |
| 527 | $ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 574 | $ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 528 | $ ELSE | 575 | $ ELSE |
| 529 | $ IF COMPILEWITH_CC3 - FILE_NAME0 .NES. COMPILEWITH_CC3 | 576 | $ IF COMPILEWITH_CC3 - FILE_NAME0 .NES. COMPILEWITH_CC3 |
| 530 | $ THEN | 577 | $ THEN |
| 578 | $ write sys$output " \Using special rule (3)" | ||
| 579 | $ if (.not. CC3_SHOWN) | ||
| 580 | $ then | ||
| 581 | $ CC3_SHOWN = 1 | ||
| 582 | $ x = " "+ CC3 | ||
| 583 | $ write /symbol sys$output x | ||
| 584 | $ endif | ||
| 531 | $ CC3/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 585 | $ CC3/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 532 | $ ELSE | 586 | $ ELSE |
| 533 | $ IF COMPILEWITH_CC4 - FILE_NAME0 .NES. COMPILEWITH_CC4 | 587 | $ IF COMPILEWITH_CC4 - FILE_NAME0 .NES. COMPILEWITH_CC4 |
| 534 | $ THEN | 588 | $ THEN |
| 589 | $ write /symbol sys$output " \Using special rule (4)" | ||
| 590 | $ if (.not. CC4_SHOWN) | ||
| 591 | $ then | ||
| 592 | $ CC4_SHOWN = 1 | ||
| 593 | $ x = " "+ CC4 | ||
| 594 | $ write /symbol sys$output x | ||
| 595 | $ endif | ||
| 535 | $ CC4/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 596 | $ CC4/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 536 | $ ELSE | 597 | $ ELSE |
| 537 | $ IF COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5 | 598 | $ IF CC5_DIFFERENT .AND. - |
| 599 | (COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5) | ||
| 538 | $ THEN | 600 | $ THEN |
| 601 | $ write sys$output " \Using special rule (5)" | ||
| 602 | $ if (.not. CC5_SHOWN) | ||
| 603 | $ then | ||
| 604 | $ CC5_SHOWN = 1 | ||
| 605 | $ x = " "+ CC5 | ||
| 606 | $ write /symbol sys$output x | ||
| 607 | $ endif | ||
| 539 | $ CC5/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 608 | $ CC5/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 540 | $ ELSE | 609 | $ ELSE |
| 541 | $ IF COMPILEWITH_CC6 - FILE_NAME0 .NES. COMPILEWITH_CC6 | 610 | $ IF COMPILEWITH_CC6 - FILE_NAME0 .NES. COMPILEWITH_CC6 |
| 542 | $ THEN | 611 | $ THEN |
| 612 | $ write sys$output " \Using special rule (6)" | ||
| 613 | $ if (.not. CC6_SHOWN) | ||
| 614 | $ then | ||
| 615 | $ CC6_SHOWN = 1 | ||
| 616 | $ x = " "+ CC6 | ||
| 617 | $ write /symbol sys$output x | ||
| 618 | $ endif | ||
| 543 | $ CC6/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 619 | $ CC6/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 544 | $ ELSE | 620 | $ ELSE |
| 545 | $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 621 | $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| @@ -586,38 +662,22 @@ $! SHOW SYMBOL APPLICATION* | |||
| 586 | $! | 662 | $! |
| 587 | $! Tell the user what happens | 663 | $! Tell the user what happens |
| 588 | $! | 664 | $! |
| 589 | $ WRITE SYS$OUTPUT " ",APPLICATION,".exe" | 665 | $ WRITE SYS$OUTPUT " ",APPLICATION,".exe" |
| 590 | $! | 666 | $! |
| 591 | $! Link The Program. | 667 | $! Link The Program. |
| 592 | $! | 668 | $! |
| 593 | $ ON ERROR THEN GOTO NEXT_APPLICATION | 669 | $ ON ERROR THEN GOTO NEXT_APPLICATION |
| 594 | $! | 670 | $! |
| 595 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | 671 | $! Link With A TCP/IP Library. |
| 596 | $! | 672 | $! |
| 597 | $ IF (TCPIP_LIB.NES."") | 673 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' - |
| 598 | $ THEN | 674 | /EXE='EXE_DIR''APPLICATION'.EXE - |
| 675 | 'OBJ_DIR''APPLICATION_OBJECTS', - | ||
| 676 | 'CRYPTO_LIB'/LIBRARY - | ||
| 677 | 'TCPIP_LIB' - | ||
| 678 | 'ZLIB_LIB' - | ||
| 679 | ,'OPT_FILE' /OPTIONS | ||
| 599 | $! | 680 | $! |
| 600 | $! Link With A TCP/IP Library. | ||
| 601 | $! | ||
| 602 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - | ||
| 603 | 'OBJ_DIR''APPLICATION_OBJECTS', - | ||
| 604 | 'CRYPTO_LIB'/LIBRARY, - | ||
| 605 | 'TCPIP_LIB','OPT_FILE'/OPTION | ||
| 606 | $! | ||
| 607 | $! Else... | ||
| 608 | $! | ||
| 609 | $ ELSE | ||
| 610 | $! | ||
| 611 | $! Don't Link With A TCP/IP Library. | ||
| 612 | $! | ||
| 613 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - | ||
| 614 | 'OBJ_DIR''APPLICATION_OBJECTS',- | ||
| 615 | 'CRYPTO_LIB'/LIBRARY, - | ||
| 616 | 'OPT_FILE'/OPTION | ||
| 617 | $! | ||
| 618 | $! End The TCP/IP Library Check. | ||
| 619 | $! | ||
| 620 | $ ENDIF | ||
| 621 | $ GOTO NEXT_APPLICATION | 681 | $ GOTO NEXT_APPLICATION |
| 622 | $ APPLICATION_DONE: | 682 | $ APPLICATION_DONE: |
| 623 | $ ENDIF | 683 | $ ENDIF |
| @@ -656,7 +716,7 @@ $! | |||
| 656 | $ CREATE 'OPT_FILE' | 716 | $ CREATE 'OPT_FILE' |
| 657 | $DECK | 717 | $DECK |
| 658 | ! | 718 | ! |
| 659 | ! Default System Options File To Link Agianst | 719 | ! Default System Options File To Link Against |
| 660 | ! The Sharable VAX C Runtime Library. | 720 | ! The Sharable VAX C Runtime Library. |
| 661 | ! | 721 | ! |
| 662 | SYS$SHARE:VAXCRTL.EXE/SHARE | 722 | SYS$SHARE:VAXCRTL.EXE/SHARE |
| @@ -685,7 +745,7 @@ $! | |||
| 685 | $ CREATE 'OPT_FILE' | 745 | $ CREATE 'OPT_FILE' |
| 686 | $DECK | 746 | $DECK |
| 687 | ! | 747 | ! |
| 688 | ! Default System Options File To Link Agianst | 748 | ! Default System Options File To Link Against |
| 689 | ! The Sharable C Runtime Library. | 749 | ! The Sharable C Runtime Library. |
| 690 | ! | 750 | ! |
| 691 | GNU_CC:[000000]GCCLIB/LIBRARY | 751 | GNU_CC:[000000]GCCLIB/LIBRARY |
| @@ -720,7 +780,7 @@ $! | |||
| 720 | $ CREATE 'OPT_FILE' | 780 | $ CREATE 'OPT_FILE' |
| 721 | $DECK | 781 | $DECK |
| 722 | ! | 782 | ! |
| 723 | ! Default System Options File To Link Agianst | 783 | ! Default System Options File To Link Against |
| 724 | ! The Sharable DEC C Runtime Library. | 784 | ! The Sharable DEC C Runtime Library. |
| 725 | ! | 785 | ! |
| 726 | SYS$SHARE:DECC$SHR.EXE/SHARE | 786 | SYS$SHARE:DECC$SHR.EXE/SHARE |
| @@ -735,7 +795,7 @@ $! | |||
| 735 | $ CREATE 'OPT_FILE' | 795 | $ CREATE 'OPT_FILE' |
| 736 | $DECK | 796 | $DECK |
| 737 | ! | 797 | ! |
| 738 | ! Default System Options File For non-VAX To Link Agianst | 798 | ! Default System Options File For non-VAX To Link Against |
| 739 | ! The Sharable C Runtime Library. | 799 | ! The Sharable C Runtime Library. |
| 740 | ! | 800 | ! |
| 741 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE | 801 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE |
| @@ -756,7 +816,7 @@ $ ENDIF | |||
| 756 | $! | 816 | $! |
| 757 | $! Tell The User What Linker Option File We Are Using. | 817 | $! Tell The User What Linker Option File We Are Using. |
| 758 | $! | 818 | $! |
| 759 | $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"." | 819 | $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"." |
| 760 | $! | 820 | $! |
| 761 | $! Time To RETURN. | 821 | $! Time To RETURN. |
| 762 | $! | 822 | $! |
| @@ -803,8 +863,8 @@ $ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.E | |||
| 803 | $ WRITE SYS$OUTPUT "" | 863 | $ WRITE SYS$OUTPUT "" |
| 804 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" | 864 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" |
| 805 | $ WRITE SYS$OUTPUT "" | 865 | $ WRITE SYS$OUTPUT "" |
| 806 | $ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture." | 866 | $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture." |
| 807 | $ WRITE SYS$OUTPUT " IA64 : IA64 Architecture." | 867 | $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture." |
| 808 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." | 868 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." |
| 809 | $ WRITE SYS$OUTPUT "" | 869 | $ WRITE SYS$OUTPUT "" |
| 810 | $! | 870 | $! |
| @@ -825,15 +885,16 @@ $! | |||
| 825 | $ IF (P2.EQS."NODEBUG") | 885 | $ IF (P2.EQS."NODEBUG") |
| 826 | $ THEN | 886 | $ THEN |
| 827 | $! | 887 | $! |
| 828 | $! P2 Is NODEBUG, So Compile Without The Debugger Information. | 888 | $! P2 Is NODEBUG, So Compile Without The Debugger Information. |
| 829 | $! | 889 | $! |
| 830 | $ DEBUGGER = "NODEBUG" | 890 | $ DEBUGGER = "NODEBUG" |
| 831 | $ TRACEBACK = "NOTRACEBACK" | 891 | $ LINKMAP = "NOMAP" |
| 832 | $ GCC_OPTIMIZE = "OPTIMIZE" | 892 | $ TRACEBACK = "NOTRACEBACK" |
| 833 | $ CC_OPTIMIZE = "OPTIMIZE" | 893 | $ GCC_OPTIMIZE = "OPTIMIZE" |
| 834 | $ MACRO_OPTIMIZE = "OPTIMIZE" | 894 | $ CC_OPTIMIZE = "OPTIMIZE" |
| 835 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | 895 | $ MACRO_OPTIMIZE = "OPTIMIZE" |
| 836 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | 896 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
| 897 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
| 837 | $ ELSE | 898 | $ ELSE |
| 838 | $! | 899 | $! |
| 839 | $! Check To See If We Are To Compile With Debugger Information. | 900 | $! Check To See If We Are To Compile With Debugger Information. |
| @@ -844,6 +905,7 @@ $! | |||
| 844 | $! Compile With Debugger Information. | 905 | $! Compile With Debugger Information. |
| 845 | $! | 906 | $! |
| 846 | $ DEBUGGER = "DEBUG" | 907 | $ DEBUGGER = "DEBUG" |
| 908 | $ LINKMAP = "MAP" | ||
| 847 | $ TRACEBACK = "TRACEBACK" | 909 | $ TRACEBACK = "TRACEBACK" |
| 848 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | 910 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
| 849 | $ CC_OPTIMIZE = "NOOPTIMIZE" | 911 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
| @@ -852,7 +914,7 @@ $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." | |||
| 852 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." | 914 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." |
| 853 | $ ELSE | 915 | $ ELSE |
| 854 | $! | 916 | $! |
| 855 | $! They Entered An Invalid Option.. | 917 | $! They Entered An Invalid Option. |
| 856 | $! | 918 | $! |
| 857 | $ WRITE SYS$OUTPUT "" | 919 | $ WRITE SYS$OUTPUT "" |
| 858 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" | 920 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" |
| @@ -907,6 +969,60 @@ $! End The P5 Check. | |||
| 907 | $! | 969 | $! |
| 908 | $ ENDIF | 970 | $ ENDIF |
| 909 | $! | 971 | $! |
| 972 | $! Check P7 (POINTER_SIZE). | ||
| 973 | $! | ||
| 974 | $ IF (P7 .NES. "") .AND. (ARCH .NES. "VAX") | ||
| 975 | $ THEN | ||
| 976 | $! | ||
| 977 | $ IF (P7 .EQS. "32") | ||
| 978 | $ THEN | ||
| 979 | $ POINTER_SIZE = " /POINTER_SIZE=32" | ||
| 980 | $ ELSE | ||
| 981 | $ POINTER_SIZE = F$EDIT( P7, "COLLAPSE, UPCASE") | ||
| 982 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
| 983 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
| 984 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
| 985 | $ THEN | ||
| 986 | $ ARCHD = ARCH+ "_64" | ||
| 987 | $ LIB32 = "" | ||
| 988 | $ POINTER_SIZE = " /POINTER_SIZE=64" | ||
| 989 | $ ELSE | ||
| 990 | $! | ||
| 991 | $! Tell The User Entered An Invalid Option. | ||
| 992 | $! | ||
| 993 | $ WRITE SYS$OUTPUT "" | ||
| 994 | $ WRITE SYS$OUTPUT "The Option ", P7, - | ||
| 995 | " Is Invalid. The Valid Options Are:" | ||
| 996 | $ WRITE SYS$OUTPUT "" | ||
| 997 | $ WRITE SYS$OUTPUT - | ||
| 998 | " """" : Compile with default (short) pointers." | ||
| 999 | $ WRITE SYS$OUTPUT - | ||
| 1000 | " 32 : Compile with 32-bit (short) pointers." | ||
| 1001 | $ WRITE SYS$OUTPUT - | ||
| 1002 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
| 1003 | $ WRITE SYS$OUTPUT - | ||
| 1004 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
| 1005 | $ WRITE SYS$OUTPUT - | ||
| 1006 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
| 1007 | $ WRITE SYS$OUTPUT "" | ||
| 1008 | $! | ||
| 1009 | $! Time To EXIT. | ||
| 1010 | $! | ||
| 1011 | $ EXIT | ||
| 1012 | $! | ||
| 1013 | $ ENDIF | ||
| 1014 | $! | ||
| 1015 | $ ENDIF | ||
| 1016 | $! | ||
| 1017 | $! End The P7 (POINTER_SIZE) Check. | ||
| 1018 | $! | ||
| 1019 | $ ENDIF | ||
| 1020 | $! | ||
| 1021 | $! Set basic C compiler /INCLUDE directories. | ||
| 1022 | $! | ||
| 1023 | $ CC_INCLUDES = "SYS$DISK:[.''ARCHD'],SYS$DISK:[],SYS$DISK:[-],"+ - | ||
| 1024 | "SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1]" | ||
| 1025 | $! | ||
| 910 | $! Check To See If P3 Is Blank. | 1026 | $! Check To See If P3 Is Blank. |
| 911 | $! | 1027 | $! |
| 912 | $ IF (P3.EQS."") | 1028 | $ IF (P3.EQS."") |
| @@ -1007,11 +1123,64 @@ $ CCDEFS = "TCPIP_TYPE_''P4',DSO_VMS" | |||
| 1007 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 1123 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
| 1008 | $ CCEXTRAFLAGS = "" | 1124 | $ CCEXTRAFLAGS = "" |
| 1009 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 1125 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
| 1010 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" | 1126 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" |
| 1011 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 1127 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
| 1012 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | 1128 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
| 1013 | $! | 1129 | $! |
| 1014 | $! Check To See If The User Entered A Valid Paramter. | 1130 | $! Check To See If We Have A ZLIB Option. |
| 1131 | $! | ||
| 1132 | $ ZLIB = P8 | ||
| 1133 | $ IF (ZLIB .NES. "") | ||
| 1134 | $ THEN | ||
| 1135 | $! | ||
| 1136 | $! Check for expected ZLIB files. | ||
| 1137 | $! | ||
| 1138 | $ err = 0 | ||
| 1139 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
| 1140 | $ if (f$search( file1) .eqs. "") | ||
| 1141 | $ then | ||
| 1142 | $ WRITE SYS$OUTPUT "" | ||
| 1143 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 1144 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
| 1145 | $ err = 1 | ||
| 1146 | $ endif | ||
| 1147 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" | ||
| 1148 | $! | ||
| 1149 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
| 1150 | $ if (f$search( file2) .eqs. "") | ||
| 1151 | $ then | ||
| 1152 | $ if (err .eq. 0) | ||
| 1153 | $ then | ||
| 1154 | $ WRITE SYS$OUTPUT "" | ||
| 1155 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 1156 | $ endif | ||
| 1157 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
| 1158 | $ WRITE SYS$OUTPUT "" | ||
| 1159 | $ err = err+ 2 | ||
| 1160 | $ endif | ||
| 1161 | $ if (err .eq. 1) | ||
| 1162 | $ then | ||
| 1163 | $ WRITE SYS$OUTPUT "" | ||
| 1164 | $ endif | ||
| 1165 | $! | ||
| 1166 | $ if (err .ne. 0) | ||
| 1167 | $ then | ||
| 1168 | $ EXIT | ||
| 1169 | $ endif | ||
| 1170 | $! | ||
| 1171 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS | ||
| 1172 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 | ||
| 1173 | $ ZLIB_LIB = ", ''file2' /library" | ||
| 1174 | $! | ||
| 1175 | $! Print info | ||
| 1176 | $! | ||
| 1177 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
| 1178 | $! | ||
| 1179 | $! End The ZLIB Check. | ||
| 1180 | $! | ||
| 1181 | $ ENDIF | ||
| 1182 | $! | ||
| 1183 | $! Check To See If The User Entered A Valid Parameter. | ||
| 1015 | $! | 1184 | $! |
| 1016 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") | 1185 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") |
| 1017 | $ THEN | 1186 | $ THEN |
| @@ -1034,14 +1203,14 @@ $! | |||
| 1034 | $ CC = "CC" | 1203 | $ CC = "CC" |
| 1035 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 1204 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 1036 | THEN CC = "CC/DECC" | 1205 | THEN CC = "CC/DECC" |
| 1037 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | 1206 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
| 1038 | "/NOLIST/PREFIX=ALL" + - | 1207 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
| 1039 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[._''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + - | 1208 | " /INCLUDE=(''CC_INCLUDES')"+ - |
| 1040 | CCEXTRAFLAGS | 1209 | CCEXTRAFLAGS |
| 1041 | $! | 1210 | $! |
| 1042 | $! Define The Linker Options File Name. | 1211 | $! Define The Linker Options File Name. |
| 1043 | $! | 1212 | $! |
| 1044 | $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" | 1213 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
| 1045 | $! | 1214 | $! |
| 1046 | $! End DECC Check. | 1215 | $! End DECC Check. |
| 1047 | $! | 1216 | $! |
| @@ -1070,7 +1239,7 @@ $ EXIT | |||
| 1070 | $ ENDIF | 1239 | $ ENDIF |
| 1071 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | 1240 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" |
| 1072 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 1241 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 1073 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[._''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + - | 1242 | "/INCLUDE=(''CC_INCLUDES')"+ - |
| 1074 | CCEXTRAFLAGS | 1243 | CCEXTRAFLAGS |
| 1075 | $ CCDEFS = """VAXC""," + CCDEFS | 1244 | $ CCDEFS = """VAXC""," + CCDEFS |
| 1076 | $! | 1245 | $! |
| @@ -1080,7 +1249,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] | |||
| 1080 | $! | 1249 | $! |
| 1081 | $! Define The Linker Options File Name. | 1250 | $! Define The Linker Options File Name. |
| 1082 | $! | 1251 | $! |
| 1083 | $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" | 1252 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
| 1084 | $! | 1253 | $! |
| 1085 | $! End VAXC Check | 1254 | $! End VAXC Check |
| 1086 | $! | 1255 | $! |
| @@ -1102,12 +1271,12 @@ $! | |||
| 1102 | $! Use GNU C... | 1271 | $! Use GNU C... |
| 1103 | $! | 1272 | $! |
| 1104 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 1273 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 1105 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[._''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + - | 1274 | "/INCLUDE=(''CC_INCLUDES')"+ - |
| 1106 | CCEXTRAFLAGS | 1275 | CCEXTRAFLAGS |
| 1107 | $! | 1276 | $! |
| 1108 | $! Define The Linker Options File Name. | 1277 | $! Define The Linker Options File Name. |
| 1109 | $! | 1278 | $! |
| 1110 | $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" | 1279 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
| 1111 | $! | 1280 | $! |
| 1112 | $! End The GNU C Check. | 1281 | $! End The GNU C Check. |
| 1113 | $! | 1282 | $! |
| @@ -1128,22 +1297,24 @@ $ CC6DISABLEWARNINGS = "MIXLINKAGE" | |||
| 1128 | $ ELSE | 1297 | $ ELSE |
| 1129 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" | 1298 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" |
| 1130 | $ CC6DISABLEWARNINGS = CCDISABLEWARNINGS + ",MIXLINKAGE" | 1299 | $ CC6DISABLEWARNINGS = CCDISABLEWARNINGS + ",MIXLINKAGE" |
| 1131 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | 1300 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
| 1132 | $ ENDIF | 1301 | $ ENDIF |
| 1133 | $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" | 1302 | $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" |
| 1134 | $ CC6DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC6DISABLEWARNINGS + "))" | 1303 | $ CC6DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC6DISABLEWARNINGS + "))" |
| 1135 | $ ELSE | 1304 | $ ELSE |
| 1136 | $ CCDISABLEWARNINGS = "" | 1305 | $ CCDISABLEWARNINGS = "" |
| 1137 | $ CC4DISABLEWARNINGS = "" | 1306 | $ CC4DISABLEWARNINGS = "" |
| 1138 | $ CC6DISABLEWARNINGS = "" | 1307 | $ CC6DISABLEWARNINGS = "" |
| 1139 | $ ENDIF | 1308 | $ ENDIF |
| 1140 | $ CC3 = CC + "/DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS | 1309 | $ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS |
| 1141 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 1310 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
| 1142 | $ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG" | 1311 | $ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG" |
| 1143 | $ THEN | 1312 | $ THEN |
| 1144 | $ CC5 = CC + "/OPTIMIZE=NODISJOINT" | 1313 | $ CC5 = CC + " /OPTIMIZE=NODISJOINT" |
| 1314 | $ CC5_DIFFERENT = 1 | ||
| 1145 | $ ELSE | 1315 | $ ELSE |
| 1146 | $ CC5 = CC + "/NOOPTIMIZE" | 1316 | $ CC5 = CC |
| 1317 | $ CC5_DIFFERENT = 0 | ||
| 1147 | $ ENDIF | 1318 | $ ENDIF |
| 1148 | $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS | 1319 | $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS |
| 1149 | $ CC6 = CC - CCDISABLEWARNINGS + CC6DISABLEWARNINGS | 1320 | $ CC6 = CC - CCDISABLEWARNINGS + CC6DISABLEWARNINGS |
| @@ -1196,7 +1367,7 @@ $ THEN | |||
| 1196 | $! | 1367 | $! |
| 1197 | $! Set the library to use SOCKETSHR | 1368 | $! Set the library to use SOCKETSHR |
| 1198 | $! | 1369 | $! |
| 1199 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" | 1370 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
| 1200 | $! | 1371 | $! |
| 1201 | $! Done with SOCKETSHR | 1372 | $! Done with SOCKETSHR |
| 1202 | $! | 1373 | $! |
| @@ -1222,13 +1393,13 @@ $ THEN | |||
| 1222 | $! | 1393 | $! |
| 1223 | $! Set the library to use UCX. | 1394 | $! Set the library to use UCX. |
| 1224 | $! | 1395 | $! |
| 1225 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" | 1396 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
| 1226 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 1397 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
| 1227 | $ THEN | 1398 | $ THEN |
| 1228 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" | 1399 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
| 1229 | $ ELSE | 1400 | $ ELSE |
| 1230 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 1401 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
| 1231 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT" | 1402 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
| 1232 | $ ENDIF | 1403 | $ ENDIF |
| 1233 | $! | 1404 | $! |
| 1234 | $! Done with UCX | 1405 | $! Done with UCX |
| @@ -1242,7 +1413,7 @@ $ THEN | |||
| 1242 | $! | 1413 | $! |
| 1243 | $! Set the library to use TCPIP (post UCX). | 1414 | $! Set the library to use TCPIP (post UCX). |
| 1244 | $! | 1415 | $! |
| 1245 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" | 1416 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
| 1246 | $! | 1417 | $! |
| 1247 | $! Done with TCPIP | 1418 | $! Done with TCPIP |
| 1248 | $! | 1419 | $! |
| @@ -1263,7 +1434,7 @@ $ ENDIF | |||
| 1263 | $! | 1434 | $! |
| 1264 | $! Print info | 1435 | $! Print info |
| 1265 | $! | 1436 | $! |
| 1266 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 1437 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
| 1267 | $! | 1438 | $! |
| 1268 | $! Else The User Entered An Invalid Argument. | 1439 | $! Else The User Entered An Invalid Argument. |
| 1269 | $! | 1440 | $! |
diff --git a/src/lib/libcrypto/dso/dso_vms.c b/src/lib/libcrypto/dso/dso_vms.c index 321512772a..eee20d14f1 100644 --- a/src/lib/libcrypto/dso/dso_vms.c +++ b/src/lib/libcrypto/dso/dso_vms.c | |||
| @@ -68,8 +68,20 @@ | |||
| 68 | #include <stsdef.h> | 68 | #include <stsdef.h> |
| 69 | #include <descrip.h> | 69 | #include <descrip.h> |
| 70 | #include <starlet.h> | 70 | #include <starlet.h> |
| 71 | #include "vms_rms.h" | ||
| 71 | #endif | 72 | #endif |
| 72 | 73 | ||
| 74 | /* Some compiler options may mask the declaration of "_malloc32". */ | ||
| 75 | #if __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE | ||
| 76 | # if __INITIAL_POINTER_SIZE == 64 | ||
| 77 | # pragma pointer_size save | ||
| 78 | # pragma pointer_size 32 | ||
| 79 | void * _malloc32 (__size_t); | ||
| 80 | # pragma pointer_size restore | ||
| 81 | # endif /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 82 | #endif /* __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE */ | ||
| 83 | |||
| 84 | |||
| 73 | #ifndef OPENSSL_SYS_VMS | 85 | #ifndef OPENSSL_SYS_VMS |
| 74 | DSO_METHOD *DSO_METHOD_vms(void) | 86 | DSO_METHOD *DSO_METHOD_vms(void) |
| 75 | { | 87 | { |
| @@ -121,14 +133,13 @@ typedef struct dso_internal_st | |||
| 121 | /* This should contain the name only, no directory, | 133 | /* This should contain the name only, no directory, |
| 122 | * no extension, nothing but a name. */ | 134 | * no extension, nothing but a name. */ |
| 123 | struct dsc$descriptor_s filename_dsc; | 135 | struct dsc$descriptor_s filename_dsc; |
| 124 | char filename[FILENAME_MAX+1]; | 136 | char filename[ NAMX_MAXRSS+ 1]; |
| 125 | /* This contains whatever is not in filename, if needed. | 137 | /* This contains whatever is not in filename, if needed. |
| 126 | * Normally not defined. */ | 138 | * Normally not defined. */ |
| 127 | struct dsc$descriptor_s imagename_dsc; | 139 | struct dsc$descriptor_s imagename_dsc; |
| 128 | char imagename[FILENAME_MAX+1]; | 140 | char imagename[ NAMX_MAXRSS+ 1]; |
| 129 | } DSO_VMS_INTERNAL; | 141 | } DSO_VMS_INTERNAL; |
| 130 | 142 | ||
| 131 | |||
| 132 | DSO_METHOD *DSO_METHOD_vms(void) | 143 | DSO_METHOD *DSO_METHOD_vms(void) |
| 133 | { | 144 | { |
| 134 | return(&dso_meth_vms); | 145 | return(&dso_meth_vms); |
| @@ -139,7 +150,22 @@ static int vms_load(DSO *dso) | |||
| 139 | void *ptr = NULL; | 150 | void *ptr = NULL; |
| 140 | /* See applicable comments in dso_dl.c */ | 151 | /* See applicable comments in dso_dl.c */ |
| 141 | char *filename = DSO_convert_filename(dso, NULL); | 152 | char *filename = DSO_convert_filename(dso, NULL); |
| 142 | DSO_VMS_INTERNAL *p; | 153 | |
| 154 | /* Ensure 32-bit pointer for "p", and appropriate malloc() function. */ | ||
| 155 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 156 | # define DSO_MALLOC _malloc32 | ||
| 157 | # pragma pointer_size save | ||
| 158 | # pragma pointer_size 32 | ||
| 159 | #else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 160 | # define DSO_MALLOC OPENSSL_malloc | ||
| 161 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 162 | |||
| 163 | DSO_VMS_INTERNAL *p = NULL; | ||
| 164 | |||
| 165 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 166 | # pragma pointer_size restore | ||
| 167 | #endif /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 168 | |||
| 143 | const char *sp1, *sp2; /* Search result */ | 169 | const char *sp1, *sp2; /* Search result */ |
| 144 | 170 | ||
| 145 | if(filename == NULL) | 171 | if(filename == NULL) |
| @@ -192,7 +218,7 @@ static int vms_load(DSO *dso) | |||
| 192 | goto err; | 218 | goto err; |
| 193 | } | 219 | } |
| 194 | 220 | ||
| 195 | p = (DSO_VMS_INTERNAL *)OPENSSL_malloc(sizeof(DSO_VMS_INTERNAL)); | 221 | p = DSO_MALLOC(sizeof(DSO_VMS_INTERNAL)); |
| 196 | if(p == NULL) | 222 | if(p == NULL) |
| 197 | { | 223 | { |
| 198 | DSOerr(DSO_F_VMS_LOAD,ERR_R_MALLOC_FAILURE); | 224 | DSOerr(DSO_F_VMS_LOAD,ERR_R_MALLOC_FAILURE); |
| @@ -290,18 +316,38 @@ void vms_bind_sym(DSO *dso, const char *symname, void **sym) | |||
| 290 | int flags = 0; | 316 | int flags = 0; |
| 291 | #endif | 317 | #endif |
| 292 | struct dsc$descriptor_s symname_dsc; | 318 | struct dsc$descriptor_s symname_dsc; |
| 293 | *sym = NULL; | ||
| 294 | 319 | ||
| 295 | symname_dsc.dsc$w_length = strlen(symname); | 320 | /* Arrange 32-bit pointer to (copied) string storage, if needed. */ |
| 296 | symname_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | 321 | #if __INITIAL_POINTER_SIZE == 64 |
| 297 | symname_dsc.dsc$b_class = DSC$K_CLASS_S; | 322 | # define SYMNAME symname_32p |
| 298 | symname_dsc.dsc$a_pointer = (char *)symname; /* The cast is needed */ | 323 | # pragma pointer_size save |
| 324 | # pragma pointer_size 32 | ||
| 325 | char *symname_32p; | ||
| 326 | # pragma pointer_size restore | ||
| 327 | char symname_32[ NAMX_MAXRSS+ 1]; | ||
| 328 | #else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 329 | # define SYMNAME ((char *) symname) | ||
| 330 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 331 | |||
| 332 | *sym = NULL; | ||
| 299 | 333 | ||
| 300 | if((dso == NULL) || (symname == NULL)) | 334 | if((dso == NULL) || (symname == NULL)) |
| 301 | { | 335 | { |
| 302 | DSOerr(DSO_F_VMS_BIND_SYM,ERR_R_PASSED_NULL_PARAMETER); | 336 | DSOerr(DSO_F_VMS_BIND_SYM,ERR_R_PASSED_NULL_PARAMETER); |
| 303 | return; | 337 | return; |
| 304 | } | 338 | } |
| 339 | |||
| 340 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 341 | /* Copy the symbol name to storage with a 32-bit pointer. */ | ||
| 342 | symname_32p = symname_32; | ||
| 343 | strcpy( symname_32p, symname); | ||
| 344 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 345 | |||
| 346 | symname_dsc.dsc$w_length = strlen(SYMNAME); | ||
| 347 | symname_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | ||
| 348 | symname_dsc.dsc$b_class = DSC$K_CLASS_S; | ||
| 349 | symname_dsc.dsc$a_pointer = SYMNAME; | ||
| 350 | |||
| 305 | if(sk_void_num(dso->meth_data) < 1) | 351 | if(sk_void_num(dso->meth_data) < 1) |
| 306 | { | 352 | { |
| 307 | DSOerr(DSO_F_VMS_BIND_SYM,DSO_R_STACK_ERROR); | 353 | DSOerr(DSO_F_VMS_BIND_SYM,DSO_R_STACK_ERROR); |
| @@ -372,64 +418,60 @@ static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname) | |||
| 372 | return sym; | 418 | return sym; |
| 373 | } | 419 | } |
| 374 | 420 | ||
| 421 | |||
| 375 | static char *vms_merger(DSO *dso, const char *filespec1, const char *filespec2) | 422 | static char *vms_merger(DSO *dso, const char *filespec1, const char *filespec2) |
| 376 | { | 423 | { |
| 377 | int status; | 424 | int status; |
| 378 | int filespec1len, filespec2len; | 425 | int filespec1len, filespec2len; |
| 379 | struct FAB fab; | 426 | struct FAB fab; |
| 380 | #ifdef NAML$C_MAXRSS | 427 | struct NAMX_STRUCT nam; |
| 381 | struct NAML nam; | 428 | char esa[ NAMX_MAXRSS+ 1]; |
| 382 | char esa[NAML$C_MAXRSS]; | ||
| 383 | #else | ||
| 384 | struct NAM nam; | ||
| 385 | char esa[NAM$C_MAXRSS]; | ||
| 386 | #endif | ||
| 387 | char *merged; | 429 | char *merged; |
| 388 | 430 | ||
| 431 | /* Arrange 32-bit pointer to (copied) string storage, if needed. */ | ||
| 432 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 433 | # define FILESPEC1 filespec1_32p; | ||
| 434 | # define FILESPEC2 filespec2_32p; | ||
| 435 | # pragma pointer_size save | ||
| 436 | # pragma pointer_size 32 | ||
| 437 | char *filespec1_32p; | ||
| 438 | char *filespec2_32p; | ||
| 439 | # pragma pointer_size restore | ||
| 440 | char filespec1_32[ NAMX_MAXRSS+ 1]; | ||
| 441 | char filespec2_32[ NAMX_MAXRSS+ 1]; | ||
| 442 | #else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 443 | # define FILESPEC1 ((char *) filespec1) | ||
| 444 | # define FILESPEC2 ((char *) filespec2) | ||
| 445 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 446 | |||
| 389 | if (!filespec1) filespec1 = ""; | 447 | if (!filespec1) filespec1 = ""; |
| 390 | if (!filespec2) filespec2 = ""; | 448 | if (!filespec2) filespec2 = ""; |
| 391 | filespec1len = strlen(filespec1); | 449 | filespec1len = strlen(filespec1); |
| 392 | filespec2len = strlen(filespec2); | 450 | filespec2len = strlen(filespec2); |
| 393 | 451 | ||
| 452 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 453 | /* Copy the file names to storage with a 32-bit pointer. */ | ||
| 454 | filespec1_32p = filespec1_32; | ||
| 455 | filespec2_32p = filespec2_32; | ||
| 456 | strcpy( filespec1_32p, filespec1); | ||
| 457 | strcpy( filespec2_32p, filespec2); | ||
| 458 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 459 | |||
| 394 | fab = cc$rms_fab; | 460 | fab = cc$rms_fab; |
| 395 | #ifdef NAML$C_MAXRSS | 461 | nam = CC_RMS_NAMX; |
| 396 | nam = cc$rms_naml; | ||
| 397 | #else | ||
| 398 | nam = cc$rms_nam; | ||
| 399 | #endif | ||
| 400 | 462 | ||
| 401 | fab.fab$l_fna = (char *)filespec1; | 463 | FAB_OR_NAML( fab, nam).FAB_OR_NAML_FNA = FILESPEC1; |
| 402 | fab.fab$b_fns = filespec1len; | 464 | FAB_OR_NAML( fab, nam).FAB_OR_NAML_FNS = filespec1len; |
| 403 | fab.fab$l_dna = (char *)filespec2; | 465 | FAB_OR_NAML( fab, nam).FAB_OR_NAML_DNA = FILESPEC2; |
| 404 | fab.fab$b_dns = filespec2len; | 466 | FAB_OR_NAML( fab, nam).FAB_OR_NAML_DNS = filespec2len; |
| 405 | #ifdef NAML$C_MAXRSS | 467 | NAMX_DNA_FNA_SET( fab) |
| 406 | if (filespec1len > NAM$C_MAXRSS) | 468 | |
| 407 | { | 469 | nam.NAMX_ESA = esa; |
| 408 | fab.fab$l_fna = 0; | 470 | nam.NAMX_ESS = NAMX_MAXRSS; |
| 409 | fab.fab$b_fns = 0; | 471 | nam.NAMX_NOP = NAM$M_SYNCHK | NAM$M_PWD; |
| 410 | nam.naml$l_long_filename = (char *)filespec1; | 472 | SET_NAMX_NO_SHORT_UPCASE( nam); |
| 411 | nam.naml$l_long_filename_size = filespec1len; | 473 | |
| 412 | } | 474 | fab.FAB_NAMX = &nam; |
| 413 | if (filespec2len > NAM$C_MAXRSS) | ||
| 414 | { | ||
| 415 | fab.fab$l_dna = 0; | ||
| 416 | fab.fab$b_dns = 0; | ||
| 417 | nam.naml$l_long_defname = (char *)filespec2; | ||
| 418 | nam.naml$l_long_defname_size = filespec2len; | ||
| 419 | } | ||
| 420 | nam.naml$l_esa = esa; | ||
| 421 | nam.naml$b_ess = NAM$C_MAXRSS; | ||
| 422 | nam.naml$l_long_expand = esa; | ||
| 423 | nam.naml$l_long_expand_alloc = sizeof(esa); | ||
| 424 | nam.naml$b_nop = NAM$M_SYNCHK | NAM$M_PWD; | ||
| 425 | nam.naml$v_no_short_upcase = 1; | ||
| 426 | fab.fab$l_naml = &nam; | ||
| 427 | #else | ||
| 428 | nam.nam$l_esa = esa; | ||
| 429 | nam.nam$b_ess = NAM$C_MAXRSS; | ||
| 430 | nam.nam$b_nop = NAM$M_SYNCHK | NAM$M_PWD; | ||
| 431 | fab.fab$l_nam = &nam; | ||
| 432 | #endif | ||
| 433 | 475 | ||
| 434 | status = sys$parse(&fab, 0, 0); | 476 | status = sys$parse(&fab, 0, 0); |
| 435 | 477 | ||
| @@ -460,33 +502,12 @@ static char *vms_merger(DSO *dso, const char *filespec1, const char *filespec2) | |||
| 460 | } | 502 | } |
| 461 | return(NULL); | 503 | return(NULL); |
| 462 | } | 504 | } |
| 463 | #ifdef NAML$C_MAXRSS | 505 | |
| 464 | if (nam.naml$l_long_expand_size) | 506 | merged = OPENSSL_malloc( nam.NAMX_ESL+ 1); |
| 465 | { | ||
| 466 | merged = OPENSSL_malloc(nam.naml$l_long_expand_size + 1); | ||
| 467 | if(!merged) | ||
| 468 | goto malloc_err; | ||
| 469 | strncpy(merged, nam.naml$l_long_expand, | ||
| 470 | nam.naml$l_long_expand_size); | ||
| 471 | merged[nam.naml$l_long_expand_size] = '\0'; | ||
| 472 | } | ||
| 473 | else | ||
| 474 | { | ||
| 475 | merged = OPENSSL_malloc(nam.naml$b_esl + 1); | ||
| 476 | if(!merged) | ||
| 477 | goto malloc_err; | ||
| 478 | strncpy(merged, nam.naml$l_esa, | ||
| 479 | nam.naml$b_esl); | ||
| 480 | merged[nam.naml$b_esl] = '\0'; | ||
| 481 | } | ||
| 482 | #else | ||
| 483 | merged = OPENSSL_malloc(nam.nam$b_esl + 1); | ||
| 484 | if(!merged) | 507 | if(!merged) |
| 485 | goto malloc_err; | 508 | goto malloc_err; |
| 486 | strncpy(merged, nam.nam$l_esa, | 509 | strncpy( merged, nam.NAMX_ESA, nam.NAMX_ESL); |
| 487 | nam.nam$b_esl); | 510 | merged[ nam.NAMX_ESL] = '\0'; |
| 488 | merged[nam.nam$b_esl] = '\0'; | ||
| 489 | #endif | ||
| 490 | return(merged); | 511 | return(merged); |
| 491 | malloc_err: | 512 | malloc_err: |
| 492 | DSOerr(DSO_F_VMS_MERGER, | 513 | DSOerr(DSO_F_VMS_MERGER, |
diff --git a/src/lib/libcrypto/evp/evp_test.c b/src/lib/libcrypto/evp/evp_test.c index 902efac975..55c7cdfdcc 100644 --- a/src/lib/libcrypto/evp/evp_test.c +++ b/src/lib/libcrypto/evp/evp_test.c | |||
| @@ -435,6 +435,7 @@ int main(int argc,char **argv) | |||
| 435 | EXIT(3); | 435 | EXIT(3); |
| 436 | } | 436 | } |
| 437 | } | 437 | } |
| 438 | fclose(f); | ||
| 438 | 439 | ||
| 439 | #ifndef OPENSSL_NO_ENGINE | 440 | #ifndef OPENSSL_NO_ENGINE |
| 440 | ENGINE_cleanup(); | 441 | ENGINE_cleanup(); |
diff --git a/src/lib/libcrypto/install-crypto.com b/src/lib/libcrypto/install-crypto.com new file mode 100755 index 0000000000..85b3d583cf --- /dev/null +++ b/src/lib/libcrypto/install-crypto.com | |||
| @@ -0,0 +1,196 @@ | |||
| 1 | $! INSTALL.COM -- Installs the files in a given directory tree | ||
| 2 | $! | ||
| 3 | $! Author: Richard Levitte <richard@levitte.org> | ||
| 4 | $! Time of creation: 22-MAY-1998 10:13 | ||
| 5 | $! | ||
| 6 | $! Changes by Zoltan Arpadffy <zoli@polarhome.com> | ||
| 7 | $! | ||
| 8 | $! P1 root of the directory tree | ||
| 9 | $! P2 "64" for 64-bit pointers. | ||
| 10 | $! | ||
| 11 | $! | ||
| 12 | $! Announce/identify. | ||
| 13 | $! | ||
| 14 | $ proc = f$environment( "procedure") | ||
| 15 | $ write sys$output "@@@ "+ - | ||
| 16 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 17 | $! | ||
| 18 | $ on error then goto tidy | ||
| 19 | $ on control_c then goto tidy | ||
| 20 | $! | ||
| 21 | $ if (p1 .eqs. "") | ||
| 22 | $ then | ||
| 23 | $ write sys$output "First argument missing." | ||
| 24 | $ write sys$output - | ||
| 25 | "It should be the directory where you want things installed." | ||
| 26 | $ exit | ||
| 27 | $ endif | ||
| 28 | $! | ||
| 29 | $ if (f$getsyi( "cpu") .lt. 128) | ||
| 30 | $ then | ||
| 31 | $ arch = "VAX" | ||
| 32 | $ else | ||
| 33 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
| 34 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 35 | $ endif | ||
| 36 | $! | ||
| 37 | $ archd = arch | ||
| 38 | $ lib32 = "32" | ||
| 39 | $ shr = "_SHR32" | ||
| 40 | $! | ||
| 41 | $ if (p2 .nes. "") | ||
| 42 | $ then | ||
| 43 | $ if (p2 .eqs. "64") | ||
| 44 | $ then | ||
| 45 | $ archd = arch+ "_64" | ||
| 46 | $ lib32 = "" | ||
| 47 | $ shr = "_SHR" | ||
| 48 | $ else | ||
| 49 | $ if (p2 .nes. "32") | ||
| 50 | $ then | ||
| 51 | $ write sys$output "Second argument invalid." | ||
| 52 | $ write sys$output "It should be "32", "64", or nothing." | ||
| 53 | $ exit | ||
| 54 | $ endif | ||
| 55 | $ endif | ||
| 56 | $ endif | ||
| 57 | $! | ||
| 58 | $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" | ||
| 59 | $ root_dev = f$parse( root, , , "device", "syntax_only") | ||
| 60 | $ root_dir = f$parse( root, , , "directory", "syntax_only") - - | ||
| 61 | "[000000." - "][" - "[" - "]" | ||
| 62 | $ root = root_dev + "[" + root_dir | ||
| 63 | $! | ||
| 64 | $ define /nolog wrk_sslroot 'root'.] /trans=conc | ||
| 65 | $ define /nolog wrk_sslinclude wrk_sslroot:[include] | ||
| 66 | $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib] | ||
| 67 | $! | ||
| 68 | $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - | ||
| 69 | create /directory /log wrk_sslroot:[000000] | ||
| 70 | $ if f$parse("wrk_sslinclude:") .eqs. "" then - | ||
| 71 | create /directory /log wrk_sslinclude: | ||
| 72 | $ if f$parse("wrk_sslxlib:") .eqs. "" then - | ||
| 73 | create /directory /log wrk_sslxlib: | ||
| 74 | $! | ||
| 75 | $ sdirs := , - | ||
| 76 | 'archd', - | ||
| 77 | objects, - | ||
| 78 | md2, md4, md5, sha, mdc2, hmac, ripemd, whrlpool, - | ||
| 79 | des, aes, rc2, rc4, rc5, idea, bf, cast, camellia, seed, - | ||
| 80 | bn, ec, rsa, dsa, ecdsa, dh, ecdh, dso, engine, - | ||
| 81 | buffer, bio, stack, lhash, rand, err, - | ||
| 82 | evp, asn1, pem, x509, x509v3, conf, txt_db, pkcs7, pkcs12, comp, ocsp, - | ||
| 83 | ui, krb5, - | ||
| 84 | store, cms, pqueue, ts, jpake | ||
| 85 | $! | ||
| 86 | $ exheader_ := crypto.h, opensslv.h, ebcdic.h, symhacks.h, ossl_typ.h | ||
| 87 | $ exheader_'archd' := opensslconf.h | ||
| 88 | $ exheader_objects := objects.h, obj_mac.h | ||
| 89 | $ exheader_md2 := md2.h | ||
| 90 | $ exheader_md4 := md4.h | ||
| 91 | $ exheader_md5 := md5.h | ||
| 92 | $ exheader_sha := sha.h | ||
| 93 | $ exheader_mdc2 := mdc2.h | ||
| 94 | $ exheader_hmac := hmac.h | ||
| 95 | $ exheader_ripemd := ripemd.h | ||
| 96 | $ exheader_whrlpool := whrlpool.h | ||
| 97 | $ exheader_des := des.h, des_old.h | ||
| 98 | $ exheader_aes := aes.h | ||
| 99 | $ exheader_rc2 := rc2.h | ||
| 100 | $ exheader_rc4 := rc4.h | ||
| 101 | $ exheader_rc5 := rc5.h | ||
| 102 | $ exheader_idea := idea.h | ||
| 103 | $ exheader_bf := blowfish.h | ||
| 104 | $ exheader_cast := cast.h | ||
| 105 | $ exheader_camellia := camellia.h | ||
| 106 | $ exheader_seed := seed.h | ||
| 107 | $ exheader_modes := modes.h | ||
| 108 | $ exheader_bn := bn.h | ||
| 109 | $ exheader_ec := ec.h | ||
| 110 | $ exheader_rsa := rsa.h | ||
| 111 | $ exheader_dsa := dsa.h | ||
| 112 | $ exheader_ecdsa := ecdsa.h | ||
| 113 | $ exheader_dh := dh.h | ||
| 114 | $ exheader_ecdh := ecdh.h | ||
| 115 | $ exheader_dso := dso.h | ||
| 116 | $ exheader_engine := engine.h | ||
| 117 | $ exheader_buffer := buffer.h | ||
| 118 | $ exheader_bio := bio.h | ||
| 119 | $ exheader_stack := stack.h, safestack.h | ||
| 120 | $ exheader_lhash := lhash.h | ||
| 121 | $ exheader_rand := rand.h | ||
| 122 | $ exheader_err := err.h | ||
| 123 | $ exheader_evp := evp.h | ||
| 124 | $ exheader_asn1 := asn1.h, asn1_mac.h, asn1t.h | ||
| 125 | $ exheader_pem := pem.h, pem2.h | ||
| 126 | $ exheader_x509 := x509.h, x509_vfy.h | ||
| 127 | $ exheader_x509v3 := x509v3.h | ||
| 128 | $ exheader_conf := conf.h, conf_api.h | ||
| 129 | $ exheader_txt_db := txt_db.h | ||
| 130 | $ exheader_pkcs7 := pkcs7.h | ||
| 131 | $ exheader_pkcs12 := pkcs12.h | ||
| 132 | $ exheader_comp := comp.h | ||
| 133 | $ exheader_ocsp := ocsp.h | ||
| 134 | $ exheader_ui := ui.h, ui_compat.h | ||
| 135 | $ exheader_krb5 := krb5_asn.h | ||
| 136 | $! exheader_store := store.h, str_compat.h | ||
| 137 | $ exheader_store := store.h | ||
| 138 | $ exheader_cms := cms.h | ||
| 139 | $ exheader_pqueue := pqueue.h | ||
| 140 | $ exheader_ts := ts.h | ||
| 141 | $ exheader_jpake := jpake.h | ||
| 142 | $ libs := ssl_libcrypto | ||
| 143 | $! | ||
| 144 | $ exe_dir := [-.'archd'.exe.crypto] | ||
| 145 | $! | ||
| 146 | $! Header files. | ||
| 147 | $! | ||
| 148 | $ i = 0 | ||
| 149 | $ loop_sdirs: | ||
| 150 | $ d = f$edit( f$element( i, ",", sdirs), "trim") | ||
| 151 | $ i = i + 1 | ||
| 152 | $ if d .eqs. "," then goto loop_sdirs_end | ||
| 153 | $ tmp = exheader_'d' | ||
| 154 | $ if (d .nes. "") then d = "."+ d | ||
| 155 | $ copy /protection = w:re ['d']'tmp' wrk_sslinclude: /log | ||
| 156 | $ goto loop_sdirs | ||
| 157 | $ loop_sdirs_end: | ||
| 158 | $! | ||
| 159 | $! Object libraries, shareable images. | ||
| 160 | $! | ||
| 161 | $ i = 0 | ||
| 162 | $ loop_lib: | ||
| 163 | $ e = f$edit( f$element( i, ",", libs), "trim") | ||
| 164 | $ i = i + 1 | ||
| 165 | $ if e .eqs. "," then goto loop_lib_end | ||
| 166 | $ set noon | ||
| 167 | $ file = exe_dir+ e+ lib32+ ".olb" | ||
| 168 | $ if f$search( file) .nes. "" | ||
| 169 | $ then | ||
| 170 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
| 171 | $ endif | ||
| 172 | $! | ||
| 173 | $ file = exe_dir+ e+ shr+ ".exe" | ||
| 174 | $ if f$search( file) .nes. "" | ||
| 175 | $ then | ||
| 176 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
| 177 | $ endif | ||
| 178 | $ set on | ||
| 179 | $ goto loop_lib | ||
| 180 | $ loop_lib_end: | ||
| 181 | $! | ||
| 182 | $ tidy: | ||
| 183 | $! | ||
| 184 | $ call deass wrk_sslroot | ||
| 185 | $ call deass wrk_sslinclude | ||
| 186 | $ call deass wrk_sslxlib | ||
| 187 | $! | ||
| 188 | $ exit | ||
| 189 | $! | ||
| 190 | $ deass: subroutine | ||
| 191 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
| 192 | $ then | ||
| 193 | $ deassign /process 'p1' | ||
| 194 | $ endif | ||
| 195 | $ endsubroutine | ||
| 196 | $! | ||
diff --git a/src/lib/libcrypto/rand/md_rand.c b/src/lib/libcrypto/rand/md_rand.c index 88088ce73c..b2f04ff13e 100644 --- a/src/lib/libcrypto/rand/md_rand.c +++ b/src/lib/libcrypto/rand/md_rand.c | |||
| @@ -476,11 +476,14 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) | |||
| 476 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); | 476 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); |
| 477 | 477 | ||
| 478 | #ifndef PURIFY /* purify complains */ | 478 | #ifndef PURIFY /* purify complains */ |
| 479 | /* DO NOT REMOVE THE FOLLOWING CALL TO MD_Update()! */ | 479 | /* The following line uses the supplied buffer as a small |
| 480 | * source of entropy: since this buffer is often uninitialised | ||
| 481 | * it may cause programs such as purify or valgrind to | ||
| 482 | * complain. So for those builds it is not used: the removal | ||
| 483 | * of such a small source of entropy has negligible impact on | ||
| 484 | * security. | ||
| 485 | */ | ||
| 480 | MD_Update(&m,buf,j); | 486 | MD_Update(&m,buf,j); |
| 481 | /* We know that line may cause programs such as | ||
| 482 | purify and valgrind to complain about use of | ||
| 483 | uninitialized data. */ | ||
| 484 | #endif | 487 | #endif |
| 485 | 488 | ||
| 486 | k=(st_idx+MD_DIGEST_LENGTH/2)-st_num; | 489 | k=(st_idx+MD_DIGEST_LENGTH/2)-st_num; |
diff --git a/src/lib/libcrypto/rand/rand_vms.c b/src/lib/libcrypto/rand/rand_vms.c index 1267a3acae..0bfd8ff7e4 100644 --- a/src/lib/libcrypto/rand/rand_vms.c +++ b/src/lib/libcrypto/rand/rand_vms.c | |||
| @@ -69,6 +69,17 @@ | |||
| 69 | # pragma message disable DOLLARID | 69 | # pragma message disable DOLLARID |
| 70 | #endif | 70 | #endif |
| 71 | 71 | ||
| 72 | /* Use 32-bit pointers almost everywhere. Define the type to which to | ||
| 73 | * cast a pointer passed to an external function. | ||
| 74 | */ | ||
| 75 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 76 | # define PTR_T __void_ptr64 | ||
| 77 | # pragma pointer_size save | ||
| 78 | # pragma pointer_size 32 | ||
| 79 | #else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 80 | # define PTR_T void * | ||
| 81 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 82 | |||
| 72 | static struct items_data_st | 83 | static struct items_data_st |
| 73 | { | 84 | { |
| 74 | short length, code; /* length is amount of bytes */ | 85 | short length, code; /* length is amount of bytes */ |
| @@ -125,11 +136,12 @@ int RAND_poll(void) | |||
| 125 | { | 136 | { |
| 126 | if (status == SS$_NORMAL) | 137 | if (status == SS$_NORMAL) |
| 127 | { | 138 | { |
| 128 | RAND_add(data_buffer, total_length, total_length/2); | 139 | RAND_add( (PTR_T)data_buffer, total_length, |
| 140 | total_length/2); | ||
| 129 | } | 141 | } |
| 130 | } | 142 | } |
| 131 | sys$gettim(iosb); | 143 | sys$gettim(iosb); |
| 132 | RAND_add((unsigned char *)iosb, sizeof(iosb), sizeof(iosb)/2); | 144 | RAND_add( (PTR_T)iosb, sizeof(iosb), sizeof(iosb)/2); |
| 133 | return 1; | 145 | return 1; |
| 134 | } | 146 | } |
| 135 | 147 | ||
diff --git a/src/lib/libcrypto/rc5/rc5_locl.h b/src/lib/libcrypto/rc5/rc5_locl.h index 282dd38822..d337f73fad 100644 --- a/src/lib/libcrypto/rc5/rc5_locl.h +++ b/src/lib/libcrypto/rc5/rc5_locl.h | |||
| @@ -154,14 +154,14 @@ | |||
| 154 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ | 154 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ |
| 155 | asm ("roll %%cl,%0" \ | 155 | asm ("roll %%cl,%0" \ |
| 156 | : "=r"(ret) \ | 156 | : "=r"(ret) \ |
| 157 | : "c"(n),"0"(a) \ | 157 | : "c"(n),"0"((unsigned int)(a)) \ |
| 158 | : "cc"); \ | 158 | : "cc"); \ |
| 159 | ret; \ | 159 | ret; \ |
| 160 | }) | 160 | }) |
| 161 | # define ROTATE_r32(a,n) ({ register unsigned int ret; \ | 161 | # define ROTATE_r32(a,n) ({ register unsigned int ret; \ |
| 162 | asm ("rorl %%cl,%0" \ | 162 | asm ("rorl %%cl,%0" \ |
| 163 | : "=r"(ret) \ | 163 | : "=r"(ret) \ |
| 164 | : "c"(n),"0"(a) \ | 164 | : "c"(n),"0"((unsigned int)(a)) \ |
| 165 | : "cc"); \ | 165 | : "cc"); \ |
| 166 | ret; \ | 166 | ret; \ |
| 167 | }) | 167 | }) |
diff --git a/src/lib/libcrypto/util/cygwin.sh b/src/lib/libcrypto/util/cygwin.sh index a4f2e740b4..d6228521e6 100644 --- a/src/lib/libcrypto/util/cygwin.sh +++ b/src/lib/libcrypto/util/cygwin.sh | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #set -x | 8 | #set -x |
| 9 | 9 | ||
| 10 | CONFIG_OPTIONS="--prefix=/usr shared zlib no-idea no-rc5" | 10 | CONFIG_OPTIONS="--prefix=/usr shared zlib no-idea no-rc5" |
| 11 | INSTALL_PREFIX=/tmp/install | 11 | INSTALL_PREFIX=/tmp/install/INSTALL |
| 12 | 12 | ||
| 13 | VERSION= | 13 | VERSION= |
| 14 | SUBVERSION=$1 | 14 | SUBVERSION=$1 |
| @@ -124,8 +124,12 @@ strip usr/bin/*.exe usr/bin/*.dll usr/lib/engines/*.so | |||
| 124 | chmod u-w usr/lib/engines/*.so | 124 | chmod u-w usr/lib/engines/*.so |
| 125 | 125 | ||
| 126 | # Runtime package | 126 | # Runtime package |
| 127 | find etc usr/bin usr/lib/engines usr/share/doc usr/ssl/certs \ | 127 | tar cjf libopenssl${VERSION//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 \ |
| 128 | usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private \ | 128 | usr/bin/cyg*dll |
| 129 | # Base package | ||
| 130 | find etc usr/bin/openssl.exe usr/bin/c_rehash usr/lib/engines usr/share/doc \ | ||
| 131 | usr/ssl/certs usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf \ | ||
| 132 | usr/ssl/private \ | ||
| 129 | -empty -o \! -type d | | 133 | -empty -o \! -type d | |
| 130 | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - | 134 | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - |
| 131 | # Development package | 135 | # Development package |
| @@ -135,6 +139,7 @@ tar cjfT openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 - | |||
| 135 | 139 | ||
| 136 | ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2 | 140 | ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2 |
| 137 | ls -l openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 | 141 | ls -l openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 |
| 142 | ls -l libopenssl${VERSION//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 | ||
| 138 | 143 | ||
| 139 | cleanup | 144 | cleanup |
| 140 | 145 | ||
diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num index 6f3067ae2b..b23619f20a 100644 --- a/src/lib/libcrypto/util/libeay.num +++ b/src/lib/libcrypto/util/libeay.num | |||
| @@ -4178,3 +4178,19 @@ UI_method_get_prompt_constructr 4550 EXIST:VMS:FUNCTION: | |||
| 4178 | UI_method_set_prompt_constructor 4551 EXIST:!VMS:FUNCTION: | 4178 | UI_method_set_prompt_constructor 4551 EXIST:!VMS:FUNCTION: |
| 4179 | UI_method_set_prompt_constructr 4551 EXIST:VMS:FUNCTION: | 4179 | UI_method_set_prompt_constructr 4551 EXIST:VMS:FUNCTION: |
| 4180 | EVP_read_pw_string_min 4552 EXIST::FUNCTION: | 4180 | EVP_read_pw_string_min 4552 EXIST::FUNCTION: |
| 4181 | CRYPTO_cts128_encrypt 4553 EXIST::FUNCTION: | ||
| 4182 | CRYPTO_cts128_decrypt_block 4554 EXIST::FUNCTION: | ||
| 4183 | CRYPTO_cfb128_1_encrypt 4555 EXIST::FUNCTION: | ||
| 4184 | CRYPTO_cbc128_encrypt 4556 EXIST::FUNCTION: | ||
| 4185 | CRYPTO_ctr128_encrypt 4557 EXIST::FUNCTION: | ||
| 4186 | CRYPTO_ofb128_encrypt 4558 EXIST::FUNCTION: | ||
| 4187 | CRYPTO_cts128_decrypt 4559 EXIST::FUNCTION: | ||
| 4188 | CRYPTO_cts128_encrypt_block 4560 EXIST::FUNCTION: | ||
| 4189 | CRYPTO_cbc128_decrypt 4561 EXIST::FUNCTION: | ||
| 4190 | CRYPTO_cfb128_encrypt 4562 EXIST::FUNCTION: | ||
| 4191 | CRYPTO_cfb128_8_encrypt 4563 EXIST::FUNCTION: | ||
| 4192 | OPENSSL_strcasecmp 4564 EXIST::FUNCTION: | ||
| 4193 | OPENSSL_memcmp 4565 EXIST::FUNCTION: | ||
| 4194 | OPENSSL_strncasecmp 4566 EXIST::FUNCTION: | ||
| 4195 | OPENSSL_gmtime 4567 EXIST::FUNCTION: | ||
| 4196 | OPENSSL_gmtime_adj 4568 EXIST::FUNCTION: | ||
diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl index 280e9de1ad..afe8c7326d 100644 --- a/src/lib/libcrypto/util/mk1mf.pl +++ b/src/lib/libcrypto/util/mk1mf.pl | |||
| @@ -13,6 +13,7 @@ $banner="\t\@echo Building OpenSSL"; | |||
| 13 | 13 | ||
| 14 | my $no_static_engine = 1; | 14 | my $no_static_engine = 1; |
| 15 | my $engines = ""; | 15 | my $engines = ""; |
| 16 | my $otherlibs = ""; | ||
| 16 | local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic | 17 | local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic |
| 17 | local $zlib_lib = ""; | 18 | local $zlib_lib = ""; |
| 18 | local $perl_asm = 0; # 1 to autobuild asm files from perl scripts | 19 | local $perl_asm = 0; # 1 to autobuild asm files from perl scripts |
| @@ -266,6 +267,7 @@ $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; | |||
| 266 | $cflags.=" -DOPENSSL_NO_EC" if $no_ec; | 267 | $cflags.=" -DOPENSSL_NO_EC" if $no_ec; |
| 267 | $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa; | 268 | $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa; |
| 268 | $cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh; | 269 | $cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh; |
| 270 | $cflags.=" -DOPENSSL_NO_GOST" if $no_gost; | ||
| 269 | $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; | 271 | $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; |
| 270 | $cflags.=" -DOPENSSL_NO_HW" if $no_hw; | 272 | $cflags.=" -DOPENSSL_NO_HW" if $no_hw; |
| 271 | $cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake; | 273 | $cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake; |
| @@ -356,6 +358,12 @@ for (;;) | |||
| 356 | $lib=$val; | 358 | $lib=$val; |
| 357 | $lib =~ s/^.*\/([^\/]+)$/$1/; | 359 | $lib =~ s/^.*\/([^\/]+)$/$1/; |
| 358 | } | 360 | } |
| 361 | if ($key eq "LIBNAME" && $no_static_engine) | ||
| 362 | { | ||
| 363 | $lib=$val; | ||
| 364 | $lib =~ s/^.*\/([^\/]+)$/$1/; | ||
| 365 | $otherlibs .= " $lib"; | ||
| 366 | } | ||
| 359 | 367 | ||
| 360 | if ($key eq "EXHEADER") | 368 | if ($key eq "EXHEADER") |
| 361 | { $exheader.=&var_add($dir,$val, 1); } | 369 | { $exheader.=&var_add($dir,$val, 1); } |
| @@ -658,7 +666,7 @@ foreach (split(/\s+/,$test)) | |||
| 658 | $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); | 666 | $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); |
| 659 | } | 667 | } |
| 660 | 668 | ||
| 661 | $defs.=&do_defs("E_SHLIB",$engines,"\$(ENG_D)",$shlibp); | 669 | $defs.=&do_defs("E_SHLIB",$engines . $otherlibs,"\$(ENG_D)",$shlibp); |
| 662 | 670 | ||
| 663 | foreach (split(/\s+/,$engines)) | 671 | foreach (split(/\s+/,$engines)) |
| 664 | { | 672 | { |
| @@ -671,6 +679,14 @@ foreach (split(/\s+/,$engines)) | |||
| 671 | $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); | 679 | $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); |
| 672 | $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); | 680 | $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); |
| 673 | 681 | ||
| 682 | foreach (split(" ",$otherlibs)) | ||
| 683 | { | ||
| 684 | my $uc = $_; | ||
| 685 | $uc =~ tr /a-z/A-Z/; | ||
| 686 | $rules.= &do_lib_rule("\$(${uc}OBJ)","\$(ENG_D)$o$_$shlibp", "", $shlib, ""); | ||
| 687 | |||
| 688 | } | ||
| 689 | |||
| 674 | $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); | 690 | $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); |
| 675 | 691 | ||
| 676 | print $defs; | 692 | print $defs; |
| @@ -708,6 +724,7 @@ sub var_add | |||
| 708 | return("") if $no_dsa && $dir =~ /\/dsa/; | 724 | return("") if $no_dsa && $dir =~ /\/dsa/; |
| 709 | return("") if $no_dh && $dir =~ /\/dh/; | 725 | return("") if $no_dh && $dir =~ /\/dh/; |
| 710 | return("") if $no_ec && $dir =~ /\/ec/; | 726 | return("") if $no_ec && $dir =~ /\/ec/; |
| 727 | return("") if $no_gost && $dir =~ /\/ccgost/; | ||
| 711 | return("") if $no_cms && $dir =~ /\/cms/; | 728 | return("") if $no_cms && $dir =~ /\/cms/; |
| 712 | return("") if $no_jpake && $dir =~ /\/jpake/; | 729 | return("") if $no_jpake && $dir =~ /\/jpake/; |
| 713 | if ($no_des && $dir =~ /\/des/) | 730 | if ($no_des && $dir =~ /\/des/) |
| @@ -1047,6 +1064,7 @@ sub read_options | |||
| 1047 | "no-ec" => \$no_ec, | 1064 | "no-ec" => \$no_ec, |
| 1048 | "no-ecdsa" => \$no_ecdsa, | 1065 | "no-ecdsa" => \$no_ecdsa, |
| 1049 | "no-ecdh" => \$no_ecdh, | 1066 | "no-ecdh" => \$no_ecdh, |
| 1067 | "no-gost" => \$no_gost, | ||
| 1050 | "no-engine" => \$no_engine, | 1068 | "no-engine" => \$no_engine, |
| 1051 | "no-hw" => \$no_hw, | 1069 | "no-hw" => \$no_hw, |
| 1052 | "just-ssl" => | 1070 | "just-ssl" => |
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl index a4a17e3ae9..ab47329097 100644 --- a/src/lib/libcrypto/util/mkdef.pl +++ b/src/lib/libcrypto/util/mkdef.pl | |||
| @@ -257,6 +257,8 @@ $ssl.=" ssl/tls1.h"; | |||
| 257 | 257 | ||
| 258 | my $crypto ="crypto/crypto.h"; | 258 | my $crypto ="crypto/crypto.h"; |
| 259 | $crypto.=" crypto/o_dir.h"; | 259 | $crypto.=" crypto/o_dir.h"; |
| 260 | $crypto.=" crypto/o_str.h"; | ||
| 261 | $crypto.=" crypto/o_time.h"; | ||
| 260 | $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; | 262 | $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; |
| 261 | $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; | 263 | $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; |
| 262 | $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; | 264 | $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; |
| @@ -316,6 +318,7 @@ $crypto.=" crypto/krb5/krb5_asn.h"; | |||
| 316 | $crypto.=" crypto/pqueue/pqueue.h"; | 318 | $crypto.=" crypto/pqueue/pqueue.h"; |
| 317 | $crypto.=" crypto/cms/cms.h"; | 319 | $crypto.=" crypto/cms/cms.h"; |
| 318 | $crypto.=" crypto/jpake/jpake.h"; | 320 | $crypto.=" crypto/jpake/jpake.h"; |
| 321 | $crypto.=" crypto/modes/modes.h"; | ||
| 319 | 322 | ||
| 320 | my $symhacks="crypto/symhacks.h"; | 323 | my $symhacks="crypto/symhacks.h"; |
| 321 | 324 | ||
diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl index c3e29fda96..5f25fc41bf 100644 --- a/src/lib/libcrypto/util/pl/VC-32.pl +++ b/src/lib/libcrypto/util/pl/VC-32.pl | |||
| @@ -138,8 +138,8 @@ else | |||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | # generate symbols.pdb unconditionally | 140 | # generate symbols.pdb unconditionally |
| 141 | $app_cflag.=" /Zi /Fd$tmp_def/app"; | 141 | $app_cflag.=" /Zi /Fd\$(TMP_D)/app"; |
| 142 | $lib_cflag.=" /Zi /Fd$tmp_def/lib"; | 142 | $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; |
| 143 | $lflags.=" /debug"; | 143 | $lflags.=" /debug"; |
| 144 | 144 | ||
| 145 | $obj='.obj'; | 145 | $obj='.obj'; |
| @@ -195,7 +195,7 @@ if ($FLAVOR =~ /WIN64A/) { | |||
| 195 | my $ver=`nasm -v 2>NUL`; | 195 | my $ver=`nasm -v 2>NUL`; |
| 196 | my $vew=`nasmw -v 2>NUL`; | 196 | my $vew=`nasmw -v 2>NUL`; |
| 197 | # pick newest version | 197 | # pick newest version |
| 198 | $asm=($ver gt $vew?"nasm":"nasmw")." -f win32"; | 198 | $asm=($ver ge $vew?"nasm":"nasmw")." -f win32"; |
| 199 | $asmtype="win32n"; | 199 | $asmtype="win32n"; |
| 200 | $afile='-o '; | 200 | $afile='-o '; |
| 201 | } else { | 201 | } else { |
diff --git a/src/lib/libssl/src/CHANGES b/src/lib/libssl/src/CHANGES index b139cf6244..a0de5abb60 100644 --- a/src/lib/libssl/src/CHANGES +++ b/src/lib/libssl/src/CHANGES | |||
| @@ -2,6 +2,64 @@ | |||
| 2 | OpenSSL CHANGES | 2 | OpenSSL CHANGES |
| 3 | _______________ | 3 | _______________ |
| 4 | 4 | ||
| 5 | Changes between 1.0.0d and 1.0.0e [6 Sep 2011] | ||
| 6 | |||
| 7 | *) Fix bug where CRLs with nextUpdate in the past are sometimes accepted | ||
| 8 | by initialising X509_STORE_CTX properly. (CVE-2011-3207) | ||
| 9 | [Kaspar Brand <ossl@velox.ch>] | ||
| 10 | |||
| 11 | *) Fix SSL memory handling for (EC)DH ciphersuites, in particular | ||
| 12 | for multi-threaded use of ECDH. (CVE-2011-3210) | ||
| 13 | [Adam Langley (Google)] | ||
| 14 | |||
| 15 | *) Fix x509_name_ex_d2i memory leak on bad inputs. | ||
| 16 | [Bodo Moeller] | ||
| 17 | |||
| 18 | *) Remove hard coded ecdsaWithSHA1 signature tests in ssl code and check | ||
| 19 | signature public key algorithm by using OID xref utilities instead. | ||
| 20 | Before this you could only use some ECC ciphersuites with SHA1 only. | ||
| 21 | [Steve Henson] | ||
| 22 | |||
| 23 | *) Add protection against ECDSA timing attacks as mentioned in the paper | ||
| 24 | by Billy Bob Brumley and Nicola Tuveri, see: | ||
| 25 | |||
| 26 | http://eprint.iacr.org/2011/232.pdf | ||
| 27 | |||
| 28 | [Billy Bob Brumley and Nicola Tuveri] | ||
| 29 | |||
| 30 | Changes between 1.0.0c and 1.0.0d [8 Feb 2011] | ||
| 31 | |||
| 32 | *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 | ||
| 33 | [Neel Mehta, Adam Langley, Bodo Moeller (Google)] | ||
| 34 | |||
| 35 | *) Fix bug in string printing code: if *any* escaping is enabled we must | ||
| 36 | escape the escape character (backslash) or the resulting string is | ||
| 37 | ambiguous. | ||
| 38 | [Steve Henson] | ||
| 39 | |||
| 40 | Changes between 1.0.0b and 1.0.0c [2 Dec 2010] | ||
| 41 | |||
| 42 | *) Disable code workaround for ancient and obsolete Netscape browsers | ||
| 43 | and servers: an attacker can use it in a ciphersuite downgrade attack. | ||
| 44 | Thanks to Martin Rex for discovering this bug. CVE-2010-4180 | ||
| 45 | [Steve Henson] | ||
| 46 | |||
| 47 | *) Fixed J-PAKE implementation error, originally discovered by | ||
| 48 | Sebastien Martini, further info and confirmation from Stefan | ||
| 49 | Arentz and Feng Hao. Note that this fix is a security fix. CVE-2010-4252 | ||
| 50 | [Ben Laurie] | ||
| 51 | |||
| 52 | Changes between 1.0.0a and 1.0.0b [16 Nov 2010] | ||
| 53 | |||
| 54 | *) Fix extension code to avoid race conditions which can result in a buffer | ||
| 55 | overrun vulnerability: resumed sessions must not be modified as they can | ||
| 56 | be shared by multiple threads. CVE-2010-3864 | ||
| 57 | [Steve Henson] | ||
| 58 | |||
| 59 | *) Fix WIN32 build system to correctly link an ENGINE directory into | ||
| 60 | a DLL. | ||
| 61 | [Steve Henson] | ||
| 62 | |||
| 5 | Changes between 1.0.0 and 1.0.0a [01 Jun 2010] | 63 | Changes between 1.0.0 and 1.0.0a [01 Jun 2010] |
| 6 | 64 | ||
| 7 | *) Check return value of int_rsa_verify in pkey_rsa_verifyrecover | 65 | *) Check return value of int_rsa_verify in pkey_rsa_verifyrecover |
| @@ -849,7 +907,73 @@ | |||
| 849 | *) Change 'Configure' script to enable Camellia by default. | 907 | *) Change 'Configure' script to enable Camellia by default. |
| 850 | [NTT] | 908 | [NTT] |
| 851 | 909 | ||
| 852 | Changes between 0.9.8n and 0.9.8o [xx XXX xxxx] | 910 | Changes between 0.9.8r and 0.9.8s [xx XXX xxxx] |
| 911 | |||
| 912 | *) Fix SSL memory handling for (EC)DH ciphersuites, in particular | ||
| 913 | for multi-threaded use of ECDH. | ||
| 914 | [Adam Langley (Google)] | ||
| 915 | |||
| 916 | *) Fix x509_name_ex_d2i memory leak on bad inputs. | ||
| 917 | [Bodo Moeller] | ||
| 918 | |||
| 919 | *) Add protection against ECDSA timing attacks as mentioned in the paper | ||
| 920 | by Billy Bob Brumley and Nicola Tuveri, see: | ||
| 921 | |||
| 922 | http://eprint.iacr.org/2011/232.pdf | ||
| 923 | |||
| 924 | [Billy Bob Brumley and Nicola Tuveri] | ||
| 925 | |||
| 926 | Changes between 0.9.8q and 0.9.8r [8 Feb 2011] | ||
| 927 | |||
| 928 | *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 | ||
| 929 | [Neel Mehta, Adam Langley, Bodo Moeller (Google)] | ||
| 930 | |||
| 931 | *) Fix bug in string printing code: if *any* escaping is enabled we must | ||
| 932 | escape the escape character (backslash) or the resulting string is | ||
| 933 | ambiguous. | ||
| 934 | [Steve Henson] | ||
| 935 | |||
| 936 | Changes between 0.9.8p and 0.9.8q [2 Dec 2010] | ||
| 937 | |||
| 938 | *) Disable code workaround for ancient and obsolete Netscape browsers | ||
| 939 | and servers: an attacker can use it in a ciphersuite downgrade attack. | ||
| 940 | Thanks to Martin Rex for discovering this bug. CVE-2010-4180 | ||
| 941 | [Steve Henson] | ||
| 942 | |||
| 943 | *) Fixed J-PAKE implementation error, originally discovered by | ||
| 944 | Sebastien Martini, further info and confirmation from Stefan | ||
| 945 | Arentz and Feng Hao. Note that this fix is a security fix. CVE-2010-4252 | ||
| 946 | [Ben Laurie] | ||
| 947 | |||
| 948 | Changes between 0.9.8o and 0.9.8p [16 Nov 2010] | ||
| 949 | |||
| 950 | *) Fix extension code to avoid race conditions which can result in a buffer | ||
| 951 | overrun vulnerability: resumed sessions must not be modified as they can | ||
| 952 | be shared by multiple threads. CVE-2010-3864 | ||
| 953 | [Steve Henson] | ||
| 954 | |||
| 955 | *) Fix for double free bug in ssl/s3_clnt.c CVE-2010-2939 | ||
| 956 | [Steve Henson] | ||
| 957 | |||
| 958 | *) Don't reencode certificate when calculating signature: cache and use | ||
| 959 | the original encoding instead. This makes signature verification of | ||
| 960 | some broken encodings work correctly. | ||
| 961 | [Steve Henson] | ||
| 962 | |||
| 963 | *) ec2_GF2m_simple_mul bugfix: compute correct result if the output EC_POINT | ||
| 964 | is also one of the inputs. | ||
| 965 | [Emilia Käsper <emilia.kasper@esat.kuleuven.be> (Google)] | ||
| 966 | |||
| 967 | *) Don't repeatedly append PBE algorithms to table if they already exist. | ||
| 968 | Sort table on each new add. This effectively makes the table read only | ||
| 969 | after all algorithms are added and subsequent calls to PKCS12_pbe_add | ||
| 970 | etc are non-op. | ||
| 971 | [Steve Henson] | ||
| 972 | |||
| 973 | Changes between 0.9.8n and 0.9.8o [01 Jun 2010] | ||
| 974 | |||
| 975 | [NB: OpenSSL 0.9.8o and later 0.9.8 patch levels were released after | ||
| 976 | OpenSSL 1.0.0.] | ||
| 853 | 977 | ||
| 854 | *) Correct a typo in the CMS ASN1 module which can result in invalid memory | 978 | *) Correct a typo in the CMS ASN1 module which can result in invalid memory |
| 855 | access or freeing data twice (CVE-2010-0742) | 979 | access or freeing data twice (CVE-2010-0742) |
| @@ -860,6 +984,12 @@ | |||
| 860 | SSL_library_init and not OpenSSL_add_all_algorithms() will fail. | 984 | SSL_library_init and not OpenSSL_add_all_algorithms() will fail. |
| 861 | [Steve Henson] | 985 | [Steve Henson] |
| 862 | 986 | ||
| 987 | *) VMS fixes: | ||
| 988 | Reduce copying into .apps and .test in makevms.com | ||
| 989 | Don't try to use blank CA certificate in CA.com | ||
| 990 | Allow use of C files from original directories in maketests.com | ||
| 991 | [Steven M. Schweda" <sms@antinode.info>] | ||
| 992 | |||
| 863 | Changes between 0.9.8m and 0.9.8n [24 Mar 2010] | 993 | Changes between 0.9.8m and 0.9.8n [24 Mar 2010] |
| 864 | 994 | ||
| 865 | *) When rejecting SSL/TLS records due to an incorrect version number, never | 995 | *) When rejecting SSL/TLS records due to an incorrect version number, never |
| @@ -868,8 +998,8 @@ | |||
| 868 | - OpenSSL 0.9.8f if 'short' is longer than 16 bits, | 998 | - OpenSSL 0.9.8f if 'short' is longer than 16 bits, |
| 869 | the previous behavior could result in a read attempt at NULL when | 999 | the previous behavior could result in a read attempt at NULL when |
| 870 | receiving specific incorrect SSL/TLS records once record payload | 1000 | receiving specific incorrect SSL/TLS records once record payload |
| 871 | protection is active. (CVE-2010-####) | 1001 | protection is active. (CVE-2010-0740) |
| 872 | [Bodo Moeller, Adam Langley] | 1002 | [Bodo Moeller, Adam Langley <agl@chromium.org>] |
| 873 | 1003 | ||
| 874 | *) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL | 1004 | *) Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL |
| 875 | could be crashed if the relevant tables were not present (e.g. chrooted). | 1005 | could be crashed if the relevant tables were not present (e.g. chrooted). |
diff --git a/src/lib/libssl/src/Configure b/src/lib/libssl/src/Configure index e3b13b9d43..429ab2e5eb 100644 --- a/src/lib/libssl/src/Configure +++ b/src/lib/libssl/src/Configure | |||
| @@ -492,6 +492,8 @@ my %table=( | |||
| 492 | # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64 | 492 | # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64 |
| 493 | "VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32", | 493 | "VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32", |
| 494 | "VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32", | 494 | "VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32", |
| 495 | "debug-VC-WIN64I","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32", | ||
| 496 | "debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32", | ||
| 495 | # x86 Win32 target defaults to ANSI API, if you want UNICODE, complement | 497 | # x86 Win32 target defaults to ANSI API, if you want UNICODE, complement |
| 496 | # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE' | 498 | # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE' |
| 497 | "VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", | 499 | "VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", |
| @@ -583,6 +585,7 @@ my %table=( | |||
| 583 | ); | 585 | ); |
| 584 | 586 | ||
| 585 | my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A | 587 | my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A |
| 588 | debug-VC-WIN64I debug-VC-WIN64A | ||
| 586 | VC-NT VC-CE VC-WIN32 debug-VC-WIN32 | 589 | VC-NT VC-CE VC-WIN32 debug-VC-WIN32 |
| 587 | BC-32 | 590 | BC-32 |
| 588 | netware-clib netware-clib-bsdsock | 591 | netware-clib netware-clib-bsdsock |
| @@ -1093,6 +1096,12 @@ my $ar = $ENV{'AR'} || "ar"; | |||
| 1093 | my $arflags = $fields[$idx_arflags]; | 1096 | my $arflags = $fields[$idx_arflags]; |
| 1094 | my $multilib = $fields[$idx_multilib]; | 1097 | my $multilib = $fields[$idx_multilib]; |
| 1095 | 1098 | ||
| 1099 | # if $prefix/lib$multilib is not an existing directory, then | ||
| 1100 | # assume that it's not searched by linker automatically, in | ||
| 1101 | # which case adding $multilib suffix causes more grief than | ||
| 1102 | # we're ready to tolerate, so don't... | ||
| 1103 | $multilib="" if !-d "$prefix/lib$multilib"; | ||
| 1104 | |||
| 1096 | $libdir="lib$multilib" if $libdir eq ""; | 1105 | $libdir="lib$multilib" if $libdir eq ""; |
| 1097 | 1106 | ||
| 1098 | $cflags = "$cflags$exp_cflags"; | 1107 | $cflags = "$cflags$exp_cflags"; |
| @@ -1102,6 +1111,12 @@ my ($prelflags,$postlflags)=split('%',$lflags); | |||
| 1102 | if (defined($postlflags)) { $lflags=$postlflags; } | 1111 | if (defined($postlflags)) { $lflags=$postlflags; } |
| 1103 | else { $lflags=$prelflags; undef $prelflags; } | 1112 | else { $lflags=$prelflags; undef $prelflags; } |
| 1104 | 1113 | ||
| 1114 | if ($target =~ /^mingw/ && `$cc --target-help 2>&1` !~ m/\-mno\-cygwin/m) | ||
| 1115 | { | ||
| 1116 | $cflags =~ s/\-mno\-cygwin\s*//; | ||
| 1117 | $shared_ldflag =~ s/\-mno\-cygwin\s*//; | ||
| 1118 | } | ||
| 1119 | |||
| 1105 | my $no_shared_warn=0; | 1120 | my $no_shared_warn=0; |
| 1106 | my $no_user_cflags=0; | 1121 | my $no_user_cflags=0; |
| 1107 | 1122 | ||
diff --git a/src/lib/libssl/src/FAQ b/src/lib/libssl/src/FAQ index becee6663f..fe54856a62 100644 --- a/src/lib/libssl/src/FAQ +++ b/src/lib/libssl/src/FAQ | |||
| @@ -52,6 +52,9 @@ OpenSSL - Frequently Asked Questions | |||
| 52 | * Why does the OpenSSL test suite fail in sha512t on x86 CPU? | 52 | * Why does the OpenSSL test suite fail in sha512t on x86 CPU? |
| 53 | * Why does compiler fail to compile sha512.c? | 53 | * Why does compiler fail to compile sha512.c? |
| 54 | * Test suite still fails, what to do? | 54 | * Test suite still fails, what to do? |
| 55 | * I think I've found a bug, what should I do? | ||
| 56 | * I'm SURE I've found a bug, how do I report it? | ||
| 57 | * I've found a security issue, how do I report it? | ||
| 55 | 58 | ||
| 56 | [PROG] Questions about programming with OpenSSL | 59 | [PROG] Questions about programming with OpenSSL |
| 57 | 60 | ||
| @@ -79,7 +82,7 @@ OpenSSL - Frequently Asked Questions | |||
| 79 | * Which is the current version of OpenSSL? | 82 | * Which is the current version of OpenSSL? |
| 80 | 83 | ||
| 81 | The current version is available from <URL: http://www.openssl.org>. | 84 | The current version is available from <URL: http://www.openssl.org>. |
| 82 | OpenSSL 1.0.0a was released on Jun 1st, 2010. | 85 | OpenSSL 1.0.0e was released on Sep 6th, 2011. |
| 83 | 86 | ||
| 84 | In addition to the current stable release, you can also access daily | 87 | In addition to the current stable release, you can also access daily |
| 85 | snapshots of the OpenSSL development version at <URL: | 88 | snapshots of the OpenSSL development version at <URL: |
| @@ -131,7 +134,7 @@ OpenSSL. Information on the OpenSSL mailing lists is available from | |||
| 131 | * Where can I get a compiled version of OpenSSL? | 134 | * Where can I get a compiled version of OpenSSL? |
| 132 | 135 | ||
| 133 | You can finder pointers to binary distributions in | 136 | You can finder pointers to binary distributions in |
| 134 | http://www.openssl.org/related/binaries.html . | 137 | <URL: http://www.openssl.org/related/binaries.html> . |
| 135 | 138 | ||
| 136 | Some applications that use OpenSSL are distributed in binary form. | 139 | Some applications that use OpenSSL are distributed in binary form. |
| 137 | When using such an application, you don't need to install OpenSSL | 140 | When using such an application, you don't need to install OpenSSL |
| @@ -463,7 +466,7 @@ administrators. | |||
| 463 | Other projects do have other policies so you can for example extract the CA | 466 | Other projects do have other policies so you can for example extract the CA |
| 464 | bundle used by Mozilla and/or modssl as described in this article: | 467 | bundle used by Mozilla and/or modssl as described in this article: |
| 465 | 468 | ||
| 466 | http://www.mail-archive.com/modssl-users@modssl.org/msg16980.html | 469 | <URL: http://www.mail-archive.com/modssl-users@modssl.org/msg16980.html> |
| 467 | 470 | ||
| 468 | 471 | ||
| 469 | [BUILD] ======================================================================= | 472 | [BUILD] ======================================================================= |
| @@ -505,7 +508,7 @@ when you run the test suite (using "make test"). The message returned is | |||
| 505 | "bc: 1 not implemented". | 508 | "bc: 1 not implemented". |
| 506 | 509 | ||
| 507 | The best way to deal with this is to find another implementation of bc | 510 | The best way to deal with this is to find another implementation of bc |
| 508 | and compile/install it. GNU bc (see http://www.gnu.org/software/software.html | 511 | and compile/install it. GNU bc (see <URL: http://www.gnu.org/software/software.html> |
| 509 | for download instructions) can be safely used, for example. | 512 | for download instructions) can be safely used, for example. |
| 510 | 513 | ||
| 511 | 514 | ||
| @@ -516,7 +519,7 @@ that the OpenSSL bntest throws at it. This gets triggered when you run the | |||
| 516 | test suite (using "make test"). The message returned is "bc: stack empty". | 519 | test suite (using "make test"). The message returned is "bc: stack empty". |
| 517 | 520 | ||
| 518 | The best way to deal with this is to find another implementation of bc | 521 | The best way to deal with this is to find another implementation of bc |
| 519 | and compile/install it. GNU bc (see http://www.gnu.org/software/software.html | 522 | and compile/install it. GNU bc (see <URL: http://www.gnu.org/software/software.html> |
| 520 | for download instructions) can be safely used, for example. | 523 | for download instructions) can be safely used, for example. |
| 521 | 524 | ||
| 522 | 525 | ||
| @@ -709,6 +712,46 @@ never make sense, and tend to emerge when you least expect them. In order | |||
| 709 | to identify one, drop optimization level, e.g. by editing CFLAG line in | 712 | to identify one, drop optimization level, e.g. by editing CFLAG line in |
| 710 | top-level Makefile, recompile and re-run the test. | 713 | top-level Makefile, recompile and re-run the test. |
| 711 | 714 | ||
| 715 | * I think I've found a bug, what should I do? | ||
| 716 | |||
| 717 | If you are a new user then it is quite likely you haven't found a bug and | ||
| 718 | something is happening you aren't familiar with. Check this FAQ, the associated | ||
| 719 | documentation and the mailing lists for similar queries. If you are still | ||
| 720 | unsure whether it is a bug or not submit a query to the openssl-users mailing | ||
| 721 | list. | ||
| 722 | |||
| 723 | |||
| 724 | * I'm SURE I've found a bug, how do I report it? | ||
| 725 | |||
| 726 | Bug reports with no security implications should be sent to the request | ||
| 727 | tracker. This can be done by mailing the report to <rt@openssl.org> (or its | ||
| 728 | alias <openssl-bugs@openssl.org>), please note that messages sent to the | ||
| 729 | request tracker also appear in the public openssl-dev mailing list. | ||
| 730 | |||
| 731 | The report should be in plain text. Any patches should be sent as | ||
| 732 | plain text attachments because some mailers corrupt patches sent inline. | ||
| 733 | If your issue affects multiple versions of OpenSSL check any patches apply | ||
| 734 | cleanly and, if possible include patches to each affected version. | ||
| 735 | |||
| 736 | The report should be given a meaningful subject line briefly summarising the | ||
| 737 | issue. Just "bug in OpenSSL" or "bug in OpenSSL 0.9.8n" is not very helpful. | ||
| 738 | |||
| 739 | By sending reports to the request tracker the bug can then be given a priority | ||
| 740 | and assigned to the appropriate maintainer. The history of discussions can be | ||
| 741 | accessed and if the issue has been addressed or a reason why not. If patches | ||
| 742 | are only sent to openssl-dev they can be mislaid if a team member has to | ||
| 743 | wade through months of old messages to review the discussion. | ||
| 744 | |||
| 745 | See also <URL: http://www.openssl.org/support/rt.html> | ||
| 746 | |||
| 747 | |||
| 748 | * I've found a security issue, how do I report it? | ||
| 749 | |||
| 750 | If you think your bug has security implications then please send it to | ||
| 751 | openssl-security@openssl.org if you don't get a prompt reply at least | ||
| 752 | acknowledging receipt then resend or mail it directly to one of the | ||
| 753 | more active team members (e.g. Steve). | ||
| 754 | |||
| 712 | [PROG] ======================================================================== | 755 | [PROG] ======================================================================== |
| 713 | 756 | ||
| 714 | * Is OpenSSL thread-safe? | 757 | * Is OpenSSL thread-safe? |
diff --git a/src/lib/libssl/src/INSTALL.VMS b/src/lib/libssl/src/INSTALL.VMS index 7658f64e1d..e5d43a57ab 100644 --- a/src/lib/libssl/src/INSTALL.VMS +++ b/src/lib/libssl/src/INSTALL.VMS | |||
| @@ -71,7 +71,7 @@ the top to understand how to use them. However, if you want to | |||
| 71 | compile all you can get, the simplest is to use MAKEVMS.COM in the top | 71 | compile all you can get, the simplest is to use MAKEVMS.COM in the top |
| 72 | directory. The syntax is the following: | 72 | directory. The syntax is the following: |
| 73 | 73 | ||
| 74 | @MAKEVMS <option> <rsaref-p> <debug-p> [<compiler>] | 74 | @MAKEVMS <option> <bits> <debug-p> [<compiler>] |
| 75 | 75 | ||
| 76 | <option> must be one of the following: | 76 | <option> must be one of the following: |
| 77 | 77 | ||
| @@ -87,24 +87,11 @@ directory. The syntax is the following: | |||
| 87 | TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL. | 87 | TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL. |
| 88 | APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL. | 88 | APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL. |
| 89 | 89 | ||
| 90 | <rsaref-p> must be one of the following: | 90 | <bits> must be one of the following: |
| 91 | 91 | ||
| 92 | RSAREF compile using the RSAREF Library | 92 | "" compile using default pointer size |
| 93 | NORSAREF compile without using RSAREF | 93 | 32 compile using 32 bit pointer size |
| 94 | 94 | 64 compile using 64 bit pointer size | |
| 95 | Note 0: The RSAREF library IS NO LONGER NEEDED. The RSA patent | ||
| 96 | expires September 20, 2000, and RSA Security chose to make | ||
| 97 | the algorithm public domain two weeks before that. | ||
| 98 | |||
| 99 | Note 1: If you still want to use RSAREF, the library is NOT INCLUDED | ||
| 100 | and you have to download it. RSA Security doesn't carry it | ||
| 101 | any more, but there are a number of places where you can find | ||
| 102 | it. You have to get the ".tar-Z" file as the ".zip" file | ||
| 103 | doesn't have the directory structure stored. You have to | ||
| 104 | extract the file into the [.RSAREF] directory as that is where | ||
| 105 | the scripts will look for the files. | ||
| 106 | |||
| 107 | Note 2: I have never done this, so I've no idea if it works or not. | ||
| 108 | 95 | ||
| 109 | <debug-p> must be one of the following: | 96 | <debug-p> must be one of the following: |
| 110 | 97 | ||
| @@ -117,12 +104,13 @@ Note 2: I have never done this, so I've no idea if it works or not. | |||
| 117 | GNUC For GNU C. | 104 | GNUC For GNU C. |
| 118 | 105 | ||
| 119 | 106 | ||
| 120 | You will find the crypto library in [.xxx.EXE.CRYPTO], called LIBCRYPTO.OLB, | 107 | You will find the crypto library in [.xxx.EXE.CRYPTO] (where xxx is VAX, |
| 121 | where xxx is VAX or AXP. You will find the SSL library in [.xxx.EXE.SSL], | 108 | ALPHA or IA64), called SSL_LIBCRYPTO32.OLB or SSL_LIBCRYPTO.OLB depending |
| 122 | named LIBSSL.OLB, and you will find a bunch of useful programs in | 109 | on how it was built. You will find the SSL library in [.xxx.EXE.SSL], |
| 123 | [.xxx.EXE.APPS]. However, these shouldn't be used right off unless it's | 110 | named SSL_LIBSSL32.OLB or SSL_LIBSSL.OLB, and you will find a bunch of |
| 124 | just to test them. For production use, make sure you install first, see | 111 | useful programs in [.xxx.EXE.APPS]. However, these shouldn't be used |
| 125 | Installation below. | 112 | right off unless it's just to test them. For production use, make sure |
| 113 | you install first, see Installation below. | ||
| 126 | 114 | ||
| 127 | Note 1: Some programs in this package require a TCP/IP library. | 115 | Note 1: Some programs in this package require a TCP/IP library. |
| 128 | 116 | ||
| @@ -170,12 +158,14 @@ Installation: | |||
| 170 | 158 | ||
| 171 | Installation is easy, just do the following: | 159 | Installation is easy, just do the following: |
| 172 | 160 | ||
| 173 | @INSTALL <root> | 161 | @INSTALL <root> <bits> |
| 174 | 162 | ||
| 175 | <root> is the directory in which everything will be installed, | 163 | <root> is the directory in which everything will be installed, |
| 176 | subdirectories, libraries, header files, programs and startup command | 164 | subdirectories, libraries, header files, programs and startup command |
| 177 | procedures. | 165 | procedures. |
| 178 | 166 | ||
| 167 | <bits> works the same way as for MAKEVMS.COM | ||
| 168 | |||
| 179 | N.B.: INSTALL.COM builds a new directory structure, different from | 169 | N.B.: INSTALL.COM builds a new directory structure, different from |
| 180 | the directory tree where you have now build OpenSSL. | 170 | the directory tree where you have now build OpenSSL. |
| 181 | 171 | ||
| @@ -196,6 +186,10 @@ following command procedures: | |||
| 196 | sets up the symbols to the applications. Should be called | 186 | sets up the symbols to the applications. Should be called |
| 197 | from for example SYS$MANAGER:SYLOGIN.COM | 187 | from for example SYS$MANAGER:SYLOGIN.COM |
| 198 | 188 | ||
| 189 | OPENSSL_UNDO.COM | ||
| 190 | |||
| 191 | deassigns the logical names created with OPENSSL_STARTUP.COM. | ||
| 192 | |||
| 199 | The logical names that are set up are the following: | 193 | The logical names that are set up are the following: |
| 200 | 194 | ||
| 201 | SSLROOT a dotted concealed logical name pointing at the | 195 | SSLROOT a dotted concealed logical name pointing at the |
| @@ -203,7 +197,6 @@ The logical names that are set up are the following: | |||
| 203 | 197 | ||
| 204 | SSLCERTS Initially an empty directory, this is the default | 198 | SSLCERTS Initially an empty directory, this is the default |
| 205 | location for certificate files. | 199 | location for certificate files. |
| 206 | SSLMISC Various scripts. | ||
| 207 | SSLPRIVATE Initially an empty directory, this is the default | 200 | SSLPRIVATE Initially an empty directory, this is the default |
| 208 | location for private key files. | 201 | location for private key files. |
| 209 | 202 | ||
| @@ -211,8 +204,9 @@ The logical names that are set up are the following: | |||
| 211 | programs. | 204 | programs. |
| 212 | SSLINCLUDE Contains the header files needed if you want to | 205 | SSLINCLUDE Contains the header files needed if you want to |
| 213 | compile programs with libcrypto or libssl. | 206 | compile programs with libcrypto or libssl. |
| 214 | SSLLIB Contains the OpenSSL library files (LIBCRYPTO.OLB | 207 | SSLLIB Contains the OpenSSL library files themselves: |
| 215 | and LIBSSL.OLB) themselves. | 208 | - SSL_LIBCRYPTO32.OLB and SSL_LIBSSL32.OLB or |
| 209 | - SSL_LIBCRYPTO.OLB and SSL_LIBSSL.OLB | ||
| 216 | 210 | ||
| 217 | OPENSSL Same as SSLINCLUDE. This is because the standard | 211 | OPENSSL Same as SSLINCLUDE. This is because the standard |
| 218 | way to include OpenSSL header files from version | 212 | way to include OpenSSL header files from version |
| @@ -296,4 +290,4 @@ have any ideas. | |||
| 296 | 290 | ||
| 297 | -- | 291 | -- |
| 298 | Richard Levitte <richard@levitte.org> | 292 | Richard Levitte <richard@levitte.org> |
| 299 | 2000-02-27 | 293 | 2000-02-27, 2011-03-18 |
diff --git a/src/lib/libssl/src/INSTALL.W32 b/src/lib/libssl/src/INSTALL.W32 index 77441f1ef3..d23c4baf62 100644 --- a/src/lib/libssl/src/INSTALL.W32 +++ b/src/lib/libssl/src/INSTALL.W32 | |||
| @@ -185,6 +185,15 @@ | |||
| 185 | required. Run the installers and do whatever magic they say it takes | 185 | required. Run the installers and do whatever magic they say it takes |
| 186 | to start MSYS bash shell with GNU tools on its PATH. | 186 | to start MSYS bash shell with GNU tools on its PATH. |
| 187 | 187 | ||
| 188 | N.B. Since source tar-ball can contain symbolic links, it's essential | ||
| 189 | that you use accompanying MSYS tar to unpack the source. It will | ||
| 190 | either handle them in one way or another or fail to extract them, | ||
| 191 | which does the trick too. Latter means that you may safely ignore all | ||
| 192 | "cannot create symlink" messages, as they will be "re-created" at | ||
| 193 | configure stage by copying corresponding files. Alternative programs | ||
| 194 | were observed to create empty files instead, which results in build | ||
| 195 | failure. | ||
| 196 | |||
| 188 | * Compile OpenSSL: | 197 | * Compile OpenSSL: |
| 189 | 198 | ||
| 190 | $ ./config | 199 | $ ./config |
| @@ -297,7 +306,18 @@ | |||
| 297 | desktop, which is not available to service processes. The toolkit is | 306 | desktop, which is not available to service processes. The toolkit is |
| 298 | designed to detect in which context it's currently executed, GUI, | 307 | designed to detect in which context it's currently executed, GUI, |
| 299 | console app or service, and act accordingly, namely whether or not to | 308 | console app or service, and act accordingly, namely whether or not to |
| 300 | actually make GUI calls. | 309 | actually make GUI calls. Additionally those who wish to |
| 310 | /DELAYLOAD:GDI32.DLL and /DELAYLOAD:USER32.DLL and actually keep them | ||
| 311 | off service process should consider implementing and exporting from | ||
| 312 | .exe image in question own _OPENSSL_isservice not relying on USER32.DLL. | ||
| 313 | E.g., on Windows Vista and later you could: | ||
| 314 | |||
| 315 | __declspec(dllexport) __cdecl BOOL _OPENSSL_isservice(void) | ||
| 316 | { DWORD sess; | ||
| 317 | if (ProcessIdToSessionId(GetCurrentProcessId(),&sess)) | ||
| 318 | return sess==0; | ||
| 319 | return FALSE; | ||
| 320 | } | ||
| 301 | 321 | ||
| 302 | If you link with OpenSSL .DLLs, then you're expected to include into | 322 | If you link with OpenSSL .DLLs, then you're expected to include into |
| 303 | your application code small "shim" snippet, which provides glue between | 323 | your application code small "shim" snippet, which provides glue between |
diff --git a/src/lib/libssl/src/LICENSE b/src/lib/libssl/src/LICENSE index a2c4adcbe6..e47d101f10 100644 --- a/src/lib/libssl/src/LICENSE +++ b/src/lib/libssl/src/LICENSE | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | --------------- | 12 | --------------- |
| 13 | 13 | ||
| 14 | /* ==================================================================== | 14 | /* ==================================================================== |
| 15 | * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. | 15 | * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. |
| 16 | * | 16 | * |
| 17 | * Redistribution and use in source and binary forms, with or without | 17 | * Redistribution and use in source and binary forms, with or without |
| 18 | * modification, are permitted provided that the following conditions | 18 | * modification, are permitted provided that the following conditions |
diff --git a/src/lib/libssl/src/Makefile b/src/lib/libssl/src/Makefile index 47bb99c40b..445e15d671 100644 --- a/src/lib/libssl/src/Makefile +++ b/src/lib/libssl/src/Makefile | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ## Makefile for OpenSSL | 4 | ## Makefile for OpenSSL |
| 5 | ## | 5 | ## |
| 6 | 6 | ||
| 7 | VERSION=1.0.0a | 7 | VERSION=1.0.0e |
| 8 | MAJOR=1 | 8 | MAJOR=1 |
| 9 | MINOR=0.0 | 9 | MINOR=0.0 |
| 10 | SHLIB_VERSION_NUMBER=1.0.0 | 10 | SHLIB_VERSION_NUMBER=1.0.0 |
diff --git a/src/lib/libssl/src/NEWS b/src/lib/libssl/src/NEWS index 3a787ea06c..672810dcc7 100644 --- a/src/lib/libssl/src/NEWS +++ b/src/lib/libssl/src/NEWS | |||
| @@ -5,12 +5,38 @@ | |||
| 5 | This file gives a brief overview of the major changes between each OpenSSL | 5 | This file gives a brief overview of the major changes between each OpenSSL |
| 6 | release. For more details please read the CHANGES file. | 6 | release. For more details please read the CHANGES file. |
| 7 | 7 | ||
| 8 | Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e: | ||
| 9 | |||
| 10 | o Fix for CRL vulnerability issue CVE-2011-3207 | ||
| 11 | o Fix for ECDH crashes CVE-2011-3210 | ||
| 12 | o Protection against EC timing attacks. | ||
| 13 | o Support ECDH ciphersuites for certificates using SHA2 algorithms. | ||
| 14 | o Various DTLS fixes. | ||
| 15 | |||
| 16 | Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d: | ||
| 17 | |||
| 18 | o Fix for security issue CVE-2011-0014 | ||
| 19 | |||
| 20 | Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c: | ||
| 21 | |||
| 22 | o Fix for security issue CVE-2010-4180 | ||
| 23 | o Fix for CVE-2010-4252 | ||
| 24 | o Fix mishandling of absent EC point format extension. | ||
| 25 | o Fix various platform compilation issues. | ||
| 26 | o Corrected fix for security issue CVE-2010-3864. | ||
| 27 | |||
| 28 | Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b: | ||
| 29 | |||
| 30 | o Fix for security issue CVE-2010-3864. | ||
| 31 | o Fix for CVE-2010-2939 | ||
| 32 | o Fix WIN32 build system for GOST ENGINE. | ||
| 33 | |||
| 8 | Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a: | 34 | Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a: |
| 9 | 35 | ||
| 10 | o Fix for security issue CVE-2010-1633. | 36 | o Fix for security issue CVE-2010-1633. |
| 11 | o GOST MAC and CFB fixes. | 37 | o GOST MAC and CFB fixes. |
| 12 | 38 | ||
| 13 | Major changes between OpenSSL 0.9.8n and OpenSSL 1.0: | 39 | Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0: |
| 14 | 40 | ||
| 15 | o RFC3280 path validation: sufficient to process PKITS tests. | 41 | o RFC3280 path validation: sufficient to process PKITS tests. |
| 16 | o Integrated support for PVK files and keyblobs. | 42 | o Integrated support for PVK files and keyblobs. |
| @@ -33,6 +59,19 @@ | |||
| 33 | o Opaque PRF Input TLS extension support. | 59 | o Opaque PRF Input TLS extension support. |
| 34 | o Updated time routines to avoid OS limitations. | 60 | o Updated time routines to avoid OS limitations. |
| 35 | 61 | ||
| 62 | Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: | ||
| 63 | |||
| 64 | o Fix for security issue CVE-2011-0014 | ||
| 65 | |||
| 66 | Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: | ||
| 67 | |||
| 68 | o Fix for security issue CVE-2010-4180 | ||
| 69 | o Fix for CVE-2010-4252 | ||
| 70 | |||
| 71 | Major changes between OpenSSL 0.9.8o and OpenSSL 0.9.8p: | ||
| 72 | |||
| 73 | o Fix for security issue CVE-2010-3864. | ||
| 74 | |||
| 36 | Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o: | 75 | Major changes between OpenSSL 0.9.8n and OpenSSL 0.9.8o: |
| 37 | 76 | ||
| 38 | o Fix for security issue CVE-2010-0742. | 77 | o Fix for security issue CVE-2010-0742. |
diff --git a/src/lib/libssl/src/PROBLEMS b/src/lib/libssl/src/PROBLEMS index ed3c174535..d247470f06 100644 --- a/src/lib/libssl/src/PROBLEMS +++ b/src/lib/libssl/src/PROBLEMS | |||
| @@ -36,7 +36,9 @@ may differ on your machine. | |||
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | As long as Apple doesn't fix the problem with ld, this problem building | 38 | As long as Apple doesn't fix the problem with ld, this problem building |
| 39 | OpenSSL will remain as is. | 39 | OpenSSL will remain as is. Well, the problem was addressed in 0.9.8f by |
| 40 | passing -Wl,-search_paths_first, but it's unknown if the flag was | ||
| 41 | supported from the initial MacOS X release. | ||
| 40 | 42 | ||
| 41 | 43 | ||
| 42 | * Parallell make leads to errors | 44 | * Parallell make leads to errors |
diff --git a/src/lib/libssl/src/README b/src/lib/libssl/src/README index c1d0a5fd52..898437989a 100644 --- a/src/lib/libssl/src/README +++ b/src/lib/libssl/src/README | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | 1 | ||
| 2 | OpenSSL 1.0.0a 1 Jun 2010 | 2 | OpenSSL 1.0.0e 6 Sep 2011 |
| 3 | 3 | ||
| 4 | Copyright (c) 1998-2010 The OpenSSL Project | 4 | Copyright (c) 1998-2011 The OpenSSL Project |
| 5 | Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson | 5 | Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson |
| 6 | All rights reserved. | 6 | All rights reserved. |
| 7 | 7 | ||
diff --git a/src/lib/libssl/src/VMS/install-vms.com b/src/lib/libssl/src/VMS/install-vms.com new file mode 100755 index 0000000000..7da8b2153b --- /dev/null +++ b/src/lib/libssl/src/VMS/install-vms.com | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | $! install-vms.com -- Installs the files in a given directory tree | ||
| 2 | $! | ||
| 3 | $! Author: Richard Levitte <richard@levitte.org> | ||
| 4 | $! Time of creation: 23-MAY-1998 19:22 | ||
| 5 | $! | ||
| 6 | $! P1 root of the directory tree | ||
| 7 | $! | ||
| 8 | $! | ||
| 9 | $! Announce/identify. | ||
| 10 | $! | ||
| 11 | $ proc = f$environment( "procedure") | ||
| 12 | $ write sys$output "@@@ "+ - | ||
| 13 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 14 | $! | ||
| 15 | $ on error then goto tidy | ||
| 16 | $ on control_c then goto tidy | ||
| 17 | $! | ||
| 18 | $ if p1 .eqs. "" | ||
| 19 | $ then | ||
| 20 | $ write sys$output "First argument missing." | ||
| 21 | $ write sys$output - | ||
| 22 | "Should be the directory where you want things installed." | ||
| 23 | $ exit | ||
| 24 | $ endif | ||
| 25 | $ | ||
| 26 | $ if (f$getsyi( "cpu") .lt. 128) | ||
| 27 | $ then | ||
| 28 | $ arch = "VAX" | ||
| 29 | $ else | ||
| 30 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
| 31 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 32 | $ endif | ||
| 33 | $ | ||
| 34 | $ root = f$parse( P1, "[]A.;0", , , "SYNTAX_ONLY, NO_CONCEAL")- "A.;0" | ||
| 35 | $ root_dev = f$parse( root, , , "device", "syntax_only") | ||
| 36 | $ root_dir = f$parse( root, , , "directory", "syntax_only") - - | ||
| 37 | "[000000." - "][" - "[" - "]" | ||
| 38 | $ root = root_dev + "[" + root_dir | ||
| 39 | $ | ||
| 40 | $ define /nolog wrk_sslroot 'root'.] /translation_attributes = concealed | ||
| 41 | $ define /nolog wrk_sslinclude wrk_sslroot:[include] | ||
| 42 | $ | ||
| 43 | $ if f$parse( "wrk_sslroot:[000000]") .eqs. "" then - | ||
| 44 | create /directory /log wrk_sslroot:[000000] | ||
| 45 | $ if f$parse( "wrk_sslinclude:") .eqs. "" then - | ||
| 46 | create /directory /log wrk_sslinclude: | ||
| 47 | $ if f$parse( "wrk_sslroot:[vms]") .eqs. "" then - | ||
| 48 | create /directory /log wrk_sslroot:[vms] | ||
| 49 | $! | ||
| 50 | $ copy /log /protection = world:re openssl_startup.com wrk_sslroot:[vms] | ||
| 51 | $ copy /log /protection = world:re openssl_undo.com wrk_sslroot:[vms] | ||
| 52 | $ copy /log /protection = world:re openssl_utils.com wrk_sslroot:[vms] | ||
| 53 | $! | ||
| 54 | $ tidy: | ||
| 55 | $! | ||
| 56 | $ call deass wrk_sslroot | ||
| 57 | $ call deass wrk_sslinclude | ||
| 58 | $! | ||
| 59 | $ exit | ||
| 60 | $! | ||
| 61 | $ deass: subroutine | ||
| 62 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
| 63 | $ then | ||
| 64 | $ deassign /process 'p1' | ||
| 65 | $ endif | ||
| 66 | $ endsubroutine | ||
| 67 | $! | ||
diff --git a/src/lib/libssl/src/VMS/mkshared.com b/src/lib/libssl/src/VMS/mkshared.com index c8acd2adeb..794e1de62a 100644 --- a/src/lib/libssl/src/VMS/mkshared.com +++ b/src/lib/libssl/src/VMS/mkshared.com | |||
| @@ -1,85 +1,162 @@ | |||
| 1 | $! MKSHARED.COM -- script to created shareable images on VMS | 1 | $! MKSHARED.COM -- Create shareable images. |
| 2 | $! | 2 | $! |
| 3 | $! No command line parameters. This should be run at the start of the source | 3 | $! P1: "64" for 64-bit pointers. |
| 4 | $! tree (the same directory where one finds INSTALL.VMS). | ||
| 5 | $! | 4 | $! |
| 6 | $! Input: [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB | 5 | $! P2: Zlib object library path (optional). |
| 7 | $! [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]LIBSSL.OLB | 6 | $! |
| 8 | $! Output: [.xxx.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE | 7 | $! Input: [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]SSL_LIBCRYPTO[32].OLB |
| 9 | $! [.xxx.EXE.SSL]LIBSSL.OPT,.MAP,.EXE | 8 | $! [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]SSL_LIBSSL[32].OLB |
| 9 | $! Output: [.xxx.EXE.CRYPTO]SSL_LIBCRYPTO_SHR[32].OPT,.MAP,.EXE | ||
| 10 | $! [.xxx.EXE.SSL]SSL_LIBSSL_SRH[32].OPT,.MAP,.EXE | ||
| 10 | $! | 11 | $! |
| 11 | $! So far, tests have only been made on VMS for Alpha. VAX will come in time. | 12 | $! So far, tests have only been made on VMS for Alpha. VAX will come in time. |
| 12 | $! =========================================================================== | 13 | $! =========================================================================== |
| 13 | $ | 14 | $! |
| 15 | $! Announce/identify. | ||
| 16 | $! | ||
| 17 | $ proc = f$environment( "procedure") | ||
| 18 | $ write sys$output "@@@ "+ - | ||
| 19 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 20 | $! | ||
| 21 | $! Save the original default device:[directory]. | ||
| 22 | $! | ||
| 23 | $ def_orig = f$environment( "default") | ||
| 24 | $ on error then goto tidy | ||
| 25 | $ on control_c then goto tidy | ||
| 26 | $! | ||
| 27 | $! SET DEFAULT to the main kit directory. | ||
| 28 | $! | ||
| 29 | $ proc = f$environment("procedure") | ||
| 30 | $ proc = f$parse( "A.;", proc)- "A.;" | ||
| 31 | $ set default 'proc' | ||
| 32 | $ set default [-] | ||
| 33 | $! | ||
| 14 | $! ----- Prepare info for processing: version number and file info | 34 | $! ----- Prepare info for processing: version number and file info |
| 15 | $ gosub read_version_info | 35 | $ gosub read_version_info |
| 16 | $ if libver .eqs. "" | 36 | $ if libver .eqs. "" |
| 17 | $ then | 37 | $ then |
| 18 | $ write sys$error "ERROR: Couldn't find any library version info..." | 38 | $ write sys$error "ERROR: Couldn't find any library version info..." |
| 19 | $ exit | 39 | $ go to tidy: |
| 20 | $ endif | 40 | $ endif |
| 21 | $ | 41 | $ |
| 22 | $ if (f$getsyi("cpu").lt.128) | 42 | $ if (f$getsyi("cpu") .lt. 128) |
| 23 | $ then | 43 | $ then |
| 24 | $ arch := VAX | 44 | $ arch_vax = 1 |
| 45 | $ arch = "VAX" | ||
| 25 | $ else | 46 | $ else |
| 26 | $ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 47 | $ arch_vax = 0 |
| 27 | $ if (arch .eqs. "") then arch = "UNK" | 48 | $ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 49 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 28 | $ endif | 50 | $ endif |
| 29 | $ | 51 | $! |
| 30 | $ if arch .nes. "VAX" | 52 | $ archd = arch |
| 53 | $ lib32 = "32" | ||
| 54 | $ shr = "SHR32" | ||
| 55 | $! | ||
| 56 | $ if (p1 .nes. "") | ||
| 31 | $ then | 57 | $ then |
| 32 | $ arch_vax = 0 | 58 | $ if (p1 .eqs. "64") |
| 59 | $ then | ||
| 60 | $ archd = arch+ "_64" | ||
| 61 | $ lib32 = "" | ||
| 62 | $ shr = "SHR" | ||
| 63 | $ else | ||
| 64 | $ if (p1 .nes. "32") | ||
| 65 | $ then | ||
| 66 | $ write sys$output "Second argument invalid." | ||
| 67 | $ write sys$output "It should be "32", "64", or nothing." | ||
| 68 | $ exit | ||
| 69 | $ endif | ||
| 70 | $ endif | ||
| 71 | $ endif | ||
| 72 | $! | ||
| 73 | $ ZLIB = p2 | ||
| 74 | $ zlib_lib = "" | ||
| 75 | $ if (ZLIB .nes. "") | ||
| 76 | $ then | ||
| 77 | $ file2 = f$parse( ZLIB, "libz.olb", , , "syntax_only") | ||
| 78 | $ if (f$search( file2) .eqs. "") | ||
| 79 | $ then | ||
| 80 | $ write sys$output "" | ||
| 81 | $ write sys$output "The Option ", ZLIB, " Is Invalid." | ||
| 82 | $ write sys$output " Can't find library: ''file2'" | ||
| 83 | $ write sys$output "" | ||
| 84 | $ goto tidy | ||
| 85 | $ endif | ||
| 86 | $ zlib_lib = ", ''file2' /library" | ||
| 87 | $ endif | ||
| 88 | $! | ||
| 89 | $ if (arch_vax) | ||
| 90 | $ then | ||
| 91 | $ libtit = "CRYPTO_TRANSFER_VECTOR" | ||
| 33 | $ libid = "Crypto" | 92 | $ libid = "Crypto" |
| 34 | $ libnum = "[.UTIL]LIBEAY.NUM" | 93 | $ libnum = "[.UTIL]LIBEAY.NUM" |
| 35 | $ libdir = "[.''ARCH'.EXE.CRYPTO]" | 94 | $ libdir = "[.''ARCHD'.EXE.CRYPTO]" |
| 36 | $ libolb = "''libdir'LIBCRYPTO.OLB" | 95 | $ libmar = "''libdir'SSL_LIBCRYPTO_''shr'.MAR" |
| 37 | $ libopt = "''libdir'LIBCRYPTO.OPT" | 96 | $ libolb = "''libdir'SSL_LIBCRYPTO''lib32'.OLB" |
| 38 | $ libmap = "''libdir'LIBCRYPTO.MAP" | 97 | $ libopt = "''libdir'SSL_LIBCRYPTO_''shr'.OPT" |
| 39 | $ libgoal= "''libdir'LIBCRYPTO.EXE" | 98 | $ libobj = "''libdir'SSL_LIBCRYPTO_''shr'.OBJ" |
| 99 | $ libmap = "''libdir'SSL_LIBCRYPTO_''shr'.MAP" | ||
| 100 | $ libgoal= "''libdir'SSL_LIBCRYPTO_''shr'.EXE" | ||
| 40 | $ libref = "" | 101 | $ libref = "" |
| 41 | $ gosub create_nonvax_shr | 102 | $ libvec = "LIBCRYPTO" |
| 103 | $ if f$search( libolb) .nes. "" then gosub create_vax_shr | ||
| 104 | $ libtit = "SSL_TRANSFER_VECTOR" | ||
| 42 | $ libid = "SSL" | 105 | $ libid = "SSL" |
| 43 | $ libnum = "[.UTIL]SSLEAY.NUM" | 106 | $ libnum = "[.UTIL]SSLEAY.NUM" |
| 44 | $ libdir = "[.''ARCH'.EXE.SSL]" | 107 | $ libdir = "[.''ARCHD'.EXE.SSL]" |
| 45 | $ libolb = "''libdir'LIBSSL.OLB" | 108 | $ libmar = "''libdir'SSL_LIBSSL_''shr'.MAR" |
| 46 | $ libopt = "''libdir'LIBSSL.OPT" | 109 | $ libolb = "''libdir'SSL_LIBSSL''lib32'.OLB" |
| 47 | $ libmap = "''libdir'LIBSSL.MAP" | 110 | $ libopt = "''libdir'SSL_LIBSSL_''shr'.OPT" |
| 48 | $ libgoal= "''libdir'LIBSSL.EXE" | 111 | $ libobj = "''libdir'SSL_LIBSSL_''shr'.OBJ" |
| 49 | $ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE" | 112 | $ libmap = "''libdir'SSL_LIBSSL_''shr'.MAP" |
| 50 | $ gosub create_nonvax_shr | 113 | $ libgoal= "''libdir'SSL_LIBSSL_''shr'.EXE" |
| 114 | $ libref = "[.''ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO_''shr'.EXE" | ||
| 115 | $ libvec = "LIBSSL" | ||
| 116 | $ if f$search( libolb) .nes. "" then gosub create_vax_shr | ||
| 51 | $ else | 117 | $ else |
| 52 | $ arch_vax = 1 | ||
| 53 | $ libtit = "CRYPTO_TRANSFER_VECTOR" | ||
| 54 | $ libid = "Crypto" | 118 | $ libid = "Crypto" |
| 55 | $ libnum = "[.UTIL]LIBEAY.NUM" | 119 | $ libnum = "[.UTIL]LIBEAY.NUM" |
| 56 | $ libdir = "[.''ARCH'.EXE.CRYPTO]" | 120 | $ libdir = "[.''ARCHD'.EXE.CRYPTO]" |
| 57 | $ libmar = "''libdir'LIBCRYPTO.MAR" | 121 | $ libolb = "''libdir'SSL_LIBCRYPTO''lib32'.OLB" |
| 58 | $ libolb = "''libdir'LIBCRYPTO.OLB" | 122 | $ libopt = "''libdir'SSL_LIBCRYPTO_''shr'.OPT" |
| 59 | $ libopt = "''libdir'LIBCRYPTO.OPT" | 123 | $ libmap = "''libdir'SSL_LIBCRYPTO_''shr'.MAP" |
| 60 | $ libobj = "''libdir'LIBCRYPTO.OBJ" | 124 | $ libgoal= "''libdir'SSL_LIBCRYPTO_''shr'.EXE" |
| 61 | $ libmap = "''libdir'LIBCRYPTO.MAP" | ||
| 62 | $ libgoal= "''libdir'LIBCRYPTO.EXE" | ||
| 63 | $ libref = "" | 125 | $ libref = "" |
| 64 | $ libvec = "LIBCRYPTO" | 126 | $ if f$search( libolb) .nes. "" then gosub create_nonvax_shr |
| 65 | $ gosub create_vax_shr | ||
| 66 | $ libtit = "SSL_TRANSFER_VECTOR" | ||
| 67 | $ libid = "SSL" | 127 | $ libid = "SSL" |
| 68 | $ libnum = "[.UTIL]SSLEAY.NUM" | 128 | $ libnum = "[.UTIL]SSLEAY.NUM" |
| 69 | $ libdir = "[.''ARCH'.EXE.SSL]" | 129 | $ libdir = "[.''ARCHD'.EXE.SSL]" |
| 70 | $ libmar = "''libdir'LIBSSL.MAR" | 130 | $ libolb = "''libdir'SSL_LIBSSL''lib32'.OLB" |
| 71 | $ libolb = "''libdir'LIBSSL.OLB" | 131 | $ libopt = "''libdir'SSL_LIBSSL_''shr'.OPT" |
| 72 | $ libopt = "''libdir'LIBSSL.OPT" | 132 | $ libmap = "''libdir'SSL_LIBSSL_''shr'.MAP" |
| 73 | $ libobj = "''libdir'LIBSSL.OBJ" | 133 | $ libgoal= "''libdir'SSL_LIBSSL_''shr'.EXE" |
| 74 | $ libmap = "''libdir'LIBSSL.MAP" | 134 | $ libref = "[.''ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO_''shr'.EXE" |
| 75 | $ libgoal= "''libdir'LIBSSL.EXE" | 135 | $ if f$search( libolb) .nes. "" then gosub create_nonvax_shr |
| 76 | $ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE" | ||
| 77 | $ libvec = "LIBSSL" | ||
| 78 | $ gosub create_vax_shr | ||
| 79 | $ endif | 136 | $ endif |
| 137 | $! | ||
| 138 | $ tidy: | ||
| 139 | $! | ||
| 140 | $! Close any open files. | ||
| 141 | $! | ||
| 142 | $ if (f$trnlnm( "libnum", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - | ||
| 143 | close libnum | ||
| 144 | $! | ||
| 145 | $ if (f$trnlnm( "mar", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - | ||
| 146 | close mar | ||
| 147 | $! | ||
| 148 | $ if (f$trnlnm( "opt", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - | ||
| 149 | close opt | ||
| 150 | $! | ||
| 151 | $ if (f$trnlnm( "vf", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - | ||
| 152 | close vf | ||
| 153 | $! | ||
| 154 | $! Restore the original default device:[directory]. | ||
| 155 | $! | ||
| 156 | $ set default 'def_orig' | ||
| 80 | $ exit | 157 | $ exit |
| 81 | $ | 158 | $ |
| 82 | $! ----- Soubroutines to build the shareable libraries | 159 | $! ----- Subroutines to build the shareable libraries |
| 83 | $! For each supported architecture, there's a main shareable library | 160 | $! For each supported architecture, there's a main shareable library |
| 84 | $! creator, which is called from the main code above. | 161 | $! creator, which is called from the main code above. |
| 85 | $! The creator will define a number of variables to tell the next levels of | 162 | $! The creator will define a number of variables to tell the next levels of |
| @@ -111,9 +188,9 @@ $! ----- Subroutines for non-VAX | |||
| 111 | $! ----- | 188 | $! ----- |
| 112 | $! The creator routine | 189 | $! The creator routine |
| 113 | $ create_nonvax_shr: | 190 | $ create_nonvax_shr: |
| 114 | $ open/write opt 'libopt' | 191 | $ open /write opt 'libopt' |
| 115 | $ write opt "identification=""",libid," ",libverstr,"""" | 192 | $ write opt "identification=""",libid," ",libverstr,"""" |
| 116 | $ write opt libolb,"/lib" | 193 | $ write opt libolb, " /library" |
| 117 | $ if libref .nes. "" then write opt libref,"/SHARE" | 194 | $ if libref .nes. "" then write opt libref,"/SHARE" |
| 118 | $ write opt "SYMBOL_VECTOR=(-" | 195 | $ write opt "SYMBOL_VECTOR=(-" |
| 119 | $ libfirstentry := true | 196 | $ libfirstentry := true |
| @@ -124,7 +201,8 @@ $ gosub read_func_num | |||
| 124 | $ write opt ")" | 201 | $ write opt ")" |
| 125 | $ write opt "GSMATCH=",libvmatch,",",libver | 202 | $ write opt "GSMATCH=",libvmatch,",",libver |
| 126 | $ close opt | 203 | $ close opt |
| 127 | $ link/map='libmap'/full/share='libgoal' 'libopt'/option | 204 | $ link /map = 'libmap' /full /share = 'libgoal' 'libopt' /options - |
| 205 | 'zlib_lib' | ||
| 128 | $ return | 206 | $ return |
| 129 | $ | 207 | $ |
| 130 | $! The record writer routine | 208 | $! The record writer routine |
| @@ -158,7 +236,7 @@ $! ----- Subroutines for VAX | |||
| 158 | $! ----- | 236 | $! ----- |
| 159 | $! The creator routine | 237 | $! The creator routine |
| 160 | $ create_vax_shr: | 238 | $ create_vax_shr: |
| 161 | $ open/write mar 'libmar' | 239 | $ open /write mar 'libmar' |
| 162 | $ type sys$input:/out=mar: | 240 | $ type sys$input:/out=mar: |
| 163 | ; | 241 | ; |
| 164 | ; Transfer vector for VAX shareable image | 242 | ; Transfer vector for VAX shareable image |
| @@ -193,10 +271,10 @@ $! libwriter := write_vax_vtransfer_entry | |||
| 193 | $! gosub read_func_num | 271 | $! gosub read_func_num |
| 194 | $ write mar " .END" | 272 | $ write mar " .END" |
| 195 | $ close mar | 273 | $ close mar |
| 196 | $ open/write opt 'libopt' | 274 | $ open /write opt 'libopt' |
| 197 | $ write opt "identification=""",libid," ",libverstr,"""" | 275 | $ write opt "identification=""",libid," ",libverstr,"""" |
| 198 | $ write opt libobj | 276 | $ write opt libobj |
| 199 | $ write opt libolb,"/lib" | 277 | $ write opt libolb, " /library" |
| 200 | $ if libref .nes. "" then write opt libref,"/SHARE" | 278 | $ if libref .nes. "" then write opt libref,"/SHARE" |
| 201 | $ type sys$input:/out=opt: | 279 | $ type sys$input:/out=opt: |
| 202 | ! | 280 | ! |
| @@ -215,7 +293,8 @@ $ libwriter := write_vax_psect_attr | |||
| 215 | $ gosub read_func_num | 293 | $ gosub read_func_num |
| 216 | $ close opt | 294 | $ close opt |
| 217 | $ macro/obj='libobj' 'libmar' | 295 | $ macro/obj='libobj' 'libmar' |
| 218 | $ link/map='libmap'/full/share='libgoal' 'libopt'/option | 296 | $ link /map = 'libmap' /full /share = 'libgoal' 'libopt' /options - |
| 297 | 'zlib_lib' | ||
| 219 | $ return | 298 | $ return |
| 220 | $ | 299 | $ |
| 221 | $! The record writer routine for VAX functions | 300 | $! The record writer routine for VAX functions |
| @@ -237,9 +316,9 @@ $ return | |||
| 237 | $ | 316 | $ |
| 238 | $! ----- Common subroutines | 317 | $! ----- Common subroutines |
| 239 | $! ----- | 318 | $! ----- |
| 240 | $! The .num file reader. This one has great responsability. | 319 | $! The .num file reader. This one has great responsibility. |
| 241 | $ read_func_num: | 320 | $ read_func_num: |
| 242 | $ open libnum 'libnum' | 321 | $ open /read libnum 'libnum' |
| 243 | $ goto read_nums | 322 | $ goto read_nums |
| 244 | $ | 323 | $ |
| 245 | $ read_nums: | 324 | $ read_nums: |
| @@ -247,27 +326,30 @@ $ libentrynum=0 | |||
| 247 | $ liblastentry:=false | 326 | $ liblastentry:=false |
| 248 | $ entrycount=0 | 327 | $ entrycount=0 |
| 249 | $ loop: | 328 | $ loop: |
| 250 | $ read/end=loop_end/err=loop_end libnum line | 329 | $ read /end=loop_end /err=loop_end libnum line |
| 251 | $ entrynum=f$int(f$element(1," ",f$edit(line,"COMPRESS,TRIM"))) | 330 | $ lin = f$edit( line, "COMPRESS,TRIM") |
| 252 | $ entryinfo=f$element(2," ",f$edit(line,"COMPRESS,TRIM")) | 331 | $! Skip a "#" comment line. |
| 253 | $ curentry=f$element(0," ",f$edit(line,"COMPRESS,TRIM")) | 332 | $ if (f$extract( 0, 1, lin) .eqs. "#") then goto loop |
| 254 | $ info_exist=f$element(0,":",entryinfo) | 333 | $ entrynum = f$int(f$element( 1, " ", lin)) |
| 255 | $ info_platforms=","+f$element(1,":",entryinfo)+"," | 334 | $ entryinfo = f$element( 2, " ", lin) |
| 256 | $ info_kind=f$element(2,":",entryinfo) | 335 | $ curentry = f$element( 0, " ", lin) |
| 257 | $ info_algorithms=","+f$element(3,":",entryinfo)+"," | 336 | $ info_exist = f$element( 0, ":", entryinfo) |
| 337 | $ info_platforms = ","+ f$element(1, ":", entryinfo)+ "," | ||
| 338 | $ info_kind = f$element( 2, ":", entryinfo) | ||
| 339 | $ info_algorithms = ","+ f$element( 3, ":", entryinfo)+ "," | ||
| 258 | $ if info_exist .eqs. "NOEXIST" then goto loop | 340 | $ if info_exist .eqs. "NOEXIST" then goto loop |
| 259 | $ truesum = 0 | 341 | $ truesum = 0 |
| 260 | $ falsesum = 0 | 342 | $ falsesum = 0 |
| 261 | $ negatives = 1 | 343 | $ negatives = 1 |
| 262 | $ plat_i = 0 | 344 | $ plat_i = 0 |
| 263 | $ loop1: | 345 | $ loop1: |
| 264 | $ plat_entry = f$element(plat_i,",",info_platforms) | 346 | $ plat_entry = f$element( plat_i, ",", info_platforms) |
| 265 | $ plat_i = plat_i + 1 | 347 | $ plat_i = plat_i + 1 |
| 266 | $ if plat_entry .eqs. "" then goto loop1 | 348 | $ if plat_entry .eqs. "" then goto loop1 |
| 267 | $ if plat_entry .nes. "," | 349 | $ if plat_entry .nes. "," |
| 268 | $ then | 350 | $ then |
| 269 | $ if f$extract(0,1,plat_entry) .nes. "!" then negatives = 0 | 351 | $ if f$extract(0,1,plat_entry) .nes. "!" then negatives = 0 |
| 270 | $ if f$getsyi("CPU") .lt. 128 | 352 | $ if (arch_vax) |
| 271 | $ then | 353 | $ then |
| 272 | $ if plat_entry .eqs. "EXPORT_VAR_AS_FUNCTION" then - | 354 | $ if plat_entry .eqs. "EXPORT_VAR_AS_FUNCTION" then - |
| 273 | $ truesum = truesum + 1 | 355 | $ truesum = truesum + 1 |
| @@ -276,6 +358,7 @@ $ falsesum = falsesum + 1 | |||
| 276 | $ endif | 358 | $ endif |
| 277 | $! | 359 | $! |
| 278 | $ if ((plat_entry .eqs. "VMS") .or. - | 360 | $ if ((plat_entry .eqs. "VMS") .or. - |
| 361 | ((plat_entry .eqs. "ZLIB") .and. (ZLIB .nes. "")) .or. - | ||
| 279 | (arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then - | 362 | (arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then - |
| 280 | truesum = truesum + 1 | 363 | truesum = truesum + 1 |
| 281 | $! | 364 | $! |
| @@ -345,7 +428,7 @@ $ | |||
| 345 | $! The version number reader | 428 | $! The version number reader |
| 346 | $ read_version_info: | 429 | $ read_version_info: |
| 347 | $ libver = "" | 430 | $ libver = "" |
| 348 | $ open/read vf [.CRYPTO]OPENSSLV.H | 431 | $ open /read vf [.CRYPTO]OPENSSLV.H |
| 349 | $ loop_rvi: | 432 | $ loop_rvi: |
| 350 | $ read/err=endloop_rvi/end=endloop_rvi vf rvi_line | 433 | $ read/err=endloop_rvi/end=endloop_rvi vf rvi_line |
| 351 | $ if rvi_line - "SHLIB_VERSION_NUMBER """ .eqs. rvi_line then - | 434 | $ if rvi_line - "SHLIB_VERSION_NUMBER """ .eqs. rvi_line then - |
diff --git a/src/lib/libssl/src/VMS/openssl_startup.com b/src/lib/libssl/src/VMS/openssl_startup.com new file mode 100755 index 0000000000..04bbbde886 --- /dev/null +++ b/src/lib/libssl/src/VMS/openssl_startup.com | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | $! | ||
| 2 | $! Startup file for OpenSSL 1.x. | ||
| 3 | $! | ||
| 4 | $! 2011-03-05 SMS. | ||
| 5 | $! | ||
| 6 | $! This procedure must reside in the OpenSSL installation directory. | ||
| 7 | $! It will fail if it is copied to a different location. | ||
| 8 | $! | ||
| 9 | $! P1 qualifier(s) for DEFINE. For example, "/SYSTEM" to get the | ||
| 10 | $! logical names defined in the system logical name table. | ||
| 11 | $! | ||
| 12 | $! P2 "64", to use executables which were built with 64-bit pointers. | ||
| 13 | $! | ||
| 14 | $! Good (default) and bad status values. | ||
| 15 | $! | ||
| 16 | $ status = %x00010001 ! RMS$_NORMAL, normal successful completion. | ||
| 17 | $ rms_e_fnf = %x00018292 ! RMS$_FNF, file not found. | ||
| 18 | $! | ||
| 19 | $! Prepare for problems. | ||
| 20 | $! | ||
| 21 | $ orig_dev_dir = f$environment( "DEFAULT") | ||
| 22 | $ on control_y then goto clean_up | ||
| 23 | $ on error then goto clean_up | ||
| 24 | $! | ||
| 25 | $! Determine hardware architecture. | ||
| 26 | $! | ||
| 27 | $ if (f$getsyi( "cpu") .lt. 128) | ||
| 28 | $ then | ||
| 29 | $ arch_name = "VAX" | ||
| 30 | $ else | ||
| 31 | $ arch_name = f$edit( f$getsyi( "arch_name"), "upcase") | ||
| 32 | $ if (arch_name .eqs. "") then arch_name = "UNK" | ||
| 33 | $ endif | ||
| 34 | $! | ||
| 35 | $ if (p2 .eqs. "64") | ||
| 36 | $ then | ||
| 37 | $ arch_name_exe = arch_name+ "_64" | ||
| 38 | $ else | ||
| 39 | $ arch_name_exe = arch_name | ||
| 40 | $ endif | ||
| 41 | $! | ||
| 42 | $! Derive the OpenSSL installation device:[directory] from the location | ||
| 43 | $! of this command procedure. | ||
| 44 | $! | ||
| 45 | $ proc = f$environment( "procedure") | ||
| 46 | $ proc_dev_dir = f$parse( "A.;", proc, , , "no_conceal") - "A.;" | ||
| 47 | $ proc_dev = f$parse( proc_dev_dir, , , "device", "syntax_only") | ||
| 48 | $ proc_dir = f$parse( proc_dev_dir, , , "directory", "syntax_only") - - | ||
| 49 | ".][000000"- "[000000."- "]["- "["- "]" | ||
| 50 | $ proc_dev_dir = proc_dev+ "["+ proc_dir+ "]" | ||
| 51 | $ set default 'proc_dev_dir' | ||
| 52 | $ set default [-] | ||
| 53 | $ ossl_dev_dir = f$environment( "default") | ||
| 54 | $! | ||
| 55 | $! Check existence of expected directories (to see if this procedure has | ||
| 56 | $! been moved away from its proper place). | ||
| 57 | $! | ||
| 58 | $ if ((f$search( "certs.dir;1") .eqs. "") .or. - | ||
| 59 | (f$search( "include.dir;1") .eqs. "") .or. - | ||
| 60 | (f$search( "private.dir;1") .eqs. "") .or. - | ||
| 61 | (f$search( "vms.dir;1") .eqs. "")) | ||
| 62 | $ then | ||
| 63 | $ write sys$output - | ||
| 64 | " Can't find expected common OpenSSL directories in:" | ||
| 65 | $ write sys$output " ''ossl_dev_dir'" | ||
| 66 | $ status = rms_e_fnf | ||
| 67 | $ goto clean_up | ||
| 68 | $ endif | ||
| 69 | $! | ||
| 70 | $ if ((f$search( "''arch_name_exe'_exe.dir;1") .eqs. "") .or. - | ||
| 71 | (f$search( "''arch_name'_lib.dir;1") .eqs. "")) | ||
| 72 | $ then | ||
| 73 | $ write sys$output - | ||
| 74 | " Can't find expected architecture-specific OpenSSL directories in:" | ||
| 75 | $ write sys$output " ''ossl_dev_dir'" | ||
| 76 | $ status = rms_e_fnf | ||
| 77 | $ goto clean_up | ||
| 78 | $ endif | ||
| 79 | $! | ||
| 80 | $! All seems well (enough). Define the OpenSSL logical names. | ||
| 81 | $! | ||
| 82 | $ ossl_root = ossl_dev_dir- "]"+ ".]" | ||
| 83 | $ define /translation_attributes = concealed /nolog'p1 SSLROOT 'ossl_root' | ||
| 84 | $ define /nolog 'p1' SSLCERTS sslroot:[certs] | ||
| 85 | $ define /nolog 'p1' SSLINCLUDE sslroot:[include] | ||
| 86 | $ define /nolog 'p1' SSLPRIVATE sslroot:[private] | ||
| 87 | $ define /nolog 'p1' SSLEXE sslroot:['arch_name_exe'_exe] | ||
| 88 | $ define /nolog 'p1' SSLLIB sslroot:['arch_name'_lib] | ||
| 89 | $! | ||
| 90 | $! Defining OPENSSL lets a C program use "#include <openssl/{foo}.h>": | ||
| 91 | $ define /nolog 'p1' OPENSSL SSLINCLUDE: | ||
| 92 | $! | ||
| 93 | $! Run a site-specific procedure, if it exists. | ||
| 94 | $! | ||
| 95 | $ if f$search( "sslroot:[vms]openssl_systartup.com") .nes."" then - | ||
| 96 | @ sslroot:[vms]openssl_systartup.com | ||
| 97 | $! | ||
| 98 | $! Restore the original default dev:[dir] (if known). | ||
| 99 | $! | ||
| 100 | $ clean_up: | ||
| 101 | $! | ||
| 102 | $ if (f$type( orig_dev_dir) .nes. "") | ||
| 103 | $ then | ||
| 104 | $ set default 'orig_dev_dir' | ||
| 105 | $ endif | ||
| 106 | $! | ||
| 107 | $ EXIT 'status' | ||
| 108 | $! | ||
diff --git a/src/lib/libssl/src/VMS/openssl_undo.com b/src/lib/libssl/src/VMS/openssl_undo.com new file mode 100755 index 0000000000..d1623a3160 --- /dev/null +++ b/src/lib/libssl/src/VMS/openssl_undo.com | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | $! | ||
| 2 | $! Deassign OpenSSL logical names. | ||
| 3 | $! | ||
| 4 | $ call deass "OPENSSL" "''p1'" | ||
| 5 | $ call deass "SSLCERTS" "''p1'" | ||
| 6 | $ call deass "SSLEXE" "''p1'" | ||
| 7 | $ call deass "SSLINCLUDE" "''p1'" | ||
| 8 | $ call deass "SSLLIB" "''p1'" | ||
| 9 | $ call deass "SSLPRIVATE" "''p1'" | ||
| 10 | $ call deass "SSLROOT" "''p1'" | ||
| 11 | $! | ||
| 12 | $ exit | ||
| 13 | $! | ||
| 14 | $deass: subroutine | ||
| 15 | $ if (f$trnlnm( p1) .nes. "") | ||
| 16 | $ then | ||
| 17 | $ deassign 'p2' 'p1' | ||
| 18 | $ endif | ||
| 19 | $ endsubroutine | ||
| 20 | $! | ||
diff --git a/src/lib/libssl/src/apps/CA.com b/src/lib/libssl/src/apps/CA.com index 69b7bb3fd8..2c0d465274 100644 --- a/src/lib/libssl/src/apps/CA.com +++ b/src/lib/libssl/src/apps/CA.com | |||
| @@ -37,14 +37,25 @@ $ VERIFY = openssl + " verify" | |||
| 37 | $ X509 = openssl + " x509" | 37 | $ X509 = openssl + " x509" |
| 38 | $ PKCS12 = openssl + " pkcs12" | 38 | $ PKCS12 = openssl + " pkcs12" |
| 39 | $ echo = "write sys$Output" | 39 | $ echo = "write sys$Output" |
| 40 | $ RET = 1 | ||
| 41 | $! | ||
| 42 | $! 2010-12-20 SMS. | ||
| 43 | $! Use a concealed logical name to reduce command line lengths, to | ||
| 44 | $! avoid DCL errors on VAX: | ||
| 45 | $! %DCL-W-TKNOVF, command element is too long - shorten | ||
| 46 | $! (Path segments like "openssl-1_0_1-stable-SNAP-20101217" accumulate | ||
| 47 | $! quickly.) | ||
| 48 | $! | ||
| 49 | $ CATOP = F$PARSE( F$ENVIRONMENT( "DEFAULT"), "[]")- "].;"+ ".demoCA.]" | ||
| 50 | $ define /translation_attributes = concealed CATOP 'CATOP' | ||
| 40 | $! | 51 | $! |
| 41 | $ s = F$PARSE(F$ENVIRONMENT("DEFAULT"),"[]") - "].;" | 52 | $ on error then goto clean_up |
| 42 | $ CATOP := 's'.demoCA | 53 | $ on control_y then goto clean_up |
| 43 | $ CAKEY := ]cakey.pem | 54 | $! |
| 44 | $ CACERT := ]cacert.pem | 55 | $ CAKEY = "CATOP:[private]cakey.pem" |
| 56 | $ CACERT = "CATOP:[000000]cacert.pem" | ||
| 45 | $ | 57 | $ |
| 46 | $ __INPUT := SYS$COMMAND | 58 | $ __INPUT := SYS$COMMAND |
| 47 | $ RET = 1 | ||
| 48 | $! | 59 | $! |
| 49 | $ i = 1 | 60 | $ i = 1 |
| 50 | $opt_loop: | 61 | $opt_loop: |
| @@ -55,7 +66,7 @@ $ | |||
| 55 | $ IF (prog_opt .EQS. "?" .OR. prog_opt .EQS. "-h" .OR. prog_opt .EQS. "-help") | 66 | $ IF (prog_opt .EQS. "?" .OR. prog_opt .EQS. "-h" .OR. prog_opt .EQS. "-help") |
| 56 | $ THEN | 67 | $ THEN |
| 57 | $ echo "usage: CA -newcert|-newreq|-newca|-sign|-verify" | 68 | $ echo "usage: CA -newcert|-newreq|-newca|-sign|-verify" |
| 58 | $ exit | 69 | $ goto clean_up |
| 59 | $ ENDIF | 70 | $ ENDIF |
| 60 | $! | 71 | $! |
| 61 | $ IF (prog_opt .EQS. "-input") | 72 | $ IF (prog_opt .EQS. "-input") |
| @@ -69,7 +80,7 @@ $! | |||
| 69 | $ IF (prog_opt .EQS. "-newcert") | 80 | $ IF (prog_opt .EQS. "-newcert") |
| 70 | $ THEN | 81 | $ THEN |
| 71 | $ ! Create a certificate. | 82 | $ ! Create a certificate. |
| 72 | $ DEFINE/USER SYS$INPUT '__INPUT' | 83 | $ DEFINE /USER_MODE SYS$INPUT '__INPUT' |
| 73 | $ REQ -new -x509 -keyout newreq.pem -out newreq.pem 'DAYS' | 84 | $ REQ -new -x509 -keyout newreq.pem -out newreq.pem 'DAYS' |
| 74 | $ RET=$STATUS | 85 | $ RET=$STATUS |
| 75 | $ echo "Certificate (and private key) is in newreq.pem" | 86 | $ echo "Certificate (and private key) is in newreq.pem" |
| @@ -79,7 +90,7 @@ $! | |||
| 79 | $ IF (prog_opt .EQS. "-newreq") | 90 | $ IF (prog_opt .EQS. "-newreq") |
| 80 | $ THEN | 91 | $ THEN |
| 81 | $ ! Create a certificate request | 92 | $ ! Create a certificate request |
| 82 | $ DEFINE/USER SYS$INPUT '__INPUT' | 93 | $ DEFINE /USER_MODE SYS$INPUT '__INPUT' |
| 83 | $ REQ -new -keyout newreq.pem -out newreq.pem 'DAYS' | 94 | $ REQ -new -keyout newreq.pem -out newreq.pem 'DAYS' |
| 84 | $ RET=$STATUS | 95 | $ RET=$STATUS |
| 85 | $ echo "Request (and private key) is in newreq.pem" | 96 | $ echo "Request (and private key) is in newreq.pem" |
| @@ -90,41 +101,40 @@ $ IF (prog_opt .EQS. "-newca") | |||
| 90 | $ THEN | 101 | $ THEN |
| 91 | $ ! If explicitly asked for or it doesn't exist then setup the directory | 102 | $ ! If explicitly asked for or it doesn't exist then setup the directory |
| 92 | $ ! structure that Eric likes to manage things. | 103 | $ ! structure that Eric likes to manage things. |
| 93 | $ IF F$SEARCH(CATOP+"]serial.") .EQS. "" | 104 | $ IF F$SEARCH( "CATOP:[000000]serial.") .EQS. "" |
| 94 | $ THEN | 105 | $ THEN |
| 95 | $ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'] | 106 | $ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[000000] |
| 96 | $ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.certs] | 107 | $ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[certs] |
| 97 | $ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.crl] | 108 | $ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[crl] |
| 98 | $ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.newcerts] | 109 | $ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[newcerts] |
| 99 | $ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.private] | 110 | $ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[private] |
| 100 | $ | 111 | $ |
| 101 | $ OPEN /WRITE ser_file 'CATOP']serial. | 112 | $ OPEN /WRITE ser_file CATOP:[000000]serial. |
| 102 | $ WRITE ser_file "01" | 113 | $ WRITE ser_file "01" |
| 103 | $ CLOSE ser_file | 114 | $ CLOSE ser_file |
| 104 | $ APPEND/NEW NL: 'CATOP']index.txt | 115 | $ APPEND /NEW_VERSION NL: CATOP:[000000]index.txt |
| 105 | $ | 116 | $ |
| 106 | $ ! The following is to make sure access() doesn't get confused. It | 117 | $ ! The following is to make sure access() doesn't get confused. It |
| 107 | $ ! really needs one file in the directory to give correct answers... | 118 | $ ! really needs one file in the directory to give correct answers... |
| 108 | $ COPY NLA0: 'CATOP'.certs].; | 119 | $ COPY NLA0: CATOP:[certs].; |
| 109 | $ COPY NLA0: 'CATOP'.crl].; | 120 | $ COPY NLA0: CATOP:[crl].; |
| 110 | $ COPY NLA0: 'CATOP'.newcerts].; | 121 | $ COPY NLA0: CATOP:[newcerts].; |
| 111 | $ COPY NLA0: 'CATOP'.private].; | 122 | $ COPY NLA0: CATOP:[private].; |
| 112 | $ ENDIF | 123 | $ ENDIF |
| 113 | $! | 124 | $! |
| 114 | $ IF F$SEARCH(CATOP+".private"+CAKEY) .EQS. "" | 125 | $ IF F$SEARCH( CAKEY) .EQS. "" |
| 115 | $ THEN | 126 | $ THEN |
| 116 | $ READ '__INPUT' FILE - | 127 | $ READ '__INPUT' FILE - |
| 117 | /PROMPT="CA certificate filename (or enter to create)" | 128 | /PROMPT="CA certificate filename (or enter to create): " |
| 118 | $ IF (FILE .NES. "") .AND. (F$SEARCH(FILE) .NES. "") | 129 | $ IF (FILE .NES. "") .AND. (F$SEARCH(FILE) .NES. "") |
| 119 | $ THEN | 130 | $ THEN |
| 120 | $ COPY 'FILE' 'CATOP'.private'CAKEY' | 131 | $ COPY 'FILE' 'CAKEY' |
| 121 | $ RET=$STATUS | 132 | $ RET=$STATUS |
| 122 | $ ELSE | 133 | $ ELSE |
| 123 | $ echo "Making CA certificate ..." | 134 | $ echo "Making CA certificate ..." |
| 124 | $ DEFINE/USER SYS$INPUT '__INPUT' | 135 | $ DEFINE /USER_MODE SYS$INPUT '__INPUT' |
| 125 | $ REQ -new -x509 -keyout 'CATOP'.private'CAKEY' - | 136 | $ REQ -new -x509 -keyout 'CAKEY' -out 'CACERT' 'DAYS' |
| 126 | -out 'CATOP''CACERT' 'DAYS' | 137 | $ RET=$STATUS |
| 127 | $ RET=$STATUS | ||
| 128 | $ ENDIF | 138 | $ ENDIF |
| 129 | $ ENDIF | 139 | $ ENDIF |
| 130 | $ GOTO opt_loop_continue | 140 | $ GOTO opt_loop_continue |
| @@ -135,16 +145,16 @@ $ THEN | |||
| 135 | $ i = i + 1 | 145 | $ i = i + 1 |
| 136 | $ cname = P'i' | 146 | $ cname = P'i' |
| 137 | $ IF cname .EQS. "" THEN cname = "My certificate" | 147 | $ IF cname .EQS. "" THEN cname = "My certificate" |
| 138 | $ PKCS12 -in newcert.pem -inkey newreq.pem -certfile 'CATOP''CACERT - | 148 | $ PKCS12 -in newcert.pem -inkey newreq.pem -certfile 'CACERT' - |
| 139 | -out newcert.p12 -export -name "''cname'" | 149 | -out newcert.p12 -export -name "''cname'" |
| 140 | $ RET=$STATUS | 150 | $ RET=$STATUS |
| 141 | $ exit RET | 151 | $ goto clean_up |
| 142 | $ ENDIF | 152 | $ ENDIF |
| 143 | $! | 153 | $! |
| 144 | $ IF (prog_opt .EQS. "-xsign") | 154 | $ IF (prog_opt .EQS. "-xsign") |
| 145 | $ THEN | 155 | $ THEN |
| 146 | $! | 156 | $! |
| 147 | $ DEFINE/USER SYS$INPUT '__INPUT' | 157 | $ DEFINE /USER_MODE SYS$INPUT '__INPUT' |
| 148 | $ CA -policy policy_anything -infiles newreq.pem | 158 | $ CA -policy policy_anything -infiles newreq.pem |
| 149 | $ RET=$STATUS | 159 | $ RET=$STATUS |
| 150 | $ GOTO opt_loop_continue | 160 | $ GOTO opt_loop_continue |
| @@ -153,7 +163,7 @@ $! | |||
| 153 | $ IF ((prog_opt .EQS. "-sign") .OR. (prog_opt .EQS. "-signreq")) | 163 | $ IF ((prog_opt .EQS. "-sign") .OR. (prog_opt .EQS. "-signreq")) |
| 154 | $ THEN | 164 | $ THEN |
| 155 | $! | 165 | $! |
| 156 | $ DEFINE/USER SYS$INPUT '__INPUT' | 166 | $ DEFINE /USER_MODE SYS$INPUT '__INPUT' |
| 157 | $ CA -policy policy_anything -out newcert.pem -infiles newreq.pem | 167 | $ CA -policy policy_anything -out newcert.pem -infiles newreq.pem |
| 158 | $ RET=$STATUS | 168 | $ RET=$STATUS |
| 159 | $ type newcert.pem | 169 | $ type newcert.pem |
| @@ -165,9 +175,9 @@ $ IF (prog_opt .EQS. "-signcert") | |||
| 165 | $ THEN | 175 | $ THEN |
| 166 | $! | 176 | $! |
| 167 | $ echo "Cert passphrase will be requested twice - bug?" | 177 | $ echo "Cert passphrase will be requested twice - bug?" |
| 168 | $ DEFINE/USER SYS$INPUT '__INPUT' | 178 | $ DEFINE /USER_MODE SYS$INPUT '__INPUT' |
| 169 | $ X509 -x509toreq -in newreq.pem -signkey newreq.pem -out tmp.pem | 179 | $ X509 -x509toreq -in newreq.pem -signkey newreq.pem -out tmp.pem |
| 170 | $ DEFINE/USER SYS$INPUT '__INPUT' | 180 | $ DEFINE /USER_MODE SYS$INPUT '__INPUT' |
| 171 | $ CA -policy policy_anything -out newcert.pem -infiles tmp.pem | 181 | $ CA -policy policy_anything -out newcert.pem -infiles tmp.pem |
| 172 | y | 182 | y |
| 173 | y | 183 | y |
| @@ -182,17 +192,17 @@ $! | |||
| 182 | $ i = i + 1 | 192 | $ i = i + 1 |
| 183 | $ IF (p'i' .EQS. "") | 193 | $ IF (p'i' .EQS. "") |
| 184 | $ THEN | 194 | $ THEN |
| 185 | $ DEFINE/USER SYS$INPUT '__INPUT' | 195 | $ DEFINE /USER_MODE SYS$INPUT '__INPUT' |
| 186 | $ VERIFY "-CAfile" 'CATOP''CACERT' newcert.pem | 196 | $ VERIFY "-CAfile" 'CACERT' newcert.pem |
| 187 | $ ELSE | 197 | $ ELSE |
| 188 | $ j = i | 198 | $ j = i |
| 189 | $ verify_opt_loop: | 199 | $ verify_opt_loop: |
| 190 | $ IF j .GT. 8 THEN GOTO verify_opt_loop_end | 200 | $ IF j .GT. 8 THEN GOTO verify_opt_loop_end |
| 191 | $ IF p'j' .NES. "" | 201 | $ IF p'j' .NES. "" |
| 192 | $ THEN | 202 | $ THEN |
| 193 | $ DEFINE/USER SYS$INPUT '__INPUT' | 203 | $ DEFINE /USER_MODE SYS$INPUT '__INPUT' |
| 194 | $ __tmp = p'j' | 204 | $ __tmp = p'j' |
| 195 | $ VERIFY "-CAfile" 'CATOP''CACERT' '__tmp' | 205 | $ VERIFY "-CAfile" 'CACERT' '__tmp' |
| 196 | $ tmp=$STATUS | 206 | $ tmp=$STATUS |
| 197 | $ IF tmp .NE. 0 THEN RET=tmp | 207 | $ IF tmp .NE. 0 THEN RET=tmp |
| 198 | $ ENDIF | 208 | $ ENDIF |
| @@ -208,8 +218,8 @@ $ IF (prog_opt .NES. "") | |||
| 208 | $ THEN | 218 | $ THEN |
| 209 | $! | 219 | $! |
| 210 | $ echo "Unknown argument ''prog_opt'" | 220 | $ echo "Unknown argument ''prog_opt'" |
| 211 | $ | 221 | $ RET = 3 |
| 212 | $ EXIT 3 | 222 | $ goto clean_up |
| 213 | $ ENDIF | 223 | $ ENDIF |
| 214 | $ | 224 | $ |
| 215 | $opt_loop_continue: | 225 | $opt_loop_continue: |
| @@ -217,4 +227,10 @@ $ i = i + 1 | |||
| 217 | $ GOTO opt_loop | 227 | $ GOTO opt_loop |
| 218 | $ | 228 | $ |
| 219 | $opt_loop_end: | 229 | $opt_loop_end: |
| 230 | $! | ||
| 231 | $clean_up: | ||
| 232 | $! | ||
| 233 | $ if f$trnlnm( "CATOP", "LNM$PROCESS") .nes. "" then - | ||
| 234 | deassign /process CATOP | ||
| 235 | $! | ||
| 220 | $ EXIT 'RET' | 236 | $ EXIT 'RET' |
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c index acc50df04e..feb7ed46e6 100644 --- a/src/lib/libssl/src/apps/apps.c +++ b/src/lib/libssl/src/apps/apps.c | |||
| @@ -257,6 +257,8 @@ int args_from_file(char *file, int *argc, char **argv[]) | |||
| 257 | 257 | ||
| 258 | int str2fmt(char *s) | 258 | int str2fmt(char *s) |
| 259 | { | 259 | { |
| 260 | if (s == NULL) | ||
| 261 | return FORMAT_UNDEF; | ||
| 260 | if ((*s == 'D') || (*s == 'd')) | 262 | if ((*s == 'D') || (*s == 'd')) |
| 261 | return(FORMAT_ASN1); | 263 | return(FORMAT_ASN1); |
| 262 | else if ((*s == 'T') || (*s == 't')) | 264 | else if ((*s == 'T') || (*s == 't')) |
| @@ -377,13 +379,12 @@ void program_name(char *in, char *out, int size) | |||
| 377 | 379 | ||
| 378 | int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[]) | 380 | int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[]) |
| 379 | { | 381 | { |
| 380 | int num,len,i; | 382 | int num,i; |
| 381 | char *p; | 383 | char *p; |
| 382 | 384 | ||
| 383 | *argc=0; | 385 | *argc=0; |
| 384 | *argv=NULL; | 386 | *argv=NULL; |
| 385 | 387 | ||
| 386 | len=strlen(buf); | ||
| 387 | i=0; | 388 | i=0; |
| 388 | if (arg->count == 0) | 389 | if (arg->count == 0) |
| 389 | { | 390 | { |
| @@ -797,7 +798,9 @@ X509 *load_cert(BIO *err, const char *file, int format, | |||
| 797 | if (file == NULL) | 798 | if (file == NULL) |
| 798 | { | 799 | { |
| 799 | #ifdef _IONBF | 800 | #ifdef _IONBF |
| 801 | # ifndef OPENSSL_NO_SETVBUF_IONBF | ||
| 800 | setvbuf(stdin, NULL, _IONBF, 0); | 802 | setvbuf(stdin, NULL, _IONBF, 0); |
| 803 | # endif /* ndef OPENSSL_NO_SETVBUF_IONBF */ | ||
| 801 | #endif | 804 | #endif |
| 802 | BIO_set_fp(cert,stdin,BIO_NOCLOSE); | 805 | BIO_set_fp(cert,stdin,BIO_NOCLOSE); |
| 803 | } | 806 | } |
| @@ -898,7 +901,9 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin, | |||
| 898 | if (file == NULL && maybe_stdin) | 901 | if (file == NULL && maybe_stdin) |
| 899 | { | 902 | { |
| 900 | #ifdef _IONBF | 903 | #ifdef _IONBF |
| 904 | # ifndef OPENSSL_NO_SETVBUF_IONBF | ||
| 901 | setvbuf(stdin, NULL, _IONBF, 0); | 905 | setvbuf(stdin, NULL, _IONBF, 0); |
| 906 | # endif /* ndef OPENSSL_NO_SETVBUF_IONBF */ | ||
| 902 | #endif | 907 | #endif |
| 903 | BIO_set_fp(key,stdin,BIO_NOCLOSE); | 908 | BIO_set_fp(key,stdin,BIO_NOCLOSE); |
| 904 | } | 909 | } |
| @@ -987,7 +992,9 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin, | |||
| 987 | if (file == NULL && maybe_stdin) | 992 | if (file == NULL && maybe_stdin) |
| 988 | { | 993 | { |
| 989 | #ifdef _IONBF | 994 | #ifdef _IONBF |
| 995 | # ifndef OPENSSL_NO_SETVBUF_IONBF | ||
| 990 | setvbuf(stdin, NULL, _IONBF, 0); | 996 | setvbuf(stdin, NULL, _IONBF, 0); |
| 997 | # endif /* ndef OPENSSL_NO_SETVBUF_IONBF */ | ||
| 991 | #endif | 998 | #endif |
| 992 | BIO_set_fp(key,stdin,BIO_NOCLOSE); | 999 | BIO_set_fp(key,stdin,BIO_NOCLOSE); |
| 993 | } | 1000 | } |
diff --git a/src/lib/libssl/src/apps/asn1pars.c b/src/lib/libssl/src/apps/asn1pars.c index b5d65e725b..0d6607071f 100644 --- a/src/lib/libssl/src/apps/asn1pars.c +++ b/src/lib/libssl/src/apps/asn1pars.c | |||
| @@ -408,6 +408,7 @@ static int do_generate(BIO *bio, char *genstr, char *genconf, BUF_MEM *buf) | |||
| 408 | 408 | ||
| 409 | atyp = ASN1_generate_nconf(genstr, cnf); | 409 | atyp = ASN1_generate_nconf(genstr, cnf); |
| 410 | NCONF_free(cnf); | 410 | NCONF_free(cnf); |
| 411 | cnf = NULL; | ||
| 411 | 412 | ||
| 412 | if (!atyp) | 413 | if (!atyp) |
| 413 | return -1; | 414 | return -1; |
diff --git a/src/lib/libssl/src/apps/dh.c b/src/lib/libssl/src/apps/dh.c index e9609d630d..dee9c01fce 100644 --- a/src/lib/libssl/src/apps/dh.c +++ b/src/lib/libssl/src/apps/dh.c | |||
| @@ -88,9 +88,6 @@ int MAIN(int, char **); | |||
| 88 | 88 | ||
| 89 | int MAIN(int argc, char **argv) | 89 | int MAIN(int argc, char **argv) |
| 90 | { | 90 | { |
| 91 | #ifndef OPENSSL_NO_ENGINE | ||
| 92 | ENGINE *e = NULL; | ||
| 93 | #endif | ||
| 94 | DH *dh=NULL; | 91 | DH *dh=NULL; |
| 95 | int i,badops=0,text=0; | 92 | int i,badops=0,text=0; |
| 96 | BIO *in=NULL,*out=NULL; | 93 | BIO *in=NULL,*out=NULL; |
| @@ -189,7 +186,7 @@ bad: | |||
| 189 | ERR_load_crypto_strings(); | 186 | ERR_load_crypto_strings(); |
| 190 | 187 | ||
| 191 | #ifndef OPENSSL_NO_ENGINE | 188 | #ifndef OPENSSL_NO_ENGINE |
| 192 | e = setup_engine(bio_err, engine, 0); | 189 | setup_engine(bio_err, engine, 0); |
| 193 | #endif | 190 | #endif |
| 194 | 191 | ||
| 195 | in=BIO_new(BIO_s_file()); | 192 | in=BIO_new(BIO_s_file()); |
diff --git a/src/lib/libssl/src/apps/dhparam.c b/src/lib/libssl/src/apps/dhparam.c index 5fab29eb87..b47097cbb2 100644 --- a/src/lib/libssl/src/apps/dhparam.c +++ b/src/lib/libssl/src/apps/dhparam.c | |||
| @@ -149,9 +149,6 @@ int MAIN(int, char **); | |||
| 149 | 149 | ||
| 150 | int MAIN(int argc, char **argv) | 150 | int MAIN(int argc, char **argv) |
| 151 | { | 151 | { |
| 152 | #ifndef OPENSSL_NO_ENGINE | ||
| 153 | ENGINE *e = NULL; | ||
| 154 | #endif | ||
| 155 | DH *dh=NULL; | 152 | DH *dh=NULL; |
| 156 | int i,badops=0,text=0; | 153 | int i,badops=0,text=0; |
| 157 | #ifndef OPENSSL_NO_DSA | 154 | #ifndef OPENSSL_NO_DSA |
| @@ -270,7 +267,7 @@ bad: | |||
| 270 | ERR_load_crypto_strings(); | 267 | ERR_load_crypto_strings(); |
| 271 | 268 | ||
| 272 | #ifndef OPENSSL_NO_ENGINE | 269 | #ifndef OPENSSL_NO_ENGINE |
| 273 | e = setup_engine(bio_err, engine, 0); | 270 | setup_engine(bio_err, engine, 0); |
| 274 | #endif | 271 | #endif |
| 275 | 272 | ||
| 276 | if (g && !num) | 273 | if (g && !num) |
diff --git a/src/lib/libssl/src/apps/dsaparam.c b/src/lib/libssl/src/apps/dsaparam.c index 4305a739b3..fe72c1d3df 100644 --- a/src/lib/libssl/src/apps/dsaparam.c +++ b/src/lib/libssl/src/apps/dsaparam.c | |||
| @@ -111,9 +111,6 @@ int MAIN(int, char **); | |||
| 111 | 111 | ||
| 112 | int MAIN(int argc, char **argv) | 112 | int MAIN(int argc, char **argv) |
| 113 | { | 113 | { |
| 114 | #ifndef OPENSSL_NO_ENGINE | ||
| 115 | ENGINE *e = NULL; | ||
| 116 | #endif | ||
| 117 | DSA *dsa=NULL; | 114 | DSA *dsa=NULL; |
| 118 | int i,badops=0,text=0; | 115 | int i,badops=0,text=0; |
| 119 | BIO *in=NULL,*out=NULL; | 116 | BIO *in=NULL,*out=NULL; |
| @@ -278,7 +275,7 @@ bad: | |||
| 278 | } | 275 | } |
| 279 | 276 | ||
| 280 | #ifndef OPENSSL_NO_ENGINE | 277 | #ifndef OPENSSL_NO_ENGINE |
| 281 | e = setup_engine(bio_err, engine, 0); | 278 | setup_engine(bio_err, engine, 0); |
| 282 | #endif | 279 | #endif |
| 283 | 280 | ||
| 284 | if (need_rand) | 281 | if (need_rand) |
| @@ -357,12 +354,10 @@ bad: | |||
| 357 | if (C) | 354 | if (C) |
| 358 | { | 355 | { |
| 359 | unsigned char *data; | 356 | unsigned char *data; |
| 360 | int l,len,bits_p,bits_q,bits_g; | 357 | int l,len,bits_p; |
| 361 | 358 | ||
| 362 | len=BN_num_bytes(dsa->p); | 359 | len=BN_num_bytes(dsa->p); |
| 363 | bits_p=BN_num_bits(dsa->p); | 360 | bits_p=BN_num_bits(dsa->p); |
| 364 | bits_q=BN_num_bits(dsa->q); | ||
| 365 | bits_g=BN_num_bits(dsa->g); | ||
| 366 | data=(unsigned char *)OPENSSL_malloc(len+20); | 361 | data=(unsigned char *)OPENSSL_malloc(len+20); |
| 367 | if (data == NULL) | 362 | if (data == NULL) |
| 368 | { | 363 | { |
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c index 3c2c91e920..076225c4cb 100644 --- a/src/lib/libssl/src/apps/enc.c +++ b/src/lib/libssl/src/apps/enc.c | |||
| @@ -101,9 +101,6 @@ int MAIN(int, char **); | |||
| 101 | 101 | ||
| 102 | int MAIN(int argc, char **argv) | 102 | int MAIN(int argc, char **argv) |
| 103 | { | 103 | { |
| 104 | #ifndef OPENSSL_NO_ENGINE | ||
| 105 | ENGINE *e = NULL; | ||
| 106 | #endif | ||
| 107 | static const char magic[]="Salted__"; | 104 | static const char magic[]="Salted__"; |
| 108 | char mbuf[sizeof magic-1]; | 105 | char mbuf[sizeof magic-1]; |
| 109 | char *strbuf=NULL; | 106 | char *strbuf=NULL; |
| @@ -328,7 +325,7 @@ bad: | |||
| 328 | } | 325 | } |
| 329 | 326 | ||
| 330 | #ifndef OPENSSL_NO_ENGINE | 327 | #ifndef OPENSSL_NO_ENGINE |
| 331 | e = setup_engine(bio_err, engine, 0); | 328 | setup_engine(bio_err, engine, 0); |
| 332 | #endif | 329 | #endif |
| 333 | 330 | ||
| 334 | if (md && (dgst=EVP_get_digestbyname(md)) == NULL) | 331 | if (md && (dgst=EVP_get_digestbyname(md)) == NULL) |
| @@ -396,8 +393,10 @@ bad: | |||
| 396 | 393 | ||
| 397 | if (inf == NULL) | 394 | if (inf == NULL) |
| 398 | { | 395 | { |
| 396 | #ifndef OPENSSL_NO_SETVBUF_IONBF | ||
| 399 | if (bufsize != NULL) | 397 | if (bufsize != NULL) |
| 400 | setvbuf(stdin, (char *)NULL, _IONBF, 0); | 398 | setvbuf(stdin, (char *)NULL, _IONBF, 0); |
| 399 | #endif /* ndef OPENSSL_NO_SETVBUF_IONBF */ | ||
| 401 | BIO_set_fp(in,stdin,BIO_NOCLOSE); | 400 | BIO_set_fp(in,stdin,BIO_NOCLOSE); |
| 402 | } | 401 | } |
| 403 | else | 402 | else |
| @@ -450,8 +449,10 @@ bad: | |||
| 450 | if (outf == NULL) | 449 | if (outf == NULL) |
| 451 | { | 450 | { |
| 452 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 451 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| 452 | #ifndef OPENSSL_NO_SETVBUF_IONBF | ||
| 453 | if (bufsize != NULL) | 453 | if (bufsize != NULL) |
| 454 | setvbuf(stdout, (char *)NULL, _IONBF, 0); | 454 | setvbuf(stdout, (char *)NULL, _IONBF, 0); |
| 455 | #endif /* ndef OPENSSL_NO_SETVBUF_IONBF */ | ||
| 455 | #ifdef OPENSSL_SYS_VMS | 456 | #ifdef OPENSSL_SYS_VMS |
| 456 | { | 457 | { |
| 457 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); | 458 | BIO *tmpbio = BIO_new(BIO_f_linebuffer()); |
diff --git a/src/lib/libssl/src/apps/gendh.c b/src/lib/libssl/src/apps/gendh.c index caa7327a10..4ec776ba93 100644 --- a/src/lib/libssl/src/apps/gendh.c +++ b/src/lib/libssl/src/apps/gendh.c | |||
| @@ -89,9 +89,6 @@ int MAIN(int, char **); | |||
| 89 | int MAIN(int argc, char **argv) | 89 | int MAIN(int argc, char **argv) |
| 90 | { | 90 | { |
| 91 | BN_GENCB cb; | 91 | BN_GENCB cb; |
| 92 | #ifndef OPENSSL_NO_ENGINE | ||
| 93 | ENGINE *e = NULL; | ||
| 94 | #endif | ||
| 95 | DH *dh=NULL; | 92 | DH *dh=NULL; |
| 96 | int ret=1,num=DEFBITS; | 93 | int ret=1,num=DEFBITS; |
| 97 | int g=2; | 94 | int g=2; |
| @@ -163,7 +160,7 @@ bad: | |||
| 163 | } | 160 | } |
| 164 | 161 | ||
| 165 | #ifndef OPENSSL_NO_ENGINE | 162 | #ifndef OPENSSL_NO_ENGINE |
| 166 | e = setup_engine(bio_err, engine, 0); | 163 | setup_engine(bio_err, engine, 0); |
| 167 | #endif | 164 | #endif |
| 168 | 165 | ||
| 169 | out=BIO_new(BIO_s_file()); | 166 | out=BIO_new(BIO_s_file()); |
diff --git a/src/lib/libssl/src/apps/gendsa.c b/src/lib/libssl/src/apps/gendsa.c index 22c39629e5..62ea977905 100644 --- a/src/lib/libssl/src/apps/gendsa.c +++ b/src/lib/libssl/src/apps/gendsa.c | |||
| @@ -78,9 +78,6 @@ int MAIN(int, char **); | |||
| 78 | 78 | ||
| 79 | int MAIN(int argc, char **argv) | 79 | int MAIN(int argc, char **argv) |
| 80 | { | 80 | { |
| 81 | #ifndef OPENSSL_NO_ENGINE | ||
| 82 | ENGINE *e = NULL; | ||
| 83 | #endif | ||
| 84 | DSA *dsa=NULL; | 81 | DSA *dsa=NULL; |
| 85 | int ret=1; | 82 | int ret=1; |
| 86 | char *outfile=NULL; | 83 | char *outfile=NULL; |
| @@ -206,7 +203,7 @@ bad: | |||
| 206 | } | 203 | } |
| 207 | 204 | ||
| 208 | #ifndef OPENSSL_NO_ENGINE | 205 | #ifndef OPENSSL_NO_ENGINE |
| 209 | e = setup_engine(bio_err, engine, 0); | 206 | setup_engine(bio_err, engine, 0); |
| 210 | #endif | 207 | #endif |
| 211 | 208 | ||
| 212 | if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) { | 209 | if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) { |
diff --git a/src/lib/libssl/src/apps/install-apps.com b/src/lib/libssl/src/apps/install-apps.com new file mode 100755 index 0000000000..7a553aa12e --- /dev/null +++ b/src/lib/libssl/src/apps/install-apps.com | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | $! INSTALL.COM -- Installs the files in a given directory tree | ||
| 2 | $! | ||
| 3 | $! Author: Richard Levitte <richard@levitte.org> | ||
| 4 | $! Time of creation: 22-MAY-1998 10:13 | ||
| 5 | $! | ||
| 6 | $! P1 root of the directory tree | ||
| 7 | $! P2 "64" for 64-bit pointers. | ||
| 8 | $! | ||
| 9 | $! | ||
| 10 | $! Announce/identify. | ||
| 11 | $! | ||
| 12 | $ proc = f$environment( "procedure") | ||
| 13 | $ write sys$output "@@@ "+ - | ||
| 14 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 15 | $! | ||
| 16 | $ on error then goto tidy | ||
| 17 | $ on control_c then goto tidy | ||
| 18 | $! | ||
| 19 | $ if (p1 .eqs. "") | ||
| 20 | $ then | ||
| 21 | $ write sys$output "First argument missing." | ||
| 22 | $ write sys$output - | ||
| 23 | "It should be the directory where you want things installed." | ||
| 24 | $ exit | ||
| 25 | $ endif | ||
| 26 | $! | ||
| 27 | $ if (f$getsyi("cpu") .lt. 128) | ||
| 28 | $ then | ||
| 29 | $ arch = "VAX" | ||
| 30 | $ else | ||
| 31 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
| 32 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 33 | $ endif | ||
| 34 | $! | ||
| 35 | $ archd = arch | ||
| 36 | $! | ||
| 37 | $ if (p2 .nes. "") | ||
| 38 | $ then | ||
| 39 | $ if (p2 .eqs. "64") | ||
| 40 | $ then | ||
| 41 | $ archd = arch+ "_64" | ||
| 42 | $ else | ||
| 43 | $ if (p2 .nes. "32") | ||
| 44 | $ then | ||
| 45 | $ write sys$output "Second argument invalid." | ||
| 46 | $ write sys$output "It should be "32", "64", or nothing." | ||
| 47 | $ exit | ||
| 48 | $ endif | ||
| 49 | $ endif | ||
| 50 | $ endif | ||
| 51 | $! | ||
| 52 | $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" | ||
| 53 | $ root_dev = f$parse(root,,,"device","syntax_only") | ||
| 54 | $ root_dir = f$parse(root,,,"directory","syntax_only") - - | ||
| 55 | "[000000." - "][" - "[" - "]" | ||
| 56 | $ root = root_dev + "[" + root_dir | ||
| 57 | $! | ||
| 58 | $ define /nolog wrk_sslroot 'root'.] /trans=conc | ||
| 59 | $ define /nolog wrk_sslxexe wrk_sslroot:['archd'_exe] | ||
| 60 | $! | ||
| 61 | $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - | ||
| 62 | create /directory /log wrk_sslroot:[000000] | ||
| 63 | $ if f$parse("wrk_sslxexe:") .eqs. "" then - | ||
| 64 | create /directory /log wrk_sslxexe: | ||
| 65 | $! | ||
| 66 | $ exe := openssl | ||
| 67 | $! | ||
| 68 | $ exe_dir := [-.'archd'.exe.apps] | ||
| 69 | $! | ||
| 70 | $! Executables. | ||
| 71 | $! | ||
| 72 | $ i = 0 | ||
| 73 | $ loop_exe: | ||
| 74 | $ e = f$edit(f$element( i, ",", exe), "trim") | ||
| 75 | $ i = i + 1 | ||
| 76 | $ if e .eqs. "," then goto loop_exe_end | ||
| 77 | $ set noon | ||
| 78 | $ file = exe_dir+ e+ ".exe" | ||
| 79 | $ if f$search( file) .nes. "" | ||
| 80 | $ then | ||
| 81 | $ copy /protection = w:re 'file' wrk_sslxexe: /log | ||
| 82 | $ endif | ||
| 83 | $ set on | ||
| 84 | $ goto loop_exe | ||
| 85 | $ loop_exe_end: | ||
| 86 | $! | ||
| 87 | $! Miscellaneous. | ||
| 88 | $! | ||
| 89 | $ set noon | ||
| 90 | $ copy /protection = w:re ca.com wrk_sslxexe:ca.com /log | ||
| 91 | $ copy /protection = w:re openssl-vms.cnf wrk_sslroot:[000000]openssl.cnf /log | ||
| 92 | $ set on | ||
| 93 | $! | ||
| 94 | $ tidy: | ||
| 95 | $! | ||
| 96 | $ call deass wrk_sslroot | ||
| 97 | $ call deass wrk_sslxexe | ||
| 98 | $! | ||
| 99 | $ exit | ||
| 100 | $! | ||
| 101 | $ deass: subroutine | ||
| 102 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
| 103 | $ then | ||
| 104 | $ deassign /process 'p1' | ||
| 105 | $ endif | ||
| 106 | $ endsubroutine | ||
| 107 | $! | ||
diff --git a/src/lib/libssl/src/apps/makeapps.com b/src/lib/libssl/src/apps/makeapps.com index 58f2865623..71417a86b0 100644 --- a/src/lib/libssl/src/apps/makeapps.com +++ b/src/lib/libssl/src/apps/makeapps.com | |||
| @@ -39,11 +39,35 @@ $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) | |||
| 39 | $! | 39 | $! |
| 40 | $! P5, if defined, sets a choice of programs to compile. | 40 | $! P5, if defined, sets a choice of programs to compile. |
| 41 | $! | 41 | $! |
| 42 | $! P6, if defined, specifies the C pointer size. Ignored on VAX. | ||
| 43 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) | ||
| 44 | $! Supported values are: | ||
| 45 | $! | ||
| 46 | $! "" Compile with default (/NOPOINTER_SIZE) | ||
| 47 | $! 32 Compile with /POINTER_SIZE=32 (SHORT) | ||
| 48 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]) | ||
| 49 | $! (Automatically select ARGV if compiler supports it.) | ||
| 50 | $! 64= Compile with /POINTER_SIZE=64 (LONG). | ||
| 51 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). | ||
| 52 | $! | ||
| 53 | $! P7, if defined, specifies a directory where ZLIB files (zlib.h, | ||
| 54 | $! libz.olb) may be found. Optionally, a non-default object library | ||
| 55 | $! name may be included ("dev:[dir]libz_64.olb", for example). | ||
| 56 | $! | ||
| 57 | $! | ||
| 58 | $! Announce/identify. | ||
| 59 | $! | ||
| 60 | $ proc = f$environment( "procedure") | ||
| 61 | $ write sys$output "@@@ "+ - | ||
| 62 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 63 | $! | ||
| 64 | $ on control_c then goto exit | ||
| 42 | $! | 65 | $! |
| 43 | $! Define A TCP/IP Library That We Will Need To Link To. | 66 | $! Define A TCP/IP Library That We Will Need To Link To. |
| 44 | $! (That Is, If We Need To Link To One.) | 67 | $! (That Is, If We Need To Link To One.) |
| 45 | $! | 68 | $! |
| 46 | $ TCPIP_LIB = "" | 69 | $ TCPIP_LIB = "" |
| 70 | $ ZLIB_LIB = "" | ||
| 47 | $! | 71 | $! |
| 48 | $! Check What Architecture We Are Using. | 72 | $! Check What Architecture We Are Using. |
| 49 | $! | 73 | $! |
| @@ -67,29 +91,45 @@ $! End The Architecture Check. | |||
| 67 | $! | 91 | $! |
| 68 | $ ENDIF | 92 | $ ENDIF |
| 69 | $! | 93 | $! |
| 94 | $ ARCHD = ARCH | ||
| 95 | $ LIB32 = "32" | ||
| 96 | $ OPT_FILE = "" | ||
| 97 | $ POINTER_SIZE = "" | ||
| 98 | $! | ||
| 70 | $! Define what programs should be compiled | 99 | $! Define what programs should be compiled |
| 71 | $! | 100 | $! |
| 72 | $ PROGRAMS := OPENSSL | 101 | $ PROGRAMS := OPENSSL |
| 73 | $! | 102 | $! |
| 103 | $! Check To Make Sure We Have Valid Command Line Parameters. | ||
| 104 | $! | ||
| 105 | $ GOSUB CHECK_OPTIONS | ||
| 106 | $! | ||
| 74 | $! Define The CRYPTO Library. | 107 | $! Define The CRYPTO Library. |
| 75 | $! | 108 | $! |
| 76 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB | 109 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB |
| 77 | $! | 110 | $! |
| 78 | $! Define The SSL Library. | 111 | $! Define The SSL Library. |
| 79 | $! | 112 | $! |
| 80 | $ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB | 113 | $ SSL_LIB := SYS$DISK:[-.'ARCHD'.EXE.SSL]SSL_LIBSSL'LIB32'.OLB |
| 81 | $! | 114 | $! |
| 82 | $! Define The OBJ Directory. | 115 | $! Define The OBJ and EXE Directories. |
| 83 | $! | 116 | $! |
| 84 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.APPS] | 117 | $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.APPS] |
| 118 | $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.APPS] | ||
| 85 | $! | 119 | $! |
| 86 | $! Define The EXE Directory. | 120 | $! Specify the destination directory in any /MAP option. |
| 87 | $! | 121 | $! |
| 88 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.APPS] | 122 | $ if (LINKMAP .eqs. "MAP") |
| 123 | $ then | ||
| 124 | $ LINKMAP = LINKMAP+ "=''EXE_DIR'" | ||
| 125 | $ endif | ||
| 89 | $! | 126 | $! |
| 90 | $! Check To Make Sure We Have Valid Command Line Parameters. | 127 | $! Add the location prefix to the linker options file name. |
| 91 | $! | 128 | $! |
| 92 | $ GOSUB CHECK_OPTIONS | 129 | $ if (OPT_FILE .nes. "") |
| 130 | $ then | ||
| 131 | $ OPT_FILE = EXE_DIR+ OPT_FILE | ||
| 132 | $ endif | ||
| 93 | $! | 133 | $! |
| 94 | $! Initialise logical names and such | 134 | $! Initialise logical names and such |
| 95 | $! | 135 | $! |
| @@ -97,7 +137,7 @@ $ GOSUB INITIALISE | |||
| 97 | $! | 137 | $! |
| 98 | $! Tell The User What Kind of Machine We Run On. | 138 | $! Tell The User What Kind of Machine We Run On. |
| 99 | $! | 139 | $! |
| 100 | $ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine." | 140 | $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" |
| 101 | $! | 141 | $! |
| 102 | $! Check To See If The OBJ Directory Exists. | 142 | $! Check To See If The OBJ Directory Exists. |
| 103 | $! | 143 | $! |
| @@ -145,6 +185,9 @@ $ LIB_OPENSSL = "VERIFY,ASN1PARS,REQ,DGST,DH,DHPARAM,ENC,PASSWD,GENDH,ERRSTR,"+- | |||
| 145 | "S_TIME,APPS,S_CB,S_SOCKET,APP_RAND,VERSION,SESS_ID,"+- | 185 | "S_TIME,APPS,S_CB,S_SOCKET,APP_RAND,VERSION,SESS_ID,"+- |
| 146 | "CIPHERS,NSEQ,PKCS12,PKCS8,PKEY,PKEYPARAM,PKEYUTL,"+ - | 186 | "CIPHERS,NSEQ,PKCS12,PKCS8,PKEY,PKEYPARAM,PKEYUTL,"+ - |
| 147 | "SPKAC,SMIME,CMS,RAND,ENGINE,OCSP,PRIME,TS" | 187 | "SPKAC,SMIME,CMS,RAND,ENGINE,OCSP,PRIME,TS" |
| 188 | $! | ||
| 189 | $ LIB_OPENSSL = LIB_OPENSSL+ ",VMS_DECC_INIT" | ||
| 190 | $! | ||
| 148 | $ TCPIP_PROGRAMS = ",," | 191 | $ TCPIP_PROGRAMS = ",," |
| 149 | $ IF COMPILER .EQS. "VAXC" THEN - | 192 | $ IF COMPILER .EQS. "VAXC" THEN - |
| 150 | TCPIP_PROGRAMS = ",OPENSSL," | 193 | TCPIP_PROGRAMS = ",OPENSSL," |
| @@ -202,7 +245,7 @@ $ LIB_COUNTER = -1 | |||
| 202 | $! | 245 | $! |
| 203 | $! Create a .OPT file for the object files | 246 | $! Create a .OPT file for the object files |
| 204 | $! | 247 | $! |
| 205 | $ OPEN/WRITE OBJECTS 'EXE_DIR''CURRENT_APP'.OPT | 248 | $ OPEN /WRITE OBJECTS 'EXE_DIR''CURRENT_APP'.OPT |
| 206 | $! | 249 | $! |
| 207 | $! Top Of The File Loop. | 250 | $! Top Of The File Loop. |
| 208 | $! | 251 | $! |
| @@ -289,34 +332,18 @@ $ GOTO NEXT_APP | |||
| 289 | $ ENDIF | 332 | $ ENDIF |
| 290 | $! | 333 | $! |
| 291 | $! Link The Program. | 334 | $! Link The Program. |
| 292 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | ||
| 293 | $! | 335 | $! |
| 294 | $ ON WARNING THEN GOTO NEXT_APP | 336 | $ ON WARNING THEN GOTO NEXT_APP |
| 295 | $! | 337 | $! |
| 296 | $ IF (TCPIP_LIB.NES."") | ||
| 297 | $ THEN | ||
| 298 | $! | ||
| 299 | $! Don't Link With The RSAREF Routines And TCP/IP Library. | 338 | $! Don't Link With The RSAREF Routines And TCP/IP Library. |
| 300 | $! | 339 | $! |
| 301 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | 340 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXE='EXE_FILE' - |
| 302 | 'EXE_DIR''CURRENT_APP'.OPT/OPTION, - | 341 | 'EXE_DIR''CURRENT_APP'.OPT /OPTIONS, - |
| 303 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, - | 342 | 'SSL_LIB' /LIBRARY, - |
| 304 | 'TCPIP_LIB','OPT_FILE'/OPTION | 343 | 'CRYPTO_LIB' /LIBRARY - |
| 305 | $! | 344 | 'TCPIP_LIB' - |
| 306 | $! Else... | 345 | 'ZLIB_LIB' - |
| 307 | $! | 346 | ,'OPT_FILE' /OPTIONS |
| 308 | $ ELSE | ||
| 309 | $! | ||
| 310 | $! Don't Link With The RSAREF Routines And Link With A TCP/IP Library. | ||
| 311 | $! | ||
| 312 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | ||
| 313 | 'EXE_DIR''CURRENT_APP'.OPT/OPTION, - | ||
| 314 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, - | ||
| 315 | 'OPT_FILE'/OPTION | ||
| 316 | $! | ||
| 317 | $! End The TCP/IP Library Check. | ||
| 318 | $! | ||
| 319 | $ ENDIF | ||
| 320 | $! | 347 | $! |
| 321 | $! Go Back And Do It Again. | 348 | $! Go Back And Do It Again. |
| 322 | $! | 349 | $! |
| @@ -351,7 +378,7 @@ $! | |||
| 351 | $ CREATE 'OPT_FILE' | 378 | $ CREATE 'OPT_FILE' |
| 352 | $DECK | 379 | $DECK |
| 353 | ! | 380 | ! |
| 354 | ! Default System Options File To Link Agianst | 381 | ! Default System Options File To Link Against |
| 355 | ! The Sharable VAX C Runtime Library. | 382 | ! The Sharable VAX C Runtime Library. |
| 356 | ! | 383 | ! |
| 357 | SYS$SHARE:VAXCRTL.EXE/SHARE | 384 | SYS$SHARE:VAXCRTL.EXE/SHARE |
| @@ -380,7 +407,7 @@ $! | |||
| 380 | $ CREATE 'OPT_FILE' | 407 | $ CREATE 'OPT_FILE' |
| 381 | $DECK | 408 | $DECK |
| 382 | ! | 409 | ! |
| 383 | ! Default System Options File To Link Agianst | 410 | ! Default System Options File To Link Against |
| 384 | ! The Sharable C Runtime Library. | 411 | ! The Sharable C Runtime Library. |
| 385 | ! | 412 | ! |
| 386 | GNU_CC:[000000]GCCLIB/LIBRARY | 413 | GNU_CC:[000000]GCCLIB/LIBRARY |
| @@ -415,7 +442,7 @@ $! | |||
| 415 | $ CREATE 'OPT_FILE' | 442 | $ CREATE 'OPT_FILE' |
| 416 | $DECK | 443 | $DECK |
| 417 | ! | 444 | ! |
| 418 | ! Default System Options File To Link Agianst | 445 | ! Default System Options File To Link Against |
| 419 | ! The Sharable DEC C Runtime Library. | 446 | ! The Sharable DEC C Runtime Library. |
| 420 | ! | 447 | ! |
| 421 | SYS$SHARE:DECC$SHR.EXE/SHARE | 448 | SYS$SHARE:DECC$SHR.EXE/SHARE |
| @@ -430,7 +457,7 @@ $! | |||
| 430 | $ CREATE 'OPT_FILE' | 457 | $ CREATE 'OPT_FILE' |
| 431 | $DECK | 458 | $DECK |
| 432 | ! | 459 | ! |
| 433 | ! Default System Options File For non-VAX To Link Agianst | 460 | ! Default System Options File For non-VAX To Link Against |
| 434 | ! The Sharable C Runtime Library. | 461 | ! The Sharable C Runtime Library. |
| 435 | ! | 462 | ! |
| 436 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE | 463 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE |
| @@ -514,14 +541,15 @@ $! | |||
| 514 | $ IF (P1.EQS."NODEBUG") | 541 | $ IF (P1.EQS."NODEBUG") |
| 515 | $ THEN | 542 | $ THEN |
| 516 | $! | 543 | $! |
| 517 | $! P1 Is NODEBUG, So Compile Without Debugger Information. | 544 | $! P1 Is NODEBUG, So Compile Without Debugger Information. |
| 518 | $! | 545 | $! |
| 519 | $ DEBUGGER = "NODEBUG" | 546 | $ DEBUGGER = "NODEBUG" |
| 520 | $ TRACEBACK = "NOTRACEBACK" | 547 | $ LINKMAP = "NOMAP" |
| 521 | $ GCC_OPTIMIZE = "OPTIMIZE" | 548 | $ TRACEBACK = "NOTRACEBACK" |
| 522 | $ CC_OPTIMIZE = "OPTIMIZE" | 549 | $ GCC_OPTIMIZE = "OPTIMIZE" |
| 523 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | 550 | $ CC_OPTIMIZE = "OPTIMIZE" |
| 524 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | 551 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
| 552 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
| 525 | $! | 553 | $! |
| 526 | $! Else... | 554 | $! Else... |
| 527 | $! | 555 | $! |
| @@ -535,6 +563,7 @@ $! | |||
| 535 | $! Compile With Debugger Information. | 563 | $! Compile With Debugger Information. |
| 536 | $! | 564 | $! |
| 537 | $ DEBUGGER = "DEBUG" | 565 | $ DEBUGGER = "DEBUG" |
| 566 | $ LINKMAP = "MAP" | ||
| 538 | $ TRACEBACK = "TRACEBACK" | 567 | $ TRACEBACK = "TRACEBACK" |
| 539 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | 568 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
| 540 | $ CC_OPTIMIZE = "NOOPTIMIZE" | 569 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
| @@ -542,7 +571,7 @@ $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." | |||
| 542 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." | 571 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." |
| 543 | $ ELSE | 572 | $ ELSE |
| 544 | $! | 573 | $! |
| 545 | $! Tell The User Entered An Invalid Option.. | 574 | $! Tell The User Entered An Invalid Option. |
| 546 | $! | 575 | $! |
| 547 | $ WRITE SYS$OUTPUT "" | 576 | $ WRITE SYS$OUTPUT "" |
| 548 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" | 577 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" |
| @@ -563,6 +592,87 @@ $! End The P1 Check. | |||
| 563 | $! | 592 | $! |
| 564 | $ ENDIF | 593 | $ ENDIF |
| 565 | $! | 594 | $! |
| 595 | $! Check P6 (POINTER_SIZE). | ||
| 596 | $! | ||
| 597 | $ IF (P6 .NES. "") .AND. (ARCH .NES. "VAX") | ||
| 598 | $ THEN | ||
| 599 | $! | ||
| 600 | $ IF (P6 .EQS. "32") | ||
| 601 | $ THEN | ||
| 602 | $ POINTER_SIZE = " /POINTER_SIZE=32" | ||
| 603 | $ ELSE | ||
| 604 | $ POINTER_SIZE = F$EDIT( P6, "COLLAPSE, UPCASE") | ||
| 605 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
| 606 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
| 607 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
| 608 | $ THEN | ||
| 609 | $ ARCHD = ARCH+ "_64" | ||
| 610 | $ LIB32 = "" | ||
| 611 | $ IF (F$EXTRACT( 2, 1, POINTER_SIZE) .EQS. "=") | ||
| 612 | $ THEN | ||
| 613 | $! Explicit user choice: "64" or "64=ARGV". | ||
| 614 | $ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64" | ||
| 615 | $ ELSE | ||
| 616 | $ SET NOON | ||
| 617 | $ DEFINE /USER_MODE SYS$OUTPUT NL: | ||
| 618 | $ DEFINE /USER_MODE SYS$ERROR NL: | ||
| 619 | $ CC /NOLIST /NOOBJECT /POINTER_SIZE=64=ARGV NL: | ||
| 620 | $ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000 | ||
| 621 | $ THEN | ||
| 622 | $ ! If we got here, it means DCL complained like this: | ||
| 623 | $ ! %DCL-W-NOVALU, value not allowed - remove value specification | ||
| 624 | $ ! \64=\ | ||
| 625 | $ ! | ||
| 626 | $ ! If the compiler was run, logicals defined in /USER would | ||
| 627 | $ ! have been deassigned automatically. However, when DCL | ||
| 628 | $ ! complains, they aren't, so we do it here (it might be | ||
| 629 | $ ! unnecessary, but just in case there will be another error | ||
| 630 | $ ! message further on that we don't want to miss) | ||
| 631 | $ DEASSIGN /USER_MODE SYS$ERROR | ||
| 632 | $ DEASSIGN /USER_MODE SYS$OUTPUT | ||
| 633 | $ ELSE | ||
| 634 | $ POINTER_SIZE = POINTER_SIZE + "=ARGV" | ||
| 635 | $ ENDIF | ||
| 636 | $ SET ON | ||
| 637 | $ ENDIF | ||
| 638 | $ POINTER_SIZE = " /POINTER_SIZE=''POINTER_SIZE'" | ||
| 639 | $! | ||
| 640 | $ ELSE | ||
| 641 | $! | ||
| 642 | $! Tell The User Entered An Invalid Option. | ||
| 643 | $! | ||
| 644 | $ WRITE SYS$OUTPUT "" | ||
| 645 | $ WRITE SYS$OUTPUT "The Option ", P6, - | ||
| 646 | " Is Invalid. The Valid Options Are:" | ||
| 647 | $ WRITE SYS$OUTPUT "" | ||
| 648 | $ WRITE SYS$OUTPUT - | ||
| 649 | " """" : Compile with default (short) pointers." | ||
| 650 | $ WRITE SYS$OUTPUT - | ||
| 651 | " 32 : Compile with 32-bit (short) pointers." | ||
| 652 | $ WRITE SYS$OUTPUT - | ||
| 653 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
| 654 | $ WRITE SYS$OUTPUT - | ||
| 655 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
| 656 | $ WRITE SYS$OUTPUT - | ||
| 657 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
| 658 | $ WRITE SYS$OUTPUT "" | ||
| 659 | $! | ||
| 660 | $! Time To EXIT. | ||
| 661 | $! | ||
| 662 | $ EXIT | ||
| 663 | $! | ||
| 664 | $ ENDIF | ||
| 665 | $! | ||
| 666 | $ ENDIF | ||
| 667 | $! | ||
| 668 | $! End The P6 (POINTER_SIZE) Check. | ||
| 669 | $! | ||
| 670 | $ ENDIF | ||
| 671 | $! | ||
| 672 | $! Set basic C compiler /INCLUDE directories. | ||
| 673 | $! | ||
| 674 | $ CC_INCLUDES = "SYS$DISK:[-],SYS$DISK:[-.CRYPTO]" | ||
| 675 | $! | ||
| 566 | $! Check To See If P2 Is Blank. | 676 | $! Check To See If P2 Is Blank. |
| 567 | $! | 677 | $! |
| 568 | $ IF (P2.EQS."") | 678 | $ IF (P2.EQS."") |
| @@ -663,11 +773,64 @@ $ CCDEFS = "MONOLITH" | |||
| 663 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 773 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
| 664 | $ CCEXTRAFLAGS = "" | 774 | $ CCEXTRAFLAGS = "" |
| 665 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 775 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
| 666 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" | 776 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" |
| 667 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 777 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
| 668 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | 778 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
| 669 | $! | 779 | $! |
| 670 | $! Check To See If The User Entered A Valid Paramter. | 780 | $! Check To See If We Have A ZLIB Option. |
| 781 | $! | ||
| 782 | $ ZLIB = P7 | ||
| 783 | $ IF (ZLIB .NES. "") | ||
| 784 | $ THEN | ||
| 785 | $! | ||
| 786 | $! Check for expected ZLIB files. | ||
| 787 | $! | ||
| 788 | $ err = 0 | ||
| 789 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
| 790 | $ if (f$search( file1) .eqs. "") | ||
| 791 | $ then | ||
| 792 | $ WRITE SYS$OUTPUT "" | ||
| 793 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 794 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
| 795 | $ err = 1 | ||
| 796 | $ endif | ||
| 797 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" | ||
| 798 | $! | ||
| 799 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
| 800 | $ if (f$search( file2) .eqs. "") | ||
| 801 | $ then | ||
| 802 | $ if (err .eq. 0) | ||
| 803 | $ then | ||
| 804 | $ WRITE SYS$OUTPUT "" | ||
| 805 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 806 | $ endif | ||
| 807 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
| 808 | $ WRITE SYS$OUTPUT "" | ||
| 809 | $ err = err+ 2 | ||
| 810 | $ endif | ||
| 811 | $ if (err .eq. 1) | ||
| 812 | $ then | ||
| 813 | $ WRITE SYS$OUTPUT "" | ||
| 814 | $ endif | ||
| 815 | $! | ||
| 816 | $ if (err .ne. 0) | ||
| 817 | $ then | ||
| 818 | $ EXIT | ||
| 819 | $ endif | ||
| 820 | $! | ||
| 821 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS | ||
| 822 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 | ||
| 823 | $ ZLIB_LIB = ", ''file2' /library" | ||
| 824 | $! | ||
| 825 | $! Print info | ||
| 826 | $! | ||
| 827 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
| 828 | $! | ||
| 829 | $! End The ZLIB Check. | ||
| 830 | $! | ||
| 831 | $ ENDIF | ||
| 832 | $! | ||
| 833 | $! Check To See If The User Entered A Valid Parameter. | ||
| 671 | $! | 834 | $! |
| 672 | $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC") | 835 | $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC") |
| 673 | $ THEN | 836 | $ THEN |
| @@ -690,13 +853,13 @@ $! | |||
| 690 | $ CC = "CC" | 853 | $ CC = "CC" |
| 691 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 854 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 692 | THEN CC = "CC/DECC" | 855 | THEN CC = "CC/DECC" |
| 693 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | 856 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
| 694 | "/NOLIST/PREFIX=ALL" + - | 857 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
| 695 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 858 | " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS |
| 696 | $! | 859 | $! |
| 697 | $! Define The Linker Options File Name. | 860 | $! Define The Linker Options File Name. |
| 698 | $! | 861 | $! |
| 699 | $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" | 862 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
| 700 | $! | 863 | $! |
| 701 | $! End DECC Check. | 864 | $! End DECC Check. |
| 702 | $! | 865 | $! |
| @@ -724,7 +887,7 @@ $ EXIT | |||
| 724 | $ ENDIF | 887 | $ ENDIF |
| 725 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | 888 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" |
| 726 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 889 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 727 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 890 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 728 | $ CCDEFS = CCDEFS + ",""VAXC""" | 891 | $ CCDEFS = CCDEFS + ",""VAXC""" |
| 729 | $! | 892 | $! |
| 730 | $! Define <sys> As SYS$COMMON:[SYSLIB] | 893 | $! Define <sys> As SYS$COMMON:[SYSLIB] |
| @@ -733,7 +896,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] | |||
| 733 | $! | 896 | $! |
| 734 | $! Define The Linker Options File Name. | 897 | $! Define The Linker Options File Name. |
| 735 | $! | 898 | $! |
| 736 | $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" | 899 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
| 737 | $! | 900 | $! |
| 738 | $! End VAXC Check | 901 | $! End VAXC Check |
| 739 | $! | 902 | $! |
| @@ -756,11 +919,11 @@ $! Use GNU C... | |||
| 756 | $! | 919 | $! |
| 757 | $ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC | 920 | $ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC |
| 758 | $ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 921 | $ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 759 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 922 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 760 | $! | 923 | $! |
| 761 | $! Define The Linker Options File Name. | 924 | $! Define The Linker Options File Name. |
| 762 | $! | 925 | $! |
| 763 | $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" | 926 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
| 764 | $! | 927 | $! |
| 765 | $! End The GNU C Check. | 928 | $! End The GNU C Check. |
| 766 | $! | 929 | $! |
| @@ -802,7 +965,7 @@ $ THEN | |||
| 802 | $! | 965 | $! |
| 803 | $! Set the library to use SOCKETSHR | 966 | $! Set the library to use SOCKETSHR |
| 804 | $! | 967 | $! |
| 805 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" | 968 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
| 806 | $! | 969 | $! |
| 807 | $! Done with SOCKETSHR | 970 | $! Done with SOCKETSHR |
| 808 | $! | 971 | $! |
| @@ -828,13 +991,13 @@ $ THEN | |||
| 828 | $! | 991 | $! |
| 829 | $! Set the library to use UCX. | 992 | $! Set the library to use UCX. |
| 830 | $! | 993 | $! |
| 831 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" | 994 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
| 832 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 995 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
| 833 | $ THEN | 996 | $ THEN |
| 834 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" | 997 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
| 835 | $ ELSE | 998 | $ ELSE |
| 836 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 999 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
| 837 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT" | 1000 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
| 838 | $ ENDIF | 1001 | $ ENDIF |
| 839 | $! | 1002 | $! |
| 840 | $! Done with UCX | 1003 | $! Done with UCX |
| @@ -848,7 +1011,7 @@ $ THEN | |||
| 848 | $! | 1011 | $! |
| 849 | $! Set the library to use TCPIP. | 1012 | $! Set the library to use TCPIP. |
| 850 | $! | 1013 | $! |
| 851 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" | 1014 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
| 852 | $! | 1015 | $! |
| 853 | $! Done with TCPIP | 1016 | $! Done with TCPIP |
| 854 | $! | 1017 | $! |
| @@ -873,7 +1036,7 @@ $ CCDEFS = CCDEFS + ",TCPIP_TYPE_''P3'" | |||
| 873 | $! | 1036 | $! |
| 874 | $! Print info | 1037 | $! Print info |
| 875 | $! | 1038 | $! |
| 876 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 1039 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
| 877 | $! | 1040 | $! |
| 878 | $! Else The User Entered An Invalid Argument. | 1041 | $! Else The User Entered An Invalid Argument. |
| 879 | $! | 1042 | $! |
| @@ -903,13 +1066,13 @@ $ IF COMPILER .EQS. "DECC" | |||
| 903 | $ THEN | 1066 | $ THEN |
| 904 | $ IF CCDISABLEWARNINGS .NES. "" | 1067 | $ IF CCDISABLEWARNINGS .NES. "" |
| 905 | $ THEN | 1068 | $ THEN |
| 906 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | 1069 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
| 907 | $ ENDIF | 1070 | $ ENDIF |
| 908 | $ ELSE | 1071 | $ ELSE |
| 909 | $ CCDISABLEWARNINGS = "" | 1072 | $ CCDISABLEWARNINGS = "" |
| 910 | $ ENDIF | 1073 | $ ENDIF |
| 911 | $ CC2 = CC + "/DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS | 1074 | $ CC2 = CC + " /DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS |
| 912 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 1075 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
| 913 | $! | 1076 | $! |
| 914 | $! Show user the result | 1077 | $! Show user the result |
| 915 | $! | 1078 | $! |
| @@ -975,7 +1138,7 @@ $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" | |||
| 975 | $! | 1138 | $! |
| 976 | $! Set up the logical name OPENSSL to point at the include directory | 1139 | $! Set up the logical name OPENSSL to point at the include directory |
| 977 | $! | 1140 | $! |
| 978 | $ DEFINE OPENSSL/NOLOG '__INCLUDE' | 1141 | $ DEFINE OPENSSL /NOLOG '__INCLUDE' |
| 979 | $! | 1142 | $! |
| 980 | $! Done | 1143 | $! Done |
| 981 | $! | 1144 | $! |
| @@ -983,15 +1146,24 @@ $ RETURN | |||
| 983 | $! | 1146 | $! |
| 984 | $ CLEANUP: | 1147 | $ CLEANUP: |
| 985 | $! | 1148 | $! |
| 986 | $! Restore the logical name OPENSSL if it had a value | 1149 | $! Restore the saved logical name OPENSSL, if it had a value. |
| 987 | $! | 1150 | $! |
| 988 | $ IF __SAVE_OPENSSL .EQS. "" | 1151 | $ if (f$type( __SAVE_OPENSSL) .nes. "") |
| 989 | $ THEN | 1152 | $ then |
| 990 | $ DEASSIGN OPENSSL | 1153 | $ IF __SAVE_OPENSSL .EQS. "" |
| 991 | $ ELSE | 1154 | $ THEN |
| 992 | $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL' | 1155 | $ DEASSIGN OPENSSL |
| 993 | $ ENDIF | 1156 | $ ELSE |
| 1157 | $ DEFINE /NOLOG OPENSSL '__SAVE_OPENSSL' | ||
| 1158 | $ ENDIF | ||
| 1159 | $ endif | ||
| 1160 | $! | ||
| 1161 | $! Close any open files. | ||
| 1162 | $! | ||
| 1163 | $ if (f$trnlnm( "objects", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - | ||
| 1164 | close objects | ||
| 994 | $! | 1165 | $! |
| 995 | $! Done | 1166 | $! Done |
| 996 | $! | 1167 | $! |
| 997 | $ RETURN | 1168 | $ RETURN |
| 1169 | $! | ||
diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c index 851e639735..dab057bbff 100644 --- a/src/lib/libssl/src/apps/openssl.c +++ b/src/lib/libssl/src/apps/openssl.c | |||
| @@ -212,8 +212,13 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line) | |||
| 212 | } | 212 | } |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | #if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64) | ||
| 216 | # define ARGV _Argv | ||
| 217 | #else | ||
| 218 | # define ARGV Argv | ||
| 219 | #endif | ||
| 215 | 220 | ||
| 216 | int main(int Argc, char *Argv[]) | 221 | int main(int Argc, char *ARGV[]) |
| 217 | { | 222 | { |
| 218 | ARGS arg; | 223 | ARGS arg; |
| 219 | #define PROG_NAME_SIZE 39 | 224 | #define PROG_NAME_SIZE 39 |
| @@ -227,7 +232,55 @@ int main(int Argc, char *Argv[]) | |||
| 227 | char **argv,*p; | 232 | char **argv,*p; |
| 228 | LHASH_OF(FUNCTION) *prog=NULL; | 233 | LHASH_OF(FUNCTION) *prog=NULL; |
| 229 | long errline; | 234 | long errline; |
| 230 | 235 | ||
| 236 | #if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64) | ||
| 237 | /* 2011-03-22 SMS. | ||
| 238 | * If we have 32-bit pointers everywhere, then we're safe, and | ||
| 239 | * we bypass this mess, as on non-VMS systems. (See ARGV, | ||
| 240 | * above.) | ||
| 241 | * Problem 1: Compaq/HP C before V7.3 always used 32-bit | ||
| 242 | * pointers for argv[]. | ||
| 243 | * Fix 1: For a 32-bit argv[], when we're using 64-bit pointers | ||
| 244 | * everywhere else, we always allocate and use a 64-bit | ||
| 245 | * duplicate of argv[]. | ||
| 246 | * Problem 2: Compaq/HP C V7.3 (Alpha, IA64) before ECO1 failed | ||
| 247 | * to NULL-terminate a 64-bit argv[]. (As this was written, the | ||
| 248 | * compiler ECO was available only on IA64.) | ||
| 249 | * Fix 2: Unless advised not to (VMS_TRUST_ARGV), we test a | ||
| 250 | * 64-bit argv[argc] for NULL, and, if necessary, use a | ||
| 251 | * (properly) NULL-terminated (64-bit) duplicate of argv[]. | ||
| 252 | * The same code is used in either case to duplicate argv[]. | ||
| 253 | * Some of these decisions could be handled in preprocessing, | ||
| 254 | * but the code tends to get even uglier, and the penalty for | ||
| 255 | * deciding at compile- or run-time is tiny. | ||
| 256 | */ | ||
| 257 | char **Argv = NULL; | ||
| 258 | int free_Argv = 0; | ||
| 259 | |||
| 260 | if ((sizeof( _Argv) < 8) /* 32-bit argv[]. */ | ||
| 261 | # if !defined( VMS_TRUST_ARGV) | ||
| 262 | || (_Argv[ Argc] != NULL) /* Untrusted argv[argc] not NULL. */ | ||
| 263 | # endif | ||
| 264 | ) | ||
| 265 | { | ||
| 266 | int i; | ||
| 267 | Argv = OPENSSL_malloc( (Argc+ 1)* sizeof( char *)); | ||
| 268 | if (Argv == NULL) | ||
| 269 | { ret = -1; goto end; } | ||
| 270 | for(i = 0; i < Argc; i++) | ||
| 271 | Argv[i] = _Argv[i]; | ||
| 272 | Argv[ Argc] = NULL; /* Certain NULL termination. */ | ||
| 273 | free_Argv = 1; | ||
| 274 | } | ||
| 275 | else | ||
| 276 | { | ||
| 277 | /* Use the known-good 32-bit argv[] (which needs the | ||
| 278 | * type cast to satisfy the compiler), or the trusted or | ||
| 279 | * tested-good 64-bit argv[] as-is. */ | ||
| 280 | Argv = (char **)_Argv; | ||
| 281 | } | ||
| 282 | #endif /* defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64) */ | ||
| 283 | |||
| 231 | arg.data=NULL; | 284 | arg.data=NULL; |
| 232 | arg.count=0; | 285 | arg.count=0; |
| 233 | 286 | ||
| @@ -373,6 +426,13 @@ end: | |||
| 373 | BIO_free(bio_err); | 426 | BIO_free(bio_err); |
| 374 | bio_err=NULL; | 427 | bio_err=NULL; |
| 375 | } | 428 | } |
| 429 | #if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64) | ||
| 430 | /* Free any duplicate Argv[] storage. */ | ||
| 431 | if (free_Argv) | ||
| 432 | { | ||
| 433 | OPENSSL_free(Argv); | ||
| 434 | } | ||
| 435 | #endif | ||
| 376 | OPENSSL_EXIT(ret); | 436 | OPENSSL_EXIT(ret); |
| 377 | } | 437 | } |
| 378 | 438 | ||
diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c index 514a02e0f1..b54c6f84a4 100644 --- a/src/lib/libssl/src/apps/pkcs12.c +++ b/src/lib/libssl/src/apps/pkcs12.c | |||
| @@ -647,7 +647,7 @@ int MAIN(int argc, char **argv) | |||
| 647 | 647 | ||
| 648 | if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass); | 648 | if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass); |
| 649 | 649 | ||
| 650 | if (options & INFO) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1); | 650 | if ((options & INFO) && p12->mac) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1); |
| 651 | if(macver) { | 651 | if(macver) { |
| 652 | #ifdef CRYPTO_MDEBUG | 652 | #ifdef CRYPTO_MDEBUG |
| 653 | CRYPTO_push_info("verify MAC"); | 653 | CRYPTO_push_info("verify MAC"); |
diff --git a/src/lib/libssl/src/apps/pkcs7.c b/src/lib/libssl/src/apps/pkcs7.c index 86d31b99a7..ae6cd33f73 100644 --- a/src/lib/libssl/src/apps/pkcs7.c +++ b/src/lib/libssl/src/apps/pkcs7.c | |||
| @@ -82,9 +82,6 @@ int MAIN(int, char **); | |||
| 82 | 82 | ||
| 83 | int MAIN(int argc, char **argv) | 83 | int MAIN(int argc, char **argv) |
| 84 | { | 84 | { |
| 85 | #ifndef OPENSSL_NO_ENGINE | ||
| 86 | ENGINE *e = NULL; | ||
| 87 | #endif | ||
| 88 | PKCS7 *p7=NULL; | 85 | PKCS7 *p7=NULL; |
| 89 | int i,badops=0; | 86 | int i,badops=0; |
| 90 | BIO *in=NULL,*out=NULL; | 87 | BIO *in=NULL,*out=NULL; |
| @@ -182,7 +179,7 @@ bad: | |||
| 182 | ERR_load_crypto_strings(); | 179 | ERR_load_crypto_strings(); |
| 183 | 180 | ||
| 184 | #ifndef OPENSSL_NO_ENGINE | 181 | #ifndef OPENSSL_NO_ENGINE |
| 185 | e = setup_engine(bio_err, engine, 0); | 182 | setup_engine(bio_err, engine, 0); |
| 186 | #endif | 183 | #endif |
| 187 | 184 | ||
| 188 | in=BIO_new(BIO_s_file()); | 185 | in=BIO_new(BIO_s_file()); |
diff --git a/src/lib/libssl/src/apps/rand.c b/src/lib/libssl/src/apps/rand.c index 44a1d46a03..790e79592c 100644 --- a/src/lib/libssl/src/apps/rand.c +++ b/src/lib/libssl/src/apps/rand.c | |||
| @@ -77,9 +77,6 @@ int MAIN(int, char **); | |||
| 77 | 77 | ||
| 78 | int MAIN(int argc, char **argv) | 78 | int MAIN(int argc, char **argv) |
| 79 | { | 79 | { |
| 80 | #ifndef OPENSSL_NO_ENGINE | ||
| 81 | ENGINE *e = NULL; | ||
| 82 | #endif | ||
| 83 | int i, r, ret = 1; | 80 | int i, r, ret = 1; |
| 84 | int badopt; | 81 | int badopt; |
| 85 | char *outfile = NULL; | 82 | char *outfile = NULL; |
| @@ -178,7 +175,7 @@ int MAIN(int argc, char **argv) | |||
| 178 | } | 175 | } |
| 179 | 176 | ||
| 180 | #ifndef OPENSSL_NO_ENGINE | 177 | #ifndef OPENSSL_NO_ENGINE |
| 181 | e = setup_engine(bio_err, engine, 0); | 178 | setup_engine(bio_err, engine, 0); |
| 182 | #endif | 179 | #endif |
| 183 | 180 | ||
| 184 | app_RAND_load_file(NULL, bio_err, (inrand != NULL)); | 181 | app_RAND_load_file(NULL, bio_err, (inrand != NULL)); |
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c index 1a06d19bb1..8a0c34cf0f 100644 --- a/src/lib/libssl/src/apps/s_server.c +++ b/src/lib/libssl/src/apps/s_server.c | |||
| @@ -2254,11 +2254,10 @@ static int www_body(char *hostname, int s, unsigned char *context) | |||
| 2254 | { | 2254 | { |
| 2255 | char *buf=NULL; | 2255 | char *buf=NULL; |
| 2256 | int ret=1; | 2256 | int ret=1; |
| 2257 | int i,j,k,blank,dot; | 2257 | int i,j,k,dot; |
| 2258 | SSL *con; | 2258 | SSL *con; |
| 2259 | const SSL_CIPHER *c; | 2259 | const SSL_CIPHER *c; |
| 2260 | BIO *io,*ssl_bio,*sbio; | 2260 | BIO *io,*ssl_bio,*sbio; |
| 2261 | long total_bytes; | ||
| 2262 | 2261 | ||
| 2263 | buf=OPENSSL_malloc(bufsize); | 2262 | buf=OPENSSL_malloc(bufsize); |
| 2264 | if (buf == NULL) return(0); | 2263 | if (buf == NULL) return(0); |
| @@ -2329,7 +2328,6 @@ static int www_body(char *hostname, int s, unsigned char *context) | |||
| 2329 | SSL_set_msg_callback_arg(con, bio_s_out); | 2328 | SSL_set_msg_callback_arg(con, bio_s_out); |
| 2330 | } | 2329 | } |
| 2331 | 2330 | ||
| 2332 | blank=0; | ||
| 2333 | for (;;) | 2331 | for (;;) |
| 2334 | { | 2332 | { |
| 2335 | if (hack) | 2333 | if (hack) |
| @@ -2559,7 +2557,6 @@ static int www_body(char *hostname, int s, unsigned char *context) | |||
| 2559 | BIO_puts(io,"HTTP/1.0 200 ok\r\nContent-type: text/plain\r\n\r\n"); | 2557 | BIO_puts(io,"HTTP/1.0 200 ok\r\nContent-type: text/plain\r\n\r\n"); |
| 2560 | } | 2558 | } |
| 2561 | /* send the file */ | 2559 | /* send the file */ |
| 2562 | total_bytes=0; | ||
| 2563 | for (;;) | 2560 | for (;;) |
| 2564 | { | 2561 | { |
| 2565 | i=BIO_read(file,buf,bufsize); | 2562 | i=BIO_read(file,buf,bufsize); |
diff --git a/src/lib/libssl/src/apps/s_socket.c b/src/lib/libssl/src/apps/s_socket.c index 6b8713de60..c08544a13c 100644 --- a/src/lib/libssl/src/apps/s_socket.c +++ b/src/lib/libssl/src/apps/s_socket.c | |||
| @@ -327,7 +327,7 @@ static int init_server_long(int *sock, int port, char *ip, int type) | |||
| 327 | { | 327 | { |
| 328 | int ret=0; | 328 | int ret=0; |
| 329 | struct sockaddr_in server; | 329 | struct sockaddr_in server; |
| 330 | int s= -1,i; | 330 | int s= -1; |
| 331 | 331 | ||
| 332 | if (!ssl_sock_init()) return(0); | 332 | if (!ssl_sock_init()) return(0); |
| 333 | 333 | ||
| @@ -366,7 +366,6 @@ static int init_server_long(int *sock, int port, char *ip, int type) | |||
| 366 | } | 366 | } |
| 367 | /* Make it 128 for linux */ | 367 | /* Make it 128 for linux */ |
| 368 | if (type==SOCK_STREAM && listen(s,128) == -1) goto err; | 368 | if (type==SOCK_STREAM && listen(s,128) == -1) goto err; |
| 369 | i=0; | ||
| 370 | *sock=s; | 369 | *sock=s; |
| 371 | ret=1; | 370 | ret=1; |
| 372 | err: | 371 | err: |
| @@ -384,7 +383,7 @@ static int init_server(int *sock, int port, int type) | |||
| 384 | 383 | ||
| 385 | static int do_accept(int acc_sock, int *sock, char **host) | 384 | static int do_accept(int acc_sock, int *sock, char **host) |
| 386 | { | 385 | { |
| 387 | int ret,i; | 386 | int ret; |
| 388 | struct hostent *h1,*h2; | 387 | struct hostent *h1,*h2; |
| 389 | static struct sockaddr_in from; | 388 | static struct sockaddr_in from; |
| 390 | int len; | 389 | int len; |
| @@ -407,6 +406,7 @@ redoit: | |||
| 407 | if (ret == INVALID_SOCKET) | 406 | if (ret == INVALID_SOCKET) |
| 408 | { | 407 | { |
| 409 | #if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) | 408 | #if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) |
| 409 | int i; | ||
| 410 | i=WSAGetLastError(); | 410 | i=WSAGetLastError(); |
| 411 | BIO_printf(bio_err,"accept error %d\n",i); | 411 | BIO_printf(bio_err,"accept error %d\n",i); |
| 412 | #else | 412 | #else |
| @@ -461,7 +461,6 @@ redoit: | |||
| 461 | BIO_printf(bio_err,"gethostbyname failure\n"); | 461 | BIO_printf(bio_err,"gethostbyname failure\n"); |
| 462 | return(0); | 462 | return(0); |
| 463 | } | 463 | } |
| 464 | i=0; | ||
| 465 | if (h2->h_addrtype != AF_INET) | 464 | if (h2->h_addrtype != AF_INET) |
| 466 | { | 465 | { |
| 467 | BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n"); | 466 | BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n"); |
diff --git a/src/lib/libssl/src/apps/speed.c b/src/lib/libssl/src/apps/speed.c index 539bfff220..65f85fecf7 100644 --- a/src/lib/libssl/src/apps/speed.c +++ b/src/lib/libssl/src/apps/speed.c | |||
| @@ -334,9 +334,6 @@ int MAIN(int, char **); | |||
| 334 | 334 | ||
| 335 | int MAIN(int argc, char **argv) | 335 | int MAIN(int argc, char **argv) |
| 336 | { | 336 | { |
| 337 | #ifndef OPENSSL_NO_ENGINE | ||
| 338 | ENGINE *e = NULL; | ||
| 339 | #endif | ||
| 340 | unsigned char *buf=NULL,*buf2=NULL; | 337 | unsigned char *buf=NULL,*buf2=NULL; |
| 341 | int mret=1; | 338 | int mret=1; |
| 342 | long count=0,save_count=0; | 339 | long count=0,save_count=0; |
| @@ -430,7 +427,6 @@ int MAIN(int argc, char **argv) | |||
| 430 | unsigned char DES_iv[8]; | 427 | unsigned char DES_iv[8]; |
| 431 | unsigned char iv[2*MAX_BLOCK_SIZE/8]; | 428 | unsigned char iv[2*MAX_BLOCK_SIZE/8]; |
| 432 | #ifndef OPENSSL_NO_DES | 429 | #ifndef OPENSSL_NO_DES |
| 433 | DES_cblock *buf_as_des_cblock = NULL; | ||
| 434 | static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0}; | 430 | static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0}; |
| 435 | static DES_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12}; | 431 | static DES_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12}; |
| 436 | static DES_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34}; | 432 | static DES_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34}; |
| @@ -644,9 +640,6 @@ int MAIN(int argc, char **argv) | |||
| 644 | BIO_printf(bio_err,"out of memory\n"); | 640 | BIO_printf(bio_err,"out of memory\n"); |
| 645 | goto end; | 641 | goto end; |
| 646 | } | 642 | } |
| 647 | #ifndef OPENSSL_NO_DES | ||
| 648 | buf_as_des_cblock = (DES_cblock *)buf; | ||
| 649 | #endif | ||
| 650 | if ((buf2=(unsigned char *)OPENSSL_malloc((int)BUFSIZE)) == NULL) | 643 | if ((buf2=(unsigned char *)OPENSSL_malloc((int)BUFSIZE)) == NULL) |
| 651 | { | 644 | { |
| 652 | BIO_printf(bio_err,"out of memory\n"); | 645 | BIO_printf(bio_err,"out of memory\n"); |
| @@ -721,7 +714,7 @@ int MAIN(int argc, char **argv) | |||
| 721 | BIO_printf(bio_err,"no engine given\n"); | 714 | BIO_printf(bio_err,"no engine given\n"); |
| 722 | goto end; | 715 | goto end; |
| 723 | } | 716 | } |
| 724 | e = setup_engine(bio_err, *argv, 0); | 717 | setup_engine(bio_err, *argv, 0); |
| 725 | /* j will be increased again further down. We just | 718 | /* j will be increased again further down. We just |
| 726 | don't want speed to confuse an engine with an | 719 | don't want speed to confuse an engine with an |
| 727 | algorithm, especially when none is given (which | 720 | algorithm, especially when none is given (which |
| @@ -1237,7 +1230,8 @@ int MAIN(int argc, char **argv) | |||
| 1237 | count*=2; | 1230 | count*=2; |
| 1238 | Time_F(START); | 1231 | Time_F(START); |
| 1239 | for (it=count; it; it--) | 1232 | for (it=count; it; it--) |
| 1240 | DES_ecb_encrypt(buf_as_des_cblock,buf_as_des_cblock, | 1233 | DES_ecb_encrypt((DES_cblock *)buf, |
| 1234 | (DES_cblock *)buf, | ||
| 1241 | &sch,DES_ENCRYPT); | 1235 | &sch,DES_ENCRYPT); |
| 1242 | d=Time_F(STOP); | 1236 | d=Time_F(STOP); |
| 1243 | } while (d <3); | 1237 | } while (d <3); |
| @@ -2709,6 +2703,7 @@ static int do_multi(int multi) | |||
| 2709 | else | 2703 | else |
| 2710 | rsa_results[k][1]=d; | 2704 | rsa_results[k][1]=d; |
| 2711 | } | 2705 | } |
| 2706 | #ifndef OPENSSL_NO_DSA | ||
| 2712 | else if(!strncmp(buf,"+F3:",4)) | 2707 | else if(!strncmp(buf,"+F3:",4)) |
| 2713 | { | 2708 | { |
| 2714 | int k; | 2709 | int k; |
| @@ -2730,6 +2725,7 @@ static int do_multi(int multi) | |||
| 2730 | else | 2725 | else |
| 2731 | dsa_results[k][1]=d; | 2726 | dsa_results[k][1]=d; |
| 2732 | } | 2727 | } |
| 2728 | #endif | ||
| 2733 | #ifndef OPENSSL_NO_ECDSA | 2729 | #ifndef OPENSSL_NO_ECDSA |
| 2734 | else if(!strncmp(buf,"+F4:",4)) | 2730 | else if(!strncmp(buf,"+F4:",4)) |
| 2735 | { | 2731 | { |
diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c index e7e46d7b63..ed1e8c69ad 100644 --- a/src/lib/libssl/src/apps/x509.c +++ b/src/lib/libssl/src/apps/x509.c | |||
| @@ -556,7 +556,6 @@ bad: | |||
| 556 | if (reqfile) | 556 | if (reqfile) |
| 557 | { | 557 | { |
| 558 | EVP_PKEY *pkey; | 558 | EVP_PKEY *pkey; |
| 559 | X509_CINF *ci; | ||
| 560 | BIO *in; | 559 | BIO *in; |
| 561 | 560 | ||
| 562 | if (!sign_flag && !CA_flag) | 561 | if (!sign_flag && !CA_flag) |
| @@ -624,7 +623,6 @@ bad: | |||
| 624 | print_name(bio_err, "subject=", X509_REQ_get_subject_name(req), nmflag); | 623 | print_name(bio_err, "subject=", X509_REQ_get_subject_name(req), nmflag); |
| 625 | 624 | ||
| 626 | if ((x=X509_new()) == NULL) goto end; | 625 | if ((x=X509_new()) == NULL) goto end; |
| 627 | ci=x->cert_info; | ||
| 628 | 626 | ||
| 629 | if (sno == NULL) | 627 | if (sno == NULL) |
| 630 | { | 628 | { |
diff --git a/src/lib/libssl/src/config b/src/lib/libssl/src/config index 965884a627..cf64ec563e 100644 --- a/src/lib/libssl/src/config +++ b/src/lib/libssl/src/config | |||
| @@ -825,6 +825,10 @@ esac | |||
| 825 | # options="$options -DATALLA" | 825 | # options="$options -DATALLA" |
| 826 | #fi | 826 | #fi |
| 827 | 827 | ||
| 828 | ($CC -Wa,--help -c -o /dev/null -x assembler /dev/null 2>&1 | \ | ||
| 829 | grep \\--noexecstack) 2>&1 > /dev/null && \ | ||
| 830 | options="$options -Wa,--noexecstack" | ||
| 831 | |||
| 828 | # gcc < 2.8 does not support -march=ultrasparc | 832 | # gcc < 2.8 does not support -march=ultrasparc |
| 829 | if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] | 833 | if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] |
| 830 | then | 834 | then |
diff --git a/src/lib/libssl/src/crypto/Makefile b/src/lib/libssl/src/crypto/Makefile index c1033f6d77..85d9f249c5 100644 --- a/src/lib/libssl/src/crypto/Makefile +++ b/src/lib/libssl/src/crypto/Makefile | |||
| @@ -74,7 +74,9 @@ x86_64cpuid.s: x86_64cpuid.pl | |||
| 74 | $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@ | 74 | $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@ |
| 75 | ia64cpuid.s: ia64cpuid.S | 75 | ia64cpuid.s: ia64cpuid.S |
| 76 | $(CC) $(CFLAGS) -E ia64cpuid.S > $@ | 76 | $(CC) $(CFLAGS) -E ia64cpuid.S > $@ |
| 77 | ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@ | 77 | ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@ |
| 78 | alphacpuid.s: alphacpuid.pl | ||
| 79 | $(PERL) $< | $(CC) -E - | tee $@ > /dev/null | ||
| 78 | 80 | ||
| 79 | testapps: | 81 | testapps: |
| 80 | [ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \ | 82 | [ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \ |
diff --git a/src/lib/libssl/src/crypto/asn1/a_int.c b/src/lib/libssl/src/crypto/asn1/a_int.c index c6fd204ae3..3348b8762c 100644 --- a/src/lib/libssl/src/crypto/asn1/a_int.c +++ b/src/lib/libssl/src/crypto/asn1/a_int.c | |||
| @@ -273,7 +273,7 @@ ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, | |||
| 273 | { | 273 | { |
| 274 | ASN1_INTEGER *ret=NULL; | 274 | ASN1_INTEGER *ret=NULL; |
| 275 | const unsigned char *p; | 275 | const unsigned char *p; |
| 276 | unsigned char *to,*s; | 276 | unsigned char *s; |
| 277 | long len; | 277 | long len; |
| 278 | int inf,tag,xclass; | 278 | int inf,tag,xclass; |
| 279 | int i; | 279 | int i; |
| @@ -308,7 +308,6 @@ ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, | |||
| 308 | i=ERR_R_MALLOC_FAILURE; | 308 | i=ERR_R_MALLOC_FAILURE; |
| 309 | goto err; | 309 | goto err; |
| 310 | } | 310 | } |
| 311 | to=s; | ||
| 312 | ret->type=V_ASN1_INTEGER; | 311 | ret->type=V_ASN1_INTEGER; |
| 313 | if(len) { | 312 | if(len) { |
| 314 | if ((*p == 0) && (len != 1)) | 313 | if ((*p == 0) && (len != 1)) |
diff --git a/src/lib/libssl/src/crypto/asn1/a_object.c b/src/lib/libssl/src/crypto/asn1/a_object.c index e5fbe7cbb1..3978c9150d 100644 --- a/src/lib/libssl/src/crypto/asn1/a_object.c +++ b/src/lib/libssl/src/crypto/asn1/a_object.c | |||
| @@ -139,7 +139,7 @@ int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num) | |||
| 139 | ASN1err(ASN1_F_A2D_ASN1_OBJECT,ASN1_R_INVALID_DIGIT); | 139 | ASN1err(ASN1_F_A2D_ASN1_OBJECT,ASN1_R_INVALID_DIGIT); |
| 140 | goto err; | 140 | goto err; |
| 141 | } | 141 | } |
| 142 | if (!use_bn && l > (ULONG_MAX / 10L)) | 142 | if (!use_bn && l >= ((ULONG_MAX - 80) / 10L)) |
| 143 | { | 143 | { |
| 144 | use_bn = 1; | 144 | use_bn = 1; |
| 145 | if (!bl) | 145 | if (!bl) |
| @@ -293,7 +293,7 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, | |||
| 293 | /* Sanity check OID encoding: can't have leading 0x80 in | 293 | /* Sanity check OID encoding: can't have leading 0x80 in |
| 294 | * subidentifiers, see: X.690 8.19.2 | 294 | * subidentifiers, see: X.690 8.19.2 |
| 295 | */ | 295 | */ |
| 296 | for (i = 0, p = *pp + 1; i < len - 1; i++, p++) | 296 | for (i = 0, p = *pp; i < len; i++, p++) |
| 297 | { | 297 | { |
| 298 | if (*p == 0x80 && (!i || !(p[-1] & 0x80))) | 298 | if (*p == 0x80 && (!i || !(p[-1] & 0x80))) |
| 299 | { | 299 | { |
diff --git a/src/lib/libssl/src/crypto/asn1/a_strex.c b/src/lib/libssl/src/crypto/asn1/a_strex.c index 7fc14d3296..264ebf2393 100644 --- a/src/lib/libssl/src/crypto/asn1/a_strex.c +++ b/src/lib/libssl/src/crypto/asn1/a_strex.c | |||
| @@ -74,6 +74,11 @@ | |||
| 74 | 74 | ||
| 75 | #define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253) | 75 | #define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253) |
| 76 | 76 | ||
| 77 | #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \ | ||
| 78 | ASN1_STRFLGS_ESC_QUOTE | \ | ||
| 79 | ASN1_STRFLGS_ESC_CTRL | \ | ||
| 80 | ASN1_STRFLGS_ESC_MSB) | ||
| 81 | |||
| 77 | 82 | ||
| 78 | /* Three IO functions for sending data to memory, a BIO and | 83 | /* Three IO functions for sending data to memory, a BIO and |
| 79 | * and a FILE pointer. | 84 | * and a FILE pointer. |
| @@ -148,6 +153,13 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch | |||
| 148 | if(!io_ch(arg, tmphex, 3)) return -1; | 153 | if(!io_ch(arg, tmphex, 3)) return -1; |
| 149 | return 3; | 154 | return 3; |
| 150 | } | 155 | } |
| 156 | /* If we get this far and do any escaping at all must escape | ||
| 157 | * the escape character itself: backslash. | ||
| 158 | */ | ||
| 159 | if (chtmp == '\\' && flags & ESC_FLAGS) { | ||
| 160 | if(!io_ch(arg, "\\\\", 2)) return -1; | ||
| 161 | return 2; | ||
| 162 | } | ||
| 151 | if(!io_ch(arg, &chtmp, 1)) return -1; | 163 | if(!io_ch(arg, &chtmp, 1)) return -1; |
| 152 | return 1; | 164 | return 1; |
| 153 | } | 165 | } |
| @@ -292,11 +304,6 @@ static const signed char tag2nbyte[] = { | |||
| 292 | 4, -1, 2 /* 28-30 */ | 304 | 4, -1, 2 /* 28-30 */ |
| 293 | }; | 305 | }; |
| 294 | 306 | ||
| 295 | #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \ | ||
| 296 | ASN1_STRFLGS_ESC_QUOTE | \ | ||
| 297 | ASN1_STRFLGS_ESC_CTRL | \ | ||
| 298 | ASN1_STRFLGS_ESC_MSB) | ||
| 299 | |||
| 300 | /* This is the main function, print out an | 307 | /* This is the main function, print out an |
| 301 | * ASN1_STRING taking note of various escape | 308 | * ASN1_STRING taking note of various escape |
| 302 | * and display options. Returns number of | 309 | * and display options. Returns number of |
diff --git a/src/lib/libssl/src/crypto/asn1/a_strnid.c b/src/lib/libssl/src/crypto/asn1/a_strnid.c index 753021a7a2..2fc48c1551 100644 --- a/src/lib/libssl/src/crypto/asn1/a_strnid.c +++ b/src/lib/libssl/src/crypto/asn1/a_strnid.c | |||
| @@ -95,7 +95,7 @@ unsigned long ASN1_STRING_get_default_mask(void) | |||
| 95 | * default: the default value, Printable, T61, BMP. | 95 | * default: the default value, Printable, T61, BMP. |
| 96 | */ | 96 | */ |
| 97 | 97 | ||
| 98 | int ASN1_STRING_set_default_mask_asc(char *p) | 98 | int ASN1_STRING_set_default_mask_asc(const char *p) |
| 99 | { | 99 | { |
| 100 | unsigned long mask; | 100 | unsigned long mask; |
| 101 | char *end; | 101 | char *end; |
diff --git a/src/lib/libssl/src/crypto/asn1/asn1.h b/src/lib/libssl/src/crypto/asn1/asn1.h index f7718b5a94..59540e4e79 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1.h +++ b/src/lib/libssl/src/crypto/asn1/asn1.h | |||
| @@ -1067,7 +1067,7 @@ ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, | |||
| 1067 | ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); | 1067 | ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); |
| 1068 | 1068 | ||
| 1069 | void ASN1_STRING_set_default_mask(unsigned long mask); | 1069 | void ASN1_STRING_set_default_mask(unsigned long mask); |
| 1070 | int ASN1_STRING_set_default_mask_asc(char *p); | 1070 | int ASN1_STRING_set_default_mask_asc(const char *p); |
| 1071 | unsigned long ASN1_STRING_get_default_mask(void); | 1071 | unsigned long ASN1_STRING_get_default_mask(void); |
| 1072 | int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, | 1072 | int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, |
| 1073 | int inform, unsigned long mask); | 1073 | int inform, unsigned long mask); |
diff --git a/src/lib/libssl/src/crypto/asn1/n_pkey.c b/src/lib/libssl/src/crypto/asn1/n_pkey.c index 60bc437938..e7d0439062 100644 --- a/src/lib/libssl/src/crypto/asn1/n_pkey.c +++ b/src/lib/libssl/src/crypto/asn1/n_pkey.c | |||
| @@ -242,7 +242,7 @@ RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length, | |||
| 242 | int sgckey) | 242 | int sgckey) |
| 243 | { | 243 | { |
| 244 | RSA *ret=NULL; | 244 | RSA *ret=NULL; |
| 245 | const unsigned char *p, *kp; | 245 | const unsigned char *p; |
| 246 | NETSCAPE_ENCRYPTED_PKEY *enckey = NULL; | 246 | NETSCAPE_ENCRYPTED_PKEY *enckey = NULL; |
| 247 | 247 | ||
| 248 | p = *pp; | 248 | p = *pp; |
| @@ -265,7 +265,6 @@ RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length, | |||
| 265 | ASN1err(ASN1_F_D2I_RSA_NET,ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM); | 265 | ASN1err(ASN1_F_D2I_RSA_NET,ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM); |
| 266 | goto err; | 266 | goto err; |
| 267 | } | 267 | } |
| 268 | kp = enckey->enckey->digest->data; | ||
| 269 | if (cb == NULL) | 268 | if (cb == NULL) |
| 270 | cb=EVP_read_pw_string; | 269 | cb=EVP_read_pw_string; |
| 271 | if ((ret=d2i_RSA_NET_2(a, enckey->enckey->digest,cb, sgckey)) == NULL) goto err; | 270 | if ((ret=d2i_RSA_NET_2(a, enckey->enckey->digest,cb, sgckey)) == NULL) goto err; |
diff --git a/src/lib/libssl/src/crypto/asn1/t_crl.c b/src/lib/libssl/src/crypto/asn1/t_crl.c index bdb244c015..ee5a687ce8 100644 --- a/src/lib/libssl/src/crypto/asn1/t_crl.c +++ b/src/lib/libssl/src/crypto/asn1/t_crl.c | |||
| @@ -87,7 +87,7 @@ int X509_CRL_print(BIO *out, X509_CRL *x) | |||
| 87 | STACK_OF(X509_REVOKED) *rev; | 87 | STACK_OF(X509_REVOKED) *rev; |
| 88 | X509_REVOKED *r; | 88 | X509_REVOKED *r; |
| 89 | long l; | 89 | long l; |
| 90 | int i, n; | 90 | int i; |
| 91 | char *p; | 91 | char *p; |
| 92 | 92 | ||
| 93 | BIO_printf(out, "Certificate Revocation List (CRL):\n"); | 93 | BIO_printf(out, "Certificate Revocation List (CRL):\n"); |
| @@ -107,7 +107,6 @@ int X509_CRL_print(BIO *out, X509_CRL *x) | |||
| 107 | else BIO_printf(out,"NONE"); | 107 | else BIO_printf(out,"NONE"); |
| 108 | BIO_printf(out,"\n"); | 108 | BIO_printf(out,"\n"); |
| 109 | 109 | ||
| 110 | n=X509_CRL_get_ext_count(x); | ||
| 111 | X509V3_extensions_print(out, "CRL extensions", | 110 | X509V3_extensions_print(out, "CRL extensions", |
| 112 | x->crl->extensions, 0, 8); | 111 | x->crl->extensions, 0, 8); |
| 113 | 112 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_dec.c b/src/lib/libssl/src/crypto/asn1/tasn_dec.c index 3bee439968..87d7dfdf5c 100644 --- a/src/lib/libssl/src/crypto/asn1/tasn_dec.c +++ b/src/lib/libssl/src/crypto/asn1/tasn_dec.c | |||
| @@ -168,7 +168,7 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, | |||
| 168 | int i; | 168 | int i; |
| 169 | int otag; | 169 | int otag; |
| 170 | int ret = 0; | 170 | int ret = 0; |
| 171 | ASN1_VALUE *pchval, **pchptr, *ptmpval; | 171 | ASN1_VALUE **pchptr, *ptmpval; |
| 172 | if (!pval) | 172 | if (!pval) |
| 173 | return 0; | 173 | return 0; |
| 174 | if (aux && aux->asn1_cb) | 174 | if (aux && aux->asn1_cb) |
| @@ -319,7 +319,6 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, | |||
| 319 | goto err; | 319 | goto err; |
| 320 | } | 320 | } |
| 321 | /* CHOICE type, try each possibility in turn */ | 321 | /* CHOICE type, try each possibility in turn */ |
| 322 | pchval = NULL; | ||
| 323 | p = *in; | 322 | p = *in; |
| 324 | for (i = 0, tt=it->templates; i < it->tcount; i++, tt++) | 323 | for (i = 0, tt=it->templates; i < it->tcount; i++, tt++) |
| 325 | { | 324 | { |
diff --git a/src/lib/libssl/src/crypto/asn1/x_name.c b/src/lib/libssl/src/crypto/asn1/x_name.c index caa4409feb..49be08b4da 100644 --- a/src/lib/libssl/src/crypto/asn1/x_name.c +++ b/src/lib/libssl/src/crypto/asn1/x_name.c | |||
| @@ -214,7 +214,9 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, | |||
| 214 | *val = nm.a; | 214 | *val = nm.a; |
| 215 | *in = p; | 215 | *in = p; |
| 216 | return ret; | 216 | return ret; |
| 217 | err: | 217 | err: |
| 218 | if (nm.x != NULL) | ||
| 219 | X509_NAME_free(nm.x); | ||
| 218 | ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR); | 220 | ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR); |
| 219 | return 0; | 221 | return 0; |
| 220 | } | 222 | } |
| @@ -464,7 +466,8 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in) | |||
| 464 | } | 466 | } |
| 465 | else | 467 | else |
| 466 | { | 468 | { |
| 467 | *to++ = tolower(*from++); | 469 | *to++ = tolower(*from); |
| 470 | from++; | ||
| 468 | i++; | 471 | i++; |
| 469 | } | 472 | } |
| 470 | } | 473 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/x_x509.c b/src/lib/libssl/src/crypto/asn1/x_x509.c index dafd3cc921..de3df9eb51 100644 --- a/src/lib/libssl/src/crypto/asn1/x_x509.c +++ b/src/lib/libssl/src/crypto/asn1/x_x509.c | |||
| @@ -63,7 +63,7 @@ | |||
| 63 | #include <openssl/x509.h> | 63 | #include <openssl/x509.h> |
| 64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
| 65 | 65 | ||
| 66 | ASN1_SEQUENCE(X509_CINF) = { | 66 | ASN1_SEQUENCE_enc(X509_CINF, enc, 0) = { |
| 67 | ASN1_EXP_OPT(X509_CINF, version, ASN1_INTEGER, 0), | 67 | ASN1_EXP_OPT(X509_CINF, version, ASN1_INTEGER, 0), |
| 68 | ASN1_SIMPLE(X509_CINF, serialNumber, ASN1_INTEGER), | 68 | ASN1_SIMPLE(X509_CINF, serialNumber, ASN1_INTEGER), |
| 69 | ASN1_SIMPLE(X509_CINF, signature, X509_ALGOR), | 69 | ASN1_SIMPLE(X509_CINF, signature, X509_ALGOR), |
| @@ -74,7 +74,7 @@ ASN1_SEQUENCE(X509_CINF) = { | |||
| 74 | ASN1_IMP_OPT(X509_CINF, issuerUID, ASN1_BIT_STRING, 1), | 74 | ASN1_IMP_OPT(X509_CINF, issuerUID, ASN1_BIT_STRING, 1), |
| 75 | ASN1_IMP_OPT(X509_CINF, subjectUID, ASN1_BIT_STRING, 2), | 75 | ASN1_IMP_OPT(X509_CINF, subjectUID, ASN1_BIT_STRING, 2), |
| 76 | ASN1_EXP_SEQUENCE_OF_OPT(X509_CINF, extensions, X509_EXTENSION, 3) | 76 | ASN1_EXP_SEQUENCE_OF_OPT(X509_CINF, extensions, X509_EXTENSION, 3) |
| 77 | } ASN1_SEQUENCE_END(X509_CINF) | 77 | } ASN1_SEQUENCE_END_enc(X509_CINF, X509_CINF) |
| 78 | 78 | ||
| 79 | IMPLEMENT_ASN1_FUNCTIONS(X509_CINF) | 79 | IMPLEMENT_ASN1_FUNCTIONS(X509_CINF) |
| 80 | /* X509 top level structure needs a bit of customisation */ | 80 | /* X509 top level structure needs a bit of customisation */ |
diff --git a/src/lib/libssl/src/crypto/bio/b_sock.c b/src/lib/libssl/src/crypto/bio/b_sock.c index 12b0a53a81..d47310d650 100644 --- a/src/lib/libssl/src/crypto/bio/b_sock.c +++ b/src/lib/libssl/src/crypto/bio/b_sock.c | |||
| @@ -551,7 +551,30 @@ int BIO_socket_ioctl(int fd, long type, void *arg) | |||
| 551 | #ifdef __DJGPP__ | 551 | #ifdef __DJGPP__ |
| 552 | i=ioctlsocket(fd,type,(char *)arg); | 552 | i=ioctlsocket(fd,type,(char *)arg); |
| 553 | #else | 553 | #else |
| 554 | i=ioctlsocket(fd,type,arg); | 554 | # if defined(OPENSSL_SYS_VMS) |
| 555 | /* 2011-02-18 SMS. | ||
| 556 | * VMS ioctl() can't tolerate a 64-bit "void *arg", but we | ||
| 557 | * observe that all the consumers pass in an "unsigned long *", | ||
| 558 | * so we arrange a local copy with a short pointer, and use | ||
| 559 | * that, instead. | ||
| 560 | */ | ||
| 561 | # if __INITIAL_POINTER_SIZE == 64 | ||
| 562 | # define ARG arg_32p | ||
| 563 | # pragma pointer_size save | ||
| 564 | # pragma pointer_size 32 | ||
| 565 | unsigned long arg_32; | ||
| 566 | unsigned long *arg_32p; | ||
| 567 | # pragma pointer_size restore | ||
| 568 | arg_32p = &arg_32; | ||
| 569 | arg_32 = *((unsigned long *) arg); | ||
| 570 | # else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 571 | # define ARG arg | ||
| 572 | # endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 573 | # else /* defined(OPENSSL_SYS_VMS) */ | ||
| 574 | # define ARG arg | ||
| 575 | # endif /* defined(OPENSSL_SYS_VMS) [else] */ | ||
| 576 | |||
| 577 | i=ioctlsocket(fd,type,ARG); | ||
| 555 | #endif /* __DJGPP__ */ | 578 | #endif /* __DJGPP__ */ |
| 556 | if (i < 0) | 579 | if (i < 0) |
| 557 | SYSerr(SYS_F_IOCTLSOCKET,get_last_socket_error()); | 580 | SYSerr(SYS_F_IOCTLSOCKET,get_last_socket_error()); |
| @@ -660,6 +683,7 @@ int BIO_get_accept_socket(char *host, int bind_mode) | |||
| 660 | * note that commonly IPv6 wildchard socket can service | 683 | * note that commonly IPv6 wildchard socket can service |
| 661 | * IPv4 connections just as well... */ | 684 | * IPv4 connections just as well... */ |
| 662 | memset(&hint,0,sizeof(hint)); | 685 | memset(&hint,0,sizeof(hint)); |
| 686 | hint.ai_flags = AI_PASSIVE; | ||
| 663 | if (h) | 687 | if (h) |
| 664 | { | 688 | { |
| 665 | if (strchr(h,':')) | 689 | if (strchr(h,':')) |
| @@ -672,7 +696,10 @@ int BIO_get_accept_socket(char *host, int bind_mode) | |||
| 672 | #endif | 696 | #endif |
| 673 | } | 697 | } |
| 674 | else if (h[0]=='*' && h[1]=='\0') | 698 | else if (h[0]=='*' && h[1]=='\0') |
| 699 | { | ||
| 700 | hint.ai_family = AF_INET; | ||
| 675 | h=NULL; | 701 | h=NULL; |
| 702 | } | ||
| 676 | } | 703 | } |
| 677 | 704 | ||
| 678 | if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break; | 705 | if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break; |
diff --git a/src/lib/libssl/src/crypto/bio/bf_nbio.c b/src/lib/libssl/src/crypto/bio/bf_nbio.c index c72a23c2e1..028616c064 100644 --- a/src/lib/libssl/src/crypto/bio/bf_nbio.c +++ b/src/lib/libssl/src/crypto/bio/bf_nbio.c | |||
| @@ -125,7 +125,6 @@ static int nbiof_free(BIO *a) | |||
| 125 | 125 | ||
| 126 | static int nbiof_read(BIO *b, char *out, int outl) | 126 | static int nbiof_read(BIO *b, char *out, int outl) |
| 127 | { | 127 | { |
| 128 | NBIO_TEST *nt; | ||
| 129 | int ret=0; | 128 | int ret=0; |
| 130 | #if 1 | 129 | #if 1 |
| 131 | int num; | 130 | int num; |
| @@ -134,7 +133,6 @@ static int nbiof_read(BIO *b, char *out, int outl) | |||
| 134 | 133 | ||
| 135 | if (out == NULL) return(0); | 134 | if (out == NULL) return(0); |
| 136 | if (b->next_bio == NULL) return(0); | 135 | if (b->next_bio == NULL) return(0); |
| 137 | nt=(NBIO_TEST *)b->ptr; | ||
| 138 | 136 | ||
| 139 | BIO_clear_retry_flags(b); | 137 | BIO_clear_retry_flags(b); |
| 140 | #if 1 | 138 | #if 1 |
diff --git a/src/lib/libssl/src/crypto/bio/bio_lib.c b/src/lib/libssl/src/crypto/bio/bio_lib.c index 77f4de9c32..e12bc3a2ca 100644 --- a/src/lib/libssl/src/crypto/bio/bio_lib.c +++ b/src/lib/libssl/src/crypto/bio/bio_lib.c | |||
| @@ -110,7 +110,7 @@ int BIO_set(BIO *bio, BIO_METHOD *method) | |||
| 110 | 110 | ||
| 111 | int BIO_free(BIO *a) | 111 | int BIO_free(BIO *a) |
| 112 | { | 112 | { |
| 113 | int ret=0,i; | 113 | int i; |
| 114 | 114 | ||
| 115 | if (a == NULL) return(0); | 115 | if (a == NULL) return(0); |
| 116 | 116 | ||
| @@ -133,7 +133,7 @@ int BIO_free(BIO *a) | |||
| 133 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data); | 133 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data); |
| 134 | 134 | ||
| 135 | if ((a->method == NULL) || (a->method->destroy == NULL)) return(1); | 135 | if ((a->method == NULL) || (a->method->destroy == NULL)) return(1); |
| 136 | ret=a->method->destroy(a); | 136 | a->method->destroy(a); |
| 137 | OPENSSL_free(a); | 137 | OPENSSL_free(a); |
| 138 | return(1); | 138 | return(1); |
| 139 | } | 139 | } |
diff --git a/src/lib/libssl/src/crypto/bio/bss_acpt.c b/src/lib/libssl/src/crypto/bio/bss_acpt.c index 826f761143..5d49e1a72b 100644 --- a/src/lib/libssl/src/crypto/bio/bss_acpt.c +++ b/src/lib/libssl/src/crypto/bio/bss_acpt.c | |||
| @@ -340,7 +340,6 @@ static int acpt_write(BIO *b, const char *in, int inl) | |||
| 340 | 340 | ||
| 341 | static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr) | 341 | static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 342 | { | 342 | { |
| 343 | BIO *dbio; | ||
| 344 | int *ip; | 343 | int *ip; |
| 345 | long ret=1; | 344 | long ret=1; |
| 346 | BIO_ACCEPT *data; | 345 | BIO_ACCEPT *data; |
| @@ -437,8 +436,8 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
| 437 | ret=(long)data->bind_mode; | 436 | ret=(long)data->bind_mode; |
| 438 | break; | 437 | break; |
| 439 | case BIO_CTRL_DUP: | 438 | case BIO_CTRL_DUP: |
| 440 | dbio=(BIO *)ptr; | 439 | /* dbio=(BIO *)ptr; |
| 441 | /* if (data->param_port) EAY EAY | 440 | if (data->param_port) EAY EAY |
| 442 | BIO_set_port(dbio,data->param_port); | 441 | BIO_set_port(dbio,data->param_port); |
| 443 | if (data->param_hostname) | 442 | if (data->param_hostname) |
| 444 | BIO_set_hostname(dbio,data->param_hostname); | 443 | BIO_set_hostname(dbio,data->param_hostname); |
diff --git a/src/lib/libssl/src/crypto/bio/bss_file.c b/src/lib/libssl/src/crypto/bio/bss_file.c index 8bfa0bcd97..b954fe7ebc 100644 --- a/src/lib/libssl/src/crypto/bio/bss_file.c +++ b/src/lib/libssl/src/crypto/bio/bss_file.c | |||
| @@ -123,6 +123,7 @@ BIO *BIO_new_file(const char *filename, const char *mode) | |||
| 123 | 123 | ||
| 124 | #if defined(_WIN32) && defined(CP_UTF8) | 124 | #if defined(_WIN32) && defined(CP_UTF8) |
| 125 | int sz, len_0 = (int)strlen(filename)+1; | 125 | int sz, len_0 = (int)strlen(filename)+1; |
| 126 | DWORD flags; | ||
| 126 | 127 | ||
| 127 | /* | 128 | /* |
| 128 | * Basically there are three cases to cover: a) filename is | 129 | * Basically there are three cases to cover: a) filename is |
| @@ -136,17 +137,22 @@ BIO *BIO_new_file(const char *filename, const char *mode) | |||
| 136 | * ERROR_NO_UNICODE_TRANSLATION, in which case we fall | 137 | * ERROR_NO_UNICODE_TRANSLATION, in which case we fall |
| 137 | * back to fopen... | 138 | * back to fopen... |
| 138 | */ | 139 | */ |
| 139 | if ((sz=MultiByteToWideChar(CP_UTF8,MB_ERR_INVALID_CHARS, | 140 | if ((sz=MultiByteToWideChar(CP_UTF8,(flags=MB_ERR_INVALID_CHARS), |
| 141 | filename,len_0,NULL,0))>0 || | ||
| 142 | (GetLastError()==ERROR_INVALID_FLAGS && | ||
| 143 | (sz=MultiByteToWideChar(CP_UTF8,(flags=0), | ||
| 140 | filename,len_0,NULL,0))>0) | 144 | filename,len_0,NULL,0))>0) |
| 145 | ) | ||
| 141 | { | 146 | { |
| 142 | WCHAR wmode[8]; | 147 | WCHAR wmode[8]; |
| 143 | WCHAR *wfilename = _alloca(sz*sizeof(WCHAR)); | 148 | WCHAR *wfilename = _alloca(sz*sizeof(WCHAR)); |
| 144 | 149 | ||
| 145 | if (MultiByteToWideChar(CP_UTF8,MB_ERR_INVALID_CHARS, | 150 | if (MultiByteToWideChar(CP_UTF8,flags, |
| 146 | filename,len_0,wfilename,sz) && | 151 | filename,len_0,wfilename,sz) && |
| 147 | MultiByteToWideChar(CP_UTF8,0,mode,strlen(mode)+1, | 152 | MultiByteToWideChar(CP_UTF8,0,mode,strlen(mode)+1, |
| 148 | wmode,sizeof(wmode)/sizeof(wmode[0])) && | 153 | wmode,sizeof(wmode)/sizeof(wmode[0])) && |
| 149 | (file=_wfopen(wfilename,wmode))==NULL && errno==ENOENT | 154 | (file=_wfopen(wfilename,wmode))==NULL && |
| 155 | (errno==ENOENT || errno==EBADF) | ||
| 150 | ) /* UTF-8 decode succeeded, but no file, filename | 156 | ) /* UTF-8 decode succeeded, but no file, filename |
| 151 | * could still have been locale-ized... */ | 157 | * could still have been locale-ized... */ |
| 152 | file = fopen(filename,mode); | 158 | file = fopen(filename,mode); |
diff --git a/src/lib/libssl/src/crypto/bio/bss_log.c b/src/lib/libssl/src/crypto/bio/bss_log.c index 7ead044b37..b7dce5c1a2 100644 --- a/src/lib/libssl/src/crypto/bio/bss_log.c +++ b/src/lib/libssl/src/crypto/bio/bss_log.c | |||
| @@ -75,6 +75,15 @@ | |||
| 75 | # include <descrip.h> | 75 | # include <descrip.h> |
| 76 | # include <lib$routines.h> | 76 | # include <lib$routines.h> |
| 77 | # include <starlet.h> | 77 | # include <starlet.h> |
| 78 | /* Some compiler options may mask the declaration of "_malloc32". */ | ||
| 79 | # if __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE | ||
| 80 | # if __INITIAL_POINTER_SIZE == 64 | ||
| 81 | # pragma pointer_size save | ||
| 82 | # pragma pointer_size 32 | ||
| 83 | void * _malloc32 (__size_t); | ||
| 84 | # pragma pointer_size restore | ||
| 85 | # endif /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 86 | # endif /* __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE */ | ||
| 78 | #elif defined(__ultrix) | 87 | #elif defined(__ultrix) |
| 79 | # include <sys/syslog.h> | 88 | # include <sys/syslog.h> |
| 80 | #elif defined(OPENSSL_SYS_NETWARE) | 89 | #elif defined(OPENSSL_SYS_NETWARE) |
| @@ -300,7 +309,24 @@ static void xopenlog(BIO* bp, char* name, int level) | |||
| 300 | static void xsyslog(BIO *bp, int priority, const char *string) | 309 | static void xsyslog(BIO *bp, int priority, const char *string) |
| 301 | { | 310 | { |
| 302 | struct dsc$descriptor_s opc_dsc; | 311 | struct dsc$descriptor_s opc_dsc; |
| 312 | |||
| 313 | /* Arrange 32-bit pointer to opcdef buffer and malloc(), if needed. */ | ||
| 314 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 315 | # pragma pointer_size save | ||
| 316 | # pragma pointer_size 32 | ||
| 317 | # define OPCDEF_TYPE __char_ptr32 | ||
| 318 | # define OPCDEF_MALLOC _malloc32 | ||
| 319 | #else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 320 | # define OPCDEF_TYPE char * | ||
| 321 | # define OPCDEF_MALLOC OPENSSL_malloc | ||
| 322 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 323 | |||
| 303 | struct opcdef *opcdef_p; | 324 | struct opcdef *opcdef_p; |
| 325 | |||
| 326 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 327 | # pragma pointer_size restore | ||
| 328 | #endif /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 329 | |||
| 304 | char buf[10240]; | 330 | char buf[10240]; |
| 305 | unsigned int len; | 331 | unsigned int len; |
| 306 | struct dsc$descriptor_s buf_dsc; | 332 | struct dsc$descriptor_s buf_dsc; |
| @@ -326,8 +352,8 @@ static void xsyslog(BIO *bp, int priority, const char *string) | |||
| 326 | 352 | ||
| 327 | lib$sys_fao(&fao_cmd, &len, &buf_dsc, priority_tag, string); | 353 | lib$sys_fao(&fao_cmd, &len, &buf_dsc, priority_tag, string); |
| 328 | 354 | ||
| 329 | /* we know there's an 8 byte header. That's documented */ | 355 | /* We know there's an 8-byte header. That's documented. */ |
| 330 | opcdef_p = (struct opcdef *) OPENSSL_malloc(8 + len); | 356 | opcdef_p = OPCDEF_MALLOC( 8+ len); |
| 331 | opcdef_p->opc$b_ms_type = OPC$_RQ_RQST; | 357 | opcdef_p->opc$b_ms_type = OPC$_RQ_RQST; |
| 332 | memcpy(opcdef_p->opc$z_ms_target_classes, &VMS_OPC_target, 3); | 358 | memcpy(opcdef_p->opc$z_ms_target_classes, &VMS_OPC_target, 3); |
| 333 | opcdef_p->opc$l_ms_rqstid = 0; | 359 | opcdef_p->opc$l_ms_rqstid = 0; |
| @@ -335,7 +361,7 @@ static void xsyslog(BIO *bp, int priority, const char *string) | |||
| 335 | 361 | ||
| 336 | opc_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | 362 | opc_dsc.dsc$b_dtype = DSC$K_DTYPE_T; |
| 337 | opc_dsc.dsc$b_class = DSC$K_CLASS_S; | 363 | opc_dsc.dsc$b_class = DSC$K_CLASS_S; |
| 338 | opc_dsc.dsc$a_pointer = (char *)opcdef_p; | 364 | opc_dsc.dsc$a_pointer = (OPCDEF_TYPE) opcdef_p; |
| 339 | opc_dsc.dsc$w_length = len + 8; | 365 | opc_dsc.dsc$w_length = len + 8; |
| 340 | 366 | ||
| 341 | sys$sndopr(opc_dsc, 0); | 367 | sys$sndopr(opc_dsc, 0); |
diff --git a/src/lib/libssl/src/crypto/bn/bn.h b/src/lib/libssl/src/crypto/bn/bn.h index e484b7fc11..a0bc47837d 100644 --- a/src/lib/libssl/src/crypto/bn/bn.h +++ b/src/lib/libssl/src/crypto/bn/bn.h | |||
| @@ -253,6 +253,24 @@ extern "C" { | |||
| 253 | #define BN_HEX_FMT2 "%08X" | 253 | #define BN_HEX_FMT2 "%08X" |
| 254 | #endif | 254 | #endif |
| 255 | 255 | ||
| 256 | /* 2011-02-22 SMS. | ||
| 257 | * In various places, a size_t variable or a type cast to size_t was | ||
| 258 | * used to perform integer-only operations on pointers. This failed on | ||
| 259 | * VMS with 64-bit pointers (CC /POINTER_SIZE = 64) because size_t is | ||
| 260 | * still only 32 bits. What's needed in these cases is an integer type | ||
| 261 | * with the same size as a pointer, which size_t is not certain to be. | ||
| 262 | * The only fix here is VMS-specific. | ||
| 263 | */ | ||
| 264 | #if defined(OPENSSL_SYS_VMS) | ||
| 265 | # if __INITIAL_POINTER_SIZE == 64 | ||
| 266 | # define PTR_SIZE_INT long long | ||
| 267 | # else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 268 | # define PTR_SIZE_INT int | ||
| 269 | # endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 270 | #else /* defined(OPENSSL_SYS_VMS) */ | ||
| 271 | # define PTR_SIZE_INT size_t | ||
| 272 | #endif /* defined(OPENSSL_SYS_VMS) [else] */ | ||
| 273 | |||
| 256 | #define BN_DEFAULT_BITS 1280 | 274 | #define BN_DEFAULT_BITS 1280 |
| 257 | 275 | ||
| 258 | #define BN_FLG_MALLOCED 0x01 | 276 | #define BN_FLG_MALLOCED 0x01 |
diff --git a/src/lib/libssl/src/crypto/bn/bn_exp2.c b/src/lib/libssl/src/crypto/bn/bn_exp2.c index b3f43cec8c..bd0c34b91b 100644 --- a/src/lib/libssl/src/crypto/bn/bn_exp2.c +++ b/src/lib/libssl/src/crypto/bn/bn_exp2.c | |||
| @@ -301,7 +301,8 @@ int BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1, | |||
| 301 | r_is_one = 0; | 301 | r_is_one = 0; |
| 302 | } | 302 | } |
| 303 | } | 303 | } |
| 304 | BN_from_montgomery(rr,r,mont,ctx); | 304 | if (!BN_from_montgomery(rr,r,mont,ctx)) |
| 305 | goto err; | ||
| 305 | ret=1; | 306 | ret=1; |
| 306 | err: | 307 | err: |
| 307 | if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); | 308 | if ((in_mont == NULL) && (mont != NULL)) BN_MONT_CTX_free(mont); |
diff --git a/src/lib/libssl/src/crypto/bn/bn_mont.c b/src/lib/libssl/src/crypto/bn/bn_mont.c index 7224637ab3..1a866880f5 100644 --- a/src/lib/libssl/src/crypto/bn/bn_mont.c +++ b/src/lib/libssl/src/crypto/bn/bn_mont.c | |||
| @@ -277,7 +277,7 @@ static int BN_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont) | |||
| 277 | m1|=m2; /* (al!=ri) */ | 277 | m1|=m2; /* (al!=ri) */ |
| 278 | m1|=(0-(size_t)v); /* (al!=ri || v) */ | 278 | m1|=(0-(size_t)v); /* (al!=ri || v) */ |
| 279 | m1&=~m2; /* (al!=ri || v) && !al>ri */ | 279 | m1&=~m2; /* (al!=ri || v) && !al>ri */ |
| 280 | nrp=(BN_ULONG *)(((size_t)rp&~m1)|((size_t)ap&m1)); | 280 | nrp=(BN_ULONG *)(((PTR_SIZE_INT)rp&~m1)|((PTR_SIZE_INT)ap&m1)); |
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | /* 'i<ri' is chosen to eliminate dependency on input data, even | 283 | /* 'i<ri' is chosen to eliminate dependency on input data, even |
diff --git a/src/lib/libssl/src/crypto/bn/bn_mul.c b/src/lib/libssl/src/crypto/bn/bn_mul.c index a0e9ec3b46..12e5be80eb 100644 --- a/src/lib/libssl/src/crypto/bn/bn_mul.c +++ b/src/lib/libssl/src/crypto/bn/bn_mul.c | |||
| @@ -551,7 +551,7 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n, | |||
| 551 | int tna, int tnb, BN_ULONG *t) | 551 | int tna, int tnb, BN_ULONG *t) |
| 552 | { | 552 | { |
| 553 | int i,j,n2=n*2; | 553 | int i,j,n2=n*2; |
| 554 | int c1,c2,neg,zero; | 554 | int c1,c2,neg; |
| 555 | BN_ULONG ln,lo,*p; | 555 | BN_ULONG ln,lo,*p; |
| 556 | 556 | ||
| 557 | # ifdef BN_COUNT | 557 | # ifdef BN_COUNT |
| @@ -567,7 +567,7 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n, | |||
| 567 | /* r=(a[0]-a[1])*(b[1]-b[0]) */ | 567 | /* r=(a[0]-a[1])*(b[1]-b[0]) */ |
| 568 | c1=bn_cmp_part_words(a,&(a[n]),tna,n-tna); | 568 | c1=bn_cmp_part_words(a,&(a[n]),tna,n-tna); |
| 569 | c2=bn_cmp_part_words(&(b[n]),b,tnb,tnb-n); | 569 | c2=bn_cmp_part_words(&(b[n]),b,tnb,tnb-n); |
| 570 | zero=neg=0; | 570 | neg=0; |
| 571 | switch (c1*3+c2) | 571 | switch (c1*3+c2) |
| 572 | { | 572 | { |
| 573 | case -4: | 573 | case -4: |
| @@ -575,7 +575,6 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n, | |||
| 575 | bn_sub_part_words(&(t[n]),b, &(b[n]),tnb,n-tnb); /* - */ | 575 | bn_sub_part_words(&(t[n]),b, &(b[n]),tnb,n-tnb); /* - */ |
| 576 | break; | 576 | break; |
| 577 | case -3: | 577 | case -3: |
| 578 | zero=1; | ||
| 579 | /* break; */ | 578 | /* break; */ |
| 580 | case -2: | 579 | case -2: |
| 581 | bn_sub_part_words(t, &(a[n]),a, tna,tna-n); /* - */ | 580 | bn_sub_part_words(t, &(a[n]),a, tna,tna-n); /* - */ |
| @@ -585,7 +584,6 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n, | |||
| 585 | case -1: | 584 | case -1: |
| 586 | case 0: | 585 | case 0: |
| 587 | case 1: | 586 | case 1: |
| 588 | zero=1; | ||
| 589 | /* break; */ | 587 | /* break; */ |
| 590 | case 2: | 588 | case 2: |
| 591 | bn_sub_part_words(t, a, &(a[n]),tna,n-tna); /* + */ | 589 | bn_sub_part_words(t, a, &(a[n]),tna,n-tna); /* + */ |
| @@ -593,7 +591,6 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n, | |||
| 593 | neg=1; | 591 | neg=1; |
| 594 | break; | 592 | break; |
| 595 | case 3: | 593 | case 3: |
| 596 | zero=1; | ||
| 597 | /* break; */ | 594 | /* break; */ |
| 598 | case 4: | 595 | case 4: |
| 599 | bn_sub_part_words(t, a, &(a[n]),tna,n-tna); | 596 | bn_sub_part_words(t, a, &(a[n]),tna,n-tna); |
| @@ -1012,7 +1009,6 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) | |||
| 1012 | { | 1009 | { |
| 1013 | if (i >= -1 && i <= 1) | 1010 | if (i >= -1 && i <= 1) |
| 1014 | { | 1011 | { |
| 1015 | int sav_j =0; | ||
| 1016 | /* Find out the power of two lower or equal | 1012 | /* Find out the power of two lower or equal |
| 1017 | to the longest of the two numbers */ | 1013 | to the longest of the two numbers */ |
| 1018 | if (i >= 0) | 1014 | if (i >= 0) |
| @@ -1023,7 +1019,6 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) | |||
| 1023 | { | 1019 | { |
| 1024 | j = BN_num_bits_word((BN_ULONG)bl); | 1020 | j = BN_num_bits_word((BN_ULONG)bl); |
| 1025 | } | 1021 | } |
| 1026 | sav_j = j; | ||
| 1027 | j = 1<<(j-1); | 1022 | j = 1<<(j-1); |
| 1028 | assert(j <= al || j <= bl); | 1023 | assert(j <= al || j <= bl); |
| 1029 | k = j+j; | 1024 | k = j+j; |
diff --git a/src/lib/libssl/src/crypto/comp/c_rle.c b/src/lib/libssl/src/crypto/comp/c_rle.c index efd366fa22..18bceae51e 100644 --- a/src/lib/libssl/src/crypto/comp/c_rle.c +++ b/src/lib/libssl/src/crypto/comp/c_rle.c | |||
| @@ -46,7 +46,7 @@ static int rle_expand_block(COMP_CTX *ctx, unsigned char *out, | |||
| 46 | { | 46 | { |
| 47 | int i; | 47 | int i; |
| 48 | 48 | ||
| 49 | if (olen < (ilen-1)) | 49 | if (ilen == 0 || olen < (ilen-1)) |
| 50 | { | 50 | { |
| 51 | /* ZZZZZZZZZZZZZZZZZZZZZZ */ | 51 | /* ZZZZZZZZZZZZZZZZZZZZZZ */ |
| 52 | return(-1); | 52 | return(-1); |
| @@ -59,4 +59,3 @@ static int rle_expand_block(COMP_CTX *ctx, unsigned char *out, | |||
| 59 | } | 59 | } |
| 60 | return(ilen-1); | 60 | return(ilen-1); |
| 61 | } | 61 | } |
| 62 | |||
diff --git a/src/lib/libssl/src/crypto/conf/conf_api.c b/src/lib/libssl/src/crypto/conf/conf_api.c index 22617e5fa1..f5fcbb9f6b 100644 --- a/src/lib/libssl/src/crypto/conf/conf_api.c +++ b/src/lib/libssl/src/crypto/conf/conf_api.c | |||
| @@ -64,6 +64,7 @@ | |||
| 64 | #endif | 64 | #endif |
| 65 | 65 | ||
| 66 | #include <assert.h> | 66 | #include <assert.h> |
| 67 | #include <stdlib.h> | ||
| 67 | #include <string.h> | 68 | #include <string.h> |
| 68 | #include <openssl/conf.h> | 69 | #include <openssl/conf.h> |
| 69 | #include <openssl/conf_api.h> | 70 | #include <openssl/conf_api.h> |
| @@ -285,7 +286,7 @@ CONF_VALUE *_CONF_new_section(CONF *conf, const char *section) | |||
| 285 | v->value=(char *)sk; | 286 | v->value=(char *)sk; |
| 286 | 287 | ||
| 287 | vv=lh_CONF_VALUE_insert(conf->data,v); | 288 | vv=lh_CONF_VALUE_insert(conf->data,v); |
| 288 | assert(vv == NULL); | 289 | OPENSSL_assert(vv == NULL); |
| 289 | ok=1; | 290 | ok=1; |
| 290 | err: | 291 | err: |
| 291 | if (!ok) | 292 | if (!ok) |
diff --git a/src/lib/libssl/src/crypto/conf/conf_def.c b/src/lib/libssl/src/crypto/conf/conf_def.c index 0b571b0394..cf951320af 100644 --- a/src/lib/libssl/src/crypto/conf/conf_def.c +++ b/src/lib/libssl/src/crypto/conf/conf_def.c | |||
| @@ -213,13 +213,12 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) | |||
| 213 | int bufnum=0,i,ii; | 213 | int bufnum=0,i,ii; |
| 214 | BUF_MEM *buff=NULL; | 214 | BUF_MEM *buff=NULL; |
| 215 | char *s,*p,*end; | 215 | char *s,*p,*end; |
| 216 | int again,n; | 216 | int again; |
| 217 | long eline=0; | 217 | long eline=0; |
| 218 | char btmp[DECIMAL_SIZE(eline)+1]; | 218 | char btmp[DECIMAL_SIZE(eline)+1]; |
| 219 | CONF_VALUE *v=NULL,*tv; | 219 | CONF_VALUE *v=NULL,*tv; |
| 220 | CONF_VALUE *sv=NULL; | 220 | CONF_VALUE *sv=NULL; |
| 221 | char *section=NULL,*buf; | 221 | char *section=NULL,*buf; |
| 222 | STACK_OF(CONF_VALUE) *section_sk=NULL,*ts; | ||
| 223 | char *start,*psection,*pname; | 222 | char *start,*psection,*pname; |
| 224 | void *h = (void *)(conf->data); | 223 | void *h = (void *)(conf->data); |
| 225 | 224 | ||
| @@ -250,7 +249,6 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) | |||
| 250 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | 249 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); |
| 251 | goto err; | 250 | goto err; |
| 252 | } | 251 | } |
| 253 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 254 | 252 | ||
| 255 | bufnum=0; | 253 | bufnum=0; |
| 256 | again=0; | 254 | again=0; |
| @@ -309,7 +307,6 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) | |||
| 309 | buf=buff->data; | 307 | buf=buff->data; |
| 310 | 308 | ||
| 311 | clear_comments(conf, buf); | 309 | clear_comments(conf, buf); |
| 312 | n=strlen(buf); | ||
| 313 | s=eat_ws(conf, buf); | 310 | s=eat_ws(conf, buf); |
| 314 | if (IS_EOF(conf,*s)) continue; /* blank line */ | 311 | if (IS_EOF(conf,*s)) continue; /* blank line */ |
| 315 | if (*s == '[') | 312 | if (*s == '[') |
| @@ -343,7 +340,6 @@ again: | |||
| 343 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | 340 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); |
| 344 | goto err; | 341 | goto err; |
| 345 | } | 342 | } |
| 346 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 347 | continue; | 343 | continue; |
| 348 | } | 344 | } |
| 349 | else | 345 | else |
| @@ -406,13 +402,9 @@ again: | |||
| 406 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | 402 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); |
| 407 | goto err; | 403 | goto err; |
| 408 | } | 404 | } |
| 409 | ts=(STACK_OF(CONF_VALUE) *)tv->value; | ||
| 410 | } | 405 | } |
| 411 | else | 406 | else |
| 412 | { | ||
| 413 | tv=sv; | 407 | tv=sv; |
| 414 | ts=section_sk; | ||
| 415 | } | ||
| 416 | #if 1 | 408 | #if 1 |
| 417 | if (_CONF_add_string(conf, tv, v) == 0) | 409 | if (_CONF_add_string(conf, tv, v) == 0) |
| 418 | { | 410 | { |
| @@ -465,9 +457,6 @@ err: | |||
| 465 | 457 | ||
| 466 | static void clear_comments(CONF *conf, char *p) | 458 | static void clear_comments(CONF *conf, char *p) |
| 467 | { | 459 | { |
| 468 | char *to; | ||
| 469 | |||
| 470 | to=p; | ||
| 471 | for (;;) | 460 | for (;;) |
| 472 | { | 461 | { |
| 473 | if (IS_FCOMMENT(conf,*p)) | 462 | if (IS_FCOMMENT(conf,*p)) |
diff --git a/src/lib/libssl/src/crypto/cryptlib.c b/src/lib/libssl/src/crypto/cryptlib.c index b4449b86d6..24fe123e14 100644 --- a/src/lib/libssl/src/crypto/cryptlib.c +++ b/src/lib/libssl/src/crypto/cryptlib.c | |||
| @@ -731,7 +731,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, | |||
| 731 | case DLL_THREAD_ATTACH: | 731 | case DLL_THREAD_ATTACH: |
| 732 | break; | 732 | break; |
| 733 | case DLL_THREAD_DETACH: | 733 | case DLL_THREAD_DETACH: |
| 734 | ERR_remove_state(0); | ||
| 735 | break; | 734 | break; |
| 736 | case DLL_PROCESS_DETACH: | 735 | case DLL_PROCESS_DETACH: |
| 737 | break; | 736 | break; |
| @@ -743,6 +742,16 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, | |||
| 743 | #if defined(_WIN32) && !defined(__CYGWIN__) | 742 | #if defined(_WIN32) && !defined(__CYGWIN__) |
| 744 | #include <tchar.h> | 743 | #include <tchar.h> |
| 745 | #include <signal.h> | 744 | #include <signal.h> |
| 745 | #ifdef __WATCOMC__ | ||
| 746 | #if defined(_UNICODE) || defined(__UNICODE__) | ||
| 747 | #define _vsntprintf _vsnwprintf | ||
| 748 | #else | ||
| 749 | #define _vsntprintf _vsnprintf | ||
| 750 | #endif | ||
| 751 | #endif | ||
| 752 | #ifdef _MSC_VER | ||
| 753 | #define alloca _alloca | ||
| 754 | #endif | ||
| 746 | 755 | ||
| 747 | #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 | 756 | #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 |
| 748 | int OPENSSL_isservice(void) | 757 | int OPENSSL_isservice(void) |
| @@ -773,11 +782,7 @@ int OPENSSL_isservice(void) | |||
| 773 | 782 | ||
| 774 | if (len>512) return -1; /* paranoia */ | 783 | if (len>512) return -1; /* paranoia */ |
| 775 | len++,len&=~1; /* paranoia */ | 784 | len++,len&=~1; /* paranoia */ |
| 776 | #ifdef _MSC_VER | ||
| 777 | name=(WCHAR *)_alloca(len+sizeof(WCHAR)); | ||
| 778 | #else | ||
| 779 | name=(WCHAR *)alloca(len+sizeof(WCHAR)); | 785 | name=(WCHAR *)alloca(len+sizeof(WCHAR)); |
| 780 | #endif | ||
| 781 | if (!GetUserObjectInformationW (h,UOI_NAME,name,len,&len)) | 786 | if (!GetUserObjectInformationW (h,UOI_NAME,name,len,&len)) |
| 782 | return -1; | 787 | return -1; |
| 783 | 788 | ||
| @@ -822,11 +827,7 @@ void OPENSSL_showfatal (const char *fmta,...) | |||
| 822 | size_t len_0=strlen(fmta)+1,i; | 827 | size_t len_0=strlen(fmta)+1,i; |
| 823 | WCHAR *fmtw; | 828 | WCHAR *fmtw; |
| 824 | 829 | ||
| 825 | #ifdef _MSC_VER | 830 | fmtw = (WCHAR *)alloca(len_0*sizeof(WCHAR)); |
| 826 | fmtw = (WCHAR *)_alloca (len_0*sizeof(WCHAR)); | ||
| 827 | #else | ||
| 828 | fmtw = (WCHAR *)alloca (len_0*sizeof(WCHAR)); | ||
| 829 | #endif | ||
| 830 | if (fmtw == NULL) { fmt=(const TCHAR *)L"no stack?"; break; } | 831 | if (fmtw == NULL) { fmt=(const TCHAR *)L"no stack?"; break; } |
| 831 | 832 | ||
| 832 | #ifndef OPENSSL_NO_MULTIBYTE | 833 | #ifndef OPENSSL_NO_MULTIBYTE |
diff --git a/src/lib/libssl/src/crypto/crypto-lib.com b/src/lib/libssl/src/crypto/crypto-lib.com index a4b6635091..a29c0afd93 100644 --- a/src/lib/libssl/src/crypto/crypto-lib.com +++ b/src/lib/libssl/src/crypto/crypto-lib.com | |||
| @@ -47,11 +47,33 @@ $! P6, if defined, sets a choice of crypto methods to compile. | |||
| 47 | $! WARNING: this should only be done to recompile some part of an already | 47 | $! WARNING: this should only be done to recompile some part of an already |
| 48 | $! fully compiled library. | 48 | $! fully compiled library. |
| 49 | $! | 49 | $! |
| 50 | $! P7, if defined, specifies the C pointer size. Ignored on VAX. | ||
| 51 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) | ||
| 52 | $! Supported values are: | ||
| 53 | $! | ||
| 54 | $! "" Compile with default (/NOPOINTER_SIZE) | ||
| 55 | $! 32 Compile with /POINTER_SIZE=32 (SHORT) | ||
| 56 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]). | ||
| 57 | $! (Automatically select ARGV if compiler supports it.) | ||
| 58 | $! 64= Compile with /POINTER_SIZE=64 (LONG). | ||
| 59 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). | ||
| 60 | $! | ||
| 61 | $! P8, if defined, specifies a directory where ZLIB files (zlib.h, | ||
| 62 | $! libz.olb) may be found. Optionally, a non-default object library | ||
| 63 | $! name may be included ("dev:[dir]libz_64.olb", for example). | ||
| 64 | $! | ||
| 65 | $! | ||
| 66 | $! Announce/identify. | ||
| 67 | $! | ||
| 68 | $ proc = f$environment( "procedure") | ||
| 69 | $ write sys$output "@@@ "+ - | ||
| 70 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 50 | $! | 71 | $! |
| 51 | $! Define A TCP/IP Library That We Will Need To Link To. | 72 | $! Define A TCP/IP Library That We Will Need To Link To. |
| 52 | $! (That Is, If We Need To Link To One.) | 73 | $! (That Is, If We Need To Link To One.) |
| 53 | $! | 74 | $! |
| 54 | $ TCPIP_LIB = "" | 75 | $ TCPIP_LIB = "" |
| 76 | $ ZLIB_LIB = "" | ||
| 55 | $! | 77 | $! |
| 56 | $! Check Which Architecture We Are Using. | 78 | $! Check Which Architecture We Are Using. |
| 57 | $! | 79 | $! |
| @@ -75,6 +97,11 @@ $! End The Architecture Check. | |||
| 75 | $! | 97 | $! |
| 76 | $ ENDIF | 98 | $ ENDIF |
| 77 | $! | 99 | $! |
| 100 | $ ARCHD = ARCH | ||
| 101 | $ LIB32 = "32" | ||
| 102 | $ OPT_FILE = "" | ||
| 103 | $ POINTER_SIZE = "" | ||
| 104 | $! | ||
| 78 | $! Define The Different Encryption Types. | 105 | $! Define The Different Encryption Types. |
| 79 | $! NOTE: Some might think this list ugly. However, it's made this way to | 106 | $! NOTE: Some might think this list ugly. However, it's made this way to |
| 80 | $! reflect the SDIRS variable in [-]Makefile.org as closely as possible, | 107 | $! reflect the SDIRS variable in [-]Makefile.org as closely as possible, |
| @@ -91,17 +118,29 @@ $ ENCRYPT_TYPES = "Basic,"+ - | |||
| 91 | "EVP,EVP_2,EVP_3,ASN1,ASN1_2,PEM,X509,X509V3,"+ - | 118 | "EVP,EVP_2,EVP_3,ASN1,ASN1_2,PEM,X509,X509V3,"+ - |
| 92 | "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ - | 119 | "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ - |
| 93 | "STORE,CMS,PQUEUE,TS,JPAKE" | 120 | "STORE,CMS,PQUEUE,TS,JPAKE" |
| 94 | $! Define The OBJ Directory. | ||
| 95 | $! | 121 | $! |
| 96 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.CRYPTO] | 122 | $! Check To Make Sure We Have Valid Command Line Parameters. |
| 123 | $! | ||
| 124 | $ GOSUB CHECK_OPTIONS | ||
| 97 | $! | 125 | $! |
| 98 | $! Define The EXE Directory. | 126 | $! Define The OBJ and EXE Directories. |
| 99 | $! | 127 | $! |
| 100 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.CRYPTO] | 128 | $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.CRYPTO] |
| 129 | $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO] | ||
| 101 | $! | 130 | $! |
| 102 | $! Check To Make Sure We Have Valid Command Line Parameters. | 131 | $! Specify the destination directory in any /MAP option. |
| 103 | $! | 132 | $! |
| 104 | $ GOSUB CHECK_OPTIONS | 133 | $ if (LINKMAP .eqs. "MAP") |
| 134 | $ then | ||
| 135 | $ LINKMAP = LINKMAP+ "=''EXE_DIR'" | ||
| 136 | $ endif | ||
| 137 | $! | ||
| 138 | $! Add the location prefix to the linker options file name. | ||
| 139 | $! | ||
| 140 | $ if (OPT_FILE .nes. "") | ||
| 141 | $ then | ||
| 142 | $ OPT_FILE = EXE_DIR+ OPT_FILE | ||
| 143 | $ endif | ||
| 105 | $! | 144 | $! |
| 106 | $! Initialise logical names and such | 145 | $! Initialise logical names and such |
| 107 | $! | 146 | $! |
| @@ -109,7 +148,7 @@ $ GOSUB INITIALISE | |||
| 109 | $! | 148 | $! |
| 110 | $! Tell The User What Kind of Machine We Run On. | 149 | $! Tell The User What Kind of Machine We Run On. |
| 111 | $! | 150 | $! |
| 112 | $ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine." | 151 | $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" |
| 113 | $! | 152 | $! |
| 114 | $! | 153 | $! |
| 115 | $! Check To See If The Architecture Specific OBJ Directory Exists. | 154 | $! Check To See If The Architecture Specific OBJ Directory Exists. |
| @@ -140,11 +179,11 @@ $ ENDIF | |||
| 140 | $! | 179 | $! |
| 141 | $! Define The Library Name. | 180 | $! Define The Library Name. |
| 142 | $! | 181 | $! |
| 143 | $ LIB_NAME := 'EXE_DIR'LIBCRYPTO.OLB | 182 | $ LIB_NAME := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB |
| 144 | $! | 183 | $! |
| 145 | $! Define The CRYPTO-LIB We Are To Use. | 184 | $! Define The CRYPTO-LIB We Are To Use. |
| 146 | $! | 185 | $! |
| 147 | $ CRYPTO_LIB := 'EXE_DIR'LIBCRYPTO.OLB | 186 | $ CRYPTO_LIB := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB |
| 148 | $! | 187 | $! |
| 149 | $! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library... | 188 | $! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library... |
| 150 | $! | 189 | $! |
| @@ -193,7 +232,7 @@ $ LIB_CAST = "c_skey,c_ecb,c_enc,c_cfb64,c_ofb64" | |||
| 193 | $ LIB_CAMELLIA = "camellia,cmll_misc,cmll_ecb,cmll_cbc,cmll_ofb,"+ - | 232 | $ LIB_CAMELLIA = "camellia,cmll_misc,cmll_ecb,cmll_cbc,cmll_ofb,"+ - |
| 194 | "cmll_cfb,cmll_ctr" | 233 | "cmll_cfb,cmll_ctr" |
| 195 | $ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb" | 234 | $ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb" |
| 196 | $ LIB_MODES = "cbc128,ctr128,cfb128,ofb128" | 235 | $ LIB_MODES = "cbc128,ctr128,cts128,cfb128,ofb128" |
| 197 | $ LIB_BN_ASM = "[.asm]vms.mar,vms-helper" | 236 | $ LIB_BN_ASM = "[.asm]vms.mar,vms-helper" |
| 198 | $ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN - | 237 | $ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN - |
| 199 | LIB_BN_ASM = "bn_asm" | 238 | LIB_BN_ASM = "bn_asm" |
| @@ -301,15 +340,23 @@ $ LIB_JPAKE = "jpake,jpake_err" | |||
| 301 | $! | 340 | $! |
| 302 | $! Setup exceptional compilations | 341 | $! Setup exceptional compilations |
| 303 | $! | 342 | $! |
| 304 | $ ! Add definitions for no threads on OpenVMS 7.1 and higher | 343 | $ CC3_SHOWN = 0 |
| 344 | $ CC4_SHOWN = 0 | ||
| 345 | $ CC5_SHOWN = 0 | ||
| 346 | $ CC6_SHOWN = 0 | ||
| 347 | $! | ||
| 348 | $! The following lists must have leading and trailing commas, and no | ||
| 349 | $! embedded spaces. (They are scanned for ",name,".) | ||
| 350 | $! | ||
| 351 | $ ! Add definitions for no threads on OpenVMS 7.1 and higher. | ||
| 305 | $ COMPILEWITH_CC3 = ",bss_rtcp," | 352 | $ COMPILEWITH_CC3 = ",bss_rtcp," |
| 306 | $ ! Disable the DOLLARID warning | 353 | $ ! Disable the DOLLARID warning. Not needed with /STANDARD=RELAXED. |
| 307 | $ COMPILEWITH_CC4 = ",a_utctm,bss_log,o_time,o_dir" | 354 | $ COMPILEWITH_CC4 = "" !!! ",a_utctm,bss_log,o_time,o_dir," |
| 308 | $ ! Disable disjoint optimization | 355 | $ ! Disable disjoint optimization on VAX with DECC. |
| 309 | $ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + - | 356 | $ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + - |
| 310 | "seed,sha_dgst,sha1dgst,rmd_dgst,bf_enc," | 357 | "seed,sha_dgst,sha1dgst,rmd_dgst,bf_enc," |
| 311 | $ ! Disable the MIXLINKAGE warning | 358 | $ ! Disable the MIXLINKAGE warning. |
| 312 | $ COMPILEWITH_CC6 = ",enc_read,set_key," | 359 | $ COMPILEWITH_CC6 = "" !!! ",enc_read,set_key," |
| 313 | $! | 360 | $! |
| 314 | $! Figure Out What Other Modules We Are To Build. | 361 | $! Figure Out What Other Modules We Are To Build. |
| 315 | $! | 362 | $! |
| @@ -515,31 +562,60 @@ $ WRITE SYS$OUTPUT "Compiling The ",FILE_NAME," File. (",BUILDALL,",",STATE," | |||
| 515 | $ ENDIF | 562 | $ ENDIF |
| 516 | $ IF (MODULE_NAME.NES."") | 563 | $ IF (MODULE_NAME.NES."") |
| 517 | $ THEN | 564 | $ THEN |
| 518 | $ WRITE SYS$OUTPUT " ",FILE_NAME,"" | 565 | $ WRITE SYS$OUTPUT " ",FILE_NAME,"" |
| 519 | $ ENDIF | 566 | $ ENDIF |
| 520 | $! | 567 | $! |
| 521 | $! Compile The File. | 568 | $! Compile The File. |
| 522 | $! | 569 | $! |
| 523 | $ ON ERROR THEN GOTO NEXT_FILE | 570 | $ ON ERROR THEN GOTO NEXT_FILE |
| 524 | $ FILE_NAME0 = F$ELEMENT(0,".",FILE_NAME) | 571 | $ FILE_NAME0 = ","+ F$ELEMENT(0,".",FILE_NAME)+ "," |
| 525 | $ IF FILE_NAME - ".mar" .NES. FILE_NAME | 572 | $ IF FILE_NAME - ".mar" .NES. FILE_NAME |
| 526 | $ THEN | 573 | $ THEN |
| 527 | $ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 574 | $ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 528 | $ ELSE | 575 | $ ELSE |
| 529 | $ IF COMPILEWITH_CC3 - FILE_NAME0 .NES. COMPILEWITH_CC3 | 576 | $ IF COMPILEWITH_CC3 - FILE_NAME0 .NES. COMPILEWITH_CC3 |
| 530 | $ THEN | 577 | $ THEN |
| 578 | $ write sys$output " \Using special rule (3)" | ||
| 579 | $ if (.not. CC3_SHOWN) | ||
| 580 | $ then | ||
| 581 | $ CC3_SHOWN = 1 | ||
| 582 | $ x = " "+ CC3 | ||
| 583 | $ write /symbol sys$output x | ||
| 584 | $ endif | ||
| 531 | $ CC3/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 585 | $ CC3/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 532 | $ ELSE | 586 | $ ELSE |
| 533 | $ IF COMPILEWITH_CC4 - FILE_NAME0 .NES. COMPILEWITH_CC4 | 587 | $ IF COMPILEWITH_CC4 - FILE_NAME0 .NES. COMPILEWITH_CC4 |
| 534 | $ THEN | 588 | $ THEN |
| 589 | $ write /symbol sys$output " \Using special rule (4)" | ||
| 590 | $ if (.not. CC4_SHOWN) | ||
| 591 | $ then | ||
| 592 | $ CC4_SHOWN = 1 | ||
| 593 | $ x = " "+ CC4 | ||
| 594 | $ write /symbol sys$output x | ||
| 595 | $ endif | ||
| 535 | $ CC4/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 596 | $ CC4/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 536 | $ ELSE | 597 | $ ELSE |
| 537 | $ IF COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5 | 598 | $ IF CC5_DIFFERENT .AND. - |
| 599 | (COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5) | ||
| 538 | $ THEN | 600 | $ THEN |
| 601 | $ write sys$output " \Using special rule (5)" | ||
| 602 | $ if (.not. CC5_SHOWN) | ||
| 603 | $ then | ||
| 604 | $ CC5_SHOWN = 1 | ||
| 605 | $ x = " "+ CC5 | ||
| 606 | $ write /symbol sys$output x | ||
| 607 | $ endif | ||
| 539 | $ CC5/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 608 | $ CC5/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 540 | $ ELSE | 609 | $ ELSE |
| 541 | $ IF COMPILEWITH_CC6 - FILE_NAME0 .NES. COMPILEWITH_CC6 | 610 | $ IF COMPILEWITH_CC6 - FILE_NAME0 .NES. COMPILEWITH_CC6 |
| 542 | $ THEN | 611 | $ THEN |
| 612 | $ write sys$output " \Using special rule (6)" | ||
| 613 | $ if (.not. CC6_SHOWN) | ||
| 614 | $ then | ||
| 615 | $ CC6_SHOWN = 1 | ||
| 616 | $ x = " "+ CC6 | ||
| 617 | $ write /symbol sys$output x | ||
| 618 | $ endif | ||
| 543 | $ CC6/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 619 | $ CC6/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 544 | $ ELSE | 620 | $ ELSE |
| 545 | $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | 621 | $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| @@ -586,38 +662,22 @@ $! SHOW SYMBOL APPLICATION* | |||
| 586 | $! | 662 | $! |
| 587 | $! Tell the user what happens | 663 | $! Tell the user what happens |
| 588 | $! | 664 | $! |
| 589 | $ WRITE SYS$OUTPUT " ",APPLICATION,".exe" | 665 | $ WRITE SYS$OUTPUT " ",APPLICATION,".exe" |
| 590 | $! | 666 | $! |
| 591 | $! Link The Program. | 667 | $! Link The Program. |
| 592 | $! | 668 | $! |
| 593 | $ ON ERROR THEN GOTO NEXT_APPLICATION | 669 | $ ON ERROR THEN GOTO NEXT_APPLICATION |
| 594 | $! | 670 | $! |
| 595 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | 671 | $! Link With A TCP/IP Library. |
| 596 | $! | 672 | $! |
| 597 | $ IF (TCPIP_LIB.NES."") | 673 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' - |
| 598 | $ THEN | 674 | /EXE='EXE_DIR''APPLICATION'.EXE - |
| 675 | 'OBJ_DIR''APPLICATION_OBJECTS', - | ||
| 676 | 'CRYPTO_LIB'/LIBRARY - | ||
| 677 | 'TCPIP_LIB' - | ||
| 678 | 'ZLIB_LIB' - | ||
| 679 | ,'OPT_FILE' /OPTIONS | ||
| 599 | $! | 680 | $! |
| 600 | $! Link With A TCP/IP Library. | ||
| 601 | $! | ||
| 602 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - | ||
| 603 | 'OBJ_DIR''APPLICATION_OBJECTS', - | ||
| 604 | 'CRYPTO_LIB'/LIBRARY, - | ||
| 605 | 'TCPIP_LIB','OPT_FILE'/OPTION | ||
| 606 | $! | ||
| 607 | $! Else... | ||
| 608 | $! | ||
| 609 | $ ELSE | ||
| 610 | $! | ||
| 611 | $! Don't Link With A TCP/IP Library. | ||
| 612 | $! | ||
| 613 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - | ||
| 614 | 'OBJ_DIR''APPLICATION_OBJECTS',- | ||
| 615 | 'CRYPTO_LIB'/LIBRARY, - | ||
| 616 | 'OPT_FILE'/OPTION | ||
| 617 | $! | ||
| 618 | $! End The TCP/IP Library Check. | ||
| 619 | $! | ||
| 620 | $ ENDIF | ||
| 621 | $ GOTO NEXT_APPLICATION | 681 | $ GOTO NEXT_APPLICATION |
| 622 | $ APPLICATION_DONE: | 682 | $ APPLICATION_DONE: |
| 623 | $ ENDIF | 683 | $ ENDIF |
| @@ -656,7 +716,7 @@ $! | |||
| 656 | $ CREATE 'OPT_FILE' | 716 | $ CREATE 'OPT_FILE' |
| 657 | $DECK | 717 | $DECK |
| 658 | ! | 718 | ! |
| 659 | ! Default System Options File To Link Agianst | 719 | ! Default System Options File To Link Against |
| 660 | ! The Sharable VAX C Runtime Library. | 720 | ! The Sharable VAX C Runtime Library. |
| 661 | ! | 721 | ! |
| 662 | SYS$SHARE:VAXCRTL.EXE/SHARE | 722 | SYS$SHARE:VAXCRTL.EXE/SHARE |
| @@ -685,7 +745,7 @@ $! | |||
| 685 | $ CREATE 'OPT_FILE' | 745 | $ CREATE 'OPT_FILE' |
| 686 | $DECK | 746 | $DECK |
| 687 | ! | 747 | ! |
| 688 | ! Default System Options File To Link Agianst | 748 | ! Default System Options File To Link Against |
| 689 | ! The Sharable C Runtime Library. | 749 | ! The Sharable C Runtime Library. |
| 690 | ! | 750 | ! |
| 691 | GNU_CC:[000000]GCCLIB/LIBRARY | 751 | GNU_CC:[000000]GCCLIB/LIBRARY |
| @@ -720,7 +780,7 @@ $! | |||
| 720 | $ CREATE 'OPT_FILE' | 780 | $ CREATE 'OPT_FILE' |
| 721 | $DECK | 781 | $DECK |
| 722 | ! | 782 | ! |
| 723 | ! Default System Options File To Link Agianst | 783 | ! Default System Options File To Link Against |
| 724 | ! The Sharable DEC C Runtime Library. | 784 | ! The Sharable DEC C Runtime Library. |
| 725 | ! | 785 | ! |
| 726 | SYS$SHARE:DECC$SHR.EXE/SHARE | 786 | SYS$SHARE:DECC$SHR.EXE/SHARE |
| @@ -735,7 +795,7 @@ $! | |||
| 735 | $ CREATE 'OPT_FILE' | 795 | $ CREATE 'OPT_FILE' |
| 736 | $DECK | 796 | $DECK |
| 737 | ! | 797 | ! |
| 738 | ! Default System Options File For non-VAX To Link Agianst | 798 | ! Default System Options File For non-VAX To Link Against |
| 739 | ! The Sharable C Runtime Library. | 799 | ! The Sharable C Runtime Library. |
| 740 | ! | 800 | ! |
| 741 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE | 801 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE |
| @@ -756,7 +816,7 @@ $ ENDIF | |||
| 756 | $! | 816 | $! |
| 757 | $! Tell The User What Linker Option File We Are Using. | 817 | $! Tell The User What Linker Option File We Are Using. |
| 758 | $! | 818 | $! |
| 759 | $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"." | 819 | $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"." |
| 760 | $! | 820 | $! |
| 761 | $! Time To RETURN. | 821 | $! Time To RETURN. |
| 762 | $! | 822 | $! |
| @@ -803,8 +863,8 @@ $ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.E | |||
| 803 | $ WRITE SYS$OUTPUT "" | 863 | $ WRITE SYS$OUTPUT "" |
| 804 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" | 864 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" |
| 805 | $ WRITE SYS$OUTPUT "" | 865 | $ WRITE SYS$OUTPUT "" |
| 806 | $ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture." | 866 | $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture." |
| 807 | $ WRITE SYS$OUTPUT " IA64 : IA64 Architecture." | 867 | $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture." |
| 808 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." | 868 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." |
| 809 | $ WRITE SYS$OUTPUT "" | 869 | $ WRITE SYS$OUTPUT "" |
| 810 | $! | 870 | $! |
| @@ -825,15 +885,16 @@ $! | |||
| 825 | $ IF (P2.EQS."NODEBUG") | 885 | $ IF (P2.EQS."NODEBUG") |
| 826 | $ THEN | 886 | $ THEN |
| 827 | $! | 887 | $! |
| 828 | $! P2 Is NODEBUG, So Compile Without The Debugger Information. | 888 | $! P2 Is NODEBUG, So Compile Without The Debugger Information. |
| 829 | $! | 889 | $! |
| 830 | $ DEBUGGER = "NODEBUG" | 890 | $ DEBUGGER = "NODEBUG" |
| 831 | $ TRACEBACK = "NOTRACEBACK" | 891 | $ LINKMAP = "NOMAP" |
| 832 | $ GCC_OPTIMIZE = "OPTIMIZE" | 892 | $ TRACEBACK = "NOTRACEBACK" |
| 833 | $ CC_OPTIMIZE = "OPTIMIZE" | 893 | $ GCC_OPTIMIZE = "OPTIMIZE" |
| 834 | $ MACRO_OPTIMIZE = "OPTIMIZE" | 894 | $ CC_OPTIMIZE = "OPTIMIZE" |
| 835 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | 895 | $ MACRO_OPTIMIZE = "OPTIMIZE" |
| 836 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | 896 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
| 897 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
| 837 | $ ELSE | 898 | $ ELSE |
| 838 | $! | 899 | $! |
| 839 | $! Check To See If We Are To Compile With Debugger Information. | 900 | $! Check To See If We Are To Compile With Debugger Information. |
| @@ -844,6 +905,7 @@ $! | |||
| 844 | $! Compile With Debugger Information. | 905 | $! Compile With Debugger Information. |
| 845 | $! | 906 | $! |
| 846 | $ DEBUGGER = "DEBUG" | 907 | $ DEBUGGER = "DEBUG" |
| 908 | $ LINKMAP = "MAP" | ||
| 847 | $ TRACEBACK = "TRACEBACK" | 909 | $ TRACEBACK = "TRACEBACK" |
| 848 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | 910 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
| 849 | $ CC_OPTIMIZE = "NOOPTIMIZE" | 911 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
| @@ -852,7 +914,7 @@ $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." | |||
| 852 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." | 914 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." |
| 853 | $ ELSE | 915 | $ ELSE |
| 854 | $! | 916 | $! |
| 855 | $! They Entered An Invalid Option.. | 917 | $! They Entered An Invalid Option. |
| 856 | $! | 918 | $! |
| 857 | $ WRITE SYS$OUTPUT "" | 919 | $ WRITE SYS$OUTPUT "" |
| 858 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" | 920 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" |
| @@ -907,6 +969,60 @@ $! End The P5 Check. | |||
| 907 | $! | 969 | $! |
| 908 | $ ENDIF | 970 | $ ENDIF |
| 909 | $! | 971 | $! |
| 972 | $! Check P7 (POINTER_SIZE). | ||
| 973 | $! | ||
| 974 | $ IF (P7 .NES. "") .AND. (ARCH .NES. "VAX") | ||
| 975 | $ THEN | ||
| 976 | $! | ||
| 977 | $ IF (P7 .EQS. "32") | ||
| 978 | $ THEN | ||
| 979 | $ POINTER_SIZE = " /POINTER_SIZE=32" | ||
| 980 | $ ELSE | ||
| 981 | $ POINTER_SIZE = F$EDIT( P7, "COLLAPSE, UPCASE") | ||
| 982 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
| 983 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
| 984 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
| 985 | $ THEN | ||
| 986 | $ ARCHD = ARCH+ "_64" | ||
| 987 | $ LIB32 = "" | ||
| 988 | $ POINTER_SIZE = " /POINTER_SIZE=64" | ||
| 989 | $ ELSE | ||
| 990 | $! | ||
| 991 | $! Tell The User Entered An Invalid Option. | ||
| 992 | $! | ||
| 993 | $ WRITE SYS$OUTPUT "" | ||
| 994 | $ WRITE SYS$OUTPUT "The Option ", P7, - | ||
| 995 | " Is Invalid. The Valid Options Are:" | ||
| 996 | $ WRITE SYS$OUTPUT "" | ||
| 997 | $ WRITE SYS$OUTPUT - | ||
| 998 | " """" : Compile with default (short) pointers." | ||
| 999 | $ WRITE SYS$OUTPUT - | ||
| 1000 | " 32 : Compile with 32-bit (short) pointers." | ||
| 1001 | $ WRITE SYS$OUTPUT - | ||
| 1002 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
| 1003 | $ WRITE SYS$OUTPUT - | ||
| 1004 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
| 1005 | $ WRITE SYS$OUTPUT - | ||
| 1006 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
| 1007 | $ WRITE SYS$OUTPUT "" | ||
| 1008 | $! | ||
| 1009 | $! Time To EXIT. | ||
| 1010 | $! | ||
| 1011 | $ EXIT | ||
| 1012 | $! | ||
| 1013 | $ ENDIF | ||
| 1014 | $! | ||
| 1015 | $ ENDIF | ||
| 1016 | $! | ||
| 1017 | $! End The P7 (POINTER_SIZE) Check. | ||
| 1018 | $! | ||
| 1019 | $ ENDIF | ||
| 1020 | $! | ||
| 1021 | $! Set basic C compiler /INCLUDE directories. | ||
| 1022 | $! | ||
| 1023 | $ CC_INCLUDES = "SYS$DISK:[.''ARCHD'],SYS$DISK:[],SYS$DISK:[-],"+ - | ||
| 1024 | "SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1]" | ||
| 1025 | $! | ||
| 910 | $! Check To See If P3 Is Blank. | 1026 | $! Check To See If P3 Is Blank. |
| 911 | $! | 1027 | $! |
| 912 | $ IF (P3.EQS."") | 1028 | $ IF (P3.EQS."") |
| @@ -1007,11 +1123,64 @@ $ CCDEFS = "TCPIP_TYPE_''P4',DSO_VMS" | |||
| 1007 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 1123 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
| 1008 | $ CCEXTRAFLAGS = "" | 1124 | $ CCEXTRAFLAGS = "" |
| 1009 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 1125 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
| 1010 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" | 1126 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" |
| 1011 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 1127 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
| 1012 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | 1128 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
| 1013 | $! | 1129 | $! |
| 1014 | $! Check To See If The User Entered A Valid Paramter. | 1130 | $! Check To See If We Have A ZLIB Option. |
| 1131 | $! | ||
| 1132 | $ ZLIB = P8 | ||
| 1133 | $ IF (ZLIB .NES. "") | ||
| 1134 | $ THEN | ||
| 1135 | $! | ||
| 1136 | $! Check for expected ZLIB files. | ||
| 1137 | $! | ||
| 1138 | $ err = 0 | ||
| 1139 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
| 1140 | $ if (f$search( file1) .eqs. "") | ||
| 1141 | $ then | ||
| 1142 | $ WRITE SYS$OUTPUT "" | ||
| 1143 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 1144 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
| 1145 | $ err = 1 | ||
| 1146 | $ endif | ||
| 1147 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" | ||
| 1148 | $! | ||
| 1149 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
| 1150 | $ if (f$search( file2) .eqs. "") | ||
| 1151 | $ then | ||
| 1152 | $ if (err .eq. 0) | ||
| 1153 | $ then | ||
| 1154 | $ WRITE SYS$OUTPUT "" | ||
| 1155 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 1156 | $ endif | ||
| 1157 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
| 1158 | $ WRITE SYS$OUTPUT "" | ||
| 1159 | $ err = err+ 2 | ||
| 1160 | $ endif | ||
| 1161 | $ if (err .eq. 1) | ||
| 1162 | $ then | ||
| 1163 | $ WRITE SYS$OUTPUT "" | ||
| 1164 | $ endif | ||
| 1165 | $! | ||
| 1166 | $ if (err .ne. 0) | ||
| 1167 | $ then | ||
| 1168 | $ EXIT | ||
| 1169 | $ endif | ||
| 1170 | $! | ||
| 1171 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS | ||
| 1172 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 | ||
| 1173 | $ ZLIB_LIB = ", ''file2' /library" | ||
| 1174 | $! | ||
| 1175 | $! Print info | ||
| 1176 | $! | ||
| 1177 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
| 1178 | $! | ||
| 1179 | $! End The ZLIB Check. | ||
| 1180 | $! | ||
| 1181 | $ ENDIF | ||
| 1182 | $! | ||
| 1183 | $! Check To See If The User Entered A Valid Parameter. | ||
| 1015 | $! | 1184 | $! |
| 1016 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") | 1185 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") |
| 1017 | $ THEN | 1186 | $ THEN |
| @@ -1034,14 +1203,14 @@ $! | |||
| 1034 | $ CC = "CC" | 1203 | $ CC = "CC" |
| 1035 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 1204 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 1036 | THEN CC = "CC/DECC" | 1205 | THEN CC = "CC/DECC" |
| 1037 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | 1206 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
| 1038 | "/NOLIST/PREFIX=ALL" + - | 1207 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
| 1039 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[._''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + - | 1208 | " /INCLUDE=(''CC_INCLUDES')"+ - |
| 1040 | CCEXTRAFLAGS | 1209 | CCEXTRAFLAGS |
| 1041 | $! | 1210 | $! |
| 1042 | $! Define The Linker Options File Name. | 1211 | $! Define The Linker Options File Name. |
| 1043 | $! | 1212 | $! |
| 1044 | $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" | 1213 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
| 1045 | $! | 1214 | $! |
| 1046 | $! End DECC Check. | 1215 | $! End DECC Check. |
| 1047 | $! | 1216 | $! |
| @@ -1070,7 +1239,7 @@ $ EXIT | |||
| 1070 | $ ENDIF | 1239 | $ ENDIF |
| 1071 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | 1240 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" |
| 1072 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 1241 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 1073 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[._''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + - | 1242 | "/INCLUDE=(''CC_INCLUDES')"+ - |
| 1074 | CCEXTRAFLAGS | 1243 | CCEXTRAFLAGS |
| 1075 | $ CCDEFS = """VAXC""," + CCDEFS | 1244 | $ CCDEFS = """VAXC""," + CCDEFS |
| 1076 | $! | 1245 | $! |
| @@ -1080,7 +1249,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] | |||
| 1080 | $! | 1249 | $! |
| 1081 | $! Define The Linker Options File Name. | 1250 | $! Define The Linker Options File Name. |
| 1082 | $! | 1251 | $! |
| 1083 | $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" | 1252 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
| 1084 | $! | 1253 | $! |
| 1085 | $! End VAXC Check | 1254 | $! End VAXC Check |
| 1086 | $! | 1255 | $! |
| @@ -1102,12 +1271,12 @@ $! | |||
| 1102 | $! Use GNU C... | 1271 | $! Use GNU C... |
| 1103 | $! | 1272 | $! |
| 1104 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 1273 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 1105 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[._''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + - | 1274 | "/INCLUDE=(''CC_INCLUDES')"+ - |
| 1106 | CCEXTRAFLAGS | 1275 | CCEXTRAFLAGS |
| 1107 | $! | 1276 | $! |
| 1108 | $! Define The Linker Options File Name. | 1277 | $! Define The Linker Options File Name. |
| 1109 | $! | 1278 | $! |
| 1110 | $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" | 1279 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
| 1111 | $! | 1280 | $! |
| 1112 | $! End The GNU C Check. | 1281 | $! End The GNU C Check. |
| 1113 | $! | 1282 | $! |
| @@ -1128,22 +1297,24 @@ $ CC6DISABLEWARNINGS = "MIXLINKAGE" | |||
| 1128 | $ ELSE | 1297 | $ ELSE |
| 1129 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" | 1298 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" |
| 1130 | $ CC6DISABLEWARNINGS = CCDISABLEWARNINGS + ",MIXLINKAGE" | 1299 | $ CC6DISABLEWARNINGS = CCDISABLEWARNINGS + ",MIXLINKAGE" |
| 1131 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | 1300 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
| 1132 | $ ENDIF | 1301 | $ ENDIF |
| 1133 | $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" | 1302 | $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" |
| 1134 | $ CC6DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC6DISABLEWARNINGS + "))" | 1303 | $ CC6DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC6DISABLEWARNINGS + "))" |
| 1135 | $ ELSE | 1304 | $ ELSE |
| 1136 | $ CCDISABLEWARNINGS = "" | 1305 | $ CCDISABLEWARNINGS = "" |
| 1137 | $ CC4DISABLEWARNINGS = "" | 1306 | $ CC4DISABLEWARNINGS = "" |
| 1138 | $ CC6DISABLEWARNINGS = "" | 1307 | $ CC6DISABLEWARNINGS = "" |
| 1139 | $ ENDIF | 1308 | $ ENDIF |
| 1140 | $ CC3 = CC + "/DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS | 1309 | $ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS |
| 1141 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 1310 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
| 1142 | $ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG" | 1311 | $ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG" |
| 1143 | $ THEN | 1312 | $ THEN |
| 1144 | $ CC5 = CC + "/OPTIMIZE=NODISJOINT" | 1313 | $ CC5 = CC + " /OPTIMIZE=NODISJOINT" |
| 1314 | $ CC5_DIFFERENT = 1 | ||
| 1145 | $ ELSE | 1315 | $ ELSE |
| 1146 | $ CC5 = CC + "/NOOPTIMIZE" | 1316 | $ CC5 = CC |
| 1317 | $ CC5_DIFFERENT = 0 | ||
| 1147 | $ ENDIF | 1318 | $ ENDIF |
| 1148 | $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS | 1319 | $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS |
| 1149 | $ CC6 = CC - CCDISABLEWARNINGS + CC6DISABLEWARNINGS | 1320 | $ CC6 = CC - CCDISABLEWARNINGS + CC6DISABLEWARNINGS |
| @@ -1196,7 +1367,7 @@ $ THEN | |||
| 1196 | $! | 1367 | $! |
| 1197 | $! Set the library to use SOCKETSHR | 1368 | $! Set the library to use SOCKETSHR |
| 1198 | $! | 1369 | $! |
| 1199 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" | 1370 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
| 1200 | $! | 1371 | $! |
| 1201 | $! Done with SOCKETSHR | 1372 | $! Done with SOCKETSHR |
| 1202 | $! | 1373 | $! |
| @@ -1222,13 +1393,13 @@ $ THEN | |||
| 1222 | $! | 1393 | $! |
| 1223 | $! Set the library to use UCX. | 1394 | $! Set the library to use UCX. |
| 1224 | $! | 1395 | $! |
| 1225 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" | 1396 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
| 1226 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 1397 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
| 1227 | $ THEN | 1398 | $ THEN |
| 1228 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" | 1399 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
| 1229 | $ ELSE | 1400 | $ ELSE |
| 1230 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 1401 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
| 1231 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT" | 1402 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
| 1232 | $ ENDIF | 1403 | $ ENDIF |
| 1233 | $! | 1404 | $! |
| 1234 | $! Done with UCX | 1405 | $! Done with UCX |
| @@ -1242,7 +1413,7 @@ $ THEN | |||
| 1242 | $! | 1413 | $! |
| 1243 | $! Set the library to use TCPIP (post UCX). | 1414 | $! Set the library to use TCPIP (post UCX). |
| 1244 | $! | 1415 | $! |
| 1245 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" | 1416 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
| 1246 | $! | 1417 | $! |
| 1247 | $! Done with TCPIP | 1418 | $! Done with TCPIP |
| 1248 | $! | 1419 | $! |
| @@ -1263,7 +1434,7 @@ $ ENDIF | |||
| 1263 | $! | 1434 | $! |
| 1264 | $! Print info | 1435 | $! Print info |
| 1265 | $! | 1436 | $! |
| 1266 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 1437 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
| 1267 | $! | 1438 | $! |
| 1268 | $! Else The User Entered An Invalid Argument. | 1439 | $! Else The User Entered An Invalid Argument. |
| 1269 | $! | 1440 | $! |
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_gen.c b/src/lib/libssl/src/crypto/dsa/dsa_gen.c index 0fcd25f8b0..cb0b4538a4 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_gen.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_gen.c | |||
| @@ -120,7 +120,7 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, | |||
| 120 | BIGNUM *r0,*W,*X,*c,*test; | 120 | BIGNUM *r0,*W,*X,*c,*test; |
| 121 | BIGNUM *g=NULL,*q=NULL,*p=NULL; | 121 | BIGNUM *g=NULL,*q=NULL,*p=NULL; |
| 122 | BN_MONT_CTX *mont=NULL; | 122 | BN_MONT_CTX *mont=NULL; |
| 123 | int i, k,n=0,b,m=0, qsize = qbits >> 3; | 123 | int i, k, n=0, m=0, qsize = qbits >> 3; |
| 124 | int counter=0; | 124 | int counter=0; |
| 125 | int r=0; | 125 | int r=0; |
| 126 | BN_CTX *ctx=NULL; | 126 | BN_CTX *ctx=NULL; |
| @@ -232,7 +232,6 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits, | |||
| 232 | /* "offset = 2" */ | 232 | /* "offset = 2" */ |
| 233 | 233 | ||
| 234 | n=(bits-1)/160; | 234 | n=(bits-1)/160; |
| 235 | b=(bits-1)-n*160; | ||
| 236 | 235 | ||
| 237 | for (;;) | 236 | for (;;) |
| 238 | { | 237 | { |
diff --git a/src/lib/libssl/src/crypto/dsa/dsa_ossl.c b/src/lib/libssl/src/crypto/dsa/dsa_ossl.c index 4fead07e80..a3ddd7d281 100644 --- a/src/lib/libssl/src/crypto/dsa/dsa_ossl.c +++ b/src/lib/libssl/src/crypto/dsa/dsa_ossl.c | |||
| @@ -148,15 +148,6 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) | |||
| 148 | 148 | ||
| 149 | s=BN_new(); | 149 | s=BN_new(); |
| 150 | if (s == NULL) goto err; | 150 | if (s == NULL) goto err; |
| 151 | |||
| 152 | /* reject a excessive digest length (currently at most | ||
| 153 | * dsa-with-SHA256 is supported) */ | ||
| 154 | if (dlen > SHA256_DIGEST_LENGTH) | ||
| 155 | { | ||
| 156 | reason=DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE; | ||
| 157 | goto err; | ||
| 158 | } | ||
| 159 | |||
| 160 | ctx=BN_CTX_new(); | 151 | ctx=BN_CTX_new(); |
| 161 | if (ctx == NULL) goto err; | 152 | if (ctx == NULL) goto err; |
| 162 | 153 | ||
| @@ -185,7 +176,7 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) | |||
| 185 | if (!BN_mod_mul(&xr,dsa->priv_key,r,dsa->q,ctx)) goto err;/* s = xr */ | 176 | if (!BN_mod_mul(&xr,dsa->priv_key,r,dsa->q,ctx)) goto err;/* s = xr */ |
| 186 | if (!BN_add(s, &xr, &m)) goto err; /* s = m + xr */ | 177 | if (!BN_add(s, &xr, &m)) goto err; /* s = m + xr */ |
| 187 | if (BN_cmp(s,dsa->q) > 0) | 178 | if (BN_cmp(s,dsa->q) > 0) |
| 188 | BN_sub(s,s,dsa->q); | 179 | if (!BN_sub(s,s,dsa->q)) goto err; |
| 189 | if (!BN_mod_mul(s,s,kinv,dsa->q,ctx)) goto err; | 180 | if (!BN_mod_mul(s,s,kinv,dsa->q,ctx)) goto err; |
| 190 | 181 | ||
| 191 | ret=DSA_SIG_new(); | 182 | ret=DSA_SIG_new(); |
| @@ -325,15 +316,6 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, | |||
| 325 | DSAerr(DSA_F_DSA_DO_VERIFY,DSA_R_MODULUS_TOO_LARGE); | 316 | DSAerr(DSA_F_DSA_DO_VERIFY,DSA_R_MODULUS_TOO_LARGE); |
| 326 | return -1; | 317 | return -1; |
| 327 | } | 318 | } |
| 328 | |||
| 329 | /* reject a excessive digest length (currently at most | ||
| 330 | * dsa-with-SHA256 is supported) */ | ||
| 331 | if (dgst_len > SHA256_DIGEST_LENGTH) | ||
| 332 | { | ||
| 333 | DSAerr(DSA_F_DSA_DO_VERIFY,DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); | ||
| 334 | return -1; | ||
| 335 | } | ||
| 336 | |||
| 337 | BN_init(&u1); | 319 | BN_init(&u1); |
| 338 | BN_init(&u2); | 320 | BN_init(&u2); |
| 339 | BN_init(&t1); | 321 | BN_init(&t1); |
diff --git a/src/lib/libssl/src/crypto/dso/dso_dlfcn.c b/src/lib/libssl/src/crypto/dso/dso_dlfcn.c index 14bd322fb8..c2bc61760b 100644 --- a/src/lib/libssl/src/crypto/dso/dso_dlfcn.c +++ b/src/lib/libssl/src/crypto/dso/dso_dlfcn.c | |||
| @@ -85,6 +85,7 @@ DSO_METHOD *DSO_METHOD_dlfcn(void) | |||
| 85 | # define HAVE_DLINFO 1 | 85 | # define HAVE_DLINFO 1 |
| 86 | # if defined(_AIX) || defined(__CYGWIN__) || \ | 86 | # if defined(_AIX) || defined(__CYGWIN__) || \ |
| 87 | defined(__SCO_VERSION__) || defined(_SCO_ELF) || \ | 87 | defined(__SCO_VERSION__) || defined(_SCO_ELF) || \ |
| 88 | (defined(__osf__) && !defined(RTLD_NEXT)) || \ | ||
| 88 | (defined(__OpenBSD__) && !defined(RTLD_SELF)) | 89 | (defined(__OpenBSD__) && !defined(RTLD_SELF)) |
| 89 | # undef HAVE_DLINFO | 90 | # undef HAVE_DLINFO |
| 90 | # endif | 91 | # endif |
diff --git a/src/lib/libssl/src/crypto/dso/dso_vms.c b/src/lib/libssl/src/crypto/dso/dso_vms.c index 321512772a..eee20d14f1 100644 --- a/src/lib/libssl/src/crypto/dso/dso_vms.c +++ b/src/lib/libssl/src/crypto/dso/dso_vms.c | |||
| @@ -68,8 +68,20 @@ | |||
| 68 | #include <stsdef.h> | 68 | #include <stsdef.h> |
| 69 | #include <descrip.h> | 69 | #include <descrip.h> |
| 70 | #include <starlet.h> | 70 | #include <starlet.h> |
| 71 | #include "vms_rms.h" | ||
| 71 | #endif | 72 | #endif |
| 72 | 73 | ||
| 74 | /* Some compiler options may mask the declaration of "_malloc32". */ | ||
| 75 | #if __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE | ||
| 76 | # if __INITIAL_POINTER_SIZE == 64 | ||
| 77 | # pragma pointer_size save | ||
| 78 | # pragma pointer_size 32 | ||
| 79 | void * _malloc32 (__size_t); | ||
| 80 | # pragma pointer_size restore | ||
| 81 | # endif /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 82 | #endif /* __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE */ | ||
| 83 | |||
| 84 | |||
| 73 | #ifndef OPENSSL_SYS_VMS | 85 | #ifndef OPENSSL_SYS_VMS |
| 74 | DSO_METHOD *DSO_METHOD_vms(void) | 86 | DSO_METHOD *DSO_METHOD_vms(void) |
| 75 | { | 87 | { |
| @@ -121,14 +133,13 @@ typedef struct dso_internal_st | |||
| 121 | /* This should contain the name only, no directory, | 133 | /* This should contain the name only, no directory, |
| 122 | * no extension, nothing but a name. */ | 134 | * no extension, nothing but a name. */ |
| 123 | struct dsc$descriptor_s filename_dsc; | 135 | struct dsc$descriptor_s filename_dsc; |
| 124 | char filename[FILENAME_MAX+1]; | 136 | char filename[ NAMX_MAXRSS+ 1]; |
| 125 | /* This contains whatever is not in filename, if needed. | 137 | /* This contains whatever is not in filename, if needed. |
| 126 | * Normally not defined. */ | 138 | * Normally not defined. */ |
| 127 | struct dsc$descriptor_s imagename_dsc; | 139 | struct dsc$descriptor_s imagename_dsc; |
| 128 | char imagename[FILENAME_MAX+1]; | 140 | char imagename[ NAMX_MAXRSS+ 1]; |
| 129 | } DSO_VMS_INTERNAL; | 141 | } DSO_VMS_INTERNAL; |
| 130 | 142 | ||
| 131 | |||
| 132 | DSO_METHOD *DSO_METHOD_vms(void) | 143 | DSO_METHOD *DSO_METHOD_vms(void) |
| 133 | { | 144 | { |
| 134 | return(&dso_meth_vms); | 145 | return(&dso_meth_vms); |
| @@ -139,7 +150,22 @@ static int vms_load(DSO *dso) | |||
| 139 | void *ptr = NULL; | 150 | void *ptr = NULL; |
| 140 | /* See applicable comments in dso_dl.c */ | 151 | /* See applicable comments in dso_dl.c */ |
| 141 | char *filename = DSO_convert_filename(dso, NULL); | 152 | char *filename = DSO_convert_filename(dso, NULL); |
| 142 | DSO_VMS_INTERNAL *p; | 153 | |
| 154 | /* Ensure 32-bit pointer for "p", and appropriate malloc() function. */ | ||
| 155 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 156 | # define DSO_MALLOC _malloc32 | ||
| 157 | # pragma pointer_size save | ||
| 158 | # pragma pointer_size 32 | ||
| 159 | #else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 160 | # define DSO_MALLOC OPENSSL_malloc | ||
| 161 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 162 | |||
| 163 | DSO_VMS_INTERNAL *p = NULL; | ||
| 164 | |||
| 165 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 166 | # pragma pointer_size restore | ||
| 167 | #endif /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 168 | |||
| 143 | const char *sp1, *sp2; /* Search result */ | 169 | const char *sp1, *sp2; /* Search result */ |
| 144 | 170 | ||
| 145 | if(filename == NULL) | 171 | if(filename == NULL) |
| @@ -192,7 +218,7 @@ static int vms_load(DSO *dso) | |||
| 192 | goto err; | 218 | goto err; |
| 193 | } | 219 | } |
| 194 | 220 | ||
| 195 | p = (DSO_VMS_INTERNAL *)OPENSSL_malloc(sizeof(DSO_VMS_INTERNAL)); | 221 | p = DSO_MALLOC(sizeof(DSO_VMS_INTERNAL)); |
| 196 | if(p == NULL) | 222 | if(p == NULL) |
| 197 | { | 223 | { |
| 198 | DSOerr(DSO_F_VMS_LOAD,ERR_R_MALLOC_FAILURE); | 224 | DSOerr(DSO_F_VMS_LOAD,ERR_R_MALLOC_FAILURE); |
| @@ -290,18 +316,38 @@ void vms_bind_sym(DSO *dso, const char *symname, void **sym) | |||
| 290 | int flags = 0; | 316 | int flags = 0; |
| 291 | #endif | 317 | #endif |
| 292 | struct dsc$descriptor_s symname_dsc; | 318 | struct dsc$descriptor_s symname_dsc; |
| 293 | *sym = NULL; | ||
| 294 | 319 | ||
| 295 | symname_dsc.dsc$w_length = strlen(symname); | 320 | /* Arrange 32-bit pointer to (copied) string storage, if needed. */ |
| 296 | symname_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | 321 | #if __INITIAL_POINTER_SIZE == 64 |
| 297 | symname_dsc.dsc$b_class = DSC$K_CLASS_S; | 322 | # define SYMNAME symname_32p |
| 298 | symname_dsc.dsc$a_pointer = (char *)symname; /* The cast is needed */ | 323 | # pragma pointer_size save |
| 324 | # pragma pointer_size 32 | ||
| 325 | char *symname_32p; | ||
| 326 | # pragma pointer_size restore | ||
| 327 | char symname_32[ NAMX_MAXRSS+ 1]; | ||
| 328 | #else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 329 | # define SYMNAME ((char *) symname) | ||
| 330 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 331 | |||
| 332 | *sym = NULL; | ||
| 299 | 333 | ||
| 300 | if((dso == NULL) || (symname == NULL)) | 334 | if((dso == NULL) || (symname == NULL)) |
| 301 | { | 335 | { |
| 302 | DSOerr(DSO_F_VMS_BIND_SYM,ERR_R_PASSED_NULL_PARAMETER); | 336 | DSOerr(DSO_F_VMS_BIND_SYM,ERR_R_PASSED_NULL_PARAMETER); |
| 303 | return; | 337 | return; |
| 304 | } | 338 | } |
| 339 | |||
| 340 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 341 | /* Copy the symbol name to storage with a 32-bit pointer. */ | ||
| 342 | symname_32p = symname_32; | ||
| 343 | strcpy( symname_32p, symname); | ||
| 344 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 345 | |||
| 346 | symname_dsc.dsc$w_length = strlen(SYMNAME); | ||
| 347 | symname_dsc.dsc$b_dtype = DSC$K_DTYPE_T; | ||
| 348 | symname_dsc.dsc$b_class = DSC$K_CLASS_S; | ||
| 349 | symname_dsc.dsc$a_pointer = SYMNAME; | ||
| 350 | |||
| 305 | if(sk_void_num(dso->meth_data) < 1) | 351 | if(sk_void_num(dso->meth_data) < 1) |
| 306 | { | 352 | { |
| 307 | DSOerr(DSO_F_VMS_BIND_SYM,DSO_R_STACK_ERROR); | 353 | DSOerr(DSO_F_VMS_BIND_SYM,DSO_R_STACK_ERROR); |
| @@ -372,64 +418,60 @@ static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname) | |||
| 372 | return sym; | 418 | return sym; |
| 373 | } | 419 | } |
| 374 | 420 | ||
| 421 | |||
| 375 | static char *vms_merger(DSO *dso, const char *filespec1, const char *filespec2) | 422 | static char *vms_merger(DSO *dso, const char *filespec1, const char *filespec2) |
| 376 | { | 423 | { |
| 377 | int status; | 424 | int status; |
| 378 | int filespec1len, filespec2len; | 425 | int filespec1len, filespec2len; |
| 379 | struct FAB fab; | 426 | struct FAB fab; |
| 380 | #ifdef NAML$C_MAXRSS | 427 | struct NAMX_STRUCT nam; |
| 381 | struct NAML nam; | 428 | char esa[ NAMX_MAXRSS+ 1]; |
| 382 | char esa[NAML$C_MAXRSS]; | ||
| 383 | #else | ||
| 384 | struct NAM nam; | ||
| 385 | char esa[NAM$C_MAXRSS]; | ||
| 386 | #endif | ||
| 387 | char *merged; | 429 | char *merged; |
| 388 | 430 | ||
| 431 | /* Arrange 32-bit pointer to (copied) string storage, if needed. */ | ||
| 432 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 433 | # define FILESPEC1 filespec1_32p; | ||
| 434 | # define FILESPEC2 filespec2_32p; | ||
| 435 | # pragma pointer_size save | ||
| 436 | # pragma pointer_size 32 | ||
| 437 | char *filespec1_32p; | ||
| 438 | char *filespec2_32p; | ||
| 439 | # pragma pointer_size restore | ||
| 440 | char filespec1_32[ NAMX_MAXRSS+ 1]; | ||
| 441 | char filespec2_32[ NAMX_MAXRSS+ 1]; | ||
| 442 | #else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 443 | # define FILESPEC1 ((char *) filespec1) | ||
| 444 | # define FILESPEC2 ((char *) filespec2) | ||
| 445 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 446 | |||
| 389 | if (!filespec1) filespec1 = ""; | 447 | if (!filespec1) filespec1 = ""; |
| 390 | if (!filespec2) filespec2 = ""; | 448 | if (!filespec2) filespec2 = ""; |
| 391 | filespec1len = strlen(filespec1); | 449 | filespec1len = strlen(filespec1); |
| 392 | filespec2len = strlen(filespec2); | 450 | filespec2len = strlen(filespec2); |
| 393 | 451 | ||
| 452 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 453 | /* Copy the file names to storage with a 32-bit pointer. */ | ||
| 454 | filespec1_32p = filespec1_32; | ||
| 455 | filespec2_32p = filespec2_32; | ||
| 456 | strcpy( filespec1_32p, filespec1); | ||
| 457 | strcpy( filespec2_32p, filespec2); | ||
| 458 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 459 | |||
| 394 | fab = cc$rms_fab; | 460 | fab = cc$rms_fab; |
| 395 | #ifdef NAML$C_MAXRSS | 461 | nam = CC_RMS_NAMX; |
| 396 | nam = cc$rms_naml; | ||
| 397 | #else | ||
| 398 | nam = cc$rms_nam; | ||
| 399 | #endif | ||
| 400 | 462 | ||
| 401 | fab.fab$l_fna = (char *)filespec1; | 463 | FAB_OR_NAML( fab, nam).FAB_OR_NAML_FNA = FILESPEC1; |
| 402 | fab.fab$b_fns = filespec1len; | 464 | FAB_OR_NAML( fab, nam).FAB_OR_NAML_FNS = filespec1len; |
| 403 | fab.fab$l_dna = (char *)filespec2; | 465 | FAB_OR_NAML( fab, nam).FAB_OR_NAML_DNA = FILESPEC2; |
| 404 | fab.fab$b_dns = filespec2len; | 466 | FAB_OR_NAML( fab, nam).FAB_OR_NAML_DNS = filespec2len; |
| 405 | #ifdef NAML$C_MAXRSS | 467 | NAMX_DNA_FNA_SET( fab) |
| 406 | if (filespec1len > NAM$C_MAXRSS) | 468 | |
| 407 | { | 469 | nam.NAMX_ESA = esa; |
| 408 | fab.fab$l_fna = 0; | 470 | nam.NAMX_ESS = NAMX_MAXRSS; |
| 409 | fab.fab$b_fns = 0; | 471 | nam.NAMX_NOP = NAM$M_SYNCHK | NAM$M_PWD; |
| 410 | nam.naml$l_long_filename = (char *)filespec1; | 472 | SET_NAMX_NO_SHORT_UPCASE( nam); |
| 411 | nam.naml$l_long_filename_size = filespec1len; | 473 | |
| 412 | } | 474 | fab.FAB_NAMX = &nam; |
| 413 | if (filespec2len > NAM$C_MAXRSS) | ||
| 414 | { | ||
| 415 | fab.fab$l_dna = 0; | ||
| 416 | fab.fab$b_dns = 0; | ||
| 417 | nam.naml$l_long_defname = (char *)filespec2; | ||
| 418 | nam.naml$l_long_defname_size = filespec2len; | ||
| 419 | } | ||
| 420 | nam.naml$l_esa = esa; | ||
| 421 | nam.naml$b_ess = NAM$C_MAXRSS; | ||
| 422 | nam.naml$l_long_expand = esa; | ||
| 423 | nam.naml$l_long_expand_alloc = sizeof(esa); | ||
| 424 | nam.naml$b_nop = NAM$M_SYNCHK | NAM$M_PWD; | ||
| 425 | nam.naml$v_no_short_upcase = 1; | ||
| 426 | fab.fab$l_naml = &nam; | ||
| 427 | #else | ||
| 428 | nam.nam$l_esa = esa; | ||
| 429 | nam.nam$b_ess = NAM$C_MAXRSS; | ||
| 430 | nam.nam$b_nop = NAM$M_SYNCHK | NAM$M_PWD; | ||
| 431 | fab.fab$l_nam = &nam; | ||
| 432 | #endif | ||
| 433 | 475 | ||
| 434 | status = sys$parse(&fab, 0, 0); | 476 | status = sys$parse(&fab, 0, 0); |
| 435 | 477 | ||
| @@ -460,33 +502,12 @@ static char *vms_merger(DSO *dso, const char *filespec1, const char *filespec2) | |||
| 460 | } | 502 | } |
| 461 | return(NULL); | 503 | return(NULL); |
| 462 | } | 504 | } |
| 463 | #ifdef NAML$C_MAXRSS | 505 | |
| 464 | if (nam.naml$l_long_expand_size) | 506 | merged = OPENSSL_malloc( nam.NAMX_ESL+ 1); |
| 465 | { | ||
| 466 | merged = OPENSSL_malloc(nam.naml$l_long_expand_size + 1); | ||
| 467 | if(!merged) | ||
| 468 | goto malloc_err; | ||
| 469 | strncpy(merged, nam.naml$l_long_expand, | ||
| 470 | nam.naml$l_long_expand_size); | ||
| 471 | merged[nam.naml$l_long_expand_size] = '\0'; | ||
| 472 | } | ||
| 473 | else | ||
| 474 | { | ||
| 475 | merged = OPENSSL_malloc(nam.naml$b_esl + 1); | ||
| 476 | if(!merged) | ||
| 477 | goto malloc_err; | ||
| 478 | strncpy(merged, nam.naml$l_esa, | ||
| 479 | nam.naml$b_esl); | ||
| 480 | merged[nam.naml$b_esl] = '\0'; | ||
| 481 | } | ||
| 482 | #else | ||
| 483 | merged = OPENSSL_malloc(nam.nam$b_esl + 1); | ||
| 484 | if(!merged) | 507 | if(!merged) |
| 485 | goto malloc_err; | 508 | goto malloc_err; |
| 486 | strncpy(merged, nam.nam$l_esa, | 509 | strncpy( merged, nam.NAMX_ESA, nam.NAMX_ESL); |
| 487 | nam.nam$b_esl); | 510 | merged[ nam.NAMX_ESL] = '\0'; |
| 488 | merged[nam.nam$b_esl] = '\0'; | ||
| 489 | #endif | ||
| 490 | return(merged); | 511 | return(merged); |
| 491 | malloc_err: | 512 | malloc_err: |
| 492 | DSOerr(DSO_F_VMS_MERGER, | 513 | DSOerr(DSO_F_VMS_MERGER, |
diff --git a/src/lib/libssl/src/crypto/ec/ec_mult.c b/src/lib/libssl/src/crypto/ec/ec_mult.c index f05df5332e..19f21675fb 100644 --- a/src/lib/libssl/src/crypto/ec/ec_mult.c +++ b/src/lib/libssl/src/crypto/ec/ec_mult.c | |||
| @@ -169,11 +169,13 @@ static void ec_pre_comp_clear_free(void *pre_) | |||
| 169 | EC_POINT **p; | 169 | EC_POINT **p; |
| 170 | 170 | ||
| 171 | for (p = pre->points; *p != NULL; p++) | 171 | for (p = pre->points; *p != NULL; p++) |
| 172 | { | ||
| 172 | EC_POINT_clear_free(*p); | 173 | EC_POINT_clear_free(*p); |
| 173 | OPENSSL_cleanse(pre->points, sizeof pre->points); | 174 | OPENSSL_cleanse(p, sizeof *p); |
| 175 | } | ||
| 174 | OPENSSL_free(pre->points); | 176 | OPENSSL_free(pre->points); |
| 175 | } | 177 | } |
| 176 | OPENSSL_cleanse(pre, sizeof pre); | 178 | OPENSSL_cleanse(pre, sizeof *pre); |
| 177 | OPENSSL_free(pre); | 179 | OPENSSL_free(pre); |
| 178 | } | 180 | } |
| 179 | 181 | ||
diff --git a/src/lib/libssl/src/crypto/ec/ecp_smpl.c b/src/lib/libssl/src/crypto/ec/ecp_smpl.c index 4d26f8bdf6..66a92e2a90 100644 --- a/src/lib/libssl/src/crypto/ec/ecp_smpl.c +++ b/src/lib/libssl/src/crypto/ec/ecp_smpl.c | |||
| @@ -1406,6 +1406,9 @@ int ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT * | |||
| 1406 | { | 1406 | { |
| 1407 | return EC_POINT_is_at_infinity(group, b) ? 0 : 1; | 1407 | return EC_POINT_is_at_infinity(group, b) ? 0 : 1; |
| 1408 | } | 1408 | } |
| 1409 | |||
| 1410 | if (EC_POINT_is_at_infinity(group, b)) | ||
| 1411 | return 1; | ||
| 1409 | 1412 | ||
| 1410 | if (a->Z_is_one && b->Z_is_one) | 1413 | if (a->Z_is_one && b->Z_is_one) |
| 1411 | { | 1414 | { |
diff --git a/src/lib/libssl/src/crypto/engine/engine.h b/src/lib/libssl/src/crypto/engine/engine.h index 7fbd95f634..943aeae215 100644 --- a/src/lib/libssl/src/crypto/engine/engine.h +++ b/src/lib/libssl/src/crypto/engine/engine.h | |||
| @@ -677,6 +677,7 @@ typedef struct st_dynamic_fns { | |||
| 677 | * can be fully instantiated with IMPLEMENT_DYNAMIC_CHECK_FN(). */ | 677 | * can be fully instantiated with IMPLEMENT_DYNAMIC_CHECK_FN(). */ |
| 678 | typedef unsigned long (*dynamic_v_check_fn)(unsigned long ossl_version); | 678 | typedef unsigned long (*dynamic_v_check_fn)(unsigned long ossl_version); |
| 679 | #define IMPLEMENT_DYNAMIC_CHECK_FN() \ | 679 | #define IMPLEMENT_DYNAMIC_CHECK_FN() \ |
| 680 | OPENSSL_EXPORT unsigned long v_check(unsigned long v); \ | ||
| 680 | OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \ | 681 | OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \ |
| 681 | if(v >= OSSL_DYNAMIC_OLDEST) return OSSL_DYNAMIC_VERSION; \ | 682 | if(v >= OSSL_DYNAMIC_OLDEST) return OSSL_DYNAMIC_VERSION; \ |
| 682 | return 0; } | 683 | return 0; } |
| @@ -700,6 +701,8 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id, | |||
| 700 | const dynamic_fns *fns); | 701 | const dynamic_fns *fns); |
| 701 | #define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ | 702 | #define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ |
| 702 | OPENSSL_EXPORT \ | 703 | OPENSSL_EXPORT \ |
| 704 | int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); \ | ||
| 705 | OPENSSL_EXPORT \ | ||
| 703 | int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \ | 706 | int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \ |
| 704 | if(ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \ | 707 | if(ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \ |
| 705 | if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \ | 708 | if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \ |
diff --git a/src/lib/libssl/src/crypto/evp/encode.c b/src/lib/libssl/src/crypto/evp/encode.c index b42c747249..28546a84bc 100644 --- a/src/lib/libssl/src/crypto/evp/encode.c +++ b/src/lib/libssl/src/crypto/evp/encode.c | |||
| @@ -235,7 +235,7 @@ void EVP_DecodeInit(EVP_ENCODE_CTX *ctx) | |||
| 235 | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | 235 | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, |
| 236 | const unsigned char *in, int inl) | 236 | const unsigned char *in, int inl) |
| 237 | { | 237 | { |
| 238 | int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,tmp2,exp_nl; | 238 | int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,exp_nl; |
| 239 | unsigned char *d; | 239 | unsigned char *d; |
| 240 | 240 | ||
| 241 | n=ctx->num; | 241 | n=ctx->num; |
| @@ -319,7 +319,6 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | |||
| 319 | * lines. We process the line and then need to | 319 | * lines. We process the line and then need to |
| 320 | * accept the '\n' */ | 320 | * accept the '\n' */ |
| 321 | if ((v != B64_EOF) && (n >= 64)) exp_nl=1; | 321 | if ((v != B64_EOF) && (n >= 64)) exp_nl=1; |
| 322 | tmp2=v; | ||
| 323 | if (n > 0) | 322 | if (n > 0) |
| 324 | { | 323 | { |
| 325 | v=EVP_DecodeBlock(out,d,n); | 324 | v=EVP_DecodeBlock(out,d,n); |
diff --git a/src/lib/libssl/src/crypto/evp/evp_enc.c b/src/lib/libssl/src/crypto/evp/evp_enc.c index bead6a2170..c268d25cb4 100644 --- a/src/lib/libssl/src/crypto/evp/evp_enc.c +++ b/src/lib/libssl/src/crypto/evp/evp_enc.c | |||
| @@ -204,6 +204,7 @@ skip_to_init: | |||
| 204 | case EVP_CIPH_OFB_MODE: | 204 | case EVP_CIPH_OFB_MODE: |
| 205 | 205 | ||
| 206 | ctx->num = 0; | 206 | ctx->num = 0; |
| 207 | /* fall-through */ | ||
| 207 | 208 | ||
| 208 | case EVP_CIPH_CBC_MODE: | 209 | case EVP_CIPH_CBC_MODE: |
| 209 | 210 | ||
diff --git a/src/lib/libssl/src/crypto/evp/evp_test.c b/src/lib/libssl/src/crypto/evp/evp_test.c index 902efac975..55c7cdfdcc 100644 --- a/src/lib/libssl/src/crypto/evp/evp_test.c +++ b/src/lib/libssl/src/crypto/evp/evp_test.c | |||
| @@ -435,6 +435,7 @@ int main(int argc,char **argv) | |||
| 435 | EXIT(3); | 435 | EXIT(3); |
| 436 | } | 436 | } |
| 437 | } | 437 | } |
| 438 | fclose(f); | ||
| 438 | 439 | ||
| 439 | #ifndef OPENSSL_NO_ENGINE | 440 | #ifndef OPENSSL_NO_ENGINE |
| 440 | ENGINE_cleanup(); | 441 | ENGINE_cleanup(); |
diff --git a/src/lib/libssl/src/crypto/evp/p_lib.c b/src/lib/libssl/src/crypto/evp/p_lib.c index 1916c61699..e26ccd0d08 100644 --- a/src/lib/libssl/src/crypto/evp/p_lib.c +++ b/src/lib/libssl/src/crypto/evp/p_lib.c | |||
| @@ -411,7 +411,10 @@ void EVP_PKEY_free(EVP_PKEY *x) | |||
| 411 | static void EVP_PKEY_free_it(EVP_PKEY *x) | 411 | static void EVP_PKEY_free_it(EVP_PKEY *x) |
| 412 | { | 412 | { |
| 413 | if (x->ameth && x->ameth->pkey_free) | 413 | if (x->ameth && x->ameth->pkey_free) |
| 414 | { | ||
| 414 | x->ameth->pkey_free(x); | 415 | x->ameth->pkey_free(x); |
| 416 | x->pkey.ptr = NULL; | ||
| 417 | } | ||
| 415 | #ifndef OPENSSL_NO_ENGINE | 418 | #ifndef OPENSSL_NO_ENGINE |
| 416 | if (x->engine) | 419 | if (x->engine) |
| 417 | { | 420 | { |
diff --git a/src/lib/libssl/src/crypto/evp/p_sign.c b/src/lib/libssl/src/crypto/evp/p_sign.c index 8df6d48a7e..bb893f5bde 100644 --- a/src/lib/libssl/src/crypto/evp/p_sign.c +++ b/src/lib/libssl/src/crypto/evp/p_sign.c | |||
| @@ -81,7 +81,7 @@ int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, | |||
| 81 | unsigned char m[EVP_MAX_MD_SIZE]; | 81 | unsigned char m[EVP_MAX_MD_SIZE]; |
| 82 | unsigned int m_len; | 82 | unsigned int m_len; |
| 83 | int i,ok=0,v; | 83 | int i,ok=0,v; |
| 84 | MS_STATIC EVP_MD_CTX tmp_ctx; | 84 | EVP_MD_CTX tmp_ctx; |
| 85 | 85 | ||
| 86 | *siglen=0; | 86 | *siglen=0; |
| 87 | EVP_MD_CTX_init(&tmp_ctx); | 87 | EVP_MD_CTX_init(&tmp_ctx); |
diff --git a/src/lib/libssl/src/crypto/evp/p_verify.c b/src/lib/libssl/src/crypto/evp/p_verify.c index 8db46412f3..41d4b67130 100644 --- a/src/lib/libssl/src/crypto/evp/p_verify.c +++ b/src/lib/libssl/src/crypto/evp/p_verify.c | |||
| @@ -68,7 +68,7 @@ int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, | |||
| 68 | unsigned char m[EVP_MAX_MD_SIZE]; | 68 | unsigned char m[EVP_MAX_MD_SIZE]; |
| 69 | unsigned int m_len; | 69 | unsigned int m_len; |
| 70 | int i,ok=0,v; | 70 | int i,ok=0,v; |
| 71 | MS_STATIC EVP_MD_CTX tmp_ctx; | 71 | EVP_MD_CTX tmp_ctx; |
| 72 | 72 | ||
| 73 | EVP_MD_CTX_init(&tmp_ctx); | 73 | EVP_MD_CTX_init(&tmp_ctx); |
| 74 | EVP_MD_CTX_copy_ex(&tmp_ctx,ctx); | 74 | EVP_MD_CTX_copy_ex(&tmp_ctx,ctx); |
diff --git a/src/lib/libssl/src/crypto/hmac/hmac.c b/src/lib/libssl/src/crypto/hmac/hmac.c index 45015fe754..6c98fc43a3 100644 --- a/src/lib/libssl/src/crypto/hmac/hmac.c +++ b/src/lib/libssl/src/crypto/hmac/hmac.c | |||
| @@ -138,12 +138,9 @@ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len) | |||
| 138 | 138 | ||
| 139 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len) | 139 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len) |
| 140 | { | 140 | { |
| 141 | int j; | ||
| 142 | unsigned int i; | 141 | unsigned int i; |
| 143 | unsigned char buf[EVP_MAX_MD_SIZE]; | 142 | unsigned char buf[EVP_MAX_MD_SIZE]; |
| 144 | 143 | ||
| 145 | j=EVP_MD_block_size(ctx->md); | ||
| 146 | |||
| 147 | if (!EVP_DigestFinal_ex(&ctx->md_ctx,buf,&i)) | 144 | if (!EVP_DigestFinal_ex(&ctx->md_ctx,buf,&i)) |
| 148 | goto err; | 145 | goto err; |
| 149 | if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->o_ctx)) | 146 | if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->o_ctx)) |
diff --git a/src/lib/libssl/src/crypto/install-crypto.com b/src/lib/libssl/src/crypto/install-crypto.com new file mode 100755 index 0000000000..85b3d583cf --- /dev/null +++ b/src/lib/libssl/src/crypto/install-crypto.com | |||
| @@ -0,0 +1,196 @@ | |||
| 1 | $! INSTALL.COM -- Installs the files in a given directory tree | ||
| 2 | $! | ||
| 3 | $! Author: Richard Levitte <richard@levitte.org> | ||
| 4 | $! Time of creation: 22-MAY-1998 10:13 | ||
| 5 | $! | ||
| 6 | $! Changes by Zoltan Arpadffy <zoli@polarhome.com> | ||
| 7 | $! | ||
| 8 | $! P1 root of the directory tree | ||
| 9 | $! P2 "64" for 64-bit pointers. | ||
| 10 | $! | ||
| 11 | $! | ||
| 12 | $! Announce/identify. | ||
| 13 | $! | ||
| 14 | $ proc = f$environment( "procedure") | ||
| 15 | $ write sys$output "@@@ "+ - | ||
| 16 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 17 | $! | ||
| 18 | $ on error then goto tidy | ||
| 19 | $ on control_c then goto tidy | ||
| 20 | $! | ||
| 21 | $ if (p1 .eqs. "") | ||
| 22 | $ then | ||
| 23 | $ write sys$output "First argument missing." | ||
| 24 | $ write sys$output - | ||
| 25 | "It should be the directory where you want things installed." | ||
| 26 | $ exit | ||
| 27 | $ endif | ||
| 28 | $! | ||
| 29 | $ if (f$getsyi( "cpu") .lt. 128) | ||
| 30 | $ then | ||
| 31 | $ arch = "VAX" | ||
| 32 | $ else | ||
| 33 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
| 34 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 35 | $ endif | ||
| 36 | $! | ||
| 37 | $ archd = arch | ||
| 38 | $ lib32 = "32" | ||
| 39 | $ shr = "_SHR32" | ||
| 40 | $! | ||
| 41 | $ if (p2 .nes. "") | ||
| 42 | $ then | ||
| 43 | $ if (p2 .eqs. "64") | ||
| 44 | $ then | ||
| 45 | $ archd = arch+ "_64" | ||
| 46 | $ lib32 = "" | ||
| 47 | $ shr = "_SHR" | ||
| 48 | $ else | ||
| 49 | $ if (p2 .nes. "32") | ||
| 50 | $ then | ||
| 51 | $ write sys$output "Second argument invalid." | ||
| 52 | $ write sys$output "It should be "32", "64", or nothing." | ||
| 53 | $ exit | ||
| 54 | $ endif | ||
| 55 | $ endif | ||
| 56 | $ endif | ||
| 57 | $! | ||
| 58 | $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" | ||
| 59 | $ root_dev = f$parse( root, , , "device", "syntax_only") | ||
| 60 | $ root_dir = f$parse( root, , , "directory", "syntax_only") - - | ||
| 61 | "[000000." - "][" - "[" - "]" | ||
| 62 | $ root = root_dev + "[" + root_dir | ||
| 63 | $! | ||
| 64 | $ define /nolog wrk_sslroot 'root'.] /trans=conc | ||
| 65 | $ define /nolog wrk_sslinclude wrk_sslroot:[include] | ||
| 66 | $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib] | ||
| 67 | $! | ||
| 68 | $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - | ||
| 69 | create /directory /log wrk_sslroot:[000000] | ||
| 70 | $ if f$parse("wrk_sslinclude:") .eqs. "" then - | ||
| 71 | create /directory /log wrk_sslinclude: | ||
| 72 | $ if f$parse("wrk_sslxlib:") .eqs. "" then - | ||
| 73 | create /directory /log wrk_sslxlib: | ||
| 74 | $! | ||
| 75 | $ sdirs := , - | ||
| 76 | 'archd', - | ||
| 77 | objects, - | ||
| 78 | md2, md4, md5, sha, mdc2, hmac, ripemd, whrlpool, - | ||
| 79 | des, aes, rc2, rc4, rc5, idea, bf, cast, camellia, seed, - | ||
| 80 | bn, ec, rsa, dsa, ecdsa, dh, ecdh, dso, engine, - | ||
| 81 | buffer, bio, stack, lhash, rand, err, - | ||
| 82 | evp, asn1, pem, x509, x509v3, conf, txt_db, pkcs7, pkcs12, comp, ocsp, - | ||
| 83 | ui, krb5, - | ||
| 84 | store, cms, pqueue, ts, jpake | ||
| 85 | $! | ||
| 86 | $ exheader_ := crypto.h, opensslv.h, ebcdic.h, symhacks.h, ossl_typ.h | ||
| 87 | $ exheader_'archd' := opensslconf.h | ||
| 88 | $ exheader_objects := objects.h, obj_mac.h | ||
| 89 | $ exheader_md2 := md2.h | ||
| 90 | $ exheader_md4 := md4.h | ||
| 91 | $ exheader_md5 := md5.h | ||
| 92 | $ exheader_sha := sha.h | ||
| 93 | $ exheader_mdc2 := mdc2.h | ||
| 94 | $ exheader_hmac := hmac.h | ||
| 95 | $ exheader_ripemd := ripemd.h | ||
| 96 | $ exheader_whrlpool := whrlpool.h | ||
| 97 | $ exheader_des := des.h, des_old.h | ||
| 98 | $ exheader_aes := aes.h | ||
| 99 | $ exheader_rc2 := rc2.h | ||
| 100 | $ exheader_rc4 := rc4.h | ||
| 101 | $ exheader_rc5 := rc5.h | ||
| 102 | $ exheader_idea := idea.h | ||
| 103 | $ exheader_bf := blowfish.h | ||
| 104 | $ exheader_cast := cast.h | ||
| 105 | $ exheader_camellia := camellia.h | ||
| 106 | $ exheader_seed := seed.h | ||
| 107 | $ exheader_modes := modes.h | ||
| 108 | $ exheader_bn := bn.h | ||
| 109 | $ exheader_ec := ec.h | ||
| 110 | $ exheader_rsa := rsa.h | ||
| 111 | $ exheader_dsa := dsa.h | ||
| 112 | $ exheader_ecdsa := ecdsa.h | ||
| 113 | $ exheader_dh := dh.h | ||
| 114 | $ exheader_ecdh := ecdh.h | ||
| 115 | $ exheader_dso := dso.h | ||
| 116 | $ exheader_engine := engine.h | ||
| 117 | $ exheader_buffer := buffer.h | ||
| 118 | $ exheader_bio := bio.h | ||
| 119 | $ exheader_stack := stack.h, safestack.h | ||
| 120 | $ exheader_lhash := lhash.h | ||
| 121 | $ exheader_rand := rand.h | ||
| 122 | $ exheader_err := err.h | ||
| 123 | $ exheader_evp := evp.h | ||
| 124 | $ exheader_asn1 := asn1.h, asn1_mac.h, asn1t.h | ||
| 125 | $ exheader_pem := pem.h, pem2.h | ||
| 126 | $ exheader_x509 := x509.h, x509_vfy.h | ||
| 127 | $ exheader_x509v3 := x509v3.h | ||
| 128 | $ exheader_conf := conf.h, conf_api.h | ||
| 129 | $ exheader_txt_db := txt_db.h | ||
| 130 | $ exheader_pkcs7 := pkcs7.h | ||
| 131 | $ exheader_pkcs12 := pkcs12.h | ||
| 132 | $ exheader_comp := comp.h | ||
| 133 | $ exheader_ocsp := ocsp.h | ||
| 134 | $ exheader_ui := ui.h, ui_compat.h | ||
| 135 | $ exheader_krb5 := krb5_asn.h | ||
| 136 | $! exheader_store := store.h, str_compat.h | ||
| 137 | $ exheader_store := store.h | ||
| 138 | $ exheader_cms := cms.h | ||
| 139 | $ exheader_pqueue := pqueue.h | ||
| 140 | $ exheader_ts := ts.h | ||
| 141 | $ exheader_jpake := jpake.h | ||
| 142 | $ libs := ssl_libcrypto | ||
| 143 | $! | ||
| 144 | $ exe_dir := [-.'archd'.exe.crypto] | ||
| 145 | $! | ||
| 146 | $! Header files. | ||
| 147 | $! | ||
| 148 | $ i = 0 | ||
| 149 | $ loop_sdirs: | ||
| 150 | $ d = f$edit( f$element( i, ",", sdirs), "trim") | ||
| 151 | $ i = i + 1 | ||
| 152 | $ if d .eqs. "," then goto loop_sdirs_end | ||
| 153 | $ tmp = exheader_'d' | ||
| 154 | $ if (d .nes. "") then d = "."+ d | ||
| 155 | $ copy /protection = w:re ['d']'tmp' wrk_sslinclude: /log | ||
| 156 | $ goto loop_sdirs | ||
| 157 | $ loop_sdirs_end: | ||
| 158 | $! | ||
| 159 | $! Object libraries, shareable images. | ||
| 160 | $! | ||
| 161 | $ i = 0 | ||
| 162 | $ loop_lib: | ||
| 163 | $ e = f$edit( f$element( i, ",", libs), "trim") | ||
| 164 | $ i = i + 1 | ||
| 165 | $ if e .eqs. "," then goto loop_lib_end | ||
| 166 | $ set noon | ||
| 167 | $ file = exe_dir+ e+ lib32+ ".olb" | ||
| 168 | $ if f$search( file) .nes. "" | ||
| 169 | $ then | ||
| 170 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
| 171 | $ endif | ||
| 172 | $! | ||
| 173 | $ file = exe_dir+ e+ shr+ ".exe" | ||
| 174 | $ if f$search( file) .nes. "" | ||
| 175 | $ then | ||
| 176 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
| 177 | $ endif | ||
| 178 | $ set on | ||
| 179 | $ goto loop_lib | ||
| 180 | $ loop_lib_end: | ||
| 181 | $! | ||
| 182 | $ tidy: | ||
| 183 | $! | ||
| 184 | $ call deass wrk_sslroot | ||
| 185 | $ call deass wrk_sslinclude | ||
| 186 | $ call deass wrk_sslxlib | ||
| 187 | $! | ||
| 188 | $ exit | ||
| 189 | $! | ||
| 190 | $ deass: subroutine | ||
| 191 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
| 192 | $ then | ||
| 193 | $ deassign /process 'p1' | ||
| 194 | $ endif | ||
| 195 | $ endsubroutine | ||
| 196 | $! | ||
diff --git a/src/lib/libssl/src/crypto/md32_common.h b/src/lib/libssl/src/crypto/md32_common.h index 1cb783944e..bb7381952a 100644 --- a/src/lib/libssl/src/crypto/md32_common.h +++ b/src/lib/libssl/src/crypto/md32_common.h | |||
| @@ -165,7 +165,7 @@ | |||
| 165 | asm ( \ | 165 | asm ( \ |
| 166 | "roll %1,%0" \ | 166 | "roll %1,%0" \ |
| 167 | : "=r"(ret) \ | 167 | : "=r"(ret) \ |
| 168 | : "I"(n), "0"(a) \ | 168 | : "I"(n), "0"((unsigned int)(a)) \ |
| 169 | : "cc"); \ | 169 | : "cc"); \ |
| 170 | ret; \ | 170 | ret; \ |
| 171 | }) | 171 | }) |
| @@ -383,6 +383,7 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c) | |||
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | #ifndef MD32_REG_T | 385 | #ifndef MD32_REG_T |
| 386 | #if defined(__alpha) || defined(__sparcv9) || defined(__mips) | ||
| 386 | #define MD32_REG_T long | 387 | #define MD32_REG_T long |
| 387 | /* | 388 | /* |
| 388 | * This comment was originaly written for MD5, which is why it | 389 | * This comment was originaly written for MD5, which is why it |
| @@ -400,9 +401,15 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c) | |||
| 400 | * Well, to be honest it should say that this *prevents* | 401 | * Well, to be honest it should say that this *prevents* |
| 401 | * performance degradation. | 402 | * performance degradation. |
| 402 | * <appro@fy.chalmers.se> | 403 | * <appro@fy.chalmers.se> |
| 403 | * Apparently there're LP64 compilers that generate better | 404 | */ |
| 404 | * code if A-D are declared int. Most notably GCC-x86_64 | 405 | #else |
| 405 | * generates better code. | 406 | /* |
| 407 | * Above is not absolute and there are LP64 compilers that | ||
| 408 | * generate better code if MD32_REG_T is defined int. The above | ||
| 409 | * pre-processor condition reflects the circumstances under which | ||
| 410 | * the conclusion was made and is subject to further extension. | ||
| 406 | * <appro@fy.chalmers.se> | 411 | * <appro@fy.chalmers.se> |
| 407 | */ | 412 | */ |
| 413 | #define MD32_REG_T int | ||
| 414 | #endif | ||
| 408 | #endif | 415 | #endif |
diff --git a/src/lib/libssl/src/crypto/o_time.c b/src/lib/libssl/src/crypto/o_time.c index eecbdd19f0..9030fdef7a 100644 --- a/src/lib/libssl/src/crypto/o_time.c +++ b/src/lib/libssl/src/crypto/o_time.c | |||
| @@ -64,12 +64,18 @@ | |||
| 64 | #include "o_time.h" | 64 | #include "o_time.h" |
| 65 | 65 | ||
| 66 | #ifdef OPENSSL_SYS_VMS | 66 | #ifdef OPENSSL_SYS_VMS |
| 67 | # include <libdtdef.h> | 67 | # if __CRTL_VER >= 70000000 && \ |
| 68 | # include <lib$routines.h> | 68 | (defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE) |
| 69 | # include <lnmdef.h> | 69 | # define VMS_GMTIME_OK |
| 70 | # include <starlet.h> | 70 | # endif |
| 71 | # include <descrip.h> | 71 | # ifndef VMS_GMTIME_OK |
| 72 | # include <stdlib.h> | 72 | # include <libdtdef.h> |
| 73 | # include <lib$routines.h> | ||
| 74 | # include <lnmdef.h> | ||
| 75 | # include <starlet.h> | ||
| 76 | # include <descrip.h> | ||
| 77 | # include <stdlib.h> | ||
| 78 | # endif /* ndef VMS_GMTIME_OK */ | ||
| 73 | #endif | 79 | #endif |
| 74 | 80 | ||
| 75 | struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) | 81 | struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) |
| @@ -81,7 +87,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) | |||
| 81 | so we don't even look at the return value */ | 87 | so we don't even look at the return value */ |
| 82 | gmtime_r(timer,result); | 88 | gmtime_r(timer,result); |
| 83 | ts = result; | 89 | ts = result; |
| 84 | #elif !defined(OPENSSL_SYS_VMS) | 90 | #elif !defined(OPENSSL_SYS_VMS) || defined(VMS_GMTIME_OK) |
| 85 | ts = gmtime(timer); | 91 | ts = gmtime(timer); |
| 86 | if (ts == NULL) | 92 | if (ts == NULL) |
| 87 | return NULL; | 93 | return NULL; |
| @@ -89,7 +95,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) | |||
| 89 | memcpy(result, ts, sizeof(struct tm)); | 95 | memcpy(result, ts, sizeof(struct tm)); |
| 90 | ts = result; | 96 | ts = result; |
| 91 | #endif | 97 | #endif |
| 92 | #ifdef OPENSSL_SYS_VMS | 98 | #if defined( OPENSSL_SYS_VMS) && !defined( VMS_GMTIME_OK) |
| 93 | if (ts == NULL) | 99 | if (ts == NULL) |
| 94 | { | 100 | { |
| 95 | static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL"); | 101 | static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL"); |
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_ht.c b/src/lib/libssl/src/crypto/ocsp/ocsp_ht.c index 12bbfcffd1..af5fc16691 100644 --- a/src/lib/libssl/src/crypto/ocsp/ocsp_ht.c +++ b/src/lib/libssl/src/crypto/ocsp/ocsp_ht.c | |||
| @@ -397,11 +397,12 @@ int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx) | |||
| 397 | 397 | ||
| 398 | 398 | ||
| 399 | case OHS_ASN1_HEADER: | 399 | case OHS_ASN1_HEADER: |
| 400 | /* Now reading ASN1 header: can read at least 6 bytes which | 400 | /* Now reading ASN1 header: can read at least 2 bytes which |
| 401 | * is more than enough for any valid ASN1 SEQUENCE header | 401 | * is enough for ASN1 SEQUENCE header and either length field |
| 402 | * or at least the length of the length field. | ||
| 402 | */ | 403 | */ |
| 403 | n = BIO_get_mem_data(rctx->mem, &p); | 404 | n = BIO_get_mem_data(rctx->mem, &p); |
| 404 | if (n < 6) | 405 | if (n < 2) |
| 405 | goto next_io; | 406 | goto next_io; |
| 406 | 407 | ||
| 407 | /* Check it is an ASN1 SEQUENCE */ | 408 | /* Check it is an ASN1 SEQUENCE */ |
| @@ -414,6 +415,11 @@ int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx) | |||
| 414 | /* Check out length field */ | 415 | /* Check out length field */ |
| 415 | if (*p & 0x80) | 416 | if (*p & 0x80) |
| 416 | { | 417 | { |
| 418 | /* If MSB set on initial length octet we can now | ||
| 419 | * always read 6 octets: make sure we have them. | ||
| 420 | */ | ||
| 421 | if (n < 6) | ||
| 422 | goto next_io; | ||
| 417 | n = *p & 0x7F; | 423 | n = *p & 0x7F; |
| 418 | /* Not NDEF or excessive length */ | 424 | /* Not NDEF or excessive length */ |
| 419 | if (!n || (n > 4)) | 425 | if (!n || (n > 4)) |
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c b/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c index 36905d76cd..e92b86c060 100644 --- a/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c +++ b/src/lib/libssl/src/crypto/ocsp/ocsp_lib.c | |||
| @@ -170,14 +170,14 @@ int OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pss | |||
| 170 | 170 | ||
| 171 | char *host, *port; | 171 | char *host, *port; |
| 172 | 172 | ||
| 173 | /* dup the buffer since we are going to mess with it */ | ||
| 174 | buf = BUF_strdup(url); | ||
| 175 | if (!buf) goto mem_err; | ||
| 176 | |||
| 177 | *phost = NULL; | 173 | *phost = NULL; |
| 178 | *pport = NULL; | 174 | *pport = NULL; |
| 179 | *ppath = NULL; | 175 | *ppath = NULL; |
| 180 | 176 | ||
| 177 | /* dup the buffer since we are going to mess with it */ | ||
| 178 | buf = BUF_strdup(url); | ||
| 179 | if (!buf) goto mem_err; | ||
| 180 | |||
| 181 | /* Check for initial colon */ | 181 | /* Check for initial colon */ |
| 182 | p = strchr(buf, ':'); | 182 | p = strchr(buf, ':'); |
| 183 | 183 | ||
diff --git a/src/lib/libssl/src/crypto/ocsp/ocsp_prn.c b/src/lib/libssl/src/crypto/ocsp/ocsp_prn.c index 1695c9c4ad..87608ff399 100644 --- a/src/lib/libssl/src/crypto/ocsp/ocsp_prn.c +++ b/src/lib/libssl/src/crypto/ocsp/ocsp_prn.c | |||
| @@ -182,7 +182,6 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o, unsigned long flags) | |||
| 182 | { | 182 | { |
| 183 | int i, ret = 0; | 183 | int i, ret = 0; |
| 184 | long l; | 184 | long l; |
| 185 | unsigned char *p; | ||
| 186 | OCSP_CERTID *cid = NULL; | 185 | OCSP_CERTID *cid = NULL; |
| 187 | OCSP_BASICRESP *br = NULL; | 186 | OCSP_BASICRESP *br = NULL; |
| 188 | OCSP_RESPID *rid = NULL; | 187 | OCSP_RESPID *rid = NULL; |
| @@ -207,7 +206,6 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o, unsigned long flags) | |||
| 207 | return 1; | 206 | return 1; |
| 208 | } | 207 | } |
| 209 | 208 | ||
| 210 | p = ASN1_STRING_data(rb->response); | ||
| 211 | i = ASN1_STRING_length(rb->response); | 209 | i = ASN1_STRING_length(rb->response); |
| 212 | if (!(br = OCSP_response_get1_basic(o))) goto err; | 210 | if (!(br = OCSP_response_get1_basic(o))) goto err; |
| 213 | rd = br->tbsResponseData; | 211 | rd = br->tbsResponseData; |
diff --git a/src/lib/libssl/src/crypto/opensslv.h b/src/lib/libssl/src/crypto/opensslv.h index 2fb110fa0e..310a3387be 100644 --- a/src/lib/libssl/src/crypto/opensslv.h +++ b/src/lib/libssl/src/crypto/opensslv.h | |||
| @@ -25,11 +25,11 @@ | |||
| 25 | * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for | 25 | * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for |
| 26 | * major minor fix final patch/beta) | 26 | * major minor fix final patch/beta) |
| 27 | */ | 27 | */ |
| 28 | #define OPENSSL_VERSION_NUMBER 0x1000001fL | 28 | #define OPENSSL_VERSION_NUMBER 0x1000005fL |
| 29 | #ifdef OPENSSL_FIPS | 29 | #ifdef OPENSSL_FIPS |
| 30 | #define OPENSSL_VERSION_TEXT "OpenSSL 1.0.0a-fips 1 Jun 2010" | 30 | #define OPENSSL_VERSION_TEXT "OpenSSL 1.0.0e-fips 6 Sep 2011" |
| 31 | #else | 31 | #else |
| 32 | #define OPENSSL_VERSION_TEXT "OpenSSL 1.0.0a 1 Jun 2010" | 32 | #define OPENSSL_VERSION_TEXT "OpenSSL 1.0.0e 6 Sep 2011" |
| 33 | #endif | 33 | #endif |
| 34 | #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT | 34 | #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT |
| 35 | 35 | ||
diff --git a/src/lib/libssl/src/crypto/pem/pem_lib.c b/src/lib/libssl/src/crypto/pem/pem_lib.c index 42e4861bc1..cfc89a9921 100644 --- a/src/lib/libssl/src/crypto/pem/pem_lib.c +++ b/src/lib/libssl/src/crypto/pem/pem_lib.c | |||
| @@ -482,7 +482,6 @@ int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen, | |||
| 482 | 482 | ||
| 483 | int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) | 483 | int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) |
| 484 | { | 484 | { |
| 485 | int o; | ||
| 486 | const EVP_CIPHER *enc=NULL; | 485 | const EVP_CIPHER *enc=NULL; |
| 487 | char *p,c; | 486 | char *p,c; |
| 488 | char **header_pp = &header; | 487 | char **header_pp = &header; |
| @@ -522,7 +521,6 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) | |||
| 522 | header++; | 521 | header++; |
| 523 | } | 522 | } |
| 524 | *header='\0'; | 523 | *header='\0'; |
| 525 | o=OBJ_sn2nid(p); | ||
| 526 | cipher->cipher=enc=EVP_get_cipherbyname(p); | 524 | cipher->cipher=enc=EVP_get_cipherbyname(p); |
| 527 | *header=c; | 525 | *header=c; |
| 528 | header++; | 526 | header++; |
diff --git a/src/lib/libssl/src/crypto/perlasm/cbc.pl b/src/lib/libssl/src/crypto/perlasm/cbc.pl index e43dc9ae15..6fc2510905 100644 --- a/src/lib/libssl/src/crypto/perlasm/cbc.pl +++ b/src/lib/libssl/src/crypto/perlasm/cbc.pl | |||
| @@ -158,7 +158,6 @@ sub cbc | |||
| 158 | &jmp_ptr($count); | 158 | &jmp_ptr($count); |
| 159 | 159 | ||
| 160 | &set_label("ej7"); | 160 | &set_label("ej7"); |
| 161 | &xor("edx", "edx") if $ppro; # ppro friendly | ||
| 162 | &movb(&HB("edx"), &BP(6,$in,"",0)); | 161 | &movb(&HB("edx"), &BP(6,$in,"",0)); |
| 163 | &shl("edx",8); | 162 | &shl("edx",8); |
| 164 | &set_label("ej6"); | 163 | &set_label("ej6"); |
| @@ -170,7 +169,6 @@ sub cbc | |||
| 170 | &jmp(&label("ejend")); | 169 | &jmp(&label("ejend")); |
| 171 | &set_label("ej3"); | 170 | &set_label("ej3"); |
| 172 | &movb(&HB("ecx"), &BP(2,$in,"",0)); | 171 | &movb(&HB("ecx"), &BP(2,$in,"",0)); |
| 173 | &xor("ecx", "ecx") if $ppro; # ppro friendly | ||
| 174 | &shl("ecx",8); | 172 | &shl("ecx",8); |
| 175 | &set_label("ej2"); | 173 | &set_label("ej2"); |
| 176 | &movb(&HB("ecx"), &BP(1,$in,"",0)); | 174 | &movb(&HB("ecx"), &BP(1,$in,"",0)); |
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_key.c b/src/lib/libssl/src/crypto/pkcs12/p12_key.c index a29794bbbc..424203f648 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_key.c +++ b/src/lib/libssl/src/crypto/pkcs12/p12_key.c | |||
| @@ -107,6 +107,7 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, | |||
| 107 | unsigned char *B, *D, *I, *p, *Ai; | 107 | unsigned char *B, *D, *I, *p, *Ai; |
| 108 | int Slen, Plen, Ilen, Ijlen; | 108 | int Slen, Plen, Ilen, Ijlen; |
| 109 | int i, j, u, v; | 109 | int i, j, u, v; |
| 110 | int ret = 0; | ||
| 110 | BIGNUM *Ij, *Bpl1; /* These hold Ij and B + 1 */ | 111 | BIGNUM *Ij, *Bpl1; /* These hold Ij and B + 1 */ |
| 111 | EVP_MD_CTX ctx; | 112 | EVP_MD_CTX ctx; |
| 112 | #ifdef DEBUG_KEYGEN | 113 | #ifdef DEBUG_KEYGEN |
| @@ -144,10 +145,8 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, | |||
| 144 | I = OPENSSL_malloc (Ilen); | 145 | I = OPENSSL_malloc (Ilen); |
| 145 | Ij = BN_new(); | 146 | Ij = BN_new(); |
| 146 | Bpl1 = BN_new(); | 147 | Bpl1 = BN_new(); |
| 147 | if (!D || !Ai || !B || !I || !Ij || !Bpl1) { | 148 | if (!D || !Ai || !B || !I || !Ij || !Bpl1) |
| 148 | PKCS12err(PKCS12_F_PKCS12_KEY_GEN_UNI,ERR_R_MALLOC_FAILURE); | 149 | goto err; |
| 149 | return 0; | ||
| 150 | } | ||
| 151 | for (i = 0; i < v; i++) D[i] = id; | 150 | for (i = 0; i < v; i++) D[i] = id; |
| 152 | p = I; | 151 | p = I; |
| 153 | for (i = 0; i < Slen; i++) *p++ = salt[i % saltlen]; | 152 | for (i = 0; i < Slen; i++) *p++ = salt[i % saltlen]; |
| @@ -164,28 +163,22 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, | |||
| 164 | } | 163 | } |
| 165 | memcpy (out, Ai, min (n, u)); | 164 | memcpy (out, Ai, min (n, u)); |
| 166 | if (u >= n) { | 165 | if (u >= n) { |
| 167 | OPENSSL_free (Ai); | ||
| 168 | OPENSSL_free (B); | ||
| 169 | OPENSSL_free (D); | ||
| 170 | OPENSSL_free (I); | ||
| 171 | BN_free (Ij); | ||
| 172 | BN_free (Bpl1); | ||
| 173 | EVP_MD_CTX_cleanup(&ctx); | ||
| 174 | #ifdef DEBUG_KEYGEN | 166 | #ifdef DEBUG_KEYGEN |
| 175 | fprintf(stderr, "Output KEY (length %d)\n", tmpn); | 167 | fprintf(stderr, "Output KEY (length %d)\n", tmpn); |
| 176 | h__dump(tmpout, tmpn); | 168 | h__dump(tmpout, tmpn); |
| 177 | #endif | 169 | #endif |
| 178 | return 1; | 170 | ret = 1; |
| 171 | goto end; | ||
| 179 | } | 172 | } |
| 180 | n -= u; | 173 | n -= u; |
| 181 | out += u; | 174 | out += u; |
| 182 | for (j = 0; j < v; j++) B[j] = Ai[j % u]; | 175 | for (j = 0; j < v; j++) B[j] = Ai[j % u]; |
| 183 | /* Work out B + 1 first then can use B as tmp space */ | 176 | /* Work out B + 1 first then can use B as tmp space */ |
| 184 | BN_bin2bn (B, v, Bpl1); | 177 | if (!BN_bin2bn (B, v, Bpl1)) goto err; |
| 185 | BN_add_word (Bpl1, 1); | 178 | if (!BN_add_word (Bpl1, 1)) goto err; |
| 186 | for (j = 0; j < Ilen ; j+=v) { | 179 | for (j = 0; j < Ilen ; j+=v) { |
| 187 | BN_bin2bn (I + j, v, Ij); | 180 | if (!BN_bin2bn (I + j, v, Ij)) goto err; |
| 188 | BN_add (Ij, Ij, Bpl1); | 181 | if (!BN_add (Ij, Ij, Bpl1)) goto err; |
| 189 | BN_bn2bin (Ij, B); | 182 | BN_bn2bin (Ij, B); |
| 190 | Ijlen = BN_num_bytes (Ij); | 183 | Ijlen = BN_num_bytes (Ij); |
| 191 | /* If more than 2^(v*8) - 1 cut off MSB */ | 184 | /* If more than 2^(v*8) - 1 cut off MSB */ |
| @@ -201,6 +194,19 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, | |||
| 201 | } else BN_bn2bin (Ij, I + j); | 194 | } else BN_bn2bin (Ij, I + j); |
| 202 | } | 195 | } |
| 203 | } | 196 | } |
| 197 | |||
| 198 | err: | ||
| 199 | PKCS12err(PKCS12_F_PKCS12_KEY_GEN_UNI,ERR_R_MALLOC_FAILURE); | ||
| 200 | |||
| 201 | end: | ||
| 202 | OPENSSL_free (Ai); | ||
| 203 | OPENSSL_free (B); | ||
| 204 | OPENSSL_free (D); | ||
| 205 | OPENSSL_free (I); | ||
| 206 | BN_free (Ij); | ||
| 207 | BN_free (Bpl1); | ||
| 208 | EVP_MD_CTX_cleanup(&ctx); | ||
| 209 | return ret; | ||
| 204 | } | 210 | } |
| 205 | #ifdef DEBUG_KEYGEN | 211 | #ifdef DEBUG_KEYGEN |
| 206 | void h__dump (unsigned char *p, int len) | 212 | void h__dump (unsigned char *p, int len) |
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c index 451de84489..3bf1a367bb 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c | |||
| @@ -422,7 +422,6 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) | |||
| 422 | X509_ALGOR *enc_alg=NULL; | 422 | X509_ALGOR *enc_alg=NULL; |
| 423 | STACK_OF(X509_ALGOR) *md_sk=NULL; | 423 | STACK_OF(X509_ALGOR) *md_sk=NULL; |
| 424 | STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL; | 424 | STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL; |
| 425 | X509_ALGOR *xalg=NULL; | ||
| 426 | PKCS7_RECIP_INFO *ri=NULL; | 425 | PKCS7_RECIP_INFO *ri=NULL; |
| 427 | 426 | ||
| 428 | i=OBJ_obj2nid(p7->type); | 427 | i=OBJ_obj2nid(p7->type); |
| @@ -445,7 +444,6 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) | |||
| 445 | PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE); | 444 | PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE); |
| 446 | goto err; | 445 | goto err; |
| 447 | } | 446 | } |
| 448 | xalg=p7->d.signed_and_enveloped->enc_data->algorithm; | ||
| 449 | break; | 447 | break; |
| 450 | case NID_pkcs7_enveloped: | 448 | case NID_pkcs7_enveloped: |
| 451 | rsk=p7->d.enveloped->recipientinfo; | 449 | rsk=p7->d.enveloped->recipientinfo; |
| @@ -457,7 +455,6 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) | |||
| 457 | PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE); | 455 | PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CIPHER_TYPE); |
| 458 | goto err; | 456 | goto err; |
| 459 | } | 457 | } |
| 460 | xalg=p7->d.enveloped->enc_data->algorithm; | ||
| 461 | break; | 458 | break; |
| 462 | default: | 459 | default: |
| 463 | PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CONTENT_TYPE); | 460 | PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_UNSUPPORTED_CONTENT_TYPE); |
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c b/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c index 3ca0952792..d411269b50 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c | |||
| @@ -591,7 +591,6 @@ X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si) | |||
| 591 | int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher) | 591 | int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher) |
| 592 | { | 592 | { |
| 593 | int i; | 593 | int i; |
| 594 | ASN1_OBJECT *objtmp; | ||
| 595 | PKCS7_ENC_CONTENT *ec; | 594 | PKCS7_ENC_CONTENT *ec; |
| 596 | 595 | ||
| 597 | i=OBJ_obj2nid(p7->type); | 596 | i=OBJ_obj2nid(p7->type); |
| @@ -614,7 +613,6 @@ int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher) | |||
| 614 | PKCS7err(PKCS7_F_PKCS7_SET_CIPHER,PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER); | 613 | PKCS7err(PKCS7_F_PKCS7_SET_CIPHER,PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER); |
| 615 | return(0); | 614 | return(0); |
| 616 | } | 615 | } |
| 617 | objtmp = OBJ_nid2obj(i); | ||
| 618 | 616 | ||
| 619 | ec->cipher = cipher; | 617 | ec->cipher = cipher; |
| 620 | return 1; | 618 | return 1; |
diff --git a/src/lib/libssl/src/crypto/rand/md_rand.c b/src/lib/libssl/src/crypto/rand/md_rand.c index 88088ce73c..b2f04ff13e 100644 --- a/src/lib/libssl/src/crypto/rand/md_rand.c +++ b/src/lib/libssl/src/crypto/rand/md_rand.c | |||
| @@ -476,11 +476,14 @@ static int ssleay_rand_bytes(unsigned char *buf, int num) | |||
| 476 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); | 476 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); |
| 477 | 477 | ||
| 478 | #ifndef PURIFY /* purify complains */ | 478 | #ifndef PURIFY /* purify complains */ |
| 479 | /* DO NOT REMOVE THE FOLLOWING CALL TO MD_Update()! */ | 479 | /* The following line uses the supplied buffer as a small |
| 480 | * source of entropy: since this buffer is often uninitialised | ||
| 481 | * it may cause programs such as purify or valgrind to | ||
| 482 | * complain. So for those builds it is not used: the removal | ||
| 483 | * of such a small source of entropy has negligible impact on | ||
| 484 | * security. | ||
| 485 | */ | ||
| 480 | MD_Update(&m,buf,j); | 486 | MD_Update(&m,buf,j); |
| 481 | /* We know that line may cause programs such as | ||
| 482 | purify and valgrind to complain about use of | ||
| 483 | uninitialized data. */ | ||
| 484 | #endif | 487 | #endif |
| 485 | 488 | ||
| 486 | k=(st_idx+MD_DIGEST_LENGTH/2)-st_num; | 489 | k=(st_idx+MD_DIGEST_LENGTH/2)-st_num; |
diff --git a/src/lib/libssl/src/crypto/rand/rand_vms.c b/src/lib/libssl/src/crypto/rand/rand_vms.c index 1267a3acae..0bfd8ff7e4 100644 --- a/src/lib/libssl/src/crypto/rand/rand_vms.c +++ b/src/lib/libssl/src/crypto/rand/rand_vms.c | |||
| @@ -69,6 +69,17 @@ | |||
| 69 | # pragma message disable DOLLARID | 69 | # pragma message disable DOLLARID |
| 70 | #endif | 70 | #endif |
| 71 | 71 | ||
| 72 | /* Use 32-bit pointers almost everywhere. Define the type to which to | ||
| 73 | * cast a pointer passed to an external function. | ||
| 74 | */ | ||
| 75 | #if __INITIAL_POINTER_SIZE == 64 | ||
| 76 | # define PTR_T __void_ptr64 | ||
| 77 | # pragma pointer_size save | ||
| 78 | # pragma pointer_size 32 | ||
| 79 | #else /* __INITIAL_POINTER_SIZE == 64 */ | ||
| 80 | # define PTR_T void * | ||
| 81 | #endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
| 82 | |||
| 72 | static struct items_data_st | 83 | static struct items_data_st |
| 73 | { | 84 | { |
| 74 | short length, code; /* length is amount of bytes */ | 85 | short length, code; /* length is amount of bytes */ |
| @@ -125,11 +136,12 @@ int RAND_poll(void) | |||
| 125 | { | 136 | { |
| 126 | if (status == SS$_NORMAL) | 137 | if (status == SS$_NORMAL) |
| 127 | { | 138 | { |
| 128 | RAND_add(data_buffer, total_length, total_length/2); | 139 | RAND_add( (PTR_T)data_buffer, total_length, |
| 140 | total_length/2); | ||
| 129 | } | 141 | } |
| 130 | } | 142 | } |
| 131 | sys$gettim(iosb); | 143 | sys$gettim(iosb); |
| 132 | RAND_add((unsigned char *)iosb, sizeof(iosb), sizeof(iosb)/2); | 144 | RAND_add( (PTR_T)iosb, sizeof(iosb), sizeof(iosb)/2); |
| 133 | return 1; | 145 | return 1; |
| 134 | } | 146 | } |
| 135 | 147 | ||
diff --git a/src/lib/libssl/src/crypto/rand/randfile.c b/src/lib/libssl/src/crypto/rand/randfile.c index 4ed40b7b70..bc7d9c5804 100644 --- a/src/lib/libssl/src/crypto/rand/randfile.c +++ b/src/lib/libssl/src/crypto/rand/randfile.c | |||
| @@ -144,7 +144,9 @@ int RAND_load_file(const char *file, long bytes) | |||
| 144 | * I/O because we will waste system entropy. | 144 | * I/O because we will waste system entropy. |
| 145 | */ | 145 | */ |
| 146 | bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */ | 146 | bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */ |
| 147 | #ifndef OPENSSL_NO_SETVBUF_IONBF | ||
| 147 | setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */ | 148 | setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */ |
| 149 | #endif /* ndef OPENSSL_NO_SETVBUF_IONBF */ | ||
| 148 | } | 150 | } |
| 149 | #endif | 151 | #endif |
| 150 | for (;;) | 152 | for (;;) |
| @@ -269,7 +271,6 @@ err: | |||
| 269 | const char *RAND_file_name(char *buf, size_t size) | 271 | const char *RAND_file_name(char *buf, size_t size) |
| 270 | { | 272 | { |
| 271 | char *s=NULL; | 273 | char *s=NULL; |
| 272 | int ok = 0; | ||
| 273 | #ifdef __OpenBSD__ | 274 | #ifdef __OpenBSD__ |
| 274 | struct stat sb; | 275 | struct stat sb; |
| 275 | #endif | 276 | #endif |
| @@ -298,7 +299,6 @@ const char *RAND_file_name(char *buf, size_t size) | |||
| 298 | BUF_strlcat(buf,"/",size); | 299 | BUF_strlcat(buf,"/",size); |
| 299 | #endif | 300 | #endif |
| 300 | BUF_strlcat(buf,RFILE,size); | 301 | BUF_strlcat(buf,RFILE,size); |
| 301 | ok = 1; | ||
| 302 | } | 302 | } |
| 303 | else | 303 | else |
| 304 | buf[0] = '\0'; /* no file name */ | 304 | buf[0] = '\0'; /* no file name */ |
| @@ -312,7 +312,7 @@ const char *RAND_file_name(char *buf, size_t size) | |||
| 312 | * to something hopefully decent if that isn't available. | 312 | * to something hopefully decent if that isn't available. |
| 313 | */ | 313 | */ |
| 314 | 314 | ||
| 315 | if (!ok) | 315 | if (!buf[0]) |
| 316 | if (BUF_strlcpy(buf,"/dev/arandom",size) >= size) { | 316 | if (BUF_strlcpy(buf,"/dev/arandom",size) >= size) { |
| 317 | return(NULL); | 317 | return(NULL); |
| 318 | } | 318 | } |
diff --git a/src/lib/libssl/src/crypto/rc5/rc5_locl.h b/src/lib/libssl/src/crypto/rc5/rc5_locl.h index 282dd38822..d337f73fad 100644 --- a/src/lib/libssl/src/crypto/rc5/rc5_locl.h +++ b/src/lib/libssl/src/crypto/rc5/rc5_locl.h | |||
| @@ -154,14 +154,14 @@ | |||
| 154 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ | 154 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ |
| 155 | asm ("roll %%cl,%0" \ | 155 | asm ("roll %%cl,%0" \ |
| 156 | : "=r"(ret) \ | 156 | : "=r"(ret) \ |
| 157 | : "c"(n),"0"(a) \ | 157 | : "c"(n),"0"((unsigned int)(a)) \ |
| 158 | : "cc"); \ | 158 | : "cc"); \ |
| 159 | ret; \ | 159 | ret; \ |
| 160 | }) | 160 | }) |
| 161 | # define ROTATE_r32(a,n) ({ register unsigned int ret; \ | 161 | # define ROTATE_r32(a,n) ({ register unsigned int ret; \ |
| 162 | asm ("rorl %%cl,%0" \ | 162 | asm ("rorl %%cl,%0" \ |
| 163 | : "=r"(ret) \ | 163 | : "=r"(ret) \ |
| 164 | : "c"(n),"0"(a) \ | 164 | : "c"(n),"0"((unsigned int)(a)) \ |
| 165 | : "cc"); \ | 165 | : "cc"); \ |
| 166 | ret; \ | 166 | ret; \ |
| 167 | }) | 167 | }) |
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_eay.c b/src/lib/libssl/src/crypto/rsa/rsa_eay.c index c5eaeeae6b..7c941885f0 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_eay.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_eay.c | |||
| @@ -675,7 +675,7 @@ static int RSA_eay_public_decrypt(int flen, const unsigned char *from, | |||
| 675 | rsa->_method_mod_n)) goto err; | 675 | rsa->_method_mod_n)) goto err; |
| 676 | 676 | ||
| 677 | if ((padding == RSA_X931_PADDING) && ((ret->d[0] & 0xf) != 12)) | 677 | if ((padding == RSA_X931_PADDING) && ((ret->d[0] & 0xf) != 12)) |
| 678 | BN_sub(ret, rsa->n, ret); | 678 | if (!BN_sub(ret, rsa->n, ret)) goto err; |
| 679 | 679 | ||
| 680 | p=buf; | 680 | p=buf; |
| 681 | i=BN_bn2bin(ret,p); | 681 | i=BN_bn2bin(ret,p); |
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c index e238d10e5c..18d307ea9e 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_oaep.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_oaep.c | |||
| @@ -189,34 +189,40 @@ int PKCS1_MGF1(unsigned char *mask, long len, | |||
| 189 | EVP_MD_CTX c; | 189 | EVP_MD_CTX c; |
| 190 | unsigned char md[EVP_MAX_MD_SIZE]; | 190 | unsigned char md[EVP_MAX_MD_SIZE]; |
| 191 | int mdlen; | 191 | int mdlen; |
| 192 | int rv = -1; | ||
| 192 | 193 | ||
| 193 | EVP_MD_CTX_init(&c); | 194 | EVP_MD_CTX_init(&c); |
| 194 | mdlen = EVP_MD_size(dgst); | 195 | mdlen = EVP_MD_size(dgst); |
| 195 | if (mdlen < 0) | 196 | if (mdlen < 0) |
| 196 | return -1; | 197 | goto err; |
| 197 | for (i = 0; outlen < len; i++) | 198 | for (i = 0; outlen < len; i++) |
| 198 | { | 199 | { |
| 199 | cnt[0] = (unsigned char)((i >> 24) & 255); | 200 | cnt[0] = (unsigned char)((i >> 24) & 255); |
| 200 | cnt[1] = (unsigned char)((i >> 16) & 255); | 201 | cnt[1] = (unsigned char)((i >> 16) & 255); |
| 201 | cnt[2] = (unsigned char)((i >> 8)) & 255; | 202 | cnt[2] = (unsigned char)((i >> 8)) & 255; |
| 202 | cnt[3] = (unsigned char)(i & 255); | 203 | cnt[3] = (unsigned char)(i & 255); |
| 203 | EVP_DigestInit_ex(&c,dgst, NULL); | 204 | if (!EVP_DigestInit_ex(&c,dgst, NULL) |
| 204 | EVP_DigestUpdate(&c, seed, seedlen); | 205 | || !EVP_DigestUpdate(&c, seed, seedlen) |
| 205 | EVP_DigestUpdate(&c, cnt, 4); | 206 | || !EVP_DigestUpdate(&c, cnt, 4)) |
| 207 | goto err; | ||
| 206 | if (outlen + mdlen <= len) | 208 | if (outlen + mdlen <= len) |
| 207 | { | 209 | { |
| 208 | EVP_DigestFinal_ex(&c, mask + outlen, NULL); | 210 | if (!EVP_DigestFinal_ex(&c, mask + outlen, NULL)) |
| 211 | goto err; | ||
| 209 | outlen += mdlen; | 212 | outlen += mdlen; |
| 210 | } | 213 | } |
| 211 | else | 214 | else |
| 212 | { | 215 | { |
| 213 | EVP_DigestFinal_ex(&c, md, NULL); | 216 | if (!EVP_DigestFinal_ex(&c, md, NULL)) |
| 217 | goto err; | ||
| 214 | memcpy(mask + outlen, md, len - outlen); | 218 | memcpy(mask + outlen, md, len - outlen); |
| 215 | outlen = len; | 219 | outlen = len; |
| 216 | } | 220 | } |
| 217 | } | 221 | } |
| 222 | rv = 0; | ||
| 223 | err: | ||
| 218 | EVP_MD_CTX_cleanup(&c); | 224 | EVP_MD_CTX_cleanup(&c); |
| 219 | return 0; | 225 | return rv; |
| 220 | } | 226 | } |
| 221 | 227 | ||
| 222 | static int MGF1(unsigned char *mask, long len, const unsigned char *seed, | 228 | static int MGF1(unsigned char *mask, long len, const unsigned char *seed, |
diff --git a/src/lib/libssl/src/crypto/stack/safestack.h b/src/lib/libssl/src/crypto/stack/safestack.h index 891cb84a51..3e76aa58f5 100644 --- a/src/lib/libssl/src/crypto/stack/safestack.h +++ b/src/lib/libssl/src/crypto/stack/safestack.h | |||
| @@ -179,7 +179,8 @@ DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void) | |||
| 179 | sk_is_sorted(CHECKED_STACK_OF(type, st)) | 179 | sk_is_sorted(CHECKED_STACK_OF(type, st)) |
| 180 | 180 | ||
| 181 | #define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 181 | #define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
| 182 | (STACK_OF(type) *)d2i_ASN1_SET((STACK_OF(OPENSSL_BLOCK) **)CHECKED_STACK_OF(type, st), \ | 182 | (STACK_OF(type) *)d2i_ASN1_SET( \ |
| 183 | (STACK_OF(OPENSSL_BLOCK) **)CHECKED_PTR_OF(STACK_OF(type)*, st), \ | ||
| 183 | pp, length, \ | 184 | pp, length, \ |
| 184 | CHECKED_D2I_OF(type, d2i_func), \ | 185 | CHECKED_D2I_OF(type, d2i_func), \ |
| 185 | CHECKED_SK_FREE_FUNC(type, free_func), \ | 186 | CHECKED_SK_FREE_FUNC(type, free_func), \ |
| @@ -2030,79 +2031,79 @@ DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void) | |||
| 2030 | #define sk_void_sort(st) SKM_sk_sort(void, (st)) | 2031 | #define sk_void_sort(st) SKM_sk_sort(void, (st)) |
| 2031 | #define sk_void_is_sorted(st) SKM_sk_is_sorted(void, (st)) | 2032 | #define sk_void_is_sorted(st) SKM_sk_is_sorted(void, (st)) |
| 2032 | 2033 | ||
| 2033 | #define sk_OPENSSL_BLOCK_new(cmp) ((STACK_OF(OPENSSL_BLOCK) *)sk_new(CHECKED_SK_CMP_FUNC(void, cmp))) | 2034 | #define sk_OPENSSL_STRING_new(cmp) ((STACK_OF(OPENSSL_STRING) *)sk_new(CHECKED_SK_CMP_FUNC(char, cmp))) |
| 2034 | #define sk_OPENSSL_BLOCK_new_null() ((STACK_OF(OPENSSL_BLOCK) *)sk_new_null()) | 2035 | #define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)sk_new_null()) |
| 2035 | #define sk_OPENSSL_BLOCK_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, val)) | 2036 | #define sk_OPENSSL_STRING_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val)) |
| 2036 | #define sk_OPENSSL_BLOCK_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, val)) | 2037 | #define sk_OPENSSL_STRING_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val)) |
| 2037 | #define sk_OPENSSL_BLOCK_value(st, i) ((OPENSSL_BLOCK)sk_value(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), i)) | 2038 | #define sk_OPENSSL_STRING_value(st, i) ((OPENSSL_STRING)sk_value(CHECKED_STACK_OF(OPENSSL_STRING, st), i)) |
| 2038 | #define sk_OPENSSL_BLOCK_num(st) SKM_sk_num(OPENSSL_BLOCK, st) | 2039 | #define sk_OPENSSL_STRING_num(st) SKM_sk_num(OPENSSL_STRING, st) |
| 2039 | #define sk_OPENSSL_BLOCK_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_SK_FREE_FUNC2(OPENSSL_BLOCK, free_func)) | 2040 | #define sk_OPENSSL_STRING_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_SK_FREE_FUNC2(OPENSSL_STRING, free_func)) |
| 2040 | #define sk_OPENSSL_BLOCK_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, val), i) | 2041 | #define sk_OPENSSL_STRING_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val), i) |
| 2041 | #define sk_OPENSSL_BLOCK_free(st) SKM_sk_free(OPENSSL_BLOCK, st) | 2042 | #define sk_OPENSSL_STRING_free(st) SKM_sk_free(OPENSSL_STRING, st) |
| 2042 | #define sk_OPENSSL_BLOCK_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), i, CHECKED_PTR_OF(void, val)) | 2043 | #define sk_OPENSSL_STRING_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_STRING, st), i, CHECKED_PTR_OF(char, val)) |
| 2043 | #define sk_OPENSSL_BLOCK_zero(st) SKM_sk_zero(OPENSSL_BLOCK, (st)) | 2044 | #define sk_OPENSSL_STRING_zero(st) SKM_sk_zero(OPENSSL_STRING, (st)) |
| 2044 | #define sk_OPENSSL_BLOCK_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, val)) | 2045 | #define sk_OPENSSL_STRING_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val)) |
| 2045 | #define sk_OPENSSL_BLOCK_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_CONST_PTR_OF(void, val)) | 2046 | #define sk_OPENSSL_STRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_CONST_PTR_OF(char, val)) |
| 2046 | #define sk_OPENSSL_BLOCK_delete(st, i) SKM_sk_delete(OPENSSL_BLOCK, (st), (i)) | 2047 | #define sk_OPENSSL_STRING_delete(st, i) SKM_sk_delete(OPENSSL_STRING, (st), (i)) |
| 2047 | #define sk_OPENSSL_BLOCK_delete_ptr(st, ptr) (OPENSSL_BLOCK *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, ptr)) | 2048 | #define sk_OPENSSL_STRING_delete_ptr(st, ptr) (OPENSSL_STRING *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, ptr)) |
| 2048 | #define sk_OPENSSL_BLOCK_set_cmp_func(st, cmp) \ | 2049 | #define sk_OPENSSL_STRING_set_cmp_func(st, cmp) \ |
| 2049 | ((int (*)(const void * const *,const void * const *)) \ | 2050 | ((int (*)(const char * const *,const char * const *)) \ |
| 2050 | sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_SK_CMP_FUNC(void, cmp))) | 2051 | sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_SK_CMP_FUNC(char, cmp))) |
| 2051 | #define sk_OPENSSL_BLOCK_dup(st) SKM_sk_dup(OPENSSL_BLOCK, st) | 2052 | #define sk_OPENSSL_STRING_dup(st) SKM_sk_dup(OPENSSL_STRING, st) |
| 2052 | #define sk_OPENSSL_BLOCK_shift(st) SKM_sk_shift(OPENSSL_BLOCK, (st)) | 2053 | #define sk_OPENSSL_STRING_shift(st) SKM_sk_shift(OPENSSL_STRING, (st)) |
| 2053 | #define sk_OPENSSL_BLOCK_pop(st) (void *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st)) | 2054 | #define sk_OPENSSL_STRING_pop(st) (char *)sk_pop(CHECKED_STACK_OF(OPENSSL_STRING, st)) |
| 2054 | #define sk_OPENSSL_BLOCK_sort(st) SKM_sk_sort(OPENSSL_BLOCK, (st)) | 2055 | #define sk_OPENSSL_STRING_sort(st) SKM_sk_sort(OPENSSL_STRING, (st)) |
| 2055 | #define sk_OPENSSL_BLOCK_is_sorted(st) SKM_sk_is_sorted(OPENSSL_BLOCK, (st)) | 2056 | #define sk_OPENSSL_STRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_STRING, (st)) |
| 2056 | 2057 | ||
| 2057 | 2058 | ||
| 2058 | #define sk_OPENSSL_PSTRING_new(cmp) ((STACK_OF(OPENSSL_PSTRING) *)sk_new(CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp))) | 2059 | #define sk_OPENSSL_PSTRING_new(cmp) ((STACK_OF(OPENSSL_PSTRING) *)sk_new(CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp))) |
| 2059 | #define sk_OPENSSL_PSTRING_new_null() ((STACK_OF(OPENSSL_PSTRING) *)sk_new_null()) | 2060 | #define sk_OPENSSL_PSTRING_new_null() ((STACK_OF(OPENSSL_PSTRING) *)sk_new_null()) |
| 2060 | #define sk_OPENSSL_PSTRING_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, val)) | 2061 | #define sk_OPENSSL_PSTRING_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val)) |
| 2061 | #define sk_OPENSSL_PSTRING_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, val)) | 2062 | #define sk_OPENSSL_PSTRING_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val)) |
| 2062 | #define sk_OPENSSL_PSTRING_value(st, i) ((OPENSSL_PSTRING)sk_value(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), i)) | 2063 | #define sk_OPENSSL_PSTRING_value(st, i) ((OPENSSL_PSTRING)sk_value(CHECKED_STACK_OF(OPENSSL_PSTRING, st), i)) |
| 2063 | #define sk_OPENSSL_PSTRING_num(st) SKM_sk_num(OPENSSL_PSTRING, st) | 2064 | #define sk_OPENSSL_PSTRING_num(st) SKM_sk_num(OPENSSL_PSTRING, st) |
| 2064 | #define sk_OPENSSL_PSTRING_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_SK_FREE_FUNC2(OPENSSL_PSTRING, free_func)) | 2065 | #define sk_OPENSSL_PSTRING_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_SK_FREE_FUNC2(OPENSSL_PSTRING, free_func)) |
| 2065 | #define sk_OPENSSL_PSTRING_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, val), i) | 2066 | #define sk_OPENSSL_PSTRING_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val), i) |
| 2066 | #define sk_OPENSSL_PSTRING_free(st) SKM_sk_free(OPENSSL_PSTRING, st) | 2067 | #define sk_OPENSSL_PSTRING_free(st) SKM_sk_free(OPENSSL_PSTRING, st) |
| 2067 | #define sk_OPENSSL_PSTRING_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), i, CHECKED_PTR_OF(OPENSSL_STRING, val)) | 2068 | #define sk_OPENSSL_PSTRING_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_PSTRING, st), i, CHECKED_PTR_OF(OPENSSL_STRING, val)) |
| 2068 | #define sk_OPENSSL_PSTRING_zero(st) SKM_sk_zero(OPENSSL_PSTRING, (st)) | 2069 | #define sk_OPENSSL_PSTRING_zero(st) SKM_sk_zero(OPENSSL_PSTRING, (st)) |
| 2069 | #define sk_OPENSSL_PSTRING_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, val)) | 2070 | #define sk_OPENSSL_PSTRING_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val)) |
| 2070 | #define sk_OPENSSL_PSTRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_CONST_PTR_OF(OPENSSL_STRING, val)) | 2071 | #define sk_OPENSSL_PSTRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_CONST_PTR_OF(OPENSSL_STRING, val)) |
| 2071 | #define sk_OPENSSL_PSTRING_delete(st, i) SKM_sk_delete(OPENSSL_PSTRING, (st), (i)) | 2072 | #define sk_OPENSSL_PSTRING_delete(st, i) SKM_sk_delete(OPENSSL_PSTRING, (st), (i)) |
| 2072 | #define sk_OPENSSL_PSTRING_delete_ptr(st, ptr) (OPENSSL_PSTRING *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, ptr)) | 2073 | #define sk_OPENSSL_PSTRING_delete_ptr(st, ptr) (OPENSSL_PSTRING *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, ptr)) |
| 2073 | #define sk_OPENSSL_PSTRING_set_cmp_func(st, cmp) \ | 2074 | #define sk_OPENSSL_PSTRING_set_cmp_func(st, cmp) \ |
| 2074 | ((int (*)(const OPENSSL_STRING * const *,const OPENSSL_STRING * const *)) \ | 2075 | ((int (*)(const OPENSSL_STRING * const *,const OPENSSL_STRING * const *)) \ |
| 2075 | sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp))) | 2076 | sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp))) |
| 2076 | #define sk_OPENSSL_PSTRING_dup(st) SKM_sk_dup(OPENSSL_PSTRING, st) | 2077 | #define sk_OPENSSL_PSTRING_dup(st) SKM_sk_dup(OPENSSL_PSTRING, st) |
| 2077 | #define sk_OPENSSL_PSTRING_shift(st) SKM_sk_shift(OPENSSL_PSTRING, (st)) | 2078 | #define sk_OPENSSL_PSTRING_shift(st) SKM_sk_shift(OPENSSL_PSTRING, (st)) |
| 2078 | #define sk_OPENSSL_PSTRING_pop(st) (OPENSSL_STRING *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st)) | 2079 | #define sk_OPENSSL_PSTRING_pop(st) (OPENSSL_STRING *)sk_pop(CHECKED_STACK_OF(OPENSSL_PSTRING, st)) |
| 2079 | #define sk_OPENSSL_PSTRING_sort(st) SKM_sk_sort(OPENSSL_PSTRING, (st)) | 2080 | #define sk_OPENSSL_PSTRING_sort(st) SKM_sk_sort(OPENSSL_PSTRING, (st)) |
| 2080 | #define sk_OPENSSL_PSTRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_PSTRING, (st)) | 2081 | #define sk_OPENSSL_PSTRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_PSTRING, (st)) |
| 2081 | 2082 | ||
| 2082 | 2083 | ||
| 2083 | #define sk_OPENSSL_STRING_new(cmp) ((STACK_OF(OPENSSL_STRING) *)sk_new(CHECKED_SK_CMP_FUNC(char, cmp))) | 2084 | #define sk_OPENSSL_BLOCK_new(cmp) ((STACK_OF(OPENSSL_BLOCK) *)sk_new(CHECKED_SK_CMP_FUNC(void, cmp))) |
| 2084 | #define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)sk_new_null()) | 2085 | #define sk_OPENSSL_BLOCK_new_null() ((STACK_OF(OPENSSL_BLOCK) *)sk_new_null()) |
| 2085 | #define sk_OPENSSL_STRING_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, val)) | 2086 | #define sk_OPENSSL_BLOCK_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val)) |
| 2086 | #define sk_OPENSSL_STRING_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, val)) | 2087 | #define sk_OPENSSL_BLOCK_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val)) |
| 2087 | #define sk_OPENSSL_STRING_value(st, i) ((OPENSSL_STRING)sk_value(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), i)) | 2088 | #define sk_OPENSSL_BLOCK_value(st, i) ((OPENSSL_BLOCK)sk_value(CHECKED_STACK_OF(OPENSSL_BLOCK, st), i)) |
| 2088 | #define sk_OPENSSL_STRING_num(st) SKM_sk_num(OPENSSL_STRING, st) | 2089 | #define sk_OPENSSL_BLOCK_num(st) SKM_sk_num(OPENSSL_BLOCK, st) |
| 2089 | #define sk_OPENSSL_STRING_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_SK_FREE_FUNC2(OPENSSL_STRING, free_func)) | 2090 | #define sk_OPENSSL_BLOCK_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_SK_FREE_FUNC2(OPENSSL_BLOCK, free_func)) |
| 2090 | #define sk_OPENSSL_STRING_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, val), i) | 2091 | #define sk_OPENSSL_BLOCK_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val), i) |
| 2091 | #define sk_OPENSSL_STRING_free(st) SKM_sk_free(OPENSSL_STRING, st) | 2092 | #define sk_OPENSSL_BLOCK_free(st) SKM_sk_free(OPENSSL_BLOCK, st) |
| 2092 | #define sk_OPENSSL_STRING_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), i, CHECKED_PTR_OF(char, val)) | 2093 | #define sk_OPENSSL_BLOCK_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_BLOCK, st), i, CHECKED_PTR_OF(void, val)) |
| 2093 | #define sk_OPENSSL_STRING_zero(st) SKM_sk_zero(OPENSSL_STRING, (st)) | 2094 | #define sk_OPENSSL_BLOCK_zero(st) SKM_sk_zero(OPENSSL_BLOCK, (st)) |
| 2094 | #define sk_OPENSSL_STRING_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, val)) | 2095 | #define sk_OPENSSL_BLOCK_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val)) |
| 2095 | #define sk_OPENSSL_STRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_CONST_PTR_OF(char, val)) | 2096 | #define sk_OPENSSL_BLOCK_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_CONST_PTR_OF(void, val)) |
| 2096 | #define sk_OPENSSL_STRING_delete(st, i) SKM_sk_delete(OPENSSL_STRING, (st), (i)) | 2097 | #define sk_OPENSSL_BLOCK_delete(st, i) SKM_sk_delete(OPENSSL_BLOCK, (st), (i)) |
| 2097 | #define sk_OPENSSL_STRING_delete_ptr(st, ptr) (OPENSSL_STRING *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, ptr)) | 2098 | #define sk_OPENSSL_BLOCK_delete_ptr(st, ptr) (OPENSSL_BLOCK *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, ptr)) |
| 2098 | #define sk_OPENSSL_STRING_set_cmp_func(st, cmp) \ | 2099 | #define sk_OPENSSL_BLOCK_set_cmp_func(st, cmp) \ |
| 2099 | ((int (*)(const char * const *,const char * const *)) \ | 2100 | ((int (*)(const void * const *,const void * const *)) \ |
| 2100 | sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_SK_CMP_FUNC(char, cmp))) | 2101 | sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_SK_CMP_FUNC(void, cmp))) |
| 2101 | #define sk_OPENSSL_STRING_dup(st) SKM_sk_dup(OPENSSL_STRING, st) | 2102 | #define sk_OPENSSL_BLOCK_dup(st) SKM_sk_dup(OPENSSL_BLOCK, st) |
| 2102 | #define sk_OPENSSL_STRING_shift(st) SKM_sk_shift(OPENSSL_STRING, (st)) | 2103 | #define sk_OPENSSL_BLOCK_shift(st) SKM_sk_shift(OPENSSL_BLOCK, (st)) |
| 2103 | #define sk_OPENSSL_STRING_pop(st) (char *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st)) | 2104 | #define sk_OPENSSL_BLOCK_pop(st) (void *)sk_pop(CHECKED_STACK_OF(OPENSSL_BLOCK, st)) |
| 2104 | #define sk_OPENSSL_STRING_sort(st) SKM_sk_sort(OPENSSL_STRING, (st)) | 2105 | #define sk_OPENSSL_BLOCK_sort(st) SKM_sk_sort(OPENSSL_BLOCK, (st)) |
| 2105 | #define sk_OPENSSL_STRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_STRING, (st)) | 2106 | #define sk_OPENSSL_BLOCK_is_sorted(st) SKM_sk_is_sorted(OPENSSL_BLOCK, (st)) |
| 2106 | 2107 | ||
| 2107 | 2108 | ||
| 2108 | #define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2109 | #define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
diff --git a/src/lib/libssl/src/crypto/x509/x509.h b/src/lib/libssl/src/crypto/x509/x509.h index 604f4fb27f..e6f8a40395 100644 --- a/src/lib/libssl/src/crypto/x509/x509.h +++ b/src/lib/libssl/src/crypto/x509/x509.h | |||
| @@ -258,6 +258,7 @@ typedef struct x509_cinf_st | |||
| 258 | ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */ | 258 | ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */ |
| 259 | ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */ | 259 | ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */ |
| 260 | STACK_OF(X509_EXTENSION) *extensions; /* [ 3 ] optional in v3 */ | 260 | STACK_OF(X509_EXTENSION) *extensions; /* [ 3 ] optional in v3 */ |
| 261 | ASN1_ENCODING enc; | ||
| 261 | } X509_CINF; | 262 | } X509_CINF; |
| 262 | 263 | ||
| 263 | /* This stuff is certificate "auxiliary info" | 264 | /* This stuff is certificate "auxiliary info" |
diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.c b/src/lib/libssl/src/crypto/x509/x509_vfy.c index 87ebf62525..5a0b0249b4 100644 --- a/src/lib/libssl/src/crypto/x509/x509_vfy.c +++ b/src/lib/libssl/src/crypto/x509/x509_vfy.c | |||
| @@ -703,6 +703,7 @@ static int check_cert(X509_STORE_CTX *ctx) | |||
| 703 | x = sk_X509_value(ctx->chain, cnum); | 703 | x = sk_X509_value(ctx->chain, cnum); |
| 704 | ctx->current_cert = x; | 704 | ctx->current_cert = x; |
| 705 | ctx->current_issuer = NULL; | 705 | ctx->current_issuer = NULL; |
| 706 | ctx->current_crl_score = 0; | ||
| 706 | ctx->current_reasons = 0; | 707 | ctx->current_reasons = 0; |
| 707 | while (ctx->current_reasons != CRLDP_ALL_REASONS) | 708 | while (ctx->current_reasons != CRLDP_ALL_REASONS) |
| 708 | { | 709 | { |
| @@ -2015,6 +2016,9 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | |||
| 2015 | ctx->error_depth=0; | 2016 | ctx->error_depth=0; |
| 2016 | ctx->current_cert=NULL; | 2017 | ctx->current_cert=NULL; |
| 2017 | ctx->current_issuer=NULL; | 2018 | ctx->current_issuer=NULL; |
| 2019 | ctx->current_crl=NULL; | ||
| 2020 | ctx->current_crl_score=0; | ||
| 2021 | ctx->current_reasons=0; | ||
| 2018 | ctx->tree = NULL; | 2022 | ctx->tree = NULL; |
| 2019 | ctx->parent = NULL; | 2023 | ctx->parent = NULL; |
| 2020 | 2024 | ||
| @@ -2034,7 +2038,7 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | |||
| 2034 | if (store) | 2038 | if (store) |
| 2035 | ret = X509_VERIFY_PARAM_inherit(ctx->param, store->param); | 2039 | ret = X509_VERIFY_PARAM_inherit(ctx->param, store->param); |
| 2036 | else | 2040 | else |
| 2037 | ctx->param->flags |= X509_VP_FLAG_DEFAULT|X509_VP_FLAG_ONCE; | 2041 | ctx->param->inh_flags |= X509_VP_FLAG_DEFAULT|X509_VP_FLAG_ONCE; |
| 2038 | 2042 | ||
| 2039 | if (store) | 2043 | if (store) |
| 2040 | { | 2044 | { |
diff --git a/src/lib/libssl/src/crypto/x509/x_all.c b/src/lib/libssl/src/crypto/x509/x_all.c index ebae30b701..8ec88c215a 100644 --- a/src/lib/libssl/src/crypto/x509/x_all.c +++ b/src/lib/libssl/src/crypto/x509/x_all.c | |||
| @@ -90,6 +90,7 @@ int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r) | |||
| 90 | 90 | ||
| 91 | int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md) | 91 | int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md) |
| 92 | { | 92 | { |
| 93 | x->cert_info->enc.modified = 1; | ||
| 93 | return(ASN1_item_sign(ASN1_ITEM_rptr(X509_CINF), x->cert_info->signature, | 94 | return(ASN1_item_sign(ASN1_ITEM_rptr(X509_CINF), x->cert_info->signature, |
| 94 | x->sig_alg, x->signature, x->cert_info,pkey,md)); | 95 | x->sig_alg, x->signature, x->cert_info,pkey,md)); |
| 95 | } | 96 | } |
diff --git a/src/lib/libssl/src/doc/apps/smime.pod b/src/lib/libssl/src/doc/apps/smime.pod index 42c0733bcb..e4e89af847 100644 --- a/src/lib/libssl/src/doc/apps/smime.pod +++ b/src/lib/libssl/src/doc/apps/smime.pod | |||
| @@ -343,7 +343,7 @@ Create a cleartext signed message: | |||
| 343 | openssl smime -sign -in message.txt -text -out mail.msg \ | 343 | openssl smime -sign -in message.txt -text -out mail.msg \ |
| 344 | -signer mycert.pem | 344 | -signer mycert.pem |
| 345 | 345 | ||
| 346 | Create an opaque signed message | 346 | Create an opaque signed message: |
| 347 | 347 | ||
| 348 | openssl smime -sign -in message.txt -text -out mail.msg -nodetach \ | 348 | openssl smime -sign -in message.txt -text -out mail.msg -nodetach \ |
| 349 | -signer mycert.pem | 349 | -signer mycert.pem |
| @@ -397,11 +397,11 @@ it with: | |||
| 397 | -----BEGIN PKCS7----- | 397 | -----BEGIN PKCS7----- |
| 398 | -----END PKCS7----- | 398 | -----END PKCS7----- |
| 399 | 399 | ||
| 400 | and using the command, | 400 | and using the command: |
| 401 | 401 | ||
| 402 | openssl smime -verify -inform PEM -in signature.pem -content content.txt | 402 | openssl smime -verify -inform PEM -in signature.pem -content content.txt |
| 403 | 403 | ||
| 404 | alternatively you can base64 decode the signature and use | 404 | Alternatively you can base64 decode the signature and use: |
| 405 | 405 | ||
| 406 | openssl smime -verify -inform DER -in signature.der -content content.txt | 406 | openssl smime -verify -inform DER -in signature.der -content content.txt |
| 407 | 407 | ||
| @@ -427,7 +427,7 @@ Ideally a database should be maintained of a certificates for each email | |||
| 427 | address. | 427 | address. |
| 428 | 428 | ||
| 429 | The code doesn't currently take note of the permitted symmetric encryption | 429 | The code doesn't currently take note of the permitted symmetric encryption |
| 430 | algorithms as supplied in the SMIMECapabilities signed attribute. this means the | 430 | algorithms as supplied in the SMIMECapabilities signed attribute. This means the |
| 431 | user has to manually include the correct encryption algorithm. It should store | 431 | user has to manually include the correct encryption algorithm. It should store |
| 432 | the list of permitted ciphers in a database and only use those. | 432 | the list of permitted ciphers in a database and only use those. |
| 433 | 433 | ||
diff --git a/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod b/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod index e2a2a8c6f8..f3605eb826 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod | |||
| @@ -74,7 +74,7 @@ Recover digest originally signed using PKCS#1 and SHA256 digest: | |||
| 74 | /* Error */ | 74 | /* Error */ |
| 75 | 75 | ||
| 76 | /* Determine buffer length */ | 76 | /* Determine buffer length */ |
| 77 | if (EVP_PKEY_verifyrecover(ctx, rout, &routlen, sig, siglen) <= 0) | 77 | if (EVP_PKEY_verifyrecover(ctx, NULL, &routlen, sig, siglen) <= 0) |
| 78 | /* Error */ | 78 | /* Error */ |
| 79 | 79 | ||
| 80 | rout = OPENSSL_malloc(routlen); | 80 | rout = OPENSSL_malloc(routlen); |
diff --git a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod index 310db84b31..cc588f3a78 100644 --- a/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod +++ b/src/lib/libssl/src/doc/ssl/SSL_CTX_set_options.pod | |||
| @@ -78,18 +78,7 @@ this breaks this server so 16 bytes is the way to go. | |||
| 78 | 78 | ||
| 79 | =item SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG | 79 | =item SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG |
| 80 | 80 | ||
| 81 | ssl3.netscape.com:443, first a connection is established with RC4-MD5. | 81 | As of OpenSSL 0.9.8q and 1.0.0c, this option has no effect. |
| 82 | If it is then resumed, we end up using DES-CBC3-SHA. It should be | ||
| 83 | RC4-MD5 according to 7.6.1.3, 'cipher_suite'. | ||
| 84 | |||
| 85 | Netscape-Enterprise/2.01 (https://merchant.netscape.com) has this bug. | ||
| 86 | It only really shows up when connecting via SSLv2/v3 then reconnecting | ||
| 87 | via SSLv3. The cipher list changes.... | ||
| 88 | |||
| 89 | NEW INFORMATION. Try connecting with a cipher list of just | ||
| 90 | DES-CBC-SHA:RC4-MD5. For some weird reason, each new connection uses | ||
| 91 | RC4-MD5, but a re-connect tries to use DES-CBC-SHA. So netscape, when | ||
| 92 | doing a re-connect, always takes the first cipher in the cipher list. | ||
| 93 | 82 | ||
| 94 | =item SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG | 83 | =item SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG |
| 95 | 84 | ||
diff --git a/src/lib/libssl/src/doc/ssl/ssl.pod b/src/lib/libssl/src/doc/ssl/ssl.pod index 2b6004ee32..6d3ee24e4e 100644 --- a/src/lib/libssl/src/doc/ssl/ssl.pod +++ b/src/lib/libssl/src/doc/ssl/ssl.pod | |||
| @@ -158,7 +158,7 @@ Constructor for the SSLv3 SSL_METHOD structure for combined client and server. | |||
| 158 | 158 | ||
| 159 | Constructor for the TLSv1 SSL_METHOD structure for a dedicated client. | 159 | Constructor for the TLSv1 SSL_METHOD structure for a dedicated client. |
| 160 | 160 | ||
| 161 | =item cosnt SSL_METHOD *B<TLSv1_server_method>(void); | 161 | =item const SSL_METHOD *B<TLSv1_server_method>(void); |
| 162 | 162 | ||
| 163 | Constructor for the TLSv1 SSL_METHOD structure for a dedicated server. | 163 | Constructor for the TLSv1 SSL_METHOD structure for a dedicated server. |
| 164 | 164 | ||
diff --git a/src/lib/libssl/src/engines/makeengines.com b/src/lib/libssl/src/engines/makeengines.com index 6cf4236077..6329fbbf03 100644 --- a/src/lib/libssl/src/engines/makeengines.com +++ b/src/lib/libssl/src/engines/makeengines.com | |||
| @@ -28,11 +28,35 @@ $! | |||
| 28 | $! P6 if defined, denotes which engines to build. If not defined, | 28 | $! P6 if defined, denotes which engines to build. If not defined, |
| 29 | $! all available engines are built. | 29 | $! all available engines are built. |
| 30 | $! | 30 | $! |
| 31 | $! P7, if defined, specifies the C pointer size. Ignored on VAX. | ||
| 32 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) | ||
| 33 | $! Supported values are: | ||
| 34 | $! | ||
| 35 | $! "" Compile with default (/NOPOINTER_SIZE) | ||
| 36 | $! 32 Compile with /POINTER_SIZE=32 (SHORT) | ||
| 37 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]) | ||
| 38 | $! (Automatically select ARGV if compiler supports it.) | ||
| 39 | $! 64= Compile with /POINTER_SIZE=64 (LONG). | ||
| 40 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). | ||
| 41 | $! | ||
| 42 | $! P8, if defined, specifies a directory where ZLIB files (zlib.h, | ||
| 43 | $! libz.olb) may be found. Optionally, a non-default object library | ||
| 44 | $! name may be included ("dev:[dir]libz_64.olb", for example). | ||
| 45 | $! | ||
| 31 | $!----------------------------------------------------------------------------- | 46 | $!----------------------------------------------------------------------------- |
| 32 | $! | 47 | $! |
| 48 | $! Announce/identify. | ||
| 49 | $! | ||
| 50 | $ proc = f$environment( "procedure") | ||
| 51 | $ write sys$output "@@@ "+ - | ||
| 52 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 53 | $! | ||
| 54 | $ on control_c then goto exit | ||
| 55 | $! | ||
| 33 | $! Set the default TCP/IP library to link against if needed | 56 | $! Set the default TCP/IP library to link against if needed |
| 34 | $! | 57 | $! |
| 35 | $ TCPIP_LIB = "" | 58 | $ TCPIP_LIB = "" |
| 59 | $ ZLIB_LIB = "" | ||
| 36 | $! | 60 | $! |
| 37 | $! Check What Architecture We Are Using. | 61 | $! Check What Architecture We Are Using. |
| 38 | $! | 62 | $! |
| @@ -56,6 +80,11 @@ $! End The Architecture Check. | |||
| 56 | $! | 80 | $! |
| 57 | $ ENDIF | 81 | $ ENDIF |
| 58 | $! | 82 | $! |
| 83 | $ ARCHD = ARCH | ||
| 84 | $ LIB32 = "32" | ||
| 85 | $ OPT_FILE = "" | ||
| 86 | $ POINTER_SIZE = "" | ||
| 87 | $! | ||
| 59 | $! Set the names of the engines we want to build | 88 | $! Set the names of the engines we want to build |
| 60 | $! NOTE: Some might think this list ugly. However, it's made this way to | 89 | $! NOTE: Some might think this list ugly. However, it's made this way to |
| 61 | $! reflect the LIBNAMES variable in Makefile as closely as possible, | 90 | $! reflect the LIBNAMES variable in Makefile as closely as possible, |
| @@ -72,28 +101,47 @@ $! | |||
| 72 | $ IF (ARCH .NES. "VAX") THEN - | 101 | $ IF (ARCH .NES. "VAX") THEN - |
| 73 | ENGINES = ENGINES+ ",ccgost" | 102 | ENGINES = ENGINES+ ",ccgost" |
| 74 | $! | 103 | $! |
| 104 | $! Check options. | ||
| 105 | $! | ||
| 106 | $ OPT_PHASE = P1 | ||
| 107 | $ ACCEPT_PHASE = "ALL,ENGINES" | ||
| 108 | $ OPT_DEBUG = P2 | ||
| 109 | $ OPT_COMPILER = P3 | ||
| 110 | $ OPT_TCPIP_LIB = P4 | ||
| 111 | $ OPT_SPECIAL_THREADS = P5 | ||
| 112 | $ OPT_POINTER_SIZE = P7 | ||
| 113 | $ ZLIB = P8 | ||
| 114 | $ | ||
| 115 | $ GOSUB CHECK_OPTIONS | ||
| 116 | $! | ||
| 75 | $! Set the goal directories, and create them if necessary | 117 | $! Set the goal directories, and create them if necessary |
| 76 | $! | 118 | $! |
| 77 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.ENGINES] | 119 | $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.ENGINES] |
| 78 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.ENGINES] | 120 | $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.ENGINES] |
| 79 | $ IF F$PARSE(OBJ_DIR) .EQS. "" THEN CREATE/DIRECTORY 'OBJ_DIR' | 121 | $ IF F$PARSE(OBJ_DIR) .EQS. "" THEN CREATE/DIRECTORY 'OBJ_DIR' |
| 80 | $ IF F$PARSE(EXE_DIR) .EQS. "" THEN CREATE/DIRECTORY 'EXE_DIR' | 122 | $ IF F$PARSE(EXE_DIR) .EQS. "" THEN CREATE/DIRECTORY 'EXE_DIR' |
| 81 | $! | 123 | $! |
| 82 | $! Set the goal files, and create them if necessary | 124 | $! Set the goal files, and create them if necessary |
| 83 | $! | 125 | $! |
| 84 | $ CRYPTO_LIB :=SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB | 126 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB |
| 85 | $ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB' | 127 | $ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB' |
| 86 | $! | 128 | $! |
| 87 | $! OK, time to check options and initialise | 129 | $! Specify the destination directory in any /MAP option. |
| 130 | $! | ||
| 131 | $ if (LINKMAP .eqs. "MAP") | ||
| 132 | $ then | ||
| 133 | $ LINKMAP = LINKMAP+ "=''EXE_DIR'" | ||
| 134 | $ endif | ||
| 135 | $! | ||
| 136 | $! Add the location prefix to the linker options file name. | ||
| 137 | $! | ||
| 138 | $ if (OPT_FILE .nes. "") | ||
| 139 | $ then | ||
| 140 | $ OPT_FILE = EXE_DIR+ OPT_FILE | ||
| 141 | $ endif | ||
| 142 | $! | ||
| 143 | $! Initialise. | ||
| 88 | $! | 144 | $! |
| 89 | $ OPT_PHASE = P1 | ||
| 90 | $ ACCEPT_PHASE = "ALL,ENGINES" | ||
| 91 | $ OPT_DEBUG = P2 | ||
| 92 | $ OPT_COMPILER = P3 | ||
| 93 | $ OPT_TCPIP_LIB = P4 | ||
| 94 | $ OPT_SPECIAL_THREADS = P5 | ||
| 95 | $ | ||
| 96 | $ GOSUB CHECK_OPTIONS | ||
| 97 | $ GOSUB INITIALISE | 145 | $ GOSUB INITIALISE |
| 98 | $ GOSUB CHECK_OPT_FILE | 146 | $ GOSUB CHECK_OPT_FILE |
| 99 | $! | 147 | $! |
| @@ -172,7 +220,7 @@ $! Create a .OPT file for the object files (for a real engine name). | |||
| 172 | $! | 220 | $! |
| 173 | $ IF ENGINE_NAME .NES. "" | 221 | $ IF ENGINE_NAME .NES. "" |
| 174 | $ THEN | 222 | $ THEN |
| 175 | $ OPEN/WRITE OBJECTS 'EXE_DIR''ENGINE_NAME'.OPT | 223 | $ OPEN /WRITE OBJECTS 'EXE_DIR''ENGINE_NAME'.OPT |
| 176 | $ ENDIF | 224 | $ ENDIF |
| 177 | $! | 225 | $! |
| 178 | $! Here's the start of per-engine module loop. | 226 | $! Here's the start of per-engine module loop. |
| @@ -257,18 +305,14 @@ $! For shareable libraries, we need to do things a little differently | |||
| 257 | $! depending on if we link with a TCP/IP library or not. | 305 | $! depending on if we link with a TCP/IP library or not. |
| 258 | $! | 306 | $! |
| 259 | $ ENGINE_OPT := SYS$DISK:[]'ARCH'.OPT | 307 | $ ENGINE_OPT := SYS$DISK:[]'ARCH'.OPT |
| 260 | $ IF TCPIP_LIB .NES. "" | 308 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE - |
| 261 | $ THEN | 309 | 'EXE_DIR''ENGINE_NAME'.OPT /OPTIONS - |
| 262 | $ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE - | 310 | 'TV_OBJ', - |
| 263 | 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'TV_OBJ', - | 311 | 'CRYPTO_LIB' /LIBRARY, - |
| 264 | 'CRYPTO_LIB'/LIBRARY, - | 312 | 'ENGINE_OPT' /OPTIONS - |
| 265 | 'ENGINE_OPT'/OPTION,'TCPIP_LIB','OPT_FILE'/OPTION | 313 | 'TCPIP_LIB' - |
| 266 | $ ELSE | 314 | 'ZLIB_LIB' - |
| 267 | $ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE - | 315 | ,'OPT_FILE' /OPTIONS |
| 268 | 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'TV_OBJ', - | ||
| 269 | 'CRYPTO_LIB'/LIBRARY, - | ||
| 270 | 'ENGINE_OPT'/OPTION,'OPT_FILE'/OPTION | ||
| 271 | $ ENDIF | ||
| 272 | $! | 316 | $! |
| 273 | $! Next engine | 317 | $! Next engine |
| 274 | $! | 318 | $! |
| @@ -302,7 +346,7 @@ $! | |||
| 302 | $ CREATE 'OPT_FILE' | 346 | $ CREATE 'OPT_FILE' |
| 303 | $DECK | 347 | $DECK |
| 304 | ! | 348 | ! |
| 305 | ! Default System Options File To Link Agianst | 349 | ! Default System Options File To Link Against |
| 306 | ! The Sharable VAX C Runtime Library. | 350 | ! The Sharable VAX C Runtime Library. |
| 307 | ! | 351 | ! |
| 308 | SYS$SHARE:VAXCRTL.EXE/SHARE | 352 | SYS$SHARE:VAXCRTL.EXE/SHARE |
| @@ -331,7 +375,7 @@ $! | |||
| 331 | $ CREATE 'OPT_FILE' | 375 | $ CREATE 'OPT_FILE' |
| 332 | $DECK | 376 | $DECK |
| 333 | ! | 377 | ! |
| 334 | ! Default System Options File To Link Agianst | 378 | ! Default System Options File To Link Against |
| 335 | ! The Sharable C Runtime Library. | 379 | ! The Sharable C Runtime Library. |
| 336 | ! | 380 | ! |
| 337 | GNU_CC:[000000]GCCLIB/LIBRARY | 381 | GNU_CC:[000000]GCCLIB/LIBRARY |
| @@ -366,7 +410,7 @@ $! | |||
| 366 | $ CREATE 'OPT_FILE' | 410 | $ CREATE 'OPT_FILE' |
| 367 | $DECK | 411 | $DECK |
| 368 | ! | 412 | ! |
| 369 | ! Default System Options File To Link Agianst | 413 | ! Default System Options File To Link Against |
| 370 | ! The Sharable DEC C Runtime Library. | 414 | ! The Sharable DEC C Runtime Library. |
| 371 | ! | 415 | ! |
| 372 | SYS$SHARE:DECC$SHR.EXE/SHARE | 416 | SYS$SHARE:DECC$SHR.EXE/SHARE |
| @@ -381,7 +425,7 @@ $! | |||
| 381 | $ CREATE 'OPT_FILE' | 425 | $ CREATE 'OPT_FILE' |
| 382 | $DECK | 426 | $DECK |
| 383 | ! | 427 | ! |
| 384 | ! Default System Options File For non-VAX To Link Agianst | 428 | ! Default System Options File For non-VAX To Link Against |
| 385 | ! The Sharable C Runtime Library. | 429 | ! The Sharable C Runtime Library. |
| 386 | ! | 430 | ! |
| 387 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE | 431 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE |
| @@ -453,8 +497,8 @@ $ IF ("," + ACCEPT_PHASE + ",") - ",ENGINES," - | |||
| 453 | $ WRITE SYS$OUTPUT "" | 497 | $ WRITE SYS$OUTPUT "" |
| 454 | $ WRITE SYS$OUTPUT " where 'xxx' stands for:" | 498 | $ WRITE SYS$OUTPUT " where 'xxx' stands for:" |
| 455 | $ WRITE SYS$OUTPUT "" | 499 | $ WRITE SYS$OUTPUT "" |
| 456 | $ WRITE SYS$OUTPUT " ALPHA : Alpha architecture." | 500 | $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha architecture." |
| 457 | $ WRITE SYS$OUTPUT " IA64 : IA64 architecture." | 501 | $ WRITE SYS$OUTPUT " IA64[64] : IA64 architecture." |
| 458 | $ WRITE SYS$OUTPUT " VAX : VAX architecture." | 502 | $ WRITE SYS$OUTPUT " VAX : VAX architecture." |
| 459 | $ WRITE SYS$OUTPUT "" | 503 | $ WRITE SYS$OUTPUT "" |
| 460 | $! | 504 | $! |
| @@ -475,15 +519,16 @@ $! | |||
| 475 | $ IF (OPT_DEBUG.EQS."NODEBUG") | 519 | $ IF (OPT_DEBUG.EQS."NODEBUG") |
| 476 | $ THEN | 520 | $ THEN |
| 477 | $! | 521 | $! |
| 478 | $! OPT_DEBUG Is NODEBUG, So Compile Without The Debugger Information. | 522 | $! OPT_DEBUG Is NODEBUG, So Compile Without The Debugger Information. |
| 479 | $! | 523 | $! |
| 480 | $ DEBUGGER = "NODEBUG" | 524 | $ DEBUGGER = "NODEBUG" |
| 481 | $ TRACEBACK = "NOTRACEBACK" | 525 | $ LINKMAP = "NOMAP" |
| 482 | $ GCC_OPTIMIZE = "OPTIMIZE" | 526 | $ TRACEBACK = "NOTRACEBACK" |
| 483 | $ CC_OPTIMIZE = "OPTIMIZE" | 527 | $ GCC_OPTIMIZE = "OPTIMIZE" |
| 484 | $ MACRO_OPTIMIZE = "OPTIMIZE" | 528 | $ CC_OPTIMIZE = "OPTIMIZE" |
| 485 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | 529 | $ MACRO_OPTIMIZE = "OPTIMIZE" |
| 486 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | 530 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
| 531 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
| 487 | $ ELSE | 532 | $ ELSE |
| 488 | $! | 533 | $! |
| 489 | $! Check To See If We Are To Compile With Debugger Information. | 534 | $! Check To See If We Are To Compile With Debugger Information. |
| @@ -494,6 +539,7 @@ $! | |||
| 494 | $! Compile With Debugger Information. | 539 | $! Compile With Debugger Information. |
| 495 | $! | 540 | $! |
| 496 | $ DEBUGGER = "DEBUG" | 541 | $ DEBUGGER = "DEBUG" |
| 542 | $ LINKMAP = "MAP" | ||
| 497 | $ TRACEBACK = "TRACEBACK" | 543 | $ TRACEBACK = "TRACEBACK" |
| 498 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | 544 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
| 499 | $ CC_OPTIMIZE = "NOOPTIMIZE" | 545 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
| @@ -502,7 +548,7 @@ $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." | |||
| 502 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." | 548 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." |
| 503 | $ ELSE | 549 | $ ELSE |
| 504 | $! | 550 | $! |
| 505 | $! They Entered An Invalid Option.. | 551 | $! They Entered An Invalid Option. |
| 506 | $! | 552 | $! |
| 507 | $ WRITE SYS$OUTPUT "" | 553 | $ WRITE SYS$OUTPUT "" |
| 508 | $ WRITE SYS$OUTPUT "The Option ",OPT_DEBUG," Is Invalid. The Valid Options Are:" | 554 | $ WRITE SYS$OUTPUT "The Option ",OPT_DEBUG," Is Invalid. The Valid Options Are:" |
| @@ -557,6 +603,59 @@ $! End The OPT_SPECIAL_THREADS Check. | |||
| 557 | $! | 603 | $! |
| 558 | $ ENDIF | 604 | $ ENDIF |
| 559 | $! | 605 | $! |
| 606 | $! Check OPT_POINTER_SIZE (P7). | ||
| 607 | $! | ||
| 608 | $ IF (OPT_POINTER_SIZE .NES. "") .AND. (ARCH .NES. "VAX") | ||
| 609 | $ THEN | ||
| 610 | $! | ||
| 611 | $ IF (OPT_POINTER_SIZE .EQS. "32") | ||
| 612 | $ THEN | ||
| 613 | $ POINTER_SIZE = " /POINTER_SIZE=32" | ||
| 614 | $ ELSE | ||
| 615 | $ POINTER_SIZE = F$EDIT( OPT_POINTER_SIZE, "COLLAPSE, UPCASE") | ||
| 616 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
| 617 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
| 618 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
| 619 | $ THEN | ||
| 620 | $ ARCHD = ARCH+ "_64" | ||
| 621 | $ LIB32 = "" | ||
| 622 | $ POINTER_SIZE = " /POINTER_SIZE=64" | ||
| 623 | $ ELSE | ||
| 624 | $! | ||
| 625 | $! Tell The User Entered An Invalid Option. | ||
| 626 | $! | ||
| 627 | $ WRITE SYS$OUTPUT "" | ||
| 628 | $ WRITE SYS$OUTPUT "The Option ", OPT_POINTER_SIZE, - | ||
| 629 | " Is Invalid. The Valid Options Are:" | ||
| 630 | $ WRITE SYS$OUTPUT "" | ||
| 631 | $ WRITE SYS$OUTPUT - | ||
| 632 | " """" : Compile with default (short) pointers." | ||
| 633 | $ WRITE SYS$OUTPUT - | ||
| 634 | " 32 : Compile with 32-bit (short) pointers." | ||
| 635 | $ WRITE SYS$OUTPUT - | ||
| 636 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
| 637 | $ WRITE SYS$OUTPUT - | ||
| 638 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
| 639 | $ WRITE SYS$OUTPUT - | ||
| 640 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
| 641 | $ WRITE SYS$OUTPUT "" | ||
| 642 | $! | ||
| 643 | $! Time To EXIT. | ||
| 644 | $! | ||
| 645 | $ EXIT | ||
| 646 | $! | ||
| 647 | $ ENDIF | ||
| 648 | $! | ||
| 649 | $ ENDIF | ||
| 650 | $! | ||
| 651 | $! End The OPT_POINTER_SIZE Check. | ||
| 652 | $! | ||
| 653 | $ ENDIF | ||
| 654 | $! | ||
| 655 | $! Set basic C compiler /INCLUDE directories. | ||
| 656 | $! | ||
| 657 | $ CC_INCLUDES = "SYS$DISK:[],SYS$DISK:[.VENDOR_DEFNS]" | ||
| 658 | $! | ||
| 560 | $! Check To See If OPT_COMPILER Is Blank. | 659 | $! Check To See If OPT_COMPILER Is Blank. |
| 561 | $! | 660 | $! |
| 562 | $ IF (OPT_COMPILER.EQS."") | 661 | $ IF (OPT_COMPILER.EQS."") |
| @@ -657,11 +756,63 @@ $ CCDEFS = "TCPIP_TYPE_''OPT_TCPIP_LIB',DSO_VMS" | |||
| 657 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 756 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
| 658 | $ CCEXTRAFLAGS = "" | 757 | $ CCEXTRAFLAGS = "" |
| 659 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 758 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
| 660 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX" | 759 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX" |
| 661 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 760 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
| 662 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | 761 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
| 663 | $! | 762 | $! |
| 664 | $! Check To See If The User Entered A Valid Paramter. | 763 | $! Check To See If We Have A ZLIB Option. |
| 764 | $! | ||
| 765 | $ IF (ZLIB .NES. "") | ||
| 766 | $ THEN | ||
| 767 | $! | ||
| 768 | $! Check for expected ZLIB files. | ||
| 769 | $! | ||
| 770 | $ err = 0 | ||
| 771 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
| 772 | $ if (f$search( file1) .eqs. "") | ||
| 773 | $ then | ||
| 774 | $ WRITE SYS$OUTPUT "" | ||
| 775 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 776 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
| 777 | $ err = 1 | ||
| 778 | $ endif | ||
| 779 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" | ||
| 780 | $! | ||
| 781 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
| 782 | $ if (f$search( file2) .eqs. "") | ||
| 783 | $ then | ||
| 784 | $ if (err .eq. 0) | ||
| 785 | $ then | ||
| 786 | $ WRITE SYS$OUTPUT "" | ||
| 787 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 788 | $ endif | ||
| 789 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
| 790 | $ WRITE SYS$OUTPUT "" | ||
| 791 | $ err = err+ 2 | ||
| 792 | $ endif | ||
| 793 | $ if (err .eq. 1) | ||
| 794 | $ then | ||
| 795 | $ WRITE SYS$OUTPUT "" | ||
| 796 | $ endif | ||
| 797 | $! | ||
| 798 | $ if (err .ne. 0) | ||
| 799 | $ then | ||
| 800 | $ EXIT | ||
| 801 | $ endif | ||
| 802 | $! | ||
| 803 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS | ||
| 804 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 | ||
| 805 | $ ZLIB_LIB = ", ''file2' /library" | ||
| 806 | $! | ||
| 807 | $! Print info | ||
| 808 | $! | ||
| 809 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
| 810 | $! | ||
| 811 | $! End The ZLIB Check. | ||
| 812 | $! | ||
| 813 | $ ENDIF | ||
| 814 | $! | ||
| 815 | $! Check To See If The User Entered A Valid Parameter. | ||
| 665 | $! | 816 | $! |
| 666 | $ IF (OPT_COMPILER.EQS."VAXC").OR.(OPT_COMPILER.EQS."DECC").OR.(OPT_COMPILER.EQS."GNUC") | 817 | $ IF (OPT_COMPILER.EQS."VAXC").OR.(OPT_COMPILER.EQS."DECC").OR.(OPT_COMPILER.EQS."GNUC") |
| 667 | $ THEN | 818 | $ THEN |
| @@ -684,14 +835,14 @@ $! | |||
| 684 | $ CC = "CC" | 835 | $ CC = "CC" |
| 685 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 836 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 686 | THEN CC = "CC/DECC" | 837 | THEN CC = "CC/DECC" |
| 687 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | 838 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
| 688 | "/NOLIST/PREFIX=ALL" + - | 839 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
| 689 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.VENDOR_DEFNS])" + - | 840 | " /INCLUDE=(''CC_INCLUDES') " + - |
| 690 | CCEXTRAFLAGS | 841 | CCEXTRAFLAGS |
| 691 | $! | 842 | $! |
| 692 | $! Define The Linker Options File Name. | 843 | $! Define The Linker Options File Name. |
| 693 | $! | 844 | $! |
| 694 | $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" | 845 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
| 695 | $! | 846 | $! |
| 696 | $! End DECC Check. | 847 | $! End DECC Check. |
| 697 | $! | 848 | $! |
| @@ -720,7 +871,7 @@ $ EXIT | |||
| 720 | $ ENDIF | 871 | $ ENDIF |
| 721 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | 872 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" |
| 722 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 873 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 723 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + - | 874 | "/INCLUDE=(''CC_INCLUDES')" + - |
| 724 | CCEXTRAFLAGS | 875 | CCEXTRAFLAGS |
| 725 | $ CCDEFS = """VAXC""," + CCDEFS | 876 | $ CCDEFS = """VAXC""," + CCDEFS |
| 726 | $! | 877 | $! |
| @@ -730,7 +881,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] | |||
| 730 | $! | 881 | $! |
| 731 | $! Define The Linker Options File Name. | 882 | $! Define The Linker Options File Name. |
| 732 | $! | 883 | $! |
| 733 | $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" | 884 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
| 734 | $! | 885 | $! |
| 735 | $! End VAXC Check | 886 | $! End VAXC Check |
| 736 | $! | 887 | $! |
| @@ -752,12 +903,12 @@ $! | |||
| 752 | $! Use GNU C... | 903 | $! Use GNU C... |
| 753 | $! | 904 | $! |
| 754 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 905 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 755 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + - | 906 | "/INCLUDE=(''CC_INCLUDES')" + - |
| 756 | CCEXTRAFLAGS | 907 | CCEXTRAFLAGS |
| 757 | $! | 908 | $! |
| 758 | $! Define The Linker Options File Name. | 909 | $! Define The Linker Options File Name. |
| 759 | $! | 910 | $! |
| 760 | $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" | 911 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
| 761 | $! | 912 | $! |
| 762 | $! End The GNU C Check. | 913 | $! End The GNU C Check. |
| 763 | $! | 914 | $! |
| @@ -773,12 +924,12 @@ $ IF COMPILER .EQS. "DECC" | |||
| 773 | $ THEN | 924 | $ THEN |
| 774 | $ IF CCDISABLEWARNINGS .NES. "" | 925 | $ IF CCDISABLEWARNINGS .NES. "" |
| 775 | $ THEN | 926 | $ THEN |
| 776 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | 927 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
| 777 | $ ENDIF | 928 | $ ENDIF |
| 778 | $ ELSE | 929 | $ ELSE |
| 779 | $ CCDISABLEWARNINGS = "" | 930 | $ CCDISABLEWARNINGS = "" |
| 780 | $ ENDIF | 931 | $ ENDIF |
| 781 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 932 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
| 782 | $! | 933 | $! |
| 783 | $! Show user the result | 934 | $! Show user the result |
| 784 | $! | 935 | $! |
| @@ -808,8 +959,12 @@ $ ENDIF | |||
| 808 | $! | 959 | $! |
| 809 | $! Build a MACRO command for the architecture at hand | 960 | $! Build a MACRO command for the architecture at hand |
| 810 | $! | 961 | $! |
| 811 | $ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'" | 962 | $ IF ARCH .EQS. "VAX" |
| 812 | $ IF ARCH .NES. "VAX" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'" | 963 | $ THEN |
| 964 | $ MACRO = "MACRO/''DEBUGGER'" | ||
| 965 | $ ELSE | ||
| 966 | $ MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'" | ||
| 967 | $ ENDIF | ||
| 813 | $! | 968 | $! |
| 814 | $! Show user the result | 969 | $! Show user the result |
| 815 | $! | 970 | $! |
| @@ -829,7 +984,7 @@ $ THEN | |||
| 829 | $! | 984 | $! |
| 830 | $! Set the library to use SOCKETSHR | 985 | $! Set the library to use SOCKETSHR |
| 831 | $! | 986 | $! |
| 832 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" | 987 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
| 833 | $! | 988 | $! |
| 834 | $! Done with SOCKETSHR | 989 | $! Done with SOCKETSHR |
| 835 | $! | 990 | $! |
| @@ -855,13 +1010,13 @@ $ THEN | |||
| 855 | $! | 1010 | $! |
| 856 | $! Set the library to use UCX. | 1011 | $! Set the library to use UCX. |
| 857 | $! | 1012 | $! |
| 858 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" | 1013 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
| 859 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 1014 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
| 860 | $ THEN | 1015 | $ THEN |
| 861 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" | 1016 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
| 862 | $ ELSE | 1017 | $ ELSE |
| 863 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 1018 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
| 864 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT" | 1019 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
| 865 | $ ENDIF | 1020 | $ ENDIF |
| 866 | $! | 1021 | $! |
| 867 | $! Done with UCX | 1022 | $! Done with UCX |
| @@ -875,7 +1030,7 @@ $ THEN | |||
| 875 | $! | 1030 | $! |
| 876 | $! Set the library to use TCPIP (post UCX). | 1031 | $! Set the library to use TCPIP (post UCX). |
| 877 | $! | 1032 | $! |
| 878 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" | 1033 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
| 879 | $! | 1034 | $! |
| 880 | $! Done with TCPIP | 1035 | $! Done with TCPIP |
| 881 | $! | 1036 | $! |
| @@ -896,7 +1051,7 @@ $ ENDIF | |||
| 896 | $! | 1051 | $! |
| 897 | $! Print info | 1052 | $! Print info |
| 898 | $! | 1053 | $! |
| 899 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 1054 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
| 900 | $! | 1055 | $! |
| 901 | $! Else The User Entered An Invalid Argument. | 1056 | $! Else The User Entered An Invalid Argument. |
| 902 | $! | 1057 | $! |
| @@ -939,7 +1094,7 @@ $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" | |||
| 939 | $! | 1094 | $! |
| 940 | $! Set up the logical name OPENSSL to point at the include directory | 1095 | $! Set up the logical name OPENSSL to point at the include directory |
| 941 | $! | 1096 | $! |
| 942 | $ DEFINE OPENSSL/NOLOG '__INCLUDE' | 1097 | $ DEFINE OPENSSL /NOLOG '__INCLUDE' |
| 943 | $! | 1098 | $! |
| 944 | $! Done | 1099 | $! Done |
| 945 | $! | 1100 | $! |
| @@ -947,15 +1102,24 @@ $ RETURN | |||
| 947 | $! | 1102 | $! |
| 948 | $ CLEANUP: | 1103 | $ CLEANUP: |
| 949 | $! | 1104 | $! |
| 950 | $! Restore the logical name OPENSSL if it had a value | 1105 | $! Restore the saved logical name OPENSSL, if it had a value. |
| 951 | $! | 1106 | $! |
| 952 | $ IF __SAVE_OPENSSL .EQS. "" | 1107 | $ if (f$type( __SAVE_OPENSSL) .nes. "") |
| 953 | $ THEN | 1108 | $ then |
| 954 | $ DEASSIGN OPENSSL | 1109 | $ IF __SAVE_OPENSSL .EQS. "" |
| 955 | $ ELSE | 1110 | $ THEN |
| 956 | $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL' | 1111 | $ DEASSIGN OPENSSL |
| 957 | $ ENDIF | 1112 | $ ELSE |
| 1113 | $ DEFINE /NOLOG OPENSSL '__SAVE_OPENSSL' | ||
| 1114 | $ ENDIF | ||
| 1115 | $ endif | ||
| 1116 | $! | ||
| 1117 | $! Close any open files. | ||
| 1118 | $! | ||
| 1119 | $ if (f$trnlnm( "objects", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - | ||
| 1120 | close objects | ||
| 958 | $! | 1121 | $! |
| 959 | $! Done | 1122 | $! Done |
| 960 | $! | 1123 | $! |
| 961 | $ RETURN | 1124 | $ RETURN |
| 1125 | $! | ||
diff --git a/src/lib/libssl/src/install.com b/src/lib/libssl/src/install.com index d15c23a832..6a0ea2d4de 100644 --- a/src/lib/libssl/src/install.com +++ b/src/lib/libssl/src/install.com | |||
| @@ -3,99 +3,134 @@ $! | |||
| 3 | $! Author: Richard Levitte <richard@levitte.org> | 3 | $! Author: Richard Levitte <richard@levitte.org> |
| 4 | $! Time of creation: 22-MAY-1998 10:13 | 4 | $! Time of creation: 22-MAY-1998 10:13 |
| 5 | $! | 5 | $! |
| 6 | $! P1 root of the directory tree | 6 | $! P1 root of the directory tree |
| 7 | $! | 7 | $! P2 "64" for 64-bit pointers. |
| 8 | $ DEF_ORIG = F$ENVIRONMENT( "DEFAULT") | 8 | $! |
| 9 | $ ON ERROR THEN GOTO TIDY | 9 | $! |
| 10 | $ ON CONTROL_C THEN GOTO TIDY | 10 | $! Announce/identify. |
| 11 | $ | 11 | $! |
| 12 | $ IF P1 .EQS. "" | 12 | $ proc = f$environment( "procedure") |
| 13 | $ THEN | 13 | $ write sys$output "@@@ "+ - |
| 14 | $ WRITE SYS$OUTPUT "First argument missing." | 14 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") |
| 15 | $ WRITE SYS$OUTPUT - | 15 | $! |
| 16 | "It Should be the directory where you want things installed." | 16 | $ def_orig = f$environment( "default") |
| 17 | $ EXIT | 17 | $ on error then goto tidy |
| 18 | $ ENDIF | 18 | $ on control_c then goto tidy |
| 19 | $ | 19 | $! |
| 20 | $ IF (F$GETSYI("CPU").LT.128) | 20 | $ if (p1 .eqs. "") |
| 21 | $ THEN | 21 | $ then |
| 22 | $ ARCH := VAX | 22 | $ write sys$output "First argument missing." |
| 23 | $ ELSE | 23 | $ write sys$output - |
| 24 | $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE") | 24 | "It should be the directory where you want things installed." |
| 25 | $ IF (ARCH .EQS. "") THEN ARCH = "UNK" | 25 | $ exit |
| 26 | $ ENDIF | 26 | $ endif |
| 27 | $ | 27 | $! |
| 28 | $ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0" | 28 | $ if (f$getsyi("cpu") .lt. 128) |
| 29 | $ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY") | 29 | $ then |
| 30 | $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") - | 30 | $ arch = "VAX" |
| 31 | $ else | ||
| 32 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
| 33 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 34 | $ endif | ||
| 35 | $! | ||
| 36 | $ archd = arch | ||
| 37 | $! | ||
| 38 | $ if (p2 .nes. "") | ||
| 39 | $ then | ||
| 40 | $ if (p2 .eqs. "64") | ||
| 41 | $ then | ||
| 42 | $ archd = arch+ "_64" | ||
| 43 | $ else | ||
| 44 | $ if (p2 .nes. "32") | ||
| 45 | $ then | ||
| 46 | $ write sys$output "Second argument invalid." | ||
| 47 | $ write sys$output "It should be "32", "64", or nothing." | ||
| 48 | $ exit | ||
| 49 | $ endif | ||
| 50 | $ endif | ||
| 51 | $ endif | ||
| 52 | $! | ||
| 53 | $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" | ||
| 54 | $ root_dev = f$parse( root, , , "device", "syntax_only") | ||
| 55 | $ root_dir = f$parse( root, , , "directory", "syntax_only") - | ||
| 31 | - ".][000000" - "[000000." - "][" - "[" - "]" | 56 | - ".][000000" - "[000000." - "][" - "[" - "]" |
| 32 | $ ROOT = ROOT_DEV + "[" + ROOT_DIR | 57 | $ root = root_dev + "[" + root_dir |
| 33 | $ | 58 | $! |
| 34 | $ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC | 59 | $ define /nolog wrk_sslroot 'root'.] /trans=conc |
| 35 | $ DEFINE/NOLOG WRK_SSLXLIB WRK_SSLROOT:['ARCH'_LIB] | 60 | $ define /nolog wrk_sslcerts wrk_sslroot:[certs] |
| 36 | $ DEFINE/NOLOG WRK_SSLLIB WRK_SSLROOT:[LIB] | 61 | $ define /nolog wrk_sslinclude wrk_sslroot:[include] |
| 37 | $ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE] | 62 | $ define /nolog wrk_ssllib wrk_sslroot:[lib] |
| 38 | $ DEFINE/NOLOG WRK_SSLXEXE WRK_SSLROOT:['ARCH'_EXE] | 63 | $ define /nolog wrk_sslprivate wrk_sslroot:[private] |
| 39 | $ DEFINE/NOLOG WRK_SSLCERTS WRK_SSLROOT:[CERTS] | 64 | $ define /nolog wrk_sslxexe wrk_sslroot:['archd'_exe] |
| 40 | $ DEFINE/NOLOG WRK_SSLPRIVATE WRK_SSLROOT:[PRIVATE] | 65 | $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib] |
| 41 | $ | ||
| 42 | $! | 66 | $! |
| 43 | $! Exhibit the destination directory. | 67 | $! Exhibit the destination directory. |
| 44 | $! | 68 | $! |
| 45 | $ WRITE SYS$OUTPUT " Installing to (WRK_SSLROOT) =" | 69 | $ write sys$output " Installing to (WRK_SSLROOT) =" |
| 46 | $ WRITE SYS$OUTPUT " ''f$trnlnm( "WRK_SSLROOT")'" | 70 | $ write sys$output " ''f$trnlnm( "wrk_sslroot")'" |
| 47 | $ WRITE SYS$OUTPUT "" | 71 | $ write sys$output "" |
| 48 | $ | 72 | $! |
| 49 | $ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN - | 73 | $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - |
| 50 | CREATE/DIR/LOG WRK_SSLROOT:[000000] | 74 | create /directory /log wrk_sslroot:[000000] |
| 51 | $ IF F$PARSE("WRK_SSLXEXE:") .EQS. "" THEN - | 75 | $ if f$parse("wrk_sslxexe:") .eqs. "" then - |
| 52 | CREATE/DIR/LOG WRK_SSLXEXE: | 76 | create /directory /log wrk_sslxexe: |
| 53 | $ IF F$PARSE("WRK_SSLXLIB:") .EQS. "" THEN - | 77 | $ if f$parse("wrk_sslxlib:") .eqs. "" then - |
| 54 | CREATE/DIR/LOG WRK_SSLXLIB: | 78 | create /directory /log wrk_sslxlib: |
| 55 | $ IF F$PARSE("WRK_SSLLIB:") .EQS. "" THEN - | 79 | $ if f$parse("wrk_ssllib:") .eqs. "" then - |
| 56 | CREATE/DIR/LOG WRK_SSLLIB: | 80 | create /directory /log wrk_ssllib: |
| 57 | $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN - | 81 | $ if f$parse("wrk_sslinclude:") .eqs. "" then - |
| 58 | CREATE/DIR/LOG WRK_SSLINCLUDE: | 82 | create /directory /log wrk_sslinclude: |
| 59 | $ IF F$PARSE("WRK_SSLCERTS:") .EQS. "" THEN - | 83 | $ if f$parse("wrk_sslcerts:") .eqs. "" then - |
| 60 | CREATE/DIR/LOG WRK_SSLCERTS: | 84 | create /directory /log wrk_sslcerts: |
| 61 | $ IF F$PARSE("WRK_SSLPRIVATE:") .EQS. "" THEN - | 85 | $ if f$parse("wrk_sslprivate:") .eqs. "" then - |
| 62 | CREATE/DIR/LOG WRK_SSLPRIVATE: | 86 | create /directory /log wrk_sslprivate: |
| 63 | $ IF F$PARSE("WRK_SSLROOT:[VMS]") .EQS. "" THEN - | 87 | $ if f$parse("wrk_sslroot:[VMS]") .EQS. "" THEN - |
| 64 | CREATE/DIR/LOG WRK_SSLROOT:[VMS] | 88 | create /directory /log wrk_sslroot:[VMS] |
| 65 | $ | 89 | $! |
| 66 | $ SDIRS := CRYPTO,SSL,APPS,VMS!,RSAREF,TEST,TOOLS | 90 | $ sdirs := CRYPTO, SSL, APPS, VMS !!!, RSAREF, TEST, TOOLS |
| 67 | $ EXHEADER := e_os2.h | 91 | $ exheader := e_os2.h |
| 68 | $ | 92 | $! |
| 69 | $ COPY 'EXHEADER' WRK_SSLINCLUDE: /LOG | 93 | $ copy /protection = w:re 'exheader' wrk_sslinclude: /log |
| 70 | $ SET FILE/PROT=WORLD:RE WRK_SSLINCLUDE:'EXHEADER' | 94 | $! |
| 71 | $ | 95 | $ i = 0 |
| 72 | $ I = 0 | 96 | $ loop_sdirs: |
| 73 | $ LOOP_SDIRS: | 97 | $ d = f$edit( f$element(i, ",", sdirs), "trim") |
| 74 | $ D = F$ELEMENT(I, ",", SDIRS) | 98 | $ i = i + 1 |
| 75 | $ I = I + 1 | 99 | $ if d .eqs. "," then goto loop_sdirs_end |
| 76 | $ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END | 100 | $ write sys$output "Installing ", d, " files." |
| 77 | $ WRITE SYS$OUTPUT "Installing ",D," files." | 101 | $ set default [.'d'] |
| 78 | $ SET DEFAULT [.'D'] | 102 | $ @ install-'d'.com 'root'] 'p2' |
| 79 | $ @INSTALL 'ROOT'] | 103 | $ set default 'def_orig' |
| 80 | $ SET DEFAULT [-] | 104 | $ goto loop_sdirs |
| 81 | $ GOTO LOOP_SDIRS | 105 | $ loop_sdirs_end: |
| 82 | $ LOOP_SDIRS_END: | 106 | $! |
| 83 | $ | 107 | $ write sys$output "" |
| 84 | $ WRITE SYS$OUTPUT "" | 108 | $ write sys$output " Installation done!" |
| 85 | $ WRITE SYS$OUTPUT " Installation done!" | 109 | $ write sys$output "" |
| 86 | $ WRITE SYS$OUTPUT "" | 110 | $ if (f$search( root+ "...]*.*;-1") .nes. "") |
| 87 | $ WRITE SYS$OUTPUT " You might want to purge ",ROOT,"...]" | 111 | $ then |
| 88 | $ WRITE SYS$OUTPUT "" | 112 | $ write sys$output " You might want to purge ", root, "...]" |
| 89 | $ | 113 | $ write sys$output "" |
| 90 | $ TIDY: | 114 | $ endif |
| 91 | $ SET DEFAULT 'DEF_ORIG' | 115 | $! |
| 92 | $ | 116 | $ tidy: |
| 93 | $ DEASSIGN WRK_SSLROOT | 117 | $! |
| 94 | $ DEASSIGN WRK_SSLXLIB | 118 | $ set default 'def_orig' |
| 95 | $ DEASSIGN WRK_SSLLIB | 119 | $! |
| 96 | $ DEASSIGN WRK_SSLINCLUDE | 120 | $ call deass wrk_sslroot |
| 97 | $ DEASSIGN WRK_SSLXEXE | 121 | $ call deass wrk_sslcerts |
| 98 | $ DEASSIGN WRK_SSLCERTS | 122 | $ call deass wrk_sslinclude |
| 99 | $ DEASSIGN WRK_SSLPRIVATE | 123 | $ call deass wrk_ssllib |
| 100 | $ | 124 | $ call deass wrk_sslprivate |
| 101 | $ EXIT | 125 | $ call deass wrk_sslxexe |
| 126 | $ call deass wrk_sslxlib | ||
| 127 | $! | ||
| 128 | $ exit | ||
| 129 | $! | ||
| 130 | $ deass: subroutine | ||
| 131 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
| 132 | $ then | ||
| 133 | $ deassign /process 'p1' | ||
| 134 | $ endif | ||
| 135 | $ endsubroutine | ||
| 136 | $! | ||
diff --git a/src/lib/libssl/src/makevms.com b/src/lib/libssl/src/makevms.com index b46e69a423..eb22f20db2 100644 --- a/src/lib/libssl/src/makevms.com +++ b/src/lib/libssl/src/makevms.com | |||
| @@ -15,7 +15,7 @@ $! The "xxx" denotes the machine architecture of ALPHA, IA64 or VAX. | |||
| 15 | $! | 15 | $! |
| 16 | $! This procedures accepts two command line options listed below. | 16 | $! This procedures accepts two command line options listed below. |
| 17 | $! | 17 | $! |
| 18 | $! Specify one of the following build options for P1. | 18 | $! P1 specifies one of the following build options: |
| 19 | $! | 19 | $! |
| 20 | $! ALL Just build "everything". | 20 | $! ALL Just build "everything". |
| 21 | $! CONFIG Just build the "[.CRYPTO._xxx]OPENSSLCONF.H" file. | 21 | $! CONFIG Just build the "[.CRYPTO._xxx]OPENSSLCONF.H" file. |
| @@ -31,14 +31,21 @@ $! TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL. | |||
| 31 | $! APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL. | 31 | $! APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL. |
| 32 | $! ENGINES Just build the "[.xxx.EXE.ENGINES]" application programs for OpenSSL. | 32 | $! ENGINES Just build the "[.xxx.EXE.ENGINES]" application programs for OpenSSL. |
| 33 | $! | 33 | $! |
| 34 | $! P2, if defined, specifies the C pointer size. Ignored on VAX. | ||
| 35 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) | ||
| 36 | $! Supported values are: | ||
| 34 | $! | 37 | $! |
| 35 | $! P2 is ignored (it was used to denote if RSAref should be used or not, | 38 | $! "" Compile with default (/NOPOINTER_SIZE). |
| 36 | $! and is simply kept so surrounding scripts don't get confused) | 39 | $! 32 Compile with /POINTER_SIZE=32 (SHORT). |
| 40 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]). | ||
| 41 | $! (Automatically select ARGV if compiler supports it.) | ||
| 42 | $! 64= Compile with /POINTER_SIZE=64 (LONG). | ||
| 43 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). | ||
| 37 | $! | 44 | $! |
| 38 | $! Specify DEBUG or NODEBUG as P3 to compile with or without debugging | 45 | $! P3 specifies DEBUG or NODEBUG, to compile with or without debugging |
| 39 | $! information. | 46 | $! information. |
| 40 | $! | 47 | $! |
| 41 | $! Specify which compiler as P4 to try to compile under. | 48 | $! P4 specifies which compiler to try to compile under. |
| 42 | $! | 49 | $! |
| 43 | $! VAXC For VAX C. | 50 | $! VAXC For VAX C. |
| 44 | $! DECC For DEC C. | 51 | $! DECC For DEC C. |
| @@ -60,8 +67,18 @@ $! NONE to avoid specifying which TCP/IP implementation to | |||
| 60 | $! use at build time (this works with DEC C). This is | 67 | $! use at build time (this works with DEC C). This is |
| 61 | $! the default. | 68 | $! the default. |
| 62 | $! | 69 | $! |
| 63 | $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) | 70 | $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up). |
| 64 | $! | 71 | $! |
| 72 | $! P7, if defined, specifies a directory where ZLIB files (zlib.h, | ||
| 73 | $! libz.olb) may be found. Optionally, a non-default object library | ||
| 74 | $! name may be included ("dev:[dir]libz_64.olb", for example). | ||
| 75 | $! | ||
| 76 | $! | ||
| 77 | $! Announce/identify. | ||
| 78 | $! | ||
| 79 | $ proc = f$environment( "procedure") | ||
| 80 | $ write sys$output "@@@ "+ - | ||
| 81 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 65 | $! | 82 | $! |
| 66 | $ DEF_ORIG = F$ENVIRONMENT( "DEFAULT") | 83 | $ DEF_ORIG = F$ENVIRONMENT( "DEFAULT") |
| 67 | $ ON ERROR THEN GOTO TIDY | 84 | $ ON ERROR THEN GOTO TIDY |
| @@ -99,6 +116,10 @@ $! End The Architecture Check. | |||
| 99 | $! | 116 | $! |
| 100 | $ ENDIF | 117 | $ ENDIF |
| 101 | $! | 118 | $! |
| 119 | $ ARCHD = ARCH | ||
| 120 | $ LIB32 = "32" | ||
| 121 | $ POINTER_SIZE = "" | ||
| 122 | $! | ||
| 102 | $! Get VMS version. | 123 | $! Get VMS version. |
| 103 | $! | 124 | $! |
| 104 | $ VMS_VERSION = f$edit( f$getsyi( "VERSION"), "TRIM") | 125 | $ VMS_VERSION = f$edit( f$getsyi( "VERSION"), "TRIM") |
| @@ -173,12 +194,12 @@ $ CONFIG: | |||
| 173 | $! | 194 | $! |
| 174 | $! Tell The User We Are Creating The [.CRYPTO._xxx]OPENSSLCONF.H File. | 195 | $! Tell The User We Are Creating The [.CRYPTO._xxx]OPENSSLCONF.H File. |
| 175 | $! | 196 | $! |
| 176 | $ WRITE SYS$OUTPUT "Creating [.CRYPTO._''ARCH']OPENSSLCONF.H Include File." | 197 | $ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCHD']OPENSSLCONF.H Include File." |
| 177 | $! | 198 | $! |
| 178 | $! First, make sure the directory exists. | 199 | $! First, make sure the directory exists. |
| 179 | $! | 200 | $! |
| 180 | $ IF F$PARSE("SYS$DISK:[.CRYPTO._''ARCH']") .EQS. "" THEN - | 201 | $ IF F$PARSE("SYS$DISK:[.CRYPTO.''ARCHD']") .EQS. "" THEN - |
| 181 | CREATE/DIRECTORY SYS$DISK:[.CRYPTO._'ARCH'] | 202 | CREATE/DIRECTORY SYS$DISK:[.CRYPTO.'ARCHD'] |
| 182 | $! | 203 | $! |
| 183 | $! Different tar/UnZip versions/option may have named the file differently | 204 | $! Different tar/UnZip versions/option may have named the file differently |
| 184 | $ IF F$SEARCH("[.crypto]opensslconf.h_in") .NES. "" | 205 | $ IF F$SEARCH("[.crypto]opensslconf.h_in") .NES. "" |
| @@ -204,7 +225,7 @@ $! | |||
| 204 | $! Create The [.CRYPTO._xxx]OPENSSLCONF.H File. | 225 | $! Create The [.CRYPTO._xxx]OPENSSLCONF.H File. |
| 205 | $! Make sure it has the right format. | 226 | $! Make sure it has the right format. |
| 206 | $! | 227 | $! |
| 207 | $ OSCH_NAME = "SYS$DISK:[.CRYPTO._''ARCH']OPENSSLCONF.H" | 228 | $ OSCH_NAME = "SYS$DISK:[.CRYPTO.''ARCHD']OPENSSLCONF.H" |
| 208 | $ CREATE /FDL=SYS$INPUT: 'OSCH_NAME' | 229 | $ CREATE /FDL=SYS$INPUT: 'OSCH_NAME' |
| 209 | RECORD | 230 | RECORD |
| 210 | FORMAT stream_lf | 231 | FORMAT stream_lf |
| @@ -223,7 +244,7 @@ $ WRITE H_FILE "# define OPENSSL_SYS_VMS" | |||
| 223 | $ WRITE H_FILE "#endif" | 244 | $ WRITE H_FILE "#endif" |
| 224 | $ | 245 | $ |
| 225 | $! One of the best way to figure out what the list should be is to do | 246 | $! One of the best way to figure out what the list should be is to do |
| 226 | $! the followin on a Unix system: | 247 | $! the following on a Unix system: |
| 227 | $! grep OPENSSL_NO_ crypto/*/*.h ssl/*.h engines/*.h engines/*/*.h|grep ':# *if'|sed -e 's/^.*def //'|sort|uniq | 248 | $! grep OPENSSL_NO_ crypto/*/*.h ssl/*.h engines/*.h engines/*/*.h|grep ':# *if'|sed -e 's/^.*def //'|sort|uniq |
| 228 | $! For that reason, the list will also always end up in alphabetical order | 249 | $! For that reason, the list will also always end up in alphabetical order |
| 229 | $ CONFIG_LOGICALS := AES,- | 250 | $ CONFIG_LOGICALS := AES,- |
| @@ -321,7 +342,7 @@ $ | |||
| 321 | $! Architecture specific rule addtions | 342 | $! Architecture specific rule addtions |
| 322 | $ IF ARCH .EQS. "VAX" | 343 | $ IF ARCH .EQS. "VAX" |
| 323 | $ THEN | 344 | $ THEN |
| 324 | $ ! Disable algorithms that require 64 bit integers in C | 345 | $ ! Disable algorithms that require 64-bit integers in C |
| 325 | $ CONFIG_DISABLE_RULES = CONFIG_DISABLE_RULES + - | 346 | $ CONFIG_DISABLE_RULES = CONFIG_DISABLE_RULES + - |
| 326 | ";/GOST" + - | 347 | ";/GOST" + - |
| 327 | ";/WHIRLPOOL" | 348 | ";/WHIRLPOOL" |
| @@ -350,7 +371,8 @@ $ | |||
| 350 | $! Apply cascading disable rules | 371 | $! Apply cascading disable rules |
| 351 | $ CONFIG_DISABLE_I = 0 | 372 | $ CONFIG_DISABLE_I = 0 |
| 352 | $ CONFIG_DISABLE_LOOP0: | 373 | $ CONFIG_DISABLE_LOOP0: |
| 353 | $ CONFIG_DISABLE_E = F$EDIT(F$ELEMENT(CONFIG_DISABLE_I,";",CONFIG_DISABLE_RULES),"TRIM") | 374 | $ CONFIG_DISABLE_E = F$EDIT(F$ELEMENT(CONFIG_DISABLE_I,";", - |
| 375 | CONFIG_DISABLE_RULES),"TRIM") | ||
| 354 | $ CONFIG_DISABLE_I = CONFIG_DISABLE_I + 1 | 376 | $ CONFIG_DISABLE_I = CONFIG_DISABLE_I + 1 |
| 355 | $ IF CONFIG_DISABLE_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP0 | 377 | $ IF CONFIG_DISABLE_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP0 |
| 356 | $ IF CONFIG_DISABLE_E .EQS. ";" THEN GOTO CONFIG_DISABLE_LOOP0_END | 378 | $ IF CONFIG_DISABLE_E .EQS. ";" THEN GOTO CONFIG_DISABLE_LOOP0_END |
| @@ -360,7 +382,8 @@ $ CONFIG_DISABLE_DEPENDENTS = F$EDIT(F$ELEMENT(1,"/",CONFIG_DISABLE_E),"TRIM") | |||
| 360 | $ TO_DISABLE := YES | 382 | $ TO_DISABLE := YES |
| 361 | $ CONFIG_ALGO_I = 0 | 383 | $ CONFIG_ALGO_I = 0 |
| 362 | $ CONFIG_DISABLE_LOOP1: | 384 | $ CONFIG_DISABLE_LOOP1: |
| 363 | $ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",",CONFIG_DISABLE_ALGOS),"TRIM") | 385 | $ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",", - |
| 386 | CONFIG_DISABLE_ALGOS),"TRIM") | ||
| 364 | $ CONFIG_ALGO_I = CONFIG_ALGO_I + 1 | 387 | $ CONFIG_ALGO_I = CONFIG_ALGO_I + 1 |
| 365 | $ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP1 | 388 | $ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP1 |
| 366 | $ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP1_END | 389 | $ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP1_END |
| @@ -377,7 +400,8 @@ $ IF TO_DISABLE | |||
| 377 | $ THEN | 400 | $ THEN |
| 378 | $ CONFIG_DEPENDENT_I = 0 | 401 | $ CONFIG_DEPENDENT_I = 0 |
| 379 | $ CONFIG_DISABLE_LOOP2: | 402 | $ CONFIG_DISABLE_LOOP2: |
| 380 | $ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",",CONFIG_DISABLE_DEPENDENTS),"TRIM") | 403 | $ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",", - |
| 404 | CONFIG_DISABLE_DEPENDENTS),"TRIM") | ||
| 381 | $ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1 | 405 | $ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1 |
| 382 | $ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP2 | 406 | $ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP2 |
| 383 | $ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP2_END | 407 | $ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP2_END |
| @@ -385,7 +409,8 @@ $ CONFIG_DISABLED_'CONFIG_DEPENDENT_E' := YES | |||
| 385 | $ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := NO | 409 | $ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := NO |
| 386 | $ ! Better not to assume defaults at this point... | 410 | $ ! Better not to assume defaults at this point... |
| 387 | $ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES | 411 | $ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES |
| 388 | $ WRITE SYS$ERROR "''CONFIG_DEPENDENT_E' disabled by rule ''CONFIG_DISABLE_E'" | 412 | $ WRITE SYS$ERROR - |
| 413 | "''CONFIG_DEPENDENT_E' disabled by rule ''CONFIG_DISABLE_E'" | ||
| 389 | $ GOTO CONFIG_DISABLE_LOOP2 | 414 | $ GOTO CONFIG_DISABLE_LOOP2 |
| 390 | $ CONFIG_DISABLE_LOOP2_END: | 415 | $ CONFIG_DISABLE_LOOP2_END: |
| 391 | $ ENDIF | 416 | $ ENDIF |
| @@ -395,7 +420,8 @@ $ | |||
| 395 | $! Apply cascading enable rules | 420 | $! Apply cascading enable rules |
| 396 | $ CONFIG_ENABLE_I = 0 | 421 | $ CONFIG_ENABLE_I = 0 |
| 397 | $ CONFIG_ENABLE_LOOP0: | 422 | $ CONFIG_ENABLE_LOOP0: |
| 398 | $ CONFIG_ENABLE_E = F$EDIT(F$ELEMENT(CONFIG_ENABLE_I,";",CONFIG_ENABLE_RULES),"TRIM") | 423 | $ CONFIG_ENABLE_E = F$EDIT(F$ELEMENT(CONFIG_ENABLE_I,";", - |
| 424 | CONFIG_ENABLE_RULES),"TRIM") | ||
| 399 | $ CONFIG_ENABLE_I = CONFIG_ENABLE_I + 1 | 425 | $ CONFIG_ENABLE_I = CONFIG_ENABLE_I + 1 |
| 400 | $ IF CONFIG_ENABLE_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP0 | 426 | $ IF CONFIG_ENABLE_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP0 |
| 401 | $ IF CONFIG_ENABLE_E .EQS. ";" THEN GOTO CONFIG_ENABLE_LOOP0_END | 427 | $ IF CONFIG_ENABLE_E .EQS. ";" THEN GOTO CONFIG_ENABLE_LOOP0_END |
| @@ -405,7 +431,8 @@ $ CONFIG_ENABLE_DEPENDENTS = F$EDIT(F$ELEMENT(1,"/",CONFIG_ENABLE_E),"TRIM") | |||
| 405 | $ TO_ENABLE := YES | 431 | $ TO_ENABLE := YES |
| 406 | $ CONFIG_ALGO_I = 0 | 432 | $ CONFIG_ALGO_I = 0 |
| 407 | $ CONFIG_ENABLE_LOOP1: | 433 | $ CONFIG_ENABLE_LOOP1: |
| 408 | $ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",",CONFIG_ENABLE_ALGOS),"TRIM") | 434 | $ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",", - |
| 435 | CONFIG_ENABLE_ALGOS),"TRIM") | ||
| 409 | $ CONFIG_ALGO_I = CONFIG_ALGO_I + 1 | 436 | $ CONFIG_ALGO_I = CONFIG_ALGO_I + 1 |
| 410 | $ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP1 | 437 | $ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP1 |
| 411 | $ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP1_END | 438 | $ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP1_END |
| @@ -422,7 +449,8 @@ $ IF TO_ENABLE | |||
| 422 | $ THEN | 449 | $ THEN |
| 423 | $ CONFIG_DEPENDENT_I = 0 | 450 | $ CONFIG_DEPENDENT_I = 0 |
| 424 | $ CONFIG_ENABLE_LOOP2: | 451 | $ CONFIG_ENABLE_LOOP2: |
| 425 | $ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",",CONFIG_ENABLE_DEPENDENTS),"TRIM") | 452 | $ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",", - |
| 453 | CONFIG_ENABLE_DEPENDENTS),"TRIM") | ||
| 426 | $ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1 | 454 | $ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1 |
| 427 | $ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP2 | 455 | $ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP2 |
| 428 | $ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP2_END | 456 | $ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP2_END |
| @@ -430,7 +458,8 @@ $ CONFIG_DISABLED_'CONFIG_DEPENDENT_E' := NO | |||
| 430 | $ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := YES | 458 | $ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := YES |
| 431 | $ ! Better not to assume defaults at this point... | 459 | $ ! Better not to assume defaults at this point... |
| 432 | $ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES | 460 | $ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES |
| 433 | $ WRITE SYS$ERROR "''CONFIG_DEPENDENT_E' enabled by rule ''CONFIG_ENABLE_E'" | 461 | $ WRITE SYS$ERROR - |
| 462 | "''CONFIG_DEPENDENT_E' enabled by rule ''CONFIG_ENABLE_E'" | ||
| 434 | $ GOTO CONFIG_ENABLE_LOOP2 | 463 | $ GOTO CONFIG_ENABLE_LOOP2 |
| 435 | $ CONFIG_ENABLE_LOOP2_END: | 464 | $ CONFIG_ENABLE_LOOP2_END: |
| 436 | $ ENDIF | 465 | $ ENDIF |
| @@ -460,6 +489,17 @@ $ ENDIF | |||
| 460 | $ GOTO CONFIG_LOG_LOOP2 | 489 | $ GOTO CONFIG_LOG_LOOP2 |
| 461 | $ CONFIG_LOG_LOOP2_END: | 490 | $ CONFIG_LOG_LOOP2_END: |
| 462 | $! | 491 | $! |
| 492 | $ WRITE H_FILE "" | ||
| 493 | $ WRITE H_FILE "/* 2011-02-23 SMS." | ||
| 494 | $ WRITE H_FILE " * On VMS (V8.3), setvbuf() doesn't support a 64-bit" | ||
| 495 | $ WRITE H_FILE " * ""in"" pointer, and the help says:" | ||
| 496 | $ WRITE H_FILE " * Please note that the previously documented" | ||
| 497 | $ WRITE H_FILE " * value _IONBF is not supported." | ||
| 498 | $ WRITE H_FILE " * So, skip it on VMS." | ||
| 499 | $ WRITE H_FILE " */" | ||
| 500 | $ WRITE H_FILE "#define OPENSSL_NO_SETVBUF_IONBF" | ||
| 501 | $ WRITE H_FILE "" | ||
| 502 | $! | ||
| 463 | $! Add in the common "crypto/opensslconf.h.in". | 503 | $! Add in the common "crypto/opensslconf.h.in". |
| 464 | $! | 504 | $! |
| 465 | $ TYPE 'OPENSSLCONF_H_IN' /OUTPUT=H_FILE: | 505 | $ TYPE 'OPENSSLCONF_H_IN' /OUTPUT=H_FILE: |
| @@ -552,7 +592,7 @@ $ CLOSE H_FILE | |||
| 552 | $! | 592 | $! |
| 553 | $! Purge The [.CRYPTO._xxx]OPENSSLCONF.H file | 593 | $! Purge The [.CRYPTO._xxx]OPENSSLCONF.H file |
| 554 | $! | 594 | $! |
| 555 | $ PURGE SYS$DISK:[.CRYPTO._'ARCH']OPENSSLCONF.H | 595 | $ PURGE SYS$DISK:[.CRYPTO.'ARCHD']OPENSSLCONF.H |
| 556 | $! | 596 | $! |
| 557 | $! That's All, Time To RETURN. | 597 | $! That's All, Time To RETURN. |
| 558 | $! | 598 | $! |
| @@ -564,11 +604,11 @@ $ BUILDINF: | |||
| 564 | $! | 604 | $! |
| 565 | $! Tell The User We Are Creating The [.CRYPTO._xxx]BUILDINF.H File. | 605 | $! Tell The User We Are Creating The [.CRYPTO._xxx]BUILDINF.H File. |
| 566 | $! | 606 | $! |
| 567 | $ WRITE SYS$OUTPUT "Creating [.CRYPTO._''ARCH']BUILDINF.H Include File." | 607 | $ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCHD']BUILDINF.H Include File." |
| 568 | $! | 608 | $! |
| 569 | $! Create The [.CRYPTO._xxx]BUILDINF.H File. | 609 | $! Create The [.CRYPTO._xxx]BUILDINF.H File. |
| 570 | $! | 610 | $! |
| 571 | $ BIH_NAME = "SYS$DISK:[.CRYPTO._''ARCH']BUILDINF.H" | 611 | $ BIH_NAME = "SYS$DISK:[.CRYPTO.''ARCHD']BUILDINF.H" |
| 572 | $ CREATE /FDL=SYS$INPUT: 'BIH_NAME' | 612 | $ CREATE /FDL=SYS$INPUT: 'BIH_NAME' |
| 573 | RECORD | 613 | RECORD |
| 574 | FORMAT stream_lf | 614 | FORMAT stream_lf |
| @@ -581,8 +621,19 @@ $ TIME = F$TIME() | |||
| 581 | $! | 621 | $! |
| 582 | $! Write The [.CRYPTO._xxx]BUILDINF.H File. | 622 | $! Write The [.CRYPTO._xxx]BUILDINF.H File. |
| 583 | $! | 623 | $! |
| 584 | $ WRITE H_FILE "#define CFLAGS """" /* Not filled in for now */" | 624 | $ CFLAGS = "" |
| 585 | $ WRITE H_FILE "#define PLATFORM ""VMS ''ARCH' ''VMS_VERSION'""" | 625 | $ if (POINTER_SIZE .nes. "") |
| 626 | $ then | ||
| 627 | $ CFLAGS = CFLAGS+ "/POINTER_SIZE=''POINTER_SIZE'" | ||
| 628 | $ endif | ||
| 629 | $ if (ZLIB .nes. "") | ||
| 630 | $ then | ||
| 631 | $ if (CFLAGS .nes. "") then CFLAGS = CFLAGS+ " " | ||
| 632 | $ CFLAGS = CFLAGS+ "/DEFINE=ZLIB" | ||
| 633 | $ endif | ||
| 634 | $! | ||
| 635 | $ WRITE H_FILE "#define CFLAGS ""''CFLAGS'""" | ||
| 636 | $ WRITE H_FILE "#define PLATFORM ""VMS ''ARCHD' ''VMS_VERSION'""" | ||
| 586 | $ WRITE H_FILE "#define DATE ""''TIME'"" " | 637 | $ WRITE H_FILE "#define DATE ""''TIME'"" " |
| 587 | $! | 638 | $! |
| 588 | $! Close The [.CRYPTO._xxx]BUILDINF.H File. | 639 | $! Close The [.CRYPTO._xxx]BUILDINF.H File. |
| @@ -591,7 +642,12 @@ $ CLOSE H_FILE | |||
| 591 | $! | 642 | $! |
| 592 | $! Purge The [.CRYPTO._xxx]BUILDINF.H File. | 643 | $! Purge The [.CRYPTO._xxx]BUILDINF.H File. |
| 593 | $! | 644 | $! |
| 594 | $ PURGE SYS$DISK:[.CRYPTO._'ARCH']BUILDINF.H | 645 | $ PURGE SYS$DISK:[.CRYPTO.'ARCHD']BUILDINF.H |
| 646 | $! | ||
| 647 | $! Delete [.CRYPTO]BUILDINF.H File, as there might be some residue from Unix. | ||
| 648 | $! | ||
| 649 | $ IF F$SEARCH("[.CRYPTO]BUILDINF.H") .NES. "" THEN - | ||
| 650 | DELETE SYS$DISK:[.CRYPTO]BUILDINF.H;* | ||
| 595 | $! | 651 | $! |
| 596 | $! That's All, Time To RETURN. | 652 | $! That's All, Time To RETURN. |
| 597 | $! | 653 | $! |
| @@ -601,44 +657,58 @@ $! Copy a lot of files around. | |||
| 601 | $! | 657 | $! |
| 602 | $ SOFTLINKS: | 658 | $ SOFTLINKS: |
| 603 | $! | 659 | $! |
| 604 | $! Tell The User We Are Partly Rebuilding The [.APPS] Directory. | 660 | $!!!! Tell The User We Are Partly Rebuilding The [.APPS] Directory. |
| 605 | $! | 661 | $!!!! |
| 606 | $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C' File." | 662 | $!!! WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C' File." |
| 607 | $! | 663 | $!!!! |
| 608 | $ DELETE SYS$DISK:[.APPS]MD4.C;* | 664 | $!!! DELETE SYS$DISK:[.APPS]MD4.C;* |
| 609 | $! | 665 | $!!!! |
| 610 | $! Copy MD4.C from [.CRYPTO.MD4] into [.APPS] | 666 | $!!!! Copy MD4.C from [.CRYPTO.MD4] into [.APPS] |
| 611 | $! | 667 | $!!!! |
| 612 | $ COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS] | 668 | $!!! COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS] |
| 613 | $! | 669 | $! |
| 614 | $! Tell The User We Are Rebuilding The [.INCLUDE.OPENSSL] Directory. | 670 | $! Ensure that the [.include.openssl] directory contains a full set of |
| 615 | $! | 671 | $! real header files. The distribution kit may have left real or fake |
| 616 | $ WRITE SYS$OUTPUT "Rebuilding The '[.INCLUDE.OPENSSL]' Directory." | 672 | $! symlinks there. Rather than think about what's there, simply delete |
| 617 | $! | 673 | $! the destination files (fake or real symlinks) before copying the real |
| 618 | $! First, make sure the directory exists | 674 | $! header files in. (Copying a real header file onto a real symlink |
| 619 | $! | 675 | $! merely duplicates the real header file at its source.) |
| 620 | $ IF F$PARSE("SYS$DISK:[.INCLUDE.OPENSSL]") .EQS. "" THEN - | 676 | $! |
| 621 | CREATE/DIRECTORY SYS$DISK:[.INCLUDE.OPENSSL] | 677 | $! Tell The User We Are Rebuilding The [.include.openssl] Directory. |
| 678 | $! | ||
| 679 | $ WRITE SYS$OUTPUT "Rebuilding The '[.include.openssl]' Directory." | ||
| 680 | $! | ||
| 681 | $! First, make sure the directory exists. If it did exist, delete all | ||
| 682 | $! the existing header files (or fake or real symlinks). | ||
| 683 | $! | ||
| 684 | $ if f$parse( "sys$disk:[.include.openssl]") .eqs. "" | ||
| 685 | $ then | ||
| 686 | $ create /directory sys$disk:[.include.openssl] | ||
| 687 | $ else | ||
| 688 | $ delete sys$disk:[.include.openssl]*.h;* | ||
| 689 | $ endif | ||
| 622 | $! | 690 | $! |
| 623 | $! Copy All The ".H" Files From The Main Directory. | 691 | $! Copy All The ".H" Files From The Main Directory. |
| 624 | $! | 692 | $! |
| 625 | $ EXHEADER := e_os2.h | 693 | $ EXHEADER := e_os2.h |
| 626 | $ COPY 'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL] | 694 | $ copy 'exheader' sys$disk:[.include.openssl] |
| 627 | $! | 695 | $! |
| 628 | $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree. | 696 | $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree. |
| 629 | $! | 697 | $! |
| 630 | $ SDIRS := ,- | 698 | $ SDIRS := , - |
| 631 | _'ARCH',- | 699 | 'ARCHD', - |
| 632 | OBJECTS,- | 700 | OBJECTS, - |
| 633 | MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,WHRLPOOL,- | 701 | MD2, MD4, MD5, SHA, MDC2, HMAC, RIPEMD, WHRLPOOL, - |
| 634 | DES,AES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,MODES,- | 702 | DES, AES, RC2, RC4, RC5, IDEA, BF, CAST, CAMELLIA, SEED, MODES, - |
| 635 | BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,- | 703 | BN, EC, RSA, DSA, ECDSA, DH, ECDH, DSO, ENGINE, - |
| 636 | BUFFER,BIO,STACK,LHASH,RAND,ERR,- | 704 | BUFFER, BIO, STACK, LHASH, RAND, ERR, - |
| 637 | EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,- | 705 | EVP, ASN1, PEM, X509, X509V3, CONF, TXT_DB, PKCS7, PKCS12, - |
| 638 | STORE,CMS,PQUEUE,TS,JPAKE | 706 | COMP, OCSP, UI, KRB5, - |
| 639 | $ EXHEADER_ := crypto.h,opensslv.h,ebcdic.h,symhacks.h,ossl_typ.h | 707 | STORE, CMS, PQUEUE, TS, JPAKE |
| 640 | $ EXHEADER__'ARCH' := opensslconf.h | 708 | $! |
| 641 | $ EXHEADER_OBJECTS := objects.h,obj_mac.h | 709 | $ EXHEADER_ := crypto.h, opensslv.h, ebcdic.h, symhacks.h, ossl_typ.h |
| 710 | $ EXHEADER_'ARCHD' := opensslconf.h | ||
| 711 | $ EXHEADER_OBJECTS := objects.h, obj_mac.h | ||
| 642 | $ EXHEADER_MD2 := md2.h | 712 | $ EXHEADER_MD2 := md2.h |
| 643 | $ EXHEADER_MD4 := md4.h | 713 | $ EXHEADER_MD4 := md4.h |
| 644 | $ EXHEADER_MD5 := md5.h | 714 | $ EXHEADER_MD5 := md5.h |
| @@ -647,7 +717,7 @@ $ EXHEADER_MDC2 := mdc2.h | |||
| 647 | $ EXHEADER_HMAC := hmac.h | 717 | $ EXHEADER_HMAC := hmac.h |
| 648 | $ EXHEADER_RIPEMD := ripemd.h | 718 | $ EXHEADER_RIPEMD := ripemd.h |
| 649 | $ EXHEADER_WHRLPOOL := whrlpool.h | 719 | $ EXHEADER_WHRLPOOL := whrlpool.h |
| 650 | $ EXHEADER_DES := des.h,des_old.h | 720 | $ EXHEADER_DES := des.h, des_old.h |
| 651 | $ EXHEADER_AES := aes.h | 721 | $ EXHEADER_AES := aes.h |
| 652 | $ EXHEADER_RC2 := rc2.h | 722 | $ EXHEADER_RC2 := rc2.h |
| 653 | $ EXHEADER_RC4 := rc4.h | 723 | $ EXHEADER_RC4 := rc4.h |
| @@ -669,66 +739,64 @@ $ EXHEADER_DSO := dso.h | |||
| 669 | $ EXHEADER_ENGINE := engine.h | 739 | $ EXHEADER_ENGINE := engine.h |
| 670 | $ EXHEADER_BUFFER := buffer.h | 740 | $ EXHEADER_BUFFER := buffer.h |
| 671 | $ EXHEADER_BIO := bio.h | 741 | $ EXHEADER_BIO := bio.h |
| 672 | $ EXHEADER_STACK := stack.h,safestack.h | 742 | $ EXHEADER_STACK := stack.h, safestack.h |
| 673 | $ EXHEADER_LHASH := lhash.h | 743 | $ EXHEADER_LHASH := lhash.h |
| 674 | $ EXHEADER_RAND := rand.h | 744 | $ EXHEADER_RAND := rand.h |
| 675 | $ EXHEADER_ERR := err.h | 745 | $ EXHEADER_ERR := err.h |
| 676 | $ EXHEADER_EVP := evp.h | 746 | $ EXHEADER_EVP := evp.h |
| 677 | $ EXHEADER_ASN1 := asn1.h,asn1_mac.h,asn1t.h | 747 | $ EXHEADER_ASN1 := asn1.h, asn1_mac.h, asn1t.h |
| 678 | $ EXHEADER_PEM := pem.h,pem2.h | 748 | $ EXHEADER_PEM := pem.h, pem2.h |
| 679 | $ EXHEADER_X509 := x509.h,x509_vfy.h | 749 | $ EXHEADER_X509 := x509.h, x509_vfy.h |
| 680 | $ EXHEADER_X509V3 := x509v3.h | 750 | $ EXHEADER_X509V3 := x509v3.h |
| 681 | $ EXHEADER_CONF := conf.h,conf_api.h | 751 | $ EXHEADER_CONF := conf.h, conf_api.h |
| 682 | $ EXHEADER_TXT_DB := txt_db.h | 752 | $ EXHEADER_TXT_DB := txt_db.h |
| 683 | $ EXHEADER_PKCS7 := pkcs7.h | 753 | $ EXHEADER_PKCS7 := pkcs7.h |
| 684 | $ EXHEADER_PKCS12 := pkcs12.h | 754 | $ EXHEADER_PKCS12 := pkcs12.h |
| 685 | $ EXHEADER_COMP := comp.h | 755 | $ EXHEADER_COMP := comp.h |
| 686 | $ EXHEADER_OCSP := ocsp.h | 756 | $ EXHEADER_OCSP := ocsp.h |
| 687 | $ EXHEADER_UI := ui.h,ui_compat.h | 757 | $ EXHEADER_UI := ui.h, ui_compat.h |
| 688 | $ EXHEADER_KRB5 := krb5_asn.h | 758 | $ EXHEADER_KRB5 := krb5_asn.h |
| 689 | $!EXHEADER_STORE := store.h,str_compat.h | 759 | $!!! EXHEADER_STORE := store.h, str_compat.h |
| 690 | $ EXHEADER_STORE := store.h | 760 | $ EXHEADER_STORE := store.h |
| 691 | $ EXHEADER_CMS := cms.h | 761 | $ EXHEADER_CMS := cms.h |
| 692 | $ EXHEADER_PQUEUE := pqueue.h | 762 | $ EXHEADER_PQUEUE := pqueue.h |
| 693 | $ EXHEADER_TS := ts.h | 763 | $ EXHEADER_TS := ts.h |
| 694 | $ EXHEADER_JPAKE := jpake.h | 764 | $ EXHEADER_JPAKE := jpake.h |
| 695 | $ | 765 | $! |
| 696 | $ I = 0 | 766 | $ i = 0 |
| 697 | $ LOOP_SDIRS: | 767 | $ loop_sdirs: |
| 698 | $ D = F$EDIT(F$ELEMENT(I, ",", SDIRS),"TRIM") | 768 | $ sdir = f$edit( f$element( i, ",", sdirs), "trim") |
| 699 | $ I = I + 1 | 769 | $ i = i + 1 |
| 700 | $ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END | 770 | $ if (sdir .eqs. ",") then goto loop_sdirs_end |
| 701 | $ tmp = EXHEADER_'D' | 771 | $ hdr_list = exheader_'sdir' |
| 702 | $ IF D .EQS. "" | 772 | $ if (sdir .nes. "") then sdir = "."+ sdir |
| 703 | $ THEN | 773 | $ copy [.crypto'sdir']'hdr_list' sys$disk:[.include.openssl] |
| 704 | $ COPY [.CRYPTO]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG | 774 | $ goto loop_sdirs |
| 705 | $ ELSE | 775 | $ loop_sdirs_end: |
| 706 | $ COPY [.CRYPTO.'D']'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG | ||
| 707 | $ ENDIF | ||
| 708 | $ GOTO LOOP_SDIRS | ||
| 709 | $ LOOP_SDIRS_END: | ||
| 710 | $! | 776 | $! |
| 711 | $! Copy All The ".H" Files From The [.SSL] Directory. | 777 | $! Copy All The ".H" Files From The [.SSL] Directory. |
| 712 | $! | 778 | $! |
| 713 | $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h | 779 | $! (keep these in the same order as ssl/Makefile) |
| 714 | $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL] | 780 | $ EXHEADER := ssl.h, ssl2.h, ssl3.h, ssl23.h, tls1.h, dtls1.h, kssl.h |
| 781 | $ copy sys$disk:[.ssl]'exheader' sys$disk:[.include.openssl] | ||
| 715 | $! | 782 | $! |
| 716 | $! Purge all doubles | 783 | $! Purge the [.include.openssl] header files. |
| 717 | $! | 784 | $! |
| 718 | $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H | 785 | $ purge sys$disk:[.include.openssl]*.h |
| 719 | $! | 786 | $! |
| 720 | $! That's All, Time To RETURN. | 787 | $! That's All, Time To RETURN. |
| 721 | $! | 788 | $! |
| 722 | $ RETURN | 789 | $ RETURN |
| 723 | $! | 790 | $! |
| 724 | $! Build The "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library. | 791 | $! Build The "[.xxx.EXE.CRYPTO]SSL_LIBCRYPTO''LIB32'.OLB" Library. |
| 725 | $! | 792 | $! |
| 726 | $ CRYPTO: | 793 | $ CRYPTO: |
| 727 | $! | 794 | $! |
| 728 | $! Tell The User What We Are Doing. | 795 | $! Tell The User What We Are Doing. |
| 729 | $! | 796 | $! |
| 730 | $ WRITE SYS$OUTPUT "" | 797 | $ WRITE SYS$OUTPUT "" |
| 731 | $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.CRYPTO]LIBCRYPTO.OLB Library." | 798 | $ WRITE SYS$OUTPUT - |
| 799 | "Building The [.",ARCHD,".EXE.CRYPTO]SSL_LIBCRYPTO''LIB32'.OLB Library." | ||
| 732 | $! | 800 | $! |
| 733 | $! Go To The [.CRYPTO] Directory. | 801 | $! Go To The [.CRYPTO] Directory. |
| 734 | $! | 802 | $! |
| @@ -736,11 +804,13 @@ $ SET DEFAULT SYS$DISK:[.CRYPTO] | |||
| 736 | $! | 804 | $! |
| 737 | $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library. | 805 | $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library. |
| 738 | $! | 806 | $! |
| 739 | $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'" | 807 | $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" - |
| 808 | "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'" | ||
| 740 | $! | 809 | $! |
| 741 | $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications. | 810 | $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications. |
| 742 | $! | 811 | $! |
| 743 | $ @CRYPTO-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'" | 812 | $ @CRYPTO-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" - |
| 813 | "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'" | ||
| 744 | $! | 814 | $! |
| 745 | $! Go Back To The Main Directory. | 815 | $! Go Back To The Main Directory. |
| 746 | $! | 816 | $! |
| @@ -750,14 +820,15 @@ $! Time To RETURN. | |||
| 750 | $! | 820 | $! |
| 751 | $ RETURN | 821 | $ RETURN |
| 752 | $! | 822 | $! |
| 753 | $! Build The "[.xxx.EXE.SSL]LIBSSL.OLB" Library. | 823 | $! Build The "[.xxx.EXE.SSL]SSL_LIBSSL''LIB32'.OLB" Library. |
| 754 | $! | 824 | $! |
| 755 | $ SSL: | 825 | $ SSL: |
| 756 | $! | 826 | $! |
| 757 | $! Tell The User What We Are Doing. | 827 | $! Tell The User What We Are Doing. |
| 758 | $! | 828 | $! |
| 759 | $ WRITE SYS$OUTPUT "" | 829 | $ WRITE SYS$OUTPUT "" |
| 760 | $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.SSL]LIBSSL.OLB Library." | 830 | $ WRITE SYS$OUTPUT - |
| 831 | "Building The [.",ARCHD,".EXE.SSL]SSL_LIBSSL''LIB32'.OLB Library." | ||
| 761 | $! | 832 | $! |
| 762 | $! Go To The [.SSL] Directory. | 833 | $! Go To The [.SSL] Directory. |
| 763 | $! | 834 | $! |
| @@ -765,7 +836,8 @@ $ SET DEFAULT SYS$DISK:[.SSL] | |||
| 765 | $! | 836 | $! |
| 766 | $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library. | 837 | $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library. |
| 767 | $! | 838 | $! |
| 768 | $ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' | 839 | $ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" - |
| 840 | "''ISSEVEN'" "''POINTER_SIZE'" "''ZLIB'" | ||
| 769 | $! | 841 | $! |
| 770 | $! Go Back To The Main Directory. | 842 | $! Go Back To The Main Directory. |
| 771 | $! | 843 | $! |
| @@ -782,7 +854,8 @@ $! | |||
| 782 | $! Tell The User What We Are Doing. | 854 | $! Tell The User What We Are Doing. |
| 783 | $! | 855 | $! |
| 784 | $ WRITE SYS$OUTPUT "" | 856 | $ WRITE SYS$OUTPUT "" |
| 785 | $ WRITE SYS$OUTPUT "Building DECNet Based SSL Engine, [.",ARCH,".EXE.SSL]SSL_TASK.EXE" | 857 | $ WRITE SYS$OUTPUT - |
| 858 | "Building DECNet Based SSL Engine, [.",ARCHD,".EXE.SSL]SSL_TASK.EXE" | ||
| 786 | $! | 859 | $! |
| 787 | $! Go To The [.SSL] Directory. | 860 | $! Go To The [.SSL] Directory. |
| 788 | $! | 861 | $! |
| @@ -790,7 +863,8 @@ $ SET DEFAULT SYS$DISK:[.SSL] | |||
| 790 | $! | 863 | $! |
| 791 | $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE | 864 | $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE |
| 792 | $! | 865 | $! |
| 793 | $ @SSL-LIB SSL_TASK 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' | 866 | $ @SSL-LIB SSL_TASK 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" - |
| 867 | "''ISSEVEN'" "''POINTER_SIZE'" "''ZLIB'" | ||
| 794 | $! | 868 | $! |
| 795 | $! Go Back To The Main Directory. | 869 | $! Go Back To The Main Directory. |
| 796 | $! | 870 | $! |
| @@ -807,7 +881,7 @@ $! | |||
| 807 | $! Tell The User What We Are Doing. | 881 | $! Tell The User What We Are Doing. |
| 808 | $! | 882 | $! |
| 809 | $ WRITE SYS$OUTPUT "" | 883 | $ WRITE SYS$OUTPUT "" |
| 810 | $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCH,".EXE.TEST] Test Utilities." | 884 | $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCHD,".EXE.TEST] Test Utilities." |
| 811 | $! | 885 | $! |
| 812 | $! Go To The [.TEST] Directory. | 886 | $! Go To The [.TEST] Directory. |
| 813 | $! | 887 | $! |
| @@ -815,7 +889,8 @@ $ SET DEFAULT SYS$DISK:[.TEST] | |||
| 815 | $! | 889 | $! |
| 816 | $! Build The Test Programs. | 890 | $! Build The Test Programs. |
| 817 | $! | 891 | $! |
| 818 | $ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' | 892 | $ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" - |
| 893 | "''POINTER_SIZE'" "''ZLIB'" | ||
| 819 | $! | 894 | $! |
| 820 | $! Go Back To The Main Directory. | 895 | $! Go Back To The Main Directory. |
| 821 | $! | 896 | $! |
| @@ -832,7 +907,7 @@ $! | |||
| 832 | $! Tell The User What We Are Doing. | 907 | $! Tell The User What We Are Doing. |
| 833 | $! | 908 | $! |
| 834 | $ WRITE SYS$OUTPUT "" | 909 | $ WRITE SYS$OUTPUT "" |
| 835 | $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.APPS] Applications." | 910 | $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCHD,".EXE.APPS] Applications." |
| 836 | $! | 911 | $! |
| 837 | $! Go To The [.APPS] Directory. | 912 | $! Go To The [.APPS] Directory. |
| 838 | $! | 913 | $! |
| @@ -840,7 +915,8 @@ $ SET DEFAULT SYS$DISK:[.APPS] | |||
| 840 | $! | 915 | $! |
| 841 | $! Build The Application Programs. | 916 | $! Build The Application Programs. |
| 842 | $! | 917 | $! |
| 843 | $ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' | 918 | $ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" - |
| 919 | "" "''POINTER_SIZE'" "''ZLIB'" | ||
| 844 | $! | 920 | $! |
| 845 | $! Go Back To The Main Directory. | 921 | $! Go Back To The Main Directory. |
| 846 | $! | 922 | $! |
| @@ -857,7 +933,7 @@ $! | |||
| 857 | $! Tell The User What We Are Doing. | 933 | $! Tell The User What We Are Doing. |
| 858 | $! | 934 | $! |
| 859 | $ WRITE SYS$OUTPUT "" | 935 | $ WRITE SYS$OUTPUT "" |
| 860 | $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.ENGINES] Engines." | 936 | $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCHD,".EXE.ENGINES] Engines." |
| 861 | $! | 937 | $! |
| 862 | $! Go To The [.ENGINES] Directory. | 938 | $! Go To The [.ENGINES] Directory. |
| 863 | $! | 939 | $! |
| @@ -865,7 +941,8 @@ $ SET DEFAULT SYS$DISK:[.ENGINES] | |||
| 865 | $! | 941 | $! |
| 866 | $! Build The Application Programs. | 942 | $! Build The Application Programs. |
| 867 | $! | 943 | $! |
| 868 | $ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'" | 944 | $ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" - |
| 945 | "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'" | ||
| 869 | $! | 946 | $! |
| 870 | $! Go Back To The Main Directory. | 947 | $! Go Back To The Main Directory. |
| 871 | $! | 948 | $! |
| @@ -922,9 +999,9 @@ $! | |||
| 922 | $! Tell The User We Don't Know What They Want. | 999 | $! Tell The User We Don't Know What They Want. |
| 923 | $! | 1000 | $! |
| 924 | $ WRITE SYS$OUTPUT "" | 1001 | $ WRITE SYS$OUTPUT "" |
| 925 | $ WRITE SYS$OUTPUT "USAGE: @MAKEVMS.COM [Target] [not-used option] [Debug option] <Compiler>" | 1002 | $ WRITE SYS$OUTPUT "USAGE: @MAKEVMS.COM [Target] [Pointer size] [Debug option] <Compiler>" |
| 926 | $ WRITE SYS$OUTPUT "" | 1003 | $ WRITE SYS$OUTPUT "" |
| 927 | $ WRITE SYS$OUTPUT "Example: @MAKEVMS.COM ALL NORSAREF NODEBUG " | 1004 | $ WRITE SYS$OUTPUT "Example: @MAKEVMS.COM ALL """" NODEBUG " |
| 928 | $ WRITE SYS$OUTPUT "" | 1005 | $ WRITE SYS$OUTPUT "" |
| 929 | $ WRITE SYS$OUTPUT "The Target ",P1," Is Invalid. The Valid Target Options Are:" | 1006 | $ WRITE SYS$OUTPUT "The Target ",P1," Is Invalid. The Valid Target Options Are:" |
| 930 | $ WRITE SYS$OUTPUT "" | 1007 | $ WRITE SYS$OUTPUT "" |
| @@ -944,8 +1021,8 @@ $ WRITE SYS$OUTPUT " ENGINES : To Build Just The ENGINES" | |||
| 944 | $ WRITE SYS$OUTPUT "" | 1021 | $ WRITE SYS$OUTPUT "" |
| 945 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" | 1022 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" |
| 946 | $ WRITE SYS$OUTPUT "" | 1023 | $ WRITE SYS$OUTPUT "" |
| 947 | $ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture." | 1024 | $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture." |
| 948 | $ WRITE SYS$OUTPUT " IA64 : IA64 Architecture." | 1025 | $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture." |
| 949 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." | 1026 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." |
| 950 | $ WRITE SYS$OUTPUT "" | 1027 | $ WRITE SYS$OUTPUT "" |
| 951 | $! | 1028 | $! |
| @@ -961,6 +1038,54 @@ $! End The P1 Check. | |||
| 961 | $! | 1038 | $! |
| 962 | $ ENDIF | 1039 | $ ENDIF |
| 963 | $! | 1040 | $! |
| 1041 | $! Check P2 (POINTER_SIZE). | ||
| 1042 | $! | ||
| 1043 | $ IF (P2 .NES. "") .AND. (ARCH .NES. "VAX") | ||
| 1044 | $ THEN | ||
| 1045 | $! | ||
| 1046 | $ IF (P2 .EQS. "32") | ||
| 1047 | $ THEN | ||
| 1048 | $ POINTER_SIZE = "32" | ||
| 1049 | $ ELSE | ||
| 1050 | $ POINTER_SIZE = F$EDIT( P2, "COLLAPSE, UPCASE") | ||
| 1051 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
| 1052 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
| 1053 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
| 1054 | $ THEN | ||
| 1055 | $ ARCHD = ARCH+ "_64" | ||
| 1056 | $ LIB32 = "" | ||
| 1057 | $ ELSE | ||
| 1058 | $! | ||
| 1059 | $! Tell The User Entered An Invalid Option. | ||
| 1060 | $! | ||
| 1061 | $ WRITE SYS$OUTPUT "" | ||
| 1062 | $ WRITE SYS$OUTPUT "The Option ", P2, - | ||
| 1063 | " Is Invalid. The Valid Options Are:" | ||
| 1064 | $ WRITE SYS$OUTPUT "" | ||
| 1065 | $ WRITE SYS$OUTPUT - | ||
| 1066 | " """" : Compile with default (short) pointers." | ||
| 1067 | $ WRITE SYS$OUTPUT - | ||
| 1068 | " 32 : Compile with 32-bit (short) pointers." | ||
| 1069 | $ WRITE SYS$OUTPUT - | ||
| 1070 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
| 1071 | $ WRITE SYS$OUTPUT - | ||
| 1072 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
| 1073 | $ WRITE SYS$OUTPUT - | ||
| 1074 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
| 1075 | $ WRITE SYS$OUTPUT "" | ||
| 1076 | $! | ||
| 1077 | $! Time To EXIT. | ||
| 1078 | $! | ||
| 1079 | $ GOTO TIDY | ||
| 1080 | $! | ||
| 1081 | $ ENDIF | ||
| 1082 | $! | ||
| 1083 | $ ENDIF | ||
| 1084 | $! | ||
| 1085 | $! End The P2 (POINTER_SIZE) Check. | ||
| 1086 | $! | ||
| 1087 | $ ENDIF | ||
| 1088 | $! | ||
| 964 | $! Check To See If P3 Is Blank. | 1089 | $! Check To See If P3 Is Blank. |
| 965 | $! | 1090 | $! |
| 966 | $ IF (P3.EQS."NODEBUG") | 1091 | $ IF (P3.EQS."NODEBUG") |
| @@ -987,7 +1112,7 @@ $! Else... | |||
| 987 | $! | 1112 | $! |
| 988 | $ ELSE | 1113 | $ ELSE |
| 989 | $! | 1114 | $! |
| 990 | $! Tell The User Entered An Invalid Option.. | 1115 | $! Tell The User Entered An Invalid Option. |
| 991 | $! | 1116 | $! |
| 992 | $ WRITE SYS$OUTPUT "" | 1117 | $ WRITE SYS$OUTPUT "" |
| 993 | $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:" | 1118 | $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:" |
| @@ -1066,7 +1191,7 @@ $! Else... | |||
| 1066 | $! | 1191 | $! |
| 1067 | $ ELSE | 1192 | $ ELSE |
| 1068 | $! | 1193 | $! |
| 1069 | $! Check To See If The User Entered A Valid Paramter. | 1194 | $! Check To See If The User Entered A Valid Parameter. |
| 1070 | $! | 1195 | $! |
| 1071 | $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK") | 1196 | $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK") |
| 1072 | $ THEN | 1197 | $ THEN |
| @@ -1165,7 +1290,8 @@ $! End The P4 Check. | |||
| 1165 | $! | 1290 | $! |
| 1166 | $ ENDIF | 1291 | $ ENDIF |
| 1167 | $! | 1292 | $! |
| 1168 | $! Time to check the contents of P5, and to make sure we get the correct library. | 1293 | $! Time to check the contents of P5, and to make sure we get the correct |
| 1294 | $! library. | ||
| 1169 | $! | 1295 | $! |
| 1170 | $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" - | 1296 | $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" - |
| 1171 | .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE" | 1297 | .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE" |
| @@ -1178,7 +1304,7 @@ $ THEN | |||
| 1178 | $! | 1304 | $! |
| 1179 | $! Set the library to use SOCKETSHR | 1305 | $! Set the library to use SOCKETSHR |
| 1180 | $! | 1306 | $! |
| 1181 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" | 1307 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
| 1182 | $! | 1308 | $! |
| 1183 | $! Tell the user | 1309 | $! Tell the user |
| 1184 | $! | 1310 | $! |
| @@ -1212,7 +1338,7 @@ $ THEN | |||
| 1212 | $! | 1338 | $! |
| 1213 | $! Set the library to use UCX. | 1339 | $! Set the library to use UCX. |
| 1214 | $! | 1340 | $! |
| 1215 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" | 1341 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
| 1216 | $! | 1342 | $! |
| 1217 | $! Tell the user | 1343 | $! Tell the user |
| 1218 | $! | 1344 | $! |
| @@ -1229,7 +1355,7 @@ $ THEN | |||
| 1229 | $! | 1355 | $! |
| 1230 | $! Set the library to use TCPIP (post UCX). | 1356 | $! Set the library to use TCPIP (post UCX). |
| 1231 | $! | 1357 | $! |
| 1232 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" | 1358 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
| 1233 | $! | 1359 | $! |
| 1234 | $! Tell the user | 1360 | $! Tell the user |
| 1235 | $! | 1361 | $! |
| @@ -1339,11 +1465,69 @@ $! End The P6 Check. | |||
| 1339 | $! | 1465 | $! |
| 1340 | $ ENDIF | 1466 | $ ENDIF |
| 1341 | $! | 1467 | $! |
| 1468 | $! | ||
| 1469 | $! Check To See If We Have A ZLIB Option. | ||
| 1470 | $! | ||
| 1471 | $ ZLIB = P7 | ||
| 1472 | $ IF (ZLIB .NES. "") | ||
| 1473 | $ THEN | ||
| 1474 | $! | ||
| 1475 | $! Check for expected ZLIB files. | ||
| 1476 | $! | ||
| 1477 | $ err = 0 | ||
| 1478 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
| 1479 | $ if (f$search( file1) .eqs. "") | ||
| 1480 | $ then | ||
| 1481 | $ WRITE SYS$OUTPUT "" | ||
| 1482 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 1483 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
| 1484 | $ err = 1 | ||
| 1485 | $ endif | ||
| 1486 | $! | ||
| 1487 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
| 1488 | $ if (f$search( file2) .eqs. "") | ||
| 1489 | $ then | ||
| 1490 | $ if (err .eq. 0) | ||
| 1491 | $ then | ||
| 1492 | $ WRITE SYS$OUTPUT "" | ||
| 1493 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 1494 | $ endif | ||
| 1495 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
| 1496 | $ WRITE SYS$OUTPUT "" | ||
| 1497 | $ err = err+ 2 | ||
| 1498 | $ endif | ||
| 1499 | $ if (err .eq. 1) | ||
| 1500 | $ then | ||
| 1501 | $ WRITE SYS$OUTPUT "" | ||
| 1502 | $ endif | ||
| 1503 | $! | ||
| 1504 | $ if (err .ne. 0) | ||
| 1505 | $ then | ||
| 1506 | $ GOTO TIDY | ||
| 1507 | $ endif | ||
| 1508 | $! | ||
| 1509 | $! Print info | ||
| 1510 | $! | ||
| 1511 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
| 1512 | $! | ||
| 1513 | $! End The ZLIB Check. | ||
| 1514 | $! | ||
| 1515 | $ ENDIF | ||
| 1516 | $! | ||
| 1342 | $! Time To RETURN... | 1517 | $! Time To RETURN... |
| 1343 | $! | 1518 | $! |
| 1344 | $ RETURN | 1519 | $ RETURN |
| 1345 | $! | 1520 | $! |
| 1346 | $ TIDY: | 1521 | $ TIDY: |
| 1522 | $! | ||
| 1523 | $! Close any open files. | ||
| 1524 | $! | ||
| 1525 | $ if (f$trnlnm( "h_file", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - | ||
| 1526 | close h_file | ||
| 1527 | $! | ||
| 1528 | $! Restore the original default device:[directory]. | ||
| 1529 | $! | ||
| 1347 | $ SET DEFAULT 'DEF_ORIG' | 1530 | $ SET DEFAULT 'DEF_ORIG' |
| 1531 | $! | ||
| 1348 | $ EXIT | 1532 | $ EXIT |
| 1349 | $! | 1533 | $! |
diff --git a/src/lib/libssl/src/ms/uplink.c b/src/lib/libssl/src/ms/uplink.c index 7b7da08d47..6d59cb1f87 100644 --- a/src/lib/libssl/src/ms/uplink.c +++ b/src/lib/libssl/src/ms/uplink.c | |||
| @@ -40,7 +40,8 @@ void OPENSSL_Uplink (volatile void **table, int index) | |||
| 40 | * should be sufficient [it prohibits compiler to reorder memory | 40 | * should be sufficient [it prohibits compiler to reorder memory |
| 41 | * access instructions]. */ | 41 | * access instructions]. */ |
| 42 | do { | 42 | do { |
| 43 | len = _stprintf (msg,_T("OPENSSL_Uplink(%p,%02X): "),table,index); | 43 | len = _sntprintf (msg,sizeof(msg)/sizeof(TCHAR), |
| 44 | _T("OPENSSL_Uplink(%p,%02X): "),table,index); | ||
| 44 | _tcscpy (msg+len,_T("unimplemented function")); | 45 | _tcscpy (msg+len,_T("unimplemented function")); |
| 45 | 46 | ||
| 46 | if ((h=apphandle)==NULL) | 47 | if ((h=apphandle)==NULL) |
diff --git a/src/lib/libssl/src/openssl.spec b/src/lib/libssl/src/openssl.spec index bed337b638..e4db875539 100644 --- a/src/lib/libssl/src/openssl.spec +++ b/src/lib/libssl/src/openssl.spec | |||
| @@ -2,15 +2,15 @@ | |||
| 2 | %define libmaj 1 | 2 | %define libmaj 1 |
| 3 | %define libmin 0 | 3 | %define libmin 0 |
| 4 | %define librel 0 | 4 | %define librel 0 |
| 5 | %define librev a | 5 | %define librev e |
| 6 | Release: 1 | 6 | Release: 1 |
| 7 | 7 | ||
| 8 | %define openssldir /var/ssl | 8 | %define openssldir /var/ssl |
| 9 | 9 | ||
| 10 | Summary: Secure Sockets Layer and cryptography libraries and tools | 10 | Summary: Secure Sockets Layer and cryptography libraries and tools |
| 11 | Name: openssl | 11 | Name: openssl |
| 12 | Version: %{libmaj}.%{libmin}.%{librel} | 12 | #Version: %{libmaj}.%{libmin}.%{librel} |
| 13 | #Version: %{libmaj}.%{libmin}.%{librel}%{librev} | 13 | Version: %{libmaj}.%{libmin}.%{librel}%{librev} |
| 14 | Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz | 14 | Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz |
| 15 | Copyright: Freely distributable | 15 | Copyright: Freely distributable |
| 16 | Group: System Environment/Libraries | 16 | Group: System Environment/Libraries |
diff --git a/src/lib/libssl/src/ssl/bio_ssl.c b/src/lib/libssl/src/ssl/bio_ssl.c index af319af302..eedac8a3fc 100644 --- a/src/lib/libssl/src/ssl/bio_ssl.c +++ b/src/lib/libssl/src/ssl/bio_ssl.c | |||
| @@ -348,7 +348,11 @@ static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
| 348 | break; | 348 | break; |
| 349 | case BIO_C_SET_SSL: | 349 | case BIO_C_SET_SSL: |
| 350 | if (ssl != NULL) | 350 | if (ssl != NULL) |
| 351 | { | ||
| 351 | ssl_free(b); | 352 | ssl_free(b); |
| 353 | if (!ssl_new(b)) | ||
| 354 | return 0; | ||
| 355 | } | ||
| 352 | b->shutdown=(int)num; | 356 | b->shutdown=(int)num; |
| 353 | ssl=(SSL *)ptr; | 357 | ssl=(SSL *)ptr; |
| 354 | ((BIO_SSL *)b->ptr)->ssl=ssl; | 358 | ((BIO_SSL *)b->ptr)->ssl=ssl; |
diff --git a/src/lib/libssl/src/ssl/install-ssl.com b/src/lib/libssl/src/ssl/install-ssl.com new file mode 100755 index 0000000000..1bd6ccaa7a --- /dev/null +++ b/src/lib/libssl/src/ssl/install-ssl.com | |||
| @@ -0,0 +1,136 @@ | |||
| 1 | $! INSTALL-SSL.COM -- Installs the files in a given directory tree | ||
| 2 | $! | ||
| 3 | $! Author: Richard Levitte <richard@levitte.org> | ||
| 4 | $! Time of creation: 22-MAY-1998 10:13 | ||
| 5 | $! | ||
| 6 | $! P1 root of the directory tree | ||
| 7 | $! P2 "64" for 64-bit pointers. | ||
| 8 | $! | ||
| 9 | $! | ||
| 10 | $! Announce/identify. | ||
| 11 | $! | ||
| 12 | $ proc = f$environment( "procedure") | ||
| 13 | $ write sys$output "@@@ "+ - | ||
| 14 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 15 | $! | ||
| 16 | $ on error then goto tidy | ||
| 17 | $ on control_c then goto tidy | ||
| 18 | $! | ||
| 19 | $ if p1 .eqs. "" | ||
| 20 | $ then | ||
| 21 | $ write sys$output "First argument missing." | ||
| 22 | $ write sys$output - | ||
| 23 | "It should be the directory where you want things installed." | ||
| 24 | $ exit | ||
| 25 | $ endif | ||
| 26 | $! | ||
| 27 | $ if (f$getsyi( "cpu") .lt. 128) | ||
| 28 | $ then | ||
| 29 | $ arch = "VAX" | ||
| 30 | $ else | ||
| 31 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
| 32 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 33 | $ endif | ||
| 34 | $! | ||
| 35 | $ archd = arch | ||
| 36 | $ lib32 = "32" | ||
| 37 | $ shr = "_SHR32" | ||
| 38 | $! | ||
| 39 | $ if (p2 .nes. "") | ||
| 40 | $ then | ||
| 41 | $ if (p2 .eqs. "64") | ||
| 42 | $ then | ||
| 43 | $ archd = arch+ "_64" | ||
| 44 | $ lib32 = "" | ||
| 45 | $ shr = "_SHR" | ||
| 46 | $ else | ||
| 47 | $ if (p2 .nes. "32") | ||
| 48 | $ then | ||
| 49 | $ write sys$output "Second argument invalid." | ||
| 50 | $ write sys$output "It should be "32", "64", or nothing." | ||
| 51 | $ exit | ||
| 52 | $ endif | ||
| 53 | $ endif | ||
| 54 | $ endif | ||
| 55 | $! | ||
| 56 | $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" | ||
| 57 | $ root_dev = f$parse(root,,,"device","syntax_only") | ||
| 58 | $ root_dir = f$parse(root,,,"directory","syntax_only") - - | ||
| 59 | "[000000." - "][" - "[" - "]" | ||
| 60 | $ root = root_dev + "[" + root_dir | ||
| 61 | $! | ||
| 62 | $ define /nolog wrk_sslroot 'root'.] /trans=conc | ||
| 63 | $ define /nolog wrk_sslinclude wrk_sslroot:[include] | ||
| 64 | $ define /nolog wrk_sslxexe wrk_sslroot:['archd'_exe] | ||
| 65 | $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib] | ||
| 66 | $! | ||
| 67 | $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - | ||
| 68 | create /directory /log wrk_sslroot:[000000] | ||
| 69 | $ if f$parse("wrk_sslinclude:") .eqs. "" then - | ||
| 70 | create /directory /log wrk_sslinclude: | ||
| 71 | $ if f$parse("wrk_sslxexe:") .eqs. "" then - | ||
| 72 | create /directory /log wrk_sslxexe: | ||
| 73 | $ if f$parse("wrk_sslxlib:") .eqs. "" then - | ||
| 74 | create /directory /log wrk_sslxlib: | ||
| 75 | $! | ||
| 76 | $ exheader := ssl.h, ssl2.h, ssl3.h, ssl23.h, tls1.h, dtls1.h, kssl.h | ||
| 77 | $ e_exe := ssl_task | ||
| 78 | $ libs := ssl_libssl | ||
| 79 | $! | ||
| 80 | $ xexe_dir := [-.'archd'.exe.ssl] | ||
| 81 | $! | ||
| 82 | $ copy /protection = w:re 'exheader' wrk_sslinclude: /log | ||
| 83 | $! | ||
| 84 | $ i = 0 | ||
| 85 | $ loop_exe: | ||
| 86 | $ e = f$edit( f$element( i, ",", e_exe), "trim") | ||
| 87 | $ i = i + 1 | ||
| 88 | $ if e .eqs. "," then goto loop_exe_end | ||
| 89 | $ set noon | ||
| 90 | $ file = xexe_dir+ e+ ".exe" | ||
| 91 | $ if f$search( file) .nes. "" | ||
| 92 | $ then | ||
| 93 | $ copy /protection = w:re 'file' wrk_sslxexe: /log | ||
| 94 | $ endif | ||
| 95 | $ set on | ||
| 96 | $ goto loop_exe | ||
| 97 | $ loop_exe_end: | ||
| 98 | $! | ||
| 99 | $ i = 0 | ||
| 100 | $ loop_lib: | ||
| 101 | $ e = f$edit(f$element(i, ",", libs),"trim") | ||
| 102 | $ i = i + 1 | ||
| 103 | $ if e .eqs. "," then goto loop_lib_end | ||
| 104 | $ set noon | ||
| 105 | $! Object library. | ||
| 106 | $ file = xexe_dir+ e+ lib32+ ".olb" | ||
| 107 | $ if f$search( file) .nes. "" | ||
| 108 | $ then | ||
| 109 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
| 110 | $ endif | ||
| 111 | $! Shareable image. | ||
| 112 | $ file = xexe_dir+ e+ shr+ ".exe" | ||
| 113 | $ if f$search( file) .nes. "" | ||
| 114 | $ then | ||
| 115 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
| 116 | $ endif | ||
| 117 | $ set on | ||
| 118 | $ goto loop_lib | ||
| 119 | $ loop_lib_end: | ||
| 120 | $! | ||
| 121 | $ tidy: | ||
| 122 | $! | ||
| 123 | $ call deass wrk_sslroot | ||
| 124 | $ call deass wrk_sslinclude | ||
| 125 | $ call deass wrk_sslxexe | ||
| 126 | $ call deass wrk_sslxlib | ||
| 127 | $! | ||
| 128 | $ exit | ||
| 129 | $! | ||
| 130 | $ deass: subroutine | ||
| 131 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
| 132 | $ then | ||
| 133 | $ deassign /process 'p1' | ||
| 134 | $ endif | ||
| 135 | $ endsubroutine | ||
| 136 | $! | ||
diff --git a/src/lib/libssl/src/ssl/s23_lib.c b/src/lib/libssl/src/ssl/s23_lib.c index e3fce53430..3bf728318a 100644 --- a/src/lib/libssl/src/ssl/s23_lib.c +++ b/src/lib/libssl/src/ssl/s23_lib.c | |||
| @@ -92,15 +92,8 @@ const SSL_CIPHER *ssl23_get_cipher(unsigned int u) | |||
| 92 | * available */ | 92 | * available */ |
| 93 | const SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p) | 93 | const SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p) |
| 94 | { | 94 | { |
| 95 | SSL_CIPHER c; | ||
| 96 | const SSL_CIPHER *cp; | 95 | const SSL_CIPHER *cp; |
| 97 | unsigned long id; | ||
| 98 | int n; | ||
| 99 | 96 | ||
| 100 | n=ssl3_num_ciphers(); | ||
| 101 | id=0x03000000|((unsigned long)p[0]<<16L)| | ||
| 102 | ((unsigned long)p[1]<<8L)|(unsigned long)p[2]; | ||
| 103 | c.id=id; | ||
| 104 | cp=ssl3_get_cipher_by_char(p); | 97 | cp=ssl3_get_cipher_by_char(p); |
| 105 | #ifndef OPENSSL_NO_SSL2 | 98 | #ifndef OPENSSL_NO_SSL2 |
| 106 | if (cp == NULL) | 99 | if (cp == NULL) |
diff --git a/src/lib/libssl/src/ssl/s2_srvr.c b/src/lib/libssl/src/ssl/s2_srvr.c index 1434e734dd..bc885e8e7f 100644 --- a/src/lib/libssl/src/ssl/s2_srvr.c +++ b/src/lib/libssl/src/ssl/s2_srvr.c | |||
| @@ -403,13 +403,14 @@ static int get_client_master_key(SSL *s) | |||
| 403 | p+=3; | 403 | p+=3; |
| 404 | n2s(p,i); s->s2->tmp.clear=i; | 404 | n2s(p,i); s->s2->tmp.clear=i; |
| 405 | n2s(p,i); s->s2->tmp.enc=i; | 405 | n2s(p,i); s->s2->tmp.enc=i; |
| 406 | n2s(p,i); s->session->key_arg_length=i; | 406 | n2s(p,i); |
| 407 | if(s->session->key_arg_length > SSL_MAX_KEY_ARG_LENGTH) | 407 | if(i > SSL_MAX_KEY_ARG_LENGTH) |
| 408 | { | 408 | { |
| 409 | ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); | 409 | ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); |
| 410 | SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_KEY_ARG_TOO_LONG); | 410 | SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_KEY_ARG_TOO_LONG); |
| 411 | return -1; | 411 | return -1; |
| 412 | } | 412 | } |
| 413 | s->session->key_arg_length=i; | ||
| 413 | s->state=SSL2_ST_GET_CLIENT_MASTER_KEY_B; | 414 | s->state=SSL2_ST_GET_CLIENT_MASTER_KEY_B; |
| 414 | } | 415 | } |
| 415 | 416 | ||
| @@ -697,7 +698,6 @@ static int server_hello(SSL *s) | |||
| 697 | { | 698 | { |
| 698 | unsigned char *p,*d; | 699 | unsigned char *p,*d; |
| 699 | int n,hit; | 700 | int n,hit; |
| 700 | STACK_OF(SSL_CIPHER) *sk; | ||
| 701 | 701 | ||
| 702 | p=(unsigned char *)s->init_buf->data; | 702 | p=(unsigned char *)s->init_buf->data; |
| 703 | if (s->state == SSL2_ST_SEND_SERVER_HELLO_A) | 703 | if (s->state == SSL2_ST_SEND_SERVER_HELLO_A) |
| @@ -778,7 +778,6 @@ static int server_hello(SSL *s) | |||
| 778 | 778 | ||
| 779 | /* lets send out the ciphers we like in the | 779 | /* lets send out the ciphers we like in the |
| 780 | * prefered order */ | 780 | * prefered order */ |
| 781 | sk= s->session->ciphers; | ||
| 782 | n=ssl_cipher_list_to_bytes(s,s->session->ciphers,d,0); | 781 | n=ssl_cipher_list_to_bytes(s,s->session->ciphers,d,0); |
| 783 | d+=n; | 782 | d+=n; |
| 784 | s2n(n,p); /* add cipher length */ | 783 | s2n(n,p); /* add cipher length */ |
diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c index 41769febab..50bd415b56 100644 --- a/src/lib/libssl/src/ssl/s3_clnt.c +++ b/src/lib/libssl/src/ssl/s3_clnt.c | |||
| @@ -866,8 +866,11 @@ int ssl3_get_server_hello(SSL *s) | |||
| 866 | s->session->cipher_id = s->session->cipher->id; | 866 | s->session->cipher_id = s->session->cipher->id; |
| 867 | if (s->hit && (s->session->cipher_id != c->id)) | 867 | if (s->hit && (s->session->cipher_id != c->id)) |
| 868 | { | 868 | { |
| 869 | /* Workaround is now obsolete */ | ||
| 870 | #if 0 | ||
| 869 | if (!(s->options & | 871 | if (!(s->options & |
| 870 | SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG)) | 872 | SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG)) |
| 873 | #endif | ||
| 871 | { | 874 | { |
| 872 | al=SSL_AD_ILLEGAL_PARAMETER; | 875 | al=SSL_AD_ILLEGAL_PARAMETER; |
| 873 | SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED); | 876 | SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED); |
| @@ -1508,6 +1511,7 @@ int ssl3_get_key_exchange(SSL *s) | |||
| 1508 | s->session->sess_cert->peer_ecdh_tmp=ecdh; | 1511 | s->session->sess_cert->peer_ecdh_tmp=ecdh; |
| 1509 | ecdh=NULL; | 1512 | ecdh=NULL; |
| 1510 | BN_CTX_free(bn_ctx); | 1513 | BN_CTX_free(bn_ctx); |
| 1514 | bn_ctx = NULL; | ||
| 1511 | EC_POINT_free(srvr_ecpoint); | 1515 | EC_POINT_free(srvr_ecpoint); |
| 1512 | srvr_ecpoint = NULL; | 1516 | srvr_ecpoint = NULL; |
| 1513 | } | 1517 | } |
| @@ -2239,6 +2243,7 @@ int ssl3_send_client_key_exchange(SSL *s) | |||
| 2239 | if (!DH_generate_key(dh_clnt)) | 2243 | if (!DH_generate_key(dh_clnt)) |
| 2240 | { | 2244 | { |
| 2241 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB); | 2245 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB); |
| 2246 | DH_free(dh_clnt); | ||
| 2242 | goto err; | 2247 | goto err; |
| 2243 | } | 2248 | } |
| 2244 | 2249 | ||
| @@ -2250,6 +2255,7 @@ int ssl3_send_client_key_exchange(SSL *s) | |||
| 2250 | if (n <= 0) | 2255 | if (n <= 0) |
| 2251 | { | 2256 | { |
| 2252 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB); | 2257 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB); |
| 2258 | DH_free(dh_clnt); | ||
| 2253 | goto err; | 2259 | goto err; |
| 2254 | } | 2260 | } |
| 2255 | 2261 | ||
diff --git a/src/lib/libssl/src/ssl/s3_enc.c b/src/lib/libssl/src/ssl/s3_enc.c index 3d7aec97a2..58386e1ba0 100644 --- a/src/lib/libssl/src/ssl/s3_enc.c +++ b/src/lib/libssl/src/ssl/s3_enc.c | |||
| @@ -214,7 +214,7 @@ static int ssl3_generate_key_block(SSL *s, unsigned char *km, int num) | |||
| 214 | 214 | ||
| 215 | int ssl3_change_cipher_state(SSL *s, int which) | 215 | int ssl3_change_cipher_state(SSL *s, int which) |
| 216 | { | 216 | { |
| 217 | unsigned char *p,*key_block,*mac_secret; | 217 | unsigned char *p,*mac_secret; |
| 218 | unsigned char exp_key[EVP_MAX_KEY_LENGTH]; | 218 | unsigned char exp_key[EVP_MAX_KEY_LENGTH]; |
| 219 | unsigned char exp_iv[EVP_MAX_IV_LENGTH]; | 219 | unsigned char exp_iv[EVP_MAX_IV_LENGTH]; |
| 220 | unsigned char *ms,*key,*iv,*er1,*er2; | 220 | unsigned char *ms,*key,*iv,*er1,*er2; |
| @@ -239,7 +239,6 @@ int ssl3_change_cipher_state(SSL *s, int which) | |||
| 239 | else | 239 | else |
| 240 | comp=s->s3->tmp.new_compression->method; | 240 | comp=s->s3->tmp.new_compression->method; |
| 241 | #endif | 241 | #endif |
| 242 | key_block=s->s3->tmp.key_block; | ||
| 243 | 242 | ||
| 244 | if (which & SSL3_CC_READ) | 243 | if (which & SSL3_CC_READ) |
| 245 | { | 244 | { |
diff --git a/src/lib/libssl/src/ssl/s3_lib.c b/src/lib/libssl/src/ssl/s3_lib.c index d6b047c995..62c791cb72 100644 --- a/src/lib/libssl/src/ssl/s3_lib.c +++ b/src/lib/libssl/src/ssl/s3_lib.c | |||
| @@ -2198,11 +2198,17 @@ void ssl3_clear(SSL *s) | |||
| 2198 | } | 2198 | } |
| 2199 | #ifndef OPENSSL_NO_DH | 2199 | #ifndef OPENSSL_NO_DH |
| 2200 | if (s->s3->tmp.dh != NULL) | 2200 | if (s->s3->tmp.dh != NULL) |
| 2201 | { | ||
| 2201 | DH_free(s->s3->tmp.dh); | 2202 | DH_free(s->s3->tmp.dh); |
| 2203 | s->s3->tmp.dh = NULL; | ||
| 2204 | } | ||
| 2202 | #endif | 2205 | #endif |
| 2203 | #ifndef OPENSSL_NO_ECDH | 2206 | #ifndef OPENSSL_NO_ECDH |
| 2204 | if (s->s3->tmp.ecdh != NULL) | 2207 | if (s->s3->tmp.ecdh != NULL) |
| 2208 | { | ||
| 2205 | EC_KEY_free(s->s3->tmp.ecdh); | 2209 | EC_KEY_free(s->s3->tmp.ecdh); |
| 2210 | s->s3->tmp.ecdh = NULL; | ||
| 2211 | } | ||
| 2206 | #endif | 2212 | #endif |
| 2207 | 2213 | ||
| 2208 | rp = s->s3->rbuf.buf; | 2214 | rp = s->s3->rbuf.buf; |
diff --git a/src/lib/libssl/src/ssl/s3_pkt.c b/src/lib/libssl/src/ssl/s3_pkt.c index e3f6050a26..f9b3629cf7 100644 --- a/src/lib/libssl/src/ssl/s3_pkt.c +++ b/src/lib/libssl/src/ssl/s3_pkt.c | |||
| @@ -246,7 +246,8 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) | |||
| 246 | if (i <= 0) | 246 | if (i <= 0) |
| 247 | { | 247 | { |
| 248 | rb->left = left; | 248 | rb->left = left; |
| 249 | if (s->mode & SSL_MODE_RELEASE_BUFFERS) | 249 | if (s->mode & SSL_MODE_RELEASE_BUFFERS && |
| 250 | SSL_version(s) != DTLS1_VERSION && SSL_version(s) != DTLS1_BAD_VER) | ||
| 250 | if (len+left == 0) | 251 | if (len+left == 0) |
| 251 | ssl3_release_read_buffer(s); | 252 | ssl3_release_read_buffer(s); |
| 252 | return(i); | 253 | return(i); |
| @@ -846,7 +847,8 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, | |||
| 846 | { | 847 | { |
| 847 | wb->left=0; | 848 | wb->left=0; |
| 848 | wb->offset+=i; | 849 | wb->offset+=i; |
| 849 | if (s->mode & SSL_MODE_RELEASE_BUFFERS) | 850 | if (s->mode & SSL_MODE_RELEASE_BUFFERS && |
| 851 | SSL_version(s) != DTLS1_VERSION && SSL_version(s) != DTLS1_BAD_VER) | ||
| 850 | ssl3_release_write_buffer(s); | 852 | ssl3_release_write_buffer(s); |
| 851 | s->rwstate=SSL_NOTHING; | 853 | s->rwstate=SSL_NOTHING; |
| 852 | return(s->s3->wpend_ret); | 854 | return(s->s3->wpend_ret); |
diff --git a/src/lib/libssl/src/ssl/s3_srvr.c b/src/lib/libssl/src/ssl/s3_srvr.c index 92f73b6681..c3b5ff33ff 100644 --- a/src/lib/libssl/src/ssl/s3_srvr.c +++ b/src/lib/libssl/src/ssl/s3_srvr.c | |||
| @@ -768,9 +768,7 @@ int ssl3_check_client_hello(SSL *s) | |||
| 768 | if (s->s3->tmp.message_type == SSL3_MT_CLIENT_HELLO) | 768 | if (s->s3->tmp.message_type == SSL3_MT_CLIENT_HELLO) |
| 769 | { | 769 | { |
| 770 | /* Throw away what we have done so far in the current handshake, | 770 | /* Throw away what we have done so far in the current handshake, |
| 771 | * which will now be aborted. (A full SSL_clear would be too much.) | 771 | * which will now be aborted. (A full SSL_clear would be too much.) */ |
| 772 | * I hope that tmp.dh is the only thing that may need to be cleared | ||
| 773 | * when a handshake is not completed ... */ | ||
| 774 | #ifndef OPENSSL_NO_DH | 772 | #ifndef OPENSSL_NO_DH |
| 775 | if (s->s3->tmp.dh != NULL) | 773 | if (s->s3->tmp.dh != NULL) |
| 776 | { | 774 | { |
| @@ -778,6 +776,13 @@ int ssl3_check_client_hello(SSL *s) | |||
| 778 | s->s3->tmp.dh = NULL; | 776 | s->s3->tmp.dh = NULL; |
| 779 | } | 777 | } |
| 780 | #endif | 778 | #endif |
| 779 | #ifndef OPENSSL_NO_ECDH | ||
| 780 | if (s->s3->tmp.ecdh != NULL) | ||
| 781 | { | ||
| 782 | EC_KEY_free(s->s3->tmp.ecdh); | ||
| 783 | s->s3->tmp.ecdh = NULL; | ||
| 784 | } | ||
| 785 | #endif | ||
| 781 | return 2; | 786 | return 2; |
| 782 | } | 787 | } |
| 783 | return 1; | 788 | return 1; |
| @@ -985,6 +990,10 @@ int ssl3_get_client_hello(SSL *s) | |||
| 985 | break; | 990 | break; |
| 986 | } | 991 | } |
| 987 | } | 992 | } |
| 993 | /* Disabled because it can be used in a ciphersuite downgrade | ||
| 994 | * attack: CVE-2010-4180. | ||
| 995 | */ | ||
| 996 | #if 0 | ||
| 988 | if (j == 0 && (s->options & SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG) && (sk_SSL_CIPHER_num(ciphers) == 1)) | 997 | if (j == 0 && (s->options & SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG) && (sk_SSL_CIPHER_num(ciphers) == 1)) |
| 989 | { | 998 | { |
| 990 | /* Special case as client bug workaround: the previously used cipher may | 999 | /* Special case as client bug workaround: the previously used cipher may |
| @@ -999,6 +1008,7 @@ int ssl3_get_client_hello(SSL *s) | |||
| 999 | j = 1; | 1008 | j = 1; |
| 1000 | } | 1009 | } |
| 1001 | } | 1010 | } |
| 1011 | #endif | ||
| 1002 | if (j == 0) | 1012 | if (j == 0) |
| 1003 | { | 1013 | { |
| 1004 | /* we need to have the cipher in the cipher | 1014 | /* we need to have the cipher in the cipher |
| @@ -1486,7 +1496,6 @@ int ssl3_send_server_key_exchange(SSL *s) | |||
| 1486 | 1496 | ||
| 1487 | if (s->s3->tmp.dh != NULL) | 1497 | if (s->s3->tmp.dh != NULL) |
| 1488 | { | 1498 | { |
| 1489 | DH_free(dh); | ||
| 1490 | SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); | 1499 | SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); |
| 1491 | goto err; | 1500 | goto err; |
| 1492 | } | 1501 | } |
| @@ -1547,7 +1556,6 @@ int ssl3_send_server_key_exchange(SSL *s) | |||
| 1547 | 1556 | ||
| 1548 | if (s->s3->tmp.ecdh != NULL) | 1557 | if (s->s3->tmp.ecdh != NULL) |
| 1549 | { | 1558 | { |
| 1550 | EC_KEY_free(s->s3->tmp.ecdh); | ||
| 1551 | SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); | 1559 | SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); |
| 1552 | goto err; | 1560 | goto err; |
| 1553 | } | 1561 | } |
| @@ -1558,12 +1566,11 @@ int ssl3_send_server_key_exchange(SSL *s) | |||
| 1558 | SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); | 1566 | SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); |
| 1559 | goto err; | 1567 | goto err; |
| 1560 | } | 1568 | } |
| 1561 | if (!EC_KEY_up_ref(ecdhp)) | 1569 | if ((ecdh = EC_KEY_dup(ecdhp)) == NULL) |
| 1562 | { | 1570 | { |
| 1563 | SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); | 1571 | SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); |
| 1564 | goto err; | 1572 | goto err; |
| 1565 | } | 1573 | } |
| 1566 | ecdh = ecdhp; | ||
| 1567 | 1574 | ||
| 1568 | s->s3->tmp.ecdh=ecdh; | 1575 | s->s3->tmp.ecdh=ecdh; |
| 1569 | if ((EC_KEY_get0_public_key(ecdh) == NULL) || | 1576 | if ((EC_KEY_get0_public_key(ecdh) == NULL) || |
| @@ -1726,6 +1733,7 @@ int ssl3_send_server_key_exchange(SSL *s) | |||
| 1726 | (unsigned char *)encodedPoint, | 1733 | (unsigned char *)encodedPoint, |
| 1727 | encodedlen); | 1734 | encodedlen); |
| 1728 | OPENSSL_free(encodedPoint); | 1735 | OPENSSL_free(encodedPoint); |
| 1736 | encodedPoint = NULL; | ||
| 1729 | p += encodedlen; | 1737 | p += encodedlen; |
| 1730 | } | 1738 | } |
| 1731 | #endif | 1739 | #endif |
| @@ -2435,6 +2443,12 @@ int ssl3_get_client_key_exchange(SSL *s) | |||
| 2435 | /* Get encoded point length */ | 2443 | /* Get encoded point length */ |
| 2436 | i = *p; | 2444 | i = *p; |
| 2437 | p += 1; | 2445 | p += 1; |
| 2446 | if (n != 1 + i) | ||
| 2447 | { | ||
| 2448 | SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, | ||
| 2449 | ERR_R_EC_LIB); | ||
| 2450 | goto err; | ||
| 2451 | } | ||
| 2438 | if (EC_POINT_oct2point(group, | 2452 | if (EC_POINT_oct2point(group, |
| 2439 | clnt_ecpoint, p, i, bn_ctx) == 0) | 2453 | clnt_ecpoint, p, i, bn_ctx) == 0) |
| 2440 | { | 2454 | { |
| @@ -2579,12 +2593,19 @@ int ssl3_get_client_key_exchange(SSL *s) | |||
| 2579 | { | 2593 | { |
| 2580 | int ret = 0; | 2594 | int ret = 0; |
| 2581 | EVP_PKEY_CTX *pkey_ctx; | 2595 | EVP_PKEY_CTX *pkey_ctx; |
| 2582 | EVP_PKEY *client_pub_pkey = NULL; | 2596 | EVP_PKEY *client_pub_pkey = NULL, *pk = NULL; |
| 2583 | unsigned char premaster_secret[32], *start; | 2597 | unsigned char premaster_secret[32], *start; |
| 2584 | size_t outlen=32, inlen; | 2598 | size_t outlen=32, inlen; |
| 2599 | unsigned long alg_a; | ||
| 2585 | 2600 | ||
| 2586 | /* Get our certificate private key*/ | 2601 | /* Get our certificate private key*/ |
| 2587 | pkey_ctx = EVP_PKEY_CTX_new(s->cert->key->privatekey,NULL); | 2602 | alg_a = s->s3->tmp.new_cipher->algorithm_auth; |
| 2603 | if (alg_a & SSL_aGOST94) | ||
| 2604 | pk = s->cert->pkeys[SSL_PKEY_GOST94].privatekey; | ||
| 2605 | else if (alg_a & SSL_aGOST01) | ||
| 2606 | pk = s->cert->pkeys[SSL_PKEY_GOST01].privatekey; | ||
| 2607 | |||
| 2608 | pkey_ctx = EVP_PKEY_CTX_new(pk,NULL); | ||
| 2588 | EVP_PKEY_decrypt_init(pkey_ctx); | 2609 | EVP_PKEY_decrypt_init(pkey_ctx); |
| 2589 | /* If client certificate is present and is of the same type, maybe | 2610 | /* If client certificate is present and is of the same type, maybe |
| 2590 | * use it for key exchange. Don't mind errors from | 2611 | * use it for key exchange. Don't mind errors from |
diff --git a/src/lib/libssl/src/ssl/ssl-lib.com b/src/lib/libssl/src/ssl/ssl-lib.com index c5ca9e1df7..180f3a2d88 100644 --- a/src/lib/libssl/src/ssl/ssl-lib.com +++ b/src/lib/libssl/src/ssl/ssl-lib.com | |||
| @@ -42,11 +42,33 @@ $! SOCKETSHR for SOCKETSHR+NETLIB | |||
| 42 | $! | 42 | $! |
| 43 | $! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) | 43 | $! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) |
| 44 | $! | 44 | $! |
| 45 | $! P6, if defined, specifies the C pointer size. Ignored on VAX. | ||
| 46 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) | ||
| 47 | $! Supported values are: | ||
| 48 | $! | ||
| 49 | $! "" Compile with default (/NOPOINTER_SIZE) | ||
| 50 | $! 32 Compile with /POINTER_SIZE=32 (SHORT) | ||
| 51 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]) | ||
| 52 | $! (Automatically select ARGV if compiler supports it.) | ||
| 53 | $! 64= Compile with /POINTER_SIZE=64 (LONG). | ||
| 54 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). | ||
| 55 | $! | ||
| 56 | $! P7, if defined, specifies a directory where ZLIB files (zlib.h, | ||
| 57 | $! libz.olb) may be found. Optionally, a non-default object library | ||
| 58 | $! name may be included ("dev:[dir]libz_64.olb", for example). | ||
| 59 | $! | ||
| 60 | $! | ||
| 61 | $! Announce/identify. | ||
| 62 | $! | ||
| 63 | $ proc = f$environment( "procedure") | ||
| 64 | $ write sys$output "@@@ "+ - | ||
| 65 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 45 | $! | 66 | $! |
| 46 | $! Define A TCP/IP Library That We Will Need To Link To. | 67 | $! Define A TCP/IP Library That We Will Need To Link To. |
| 47 | $! (That Is, If We Need To Link To One.) | 68 | $! (That Is, If We Need To Link To One.) |
| 48 | $! | 69 | $! |
| 49 | $ TCPIP_LIB = "" | 70 | $ TCPIP_LIB = "" |
| 71 | $ ZLIB_LIB = "" | ||
| 50 | $! | 72 | $! |
| 51 | $! Check What Architecture We Are Using. | 73 | $! Check What Architecture We Are Using. |
| 52 | $! | 74 | $! |
| @@ -70,17 +92,33 @@ $! End The Architecture Check. | |||
| 70 | $! | 92 | $! |
| 71 | $ ENDIF | 93 | $ ENDIF |
| 72 | $! | 94 | $! |
| 73 | $! Define The OBJ Directory. | 95 | $ ARCHD = ARCH |
| 96 | $ LIB32 = "32" | ||
| 97 | $ OPT_FILE = "" | ||
| 98 | $ POINTER_SIZE = "" | ||
| 74 | $! | 99 | $! |
| 75 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.SSL] | 100 | $! Check To Make Sure We Have Valid Command Line Parameters. |
| 76 | $! | 101 | $! |
| 77 | $! Define The EXE Directory. | 102 | $ GOSUB CHECK_OPTIONS |
| 78 | $! | 103 | $! |
| 79 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.SSL] | 104 | $! Define The OBJ and EXE Directories. |
| 80 | $! | 105 | $! |
| 81 | $! Check To Make Sure We Have Valid Command Line Parameters. | 106 | $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.SSL] |
| 107 | $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.SSL] | ||
| 82 | $! | 108 | $! |
| 83 | $ GOSUB CHECK_OPTIONS | 109 | $! Specify the destination directory in any /MAP option. |
| 110 | $! | ||
| 111 | $ if (LINKMAP .eqs. "MAP") | ||
| 112 | $ then | ||
| 113 | $ LINKMAP = LINKMAP+ "=''EXE_DIR'" | ||
| 114 | $ endif | ||
| 115 | $! | ||
| 116 | $! Add the location prefix to the linker options file name. | ||
| 117 | $! | ||
| 118 | $ if (OPT_FILE .nes. "") | ||
| 119 | $ then | ||
| 120 | $ OPT_FILE = EXE_DIR+ OPT_FILE | ||
| 121 | $ endif | ||
| 84 | $! | 122 | $! |
| 85 | $! Initialise logical names and such | 123 | $! Initialise logical names and such |
| 86 | $! | 124 | $! |
| @@ -88,7 +126,7 @@ $ GOSUB INITIALISE | |||
| 88 | $! | 126 | $! |
| 89 | $! Tell The User What Kind of Machine We Run On. | 127 | $! Tell The User What Kind of Machine We Run On. |
| 90 | $! | 128 | $! |
| 91 | $ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine." | 129 | $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" |
| 92 | $! | 130 | $! |
| 93 | $! Check To See If The Architecture Specific OBJ Directory Exists. | 131 | $! Check To See If The Architecture Specific OBJ Directory Exists. |
| 94 | $! | 132 | $! |
| @@ -118,11 +156,15 @@ $ ENDIF | |||
| 118 | $! | 156 | $! |
| 119 | $! Define The Library Name. | 157 | $! Define The Library Name. |
| 120 | $! | 158 | $! |
| 121 | $ SSL_LIB := 'EXE_DIR'LIBSSL.OLB | 159 | $ SSL_LIB := 'EXE_DIR'SSL_LIBSSL'LIB32'.OLB |
| 122 | $! | 160 | $! |
| 123 | $! Define The CRYPTO-LIB We Are To Use. | 161 | $! Define The CRYPTO-LIB We Are To Use. |
| 124 | $! | 162 | $! |
| 125 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB | 163 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB |
| 164 | $! | ||
| 165 | $! Set up exceptional compilations. | ||
| 166 | $! | ||
| 167 | $ CC5_SHOWN = 0 | ||
| 126 | $! | 168 | $! |
| 127 | $! Check To See What We Are To Do. | 169 | $! Check To See What We Are To Do. |
| 128 | $! | 170 | $! |
| @@ -156,7 +198,7 @@ $! Compile The Library. | |||
| 156 | $! | 198 | $! |
| 157 | $ LIBRARY: | 199 | $ LIBRARY: |
| 158 | $! | 200 | $! |
| 159 | $! Check To See If We Already Have A "[.xxx.EXE.SSL]LIBSSL.OLB" Library... | 201 | $! Check To See If We Already Have A "[.xxx.EXE.SSL]SSL_LIBSSL''LIB32'.OLB" Library... |
| 160 | $! | 202 | $! |
| 161 | $ IF (F$SEARCH(SSL_LIB).EQS."") | 203 | $ IF (F$SEARCH(SSL_LIB).EQS."") |
| 162 | $ THEN | 204 | $ THEN |
| @@ -182,6 +224,8 @@ $ LIB_SSL = "s2_meth,s2_srvr,s2_clnt,s2_lib,s2_enc,s2_pkt,"+ - | |||
| 182 | "ssl_asn1,ssl_txt,ssl_algs,"+ - | 224 | "ssl_asn1,ssl_txt,ssl_algs,"+ - |
| 183 | "bio_ssl,ssl_err,kssl,t1_reneg" | 225 | "bio_ssl,ssl_err,kssl,t1_reneg" |
| 184 | $! | 226 | $! |
| 227 | $ COMPILEWITH_CC5 = "" | ||
| 228 | $! | ||
| 185 | $! Tell The User That We Are Compiling The Library. | 229 | $! Tell The User That We Are Compiling The Library. |
| 186 | $! | 230 | $! |
| 187 | $ WRITE SYS$OUTPUT "Building The ",SSL_LIB," Library." | 231 | $ WRITE SYS$OUTPUT "Building The ",SSL_LIB," Library." |
| @@ -295,42 +339,47 @@ $! End The SSL_TASK.C File Check. | |||
| 295 | $! | 339 | $! |
| 296 | $ ENDIF | 340 | $ ENDIF |
| 297 | $! | 341 | $! |
| 342 | $ COMPILEWITH_CC5 = "" !!! ",ssl_task," | ||
| 343 | $! | ||
| 344 | $! Tell The User We Are Creating The SSL_TASK. | ||
| 345 | $! | ||
| 298 | $! Tell The User We Are Creating The SSL_TASK. | 346 | $! Tell The User We Are Creating The SSL_TASK. |
| 299 | $! | 347 | $! |
| 300 | $ WRITE SYS$OUTPUT "Creating SSL_TASK OSU HTTP SSL Engine." | 348 | $ WRITE SYS$OUTPUT "Creating SSL_TASK OSU HTTP SSL Engine." |
| 301 | $! | 349 | $! |
| 350 | $! Tell The User What File We Are Compiling. | ||
| 351 | $! | ||
| 352 | $ FILE_NAME = "ssl_task" | ||
| 353 | $ WRITE SYS$OUTPUT " ",FILE_NAME,".c" | ||
| 354 | $! | ||
| 302 | $! Compile The File. | 355 | $! Compile The File. |
| 303 | $! | 356 | $! |
| 304 | $ ON ERROR THEN GOTO SSL_TASK_END | 357 | $ ON ERROR THEN GOTO SSL_TASK_END |
| 305 | $ CC5/OBJECT='OBJ_DIR'SSL_TASK.OBJ SYS$DISK:[]SSL_TASK.C | ||
| 306 | $! | 358 | $! |
| 307 | $! Link The Program. | 359 | $ FILE_NAME0 = ","+ F$ELEMENT(0,".",FILE_NAME)+ "," |
| 308 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | 360 | $ IF COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5 |
| 309 | $! | ||
| 310 | $ IF (TCPIP_LIB.NES."") | ||
| 311 | $ THEN | 361 | $ THEN |
| 312 | $! | 362 | $ if (.not. CC5_SHOWN) |
| 313 | $! Link With TCP/IP Library. | 363 | $ then |
| 314 | $! | 364 | $ CC5_SHOWN = 1 |
| 315 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR'SSL_TASK.EXE - | 365 | $ write sys$output " \Using special rule (5)" |
| 316 | 'OBJ_DIR'SSL_TASK.OBJ, - | 366 | $ x = " "+ CC5 |
| 317 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, - | 367 | $ write /symbol sys$output x |
| 318 | 'TCPIP_LIB','OPT_FILE'/OPTION | 368 | $ endif |
| 319 | $! | 369 | $ CC5 /OBJECT='OBJ_DIR''FILE_NAME'.OBJ SYS$DISK:[]'FILE_NAME'.C |
| 320 | $! Else... | ||
| 321 | $! | ||
| 322 | $ ELSE | 370 | $ ELSE |
| 371 | $ CC /OBJECT='OBJ_DIR''FILE_NAME'.OBJ SYS$DISK:[]'FILE_NAME'.C | ||
| 372 | $ ENDIF | ||
| 323 | $! | 373 | $! |
| 324 | $! Don't Link With TCP/IP Library. | 374 | $! Link The Program. |
| 325 | $! | ||
| 326 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR'SSL_TASK.EXE - | ||
| 327 | 'OBJ_DIR'SSL_TASK.OBJ,- | ||
| 328 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, - | ||
| 329 | 'OPT_FILE'/OPTION | ||
| 330 | $! | ||
| 331 | $! End The TCP/IP Library Check. | ||
| 332 | $! | 375 | $! |
| 333 | $ ENDIF | 376 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXE='EXE_DIR'SSL_TASK.EXE - |
| 377 | 'OBJ_DIR'SSL_TASK.OBJ, - | ||
| 378 | 'SSL_LIB'/LIBRARY, - | ||
| 379 | 'CRYPTO_LIB'/LIBRARY - | ||
| 380 | 'TCPIP_LIB' - | ||
| 381 | 'ZLIB_LIB' - | ||
| 382 | ,'OPT_FILE' /OPTIONS | ||
| 334 | $! | 383 | $! |
| 335 | $! Time To Return. | 384 | $! Time To Return. |
| 336 | $! | 385 | $! |
| @@ -356,7 +405,7 @@ $! | |||
| 356 | $ CREATE 'OPT_FILE' | 405 | $ CREATE 'OPT_FILE' |
| 357 | $DECK | 406 | $DECK |
| 358 | ! | 407 | ! |
| 359 | ! Default System Options File To Link Agianst | 408 | ! Default System Options File To Link Against |
| 360 | ! The Sharable VAX C Runtime Library. | 409 | ! The Sharable VAX C Runtime Library. |
| 361 | ! | 410 | ! |
| 362 | SYS$SHARE:VAXCRTL.EXE/SHARE | 411 | SYS$SHARE:VAXCRTL.EXE/SHARE |
| @@ -385,7 +434,7 @@ $! | |||
| 385 | $ CREATE 'OPT_FILE' | 434 | $ CREATE 'OPT_FILE' |
| 386 | $DECK | 435 | $DECK |
| 387 | ! | 436 | ! |
| 388 | ! Default System Options File To Link Agianst | 437 | ! Default System Options File To Link Against |
| 389 | ! The Sharable C Runtime Library. | 438 | ! The Sharable C Runtime Library. |
| 390 | ! | 439 | ! |
| 391 | GNU_CC:[000000]GCCLIB/LIBRARY | 440 | GNU_CC:[000000]GCCLIB/LIBRARY |
| @@ -420,7 +469,7 @@ $! | |||
| 420 | $ CREATE 'OPT_FILE' | 469 | $ CREATE 'OPT_FILE' |
| 421 | $DECK | 470 | $DECK |
| 422 | ! | 471 | ! |
| 423 | ! Default System Options File To Link Agianst | 472 | ! Default System Options File To Link Against |
| 424 | ! The Sharable DEC C Runtime Library. | 473 | ! The Sharable DEC C Runtime Library. |
| 425 | ! | 474 | ! |
| 426 | SYS$SHARE:DECC$SHR.EXE/SHARE | 475 | SYS$SHARE:DECC$SHR.EXE/SHARE |
| @@ -435,7 +484,7 @@ $! | |||
| 435 | $ CREATE 'OPT_FILE' | 484 | $ CREATE 'OPT_FILE' |
| 436 | $DECK | 485 | $DECK |
| 437 | ! | 486 | ! |
| 438 | ! Default System Options File For non-VAX To Link Agianst | 487 | ! Default System Options File For non-VAX To Link Against |
| 439 | ! The Sharable C Runtime Library. | 488 | ! The Sharable C Runtime Library. |
| 440 | ! | 489 | ! |
| 441 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE | 490 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE |
| @@ -548,8 +597,8 @@ $ WRITE SYS$OUTPUT " SSL_TASK : To Compile Just The [.xxx.EXE.SSL]SSL_TA | |||
| 548 | $ WRITE SYS$OUTPUT "" | 597 | $ WRITE SYS$OUTPUT "" |
| 549 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" | 598 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" |
| 550 | $ WRITE SYS$OUTPUT "" | 599 | $ WRITE SYS$OUTPUT "" |
| 551 | $ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture." | 600 | $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture." |
| 552 | $ WRITE SYS$OUTPUT " IA64 : IA64 Architecture." | 601 | $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture." |
| 553 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." | 602 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." |
| 554 | $ WRITE SYS$OUTPUT "" | 603 | $ WRITE SYS$OUTPUT "" |
| 555 | $! | 604 | $! |
| @@ -570,14 +619,15 @@ $! | |||
| 570 | $ IF (P2.EQS."NODEBUG") | 619 | $ IF (P2.EQS."NODEBUG") |
| 571 | $ THEN | 620 | $ THEN |
| 572 | $! | 621 | $! |
| 573 | $! P2 Is NODEBUG, So Compile Without Debugger Information. | 622 | $! P2 Is NODEBUG, So Compile Without Debugger Information. |
| 574 | $! | 623 | $! |
| 575 | $ DEBUGGER = "NODEBUG" | 624 | $ DEBUGGER = "NODEBUG" |
| 576 | $ TRACEBACK = "NOTRACEBACK" | 625 | $ LINKMAP = "NOMAP" |
| 577 | $ GCC_OPTIMIZE = "OPTIMIZE" | 626 | $ TRACEBACK = "NOTRACEBACK" |
| 578 | $ CC_OPTIMIZE = "OPTIMIZE" | 627 | $ GCC_OPTIMIZE = "OPTIMIZE" |
| 579 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | 628 | $ CC_OPTIMIZE = "OPTIMIZE" |
| 580 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | 629 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
| 630 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
| 581 | $! | 631 | $! |
| 582 | $! Else... | 632 | $! Else... |
| 583 | $! | 633 | $! |
| @@ -591,6 +641,7 @@ $! | |||
| 591 | $! Compile With Debugger Information. | 641 | $! Compile With Debugger Information. |
| 592 | $! | 642 | $! |
| 593 | $ DEBUGGER = "DEBUG" | 643 | $ DEBUGGER = "DEBUG" |
| 644 | $ LINKMAP = "MAP" | ||
| 594 | $ TRACEBACK = "TRACEBACK" | 645 | $ TRACEBACK = "TRACEBACK" |
| 595 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | 646 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
| 596 | $ CC_OPTIMIZE = "NOOPTIMIZE" | 647 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
| @@ -598,7 +649,7 @@ $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." | |||
| 598 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." | 649 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." |
| 599 | $ ELSE | 650 | $ ELSE |
| 600 | $! | 651 | $! |
| 601 | $! Tell The User Entered An Invalid Option.. | 652 | $! Tell The User Entered An Invalid Option. |
| 602 | $! | 653 | $! |
| 603 | $ WRITE SYS$OUTPUT "" | 654 | $ WRITE SYS$OUTPUT "" |
| 604 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" | 655 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" |
| @@ -653,6 +704,59 @@ $! End The P5 Check. | |||
| 653 | $! | 704 | $! |
| 654 | $ ENDIF | 705 | $ ENDIF |
| 655 | $! | 706 | $! |
| 707 | $! Check P6 (POINTER_SIZE). | ||
| 708 | $! | ||
| 709 | $ IF (P6 .NES. "") .AND. (ARCH .NES. "VAX") | ||
| 710 | $ THEN | ||
| 711 | $! | ||
| 712 | $ IF (P6 .EQS. "32") | ||
| 713 | $ THEN | ||
| 714 | $ POINTER_SIZE = " /POINTER_SIZE=32" | ||
| 715 | $ ELSE | ||
| 716 | $ POINTER_SIZE = F$EDIT( P6, "COLLAPSE, UPCASE") | ||
| 717 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
| 718 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
| 719 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
| 720 | $ THEN | ||
| 721 | $ ARCHD = ARCH+ "_64" | ||
| 722 | $ LIB32 = "" | ||
| 723 | $ POINTER_SIZE = " /POINTER_SIZE=64" | ||
| 724 | $ ELSE | ||
| 725 | $! | ||
| 726 | $! Tell The User Entered An Invalid Option. | ||
| 727 | $! | ||
| 728 | $ WRITE SYS$OUTPUT "" | ||
| 729 | $ WRITE SYS$OUTPUT "The Option ", P6, - | ||
| 730 | " Is Invalid. The Valid Options Are:" | ||
| 731 | $ WRITE SYS$OUTPUT "" | ||
| 732 | $ WRITE SYS$OUTPUT - | ||
| 733 | " """" : Compile with default (short) pointers." | ||
| 734 | $ WRITE SYS$OUTPUT - | ||
| 735 | " 32 : Compile with 32-bit (short) pointers." | ||
| 736 | $ WRITE SYS$OUTPUT - | ||
| 737 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
| 738 | $ WRITE SYS$OUTPUT - | ||
| 739 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
| 740 | $ WRITE SYS$OUTPUT - | ||
| 741 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
| 742 | $ WRITE SYS$OUTPUT "" | ||
| 743 | $! | ||
| 744 | $! Time To EXIT. | ||
| 745 | $! | ||
| 746 | $ EXIT | ||
| 747 | $! | ||
| 748 | $ ENDIF | ||
| 749 | $! | ||
| 750 | $ ENDIF | ||
| 751 | $! | ||
| 752 | $! End The P6 (POINTER_SIZE) Check. | ||
| 753 | $! | ||
| 754 | $ ENDIF | ||
| 755 | $! | ||
| 756 | $! Set basic C compiler /INCLUDE directories. | ||
| 757 | $! | ||
| 758 | $ CC_INCLUDES = "SYS$DISK:[-.CRYPTO],SYS$DISK:[-]" | ||
| 759 | $! | ||
| 656 | $! Check To See If P3 Is Blank. | 760 | $! Check To See If P3 Is Blank. |
| 657 | $! | 761 | $! |
| 658 | $ IF (P3.EQS."") | 762 | $ IF (P3.EQS."") |
| @@ -753,11 +857,64 @@ $ CCDEFS = "TCPIP_TYPE_''P4'" | |||
| 753 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 857 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
| 754 | $ CCEXTRAFLAGS = "" | 858 | $ CCEXTRAFLAGS = "" |
| 755 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 859 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
| 756 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" | 860 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" |
| 757 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 861 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
| 758 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | 862 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
| 759 | $! | 863 | $! |
| 760 | $! Check To See If The User Entered A Valid Paramter. | 864 | $! Check To See If We Have A ZLIB Option. |
| 865 | $! | ||
| 866 | $ ZLIB = P7 | ||
| 867 | $ IF (ZLIB .NES. "") | ||
| 868 | $ THEN | ||
| 869 | $! | ||
| 870 | $! Check for expected ZLIB files. | ||
| 871 | $! | ||
| 872 | $ err = 0 | ||
| 873 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
| 874 | $ if (f$search( file1) .eqs. "") | ||
| 875 | $ then | ||
| 876 | $ WRITE SYS$OUTPUT "" | ||
| 877 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 878 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
| 879 | $ err = 1 | ||
| 880 | $ endif | ||
| 881 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" | ||
| 882 | $! | ||
| 883 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
| 884 | $ if (f$search( file2) .eqs. "") | ||
| 885 | $ then | ||
| 886 | $ if (err .eq. 0) | ||
| 887 | $ then | ||
| 888 | $ WRITE SYS$OUTPUT "" | ||
| 889 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 890 | $ endif | ||
| 891 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
| 892 | $ WRITE SYS$OUTPUT "" | ||
| 893 | $ err = err+ 2 | ||
| 894 | $ endif | ||
| 895 | $ if (err .eq. 1) | ||
| 896 | $ then | ||
| 897 | $ WRITE SYS$OUTPUT "" | ||
| 898 | $ endif | ||
| 899 | $! | ||
| 900 | $ if (err .ne. 0) | ||
| 901 | $ then | ||
| 902 | $ EXIT | ||
| 903 | $ endif | ||
| 904 | $! | ||
| 905 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS | ||
| 906 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 | ||
| 907 | $ ZLIB_LIB = ", ''file2' /library" | ||
| 908 | $! | ||
| 909 | $! Print info | ||
| 910 | $! | ||
| 911 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
| 912 | $! | ||
| 913 | $! End The ZLIB Check. | ||
| 914 | $! | ||
| 915 | $ ENDIF | ||
| 916 | $! | ||
| 917 | $! Check To See If The User Entered A Valid Parameter. | ||
| 761 | $! | 918 | $! |
| 762 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") | 919 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") |
| 763 | $ THEN | 920 | $ THEN |
| @@ -780,13 +937,13 @@ $! | |||
| 780 | $ CC = "CC" | 937 | $ CC = "CC" |
| 781 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 938 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 782 | THEN CC = "CC/DECC" | 939 | THEN CC = "CC/DECC" |
| 783 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | 940 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
| 784 | "/NOLIST/PREFIX=ALL" + - | 941 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
| 785 | "/INCLUDE=(SYS$DISK:[-.CRYPTO],SYS$DISK:[-])" + CCEXTRAFLAGS | 942 | " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS |
| 786 | $! | 943 | $! |
| 787 | $! Define The Linker Options File Name. | 944 | $! Define The Linker Options File Name. |
| 788 | $! | 945 | $! |
| 789 | $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" | 946 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
| 790 | $! | 947 | $! |
| 791 | $! End DECC Check. | 948 | $! End DECC Check. |
| 792 | $! | 949 | $! |
| @@ -815,7 +972,7 @@ $ EXIT | |||
| 815 | $ ENDIF | 972 | $ ENDIF |
| 816 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | 973 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" |
| 817 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 974 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 818 | "/INCLUDE=(SYS$DISK:[-.CRYPTO],SYS$DISK:[-])" + CCEXTRAFLAGS | 975 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 819 | $ CCDEFS = CCDEFS + ",""VAXC""" | 976 | $ CCDEFS = CCDEFS + ",""VAXC""" |
| 820 | $! | 977 | $! |
| 821 | $! Define <sys> As SYS$COMMON:[SYSLIB] | 978 | $! Define <sys> As SYS$COMMON:[SYSLIB] |
| @@ -824,7 +981,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] | |||
| 824 | $! | 981 | $! |
| 825 | $! Define The Linker Options File Name. | 982 | $! Define The Linker Options File Name. |
| 826 | $! | 983 | $! |
| 827 | $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" | 984 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
| 828 | $! | 985 | $! |
| 829 | $! End VAXC Check | 986 | $! End VAXC Check |
| 830 | $! | 987 | $! |
| @@ -847,11 +1004,11 @@ $! Use GNU C... | |||
| 847 | $! | 1004 | $! |
| 848 | $ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC | 1005 | $ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC |
| 849 | $ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 1006 | $ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
| 850 | "/INCLUDE=(SYS$DISK:[-.CRYPTO],SYS$DISK:[-])" + CCEXTRAFLAGS | 1007 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 851 | $! | 1008 | $! |
| 852 | $! Define The Linker Options File Name. | 1009 | $! Define The Linker Options File Name. |
| 853 | $! | 1010 | $! |
| 854 | $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" | 1011 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
| 855 | $! | 1012 | $! |
| 856 | $! End The GNU C Check. | 1013 | $! End The GNU C Check. |
| 857 | $! | 1014 | $! |
| @@ -870,16 +1027,16 @@ $ THEN | |||
| 870 | $ CC4DISABLEWARNINGS = "DOLLARID" | 1027 | $ CC4DISABLEWARNINGS = "DOLLARID" |
| 871 | $ ELSE | 1028 | $ ELSE |
| 872 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" | 1029 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" |
| 873 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | 1030 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
| 874 | $ ENDIF | 1031 | $ ENDIF |
| 875 | $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" | 1032 | $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" |
| 876 | $ ELSE | 1033 | $ ELSE |
| 877 | $ CCDISABLEWARNINGS = "" | 1034 | $ CCDISABLEWARNINGS = "" |
| 878 | $ CC4DISABLEWARNINGS = "" | 1035 | $ CC4DISABLEWARNINGS = "" |
| 879 | $ ENDIF | 1036 | $ ENDIF |
| 880 | $ CC2 = CC + "/DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS | 1037 | $ CC2 = CC + " /DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS |
| 881 | $ CC3 = CC + "/DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS | 1038 | $ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS |
| 882 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 1039 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
| 883 | $ IF COMPILER .EQS. "DECC" | 1040 | $ IF COMPILER .EQS. "DECC" |
| 884 | $ THEN | 1041 | $ THEN |
| 885 | $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS | 1042 | $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS |
| @@ -925,7 +1082,7 @@ $ THEN | |||
| 925 | $! | 1082 | $! |
| 926 | $! Set the library to use SOCKETSHR | 1083 | $! Set the library to use SOCKETSHR |
| 927 | $! | 1084 | $! |
| 928 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" | 1085 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
| 929 | $! | 1086 | $! |
| 930 | $! Done with SOCKETSHR | 1087 | $! Done with SOCKETSHR |
| 931 | $! | 1088 | $! |
| @@ -951,13 +1108,13 @@ $ THEN | |||
| 951 | $! | 1108 | $! |
| 952 | $! Set the library to use UCX. | 1109 | $! Set the library to use UCX. |
| 953 | $! | 1110 | $! |
| 954 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" | 1111 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
| 955 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 1112 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
| 956 | $ THEN | 1113 | $ THEN |
| 957 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" | 1114 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
| 958 | $ ELSE | 1115 | $ ELSE |
| 959 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 1116 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
| 960 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT" | 1117 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
| 961 | $ ENDIF | 1118 | $ ENDIF |
| 962 | $! | 1119 | $! |
| 963 | $! Done with UCX | 1120 | $! Done with UCX |
| @@ -971,7 +1128,7 @@ $ THEN | |||
| 971 | $! | 1128 | $! |
| 972 | $! Set the library to use TCPIP (post UCX). | 1129 | $! Set the library to use TCPIP (post UCX). |
| 973 | $! | 1130 | $! |
| 974 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" | 1131 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
| 975 | $! | 1132 | $! |
| 976 | $! Done with TCPIP | 1133 | $! Done with TCPIP |
| 977 | $! | 1134 | $! |
| @@ -992,7 +1149,7 @@ $ ENDIF | |||
| 992 | $! | 1149 | $! |
| 993 | $! Print info | 1150 | $! Print info |
| 994 | $! | 1151 | $! |
| 995 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 1152 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
| 996 | $! | 1153 | $! |
| 997 | $! Else The User Entered An Invalid Argument. | 1154 | $! Else The User Entered An Invalid Argument. |
| 998 | $! | 1155 | $! |
diff --git a/src/lib/libssl/src/ssl/ssl_asn1.c b/src/lib/libssl/src/ssl/ssl_asn1.c index 28709978b5..d7f4c6087e 100644 --- a/src/lib/libssl/src/ssl/ssl_asn1.c +++ b/src/lib/libssl/src/ssl/ssl_asn1.c | |||
| @@ -357,7 +357,7 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp) | |||
| 357 | SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, | 357 | SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, |
| 358 | long length) | 358 | long length) |
| 359 | { | 359 | { |
| 360 | int version,ssl_version=0,i; | 360 | int ssl_version=0,i; |
| 361 | long id; | 361 | long id; |
| 362 | ASN1_INTEGER ai,*aip; | 362 | ASN1_INTEGER ai,*aip; |
| 363 | ASN1_OCTET_STRING os,*osp; | 363 | ASN1_OCTET_STRING os,*osp; |
| @@ -371,7 +371,6 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, | |||
| 371 | 371 | ||
| 372 | ai.data=NULL; ai.length=0; | 372 | ai.data=NULL; ai.length=0; |
| 373 | M_ASN1_D2I_get_x(ASN1_INTEGER,aip,d2i_ASN1_INTEGER); | 373 | M_ASN1_D2I_get_x(ASN1_INTEGER,aip,d2i_ASN1_INTEGER); |
| 374 | version=(int)ASN1_INTEGER_get(aip); | ||
| 375 | if (ai.data != NULL) { OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; } | 374 | if (ai.data != NULL) { OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; } |
| 376 | 375 | ||
| 377 | /* we don't care about the version right now :-) */ | 376 | /* we don't care about the version right now :-) */ |
diff --git a/src/lib/libssl/src/ssl/ssl_ciph.c b/src/lib/libssl/src/ssl/ssl_ciph.c index bee3507ea1..a8ce186b78 100644 --- a/src/lib/libssl/src/ssl/ssl_ciph.c +++ b/src/lib/libssl/src/ssl/ssl_ciph.c | |||
| @@ -1027,7 +1027,7 @@ static int ssl_cipher_process_rulestr(const char *rule_str, | |||
| 1027 | const SSL_CIPHER **ca_list) | 1027 | const SSL_CIPHER **ca_list) |
| 1028 | { | 1028 | { |
| 1029 | unsigned long alg_mkey, alg_auth, alg_enc, alg_mac, alg_ssl, algo_strength; | 1029 | unsigned long alg_mkey, alg_auth, alg_enc, alg_mac, alg_ssl, algo_strength; |
| 1030 | const char *l, *start, *buf; | 1030 | const char *l, *buf; |
| 1031 | int j, multi, found, rule, retval, ok, buflen; | 1031 | int j, multi, found, rule, retval, ok, buflen; |
| 1032 | unsigned long cipher_id = 0; | 1032 | unsigned long cipher_id = 0; |
| 1033 | char ch; | 1033 | char ch; |
| @@ -1064,7 +1064,6 @@ static int ssl_cipher_process_rulestr(const char *rule_str, | |||
| 1064 | alg_ssl = 0; | 1064 | alg_ssl = 0; |
| 1065 | algo_strength = 0; | 1065 | algo_strength = 0; |
| 1066 | 1066 | ||
| 1067 | start=l; | ||
| 1068 | for (;;) | 1067 | for (;;) |
| 1069 | { | 1068 | { |
| 1070 | ch = *l; | 1069 | ch = *l; |
| @@ -1456,7 +1455,7 @@ char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) | |||
| 1456 | int is_export,pkl,kl; | 1455 | int is_export,pkl,kl; |
| 1457 | const char *ver,*exp_str; | 1456 | const char *ver,*exp_str; |
| 1458 | const char *kx,*au,*enc,*mac; | 1457 | const char *kx,*au,*enc,*mac; |
| 1459 | unsigned long alg_mkey,alg_auth,alg_enc,alg_mac,alg_ssl,alg2,alg_s; | 1458 | unsigned long alg_mkey,alg_auth,alg_enc,alg_mac,alg_ssl,alg2; |
| 1460 | #ifdef KSSL_DEBUG | 1459 | #ifdef KSSL_DEBUG |
| 1461 | static const char *format="%-23s %s Kx=%-8s Au=%-4s Enc=%-9s Mac=%-4s%s AL=%lx/%lx/%lx/%lx/%lx\n"; | 1460 | static const char *format="%-23s %s Kx=%-8s Au=%-4s Enc=%-9s Mac=%-4s%s AL=%lx/%lx/%lx/%lx/%lx\n"; |
| 1462 | #else | 1461 | #else |
| @@ -1469,7 +1468,6 @@ char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) | |||
| 1469 | alg_mac = cipher->algorithm_mac; | 1468 | alg_mac = cipher->algorithm_mac; |
| 1470 | alg_ssl = cipher->algorithm_ssl; | 1469 | alg_ssl = cipher->algorithm_ssl; |
| 1471 | 1470 | ||
| 1472 | alg_s=cipher->algo_strength; | ||
| 1473 | alg2=cipher->algorithm2; | 1471 | alg2=cipher->algorithm2; |
| 1474 | 1472 | ||
| 1475 | is_export=SSL_C_IS_EXPORT(cipher); | 1473 | is_export=SSL_C_IS_EXPORT(cipher); |
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index 3157f20eac..46732791fd 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
| @@ -1833,7 +1833,7 @@ void ssl_set_cert_masks(CERT *c, const SSL_CIPHER *cipher) | |||
| 1833 | #endif | 1833 | #endif |
| 1834 | X509 *x = NULL; | 1834 | X509 *x = NULL; |
| 1835 | EVP_PKEY *ecc_pkey = NULL; | 1835 | EVP_PKEY *ecc_pkey = NULL; |
| 1836 | int signature_nid = 0; | 1836 | int signature_nid = 0, pk_nid = 0, md_nid = 0; |
| 1837 | 1837 | ||
| 1838 | if (c == NULL) return; | 1838 | if (c == NULL) return; |
| 1839 | 1839 | ||
| @@ -1963,18 +1963,15 @@ void ssl_set_cert_masks(CERT *c, const SSL_CIPHER *cipher) | |||
| 1963 | EVP_PKEY_bits(ecc_pkey) : 0; | 1963 | EVP_PKEY_bits(ecc_pkey) : 0; |
| 1964 | EVP_PKEY_free(ecc_pkey); | 1964 | EVP_PKEY_free(ecc_pkey); |
| 1965 | if ((x->sig_alg) && (x->sig_alg->algorithm)) | 1965 | if ((x->sig_alg) && (x->sig_alg->algorithm)) |
| 1966 | { | ||
| 1966 | signature_nid = OBJ_obj2nid(x->sig_alg->algorithm); | 1967 | signature_nid = OBJ_obj2nid(x->sig_alg->algorithm); |
| 1968 | OBJ_find_sigid_algs(signature_nid, &md_nid, &pk_nid); | ||
| 1969 | } | ||
| 1967 | #ifndef OPENSSL_NO_ECDH | 1970 | #ifndef OPENSSL_NO_ECDH |
| 1968 | if (ecdh_ok) | 1971 | if (ecdh_ok) |
| 1969 | { | 1972 | { |
| 1970 | const char *sig = OBJ_nid2ln(signature_nid); | 1973 | |
| 1971 | if (sig == NULL) | 1974 | if (pk_nid == NID_rsaEncryption || pk_nid == NID_rsa) |
| 1972 | { | ||
| 1973 | ERR_clear_error(); | ||
| 1974 | sig = "unknown"; | ||
| 1975 | } | ||
| 1976 | |||
| 1977 | if (strstr(sig, "WithRSA")) | ||
| 1978 | { | 1975 | { |
| 1979 | mask_k|=SSL_kECDHr; | 1976 | mask_k|=SSL_kECDHr; |
| 1980 | mask_a|=SSL_aECDH; | 1977 | mask_a|=SSL_aECDH; |
| @@ -1985,7 +1982,7 @@ void ssl_set_cert_masks(CERT *c, const SSL_CIPHER *cipher) | |||
| 1985 | } | 1982 | } |
| 1986 | } | 1983 | } |
| 1987 | 1984 | ||
| 1988 | if (signature_nid == NID_ecdsa_with_SHA1) | 1985 | if (pk_nid == NID_X9_62_id_ecPublicKey) |
| 1989 | { | 1986 | { |
| 1990 | mask_k|=SSL_kECDHe; | 1987 | mask_k|=SSL_kECDHe; |
| 1991 | mask_a|=SSL_aECDH; | 1988 | mask_a|=SSL_aECDH; |
| @@ -2039,7 +2036,7 @@ int ssl_check_srvr_ecc_cert_and_alg(X509 *x, const SSL_CIPHER *cs) | |||
| 2039 | unsigned long alg_k, alg_a; | 2036 | unsigned long alg_k, alg_a; |
| 2040 | EVP_PKEY *pkey = NULL; | 2037 | EVP_PKEY *pkey = NULL; |
| 2041 | int keysize = 0; | 2038 | int keysize = 0; |
| 2042 | int signature_nid = 0; | 2039 | int signature_nid = 0, md_nid = 0, pk_nid = 0; |
| 2043 | 2040 | ||
| 2044 | alg_k = cs->algorithm_mkey; | 2041 | alg_k = cs->algorithm_mkey; |
| 2045 | alg_a = cs->algorithm_auth; | 2042 | alg_a = cs->algorithm_auth; |
| @@ -2057,7 +2054,10 @@ int ssl_check_srvr_ecc_cert_and_alg(X509 *x, const SSL_CIPHER *cs) | |||
| 2057 | /* This call populates the ex_flags field correctly */ | 2054 | /* This call populates the ex_flags field correctly */ |
| 2058 | X509_check_purpose(x, -1, 0); | 2055 | X509_check_purpose(x, -1, 0); |
| 2059 | if ((x->sig_alg) && (x->sig_alg->algorithm)) | 2056 | if ((x->sig_alg) && (x->sig_alg->algorithm)) |
| 2057 | { | ||
| 2060 | signature_nid = OBJ_obj2nid(x->sig_alg->algorithm); | 2058 | signature_nid = OBJ_obj2nid(x->sig_alg->algorithm); |
| 2059 | OBJ_find_sigid_algs(signature_nid, &md_nid, &pk_nid); | ||
| 2060 | } | ||
| 2061 | if (alg_k & SSL_kECDHe || alg_k & SSL_kECDHr) | 2061 | if (alg_k & SSL_kECDHe || alg_k & SSL_kECDHr) |
| 2062 | { | 2062 | { |
| 2063 | /* key usage, if present, must allow key agreement */ | 2063 | /* key usage, if present, must allow key agreement */ |
| @@ -2069,7 +2069,7 @@ int ssl_check_srvr_ecc_cert_and_alg(X509 *x, const SSL_CIPHER *cs) | |||
| 2069 | if (alg_k & SSL_kECDHe) | 2069 | if (alg_k & SSL_kECDHe) |
| 2070 | { | 2070 | { |
| 2071 | /* signature alg must be ECDSA */ | 2071 | /* signature alg must be ECDSA */ |
| 2072 | if (signature_nid != NID_ecdsa_with_SHA1) | 2072 | if (pk_nid != NID_X9_62_id_ecPublicKey) |
| 2073 | { | 2073 | { |
| 2074 | SSLerr(SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG, SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE); | 2074 | SSLerr(SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG, SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE); |
| 2075 | return 0; | 2075 | return 0; |
| @@ -2079,13 +2079,7 @@ int ssl_check_srvr_ecc_cert_and_alg(X509 *x, const SSL_CIPHER *cs) | |||
| 2079 | { | 2079 | { |
| 2080 | /* signature alg must be RSA */ | 2080 | /* signature alg must be RSA */ |
| 2081 | 2081 | ||
| 2082 | const char *sig = OBJ_nid2ln(signature_nid); | 2082 | if (pk_nid != NID_rsaEncryption && pk_nid != NID_rsa) |
| 2083 | if (sig == NULL) | ||
| 2084 | { | ||
| 2085 | ERR_clear_error(); | ||
| 2086 | sig = "unknown"; | ||
| 2087 | } | ||
| 2088 | if (strstr(sig, "WithRSA") == NULL) | ||
| 2089 | { | 2083 | { |
| 2090 | SSLerr(SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG, SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE); | 2084 | SSLerr(SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG, SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE); |
| 2091 | return 0; | 2085 | return 0; |
| @@ -2110,23 +2104,12 @@ int ssl_check_srvr_ecc_cert_and_alg(X509 *x, const SSL_CIPHER *cs) | |||
| 2110 | /* THIS NEEDS CLEANING UP */ | 2104 | /* THIS NEEDS CLEANING UP */ |
| 2111 | X509 *ssl_get_server_send_cert(SSL *s) | 2105 | X509 *ssl_get_server_send_cert(SSL *s) |
| 2112 | { | 2106 | { |
| 2113 | unsigned long alg_k,alg_a,mask_k,mask_a; | 2107 | unsigned long alg_k,alg_a; |
| 2114 | CERT *c; | 2108 | CERT *c; |
| 2115 | int i,is_export; | 2109 | int i; |
| 2116 | 2110 | ||
| 2117 | c=s->cert; | 2111 | c=s->cert; |
| 2118 | ssl_set_cert_masks(c, s->s3->tmp.new_cipher); | 2112 | ssl_set_cert_masks(c, s->s3->tmp.new_cipher); |
| 2119 | is_export=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher); | ||
| 2120 | if (is_export) | ||
| 2121 | { | ||
| 2122 | mask_k = c->export_mask_k; | ||
| 2123 | mask_a = c->export_mask_a; | ||
| 2124 | } | ||
| 2125 | else | ||
| 2126 | { | ||
| 2127 | mask_k = c->mask_k; | ||
| 2128 | mask_a = c->mask_a; | ||
| 2129 | } | ||
| 2130 | 2113 | ||
| 2131 | alg_k = s->s3->tmp.new_cipher->algorithm_mkey; | 2114 | alg_k = s->s3->tmp.new_cipher->algorithm_mkey; |
| 2132 | alg_a = s->s3->tmp.new_cipher->algorithm_auth; | 2115 | alg_a = s->s3->tmp.new_cipher->algorithm_auth; |
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c index abf214ad7f..0bb4fa43bd 100644 --- a/src/lib/libssl/src/ssl/ssltest.c +++ b/src/lib/libssl/src/ssl/ssltest.c | |||
| @@ -1430,7 +1430,6 @@ int doit(SSL *s_ssl, SSL *c_ssl, long count) | |||
| 1430 | BIO *c_bio=NULL; | 1430 | BIO *c_bio=NULL; |
| 1431 | BIO *s_bio=NULL; | 1431 | BIO *s_bio=NULL; |
| 1432 | int c_r,c_w,s_r,s_w; | 1432 | int c_r,c_w,s_r,s_w; |
| 1433 | int c_want,s_want; | ||
| 1434 | int i,j; | 1433 | int i,j; |
| 1435 | int done=0; | 1434 | int done=0; |
| 1436 | int c_write,s_write; | 1435 | int c_write,s_write; |
| @@ -1465,8 +1464,6 @@ int doit(SSL *s_ssl, SSL *c_ssl, long count) | |||
| 1465 | 1464 | ||
| 1466 | c_r=0; s_r=1; | 1465 | c_r=0; s_r=1; |
| 1467 | c_w=1; s_w=0; | 1466 | c_w=1; s_w=0; |
| 1468 | c_want=W_WRITE; | ||
| 1469 | s_want=0; | ||
| 1470 | c_write=1,s_write=0; | 1467 | c_write=1,s_write=0; |
| 1471 | 1468 | ||
| 1472 | /* We can always do writes */ | 1469 | /* We can always do writes */ |
diff --git a/src/lib/libssl/src/ssl/t1_enc.c b/src/lib/libssl/src/ssl/t1_enc.c index 9719541f2b..793ea43e90 100644 --- a/src/lib/libssl/src/ssl/t1_enc.c +++ b/src/lib/libssl/src/ssl/t1_enc.c | |||
| @@ -157,7 +157,7 @@ static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec, | |||
| 157 | const void *seed5, int seed5_len, | 157 | const void *seed5, int seed5_len, |
| 158 | unsigned char *out, int olen) | 158 | unsigned char *out, int olen) |
| 159 | { | 159 | { |
| 160 | int chunk,n; | 160 | int chunk; |
| 161 | unsigned int j; | 161 | unsigned int j; |
| 162 | HMAC_CTX ctx; | 162 | HMAC_CTX ctx; |
| 163 | HMAC_CTX ctx_tmp; | 163 | HMAC_CTX ctx_tmp; |
| @@ -187,7 +187,6 @@ static int tls1_P_hash(const EVP_MD *md, const unsigned char *sec, | |||
| 187 | if (!HMAC_Final(&ctx,A1,&A1_len)) | 187 | if (!HMAC_Final(&ctx,A1,&A1_len)) |
| 188 | goto err; | 188 | goto err; |
| 189 | 189 | ||
| 190 | n=0; | ||
| 191 | for (;;) | 190 | for (;;) |
| 192 | { | 191 | { |
| 193 | if (!HMAC_Init_ex(&ctx,NULL,0,NULL,NULL)) /* re-init */ | 192 | if (!HMAC_Init_ex(&ctx,NULL,0,NULL,NULL)) /* re-init */ |
| @@ -309,13 +308,13 @@ static int tls1_generate_key_block(SSL *s, unsigned char *km, | |||
| 309 | int tls1_change_cipher_state(SSL *s, int which) | 308 | int tls1_change_cipher_state(SSL *s, int which) |
| 310 | { | 309 | { |
| 311 | static const unsigned char empty[]=""; | 310 | static const unsigned char empty[]=""; |
| 312 | unsigned char *p,*key_block,*mac_secret; | 311 | unsigned char *p,*mac_secret; |
| 313 | unsigned char *exp_label; | 312 | unsigned char *exp_label; |
| 314 | unsigned char tmp1[EVP_MAX_KEY_LENGTH]; | 313 | unsigned char tmp1[EVP_MAX_KEY_LENGTH]; |
| 315 | unsigned char tmp2[EVP_MAX_KEY_LENGTH]; | 314 | unsigned char tmp2[EVP_MAX_KEY_LENGTH]; |
| 316 | unsigned char iv1[EVP_MAX_IV_LENGTH*2]; | 315 | unsigned char iv1[EVP_MAX_IV_LENGTH*2]; |
| 317 | unsigned char iv2[EVP_MAX_IV_LENGTH*2]; | 316 | unsigned char iv2[EVP_MAX_IV_LENGTH*2]; |
| 318 | unsigned char *ms,*key,*iv,*er1,*er2; | 317 | unsigned char *ms,*key,*iv; |
| 319 | int client_write; | 318 | int client_write; |
| 320 | EVP_CIPHER_CTX *dd; | 319 | EVP_CIPHER_CTX *dd; |
| 321 | const EVP_CIPHER *c; | 320 | const EVP_CIPHER *c; |
| @@ -337,7 +336,6 @@ int tls1_change_cipher_state(SSL *s, int which) | |||
| 337 | #ifndef OPENSSL_NO_COMP | 336 | #ifndef OPENSSL_NO_COMP |
| 338 | comp=s->s3->tmp.new_compression; | 337 | comp=s->s3->tmp.new_compression; |
| 339 | #endif | 338 | #endif |
| 340 | key_block=s->s3->tmp.key_block; | ||
| 341 | 339 | ||
| 342 | #ifdef KSSL_DEBUG | 340 | #ifdef KSSL_DEBUG |
| 343 | printf("tls1_change_cipher_state(which= %d) w/\n", which); | 341 | printf("tls1_change_cipher_state(which= %d) w/\n", which); |
| @@ -448,8 +446,6 @@ int tls1_change_cipher_state(SSL *s, int which) | |||
| 448 | cl : SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher)) : cl; | 446 | cl : SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher)) : cl; |
| 449 | /* Was j=(exp)?5:EVP_CIPHER_key_length(c); */ | 447 | /* Was j=(exp)?5:EVP_CIPHER_key_length(c); */ |
| 450 | k=EVP_CIPHER_iv_length(c); | 448 | k=EVP_CIPHER_iv_length(c); |
| 451 | er1= &(s->s3->client_random[0]); | ||
| 452 | er2= &(s->s3->server_random[0]); | ||
| 453 | if ( (which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) || | 449 | if ( (which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) || |
| 454 | (which == SSL3_CHANGE_CIPHER_SERVER_READ)) | 450 | (which == SSL3_CHANGE_CIPHER_SERVER_READ)) |
| 455 | { | 451 | { |
| @@ -880,7 +876,7 @@ int tls1_final_finish_mac(SSL *s, | |||
| 880 | int tls1_mac(SSL *ssl, unsigned char *md, int send) | 876 | int tls1_mac(SSL *ssl, unsigned char *md, int send) |
| 881 | { | 877 | { |
| 882 | SSL3_RECORD *rec; | 878 | SSL3_RECORD *rec; |
| 883 | unsigned char *mac_sec,*seq; | 879 | unsigned char *seq; |
| 884 | EVP_MD_CTX *hash; | 880 | EVP_MD_CTX *hash; |
| 885 | size_t md_size; | 881 | size_t md_size; |
| 886 | int i; | 882 | int i; |
| @@ -892,14 +888,12 @@ int tls1_mac(SSL *ssl, unsigned char *md, int send) | |||
| 892 | if (send) | 888 | if (send) |
| 893 | { | 889 | { |
| 894 | rec= &(ssl->s3->wrec); | 890 | rec= &(ssl->s3->wrec); |
| 895 | mac_sec= &(ssl->s3->write_mac_secret[0]); | ||
| 896 | seq= &(ssl->s3->write_sequence[0]); | 891 | seq= &(ssl->s3->write_sequence[0]); |
| 897 | hash=ssl->write_hash; | 892 | hash=ssl->write_hash; |
| 898 | } | 893 | } |
| 899 | else | 894 | else |
| 900 | { | 895 | { |
| 901 | rec= &(ssl->s3->rrec); | 896 | rec= &(ssl->s3->rrec); |
| 902 | mac_sec= &(ssl->s3->read_mac_secret[0]); | ||
| 903 | seq= &(ssl->s3->read_sequence[0]); | 897 | seq= &(ssl->s3->read_sequence[0]); |
| 904 | hash=ssl->read_hash; | 898 | hash=ssl->read_hash; |
| 905 | } | 899 | } |
diff --git a/src/lib/libssl/src/ssl/t1_lib.c b/src/lib/libssl/src/ssl/t1_lib.c index e8bc34c111..85371c87b8 100644 --- a/src/lib/libssl/src/ssl/t1_lib.c +++ b/src/lib/libssl/src/ssl/t1_lib.c | |||
| @@ -714,14 +714,23 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in | |||
| 714 | switch (servname_type) | 714 | switch (servname_type) |
| 715 | { | 715 | { |
| 716 | case TLSEXT_NAMETYPE_host_name: | 716 | case TLSEXT_NAMETYPE_host_name: |
| 717 | if (s->session->tlsext_hostname == NULL) | 717 | if (!s->hit) |
| 718 | { | 718 | { |
| 719 | if (len > TLSEXT_MAXLEN_host_name || | 719 | if(s->session->tlsext_hostname) |
| 720 | ((s->session->tlsext_hostname = OPENSSL_malloc(len+1)) == NULL)) | 720 | { |
| 721 | *al = SSL_AD_DECODE_ERROR; | ||
| 722 | return 0; | ||
| 723 | } | ||
| 724 | if (len > TLSEXT_MAXLEN_host_name) | ||
| 721 | { | 725 | { |
| 722 | *al = TLS1_AD_UNRECOGNIZED_NAME; | 726 | *al = TLS1_AD_UNRECOGNIZED_NAME; |
| 723 | return 0; | 727 | return 0; |
| 724 | } | 728 | } |
| 729 | if ((s->session->tlsext_hostname = OPENSSL_malloc(len+1)) == NULL) | ||
| 730 | { | ||
| 731 | *al = TLS1_AD_INTERNAL_ERROR; | ||
| 732 | return 0; | ||
| 733 | } | ||
| 725 | memcpy(s->session->tlsext_hostname, sdata, len); | 734 | memcpy(s->session->tlsext_hostname, sdata, len); |
| 726 | s->session->tlsext_hostname[len]='\0'; | 735 | s->session->tlsext_hostname[len]='\0'; |
| 727 | if (strlen(s->session->tlsext_hostname) != len) { | 736 | if (strlen(s->session->tlsext_hostname) != len) { |
| @@ -734,7 +743,8 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in | |||
| 734 | 743 | ||
| 735 | } | 744 | } |
| 736 | else | 745 | else |
| 737 | s->servername_done = strlen(s->session->tlsext_hostname) == len | 746 | s->servername_done = s->session->tlsext_hostname |
| 747 | && strlen(s->session->tlsext_hostname) == len | ||
| 738 | && strncmp(s->session->tlsext_hostname, (char *)sdata, len) == 0; | 748 | && strncmp(s->session->tlsext_hostname, (char *)sdata, len) == 0; |
| 739 | 749 | ||
| 740 | break; | 750 | break; |
| @@ -765,15 +775,22 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in | |||
| 765 | *al = TLS1_AD_DECODE_ERROR; | 775 | *al = TLS1_AD_DECODE_ERROR; |
| 766 | return 0; | 776 | return 0; |
| 767 | } | 777 | } |
| 768 | s->session->tlsext_ecpointformatlist_length = 0; | 778 | if (!s->hit) |
| 769 | if (s->session->tlsext_ecpointformatlist != NULL) OPENSSL_free(s->session->tlsext_ecpointformatlist); | ||
| 770 | if ((s->session->tlsext_ecpointformatlist = OPENSSL_malloc(ecpointformatlist_length)) == NULL) | ||
| 771 | { | 779 | { |
| 772 | *al = TLS1_AD_INTERNAL_ERROR; | 780 | if(s->session->tlsext_ecpointformatlist) |
| 773 | return 0; | 781 | { |
| 782 | OPENSSL_free(s->session->tlsext_ecpointformatlist); | ||
| 783 | s->session->tlsext_ecpointformatlist = NULL; | ||
| 784 | } | ||
| 785 | s->session->tlsext_ecpointformatlist_length = 0; | ||
| 786 | if ((s->session->tlsext_ecpointformatlist = OPENSSL_malloc(ecpointformatlist_length)) == NULL) | ||
| 787 | { | ||
| 788 | *al = TLS1_AD_INTERNAL_ERROR; | ||
| 789 | return 0; | ||
| 790 | } | ||
| 791 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; | ||
| 792 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); | ||
| 774 | } | 793 | } |
| 775 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; | ||
| 776 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); | ||
| 777 | #if 0 | 794 | #if 0 |
| 778 | fprintf(stderr,"ssl_parse_clienthello_tlsext s->session->tlsext_ecpointformatlist (length=%i) ", s->session->tlsext_ecpointformatlist_length); | 795 | fprintf(stderr,"ssl_parse_clienthello_tlsext s->session->tlsext_ecpointformatlist (length=%i) ", s->session->tlsext_ecpointformatlist_length); |
| 779 | sdata = s->session->tlsext_ecpointformatlist; | 796 | sdata = s->session->tlsext_ecpointformatlist; |
| @@ -794,15 +811,22 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in | |||
| 794 | *al = TLS1_AD_DECODE_ERROR; | 811 | *al = TLS1_AD_DECODE_ERROR; |
| 795 | return 0; | 812 | return 0; |
| 796 | } | 813 | } |
| 797 | s->session->tlsext_ellipticcurvelist_length = 0; | 814 | if (!s->hit) |
| 798 | if (s->session->tlsext_ellipticcurvelist != NULL) OPENSSL_free(s->session->tlsext_ellipticcurvelist); | ||
| 799 | if ((s->session->tlsext_ellipticcurvelist = OPENSSL_malloc(ellipticcurvelist_length)) == NULL) | ||
| 800 | { | 815 | { |
| 801 | *al = TLS1_AD_INTERNAL_ERROR; | 816 | if(s->session->tlsext_ellipticcurvelist) |
| 802 | return 0; | 817 | { |
| 818 | *al = TLS1_AD_DECODE_ERROR; | ||
| 819 | return 0; | ||
| 820 | } | ||
| 821 | s->session->tlsext_ellipticcurvelist_length = 0; | ||
| 822 | if ((s->session->tlsext_ellipticcurvelist = OPENSSL_malloc(ellipticcurvelist_length)) == NULL) | ||
| 823 | { | ||
| 824 | *al = TLS1_AD_INTERNAL_ERROR; | ||
| 825 | return 0; | ||
| 826 | } | ||
| 827 | s->session->tlsext_ellipticcurvelist_length = ellipticcurvelist_length; | ||
| 828 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); | ||
| 803 | } | 829 | } |
| 804 | s->session->tlsext_ellipticcurvelist_length = ellipticcurvelist_length; | ||
| 805 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); | ||
| 806 | #if 0 | 830 | #if 0 |
| 807 | fprintf(stderr,"ssl_parse_clienthello_tlsext s->session->tlsext_ellipticcurvelist (length=%i) ", s->session->tlsext_ellipticcurvelist_length); | 831 | fprintf(stderr,"ssl_parse_clienthello_tlsext s->session->tlsext_ellipticcurvelist (length=%i) ", s->session->tlsext_ellipticcurvelist_length); |
| 808 | sdata = s->session->tlsext_ellipticcurvelist; | 832 | sdata = s->session->tlsext_ellipticcurvelist; |
| @@ -893,6 +917,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in | |||
| 893 | } | 917 | } |
| 894 | n2s(data, idsize); | 918 | n2s(data, idsize); |
| 895 | dsize -= 2 + idsize; | 919 | dsize -= 2 + idsize; |
| 920 | size -= 2 + idsize; | ||
| 896 | if (dsize < 0) | 921 | if (dsize < 0) |
| 897 | { | 922 | { |
| 898 | *al = SSL_AD_DECODE_ERROR; | 923 | *al = SSL_AD_DECODE_ERROR; |
| @@ -931,9 +956,14 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in | |||
| 931 | } | 956 | } |
| 932 | 957 | ||
| 933 | /* Read in request_extensions */ | 958 | /* Read in request_extensions */ |
| 959 | if (size < 2) | ||
| 960 | { | ||
| 961 | *al = SSL_AD_DECODE_ERROR; | ||
| 962 | return 0; | ||
| 963 | } | ||
| 934 | n2s(data,dsize); | 964 | n2s(data,dsize); |
| 935 | size -= 2; | 965 | size -= 2; |
| 936 | if (dsize > size) | 966 | if (dsize != size) |
| 937 | { | 967 | { |
| 938 | *al = SSL_AD_DECODE_ERROR; | 968 | *al = SSL_AD_DECODE_ERROR; |
| 939 | return 0; | 969 | return 0; |
| @@ -983,9 +1013,9 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in | |||
| 983 | 1013 | ||
| 984 | int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n, int *al) | 1014 | int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n, int *al) |
| 985 | { | 1015 | { |
| 1016 | unsigned short length; | ||
| 986 | unsigned short type; | 1017 | unsigned short type; |
| 987 | unsigned short size; | 1018 | unsigned short size; |
| 988 | unsigned short len; | ||
| 989 | unsigned char *data = *p; | 1019 | unsigned char *data = *p; |
| 990 | int tlsext_servername = 0; | 1020 | int tlsext_servername = 0; |
| 991 | int renegotiate_seen = 0; | 1021 | int renegotiate_seen = 0; |
| @@ -993,7 +1023,12 @@ int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in | |||
| 993 | if (data >= (d+n-2)) | 1023 | if (data >= (d+n-2)) |
| 994 | goto ri_check; | 1024 | goto ri_check; |
| 995 | 1025 | ||
| 996 | n2s(data,len); | 1026 | n2s(data,length); |
| 1027 | if (data+length != d+n) | ||
| 1028 | { | ||
| 1029 | *al = SSL_AD_DECODE_ERROR; | ||
| 1030 | return 0; | ||
| 1031 | } | ||
| 997 | 1032 | ||
| 998 | while(data <= (d+n-4)) | 1033 | while(data <= (d+n-4)) |
| 999 | { | 1034 | { |
| @@ -1423,23 +1458,20 @@ int ssl_check_serverhello_tlsext(SSL *s) | |||
| 1423 | int al = SSL_AD_UNRECOGNIZED_NAME; | 1458 | int al = SSL_AD_UNRECOGNIZED_NAME; |
| 1424 | 1459 | ||
| 1425 | #ifndef OPENSSL_NO_EC | 1460 | #ifndef OPENSSL_NO_EC |
| 1426 | /* If we are client and using an elliptic curve cryptography cipher suite, then server | 1461 | /* If we are client and using an elliptic curve cryptography cipher |
| 1427 | * must return a an EC point formats lists containing uncompressed. | 1462 | * suite, then if server returns an EC point formats lists extension |
| 1463 | * it must contain uncompressed. | ||
| 1428 | */ | 1464 | */ |
| 1429 | unsigned long alg_k = s->s3->tmp.new_cipher->algorithm_mkey; | 1465 | unsigned long alg_k = s->s3->tmp.new_cipher->algorithm_mkey; |
| 1430 | unsigned long alg_a = s->s3->tmp.new_cipher->algorithm_auth; | 1466 | unsigned long alg_a = s->s3->tmp.new_cipher->algorithm_auth; |
| 1431 | if ((s->tlsext_ecpointformatlist != NULL) && (s->tlsext_ecpointformatlist_length > 0) && | 1467 | if ((s->tlsext_ecpointformatlist != NULL) && (s->tlsext_ecpointformatlist_length > 0) && |
| 1468 | (s->session->tlsext_ecpointformatlist != NULL) && (s->session->tlsext_ecpointformatlist_length > 0) && | ||
| 1432 | ((alg_k & (SSL_kEECDH|SSL_kECDHr|SSL_kECDHe)) || (alg_a & SSL_aECDSA))) | 1469 | ((alg_k & (SSL_kEECDH|SSL_kECDHr|SSL_kECDHe)) || (alg_a & SSL_aECDSA))) |
| 1433 | { | 1470 | { |
| 1434 | /* we are using an ECC cipher */ | 1471 | /* we are using an ECC cipher */ |
| 1435 | size_t i; | 1472 | size_t i; |
| 1436 | unsigned char *list; | 1473 | unsigned char *list; |
| 1437 | int found_uncompressed = 0; | 1474 | int found_uncompressed = 0; |
| 1438 | if ((s->session->tlsext_ecpointformatlist == NULL) || (s->session->tlsext_ecpointformatlist_length == 0)) | ||
| 1439 | { | ||
| 1440 | SSLerr(SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT,SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST); | ||
| 1441 | return -1; | ||
| 1442 | } | ||
| 1443 | list = s->session->tlsext_ecpointformatlist; | 1475 | list = s->session->tlsext_ecpointformatlist; |
| 1444 | for (i = 0; i < s->session->tlsext_ecpointformatlist_length; i++) | 1476 | for (i = 0; i < s->session->tlsext_ecpointformatlist_length; i++) |
| 1445 | { | 1477 | { |
diff --git a/src/lib/libssl/src/test/bctest.com b/src/lib/libssl/src/test/bctest.com new file mode 100644 index 0000000000..d7e5ec139e --- /dev/null +++ b/src/lib/libssl/src/test/bctest.com | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | $! | ||
| 2 | $! Check operation of "bc". | ||
| 3 | $! | ||
| 4 | $! 2010-04-05 SMS. New. Based (loosely) on "bctest". | ||
| 5 | $! | ||
| 6 | $! | ||
| 7 | $ tmp_file_name = "tmp.bctest" | ||
| 8 | $ failure = "" | ||
| 9 | $! | ||
| 10 | $! Basic command test. | ||
| 11 | $! | ||
| 12 | $ on warning then goto bc_fail | ||
| 13 | $ bc | ||
| 14 | $ on error then exit | ||
| 15 | $! | ||
| 16 | $! Test for SunOS 5.[78] bc bug. | ||
| 17 | $! | ||
| 18 | $ if (failure .eqs. "") | ||
| 19 | $ then | ||
| 20 | $! | ||
| 21 | $ define /user_mode sys$output 'tmp_file_name' | ||
| 22 | $ bc | ||
| 23 | obase=16 | ||
| 24 | ibase=16 | ||
| 25 | a=AD88C418F31B3FC712D0425001D522B3AE9134FF3A98C13C1FCC1682211195406C1A6C66C6A\ | ||
| 26 | CEEC1A0EC16950233F77F1C2F2363D56DD71A36C57E0B2511FC4BA8F22D261FE2E9356D99AF57\ | ||
| 27 | 10F3817C0E05BF79C423C3F66FDF321BE8D3F18F625D91B670931C1EF25F28E489BDA1C5422D1\ | ||
| 28 | C3F6F7A1AD21585746ECC4F10A14A778AF56F08898E965E9909E965E0CB6F85B514150C644759\ | ||
| 29 | 3BE731877B16EA07B552088FF2EA728AC5E0FF3A23EB939304519AB8B60F2C33D6BA0945B66F0\ | ||
| 30 | 4FC3CADF855448B24A9D7640BCF473E | ||
| 31 | b=DCE91E7D120B983EA9A104B5A96D634DD644C37657B1C7860B45E6838999B3DCE5A555583C6\ | ||
| 32 | 9209E41F413422954175A06E67FFEF6746DD652F0F48AEFECC3D8CAC13523BDAAD3F5AF4212BD\ | ||
| 33 | 8B3CD64126E1A82E190228020C05B91C8B141F1110086FC2A4C6ED631EBA129D04BB9A19FC53D\ | ||
| 34 | 3ED0E2017D60A68775B75481449 | ||
| 35 | (a/b)*b + (a%b) - a | ||
| 36 | $ status = $status | ||
| 37 | $ output_expected = "0" | ||
| 38 | $ gosub check_output | ||
| 39 | $ if (output .ne. 1) | ||
| 40 | $ then | ||
| 41 | $ failure = "SunOStest" | ||
| 42 | $ else | ||
| 43 | $ delete 'f$parse( tmp_file_name)' | ||
| 44 | $ endif | ||
| 45 | $ endif | ||
| 46 | $! | ||
| 47 | $! Test for SCO bc bug. | ||
| 48 | $! | ||
| 49 | $ if (failure .eqs. "") | ||
| 50 | $ then | ||
| 51 | $! | ||
| 52 | $ define /user_mode sys$output 'tmp_file_name' | ||
| 53 | $ bc | ||
| 54 | obase=16 | ||
| 55 | ibase=16 | ||
| 56 | -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4AEC6F15AC177F176F2274D2\ | ||
| 57 | 9DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7F5ADFACEE54573F5D256A06\ | ||
| 58 | 11B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99FB9812A0E4A5773D8B254117\ | ||
| 59 | 1239157EC6E3D8D50199 * -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4\ | ||
| 60 | AEC6F15AC177F176F2274D29DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7\ | ||
| 61 | F5ADFACEE54573F5D256A0611B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99F\ | ||
| 62 | B9812A0E4A5773D8B2541171239157EC6E3D8D50199 - FFBACC221682DA464B6D7F123482522\ | ||
| 63 | 02EDAEDCA38C3B69E9B7BBCD6165A9CD8716C4903417F23C09A85B851961F92C217258CEEB866\ | ||
| 64 | 85EFCC5DD131853A02C07A873B8E2AF2E40C6D5ED598CD0E8F35AD49F3C3A17FDB7653E4E2DC4\ | ||
| 65 | A8D23CC34686EE4AD01F7407A7CD74429AC6D36DBF0CB6A3E302D0E5BDFCD048A3B90C1BE5AA8\ | ||
| 66 | E16C3D5884F9136B43FF7BB443764153D4AEC176C681B078F4CC53D6EB6AB76285537DDEE7C18\ | ||
| 67 | 8C72441B52EDBDDBC77E02D34E513F2AABF92F44109CAFE8242BD0ECBAC5604A94B02EA44D43C\ | ||
| 68 | 04E9476E6FBC48043916BFA1485C6093603600273C9C33F13114D78064AE42F3DC466C7DA543D\ | ||
| 69 | 89C8D71 | ||
| 70 | AD534AFBED2FA39EE9F40E20FCF9E2C861024DB98DDCBA1CD118C49CA55EEBC20D6BA51B2271C\ | ||
| 71 | 928B693D6A73F67FEB1B4571448588B46194617D25D910C6A9A130CC963155CF34079CB218A44\ | ||
| 72 | 8A1F57E276D92A33386DDCA3D241DB78C8974ABD71DD05B0FA555709C9910D745185E6FE108E3\ | ||
| 73 | 37F1907D0C56F8BFBF52B9704 % -E557905B56B13441574CAFCE2BD257A750B1A8B2C88D0E36\ | ||
| 74 | E18EF7C38DAC80D3948E17ED63AFF3B3467866E3B89D09A81B3D16B52F6A3C7134D3C6F5123E9\ | ||
| 75 | F617E3145BBFBE9AFD0D6E437EA4FF6F04BC67C4F1458B4F0F47B64 - 1C2BBBB19B74E86FD32\ | ||
| 76 | 9E8DB6A8C3B1B9986D57ED5419C2E855F7D5469E35E76334BB42F4C43E3F3A31B9697C171DAC4\ | ||
| 77 | D97935A7E1A14AD209D6CF811F55C6DB83AA9E6DFECFCD6669DED7171EE22A40C6181615CAF3F\ | ||
| 78 | 5296964 | ||
| 79 | $ status = $status | ||
| 80 | $ output_expected = "0\0" | ||
| 81 | $ gosub check_output | ||
| 82 | $ if (output .ne. 1) | ||
| 83 | $ then | ||
| 84 | $ failure = "SCOtest" | ||
| 85 | $ else | ||
| 86 | $ delete 'f$parse( tmp_file_name)' | ||
| 87 | $ endif | ||
| 88 | $ endif | ||
| 89 | $! | ||
| 90 | $! Test for working 'print' command. | ||
| 91 | $! | ||
| 92 | $ if (failure .eqs. "") | ||
| 93 | $ then | ||
| 94 | $! | ||
| 95 | $ define /user_mode sys$output 'tmp_file_name' | ||
| 96 | $ bc | ||
| 97 | print "OK" | ||
| 98 | $ status = $status | ||
| 99 | $ output_expected = "OK" | ||
| 100 | $ gosub check_output | ||
| 101 | $ if (output .ne. 1) | ||
| 102 | $ then | ||
| 103 | $ failure = "printtest" | ||
| 104 | $ else | ||
| 105 | $ delete 'f$parse( tmp_file_name)' | ||
| 106 | $ endif | ||
| 107 | $ endif | ||
| 108 | $! | ||
| 109 | $ if (failure .nes. "") | ||
| 110 | $ then | ||
| 111 | $ write sys$output - | ||
| 112 | "No working bc found. Consider installing GNU bc." | ||
| 113 | $ exit %X00030000 ! %DCL-W-NORMAL | ||
| 114 | $ endif | ||
| 115 | $! | ||
| 116 | $ exit | ||
| 117 | $! | ||
| 118 | $! | ||
| 119 | $! Complete "bc" command failure. | ||
| 120 | $! | ||
| 121 | $ bc_fail: | ||
| 122 | $ write sys$output - | ||
| 123 | "No ""bc"" program/symbol found. Consider installing GNU bc." | ||
| 124 | $ exit %X00030000 ! %DCL-W-NORMAL | ||
| 125 | $! | ||
| 126 | $! | ||
| 127 | $! Output check subroutine. | ||
| 128 | $! | ||
| 129 | $ check_output: | ||
| 130 | $ eof = 0 | ||
| 131 | $ line_nr = 0 | ||
| 132 | $ open /read tmp_file 'tmp_file_name' | ||
| 133 | $ c_o_loop: | ||
| 134 | $ read /error = error_read tmp_file line | ||
| 135 | $ goto ok_read | ||
| 136 | $ error_read: | ||
| 137 | $ eof = 1 | ||
| 138 | $ ok_read: | ||
| 139 | $ line_expected = f$element( line_nr, "\", output_expected) | ||
| 140 | $ line_nr = line_nr+ 1 | ||
| 141 | $ if ((line_expected .nes. "\") .and. (.not. eof) .and. - | ||
| 142 | (line_expected .eqs. line)) then goto c_o_loop | ||
| 143 | $! | ||
| 144 | $ if ((line_expected .eqs. "\") .and. eof) | ||
| 145 | $ then | ||
| 146 | $ output = 1 | ||
| 147 | $ else | ||
| 148 | $ output = 0 | ||
| 149 | $ endif | ||
| 150 | $ close tmp_file | ||
| 151 | $ return | ||
| 152 | $! | ||
diff --git a/src/lib/libssl/src/test/bntest.com b/src/lib/libssl/src/test/bntest.com new file mode 100644 index 0000000000..6545d2e5a5 --- /dev/null +++ b/src/lib/libssl/src/test/bntest.com | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | $! | ||
| 2 | $! Analyze bntest output file. | ||
| 3 | $! | ||
| 4 | $! Exit status = 1 (success) if all tests passed, | ||
| 5 | $! 0 (warning) if any test failed. | ||
| 6 | $! | ||
| 7 | $! 2011-02-20 SMS. Added code to skip "#" comments in the input file. | ||
| 8 | $! | ||
| 9 | $! 2010-04-05 SMS. New. Based (loosely) on perl code in bntest-vms.sh. | ||
| 10 | $! | ||
| 11 | $! Expect data like: | ||
| 12 | $! test test_name1 | ||
| 13 | $! 0 | ||
| 14 | $! [...] | ||
| 15 | $! test test_name2 | ||
| 16 | $! 0 | ||
| 17 | $! [...] | ||
| 18 | $! [...] | ||
| 19 | $! | ||
| 20 | $! Some tests have no following "0" lines. | ||
| 21 | $! | ||
| 22 | $ result_file_name = f$edit( p1, "TRIM") | ||
| 23 | $ if (result_file_name .eqs. "") | ||
| 24 | $ then | ||
| 25 | $ result_file_name = "bntest-vms.out" | ||
| 26 | $ endif | ||
| 27 | $! | ||
| 28 | $ fail = 0 | ||
| 29 | $ passed = 0 | ||
| 30 | $ tests = 0 | ||
| 31 | $! | ||
| 32 | $ on control_c then goto tidy | ||
| 33 | $ on error then goto tidy | ||
| 34 | $! | ||
| 35 | $ open /read result_file 'result_file_name' | ||
| 36 | $! | ||
| 37 | $ read_loop: | ||
| 38 | $ read /end = read_loop_end /error = tidy result_file line | ||
| 39 | $ t1 = f$element( 0, " ", line) | ||
| 40 | $! | ||
| 41 | $! Skip "#" comment lines. | ||
| 42 | $ if (f$extract( 0, 1, f$edit( line, "TRIM")) .eqs. "#") then - | ||
| 43 | goto read_loop | ||
| 44 | $! | ||
| 45 | $ if (t1 .eqs. "test") | ||
| 46 | $ then | ||
| 47 | $ passed = passed+ 1 | ||
| 48 | $ tests = tests+ 1 | ||
| 49 | $ fail = 1 | ||
| 50 | $ t2 = f$extract( 5, 1000, line) | ||
| 51 | $ write sys$output "verify ''t2'" | ||
| 52 | $ else | ||
| 53 | $ if (t1 .nes. "0") | ||
| 54 | $ then | ||
| 55 | $ write sys$output "Failed! bc: ''line'" | ||
| 56 | $ passed = passed- fail | ||
| 57 | $ fail = 0 | ||
| 58 | $ endif | ||
| 59 | $ endif | ||
| 60 | $ goto read_loop | ||
| 61 | $ read_loop_end: | ||
| 62 | $ write sys$output "''passed'/''tests' tests passed" | ||
| 63 | $! | ||
| 64 | $ tidy: | ||
| 65 | $ if f$trnlnm( "result_file", "LNM$PROCESS_TABLE", , "SUPERVISOR", , "CONFINE") | ||
| 66 | $ then | ||
| 67 | $ close result_file | ||
| 68 | $ endif | ||
| 69 | $! | ||
| 70 | $ if ((tests .gt. 0) .and. (tests .eq. passed)) | ||
| 71 | $ then | ||
| 72 | $ exit 1 | ||
| 73 | $ else | ||
| 74 | $ exit 0 | ||
| 75 | $ endif | ||
| 76 | $! | ||
diff --git a/src/lib/libssl/src/test/clean_test.com b/src/lib/libssl/src/test/clean_test.com new file mode 100755 index 0000000000..7df633fbef --- /dev/null +++ b/src/lib/libssl/src/test/clean_test.com | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | $! | ||
| 2 | $! Delete various test results files. | ||
| 3 | $! | ||
| 4 | $ def_orig = f$environment( "default") | ||
| 5 | $ proc = f$environment( "procedure") | ||
| 6 | $ proc_dev_dir = f$parse( "A.;", proc) - "A.;" | ||
| 7 | $! | ||
| 8 | $ on control_c then goto tidy | ||
| 9 | $ on error then goto tidy | ||
| 10 | $! | ||
| 11 | $ set default 'proc_dev_dir' | ||
| 12 | $! | ||
| 13 | $ files := *.cms;*, *.srl;*, *.ss;*, - | ||
| 14 | cms.err;*, cms.out;*, newreq.pem;*, - | ||
| 15 | p.txt-zlib-cipher;*, - | ||
| 16 | smtst.txt;*, testkey.pem;*, testreq.pem;*, - | ||
| 17 | test_*.err;*, test_*.out;*, - | ||
| 18 | .rnd;* | ||
| 19 | $! | ||
| 20 | $ delim = "," | ||
| 21 | $ i = 0 | ||
| 22 | $ loop: | ||
| 23 | $ file = f$edit( f$element( i, delim, files), "trim") | ||
| 24 | $ if (file .eqs. delim) then goto loop_end | ||
| 25 | $ if (f$search( file) .nes. "") then - | ||
| 26 | delete 'p1' 'file' | ||
| 27 | $ i = i+ 1 | ||
| 28 | $ goto loop | ||
| 29 | $ loop_end: | ||
| 30 | $! | ||
| 31 | $ tidy: | ||
| 32 | $ | ||
| 33 | $ if (f$type( def_orig) .nes. "") then - | ||
| 34 | set default 'def_orig' | ||
| 35 | $! | ||
diff --git a/src/lib/libssl/src/test/maketests.com b/src/lib/libssl/src/test/maketests.com index ca072f1d11..386e5cf3c1 100644 --- a/src/lib/libssl/src/test/maketests.com +++ b/src/lib/libssl/src/test/maketests.com | |||
| @@ -25,7 +25,7 @@ $! VAXC For VAX C. | |||
| 25 | $! DECC For DEC C. | 25 | $! DECC For DEC C. |
| 26 | $! GNUC For GNU C. | 26 | $! GNUC For GNU C. |
| 27 | $! | 27 | $! |
| 28 | $! If you don't speficy a compiler, it will try to determine which | 28 | $! If you don't specify a compiler, it will try to determine which |
| 29 | $! "C" compiler to use. | 29 | $! "C" compiler to use. |
| 30 | $! | 30 | $! |
| 31 | $! P3, if defined, sets a TCP/IP library to use, through one of the following | 31 | $! P3, if defined, sets a TCP/IP library to use, through one of the following |
| @@ -37,46 +37,87 @@ $! | |||
| 37 | $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) | 37 | $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) |
| 38 | $! | 38 | $! |
| 39 | $! | 39 | $! |
| 40 | $! P5, if defined, specifies the C pointer size. Ignored on VAX. | ||
| 41 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) | ||
| 42 | $! Supported values are: | ||
| 43 | $! | ||
| 44 | $! "" Compile with default (/NOPOINTER_SIZE) | ||
| 45 | $! 32 Compile with /POINTER_SIZE=32 (SHORT) | ||
| 46 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]) | ||
| 47 | $! (Automatically select ARGV if compiler supports it.) | ||
| 48 | $! 64= Compile with /POINTER_SIZE=64 (LONG). | ||
| 49 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). | ||
| 50 | $! | ||
| 51 | $! P6, if defined, specifies a directory where ZLIB files (zlib.h, | ||
| 52 | $! libz.olb) may be found. Optionally, a non-default object library | ||
| 53 | $! name may be included ("dev:[dir]libz_64.olb", for example). | ||
| 54 | $! | ||
| 55 | $! | ||
| 56 | $! Announce/identify. | ||
| 57 | $! | ||
| 58 | $ proc = f$environment( "procedure") | ||
| 59 | $ write sys$output "@@@ "+ - | ||
| 60 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 61 | $! | ||
| 40 | $! Define A TCP/IP Library That We Will Need To Link To. | 62 | $! Define A TCP/IP Library That We Will Need To Link To. |
| 41 | $! (That is, If Wee Need To Link To One.) | 63 | $! (That is, If We Need To Link To One.) |
| 42 | $! | 64 | $! |
| 43 | $ TCPIP_LIB = "" | 65 | $ TCPIP_LIB = "" |
| 66 | $ ZLIB_LIB = "" | ||
| 44 | $! | 67 | $! |
| 45 | $! Check Which Architecture We Are Using. | 68 | $! Check Which Architecture We Are Using. |
| 46 | $! | 69 | $! |
| 47 | $ if (f$getsyi( "HW_MODEL") .lt. 1024) | 70 | $ if (f$getsyi( "cpu") .lt. 128) |
| 48 | $ then | 71 | $ then |
| 49 | $ arch = "VAX" | 72 | $ ARCH = "VAX" |
| 50 | $ else | 73 | $ else |
| 51 | $ arch = "" | 74 | $ ARCH = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 52 | $ arch = arch+ f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 75 | $ if (ARCH .eqs. "") then ARCH = "UNK" |
| 53 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 54 | $ endif | 76 | $ endif |
| 55 | $! | 77 | $! |
| 56 | $! Define The OBJ and EXE Directories (EXE before CHECK_OPTIONS). | 78 | $ ARCHD = ARCH |
| 57 | $! | 79 | $ LIB32 = "32" |
| 58 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.TEST] | 80 | $ OPT_FILE = "" |
| 59 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.TEST] | 81 | $ POINTER_SIZE = "" |
| 60 | $! | 82 | $! |
| 61 | $! Check To Make Sure We Have Valid Command Line Parameters. | 83 | $! Check To Make Sure We Have Valid Command Line Parameters. |
| 62 | $! | 84 | $! |
| 63 | $ GOSUB CHECK_OPTIONS | 85 | $ GOSUB CHECK_OPTIONS |
| 64 | $! | 86 | $! |
| 87 | $! Define The OBJ and EXE Directories. | ||
| 88 | $! | ||
| 89 | $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.TEST] | ||
| 90 | $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.TEST] | ||
| 91 | $! | ||
| 92 | $! Specify the destination directory in any /MAP option. | ||
| 93 | $! | ||
| 94 | $ if (LINKMAP .eqs. "MAP") | ||
| 95 | $ then | ||
| 96 | $ LINKMAP = LINKMAP+ "=''EXE_DIR'" | ||
| 97 | $ endif | ||
| 98 | $! | ||
| 99 | $! Add the location prefix to the linker options file name. | ||
| 100 | $! | ||
| 101 | $ if (OPT_FILE .nes. "") | ||
| 102 | $ then | ||
| 103 | $ OPT_FILE = EXE_DIR+ OPT_FILE | ||
| 104 | $ endif | ||
| 105 | $! | ||
| 65 | $! Initialise logical names and such | 106 | $! Initialise logical names and such |
| 66 | $! | 107 | $! |
| 67 | $ GOSUB INITIALISE | 108 | $ GOSUB INITIALISE |
| 68 | $! | 109 | $! |
| 69 | $! Tell The User What Kind of Machine We Run On. | 110 | $! Tell The User What Kind of Machine We Run On. |
| 70 | $! | 111 | $! |
| 71 | $ WRITE SYS$OUTPUT "Compiling On ''ARCH'." | 112 | $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" |
| 72 | $! | 113 | $! |
| 73 | $! Define The CRYPTO-LIB We Are To Use. | 114 | $! Define The CRYPTO-LIB We Are To Use. |
| 74 | $! | 115 | $! |
| 75 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB | 116 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB |
| 76 | $! | 117 | $! |
| 77 | $! Define The SSL We Are To Use. | 118 | $! Define The SSL We Are To Use. |
| 78 | $! | 119 | $! |
| 79 | $ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB | 120 | $ SSL_LIB := SYS$DISK:[-.'ARCHD'.EXE.SSL]SSL_LIBSSL'LIB32'.OLB |
| 80 | $! | 121 | $! |
| 81 | $! Create the OBJ and EXE Directories, if needed. | 122 | $! Create the OBJ and EXE Directories, if needed. |
| 82 | $! | 123 | $! |
| @@ -105,7 +146,7 @@ $ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ - | |||
| 105 | "MDC2TEST,RMDTEST,"+ - | 146 | "MDC2TEST,RMDTEST,"+ - |
| 106 | "RANDTEST,DHTEST,ENGINETEST,"+ - | 147 | "RANDTEST,DHTEST,ENGINETEST,"+ - |
| 107 | "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ - | 148 | "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ - |
| 108 | "EVP_TEST,JPAKETEST" | 149 | "EVP_TEST,IGETEST,JPAKETEST,ASN1TEST" |
| 109 | $! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well? | 150 | $! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well? |
| 110 | $! | 151 | $! |
| 111 | $! Additional directory information. | 152 | $! Additional directory information. |
| @@ -139,8 +180,9 @@ $ T_D_EXPTEST := [-.crypto.bn] | |||
| 139 | $ T_D_DSATEST := [-.crypto.dsa] | 180 | $ T_D_DSATEST := [-.crypto.dsa] |
| 140 | $ T_D_RSA_TEST := [-.crypto.rsa] | 181 | $ T_D_RSA_TEST := [-.crypto.rsa] |
| 141 | $ T_D_EVP_TEST := [-.crypto.evp] | 182 | $ T_D_EVP_TEST := [-.crypto.evp] |
| 142 | $ T_D_JPAKETEST := [-.crypto.jpake] | ||
| 143 | $ T_D_IGETEST := [-.test] | 183 | $ T_D_IGETEST := [-.test] |
| 184 | $ T_D_JPAKETEST := [-.crypto.jpake] | ||
| 185 | $ T_D_ASN1TEST := [-.test] | ||
| 144 | $! | 186 | $! |
| 145 | $ TCPIP_PROGRAMS = ",," | 187 | $ TCPIP_PROGRAMS = ",," |
| 146 | $ IF COMPILER .EQS. "VAXC" THEN - | 188 | $ IF COMPILER .EQS. "VAXC" THEN - |
| @@ -223,33 +265,15 @@ $! | |||
| 223 | $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. | 265 | $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. |
| 224 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | 266 | $! Check To See If We Are To Link With A Specific TCP/IP Library. |
| 225 | $! | 267 | $! |
| 226 | $ IF (TCPIP_LIB.NES."") | ||
| 227 | $ THEN | ||
| 228 | $! | ||
| 229 | $! Don't Link With The RSAREF Routines And TCP/IP Library. | 268 | $! Don't Link With The RSAREF Routines And TCP/IP Library. |
| 230 | $! | 269 | $! |
| 231 | $ LINK /'DEBUGGER' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' - | 270 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' - |
| 232 | 'OBJECT_FILE', - | 271 | 'OBJECT_FILE', - |
| 233 | 'SSL_LIB' /LIBRARY, - | 272 | 'SSL_LIB' /LIBRARY, - |
| 234 | 'CRYPTO_LIB' /LIBRARY, - | 273 | 'CRYPTO_LIB' /LIBRARY - |
| 235 | 'TCPIP_LIB', - | 274 | 'TCPIP_LIB' - |
| 236 | 'OPT_FILE' /OPTIONS | 275 | 'ZLIB_LIB' - |
| 237 | $! | 276 | ,'OPT_FILE' /OPTIONS |
| 238 | $! Else... | ||
| 239 | $! | ||
| 240 | $ ELSE | ||
| 241 | $! | ||
| 242 | $! Don't Link With The RSAREF Routines And Link With A TCP/IP Library. | ||
| 243 | $! | ||
| 244 | $ LINK /'DEBUGGER' /'TRACEBACK' /EXECUTABLE = 'EXE_FILE' - | ||
| 245 | 'OBJECT_FILE', - | ||
| 246 | 'SSL_LIB' /LIBRARY, - | ||
| 247 | 'CRYPTO_LIB' /LIBRARY, - | ||
| 248 | 'OPT_FILE' /OPTIONS | ||
| 249 | $! | ||
| 250 | $! End The TCP/IP Library Check. | ||
| 251 | $! | ||
| 252 | $ ENDIF | ||
| 253 | $! | 277 | $! |
| 254 | $! Go Back And Do It Again. | 278 | $! Go Back And Do It Again. |
| 255 | $! | 279 | $! |
| @@ -313,7 +337,7 @@ $! | |||
| 313 | $ CREATE 'OPT_FILE' | 337 | $ CREATE 'OPT_FILE' |
| 314 | $DECK | 338 | $DECK |
| 315 | ! | 339 | ! |
| 316 | ! Default System Options File To Link Agianst | 340 | ! Default System Options File To Link Against |
| 317 | ! The Sharable C Runtime Library. | 341 | ! The Sharable C Runtime Library. |
| 318 | ! | 342 | ! |
| 319 | GNU_CC:[000000]GCCLIB.OLB /LIBRARY | 343 | GNU_CC:[000000]GCCLIB.OLB /LIBRARY |
| @@ -348,7 +372,7 @@ $! | |||
| 348 | $ CREATE 'OPT_FILE' | 372 | $ CREATE 'OPT_FILE' |
| 349 | $DECK | 373 | $DECK |
| 350 | ! | 374 | ! |
| 351 | ! Default System Options File To Link Agianst | 375 | ! Default System Options File To Link Against |
| 352 | ! The Sharable DEC C Runtime Library. | 376 | ! The Sharable DEC C Runtime Library. |
| 353 | ! | 377 | ! |
| 354 | SYS$SHARE:DECC$SHR.EXE /SHAREABLE | 378 | SYS$SHARE:DECC$SHR.EXE /SHAREABLE |
| @@ -363,7 +387,7 @@ $! | |||
| 363 | $ CREATE 'OPT_FILE' | 387 | $ CREATE 'OPT_FILE' |
| 364 | $DECK | 388 | $DECK |
| 365 | ! | 389 | ! |
| 366 | ! Default System Options File For non-VAX To Link Agianst | 390 | ! Default System Options File For non-VAX To Link Against |
| 367 | ! The Sharable C Runtime Library. | 391 | ! The Sharable C Runtime Library. |
| 368 | ! | 392 | ! |
| 369 | SYS$SHARE:CMA$OPEN_LIB_SHR.EXE /SHAREABLE | 393 | SYS$SHARE:CMA$OPEN_LIB_SHR.EXE /SHAREABLE |
| @@ -442,19 +466,24 @@ $! Check The User's Options. | |||
| 442 | $! | 466 | $! |
| 443 | $ CHECK_OPTIONS: | 467 | $ CHECK_OPTIONS: |
| 444 | $! | 468 | $! |
| 469 | $! Set basic C compiler /INCLUDE directories. | ||
| 470 | $! | ||
| 471 | $ CC_INCLUDES = "SYS$DISK:[-],SYS$DISK:[-.CRYPTO]" | ||
| 472 | $! | ||
| 445 | $! Check To See If P1 Is Blank. | 473 | $! Check To See If P1 Is Blank. |
| 446 | $! | 474 | $! |
| 447 | $ IF (P1.EQS."NODEBUG") | 475 | $ IF (P1.EQS."NODEBUG") |
| 448 | $ THEN | 476 | $ THEN |
| 449 | $! | 477 | $! |
| 450 | $! P1 Is NODEBUG, So Compile Without Debugger Information. | 478 | $! P1 Is NODEBUG, So Compile Without Debugger Information. |
| 451 | $! | 479 | $! |
| 452 | $ DEBUGGER = "NODEBUG" | 480 | $ DEBUGGER = "NODEBUG" |
| 453 | $ TRACEBACK = "NOTRACEBACK" | 481 | $ LINKMAP = "NOMAP" |
| 454 | $ GCC_OPTIMIZE = "OPTIMIZE" | 482 | $ TRACEBACK = "NOTRACEBACK" |
| 455 | $ CC_OPTIMIZE = "OPTIMIZE" | 483 | $ GCC_OPTIMIZE = "OPTIMIZE" |
| 456 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | 484 | $ CC_OPTIMIZE = "OPTIMIZE" |
| 457 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | 485 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
| 486 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
| 458 | $! | 487 | $! |
| 459 | $! Else... | 488 | $! Else... |
| 460 | $! | 489 | $! |
| @@ -468,6 +497,7 @@ $! | |||
| 468 | $! Compile With Debugger Information. | 497 | $! Compile With Debugger Information. |
| 469 | $! | 498 | $! |
| 470 | $ DEBUGGER = "DEBUG" | 499 | $ DEBUGGER = "DEBUG" |
| 500 | $ LINKMAP = "MAP" | ||
| 471 | $ TRACEBACK = "TRACEBACK" | 501 | $ TRACEBACK = "TRACEBACK" |
| 472 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | 502 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
| 473 | $ CC_OPTIMIZE = "NOOPTIMIZE" | 503 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
| @@ -478,7 +508,7 @@ $! Else... | |||
| 478 | $! | 508 | $! |
| 479 | $ ELSE | 509 | $ ELSE |
| 480 | $! | 510 | $! |
| 481 | $! Tell The User Entered An Invalid Option.. | 511 | $! Tell The User Entered An Invalid Option. |
| 482 | $! | 512 | $! |
| 483 | $ WRITE SYS$OUTPUT "" | 513 | $ WRITE SYS$OUTPUT "" |
| 484 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" | 514 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" |
| @@ -491,11 +521,87 @@ $! Time To EXIT. | |||
| 491 | $! | 521 | $! |
| 492 | $ EXIT | 522 | $ EXIT |
| 493 | $! | 523 | $! |
| 494 | $! End The Valid Arguement Check. | 524 | $! End The Valid Argument Check. |
| 525 | $! | ||
| 526 | $ ENDIF | ||
| 527 | $! | ||
| 528 | $! End The P1 Check. | ||
| 529 | $! | ||
| 530 | $ ENDIF | ||
| 531 | $! | ||
| 532 | $! Check P5 (POINTER_SIZE). | ||
| 533 | $! | ||
| 534 | $ IF (P5 .NES. "") .AND. (ARCH .NES. "VAX") | ||
| 535 | $ THEN | ||
| 536 | $! | ||
| 537 | $ IF (P5 .EQS. "32") | ||
| 538 | $ THEN | ||
| 539 | $ POINTER_SIZE = " /POINTER_SIZE=32" | ||
| 540 | $ ELSE | ||
| 541 | $ POINTER_SIZE = F$EDIT( P5, "COLLAPSE, UPCASE") | ||
| 542 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
| 543 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
| 544 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
| 545 | $ THEN | ||
| 546 | $ ARCHD = ARCH+ "_64" | ||
| 547 | $ LIB32 = "" | ||
| 548 | $ IF (F$EXTRACT( 2, 1, POINTER_SIZE) .EQS. "=") | ||
| 549 | $ THEN | ||
| 550 | $! Explicit user choice: "64" or "64=ARGV". | ||
| 551 | $ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64" | ||
| 552 | $ ELSE | ||
| 553 | $ SET NOON | ||
| 554 | $ DEFINE /USER_MODE SYS$OUTPUT NL: | ||
| 555 | $ DEFINE /USER_MODE SYS$ERROR NL: | ||
| 556 | $ CC /NOLIST /NOOBJECT /POINTER_SIZE=64=ARGV NL: | ||
| 557 | $ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000 | ||
| 558 | $ THEN | ||
| 559 | $ ! If we got here, it means DCL complained like this: | ||
| 560 | $ ! %DCL-W-NOVALU, value not allowed - remove value specification | ||
| 561 | $ ! \64=\ | ||
| 562 | $ ! | ||
| 563 | $ ! If the compiler was run, logicals defined in /USER would | ||
| 564 | $ ! have been deassigned automatically. However, when DCL | ||
| 565 | $ ! complains, they aren't, so we do it here (it might be | ||
| 566 | $ ! unnecessary, but just in case there will be another error | ||
| 567 | $ ! message further on that we don't want to miss) | ||
| 568 | $ DEASSIGN /USER_MODE SYS$ERROR | ||
| 569 | $ DEASSIGN /USER_MODE SYS$OUTPUT | ||
| 570 | $ ELSE | ||
| 571 | $ POINTER_SIZE = POINTER_SIZE + "=ARGV" | ||
| 572 | $ ENDIF | ||
| 573 | $ SET ON | ||
| 574 | $ ENDIF | ||
| 575 | $ POINTER_SIZE = " /POINTER_SIZE=''POINTER_SIZE'" | ||
| 576 | $ ELSE | ||
| 577 | $! | ||
| 578 | $! Tell The User Entered An Invalid Option. | ||
| 579 | $! | ||
| 580 | $ WRITE SYS$OUTPUT "" | ||
| 581 | $ WRITE SYS$OUTPUT "The Option ", P5, - | ||
| 582 | " Is Invalid. The Valid Options Are:" | ||
| 583 | $ WRITE SYS$OUTPUT "" | ||
| 584 | $ WRITE SYS$OUTPUT - | ||
| 585 | " """" : Compile with default (short) pointers." | ||
| 586 | $ WRITE SYS$OUTPUT - | ||
| 587 | " 32 : Compile with 32-bit (short) pointers." | ||
| 588 | $ WRITE SYS$OUTPUT - | ||
| 589 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
| 590 | $ WRITE SYS$OUTPUT - | ||
| 591 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
| 592 | $ WRITE SYS$OUTPUT - | ||
| 593 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
| 594 | $ WRITE SYS$OUTPUT "" | ||
| 595 | $! | ||
| 596 | $! Time To EXIT. | ||
| 597 | $! | ||
| 598 | $ EXIT | ||
| 599 | $! | ||
| 600 | $ ENDIF | ||
| 495 | $! | 601 | $! |
| 496 | $ ENDIF | 602 | $ ENDIF |
| 497 | $! | 603 | $! |
| 498 | $! End The P2 Check. | 604 | $! End The P5 (POINTER_SIZE) Check. |
| 499 | $! | 605 | $! |
| 500 | $ ENDIF | 606 | $ ENDIF |
| 501 | $! | 607 | $! |
| @@ -599,11 +705,64 @@ $ CCDEFS = "TCPIP_TYPE_''P3'" | |||
| 599 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 705 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
| 600 | $ CCEXTRAFLAGS = "" | 706 | $ CCEXTRAFLAGS = "" |
| 601 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 707 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
| 602 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" | 708 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" |
| 603 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 709 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
| 604 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | 710 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
| 605 | $! | 711 | $! |
| 606 | $! Check To See If The User Entered A Valid Paramter. | 712 | $! Check To See If We Have A ZLIB Option. |
| 713 | $! | ||
| 714 | $ ZLIB = P6 | ||
| 715 | $ IF (ZLIB .NES. "") | ||
| 716 | $ THEN | ||
| 717 | $! | ||
| 718 | $! Check for expected ZLIB files. | ||
| 719 | $! | ||
| 720 | $ err = 0 | ||
| 721 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
| 722 | $ if (f$search( file1) .eqs. "") | ||
| 723 | $ then | ||
| 724 | $ WRITE SYS$OUTPUT "" | ||
| 725 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 726 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
| 727 | $ err = 1 | ||
| 728 | $ endif | ||
| 729 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" | ||
| 730 | $! | ||
| 731 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
| 732 | $ if (f$search( file2) .eqs. "") | ||
| 733 | $ then | ||
| 734 | $ if (err .eq. 0) | ||
| 735 | $ then | ||
| 736 | $ WRITE SYS$OUTPUT "" | ||
| 737 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 738 | $ endif | ||
| 739 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
| 740 | $ WRITE SYS$OUTPUT "" | ||
| 741 | $ err = err+ 2 | ||
| 742 | $ endif | ||
| 743 | $ if (err .eq. 1) | ||
| 744 | $ then | ||
| 745 | $ WRITE SYS$OUTPUT "" | ||
| 746 | $ endif | ||
| 747 | $! | ||
| 748 | $ if (err .ne. 0) | ||
| 749 | $ then | ||
| 750 | $ GOTO EXIT | ||
| 751 | $ endif | ||
| 752 | $! | ||
| 753 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS | ||
| 754 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 | ||
| 755 | $ ZLIB_LIB = ", ''file2' /library" | ||
| 756 | $! | ||
| 757 | $! Print info | ||
| 758 | $! | ||
| 759 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
| 760 | $! | ||
| 761 | $! End The P8 Check. | ||
| 762 | $! | ||
| 763 | $ ENDIF | ||
| 764 | $! | ||
| 765 | $! Check To See If The User Entered A Valid Parameter. | ||
| 607 | $! | 766 | $! |
| 608 | $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC") | 767 | $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC") |
| 609 | $ THEN | 768 | $ THEN |
| @@ -626,13 +785,13 @@ $! | |||
| 626 | $ CC = "CC" | 785 | $ CC = "CC" |
| 627 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 786 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 628 | THEN CC = "CC /DECC" | 787 | THEN CC = "CC /DECC" |
| 629 | $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=ANSI89" + - | 788 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
| 630 | "/NOLIST /PREFIX=ALL" + - | 789 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
| 631 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 790 | " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS |
| 632 | $! | 791 | $! |
| 633 | $! Define The Linker Options File Name. | 792 | $! Define The Linker Options File Name. |
| 634 | $! | 793 | $! |
| 635 | $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" | 794 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
| 636 | $! | 795 | $! |
| 637 | $! End DECC Check. | 796 | $! End DECC Check. |
| 638 | $! | 797 | $! |
| @@ -661,7 +820,7 @@ $ EXIT | |||
| 661 | $ ENDIF | 820 | $ ENDIF |
| 662 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC /VAXC" | 821 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC /VAXC" |
| 663 | $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - | 822 | $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - |
| 664 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 823 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 665 | $ CCDEFS = CCDEFS + ",""VAXC""" | 824 | $ CCDEFS = CCDEFS + ",""VAXC""" |
| 666 | $! | 825 | $! |
| 667 | $! Define <sys> As SYS$COMMON:[SYSLIB] | 826 | $! Define <sys> As SYS$COMMON:[SYSLIB] |
| @@ -670,7 +829,7 @@ $ DEFINE /NOLOG SYS SYS$COMMON:[SYSLIB] | |||
| 670 | $! | 829 | $! |
| 671 | $! Define The Linker Options File Name. | 830 | $! Define The Linker Options File Name. |
| 672 | $! | 831 | $! |
| 673 | $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" | 832 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
| 674 | $! | 833 | $! |
| 675 | $! End VAXC Check | 834 | $! End VAXC Check |
| 676 | $! | 835 | $! |
| @@ -692,11 +851,11 @@ $! | |||
| 692 | $! Use GNU C... | 851 | $! Use GNU C... |
| 693 | $! | 852 | $! |
| 694 | $ CC = "GCC /NOCASE_HACK /''GCC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - | 853 | $ CC = "GCC /NOCASE_HACK /''GCC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - |
| 695 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 854 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 696 | $! | 855 | $! |
| 697 | $! Define The Linker Options File Name. | 856 | $! Define The Linker Options File Name. |
| 698 | $! | 857 | $! |
| 699 | $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" | 858 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
| 700 | $! | 859 | $! |
| 701 | $! End The GNU C Check. | 860 | $! End The GNU C Check. |
| 702 | $! | 861 | $! |
| @@ -715,20 +874,20 @@ $ THEN | |||
| 715 | $ CC4DISABLEWARNINGS = "DOLLARID" | 874 | $ CC4DISABLEWARNINGS = "DOLLARID" |
| 716 | $ ELSE | 875 | $ ELSE |
| 717 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" | 876 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" |
| 718 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | 877 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
| 719 | $ ENDIF | 878 | $ ENDIF |
| 720 | $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" | 879 | $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" |
| 721 | $ ELSE | 880 | $ ELSE |
| 722 | $ CCDISABLEWARNINGS = "" | 881 | $ CCDISABLEWARNINGS = "" |
| 723 | $ CC4DISABLEWARNINGS = "" | 882 | $ CC4DISABLEWARNINGS = "" |
| 724 | $ ENDIF | 883 | $ ENDIF |
| 725 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 884 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
| 726 | $! | 885 | $! |
| 727 | $! Show user the result | 886 | $! Show user the result |
| 728 | $! | 887 | $! |
| 729 | $ WRITE /SYMBOL SYS$OUTPUT "Main Compiling Command: ", CC | 888 | $ WRITE /SYMBOL SYS$OUTPUT "Main Compiling Command: ", CC |
| 730 | $! | 889 | $! |
| 731 | $! Else The User Entered An Invalid Arguement. | 890 | $! Else The User Entered An Invalid Argument. |
| 732 | $! | 891 | $! |
| 733 | $ ELSE | 892 | $ ELSE |
| 734 | $! | 893 | $! |
| @@ -760,7 +919,7 @@ $ THEN | |||
| 760 | $! | 919 | $! |
| 761 | $! Set the library to use SOCKETSHR | 920 | $! Set the library to use SOCKETSHR |
| 762 | $! | 921 | $! |
| 763 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" | 922 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
| 764 | $! | 923 | $! |
| 765 | $! Done with SOCKETSHR | 924 | $! Done with SOCKETSHR |
| 766 | $! | 925 | $! |
| @@ -786,13 +945,13 @@ $ THEN | |||
| 786 | $! | 945 | $! |
| 787 | $! Set the library to use UCX. | 946 | $! Set the library to use UCX. |
| 788 | $! | 947 | $! |
| 789 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" | 948 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
| 790 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 949 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
| 791 | $ THEN | 950 | $ THEN |
| 792 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" | 951 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
| 793 | $ ELSE | 952 | $ ELSE |
| 794 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 953 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
| 795 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" | 954 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
| 796 | $ ENDIF | 955 | $ ENDIF |
| 797 | $! | 956 | $! |
| 798 | $! Done with UCX | 957 | $! Done with UCX |
| @@ -806,7 +965,7 @@ $ THEN | |||
| 806 | $! | 965 | $! |
| 807 | $! Set the library to use TCPIP (post UCX). | 966 | $! Set the library to use TCPIP (post UCX). |
| 808 | $! | 967 | $! |
| 809 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" | 968 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
| 810 | $! | 969 | $! |
| 811 | $! Done with TCPIP | 970 | $! Done with TCPIP |
| 812 | $! | 971 | $! |
| @@ -827,9 +986,9 @@ $ ENDIF | |||
| 827 | $! | 986 | $! |
| 828 | $! Print info | 987 | $! Print info |
| 829 | $! | 988 | $! |
| 830 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 989 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
| 831 | $! | 990 | $! |
| 832 | $! Else The User Entered An Invalid Arguement. | 991 | $! Else The User Entered An Invalid Argument. |
| 833 | $! | 992 | $! |
| 834 | $ ELSE | 993 | $ ELSE |
| 835 | $! | 994 | $! |
diff --git a/src/lib/libssl/src/test/tcrl.com b/src/lib/libssl/src/test/tcrl.com index 1f606eb850..dd96a2b6dd 100644 --- a/src/lib/libssl/src/test/tcrl.com +++ b/src/lib/libssl/src/test/tcrl.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TCRL.COM -- Tests crl keys | 1 | $! TCRL.COM -- Tests crl keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl crl | 12 | $ cmd = "mcr ''exe_dir'openssl crl" |
| 10 | $ | 13 | $ |
| 11 | $ t := testcrl.pem | 14 | $ t = "testcrl.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing CRL conversions" | 17 | $ write sys$output "testing CRL conversions" |
diff --git a/src/lib/libssl/src/test/testca.com b/src/lib/libssl/src/test/testca.com index ec7e56dad6..78cda9ec5a 100644 --- a/src/lib/libssl/src/test/testca.com +++ b/src/lib/libssl/src/test/testca.com | |||
| @@ -1,11 +1,13 @@ | |||
| 1 | $! TESTCA.COM | 1 | $! TESTCA.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $! | ||
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 7 | $ | 9 | $ |
| 8 | $ openssl := mcr 'exe_dir'openssl | 10 | $ openssl = "mcr ''exe_dir'openssl" |
| 9 | $ | 11 | $ |
| 10 | $ SSLEAY_CONFIG="-config ""CAss.cnf""" | 12 | $ SSLEAY_CONFIG="-config ""CAss.cnf""" |
| 11 | $ | 13 | $ |
diff --git a/src/lib/libssl/src/test/testenc.com b/src/lib/libssl/src/test/testenc.com index 621d9a2126..75acd6f07f 100644 --- a/src/lib/libssl/src/test/testenc.com +++ b/src/lib/libssl/src/test/testenc.com | |||
| @@ -1,13 +1,16 @@ | |||
| 1 | $! TESTENC.COM -- Test encoding and decoding | 1 | $! TESTENC.COM -- Test encoding and decoding |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $! | ||
| 8 | $ if (p1 .eqs. 64) then __arch = __arch+ "_64" | ||
| 7 | $ | 9 | $ |
| 8 | $ testsrc := makefile. | 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" |
| 9 | $ test := p.txt | 11 | $ testsrc = "makefile." |
| 10 | $ cmd := mcr 'exe_dir'openssl | 12 | $ test = "p.txt" |
| 13 | $ cmd = "mcr ''exe_dir'openssl" | ||
| 11 | $ | 14 | $ |
| 12 | $ if f$search(test) .nes. "" then delete 'test';* | 15 | $ if f$search(test) .nes. "" then delete 'test';* |
| 13 | $ convert/fdl=sys$input: 'testsrc' 'test' | 16 | $ convert/fdl=sys$input: 'testsrc' 'test' |
diff --git a/src/lib/libssl/src/test/testgen.com b/src/lib/libssl/src/test/testgen.com index a4bc574bec..e076da2f30 100644 --- a/src/lib/libssl/src/test/testgen.com +++ b/src/lib/libssl/src/test/testgen.com | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | $! TETSGEN.COM | 1 | $! TESTGEN.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $ if (p1 .eqs. 64) then __arch = __arch+ "_64" |
| 8 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 9 | $ |
| 9 | $ T := testcert | 10 | $ T = "testcert" |
| 10 | $ KEY = 512 | 11 | $ KEY = 512 |
| 11 | $ CA := [-.certs]testca.pem | 12 | $ CA = "[-.certs]testca.pem" |
| 12 | $ | 13 | $ |
| 13 | $ set noon | 14 | $ set noon |
| 14 | $ if f$search(T+".1;*") .nes. "" then delete 'T'.1;* | 15 | $ if f$search(T+".1;*") .nes. "" then delete 'T'.1;* |
| @@ -20,7 +21,8 @@ $ write sys$output "generating certificate request" | |||
| 20 | $ | 21 | $ |
| 21 | $ append/new nl: .rnd | 22 | $ append/new nl: .rnd |
| 22 | $ open/append random_file .rnd | 23 | $ open/append random_file .rnd |
| 23 | $ write random_file "string to make the random number generator think it has entropy" | 24 | $ write random_file - |
| 25 | "string to make the random number generator think it has entropy" | ||
| 24 | $ close random_file | 26 | $ close random_file |
| 25 | $ | 27 | $ |
| 26 | $ set noon | 28 | $ set noon |
| @@ -33,8 +35,10 @@ $ then | |||
| 33 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" | 35 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" |
| 34 | $ else | 36 | $ else |
| 35 | $ req_new="-new" | 37 | $ req_new="-new" |
| 36 | $ write sys$output "There should be a 2 sequences of .'s and some +'s." | 38 | $ write sys$output - |
| 37 | $ write sys$output "There should not be more that at most 80 per line" | 39 | "There should be a 2 sequences of .'s and some +'s." |
| 40 | $ write sys$output - | ||
| 41 | "There should not be more that at most 80 per line" | ||
| 38 | $ endif | 42 | $ endif |
| 39 | $ | 43 | $ |
| 40 | $ write sys$output "This could take some time." | 44 | $ write sys$output "This could take some time." |
diff --git a/src/lib/libssl/src/test/tests.com b/src/lib/libssl/src/test/tests.com index d151cd3955..373dd16eac 100644 --- a/src/lib/libssl/src/test/tests.com +++ b/src/lib/libssl/src/test/tests.com | |||
| @@ -1,22 +1,43 @@ | |||
| 1 | $! TESTS.COM -- Performs the necessary tests | 1 | $! TESTS.COM -- Performs the necessary tests |
| 2 | $! | 2 | $! |
| 3 | $! P1 tests to be performed. Empty means all. | 3 | $! P1 tests to be performed. Empty means all. |
| 4 | $ | 4 | $! P2 Pointer size: "", "32", or "64". |
| 5 | $! | ||
| 6 | $! Announce/identify. | ||
| 7 | $! | ||
| 8 | $ proc = f$environment( "procedure") | ||
| 9 | $ write sys$output "@@@ "+ - | ||
| 10 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 11 | $! | ||
| 5 | $ __proc = f$element(0,";",f$environment("procedure")) | 12 | $ __proc = f$element(0,";",f$environment("procedure")) |
| 6 | $ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;" | 13 | $ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;" |
| 7 | $ __save_default = f$environment("default") | 14 | $ __save_default = f$environment("default") |
| 8 | $ __arch := VAX | 15 | $ __arch = "VAX" |
| 9 | $ if f$getsyi("cpu") .ge. 128 then - | 16 | $ if f$getsyi("cpu") .ge. 128 then - |
| 10 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 17 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 11 | $ if __arch .eqs. "" then __arch := UNK | 18 | $ if __arch .eqs. "" then __arch = "UNK" |
| 12 | $ texe_dir := sys$disk:[-.'__arch'.exe.test] | 19 | $! |
| 13 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 20 | $ __archd = __arch |
| 14 | $ | 21 | $ pointer_size = "" |
| 15 | $ sslroot = f$parse("sys$disk:[-.apps];",,,,"syntax_only") - "].;"+ ".]" | 22 | $ if (p2 .eq. "64") |
| 16 | $ define /translation_attributes = concealed sslroot 'sslroot' | 23 | $ then |
| 24 | $ pointer_size = "64" | ||
| 25 | $ __archd = __arch+ "_64" | ||
| 26 | $ endif | ||
| 27 | $! | ||
| 28 | $ texe_dir := sys$disk:[-.'__archd'.exe.test] | ||
| 29 | $ exe_dir := sys$disk:[-.'__archd'.exe.apps] | ||
| 17 | $ | 30 | $ |
| 18 | $ set default '__here' | 31 | $ set default '__here' |
| 19 | $ | 32 | $ |
| 33 | $ ROOT = F$PARSE("sys$disk:[-]A.;0",,,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0" | ||
| 34 | $ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY") | ||
| 35 | $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") - | ||
| 36 | - ".][000000" - "[000000." - "][" - "[" - "]" | ||
| 37 | $ ROOT = ROOT_DEV + "[" + ROOT_DIR | ||
| 38 | $ DEFINE/NOLOG SSLROOT 'ROOT'.APPS.] /TRANS=CONC | ||
| 39 | $ openssl_conf := sslroot:[000000]openssl-vms.cnf | ||
| 40 | $ | ||
| 20 | $ on control_y then goto exit | 41 | $ on control_y then goto exit |
| 21 | $ on error then goto exit | 42 | $ on error then goto exit |
| 22 | $ | 43 | $ |
| @@ -70,17 +91,19 @@ $ ENGINETEST := enginetest | |||
| 70 | $ EVPTEST := evp_test | 91 | $ EVPTEST := evp_test |
| 71 | $ IGETEST := igetest | 92 | $ IGETEST := igetest |
| 72 | $ JPAKETEST := jpaketest | 93 | $ JPAKETEST := jpaketest |
| 73 | $ | 94 | $ ASN1TEST := asn1test |
| 95 | $! | ||
| 74 | $ tests_i = 0 | 96 | $ tests_i = 0 |
| 75 | $ loop_tests: | 97 | $ loop_tests: |
| 76 | $ tests_e = f$element(tests_i,",",tests) | 98 | $ tests_e = f$element(tests_i,",",tests) |
| 77 | $ tests_i = tests_i + 1 | 99 | $ tests_i = tests_i + 1 |
| 78 | $ if tests_e .eqs. "," then goto exit | 100 | $ if tests_e .eqs. "," then goto exit |
| 101 | $ write sys$output "---> ''tests_e'" | ||
| 79 | $ gosub 'tests_e' | 102 | $ gosub 'tests_e' |
| 80 | $ goto loop_tests | 103 | $ goto loop_tests |
| 81 | $ | 104 | $ |
| 82 | $ test_evp: | 105 | $ test_evp: |
| 83 | $ mcr 'texe_dir''evptest' evptests.txt | 106 | $ mcr 'texe_dir''evptest' 'ROOT'.CRYPTO.EVP]evptests.txt |
| 84 | $ return | 107 | $ return |
| 85 | $ test_des: | 108 | $ test_des: |
| 86 | $ mcr 'texe_dir''destest' | 109 | $ mcr 'texe_dir''destest' |
| @@ -132,68 +155,109 @@ $ test_rand: | |||
| 132 | $ mcr 'texe_dir''randtest' | 155 | $ mcr 'texe_dir''randtest' |
| 133 | $ return | 156 | $ return |
| 134 | $ test_enc: | 157 | $ test_enc: |
| 135 | $ @testenc.com | 158 | $ @testenc.com 'pointer_size' |
| 136 | $ return | 159 | $ return |
| 137 | $ test_x509: | 160 | $ test_x509: |
| 138 | $ define sys$error nla0: | 161 | $ set noon |
| 162 | $ define sys$error test_x509.err | ||
| 139 | $ write sys$output "test normal x509v1 certificate" | 163 | $ write sys$output "test normal x509v1 certificate" |
| 140 | $ @tx509.com | 164 | $ @tx509.com "" 'pointer_size' |
| 141 | $ write sys$output "test first x509v3 certificate" | 165 | $ write sys$output "test first x509v3 certificate" |
| 142 | $ @tx509.com v3-cert1.pem | 166 | $ @tx509.com v3-cert1.pem 'pointer_size' |
| 143 | $ write sys$output "test second x509v3 certificate" | 167 | $ write sys$output "test second x509v3 certificate" |
| 144 | $ @tx509.com v3-cert2.pem | 168 | $ @tx509.com v3-cert2.pem 'pointer_size' |
| 145 | $ deassign sys$error | 169 | $ deassign sys$error |
| 170 | $ set on | ||
| 146 | $ return | 171 | $ return |
| 147 | $ test_rsa: | 172 | $ test_rsa: |
| 148 | $ define sys$error nla0: | 173 | $ set noon |
| 149 | $ @trsa.com | 174 | $ define sys$error test_rsa.err |
| 175 | $ @trsa.com "" 'pointer_size' | ||
| 150 | $ deassign sys$error | 176 | $ deassign sys$error |
| 151 | $ mcr 'texe_dir''rsatest' | 177 | $ mcr 'texe_dir''rsatest' |
| 178 | $ set on | ||
| 152 | $ return | 179 | $ return |
| 153 | $ test_crl: | 180 | $ test_crl: |
| 154 | $ define sys$error nla0: | 181 | $ set noon |
| 155 | $ @tcrl.com | 182 | $ define sys$error test_crl.err |
| 183 | $ @tcrl.com "" 'pointer_size' | ||
| 156 | $ deassign sys$error | 184 | $ deassign sys$error |
| 185 | $ set on | ||
| 157 | $ return | 186 | $ return |
| 158 | $ test_sid: | 187 | $ test_sid: |
| 159 | $ define sys$error nla0: | 188 | $ set noon |
| 160 | $ @tsid.com | 189 | $ define sys$error test_sid.err |
| 190 | $ @tsid.com "" 'pointer_size' | ||
| 161 | $ deassign sys$error | 191 | $ deassign sys$error |
| 192 | $ set on | ||
| 162 | $ return | 193 | $ return |
| 163 | $ test_req: | 194 | $ test_req: |
| 164 | $ define sys$error nla0: | 195 | $ set noon |
| 165 | $ @treq.com | 196 | $ define sys$error test_req.err |
| 166 | $ @treq.com testreq2.pem | 197 | $ @treq.com "" 'pointer_size' |
| 198 | $ @treq.com testreq2.pem 'pointer_size' | ||
| 167 | $ deassign sys$error | 199 | $ deassign sys$error |
| 200 | $ set on | ||
| 168 | $ return | 201 | $ return |
| 169 | $ test_pkcs7: | 202 | $ test_pkcs7: |
| 170 | $ define sys$error nla0: | 203 | $ set noon |
| 171 | $ @tpkcs7.com | 204 | $ define sys$error test_pkcs7.err |
| 172 | $ @tpkcs7d.com | 205 | $ @tpkcs7.com "" 'pointer_size' |
| 206 | $ @tpkcs7d.com "" 'pointer_size' | ||
| 173 | $ deassign sys$error | 207 | $ deassign sys$error |
| 208 | $ set on | ||
| 174 | $ return | 209 | $ return |
| 175 | $ test_bn: | 210 | $ test_bn: |
| 176 | $ write sys$output "starting big number library test, could take a while..." | 211 | $ write sys$output - |
| 177 | $ create bntest-vms.fdl | 212 | "starting big number library test, could take a while..." |
| 213 | $ set noon | ||
| 214 | $ define sys$error test_bn.err | ||
| 215 | $ define sys$output test_bn.out | ||
| 216 | $ @ bctest.com | ||
| 217 | $ status = $status | ||
| 218 | $ deassign sys$error | ||
| 219 | $ deassign sys$output | ||
| 220 | $ set on | ||
| 221 | $ if (status) | ||
| 222 | $ then | ||
| 223 | $ create /fdl = sys$input bntest-vms.tmp | ||
| 224 | FILE | ||
| 225 | ORGANIZATION sequential | ||
| 226 | RECORD | ||
| 227 | FORMAT stream_lf | ||
| 228 | $ define /user_mode sys$output bntest-vms.tmp | ||
| 229 | $ mcr 'texe_dir''bntest' | ||
| 230 | $ define /user_mode sys$input bntest-vms.tmp | ||
| 231 | $ define /user_mode sys$output bntest-vms.out | ||
| 232 | $ bc | ||
| 233 | $ @ bntest.com bntest-vms.out | ||
| 234 | $ status = $status | ||
| 235 | $ if (status) | ||
| 236 | $ then | ||
| 237 | $ delete bntest-vms.out;* | ||
| 238 | $ delete bntest-vms.tmp;* | ||
| 239 | $ endif | ||
| 240 | $ else | ||
| 241 | $ create /fdl = sys$input bntest-vms.sh | ||
| 178 | FILE | 242 | FILE |
| 179 | ORGANIZATION sequential | 243 | ORGANIZATION sequential |
| 180 | RECORD | 244 | RECORD |
| 181 | FORMAT stream_lf | 245 | FORMAT stream_lf |
| 182 | $ create/fdl=bntest-vms.fdl bntest-vms.sh | 246 | $ open /append bntest_file bntest-vms.sh |
| 183 | $ open/append foo bntest-vms.sh | 247 | $ type /output = bntest_file sys$input: |
| 184 | $ type/output=foo: sys$input: | ||
| 185 | << __FOO__ sh -c "`sh ./bctest`" | perl -e '$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $1";} elsif (!/^0$/) {die "\nFailed! bc: $_";} else {print STDERR "."; $i++;}} print STDERR "\n$i tests passed\n"' | 248 | << __FOO__ sh -c "`sh ./bctest`" | perl -e '$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $1";} elsif (!/^0$/) {die "\nFailed! bc: $_";} else {print STDERR "."; $i++;}} print STDERR "\n$i tests passed\n"' |
| 186 | $ define/user sys$output bntest-vms.tmp | 249 | $ define /user_mode sys$output bntest-vms.tmp |
| 187 | $ mcr 'texe_dir''bntest' | 250 | $ mcr 'texe_dir''bntest' |
| 188 | $ copy bntest-vms.tmp foo: | 251 | $ copy bntest-vms.tmp bntest_file |
| 189 | $ delete bntest-vms.tmp;* | 252 | $ delete bntest-vms.tmp;* |
| 190 | $ type/output=foo: sys$input: | 253 | $ type /output = bntest_file sys$input: |
| 191 | __FOO__ | 254 | __FOO__ |
| 192 | $ close foo | 255 | $ close bntest_file |
| 193 | $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and" | 256 | $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and" |
| 194 | $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations" | 257 | $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations" |
| 195 | $ write sys$output "-- went well." | 258 | $ write sys$output "-- went well." |
| 196 | $ write sys$output "" | 259 | $ write sys$output "" |
| 260 | $ endif | ||
| 197 | $ write sys$output "test a^b%c implementations" | 261 | $ write sys$output "test a^b%c implementations" |
| 198 | $ mcr 'texe_dir''exptest' | 262 | $ mcr 'texe_dir''exptest' |
| 199 | $ return | 263 | $ return |
| @@ -212,7 +276,7 @@ $ return | |||
| 212 | $ test_verify: | 276 | $ test_verify: |
| 213 | $ write sys$output "The following command should have some OK's and some failures" | 277 | $ write sys$output "The following command should have some OK's and some failures" |
| 214 | $ write sys$output "There are definitly a few expired certificates" | 278 | $ write sys$output "There are definitly a few expired certificates" |
| 215 | $ @tverify.com | 279 | $ @tverify.com 'pointer_size' |
| 216 | $ return | 280 | $ return |
| 217 | $ test_dh: | 281 | $ test_dh: |
| 218 | $ write sys$output "Generate a set of DH parameters" | 282 | $ write sys$output "Generate a set of DH parameters" |
| @@ -224,7 +288,7 @@ $ mcr 'texe_dir''dsatest' | |||
| 224 | $ return | 288 | $ return |
| 225 | $ test_gen: | 289 | $ test_gen: |
| 226 | $ write sys$output "Generate and verify a certificate request" | 290 | $ write sys$output "Generate and verify a certificate request" |
| 227 | $ @testgen.com | 291 | $ @testgen.com 'pointer_size' |
| 228 | $ return | 292 | $ return |
| 229 | $ maybe_test_ss: | 293 | $ maybe_test_ss: |
| 230 | $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) | 294 | $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) |
| @@ -237,7 +301,7 @@ $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then - | |||
| 237 | $ return | 301 | $ return |
| 238 | $ test_ss: | 302 | $ test_ss: |
| 239 | $ write sys$output "Generate and certify a test certificate" | 303 | $ write sys$output "Generate and certify a test certificate" |
| 240 | $ @testss.com | 304 | $ @testss.com 'pointer_size' |
| 241 | $ return | 305 | $ return |
| 242 | $ test_engine: | 306 | $ test_engine: |
| 243 | $ write sys$output "Manipulate the ENGINE structures" | 307 | $ write sys$output "Manipulate the ENGINE structures" |
| @@ -246,11 +310,11 @@ $ return | |||
| 246 | $ test_ssl: | 310 | $ test_ssl: |
| 247 | $ write sys$output "test SSL protocol" | 311 | $ write sys$output "test SSL protocol" |
| 248 | $ gosub maybe_test_ss | 312 | $ gosub maybe_test_ss |
| 249 | $ @testssl.com keyU.ss certU.ss certCA.ss | 313 | $ @testssl.com keyU.ss certU.ss certCA.ss 'pointer_size' |
| 250 | $ return | 314 | $ return |
| 251 | $ test_ca: | 315 | $ test_ca: |
| 252 | $ set noon | 316 | $ set noon |
| 253 | $ define/user sys$output nla0: | 317 | $ define /user_mode sys$output test_ca.out |
| 254 | $ mcr 'exe_dir'openssl no-rsa | 318 | $ mcr 'exe_dir'openssl no-rsa |
| 255 | $ save_severity=$SEVERITY | 319 | $ save_severity=$SEVERITY |
| 256 | $ set on | 320 | $ set on |
| @@ -259,7 +323,7 @@ $ then | |||
| 259 | $ write sys$output "skipping CA.com test -- requires RSA" | 323 | $ write sys$output "skipping CA.com test -- requires RSA" |
| 260 | $ else | 324 | $ else |
| 261 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" | 325 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" |
| 262 | $ @testca.com | 326 | $ @testca.com 'pointer_size' |
| 263 | $ endif | 327 | $ endif |
| 264 | $ return | 328 | $ return |
| 265 | $ test_aes: | 329 | $ test_aes: |
| @@ -268,7 +332,7 @@ $! !mcr 'texe_dir''aestest' | |||
| 268 | $ return | 332 | $ return |
| 269 | $ test_tsa: | 333 | $ test_tsa: |
| 270 | $ set noon | 334 | $ set noon |
| 271 | $ define/user sys$output nla0: | 335 | $ define /user_mode sys$output nla0: |
| 272 | $ mcr 'exe_dir'openssl no-rsa | 336 | $ mcr 'exe_dir'openssl no-rsa |
| 273 | $ save_severity=$SEVERITY | 337 | $ save_severity=$SEVERITY |
| 274 | $ set on | 338 | $ set on |
| @@ -276,7 +340,7 @@ $ if save_severity | |||
| 276 | $ then | 340 | $ then |
| 277 | $ write sys$output "skipping testtsa.com test -- requires RSA" | 341 | $ write sys$output "skipping testtsa.com test -- requires RSA" |
| 278 | $ else | 342 | $ else |
| 279 | $ @testtsa.com | 343 | $ @testtsa.com "" "" "" 'pointer_size' |
| 280 | $ endif | 344 | $ endif |
| 281 | $ return | 345 | $ return |
| 282 | $ test_ige: | 346 | $ test_ige: |
| @@ -289,11 +353,14 @@ $ mcr 'texe_dir''jpaketest' | |||
| 289 | $ return | 353 | $ return |
| 290 | $ test_cms: | 354 | $ test_cms: |
| 291 | $ write sys$output "CMS consistency test" | 355 | $ write sys$output "CMS consistency test" |
| 356 | $ ! Define the logical name used to find openssl.exe in the perl script. | ||
| 357 | $ define /user_mode osslx 'exe_dir' | ||
| 292 | $ perl CMS-TEST.PL | 358 | $ perl CMS-TEST.PL |
| 293 | $ return | 359 | $ return |
| 294 | $ | 360 | $ |
| 295 | $ | 361 | $ |
| 296 | $ exit: | 362 | $ exit: |
| 363 | $ mcr 'exe_dir'openssl version -a | ||
| 297 | $ set default '__save_default' | 364 | $ set default '__save_default' |
| 298 | $ deassign sslroot | 365 | $ deassign sslroot |
| 299 | $ exit | 366 | $ exit |
diff --git a/src/lib/libssl/src/test/testss.com b/src/lib/libssl/src/test/testss.com index 6598106b09..32a74d0fc2 100644 --- a/src/lib/libssl/src/test/testss.com +++ b/src/lib/libssl/src/test/testss.com | |||
| @@ -1,16 +1,19 @@ | |||
| 1 | $! TESTSS.COM | 1 | $! TESTSS.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ digest="-md5" | 12 | $ digest="-md5" |
| 10 | $ reqcmd := mcr 'exe_dir'openssl req | 13 | $ reqcmd = "mcr ''exe_dir'openssl req" |
| 11 | $ x509cmd := mcr 'exe_dir'openssl x509 'digest' | 14 | $ x509cmd = "mcr ''exe_dir'openssl x509 ''digest'" |
| 12 | $ verifycmd := mcr 'exe_dir'openssl verify | 15 | $ verifycmd = "mcr ''exe_dir'openssl verify" |
| 13 | $ dummycnf := sys$disk:[-.apps]openssl-vms.cnf | 16 | $ dummycnf = "sys$disk:[-.apps]openssl-vms.cnf" |
| 14 | $ | 17 | $ |
| 15 | $ CAkey="""keyCA.ss""" | 18 | $ CAkey="""keyCA.ss""" |
| 16 | $ CAcert="""certCA.ss""" | 19 | $ CAcert="""certCA.ss""" |
diff --git a/src/lib/libssl/src/test/testssl.com b/src/lib/libssl/src/test/testssl.com index 9c83afba04..f19edc4719 100644 --- a/src/lib/libssl/src/test/testssl.com +++ b/src/lib/libssl/src/test/testssl.com | |||
| @@ -1,11 +1,14 @@ | |||
| 1 | $! TESTSSL.COM | 1 | $! TESTSSL.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ texe_dir := sys$disk:[-.'__arch'.exe.test] | 7 | $! |
| 8 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 8 | $ if (p4 .eqs. "64") then __arch = __arch+ "_64" |
| 9 | $! | ||
| 10 | $ texe_dir = "sys$disk:[-.''__arch'.exe.test]" | ||
| 11 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 9 | $ | 12 | $ |
| 10 | $ if p1 .eqs. "" | 13 | $ if p1 .eqs. "" |
| 11 | $ then | 14 | $ then |
| @@ -19,21 +22,21 @@ $ cert="[-.apps]server.pem" | |||
| 19 | $ else | 22 | $ else |
| 20 | $ cert=p2 | 23 | $ cert=p2 |
| 21 | $ endif | 24 | $ endif |
| 22 | $ ssltest := mcr 'texe_dir'ssltest -key 'key' -cert 'cert' -c_key 'key' -c_cert 'cert' | 25 | $ ssltest = "mcr ''texe_dir'ssltest -key ''key'"+ - |
| 23 | $ | 26 | " -cert ''cert' -c_key ''key' -c_cert ''cert'" |
| 27 | $! | ||
| 28 | $ set noon | ||
| 24 | $ define/user sys$output testssl-x509-output. | 29 | $ define/user sys$output testssl-x509-output. |
| 25 | $ define/user sys$error nla0: | 30 | $ define/user sys$error nla0: |
| 26 | $ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout | 31 | $ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout |
| 27 | $ set noon | ||
| 28 | $ define/user sys$error nla0: | 32 | $ define/user sys$error nla0: |
| 29 | $ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact | 33 | $ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact |
| 30 | $ if $severity .eq. 1 | 34 | $ if $severity .eq. 1 |
| 31 | $ then | 35 | $ then |
| 32 | $ dsa_cert := YES | 36 | $ dsa_cert = "YES" |
| 33 | $ else | 37 | $ else |
| 34 | $ dsa_cert := NO | 38 | $ dsa_cert = "NO" |
| 35 | $ endif | 39 | $ endif |
| 36 | $ set on | ||
| 37 | $ delete testssl-x509-output.;* | 40 | $ delete testssl-x509-output.;* |
| 38 | $ | 41 | $ |
| 39 | $ if p3 .eqs. "" | 42 | $ if p3 .eqs. "" |
| @@ -161,14 +164,12 @@ $ if $severity .ne. 1 then goto exit3 | |||
| 161 | $ | 164 | $ |
| 162 | $!########################################################################### | 165 | $!########################################################################### |
| 163 | $ | 166 | $ |
| 164 | $ set noon | ||
| 165 | $ define/user sys$output nla0: | 167 | $ define/user sys$output nla0: |
| 166 | $ mcr 'exe_dir'openssl no-rsa | 168 | $ mcr 'exe_dir'openssl no-rsa |
| 167 | $ no_rsa=$SEVERITY | 169 | $ no_rsa=$SEVERITY |
| 168 | $ define/user sys$output nla0: | 170 | $ define/user sys$output nla0: |
| 169 | $ mcr 'exe_dir'openssl no-dh | 171 | $ mcr 'exe_dir'openssl no-dh |
| 170 | $ no_dh=$SEVERITY | 172 | $ no_dh=$SEVERITY |
| 171 | $ set on | ||
| 172 | $ | 173 | $ |
| 173 | $ if no_dh | 174 | $ if no_dh |
| 174 | $ then | 175 | $ then |
| @@ -203,4 +204,5 @@ $ exit3: | |||
| 203 | $ RET = 3 | 204 | $ RET = 3 |
| 204 | $ exit: | 205 | $ exit: |
| 205 | $ if p3 .eqs. "" then delete certs.tmp;* | 206 | $ if p3 .eqs. "" then delete certs.tmp;* |
| 207 | $ set on | ||
| 206 | $ exit 'RET' | 208 | $ exit 'RET' |
diff --git a/src/lib/libssl/src/test/testtsa.com b/src/lib/libssl/src/test/testtsa.com index e3c586f14a..29fb1d0e63 100644 --- a/src/lib/libssl/src/test/testtsa.com +++ b/src/lib/libssl/src/test/testtsa.com | |||
| @@ -2,14 +2,17 @@ $! | |||
| 2 | $! A few very basic tests for the 'ts' time stamping authority command. | 2 | $! A few very basic tests for the 'ts' time stamping authority command. |
| 3 | $! | 3 | $! |
| 4 | $ | 4 | $ |
| 5 | $ __arch := VAX | 5 | $ __arch = "VAX" |
| 6 | $ if f$getsyi("cpu") .ge. 128 then - | 6 | $ if f$getsyi("cpu") .ge. 128 then - |
| 7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 8 | $ if __arch .eqs. "" then __arch := UNK | 8 | $ if __arch .eqs. "" then __arch = "UNK" |
| 9 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 9 | $! |
| 10 | $ if (p4 .eqs. "64") then __arch = __arch+ "_64" | ||
| 11 | $! | ||
| 12 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 10 | $ | 13 | $ |
| 11 | $ openssl := mcr 'f$parse(exe_dir+"openssl.exe")' | 14 | $ openssl = "mcr ''f$parse(exe_dir+"openssl.exe")'" |
| 12 | $ OPENSSL_CONF := [-]CAtsa.cnf | 15 | $ OPENSSL_CONF = "[-]CAtsa.cnf" |
| 13 | $ ! Because that's what ../apps/CA.sh really looks at | 16 | $ ! Because that's what ../apps/CA.sh really looks at |
| 14 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF | 17 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF |
| 15 | $ | 18 | $ |
| @@ -114,8 +117,8 @@ $ | |||
| 114 | $ time_stamp_response_token_test: | 117 | $ time_stamp_response_token_test: |
| 115 | $ subroutine | 118 | $ subroutine |
| 116 | $ | 119 | $ |
| 117 | $ RESPONSE2:='p2'.copy_tsr | 120 | $ RESPONSE2 = p2+ "-copy_tsr" |
| 118 | $ TOKEN_DER:='p2'.token_der | 121 | $ TOKEN_DER = p2+ "-token_der" |
| 119 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out | 122 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out |
| 120 | $ if $severity .ne. 1 then call error | 123 | $ if $severity .ne. 1 then call error |
| 121 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' | 124 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' |
| @@ -145,13 +148,13 @@ $ verify_time_stamp_token: | |||
| 145 | $ subroutine | 148 | $ subroutine |
| 146 | $ | 149 | $ |
| 147 | $ ! create the token from the response first | 150 | $ ! create the token from the response first |
| 148 | $ openssl ts -reply -in 'p2' -out 'p2'.token -token_out | 151 | $ openssl ts -reply -in "''p2'" -out "''p2'-token" -token_out |
| 149 | $ if $severity .ne. 1 then call error | 152 | $ if $severity .ne. 1 then call error |
| 150 | $ openssl ts -verify -queryfile 'p1' -in 'p2'.token -token_in - | 153 | $ openssl ts -verify -queryfile "''p1'" -in "''p2'-token" - |
| 151 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 154 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
| 152 | $ if $severity .ne. 1 then call error | 155 | $ if $severity .ne. 1 then call error |
| 153 | $ openssl ts -verify -data 'p3' -in 'p2'.token -token_in - | 156 | $ openssl ts -verify -data "''p3'" -in "''p2'-token" - |
| 154 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 157 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
| 155 | $ if $severity .ne. 1 then call error | 158 | $ if $severity .ne. 1 then call error |
| 156 | $ endsubroutine | 159 | $ endsubroutine |
| 157 | $ | 160 | $ |
| @@ -167,6 +170,8 @@ $ endsubroutine | |||
| 167 | $ | 170 | $ |
| 168 | $ ! Main body ---------------------------------------------------------- | 171 | $ ! Main body ---------------------------------------------------------- |
| 169 | $ | 172 | $ |
| 173 | $ set noon | ||
| 174 | $ | ||
| 170 | $ write sys$output "Setting up TSA test directory..." | 175 | $ write sys$output "Setting up TSA test directory..." |
| 171 | $ call setup_dir | 176 | $ call setup_dir |
| 172 | $ | 177 | $ |
| @@ -183,66 +188,68 @@ $ write sys$output "Creating req1.req time stamp request for file testtsa..." | |||
| 183 | $ call create_time_stamp_request1 | 188 | $ call create_time_stamp_request1 |
| 184 | $ | 189 | $ |
| 185 | $ write sys$output "Printing req1.req..." | 190 | $ write sys$output "Printing req1.req..." |
| 186 | $ call print_request req1.tsq | 191 | $ call print_request "req1.tsq" |
| 187 | $ | 192 | $ |
| 188 | $ write sys$output "Generating valid response for req1.req..." | 193 | $ write sys$output "Generating valid response for req1.req..." |
| 189 | $ call create_time_stamp_response req1.tsq resp1.tsr tsa_config1 | 194 | $ call create_time_stamp_response "req1.tsq" "resp1.tsr" "tsa_config1" |
| 190 | $ | 195 | $ |
| 191 | $ write sys$output "Printing response..." | 196 | $ write sys$output "Printing response..." |
| 192 | $ call print_response resp1.tsr | 197 | $ call print_response "resp1.tsr" |
| 193 | $ | 198 | $ |
| 194 | $ write sys$output "Verifying valid response..." | 199 | $ write sys$output "Verifying valid response..." |
| 195 | $ call verify_time_stamp_response req1.tsq resp1.tsr [-]testtsa.com | 200 | $ call verify_time_stamp_response "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
| 196 | $ | 201 | $ |
| 197 | $ write sys$output "Verifying valid token..." | 202 | $ write sys$output "Verifying valid token..." |
| 198 | $ call verify_time_stamp_token req1.tsq resp1.tsr [-]testtsa.com | 203 | $ call verify_time_stamp_token "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
| 199 | $ | 204 | $ |
| 200 | $ ! The tests below are commented out, because invalid signer certificates | 205 | $ ! The tests below are commented out, because invalid signer certificates |
| 201 | $ ! can no longer be specified in the config file. | 206 | $ ! can no longer be specified in the config file. |
| 202 | $ | 207 | $ |
| 203 | $ ! write sys$output "Generating _invalid_ response for req1.req..." | 208 | $ ! write sys$output "Generating _invalid_ response for req1.req..." |
| 204 | $ ! call create_time_stamp_response req1.tsq resp1_bad.tsr tsa_config2 | 209 | $ ! call create_time_stamp_response "req1.tsq" "resp1_bad.tsr" "tsa_config2" |
| 205 | $ | 210 | $ |
| 206 | $ ! write sys$output "Printing response..." | 211 | $ ! write sys$output "Printing response..." |
| 207 | $ ! call print_response resp1_bad.tsr | 212 | $ ! call print_response "resp1_bad.tsr" |
| 208 | $ | 213 | $ |
| 209 | $ ! write sys$output "Verifying invalid response, it should fail..." | 214 | $ ! write sys$output "Verifying invalid response, it should fail..." |
| 210 | $ ! call verify_time_stamp_response_fail req1.tsq resp1_bad.tsr | 215 | $ ! call verify_time_stamp_response_fail "req1.tsq" "resp1_bad.tsr" |
| 211 | $ | 216 | $ |
| 212 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." | 217 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." |
| 213 | $ call create_time_stamp_request2 | 218 | $ call create_time_stamp_request2 |
| 214 | $ | 219 | $ |
| 215 | $ write sys$output "Printing req2.req..." | 220 | $ write sys$output "Printing req2.req..." |
| 216 | $ call print_request req2.tsq | 221 | $ call print_request "req2.tsq" |
| 217 | $ | 222 | $ |
| 218 | $ write sys$output "Generating valid response for req2.req..." | 223 | $ write sys$output "Generating valid response for req2.req..." |
| 219 | $ call create_time_stamp_response req2.tsq resp2.tsr tsa_config1 | 224 | $ call create_time_stamp_response "req2.tsq" "resp2.tsr" "tsa_config1" |
| 220 | $ | 225 | $ |
| 221 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." | 226 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." |
| 222 | $ call time_stamp_response_token_test req2.tsq resp2.tsr | 227 | $ call time_stamp_response_token_test "req2.tsq" "resp2.tsr" |
| 223 | $ | 228 | $ |
| 224 | $ write sys$output "Printing response..." | 229 | $ write sys$output "Printing response..." |
| 225 | $ call print_response resp2.tsr | 230 | $ call print_response "resp2.tsr" |
| 226 | $ | 231 | $ |
| 227 | $ write sys$output "Verifying valid response..." | 232 | $ write sys$output "Verifying valid response..." |
| 228 | $ call verify_time_stamp_response req2.tsq resp2.tsr [-]testtsa.com | 233 | $ call verify_time_stamp_response "req2.tsq" "resp2.tsr" "[-]testtsa.com" |
| 229 | $ | 234 | $ |
| 230 | $ write sys$output "Verifying response against wrong request, it should fail..." | 235 | $ write sys$output "Verifying response against wrong request, it should fail..." |
| 231 | $ call verify_time_stamp_response_fail req1.tsq resp2.tsr | 236 | $ call verify_time_stamp_response_fail "req1.tsq" "resp2.tsr" |
| 232 | $ | 237 | $ |
| 233 | $ write sys$output "Verifying response against wrong request, it should fail..." | 238 | $ write sys$output "Verifying response against wrong request, it should fail..." |
| 234 | $ call verify_time_stamp_response_fail req2.tsq resp1.tsr | 239 | $ call verify_time_stamp_response_fail "req2.tsq" "resp1.tsr" |
| 235 | $ | 240 | $ |
| 236 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." | 241 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." |
| 237 | $ call create_time_stamp_request3 | 242 | $ call create_time_stamp_request3 |
| 238 | $ | 243 | $ |
| 239 | $ write sys$output "Printing req3.req..." | 244 | $ write sys$output "Printing req3.req..." |
| 240 | $ call print_request req3.tsq | 245 | $ call print_request "req3.tsq" |
| 241 | $ | 246 | $ |
| 242 | $ write sys$output "Verifying response against wrong request, it should fail..." | 247 | $ write sys$output "Verifying response against wrong request, it should fail..." |
| 243 | $ call verify_time_stamp_response_fail req3.tsq resp1.tsr | 248 | $ call verify_time_stamp_response_fail "req3.tsq" "resp1.tsr" |
| 244 | $ | 249 | $ |
| 245 | $ write sys$output "Cleaning up..." | 250 | $ write sys$output "Cleaning up..." |
| 246 | $ call clean_up_dir | 251 | $ call clean_up_dir |
| 247 | $ | 252 | $ |
| 253 | $ set on | ||
| 254 | $ | ||
| 248 | $ exit | 255 | $ exit |
diff --git a/src/lib/libssl/src/test/tpkcs7.com b/src/lib/libssl/src/test/tpkcs7.com index e107cc141a..3fc4982bb0 100644 --- a/src/lib/libssl/src/test/tpkcs7.com +++ b/src/lib/libssl/src/test/tpkcs7.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TPKCS7.COM -- Tests pkcs7 keys | 1 | $! TPKCS7.COM -- Tests pkcs7 keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl pkcs7 | 12 | $ cmd = "mcr ''exe_dir'openssl pkcs7" |
| 10 | $ | 13 | $ |
| 11 | $ t := testp7.pem | 14 | $ t = "testp7.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing PKCS7 conversions" | 17 | $ write sys$output "testing PKCS7 conversions" |
diff --git a/src/lib/libssl/src/test/tpkcs7d.com b/src/lib/libssl/src/test/tpkcs7d.com index 5ff653ccee..eea8c888ee 100644 --- a/src/lib/libssl/src/test/tpkcs7d.com +++ b/src/lib/libssl/src/test/tpkcs7d.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TPKCS7.COM -- Tests pkcs7 keys | 1 | $! TPKCS7.COM -- Tests pkcs7 keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl pkcs7 | 12 | $ cmd = "mcr ''exe_dir'openssl pkcs7" |
| 10 | $ | 13 | $ |
| 11 | $ t := pkcs7-1.pem | 14 | $ t = "pkcs7-1.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing PKCS7 conversions (2)" | 17 | $ write sys$output "testing PKCS7 conversions (2)" |
diff --git a/src/lib/libssl/src/test/treq.com b/src/lib/libssl/src/test/treq.com index d2594be6a7..acf08b79ef 100644 --- a/src/lib/libssl/src/test/treq.com +++ b/src/lib/libssl/src/test/treq.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TREQ.COM -- Tests req keys | 1 | $! TREQ.COM -- Tests req keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl req -config [-.apps]openssl-vms.cnf | 12 | $ cmd = "mcr ''exe_dir'openssl req -config [-.apps]openssl-vms.cnf" |
| 10 | $ | 13 | $ |
| 11 | $ t := testreq.pem | 14 | $ t = "testreq.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing req conversions" | 17 | $ write sys$output "testing req conversions" |
diff --git a/src/lib/libssl/src/test/trsa.com b/src/lib/libssl/src/test/trsa.com index d3a8a605b7..54180843ee 100644 --- a/src/lib/libssl/src/test/trsa.com +++ b/src/lib/libssl/src/test/trsa.com | |||
| @@ -1,10 +1,13 @@ | |||
| 1 | $! TRSA.COM -- Tests rsa keys | 1 | $! TRSA.COM -- Tests rsa keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ set noon | 12 | $ set noon |
| 10 | $ define/user sys$output nla0: | 13 | $ define/user sys$output nla0: |
| @@ -17,9 +20,9 @@ $ write sys$output "skipping RSA conversion test" | |||
| 17 | $ exit | 20 | $ exit |
| 18 | $ endif | 21 | $ endif |
| 19 | $ | 22 | $ |
| 20 | $ cmd := mcr 'exe_dir'openssl rsa | 23 | $ cmd = "mcr ''exe_dir'openssl rsa" |
| 21 | $ | 24 | $ |
| 22 | $ t := testrsa.pem | 25 | $ t = "testrsa.pem" |
| 23 | $ if p1 .nes. "" then t = p1 | 26 | $ if p1 .nes. "" then t = p1 |
| 24 | $ | 27 | $ |
| 25 | $ write sys$output "testing RSA conversions" | 28 | $ write sys$output "testing RSA conversions" |
diff --git a/src/lib/libssl/src/test/tsid.com b/src/lib/libssl/src/test/tsid.com index 267ace1135..b6c4e49473 100644 --- a/src/lib/libssl/src/test/tsid.com +++ b/src/lib/libssl/src/test/tsid.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TSID.COM -- Tests sid keys | 1 | $! TSID.COM -- Tests sid keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl sess_id | 12 | $ cmd = "mcr ''exe_dir'openssl sess_id" |
| 10 | $ | 13 | $ |
| 11 | $ t := testsid.pem | 14 | $ t = "testsid.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing session-id conversions" | 17 | $ write sys$output "testing session-id conversions" |
diff --git a/src/lib/libssl/src/test/tverify.com b/src/lib/libssl/src/test/tverify.com index 01431f4aac..d888344637 100644 --- a/src/lib/libssl/src/test/tverify.com +++ b/src/lib/libssl/src/test/tverify.com | |||
| @@ -1,13 +1,15 @@ | |||
| 1 | $! TVERIFY.COM | 1 | $! TVERIFY.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $! | ||
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 7 | $! | 9 | $! |
| 8 | $ line_max = 255 ! Could be longer on modern non-VAX. | 10 | $ line_max = 255 ! Could be longer on modern non-VAX. |
| 9 | $ temp_file_name = "certs_"+ f$getjpi( "", "PID")+ ".tmp" | 11 | $ temp_file_name = "certs_"+ f$getjpi( "", "PID")+ ".tmp" |
| 10 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 12 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" |
| 11 | $ cmd = "mcr ''exe_dir'openssl verify ""-CAfile"" ''temp_file_name'" | 13 | $ cmd = "mcr ''exe_dir'openssl verify ""-CAfile"" ''temp_file_name'" |
| 12 | $ cmd_len = f$length( cmd) | 14 | $ cmd_len = f$length( cmd) |
| 13 | $ pems = "[-.certs...]*.pem" | 15 | $ pems = "[-.certs...]*.pem" |
| @@ -19,7 +21,7 @@ $! | |||
| 19 | $! Loop through all the certificate files. | 21 | $! Loop through all the certificate files. |
| 20 | $! | 22 | $! |
| 21 | $ args = "" | 23 | $ args = "" |
| 22 | $ old_f := | 24 | $ old_f = "" |
| 23 | $ loop_file: | 25 | $ loop_file: |
| 24 | $ f = f$search( pems) | 26 | $ f = f$search( pems) |
| 25 | $ if ((f .nes. "") .and. (f .nes. old_f)) | 27 | $ if ((f .nes. "") .and. (f .nes. old_f)) |
diff --git a/src/lib/libssl/src/test/tx509.com b/src/lib/libssl/src/test/tx509.com index 399eb01490..93ce988b41 100644 --- a/src/lib/libssl/src/test/tx509.com +++ b/src/lib/libssl/src/test/tx509.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TX509.COM -- Tests x509 certificates | 1 | $! TX509.COM -- Tests x509 certificates |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl x509 | 12 | $ cmd = "mcr ''exe_dir'openssl x509" |
| 10 | $ | 13 | $ |
| 11 | $ t := testx509.pem | 14 | $ t = "testx509.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing X509 conversions" | 17 | $ write sys$output "testing X509 conversions" |
diff --git a/src/lib/libssl/src/util/cygwin.sh b/src/lib/libssl/src/util/cygwin.sh index a4f2e740b4..d6228521e6 100644 --- a/src/lib/libssl/src/util/cygwin.sh +++ b/src/lib/libssl/src/util/cygwin.sh | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #set -x | 8 | #set -x |
| 9 | 9 | ||
| 10 | CONFIG_OPTIONS="--prefix=/usr shared zlib no-idea no-rc5" | 10 | CONFIG_OPTIONS="--prefix=/usr shared zlib no-idea no-rc5" |
| 11 | INSTALL_PREFIX=/tmp/install | 11 | INSTALL_PREFIX=/tmp/install/INSTALL |
| 12 | 12 | ||
| 13 | VERSION= | 13 | VERSION= |
| 14 | SUBVERSION=$1 | 14 | SUBVERSION=$1 |
| @@ -124,8 +124,12 @@ strip usr/bin/*.exe usr/bin/*.dll usr/lib/engines/*.so | |||
| 124 | chmod u-w usr/lib/engines/*.so | 124 | chmod u-w usr/lib/engines/*.so |
| 125 | 125 | ||
| 126 | # Runtime package | 126 | # Runtime package |
| 127 | find etc usr/bin usr/lib/engines usr/share/doc usr/ssl/certs \ | 127 | tar cjf libopenssl${VERSION//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 \ |
| 128 | usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private \ | 128 | usr/bin/cyg*dll |
| 129 | # Base package | ||
| 130 | find etc usr/bin/openssl.exe usr/bin/c_rehash usr/lib/engines usr/share/doc \ | ||
| 131 | usr/ssl/certs usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf \ | ||
| 132 | usr/ssl/private \ | ||
| 129 | -empty -o \! -type d | | 133 | -empty -o \! -type d | |
| 130 | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - | 134 | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - |
| 131 | # Development package | 135 | # Development package |
| @@ -135,6 +139,7 @@ tar cjfT openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 - | |||
| 135 | 139 | ||
| 136 | ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2 | 140 | ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2 |
| 137 | ls -l openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 | 141 | ls -l openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 |
| 142 | ls -l libopenssl${VERSION//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 | ||
| 138 | 143 | ||
| 139 | cleanup | 144 | cleanup |
| 140 | 145 | ||
diff --git a/src/lib/libssl/src/util/libeay.num b/src/lib/libssl/src/util/libeay.num index 6f3067ae2b..b23619f20a 100644 --- a/src/lib/libssl/src/util/libeay.num +++ b/src/lib/libssl/src/util/libeay.num | |||
| @@ -4178,3 +4178,19 @@ UI_method_get_prompt_constructr 4550 EXIST:VMS:FUNCTION: | |||
| 4178 | UI_method_set_prompt_constructor 4551 EXIST:!VMS:FUNCTION: | 4178 | UI_method_set_prompt_constructor 4551 EXIST:!VMS:FUNCTION: |
| 4179 | UI_method_set_prompt_constructr 4551 EXIST:VMS:FUNCTION: | 4179 | UI_method_set_prompt_constructr 4551 EXIST:VMS:FUNCTION: |
| 4180 | EVP_read_pw_string_min 4552 EXIST::FUNCTION: | 4180 | EVP_read_pw_string_min 4552 EXIST::FUNCTION: |
| 4181 | CRYPTO_cts128_encrypt 4553 EXIST::FUNCTION: | ||
| 4182 | CRYPTO_cts128_decrypt_block 4554 EXIST::FUNCTION: | ||
| 4183 | CRYPTO_cfb128_1_encrypt 4555 EXIST::FUNCTION: | ||
| 4184 | CRYPTO_cbc128_encrypt 4556 EXIST::FUNCTION: | ||
| 4185 | CRYPTO_ctr128_encrypt 4557 EXIST::FUNCTION: | ||
| 4186 | CRYPTO_ofb128_encrypt 4558 EXIST::FUNCTION: | ||
| 4187 | CRYPTO_cts128_decrypt 4559 EXIST::FUNCTION: | ||
| 4188 | CRYPTO_cts128_encrypt_block 4560 EXIST::FUNCTION: | ||
| 4189 | CRYPTO_cbc128_decrypt 4561 EXIST::FUNCTION: | ||
| 4190 | CRYPTO_cfb128_encrypt 4562 EXIST::FUNCTION: | ||
| 4191 | CRYPTO_cfb128_8_encrypt 4563 EXIST::FUNCTION: | ||
| 4192 | OPENSSL_strcasecmp 4564 EXIST::FUNCTION: | ||
| 4193 | OPENSSL_memcmp 4565 EXIST::FUNCTION: | ||
| 4194 | OPENSSL_strncasecmp 4566 EXIST::FUNCTION: | ||
| 4195 | OPENSSL_gmtime 4567 EXIST::FUNCTION: | ||
| 4196 | OPENSSL_gmtime_adj 4568 EXIST::FUNCTION: | ||
diff --git a/src/lib/libssl/src/util/mk1mf.pl b/src/lib/libssl/src/util/mk1mf.pl index 280e9de1ad..afe8c7326d 100644 --- a/src/lib/libssl/src/util/mk1mf.pl +++ b/src/lib/libssl/src/util/mk1mf.pl | |||
| @@ -13,6 +13,7 @@ $banner="\t\@echo Building OpenSSL"; | |||
| 13 | 13 | ||
| 14 | my $no_static_engine = 1; | 14 | my $no_static_engine = 1; |
| 15 | my $engines = ""; | 15 | my $engines = ""; |
| 16 | my $otherlibs = ""; | ||
| 16 | local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic | 17 | local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic |
| 17 | local $zlib_lib = ""; | 18 | local $zlib_lib = ""; |
| 18 | local $perl_asm = 0; # 1 to autobuild asm files from perl scripts | 19 | local $perl_asm = 0; # 1 to autobuild asm files from perl scripts |
| @@ -266,6 +267,7 @@ $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; | |||
| 266 | $cflags.=" -DOPENSSL_NO_EC" if $no_ec; | 267 | $cflags.=" -DOPENSSL_NO_EC" if $no_ec; |
| 267 | $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa; | 268 | $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa; |
| 268 | $cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh; | 269 | $cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh; |
| 270 | $cflags.=" -DOPENSSL_NO_GOST" if $no_gost; | ||
| 269 | $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; | 271 | $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; |
| 270 | $cflags.=" -DOPENSSL_NO_HW" if $no_hw; | 272 | $cflags.=" -DOPENSSL_NO_HW" if $no_hw; |
| 271 | $cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake; | 273 | $cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake; |
| @@ -356,6 +358,12 @@ for (;;) | |||
| 356 | $lib=$val; | 358 | $lib=$val; |
| 357 | $lib =~ s/^.*\/([^\/]+)$/$1/; | 359 | $lib =~ s/^.*\/([^\/]+)$/$1/; |
| 358 | } | 360 | } |
| 361 | if ($key eq "LIBNAME" && $no_static_engine) | ||
| 362 | { | ||
| 363 | $lib=$val; | ||
| 364 | $lib =~ s/^.*\/([^\/]+)$/$1/; | ||
| 365 | $otherlibs .= " $lib"; | ||
| 366 | } | ||
| 359 | 367 | ||
| 360 | if ($key eq "EXHEADER") | 368 | if ($key eq "EXHEADER") |
| 361 | { $exheader.=&var_add($dir,$val, 1); } | 369 | { $exheader.=&var_add($dir,$val, 1); } |
| @@ -658,7 +666,7 @@ foreach (split(/\s+/,$test)) | |||
| 658 | $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); | 666 | $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); |
| 659 | } | 667 | } |
| 660 | 668 | ||
| 661 | $defs.=&do_defs("E_SHLIB",$engines,"\$(ENG_D)",$shlibp); | 669 | $defs.=&do_defs("E_SHLIB",$engines . $otherlibs,"\$(ENG_D)",$shlibp); |
| 662 | 670 | ||
| 663 | foreach (split(/\s+/,$engines)) | 671 | foreach (split(/\s+/,$engines)) |
| 664 | { | 672 | { |
| @@ -671,6 +679,14 @@ foreach (split(/\s+/,$engines)) | |||
| 671 | $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); | 679 | $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); |
| 672 | $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); | 680 | $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); |
| 673 | 681 | ||
| 682 | foreach (split(" ",$otherlibs)) | ||
| 683 | { | ||
| 684 | my $uc = $_; | ||
| 685 | $uc =~ tr /a-z/A-Z/; | ||
| 686 | $rules.= &do_lib_rule("\$(${uc}OBJ)","\$(ENG_D)$o$_$shlibp", "", $shlib, ""); | ||
| 687 | |||
| 688 | } | ||
| 689 | |||
| 674 | $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); | 690 | $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); |
| 675 | 691 | ||
| 676 | print $defs; | 692 | print $defs; |
| @@ -708,6 +724,7 @@ sub var_add | |||
| 708 | return("") if $no_dsa && $dir =~ /\/dsa/; | 724 | return("") if $no_dsa && $dir =~ /\/dsa/; |
| 709 | return("") if $no_dh && $dir =~ /\/dh/; | 725 | return("") if $no_dh && $dir =~ /\/dh/; |
| 710 | return("") if $no_ec && $dir =~ /\/ec/; | 726 | return("") if $no_ec && $dir =~ /\/ec/; |
| 727 | return("") if $no_gost && $dir =~ /\/ccgost/; | ||
| 711 | return("") if $no_cms && $dir =~ /\/cms/; | 728 | return("") if $no_cms && $dir =~ /\/cms/; |
| 712 | return("") if $no_jpake && $dir =~ /\/jpake/; | 729 | return("") if $no_jpake && $dir =~ /\/jpake/; |
| 713 | if ($no_des && $dir =~ /\/des/) | 730 | if ($no_des && $dir =~ /\/des/) |
| @@ -1047,6 +1064,7 @@ sub read_options | |||
| 1047 | "no-ec" => \$no_ec, | 1064 | "no-ec" => \$no_ec, |
| 1048 | "no-ecdsa" => \$no_ecdsa, | 1065 | "no-ecdsa" => \$no_ecdsa, |
| 1049 | "no-ecdh" => \$no_ecdh, | 1066 | "no-ecdh" => \$no_ecdh, |
| 1067 | "no-gost" => \$no_gost, | ||
| 1050 | "no-engine" => \$no_engine, | 1068 | "no-engine" => \$no_engine, |
| 1051 | "no-hw" => \$no_hw, | 1069 | "no-hw" => \$no_hw, |
| 1052 | "just-ssl" => | 1070 | "just-ssl" => |
diff --git a/src/lib/libssl/src/util/mkdef.pl b/src/lib/libssl/src/util/mkdef.pl index a4a17e3ae9..ab47329097 100644 --- a/src/lib/libssl/src/util/mkdef.pl +++ b/src/lib/libssl/src/util/mkdef.pl | |||
| @@ -257,6 +257,8 @@ $ssl.=" ssl/tls1.h"; | |||
| 257 | 257 | ||
| 258 | my $crypto ="crypto/crypto.h"; | 258 | my $crypto ="crypto/crypto.h"; |
| 259 | $crypto.=" crypto/o_dir.h"; | 259 | $crypto.=" crypto/o_dir.h"; |
| 260 | $crypto.=" crypto/o_str.h"; | ||
| 261 | $crypto.=" crypto/o_time.h"; | ||
| 260 | $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; | 262 | $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; |
| 261 | $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; | 263 | $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; |
| 262 | $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; | 264 | $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; |
| @@ -316,6 +318,7 @@ $crypto.=" crypto/krb5/krb5_asn.h"; | |||
| 316 | $crypto.=" crypto/pqueue/pqueue.h"; | 318 | $crypto.=" crypto/pqueue/pqueue.h"; |
| 317 | $crypto.=" crypto/cms/cms.h"; | 319 | $crypto.=" crypto/cms/cms.h"; |
| 318 | $crypto.=" crypto/jpake/jpake.h"; | 320 | $crypto.=" crypto/jpake/jpake.h"; |
| 321 | $crypto.=" crypto/modes/modes.h"; | ||
| 319 | 322 | ||
| 320 | my $symhacks="crypto/symhacks.h"; | 323 | my $symhacks="crypto/symhacks.h"; |
| 321 | 324 | ||
diff --git a/src/lib/libssl/src/util/mkerr.pl b/src/lib/libssl/src/util/mkerr.pl index 15b774f277..2c99467d34 100644 --- a/src/lib/libssl/src/util/mkerr.pl +++ b/src/lib/libssl/src/util/mkerr.pl | |||
| @@ -391,7 +391,7 @@ foreach $lib (keys %csrc) | |||
| 391 | } else { | 391 | } else { |
| 392 | push @out, | 392 | push @out, |
| 393 | "/* ====================================================================\n", | 393 | "/* ====================================================================\n", |
| 394 | " * Copyright (c) 2001-2010 The OpenSSL Project. All rights reserved.\n", | 394 | " * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved.\n", |
| 395 | " *\n", | 395 | " *\n", |
| 396 | " * Redistribution and use in source and binary forms, with or without\n", | 396 | " * Redistribution and use in source and binary forms, with or without\n", |
| 397 | " * modification, are permitted provided that the following conditions\n", | 397 | " * modification, are permitted provided that the following conditions\n", |
| @@ -576,7 +576,7 @@ EOF | |||
| 576 | print OUT <<"EOF"; | 576 | print OUT <<"EOF"; |
| 577 | /* $cfile */ | 577 | /* $cfile */ |
| 578 | /* ==================================================================== | 578 | /* ==================================================================== |
| 579 | * Copyright (c) 1999-2010 The OpenSSL Project. All rights reserved. | 579 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. |
| 580 | * | 580 | * |
| 581 | * Redistribution and use in source and binary forms, with or without | 581 | * Redistribution and use in source and binary forms, with or without |
| 582 | * modification, are permitted provided that the following conditions | 582 | * modification, are permitted provided that the following conditions |
diff --git a/src/lib/libssl/src/util/mkstack.pl b/src/lib/libssl/src/util/mkstack.pl index 6a43757c95..f708610a78 100644 --- a/src/lib/libssl/src/util/mkstack.pl +++ b/src/lib/libssl/src/util/mkstack.pl | |||
| @@ -104,25 +104,25 @@ EOF | |||
| 104 | 104 | ||
| 105 | #define sk_${t1}_new(cmp) ((STACK_OF($t1) *)sk_new(CHECKED_SK_CMP_FUNC($t2, cmp))) | 105 | #define sk_${t1}_new(cmp) ((STACK_OF($t1) *)sk_new(CHECKED_SK_CMP_FUNC($t2, cmp))) |
| 106 | #define sk_${t1}_new_null() ((STACK_OF($t1) *)sk_new_null()) | 106 | #define sk_${t1}_new_null() ((STACK_OF($t1) *)sk_new_null()) |
| 107 | #define sk_${t1}_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF($t1), st), CHECKED_PTR_OF($t2, val)) | 107 | #define sk_${t1}_push(st, val) sk_push(CHECKED_STACK_OF($t1, st), CHECKED_PTR_OF($t2, val)) |
| 108 | #define sk_${t1}_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF($t1), st), CHECKED_PTR_OF($t2, val)) | 108 | #define sk_${t1}_find(st, val) sk_find(CHECKED_STACK_OF($t1, st), CHECKED_PTR_OF($t2, val)) |
| 109 | #define sk_${t1}_value(st, i) (($t1)sk_value(CHECKED_PTR_OF(STACK_OF($t1), st), i)) | 109 | #define sk_${t1}_value(st, i) (($t1)sk_value(CHECKED_STACK_OF($t1, st), i)) |
| 110 | #define sk_${t1}_num(st) SKM_sk_num($t1, st) | 110 | #define sk_${t1}_num(st) SKM_sk_num($t1, st) |
| 111 | #define sk_${t1}_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF($t1), st), CHECKED_SK_FREE_FUNC2($t1, free_func)) | 111 | #define sk_${t1}_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF($t1, st), CHECKED_SK_FREE_FUNC2($t1, free_func)) |
| 112 | #define sk_${t1}_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF($t1), st), CHECKED_PTR_OF($t2, val), i) | 112 | #define sk_${t1}_insert(st, val, i) sk_insert(CHECKED_STACK_OF($t1, st), CHECKED_PTR_OF($t2, val), i) |
| 113 | #define sk_${t1}_free(st) SKM_sk_free(${t1}, st) | 113 | #define sk_${t1}_free(st) SKM_sk_free(${t1}, st) |
| 114 | #define sk_${t1}_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF($t1), st), i, CHECKED_PTR_OF($t2, val)) | 114 | #define sk_${t1}_set(st, i, val) sk_set(CHECKED_STACK_OF($t1, st), i, CHECKED_PTR_OF($t2, val)) |
| 115 | #define sk_${t1}_zero(st) SKM_sk_zero($t1, (st)) | 115 | #define sk_${t1}_zero(st) SKM_sk_zero($t1, (st)) |
| 116 | #define sk_${t1}_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF($t1), st), CHECKED_PTR_OF($t2, val)) | 116 | #define sk_${t1}_unshift(st, val) sk_unshift(CHECKED_STACK_OF($t1, st), CHECKED_PTR_OF($t2, val)) |
| 117 | #define sk_${t1}_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF($t1), st), CHECKED_CONST_PTR_OF($t2, val)) | 117 | #define sk_${t1}_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF($t1), st), CHECKED_CONST_PTR_OF($t2, val)) |
| 118 | #define sk_${t1}_delete(st, i) SKM_sk_delete($t1, (st), (i)) | 118 | #define sk_${t1}_delete(st, i) SKM_sk_delete($t1, (st), (i)) |
| 119 | #define sk_${t1}_delete_ptr(st, ptr) ($t1 *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF($t1), st), CHECKED_PTR_OF($t2, ptr)) | 119 | #define sk_${t1}_delete_ptr(st, ptr) ($t1 *)sk_delete_ptr(CHECKED_STACK_OF($t1, st), CHECKED_PTR_OF($t2, ptr)) |
| 120 | #define sk_${t1}_set_cmp_func(st, cmp) \\ | 120 | #define sk_${t1}_set_cmp_func(st, cmp) \\ |
| 121 | ((int (*)(const $t2 * const *,const $t2 * const *)) \\ | 121 | ((int (*)(const $t2 * const *,const $t2 * const *)) \\ |
| 122 | sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF($t1), st), CHECKED_SK_CMP_FUNC($t2, cmp))) | 122 | sk_set_cmp_func(CHECKED_STACK_OF($t1, st), CHECKED_SK_CMP_FUNC($t2, cmp))) |
| 123 | #define sk_${t1}_dup(st) SKM_sk_dup($t1, st) | 123 | #define sk_${t1}_dup(st) SKM_sk_dup($t1, st) |
| 124 | #define sk_${t1}_shift(st) SKM_sk_shift($t1, (st)) | 124 | #define sk_${t1}_shift(st) SKM_sk_shift($t1, (st)) |
| 125 | #define sk_${t1}_pop(st) ($t2 *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF($t1), st)) | 125 | #define sk_${t1}_pop(st) ($t2 *)sk_pop(CHECKED_STACK_OF($t1, st)) |
| 126 | #define sk_${t1}_sort(st) SKM_sk_sort($t1, (st)) | 126 | #define sk_${t1}_sort(st) SKM_sk_sort($t1, (st)) |
| 127 | #define sk_${t1}_is_sorted(st) SKM_sk_is_sorted($t1, (st)) | 127 | #define sk_${t1}_is_sorted(st) SKM_sk_is_sorted($t1, (st)) |
| 128 | 128 | ||
diff --git a/src/lib/libssl/src/util/pl/VC-32.pl b/src/lib/libssl/src/util/pl/VC-32.pl index c3e29fda96..5f25fc41bf 100644 --- a/src/lib/libssl/src/util/pl/VC-32.pl +++ b/src/lib/libssl/src/util/pl/VC-32.pl | |||
| @@ -138,8 +138,8 @@ else | |||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | # generate symbols.pdb unconditionally | 140 | # generate symbols.pdb unconditionally |
| 141 | $app_cflag.=" /Zi /Fd$tmp_def/app"; | 141 | $app_cflag.=" /Zi /Fd\$(TMP_D)/app"; |
| 142 | $lib_cflag.=" /Zi /Fd$tmp_def/lib"; | 142 | $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; |
| 143 | $lflags.=" /debug"; | 143 | $lflags.=" /debug"; |
| 144 | 144 | ||
| 145 | $obj='.obj'; | 145 | $obj='.obj'; |
| @@ -195,7 +195,7 @@ if ($FLAVOR =~ /WIN64A/) { | |||
| 195 | my $ver=`nasm -v 2>NUL`; | 195 | my $ver=`nasm -v 2>NUL`; |
| 196 | my $vew=`nasmw -v 2>NUL`; | 196 | my $vew=`nasmw -v 2>NUL`; |
| 197 | # pick newest version | 197 | # pick newest version |
| 198 | $asm=($ver gt $vew?"nasm":"nasmw")." -f win32"; | 198 | $asm=($ver ge $vew?"nasm":"nasmw")." -f win32"; |
| 199 | $asmtype="win32n"; | 199 | $asmtype="win32n"; |
| 200 | $afile='-o '; | 200 | $afile='-o '; |
| 201 | } else { | 201 | } else { |
diff --git a/src/lib/libssl/test/bctest.com b/src/lib/libssl/test/bctest.com new file mode 100644 index 0000000000..d7e5ec139e --- /dev/null +++ b/src/lib/libssl/test/bctest.com | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | $! | ||
| 2 | $! Check operation of "bc". | ||
| 3 | $! | ||
| 4 | $! 2010-04-05 SMS. New. Based (loosely) on "bctest". | ||
| 5 | $! | ||
| 6 | $! | ||
| 7 | $ tmp_file_name = "tmp.bctest" | ||
| 8 | $ failure = "" | ||
| 9 | $! | ||
| 10 | $! Basic command test. | ||
| 11 | $! | ||
| 12 | $ on warning then goto bc_fail | ||
| 13 | $ bc | ||
| 14 | $ on error then exit | ||
| 15 | $! | ||
| 16 | $! Test for SunOS 5.[78] bc bug. | ||
| 17 | $! | ||
| 18 | $ if (failure .eqs. "") | ||
| 19 | $ then | ||
| 20 | $! | ||
| 21 | $ define /user_mode sys$output 'tmp_file_name' | ||
| 22 | $ bc | ||
| 23 | obase=16 | ||
| 24 | ibase=16 | ||
| 25 | a=AD88C418F31B3FC712D0425001D522B3AE9134FF3A98C13C1FCC1682211195406C1A6C66C6A\ | ||
| 26 | CEEC1A0EC16950233F77F1C2F2363D56DD71A36C57E0B2511FC4BA8F22D261FE2E9356D99AF57\ | ||
| 27 | 10F3817C0E05BF79C423C3F66FDF321BE8D3F18F625D91B670931C1EF25F28E489BDA1C5422D1\ | ||
| 28 | C3F6F7A1AD21585746ECC4F10A14A778AF56F08898E965E9909E965E0CB6F85B514150C644759\ | ||
| 29 | 3BE731877B16EA07B552088FF2EA728AC5E0FF3A23EB939304519AB8B60F2C33D6BA0945B66F0\ | ||
| 30 | 4FC3CADF855448B24A9D7640BCF473E | ||
| 31 | b=DCE91E7D120B983EA9A104B5A96D634DD644C37657B1C7860B45E6838999B3DCE5A555583C6\ | ||
| 32 | 9209E41F413422954175A06E67FFEF6746DD652F0F48AEFECC3D8CAC13523BDAAD3F5AF4212BD\ | ||
| 33 | 8B3CD64126E1A82E190228020C05B91C8B141F1110086FC2A4C6ED631EBA129D04BB9A19FC53D\ | ||
| 34 | 3ED0E2017D60A68775B75481449 | ||
| 35 | (a/b)*b + (a%b) - a | ||
| 36 | $ status = $status | ||
| 37 | $ output_expected = "0" | ||
| 38 | $ gosub check_output | ||
| 39 | $ if (output .ne. 1) | ||
| 40 | $ then | ||
| 41 | $ failure = "SunOStest" | ||
| 42 | $ else | ||
| 43 | $ delete 'f$parse( tmp_file_name)' | ||
| 44 | $ endif | ||
| 45 | $ endif | ||
| 46 | $! | ||
| 47 | $! Test for SCO bc bug. | ||
| 48 | $! | ||
| 49 | $ if (failure .eqs. "") | ||
| 50 | $ then | ||
| 51 | $! | ||
| 52 | $ define /user_mode sys$output 'tmp_file_name' | ||
| 53 | $ bc | ||
| 54 | obase=16 | ||
| 55 | ibase=16 | ||
| 56 | -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4AEC6F15AC177F176F2274D2\ | ||
| 57 | 9DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7F5ADFACEE54573F5D256A06\ | ||
| 58 | 11B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99FB9812A0E4A5773D8B254117\ | ||
| 59 | 1239157EC6E3D8D50199 * -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4\ | ||
| 60 | AEC6F15AC177F176F2274D29DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7\ | ||
| 61 | F5ADFACEE54573F5D256A0611B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99F\ | ||
| 62 | B9812A0E4A5773D8B2541171239157EC6E3D8D50199 - FFBACC221682DA464B6D7F123482522\ | ||
| 63 | 02EDAEDCA38C3B69E9B7BBCD6165A9CD8716C4903417F23C09A85B851961F92C217258CEEB866\ | ||
| 64 | 85EFCC5DD131853A02C07A873B8E2AF2E40C6D5ED598CD0E8F35AD49F3C3A17FDB7653E4E2DC4\ | ||
| 65 | A8D23CC34686EE4AD01F7407A7CD74429AC6D36DBF0CB6A3E302D0E5BDFCD048A3B90C1BE5AA8\ | ||
| 66 | E16C3D5884F9136B43FF7BB443764153D4AEC176C681B078F4CC53D6EB6AB76285537DDEE7C18\ | ||
| 67 | 8C72441B52EDBDDBC77E02D34E513F2AABF92F44109CAFE8242BD0ECBAC5604A94B02EA44D43C\ | ||
| 68 | 04E9476E6FBC48043916BFA1485C6093603600273C9C33F13114D78064AE42F3DC466C7DA543D\ | ||
| 69 | 89C8D71 | ||
| 70 | AD534AFBED2FA39EE9F40E20FCF9E2C861024DB98DDCBA1CD118C49CA55EEBC20D6BA51B2271C\ | ||
| 71 | 928B693D6A73F67FEB1B4571448588B46194617D25D910C6A9A130CC963155CF34079CB218A44\ | ||
| 72 | 8A1F57E276D92A33386DDCA3D241DB78C8974ABD71DD05B0FA555709C9910D745185E6FE108E3\ | ||
| 73 | 37F1907D0C56F8BFBF52B9704 % -E557905B56B13441574CAFCE2BD257A750B1A8B2C88D0E36\ | ||
| 74 | E18EF7C38DAC80D3948E17ED63AFF3B3467866E3B89D09A81B3D16B52F6A3C7134D3C6F5123E9\ | ||
| 75 | F617E3145BBFBE9AFD0D6E437EA4FF6F04BC67C4F1458B4F0F47B64 - 1C2BBBB19B74E86FD32\ | ||
| 76 | 9E8DB6A8C3B1B9986D57ED5419C2E855F7D5469E35E76334BB42F4C43E3F3A31B9697C171DAC4\ | ||
| 77 | D97935A7E1A14AD209D6CF811F55C6DB83AA9E6DFECFCD6669DED7171EE22A40C6181615CAF3F\ | ||
| 78 | 5296964 | ||
| 79 | $ status = $status | ||
| 80 | $ output_expected = "0\0" | ||
| 81 | $ gosub check_output | ||
| 82 | $ if (output .ne. 1) | ||
| 83 | $ then | ||
| 84 | $ failure = "SCOtest" | ||
| 85 | $ else | ||
| 86 | $ delete 'f$parse( tmp_file_name)' | ||
| 87 | $ endif | ||
| 88 | $ endif | ||
| 89 | $! | ||
| 90 | $! Test for working 'print' command. | ||
| 91 | $! | ||
| 92 | $ if (failure .eqs. "") | ||
| 93 | $ then | ||
| 94 | $! | ||
| 95 | $ define /user_mode sys$output 'tmp_file_name' | ||
| 96 | $ bc | ||
| 97 | print "OK" | ||
| 98 | $ status = $status | ||
| 99 | $ output_expected = "OK" | ||
| 100 | $ gosub check_output | ||
| 101 | $ if (output .ne. 1) | ||
| 102 | $ then | ||
| 103 | $ failure = "printtest" | ||
| 104 | $ else | ||
| 105 | $ delete 'f$parse( tmp_file_name)' | ||
| 106 | $ endif | ||
| 107 | $ endif | ||
| 108 | $! | ||
| 109 | $ if (failure .nes. "") | ||
| 110 | $ then | ||
| 111 | $ write sys$output - | ||
| 112 | "No working bc found. Consider installing GNU bc." | ||
| 113 | $ exit %X00030000 ! %DCL-W-NORMAL | ||
| 114 | $ endif | ||
| 115 | $! | ||
| 116 | $ exit | ||
| 117 | $! | ||
| 118 | $! | ||
| 119 | $! Complete "bc" command failure. | ||
| 120 | $! | ||
| 121 | $ bc_fail: | ||
| 122 | $ write sys$output - | ||
| 123 | "No ""bc"" program/symbol found. Consider installing GNU bc." | ||
| 124 | $ exit %X00030000 ! %DCL-W-NORMAL | ||
| 125 | $! | ||
| 126 | $! | ||
| 127 | $! Output check subroutine. | ||
| 128 | $! | ||
| 129 | $ check_output: | ||
| 130 | $ eof = 0 | ||
| 131 | $ line_nr = 0 | ||
| 132 | $ open /read tmp_file 'tmp_file_name' | ||
| 133 | $ c_o_loop: | ||
| 134 | $ read /error = error_read tmp_file line | ||
| 135 | $ goto ok_read | ||
| 136 | $ error_read: | ||
| 137 | $ eof = 1 | ||
| 138 | $ ok_read: | ||
| 139 | $ line_expected = f$element( line_nr, "\", output_expected) | ||
| 140 | $ line_nr = line_nr+ 1 | ||
| 141 | $ if ((line_expected .nes. "\") .and. (.not. eof) .and. - | ||
| 142 | (line_expected .eqs. line)) then goto c_o_loop | ||
| 143 | $! | ||
| 144 | $ if ((line_expected .eqs. "\") .and. eof) | ||
| 145 | $ then | ||
| 146 | $ output = 1 | ||
| 147 | $ else | ||
| 148 | $ output = 0 | ||
| 149 | $ endif | ||
| 150 | $ close tmp_file | ||
| 151 | $ return | ||
| 152 | $! | ||
diff --git a/src/lib/libssl/test/bntest.com b/src/lib/libssl/test/bntest.com new file mode 100644 index 0000000000..6545d2e5a5 --- /dev/null +++ b/src/lib/libssl/test/bntest.com | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | $! | ||
| 2 | $! Analyze bntest output file. | ||
| 3 | $! | ||
| 4 | $! Exit status = 1 (success) if all tests passed, | ||
| 5 | $! 0 (warning) if any test failed. | ||
| 6 | $! | ||
| 7 | $! 2011-02-20 SMS. Added code to skip "#" comments in the input file. | ||
| 8 | $! | ||
| 9 | $! 2010-04-05 SMS. New. Based (loosely) on perl code in bntest-vms.sh. | ||
| 10 | $! | ||
| 11 | $! Expect data like: | ||
| 12 | $! test test_name1 | ||
| 13 | $! 0 | ||
| 14 | $! [...] | ||
| 15 | $! test test_name2 | ||
| 16 | $! 0 | ||
| 17 | $! [...] | ||
| 18 | $! [...] | ||
| 19 | $! | ||
| 20 | $! Some tests have no following "0" lines. | ||
| 21 | $! | ||
| 22 | $ result_file_name = f$edit( p1, "TRIM") | ||
| 23 | $ if (result_file_name .eqs. "") | ||
| 24 | $ then | ||
| 25 | $ result_file_name = "bntest-vms.out" | ||
| 26 | $ endif | ||
| 27 | $! | ||
| 28 | $ fail = 0 | ||
| 29 | $ passed = 0 | ||
| 30 | $ tests = 0 | ||
| 31 | $! | ||
| 32 | $ on control_c then goto tidy | ||
| 33 | $ on error then goto tidy | ||
| 34 | $! | ||
| 35 | $ open /read result_file 'result_file_name' | ||
| 36 | $! | ||
| 37 | $ read_loop: | ||
| 38 | $ read /end = read_loop_end /error = tidy result_file line | ||
| 39 | $ t1 = f$element( 0, " ", line) | ||
| 40 | $! | ||
| 41 | $! Skip "#" comment lines. | ||
| 42 | $ if (f$extract( 0, 1, f$edit( line, "TRIM")) .eqs. "#") then - | ||
| 43 | goto read_loop | ||
| 44 | $! | ||
| 45 | $ if (t1 .eqs. "test") | ||
| 46 | $ then | ||
| 47 | $ passed = passed+ 1 | ||
| 48 | $ tests = tests+ 1 | ||
| 49 | $ fail = 1 | ||
| 50 | $ t2 = f$extract( 5, 1000, line) | ||
| 51 | $ write sys$output "verify ''t2'" | ||
| 52 | $ else | ||
| 53 | $ if (t1 .nes. "0") | ||
| 54 | $ then | ||
| 55 | $ write sys$output "Failed! bc: ''line'" | ||
| 56 | $ passed = passed- fail | ||
| 57 | $ fail = 0 | ||
| 58 | $ endif | ||
| 59 | $ endif | ||
| 60 | $ goto read_loop | ||
| 61 | $ read_loop_end: | ||
| 62 | $ write sys$output "''passed'/''tests' tests passed" | ||
| 63 | $! | ||
| 64 | $ tidy: | ||
| 65 | $ if f$trnlnm( "result_file", "LNM$PROCESS_TABLE", , "SUPERVISOR", , "CONFINE") | ||
| 66 | $ then | ||
| 67 | $ close result_file | ||
| 68 | $ endif | ||
| 69 | $! | ||
| 70 | $ if ((tests .gt. 0) .and. (tests .eq. passed)) | ||
| 71 | $ then | ||
| 72 | $ exit 1 | ||
| 73 | $ else | ||
| 74 | $ exit 0 | ||
| 75 | $ endif | ||
| 76 | $! | ||
diff --git a/src/lib/libssl/test/clean_test.com b/src/lib/libssl/test/clean_test.com new file mode 100755 index 0000000000..7df633fbef --- /dev/null +++ b/src/lib/libssl/test/clean_test.com | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | $! | ||
| 2 | $! Delete various test results files. | ||
| 3 | $! | ||
| 4 | $ def_orig = f$environment( "default") | ||
| 5 | $ proc = f$environment( "procedure") | ||
| 6 | $ proc_dev_dir = f$parse( "A.;", proc) - "A.;" | ||
| 7 | $! | ||
| 8 | $ on control_c then goto tidy | ||
| 9 | $ on error then goto tidy | ||
| 10 | $! | ||
| 11 | $ set default 'proc_dev_dir' | ||
| 12 | $! | ||
| 13 | $ files := *.cms;*, *.srl;*, *.ss;*, - | ||
| 14 | cms.err;*, cms.out;*, newreq.pem;*, - | ||
| 15 | p.txt-zlib-cipher;*, - | ||
| 16 | smtst.txt;*, testkey.pem;*, testreq.pem;*, - | ||
| 17 | test_*.err;*, test_*.out;*, - | ||
| 18 | .rnd;* | ||
| 19 | $! | ||
| 20 | $ delim = "," | ||
| 21 | $ i = 0 | ||
| 22 | $ loop: | ||
| 23 | $ file = f$edit( f$element( i, delim, files), "trim") | ||
| 24 | $ if (file .eqs. delim) then goto loop_end | ||
| 25 | $ if (f$search( file) .nes. "") then - | ||
| 26 | delete 'p1' 'file' | ||
| 27 | $ i = i+ 1 | ||
| 28 | $ goto loop | ||
| 29 | $ loop_end: | ||
| 30 | $! | ||
| 31 | $ tidy: | ||
| 32 | $ | ||
| 33 | $ if (f$type( def_orig) .nes. "") then - | ||
| 34 | set default 'def_orig' | ||
| 35 | $! | ||
diff --git a/src/lib/libssl/test/maketests.com b/src/lib/libssl/test/maketests.com index ca072f1d11..386e5cf3c1 100644 --- a/src/lib/libssl/test/maketests.com +++ b/src/lib/libssl/test/maketests.com | |||
| @@ -25,7 +25,7 @@ $! VAXC For VAX C. | |||
| 25 | $! DECC For DEC C. | 25 | $! DECC For DEC C. |
| 26 | $! GNUC For GNU C. | 26 | $! GNUC For GNU C. |
| 27 | $! | 27 | $! |
| 28 | $! If you don't speficy a compiler, it will try to determine which | 28 | $! If you don't specify a compiler, it will try to determine which |
| 29 | $! "C" compiler to use. | 29 | $! "C" compiler to use. |
| 30 | $! | 30 | $! |
| 31 | $! P3, if defined, sets a TCP/IP library to use, through one of the following | 31 | $! P3, if defined, sets a TCP/IP library to use, through one of the following |
| @@ -37,46 +37,87 @@ $! | |||
| 37 | $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) | 37 | $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) |
| 38 | $! | 38 | $! |
| 39 | $! | 39 | $! |
| 40 | $! P5, if defined, specifies the C pointer size. Ignored on VAX. | ||
| 41 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) | ||
| 42 | $! Supported values are: | ||
| 43 | $! | ||
| 44 | $! "" Compile with default (/NOPOINTER_SIZE) | ||
| 45 | $! 32 Compile with /POINTER_SIZE=32 (SHORT) | ||
| 46 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]) | ||
| 47 | $! (Automatically select ARGV if compiler supports it.) | ||
| 48 | $! 64= Compile with /POINTER_SIZE=64 (LONG). | ||
| 49 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). | ||
| 50 | $! | ||
| 51 | $! P6, if defined, specifies a directory where ZLIB files (zlib.h, | ||
| 52 | $! libz.olb) may be found. Optionally, a non-default object library | ||
| 53 | $! name may be included ("dev:[dir]libz_64.olb", for example). | ||
| 54 | $! | ||
| 55 | $! | ||
| 56 | $! Announce/identify. | ||
| 57 | $! | ||
| 58 | $ proc = f$environment( "procedure") | ||
| 59 | $ write sys$output "@@@ "+ - | ||
| 60 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 61 | $! | ||
| 40 | $! Define A TCP/IP Library That We Will Need To Link To. | 62 | $! Define A TCP/IP Library That We Will Need To Link To. |
| 41 | $! (That is, If Wee Need To Link To One.) | 63 | $! (That is, If We Need To Link To One.) |
| 42 | $! | 64 | $! |
| 43 | $ TCPIP_LIB = "" | 65 | $ TCPIP_LIB = "" |
| 66 | $ ZLIB_LIB = "" | ||
| 44 | $! | 67 | $! |
| 45 | $! Check Which Architecture We Are Using. | 68 | $! Check Which Architecture We Are Using. |
| 46 | $! | 69 | $! |
| 47 | $ if (f$getsyi( "HW_MODEL") .lt. 1024) | 70 | $ if (f$getsyi( "cpu") .lt. 128) |
| 48 | $ then | 71 | $ then |
| 49 | $ arch = "VAX" | 72 | $ ARCH = "VAX" |
| 50 | $ else | 73 | $ else |
| 51 | $ arch = "" | 74 | $ ARCH = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 52 | $ arch = arch+ f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 75 | $ if (ARCH .eqs. "") then ARCH = "UNK" |
| 53 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 54 | $ endif | 76 | $ endif |
| 55 | $! | 77 | $! |
| 56 | $! Define The OBJ and EXE Directories (EXE before CHECK_OPTIONS). | 78 | $ ARCHD = ARCH |
| 57 | $! | 79 | $ LIB32 = "32" |
| 58 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.TEST] | 80 | $ OPT_FILE = "" |
| 59 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.TEST] | 81 | $ POINTER_SIZE = "" |
| 60 | $! | 82 | $! |
| 61 | $! Check To Make Sure We Have Valid Command Line Parameters. | 83 | $! Check To Make Sure We Have Valid Command Line Parameters. |
| 62 | $! | 84 | $! |
| 63 | $ GOSUB CHECK_OPTIONS | 85 | $ GOSUB CHECK_OPTIONS |
| 64 | $! | 86 | $! |
| 87 | $! Define The OBJ and EXE Directories. | ||
| 88 | $! | ||
| 89 | $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.TEST] | ||
| 90 | $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.TEST] | ||
| 91 | $! | ||
| 92 | $! Specify the destination directory in any /MAP option. | ||
| 93 | $! | ||
| 94 | $ if (LINKMAP .eqs. "MAP") | ||
| 95 | $ then | ||
| 96 | $ LINKMAP = LINKMAP+ "=''EXE_DIR'" | ||
| 97 | $ endif | ||
| 98 | $! | ||
| 99 | $! Add the location prefix to the linker options file name. | ||
| 100 | $! | ||
| 101 | $ if (OPT_FILE .nes. "") | ||
| 102 | $ then | ||
| 103 | $ OPT_FILE = EXE_DIR+ OPT_FILE | ||
| 104 | $ endif | ||
| 105 | $! | ||
| 65 | $! Initialise logical names and such | 106 | $! Initialise logical names and such |
| 66 | $! | 107 | $! |
| 67 | $ GOSUB INITIALISE | 108 | $ GOSUB INITIALISE |
| 68 | $! | 109 | $! |
| 69 | $! Tell The User What Kind of Machine We Run On. | 110 | $! Tell The User What Kind of Machine We Run On. |
| 70 | $! | 111 | $! |
| 71 | $ WRITE SYS$OUTPUT "Compiling On ''ARCH'." | 112 | $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" |
| 72 | $! | 113 | $! |
| 73 | $! Define The CRYPTO-LIB We Are To Use. | 114 | $! Define The CRYPTO-LIB We Are To Use. |
| 74 | $! | 115 | $! |
| 75 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB | 116 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB |
| 76 | $! | 117 | $! |
| 77 | $! Define The SSL We Are To Use. | 118 | $! Define The SSL We Are To Use. |
| 78 | $! | 119 | $! |
| 79 | $ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB | 120 | $ SSL_LIB := SYS$DISK:[-.'ARCHD'.EXE.SSL]SSL_LIBSSL'LIB32'.OLB |
| 80 | $! | 121 | $! |
| 81 | $! Create the OBJ and EXE Directories, if needed. | 122 | $! Create the OBJ and EXE Directories, if needed. |
| 82 | $! | 123 | $! |
| @@ -105,7 +146,7 @@ $ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ - | |||
| 105 | "MDC2TEST,RMDTEST,"+ - | 146 | "MDC2TEST,RMDTEST,"+ - |
| 106 | "RANDTEST,DHTEST,ENGINETEST,"+ - | 147 | "RANDTEST,DHTEST,ENGINETEST,"+ - |
| 107 | "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ - | 148 | "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ - |
| 108 | "EVP_TEST,JPAKETEST" | 149 | "EVP_TEST,IGETEST,JPAKETEST,ASN1TEST" |
| 109 | $! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well? | 150 | $! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well? |
| 110 | $! | 151 | $! |
| 111 | $! Additional directory information. | 152 | $! Additional directory information. |
| @@ -139,8 +180,9 @@ $ T_D_EXPTEST := [-.crypto.bn] | |||
| 139 | $ T_D_DSATEST := [-.crypto.dsa] | 180 | $ T_D_DSATEST := [-.crypto.dsa] |
| 140 | $ T_D_RSA_TEST := [-.crypto.rsa] | 181 | $ T_D_RSA_TEST := [-.crypto.rsa] |
| 141 | $ T_D_EVP_TEST := [-.crypto.evp] | 182 | $ T_D_EVP_TEST := [-.crypto.evp] |
| 142 | $ T_D_JPAKETEST := [-.crypto.jpake] | ||
| 143 | $ T_D_IGETEST := [-.test] | 183 | $ T_D_IGETEST := [-.test] |
| 184 | $ T_D_JPAKETEST := [-.crypto.jpake] | ||
| 185 | $ T_D_ASN1TEST := [-.test] | ||
| 144 | $! | 186 | $! |
| 145 | $ TCPIP_PROGRAMS = ",," | 187 | $ TCPIP_PROGRAMS = ",," |
| 146 | $ IF COMPILER .EQS. "VAXC" THEN - | 188 | $ IF COMPILER .EQS. "VAXC" THEN - |
| @@ -223,33 +265,15 @@ $! | |||
| 223 | $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. | 265 | $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. |
| 224 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | 266 | $! Check To See If We Are To Link With A Specific TCP/IP Library. |
| 225 | $! | 267 | $! |
| 226 | $ IF (TCPIP_LIB.NES."") | ||
| 227 | $ THEN | ||
| 228 | $! | ||
| 229 | $! Don't Link With The RSAREF Routines And TCP/IP Library. | 268 | $! Don't Link With The RSAREF Routines And TCP/IP Library. |
| 230 | $! | 269 | $! |
| 231 | $ LINK /'DEBUGGER' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' - | 270 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' - |
| 232 | 'OBJECT_FILE', - | 271 | 'OBJECT_FILE', - |
| 233 | 'SSL_LIB' /LIBRARY, - | 272 | 'SSL_LIB' /LIBRARY, - |
| 234 | 'CRYPTO_LIB' /LIBRARY, - | 273 | 'CRYPTO_LIB' /LIBRARY - |
| 235 | 'TCPIP_LIB', - | 274 | 'TCPIP_LIB' - |
| 236 | 'OPT_FILE' /OPTIONS | 275 | 'ZLIB_LIB' - |
| 237 | $! | 276 | ,'OPT_FILE' /OPTIONS |
| 238 | $! Else... | ||
| 239 | $! | ||
| 240 | $ ELSE | ||
| 241 | $! | ||
| 242 | $! Don't Link With The RSAREF Routines And Link With A TCP/IP Library. | ||
| 243 | $! | ||
| 244 | $ LINK /'DEBUGGER' /'TRACEBACK' /EXECUTABLE = 'EXE_FILE' - | ||
| 245 | 'OBJECT_FILE', - | ||
| 246 | 'SSL_LIB' /LIBRARY, - | ||
| 247 | 'CRYPTO_LIB' /LIBRARY, - | ||
| 248 | 'OPT_FILE' /OPTIONS | ||
| 249 | $! | ||
| 250 | $! End The TCP/IP Library Check. | ||
| 251 | $! | ||
| 252 | $ ENDIF | ||
| 253 | $! | 277 | $! |
| 254 | $! Go Back And Do It Again. | 278 | $! Go Back And Do It Again. |
| 255 | $! | 279 | $! |
| @@ -313,7 +337,7 @@ $! | |||
| 313 | $ CREATE 'OPT_FILE' | 337 | $ CREATE 'OPT_FILE' |
| 314 | $DECK | 338 | $DECK |
| 315 | ! | 339 | ! |
| 316 | ! Default System Options File To Link Agianst | 340 | ! Default System Options File To Link Against |
| 317 | ! The Sharable C Runtime Library. | 341 | ! The Sharable C Runtime Library. |
| 318 | ! | 342 | ! |
| 319 | GNU_CC:[000000]GCCLIB.OLB /LIBRARY | 343 | GNU_CC:[000000]GCCLIB.OLB /LIBRARY |
| @@ -348,7 +372,7 @@ $! | |||
| 348 | $ CREATE 'OPT_FILE' | 372 | $ CREATE 'OPT_FILE' |
| 349 | $DECK | 373 | $DECK |
| 350 | ! | 374 | ! |
| 351 | ! Default System Options File To Link Agianst | 375 | ! Default System Options File To Link Against |
| 352 | ! The Sharable DEC C Runtime Library. | 376 | ! The Sharable DEC C Runtime Library. |
| 353 | ! | 377 | ! |
| 354 | SYS$SHARE:DECC$SHR.EXE /SHAREABLE | 378 | SYS$SHARE:DECC$SHR.EXE /SHAREABLE |
| @@ -363,7 +387,7 @@ $! | |||
| 363 | $ CREATE 'OPT_FILE' | 387 | $ CREATE 'OPT_FILE' |
| 364 | $DECK | 388 | $DECK |
| 365 | ! | 389 | ! |
| 366 | ! Default System Options File For non-VAX To Link Agianst | 390 | ! Default System Options File For non-VAX To Link Against |
| 367 | ! The Sharable C Runtime Library. | 391 | ! The Sharable C Runtime Library. |
| 368 | ! | 392 | ! |
| 369 | SYS$SHARE:CMA$OPEN_LIB_SHR.EXE /SHAREABLE | 393 | SYS$SHARE:CMA$OPEN_LIB_SHR.EXE /SHAREABLE |
| @@ -442,19 +466,24 @@ $! Check The User's Options. | |||
| 442 | $! | 466 | $! |
| 443 | $ CHECK_OPTIONS: | 467 | $ CHECK_OPTIONS: |
| 444 | $! | 468 | $! |
| 469 | $! Set basic C compiler /INCLUDE directories. | ||
| 470 | $! | ||
| 471 | $ CC_INCLUDES = "SYS$DISK:[-],SYS$DISK:[-.CRYPTO]" | ||
| 472 | $! | ||
| 445 | $! Check To See If P1 Is Blank. | 473 | $! Check To See If P1 Is Blank. |
| 446 | $! | 474 | $! |
| 447 | $ IF (P1.EQS."NODEBUG") | 475 | $ IF (P1.EQS."NODEBUG") |
| 448 | $ THEN | 476 | $ THEN |
| 449 | $! | 477 | $! |
| 450 | $! P1 Is NODEBUG, So Compile Without Debugger Information. | 478 | $! P1 Is NODEBUG, So Compile Without Debugger Information. |
| 451 | $! | 479 | $! |
| 452 | $ DEBUGGER = "NODEBUG" | 480 | $ DEBUGGER = "NODEBUG" |
| 453 | $ TRACEBACK = "NOTRACEBACK" | 481 | $ LINKMAP = "NOMAP" |
| 454 | $ GCC_OPTIMIZE = "OPTIMIZE" | 482 | $ TRACEBACK = "NOTRACEBACK" |
| 455 | $ CC_OPTIMIZE = "OPTIMIZE" | 483 | $ GCC_OPTIMIZE = "OPTIMIZE" |
| 456 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | 484 | $ CC_OPTIMIZE = "OPTIMIZE" |
| 457 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | 485 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
| 486 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
| 458 | $! | 487 | $! |
| 459 | $! Else... | 488 | $! Else... |
| 460 | $! | 489 | $! |
| @@ -468,6 +497,7 @@ $! | |||
| 468 | $! Compile With Debugger Information. | 497 | $! Compile With Debugger Information. |
| 469 | $! | 498 | $! |
| 470 | $ DEBUGGER = "DEBUG" | 499 | $ DEBUGGER = "DEBUG" |
| 500 | $ LINKMAP = "MAP" | ||
| 471 | $ TRACEBACK = "TRACEBACK" | 501 | $ TRACEBACK = "TRACEBACK" |
| 472 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | 502 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
| 473 | $ CC_OPTIMIZE = "NOOPTIMIZE" | 503 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
| @@ -478,7 +508,7 @@ $! Else... | |||
| 478 | $! | 508 | $! |
| 479 | $ ELSE | 509 | $ ELSE |
| 480 | $! | 510 | $! |
| 481 | $! Tell The User Entered An Invalid Option.. | 511 | $! Tell The User Entered An Invalid Option. |
| 482 | $! | 512 | $! |
| 483 | $ WRITE SYS$OUTPUT "" | 513 | $ WRITE SYS$OUTPUT "" |
| 484 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" | 514 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" |
| @@ -491,11 +521,87 @@ $! Time To EXIT. | |||
| 491 | $! | 521 | $! |
| 492 | $ EXIT | 522 | $ EXIT |
| 493 | $! | 523 | $! |
| 494 | $! End The Valid Arguement Check. | 524 | $! End The Valid Argument Check. |
| 525 | $! | ||
| 526 | $ ENDIF | ||
| 527 | $! | ||
| 528 | $! End The P1 Check. | ||
| 529 | $! | ||
| 530 | $ ENDIF | ||
| 531 | $! | ||
| 532 | $! Check P5 (POINTER_SIZE). | ||
| 533 | $! | ||
| 534 | $ IF (P5 .NES. "") .AND. (ARCH .NES. "VAX") | ||
| 535 | $ THEN | ||
| 536 | $! | ||
| 537 | $ IF (P5 .EQS. "32") | ||
| 538 | $ THEN | ||
| 539 | $ POINTER_SIZE = " /POINTER_SIZE=32" | ||
| 540 | $ ELSE | ||
| 541 | $ POINTER_SIZE = F$EDIT( P5, "COLLAPSE, UPCASE") | ||
| 542 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
| 543 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
| 544 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
| 545 | $ THEN | ||
| 546 | $ ARCHD = ARCH+ "_64" | ||
| 547 | $ LIB32 = "" | ||
| 548 | $ IF (F$EXTRACT( 2, 1, POINTER_SIZE) .EQS. "=") | ||
| 549 | $ THEN | ||
| 550 | $! Explicit user choice: "64" or "64=ARGV". | ||
| 551 | $ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64" | ||
| 552 | $ ELSE | ||
| 553 | $ SET NOON | ||
| 554 | $ DEFINE /USER_MODE SYS$OUTPUT NL: | ||
| 555 | $ DEFINE /USER_MODE SYS$ERROR NL: | ||
| 556 | $ CC /NOLIST /NOOBJECT /POINTER_SIZE=64=ARGV NL: | ||
| 557 | $ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000 | ||
| 558 | $ THEN | ||
| 559 | $ ! If we got here, it means DCL complained like this: | ||
| 560 | $ ! %DCL-W-NOVALU, value not allowed - remove value specification | ||
| 561 | $ ! \64=\ | ||
| 562 | $ ! | ||
| 563 | $ ! If the compiler was run, logicals defined in /USER would | ||
| 564 | $ ! have been deassigned automatically. However, when DCL | ||
| 565 | $ ! complains, they aren't, so we do it here (it might be | ||
| 566 | $ ! unnecessary, but just in case there will be another error | ||
| 567 | $ ! message further on that we don't want to miss) | ||
| 568 | $ DEASSIGN /USER_MODE SYS$ERROR | ||
| 569 | $ DEASSIGN /USER_MODE SYS$OUTPUT | ||
| 570 | $ ELSE | ||
| 571 | $ POINTER_SIZE = POINTER_SIZE + "=ARGV" | ||
| 572 | $ ENDIF | ||
| 573 | $ SET ON | ||
| 574 | $ ENDIF | ||
| 575 | $ POINTER_SIZE = " /POINTER_SIZE=''POINTER_SIZE'" | ||
| 576 | $ ELSE | ||
| 577 | $! | ||
| 578 | $! Tell The User Entered An Invalid Option. | ||
| 579 | $! | ||
| 580 | $ WRITE SYS$OUTPUT "" | ||
| 581 | $ WRITE SYS$OUTPUT "The Option ", P5, - | ||
| 582 | " Is Invalid. The Valid Options Are:" | ||
| 583 | $ WRITE SYS$OUTPUT "" | ||
| 584 | $ WRITE SYS$OUTPUT - | ||
| 585 | " """" : Compile with default (short) pointers." | ||
| 586 | $ WRITE SYS$OUTPUT - | ||
| 587 | " 32 : Compile with 32-bit (short) pointers." | ||
| 588 | $ WRITE SYS$OUTPUT - | ||
| 589 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
| 590 | $ WRITE SYS$OUTPUT - | ||
| 591 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
| 592 | $ WRITE SYS$OUTPUT - | ||
| 593 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
| 594 | $ WRITE SYS$OUTPUT "" | ||
| 595 | $! | ||
| 596 | $! Time To EXIT. | ||
| 597 | $! | ||
| 598 | $ EXIT | ||
| 599 | $! | ||
| 600 | $ ENDIF | ||
| 495 | $! | 601 | $! |
| 496 | $ ENDIF | 602 | $ ENDIF |
| 497 | $! | 603 | $! |
| 498 | $! End The P2 Check. | 604 | $! End The P5 (POINTER_SIZE) Check. |
| 499 | $! | 605 | $! |
| 500 | $ ENDIF | 606 | $ ENDIF |
| 501 | $! | 607 | $! |
| @@ -599,11 +705,64 @@ $ CCDEFS = "TCPIP_TYPE_''P3'" | |||
| 599 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 705 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
| 600 | $ CCEXTRAFLAGS = "" | 706 | $ CCEXTRAFLAGS = "" |
| 601 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 707 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
| 602 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" | 708 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" |
| 603 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 709 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
| 604 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | 710 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
| 605 | $! | 711 | $! |
| 606 | $! Check To See If The User Entered A Valid Paramter. | 712 | $! Check To See If We Have A ZLIB Option. |
| 713 | $! | ||
| 714 | $ ZLIB = P6 | ||
| 715 | $ IF (ZLIB .NES. "") | ||
| 716 | $ THEN | ||
| 717 | $! | ||
| 718 | $! Check for expected ZLIB files. | ||
| 719 | $! | ||
| 720 | $ err = 0 | ||
| 721 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
| 722 | $ if (f$search( file1) .eqs. "") | ||
| 723 | $ then | ||
| 724 | $ WRITE SYS$OUTPUT "" | ||
| 725 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 726 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
| 727 | $ err = 1 | ||
| 728 | $ endif | ||
| 729 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" | ||
| 730 | $! | ||
| 731 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
| 732 | $ if (f$search( file2) .eqs. "") | ||
| 733 | $ then | ||
| 734 | $ if (err .eq. 0) | ||
| 735 | $ then | ||
| 736 | $ WRITE SYS$OUTPUT "" | ||
| 737 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 738 | $ endif | ||
| 739 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
| 740 | $ WRITE SYS$OUTPUT "" | ||
| 741 | $ err = err+ 2 | ||
| 742 | $ endif | ||
| 743 | $ if (err .eq. 1) | ||
| 744 | $ then | ||
| 745 | $ WRITE SYS$OUTPUT "" | ||
| 746 | $ endif | ||
| 747 | $! | ||
| 748 | $ if (err .ne. 0) | ||
| 749 | $ then | ||
| 750 | $ GOTO EXIT | ||
| 751 | $ endif | ||
| 752 | $! | ||
| 753 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS | ||
| 754 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 | ||
| 755 | $ ZLIB_LIB = ", ''file2' /library" | ||
| 756 | $! | ||
| 757 | $! Print info | ||
| 758 | $! | ||
| 759 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
| 760 | $! | ||
| 761 | $! End The P8 Check. | ||
| 762 | $! | ||
| 763 | $ ENDIF | ||
| 764 | $! | ||
| 765 | $! Check To See If The User Entered A Valid Parameter. | ||
| 607 | $! | 766 | $! |
| 608 | $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC") | 767 | $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC") |
| 609 | $ THEN | 768 | $ THEN |
| @@ -626,13 +785,13 @@ $! | |||
| 626 | $ CC = "CC" | 785 | $ CC = "CC" |
| 627 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 786 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 628 | THEN CC = "CC /DECC" | 787 | THEN CC = "CC /DECC" |
| 629 | $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=ANSI89" + - | 788 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
| 630 | "/NOLIST /PREFIX=ALL" + - | 789 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
| 631 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 790 | " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS |
| 632 | $! | 791 | $! |
| 633 | $! Define The Linker Options File Name. | 792 | $! Define The Linker Options File Name. |
| 634 | $! | 793 | $! |
| 635 | $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" | 794 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
| 636 | $! | 795 | $! |
| 637 | $! End DECC Check. | 796 | $! End DECC Check. |
| 638 | $! | 797 | $! |
| @@ -661,7 +820,7 @@ $ EXIT | |||
| 661 | $ ENDIF | 820 | $ ENDIF |
| 662 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC /VAXC" | 821 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC /VAXC" |
| 663 | $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - | 822 | $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - |
| 664 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 823 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 665 | $ CCDEFS = CCDEFS + ",""VAXC""" | 824 | $ CCDEFS = CCDEFS + ",""VAXC""" |
| 666 | $! | 825 | $! |
| 667 | $! Define <sys> As SYS$COMMON:[SYSLIB] | 826 | $! Define <sys> As SYS$COMMON:[SYSLIB] |
| @@ -670,7 +829,7 @@ $ DEFINE /NOLOG SYS SYS$COMMON:[SYSLIB] | |||
| 670 | $! | 829 | $! |
| 671 | $! Define The Linker Options File Name. | 830 | $! Define The Linker Options File Name. |
| 672 | $! | 831 | $! |
| 673 | $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" | 832 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
| 674 | $! | 833 | $! |
| 675 | $! End VAXC Check | 834 | $! End VAXC Check |
| 676 | $! | 835 | $! |
| @@ -692,11 +851,11 @@ $! | |||
| 692 | $! Use GNU C... | 851 | $! Use GNU C... |
| 693 | $! | 852 | $! |
| 694 | $ CC = "GCC /NOCASE_HACK /''GCC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - | 853 | $ CC = "GCC /NOCASE_HACK /''GCC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - |
| 695 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 854 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 696 | $! | 855 | $! |
| 697 | $! Define The Linker Options File Name. | 856 | $! Define The Linker Options File Name. |
| 698 | $! | 857 | $! |
| 699 | $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" | 858 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
| 700 | $! | 859 | $! |
| 701 | $! End The GNU C Check. | 860 | $! End The GNU C Check. |
| 702 | $! | 861 | $! |
| @@ -715,20 +874,20 @@ $ THEN | |||
| 715 | $ CC4DISABLEWARNINGS = "DOLLARID" | 874 | $ CC4DISABLEWARNINGS = "DOLLARID" |
| 716 | $ ELSE | 875 | $ ELSE |
| 717 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" | 876 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" |
| 718 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | 877 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
| 719 | $ ENDIF | 878 | $ ENDIF |
| 720 | $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" | 879 | $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" |
| 721 | $ ELSE | 880 | $ ELSE |
| 722 | $ CCDISABLEWARNINGS = "" | 881 | $ CCDISABLEWARNINGS = "" |
| 723 | $ CC4DISABLEWARNINGS = "" | 882 | $ CC4DISABLEWARNINGS = "" |
| 724 | $ ENDIF | 883 | $ ENDIF |
| 725 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 884 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
| 726 | $! | 885 | $! |
| 727 | $! Show user the result | 886 | $! Show user the result |
| 728 | $! | 887 | $! |
| 729 | $ WRITE /SYMBOL SYS$OUTPUT "Main Compiling Command: ", CC | 888 | $ WRITE /SYMBOL SYS$OUTPUT "Main Compiling Command: ", CC |
| 730 | $! | 889 | $! |
| 731 | $! Else The User Entered An Invalid Arguement. | 890 | $! Else The User Entered An Invalid Argument. |
| 732 | $! | 891 | $! |
| 733 | $ ELSE | 892 | $ ELSE |
| 734 | $! | 893 | $! |
| @@ -760,7 +919,7 @@ $ THEN | |||
| 760 | $! | 919 | $! |
| 761 | $! Set the library to use SOCKETSHR | 920 | $! Set the library to use SOCKETSHR |
| 762 | $! | 921 | $! |
| 763 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" | 922 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
| 764 | $! | 923 | $! |
| 765 | $! Done with SOCKETSHR | 924 | $! Done with SOCKETSHR |
| 766 | $! | 925 | $! |
| @@ -786,13 +945,13 @@ $ THEN | |||
| 786 | $! | 945 | $! |
| 787 | $! Set the library to use UCX. | 946 | $! Set the library to use UCX. |
| 788 | $! | 947 | $! |
| 789 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" | 948 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
| 790 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 949 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
| 791 | $ THEN | 950 | $ THEN |
| 792 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" | 951 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
| 793 | $ ELSE | 952 | $ ELSE |
| 794 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 953 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
| 795 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" | 954 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
| 796 | $ ENDIF | 955 | $ ENDIF |
| 797 | $! | 956 | $! |
| 798 | $! Done with UCX | 957 | $! Done with UCX |
| @@ -806,7 +965,7 @@ $ THEN | |||
| 806 | $! | 965 | $! |
| 807 | $! Set the library to use TCPIP (post UCX). | 966 | $! Set the library to use TCPIP (post UCX). |
| 808 | $! | 967 | $! |
| 809 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" | 968 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
| 810 | $! | 969 | $! |
| 811 | $! Done with TCPIP | 970 | $! Done with TCPIP |
| 812 | $! | 971 | $! |
| @@ -827,9 +986,9 @@ $ ENDIF | |||
| 827 | $! | 986 | $! |
| 828 | $! Print info | 987 | $! Print info |
| 829 | $! | 988 | $! |
| 830 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 989 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
| 831 | $! | 990 | $! |
| 832 | $! Else The User Entered An Invalid Arguement. | 991 | $! Else The User Entered An Invalid Argument. |
| 833 | $! | 992 | $! |
| 834 | $ ELSE | 993 | $ ELSE |
| 835 | $! | 994 | $! |
diff --git a/src/lib/libssl/test/tcrl.com b/src/lib/libssl/test/tcrl.com index 1f606eb850..dd96a2b6dd 100644 --- a/src/lib/libssl/test/tcrl.com +++ b/src/lib/libssl/test/tcrl.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TCRL.COM -- Tests crl keys | 1 | $! TCRL.COM -- Tests crl keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl crl | 12 | $ cmd = "mcr ''exe_dir'openssl crl" |
| 10 | $ | 13 | $ |
| 11 | $ t := testcrl.pem | 14 | $ t = "testcrl.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing CRL conversions" | 17 | $ write sys$output "testing CRL conversions" |
diff --git a/src/lib/libssl/test/testca.com b/src/lib/libssl/test/testca.com index ec7e56dad6..78cda9ec5a 100644 --- a/src/lib/libssl/test/testca.com +++ b/src/lib/libssl/test/testca.com | |||
| @@ -1,11 +1,13 @@ | |||
| 1 | $! TESTCA.COM | 1 | $! TESTCA.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $! | ||
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 7 | $ | 9 | $ |
| 8 | $ openssl := mcr 'exe_dir'openssl | 10 | $ openssl = "mcr ''exe_dir'openssl" |
| 9 | $ | 11 | $ |
| 10 | $ SSLEAY_CONFIG="-config ""CAss.cnf""" | 12 | $ SSLEAY_CONFIG="-config ""CAss.cnf""" |
| 11 | $ | 13 | $ |
diff --git a/src/lib/libssl/test/testenc.com b/src/lib/libssl/test/testenc.com index 621d9a2126..75acd6f07f 100644 --- a/src/lib/libssl/test/testenc.com +++ b/src/lib/libssl/test/testenc.com | |||
| @@ -1,13 +1,16 @@ | |||
| 1 | $! TESTENC.COM -- Test encoding and decoding | 1 | $! TESTENC.COM -- Test encoding and decoding |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $! | ||
| 8 | $ if (p1 .eqs. 64) then __arch = __arch+ "_64" | ||
| 7 | $ | 9 | $ |
| 8 | $ testsrc := makefile. | 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" |
| 9 | $ test := p.txt | 11 | $ testsrc = "makefile." |
| 10 | $ cmd := mcr 'exe_dir'openssl | 12 | $ test = "p.txt" |
| 13 | $ cmd = "mcr ''exe_dir'openssl" | ||
| 11 | $ | 14 | $ |
| 12 | $ if f$search(test) .nes. "" then delete 'test';* | 15 | $ if f$search(test) .nes. "" then delete 'test';* |
| 13 | $ convert/fdl=sys$input: 'testsrc' 'test' | 16 | $ convert/fdl=sys$input: 'testsrc' 'test' |
diff --git a/src/lib/libssl/test/testgen.com b/src/lib/libssl/test/testgen.com index a4bc574bec..e076da2f30 100644 --- a/src/lib/libssl/test/testgen.com +++ b/src/lib/libssl/test/testgen.com | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | $! TETSGEN.COM | 1 | $! TESTGEN.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $ if (p1 .eqs. 64) then __arch = __arch+ "_64" |
| 8 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 9 | $ |
| 9 | $ T := testcert | 10 | $ T = "testcert" |
| 10 | $ KEY = 512 | 11 | $ KEY = 512 |
| 11 | $ CA := [-.certs]testca.pem | 12 | $ CA = "[-.certs]testca.pem" |
| 12 | $ | 13 | $ |
| 13 | $ set noon | 14 | $ set noon |
| 14 | $ if f$search(T+".1;*") .nes. "" then delete 'T'.1;* | 15 | $ if f$search(T+".1;*") .nes. "" then delete 'T'.1;* |
| @@ -20,7 +21,8 @@ $ write sys$output "generating certificate request" | |||
| 20 | $ | 21 | $ |
| 21 | $ append/new nl: .rnd | 22 | $ append/new nl: .rnd |
| 22 | $ open/append random_file .rnd | 23 | $ open/append random_file .rnd |
| 23 | $ write random_file "string to make the random number generator think it has entropy" | 24 | $ write random_file - |
| 25 | "string to make the random number generator think it has entropy" | ||
| 24 | $ close random_file | 26 | $ close random_file |
| 25 | $ | 27 | $ |
| 26 | $ set noon | 28 | $ set noon |
| @@ -33,8 +35,10 @@ $ then | |||
| 33 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" | 35 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" |
| 34 | $ else | 36 | $ else |
| 35 | $ req_new="-new" | 37 | $ req_new="-new" |
| 36 | $ write sys$output "There should be a 2 sequences of .'s and some +'s." | 38 | $ write sys$output - |
| 37 | $ write sys$output "There should not be more that at most 80 per line" | 39 | "There should be a 2 sequences of .'s and some +'s." |
| 40 | $ write sys$output - | ||
| 41 | "There should not be more that at most 80 per line" | ||
| 38 | $ endif | 42 | $ endif |
| 39 | $ | 43 | $ |
| 40 | $ write sys$output "This could take some time." | 44 | $ write sys$output "This could take some time." |
diff --git a/src/lib/libssl/test/tests.com b/src/lib/libssl/test/tests.com index d151cd3955..373dd16eac 100644 --- a/src/lib/libssl/test/tests.com +++ b/src/lib/libssl/test/tests.com | |||
| @@ -1,22 +1,43 @@ | |||
| 1 | $! TESTS.COM -- Performs the necessary tests | 1 | $! TESTS.COM -- Performs the necessary tests |
| 2 | $! | 2 | $! |
| 3 | $! P1 tests to be performed. Empty means all. | 3 | $! P1 tests to be performed. Empty means all. |
| 4 | $ | 4 | $! P2 Pointer size: "", "32", or "64". |
| 5 | $! | ||
| 6 | $! Announce/identify. | ||
| 7 | $! | ||
| 8 | $ proc = f$environment( "procedure") | ||
| 9 | $ write sys$output "@@@ "+ - | ||
| 10 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
| 11 | $! | ||
| 5 | $ __proc = f$element(0,";",f$environment("procedure")) | 12 | $ __proc = f$element(0,";",f$environment("procedure")) |
| 6 | $ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;" | 13 | $ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;" |
| 7 | $ __save_default = f$environment("default") | 14 | $ __save_default = f$environment("default") |
| 8 | $ __arch := VAX | 15 | $ __arch = "VAX" |
| 9 | $ if f$getsyi("cpu") .ge. 128 then - | 16 | $ if f$getsyi("cpu") .ge. 128 then - |
| 10 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 17 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 11 | $ if __arch .eqs. "" then __arch := UNK | 18 | $ if __arch .eqs. "" then __arch = "UNK" |
| 12 | $ texe_dir := sys$disk:[-.'__arch'.exe.test] | 19 | $! |
| 13 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 20 | $ __archd = __arch |
| 14 | $ | 21 | $ pointer_size = "" |
| 15 | $ sslroot = f$parse("sys$disk:[-.apps];",,,,"syntax_only") - "].;"+ ".]" | 22 | $ if (p2 .eq. "64") |
| 16 | $ define /translation_attributes = concealed sslroot 'sslroot' | 23 | $ then |
| 24 | $ pointer_size = "64" | ||
| 25 | $ __archd = __arch+ "_64" | ||
| 26 | $ endif | ||
| 27 | $! | ||
| 28 | $ texe_dir := sys$disk:[-.'__archd'.exe.test] | ||
| 29 | $ exe_dir := sys$disk:[-.'__archd'.exe.apps] | ||
| 17 | $ | 30 | $ |
| 18 | $ set default '__here' | 31 | $ set default '__here' |
| 19 | $ | 32 | $ |
| 33 | $ ROOT = F$PARSE("sys$disk:[-]A.;0",,,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0" | ||
| 34 | $ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY") | ||
| 35 | $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") - | ||
| 36 | - ".][000000" - "[000000." - "][" - "[" - "]" | ||
| 37 | $ ROOT = ROOT_DEV + "[" + ROOT_DIR | ||
| 38 | $ DEFINE/NOLOG SSLROOT 'ROOT'.APPS.] /TRANS=CONC | ||
| 39 | $ openssl_conf := sslroot:[000000]openssl-vms.cnf | ||
| 40 | $ | ||
| 20 | $ on control_y then goto exit | 41 | $ on control_y then goto exit |
| 21 | $ on error then goto exit | 42 | $ on error then goto exit |
| 22 | $ | 43 | $ |
| @@ -70,17 +91,19 @@ $ ENGINETEST := enginetest | |||
| 70 | $ EVPTEST := evp_test | 91 | $ EVPTEST := evp_test |
| 71 | $ IGETEST := igetest | 92 | $ IGETEST := igetest |
| 72 | $ JPAKETEST := jpaketest | 93 | $ JPAKETEST := jpaketest |
| 73 | $ | 94 | $ ASN1TEST := asn1test |
| 95 | $! | ||
| 74 | $ tests_i = 0 | 96 | $ tests_i = 0 |
| 75 | $ loop_tests: | 97 | $ loop_tests: |
| 76 | $ tests_e = f$element(tests_i,",",tests) | 98 | $ tests_e = f$element(tests_i,",",tests) |
| 77 | $ tests_i = tests_i + 1 | 99 | $ tests_i = tests_i + 1 |
| 78 | $ if tests_e .eqs. "," then goto exit | 100 | $ if tests_e .eqs. "," then goto exit |
| 101 | $ write sys$output "---> ''tests_e'" | ||
| 79 | $ gosub 'tests_e' | 102 | $ gosub 'tests_e' |
| 80 | $ goto loop_tests | 103 | $ goto loop_tests |
| 81 | $ | 104 | $ |
| 82 | $ test_evp: | 105 | $ test_evp: |
| 83 | $ mcr 'texe_dir''evptest' evptests.txt | 106 | $ mcr 'texe_dir''evptest' 'ROOT'.CRYPTO.EVP]evptests.txt |
| 84 | $ return | 107 | $ return |
| 85 | $ test_des: | 108 | $ test_des: |
| 86 | $ mcr 'texe_dir''destest' | 109 | $ mcr 'texe_dir''destest' |
| @@ -132,68 +155,109 @@ $ test_rand: | |||
| 132 | $ mcr 'texe_dir''randtest' | 155 | $ mcr 'texe_dir''randtest' |
| 133 | $ return | 156 | $ return |
| 134 | $ test_enc: | 157 | $ test_enc: |
| 135 | $ @testenc.com | 158 | $ @testenc.com 'pointer_size' |
| 136 | $ return | 159 | $ return |
| 137 | $ test_x509: | 160 | $ test_x509: |
| 138 | $ define sys$error nla0: | 161 | $ set noon |
| 162 | $ define sys$error test_x509.err | ||
| 139 | $ write sys$output "test normal x509v1 certificate" | 163 | $ write sys$output "test normal x509v1 certificate" |
| 140 | $ @tx509.com | 164 | $ @tx509.com "" 'pointer_size' |
| 141 | $ write sys$output "test first x509v3 certificate" | 165 | $ write sys$output "test first x509v3 certificate" |
| 142 | $ @tx509.com v3-cert1.pem | 166 | $ @tx509.com v3-cert1.pem 'pointer_size' |
| 143 | $ write sys$output "test second x509v3 certificate" | 167 | $ write sys$output "test second x509v3 certificate" |
| 144 | $ @tx509.com v3-cert2.pem | 168 | $ @tx509.com v3-cert2.pem 'pointer_size' |
| 145 | $ deassign sys$error | 169 | $ deassign sys$error |
| 170 | $ set on | ||
| 146 | $ return | 171 | $ return |
| 147 | $ test_rsa: | 172 | $ test_rsa: |
| 148 | $ define sys$error nla0: | 173 | $ set noon |
| 149 | $ @trsa.com | 174 | $ define sys$error test_rsa.err |
| 175 | $ @trsa.com "" 'pointer_size' | ||
| 150 | $ deassign sys$error | 176 | $ deassign sys$error |
| 151 | $ mcr 'texe_dir''rsatest' | 177 | $ mcr 'texe_dir''rsatest' |
| 178 | $ set on | ||
| 152 | $ return | 179 | $ return |
| 153 | $ test_crl: | 180 | $ test_crl: |
| 154 | $ define sys$error nla0: | 181 | $ set noon |
| 155 | $ @tcrl.com | 182 | $ define sys$error test_crl.err |
| 183 | $ @tcrl.com "" 'pointer_size' | ||
| 156 | $ deassign sys$error | 184 | $ deassign sys$error |
| 185 | $ set on | ||
| 157 | $ return | 186 | $ return |
| 158 | $ test_sid: | 187 | $ test_sid: |
| 159 | $ define sys$error nla0: | 188 | $ set noon |
| 160 | $ @tsid.com | 189 | $ define sys$error test_sid.err |
| 190 | $ @tsid.com "" 'pointer_size' | ||
| 161 | $ deassign sys$error | 191 | $ deassign sys$error |
| 192 | $ set on | ||
| 162 | $ return | 193 | $ return |
| 163 | $ test_req: | 194 | $ test_req: |
| 164 | $ define sys$error nla0: | 195 | $ set noon |
| 165 | $ @treq.com | 196 | $ define sys$error test_req.err |
| 166 | $ @treq.com testreq2.pem | 197 | $ @treq.com "" 'pointer_size' |
| 198 | $ @treq.com testreq2.pem 'pointer_size' | ||
| 167 | $ deassign sys$error | 199 | $ deassign sys$error |
| 200 | $ set on | ||
| 168 | $ return | 201 | $ return |
| 169 | $ test_pkcs7: | 202 | $ test_pkcs7: |
| 170 | $ define sys$error nla0: | 203 | $ set noon |
| 171 | $ @tpkcs7.com | 204 | $ define sys$error test_pkcs7.err |
| 172 | $ @tpkcs7d.com | 205 | $ @tpkcs7.com "" 'pointer_size' |
| 206 | $ @tpkcs7d.com "" 'pointer_size' | ||
| 173 | $ deassign sys$error | 207 | $ deassign sys$error |
| 208 | $ set on | ||
| 174 | $ return | 209 | $ return |
| 175 | $ test_bn: | 210 | $ test_bn: |
| 176 | $ write sys$output "starting big number library test, could take a while..." | 211 | $ write sys$output - |
| 177 | $ create bntest-vms.fdl | 212 | "starting big number library test, could take a while..." |
| 213 | $ set noon | ||
| 214 | $ define sys$error test_bn.err | ||
| 215 | $ define sys$output test_bn.out | ||
| 216 | $ @ bctest.com | ||
| 217 | $ status = $status | ||
| 218 | $ deassign sys$error | ||
| 219 | $ deassign sys$output | ||
| 220 | $ set on | ||
| 221 | $ if (status) | ||
| 222 | $ then | ||
| 223 | $ create /fdl = sys$input bntest-vms.tmp | ||
| 224 | FILE | ||
| 225 | ORGANIZATION sequential | ||
| 226 | RECORD | ||
| 227 | FORMAT stream_lf | ||
| 228 | $ define /user_mode sys$output bntest-vms.tmp | ||
| 229 | $ mcr 'texe_dir''bntest' | ||
| 230 | $ define /user_mode sys$input bntest-vms.tmp | ||
| 231 | $ define /user_mode sys$output bntest-vms.out | ||
| 232 | $ bc | ||
| 233 | $ @ bntest.com bntest-vms.out | ||
| 234 | $ status = $status | ||
| 235 | $ if (status) | ||
| 236 | $ then | ||
| 237 | $ delete bntest-vms.out;* | ||
| 238 | $ delete bntest-vms.tmp;* | ||
| 239 | $ endif | ||
| 240 | $ else | ||
| 241 | $ create /fdl = sys$input bntest-vms.sh | ||
| 178 | FILE | 242 | FILE |
| 179 | ORGANIZATION sequential | 243 | ORGANIZATION sequential |
| 180 | RECORD | 244 | RECORD |
| 181 | FORMAT stream_lf | 245 | FORMAT stream_lf |
| 182 | $ create/fdl=bntest-vms.fdl bntest-vms.sh | 246 | $ open /append bntest_file bntest-vms.sh |
| 183 | $ open/append foo bntest-vms.sh | 247 | $ type /output = bntest_file sys$input: |
| 184 | $ type/output=foo: sys$input: | ||
| 185 | << __FOO__ sh -c "`sh ./bctest`" | perl -e '$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $1";} elsif (!/^0$/) {die "\nFailed! bc: $_";} else {print STDERR "."; $i++;}} print STDERR "\n$i tests passed\n"' | 248 | << __FOO__ sh -c "`sh ./bctest`" | perl -e '$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $1";} elsif (!/^0$/) {die "\nFailed! bc: $_";} else {print STDERR "."; $i++;}} print STDERR "\n$i tests passed\n"' |
| 186 | $ define/user sys$output bntest-vms.tmp | 249 | $ define /user_mode sys$output bntest-vms.tmp |
| 187 | $ mcr 'texe_dir''bntest' | 250 | $ mcr 'texe_dir''bntest' |
| 188 | $ copy bntest-vms.tmp foo: | 251 | $ copy bntest-vms.tmp bntest_file |
| 189 | $ delete bntest-vms.tmp;* | 252 | $ delete bntest-vms.tmp;* |
| 190 | $ type/output=foo: sys$input: | 253 | $ type /output = bntest_file sys$input: |
| 191 | __FOO__ | 254 | __FOO__ |
| 192 | $ close foo | 255 | $ close bntest_file |
| 193 | $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and" | 256 | $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and" |
| 194 | $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations" | 257 | $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations" |
| 195 | $ write sys$output "-- went well." | 258 | $ write sys$output "-- went well." |
| 196 | $ write sys$output "" | 259 | $ write sys$output "" |
| 260 | $ endif | ||
| 197 | $ write sys$output "test a^b%c implementations" | 261 | $ write sys$output "test a^b%c implementations" |
| 198 | $ mcr 'texe_dir''exptest' | 262 | $ mcr 'texe_dir''exptest' |
| 199 | $ return | 263 | $ return |
| @@ -212,7 +276,7 @@ $ return | |||
| 212 | $ test_verify: | 276 | $ test_verify: |
| 213 | $ write sys$output "The following command should have some OK's and some failures" | 277 | $ write sys$output "The following command should have some OK's and some failures" |
| 214 | $ write sys$output "There are definitly a few expired certificates" | 278 | $ write sys$output "There are definitly a few expired certificates" |
| 215 | $ @tverify.com | 279 | $ @tverify.com 'pointer_size' |
| 216 | $ return | 280 | $ return |
| 217 | $ test_dh: | 281 | $ test_dh: |
| 218 | $ write sys$output "Generate a set of DH parameters" | 282 | $ write sys$output "Generate a set of DH parameters" |
| @@ -224,7 +288,7 @@ $ mcr 'texe_dir''dsatest' | |||
| 224 | $ return | 288 | $ return |
| 225 | $ test_gen: | 289 | $ test_gen: |
| 226 | $ write sys$output "Generate and verify a certificate request" | 290 | $ write sys$output "Generate and verify a certificate request" |
| 227 | $ @testgen.com | 291 | $ @testgen.com 'pointer_size' |
| 228 | $ return | 292 | $ return |
| 229 | $ maybe_test_ss: | 293 | $ maybe_test_ss: |
| 230 | $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) | 294 | $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) |
| @@ -237,7 +301,7 @@ $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then - | |||
| 237 | $ return | 301 | $ return |
| 238 | $ test_ss: | 302 | $ test_ss: |
| 239 | $ write sys$output "Generate and certify a test certificate" | 303 | $ write sys$output "Generate and certify a test certificate" |
| 240 | $ @testss.com | 304 | $ @testss.com 'pointer_size' |
| 241 | $ return | 305 | $ return |
| 242 | $ test_engine: | 306 | $ test_engine: |
| 243 | $ write sys$output "Manipulate the ENGINE structures" | 307 | $ write sys$output "Manipulate the ENGINE structures" |
| @@ -246,11 +310,11 @@ $ return | |||
| 246 | $ test_ssl: | 310 | $ test_ssl: |
| 247 | $ write sys$output "test SSL protocol" | 311 | $ write sys$output "test SSL protocol" |
| 248 | $ gosub maybe_test_ss | 312 | $ gosub maybe_test_ss |
| 249 | $ @testssl.com keyU.ss certU.ss certCA.ss | 313 | $ @testssl.com keyU.ss certU.ss certCA.ss 'pointer_size' |
| 250 | $ return | 314 | $ return |
| 251 | $ test_ca: | 315 | $ test_ca: |
| 252 | $ set noon | 316 | $ set noon |
| 253 | $ define/user sys$output nla0: | 317 | $ define /user_mode sys$output test_ca.out |
| 254 | $ mcr 'exe_dir'openssl no-rsa | 318 | $ mcr 'exe_dir'openssl no-rsa |
| 255 | $ save_severity=$SEVERITY | 319 | $ save_severity=$SEVERITY |
| 256 | $ set on | 320 | $ set on |
| @@ -259,7 +323,7 @@ $ then | |||
| 259 | $ write sys$output "skipping CA.com test -- requires RSA" | 323 | $ write sys$output "skipping CA.com test -- requires RSA" |
| 260 | $ else | 324 | $ else |
| 261 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" | 325 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" |
| 262 | $ @testca.com | 326 | $ @testca.com 'pointer_size' |
| 263 | $ endif | 327 | $ endif |
| 264 | $ return | 328 | $ return |
| 265 | $ test_aes: | 329 | $ test_aes: |
| @@ -268,7 +332,7 @@ $! !mcr 'texe_dir''aestest' | |||
| 268 | $ return | 332 | $ return |
| 269 | $ test_tsa: | 333 | $ test_tsa: |
| 270 | $ set noon | 334 | $ set noon |
| 271 | $ define/user sys$output nla0: | 335 | $ define /user_mode sys$output nla0: |
| 272 | $ mcr 'exe_dir'openssl no-rsa | 336 | $ mcr 'exe_dir'openssl no-rsa |
| 273 | $ save_severity=$SEVERITY | 337 | $ save_severity=$SEVERITY |
| 274 | $ set on | 338 | $ set on |
| @@ -276,7 +340,7 @@ $ if save_severity | |||
| 276 | $ then | 340 | $ then |
| 277 | $ write sys$output "skipping testtsa.com test -- requires RSA" | 341 | $ write sys$output "skipping testtsa.com test -- requires RSA" |
| 278 | $ else | 342 | $ else |
| 279 | $ @testtsa.com | 343 | $ @testtsa.com "" "" "" 'pointer_size' |
| 280 | $ endif | 344 | $ endif |
| 281 | $ return | 345 | $ return |
| 282 | $ test_ige: | 346 | $ test_ige: |
| @@ -289,11 +353,14 @@ $ mcr 'texe_dir''jpaketest' | |||
| 289 | $ return | 353 | $ return |
| 290 | $ test_cms: | 354 | $ test_cms: |
| 291 | $ write sys$output "CMS consistency test" | 355 | $ write sys$output "CMS consistency test" |
| 356 | $ ! Define the logical name used to find openssl.exe in the perl script. | ||
| 357 | $ define /user_mode osslx 'exe_dir' | ||
| 292 | $ perl CMS-TEST.PL | 358 | $ perl CMS-TEST.PL |
| 293 | $ return | 359 | $ return |
| 294 | $ | 360 | $ |
| 295 | $ | 361 | $ |
| 296 | $ exit: | 362 | $ exit: |
| 363 | $ mcr 'exe_dir'openssl version -a | ||
| 297 | $ set default '__save_default' | 364 | $ set default '__save_default' |
| 298 | $ deassign sslroot | 365 | $ deassign sslroot |
| 299 | $ exit | 366 | $ exit |
diff --git a/src/lib/libssl/test/testss.com b/src/lib/libssl/test/testss.com index 6598106b09..32a74d0fc2 100644 --- a/src/lib/libssl/test/testss.com +++ b/src/lib/libssl/test/testss.com | |||
| @@ -1,16 +1,19 @@ | |||
| 1 | $! TESTSS.COM | 1 | $! TESTSS.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ digest="-md5" | 12 | $ digest="-md5" |
| 10 | $ reqcmd := mcr 'exe_dir'openssl req | 13 | $ reqcmd = "mcr ''exe_dir'openssl req" |
| 11 | $ x509cmd := mcr 'exe_dir'openssl x509 'digest' | 14 | $ x509cmd = "mcr ''exe_dir'openssl x509 ''digest'" |
| 12 | $ verifycmd := mcr 'exe_dir'openssl verify | 15 | $ verifycmd = "mcr ''exe_dir'openssl verify" |
| 13 | $ dummycnf := sys$disk:[-.apps]openssl-vms.cnf | 16 | $ dummycnf = "sys$disk:[-.apps]openssl-vms.cnf" |
| 14 | $ | 17 | $ |
| 15 | $ CAkey="""keyCA.ss""" | 18 | $ CAkey="""keyCA.ss""" |
| 16 | $ CAcert="""certCA.ss""" | 19 | $ CAcert="""certCA.ss""" |
diff --git a/src/lib/libssl/test/testssl.com b/src/lib/libssl/test/testssl.com index 9c83afba04..f19edc4719 100644 --- a/src/lib/libssl/test/testssl.com +++ b/src/lib/libssl/test/testssl.com | |||
| @@ -1,11 +1,14 @@ | |||
| 1 | $! TESTSSL.COM | 1 | $! TESTSSL.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ texe_dir := sys$disk:[-.'__arch'.exe.test] | 7 | $! |
| 8 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 8 | $ if (p4 .eqs. "64") then __arch = __arch+ "_64" |
| 9 | $! | ||
| 10 | $ texe_dir = "sys$disk:[-.''__arch'.exe.test]" | ||
| 11 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 9 | $ | 12 | $ |
| 10 | $ if p1 .eqs. "" | 13 | $ if p1 .eqs. "" |
| 11 | $ then | 14 | $ then |
| @@ -19,21 +22,21 @@ $ cert="[-.apps]server.pem" | |||
| 19 | $ else | 22 | $ else |
| 20 | $ cert=p2 | 23 | $ cert=p2 |
| 21 | $ endif | 24 | $ endif |
| 22 | $ ssltest := mcr 'texe_dir'ssltest -key 'key' -cert 'cert' -c_key 'key' -c_cert 'cert' | 25 | $ ssltest = "mcr ''texe_dir'ssltest -key ''key'"+ - |
| 23 | $ | 26 | " -cert ''cert' -c_key ''key' -c_cert ''cert'" |
| 27 | $! | ||
| 28 | $ set noon | ||
| 24 | $ define/user sys$output testssl-x509-output. | 29 | $ define/user sys$output testssl-x509-output. |
| 25 | $ define/user sys$error nla0: | 30 | $ define/user sys$error nla0: |
| 26 | $ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout | 31 | $ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout |
| 27 | $ set noon | ||
| 28 | $ define/user sys$error nla0: | 32 | $ define/user sys$error nla0: |
| 29 | $ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact | 33 | $ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact |
| 30 | $ if $severity .eq. 1 | 34 | $ if $severity .eq. 1 |
| 31 | $ then | 35 | $ then |
| 32 | $ dsa_cert := YES | 36 | $ dsa_cert = "YES" |
| 33 | $ else | 37 | $ else |
| 34 | $ dsa_cert := NO | 38 | $ dsa_cert = "NO" |
| 35 | $ endif | 39 | $ endif |
| 36 | $ set on | ||
| 37 | $ delete testssl-x509-output.;* | 40 | $ delete testssl-x509-output.;* |
| 38 | $ | 41 | $ |
| 39 | $ if p3 .eqs. "" | 42 | $ if p3 .eqs. "" |
| @@ -161,14 +164,12 @@ $ if $severity .ne. 1 then goto exit3 | |||
| 161 | $ | 164 | $ |
| 162 | $!########################################################################### | 165 | $!########################################################################### |
| 163 | $ | 166 | $ |
| 164 | $ set noon | ||
| 165 | $ define/user sys$output nla0: | 167 | $ define/user sys$output nla0: |
| 166 | $ mcr 'exe_dir'openssl no-rsa | 168 | $ mcr 'exe_dir'openssl no-rsa |
| 167 | $ no_rsa=$SEVERITY | 169 | $ no_rsa=$SEVERITY |
| 168 | $ define/user sys$output nla0: | 170 | $ define/user sys$output nla0: |
| 169 | $ mcr 'exe_dir'openssl no-dh | 171 | $ mcr 'exe_dir'openssl no-dh |
| 170 | $ no_dh=$SEVERITY | 172 | $ no_dh=$SEVERITY |
| 171 | $ set on | ||
| 172 | $ | 173 | $ |
| 173 | $ if no_dh | 174 | $ if no_dh |
| 174 | $ then | 175 | $ then |
| @@ -203,4 +204,5 @@ $ exit3: | |||
| 203 | $ RET = 3 | 204 | $ RET = 3 |
| 204 | $ exit: | 205 | $ exit: |
| 205 | $ if p3 .eqs. "" then delete certs.tmp;* | 206 | $ if p3 .eqs. "" then delete certs.tmp;* |
| 207 | $ set on | ||
| 206 | $ exit 'RET' | 208 | $ exit 'RET' |
diff --git a/src/lib/libssl/test/testtsa.com b/src/lib/libssl/test/testtsa.com index e3c586f14a..29fb1d0e63 100644 --- a/src/lib/libssl/test/testtsa.com +++ b/src/lib/libssl/test/testtsa.com | |||
| @@ -2,14 +2,17 @@ $! | |||
| 2 | $! A few very basic tests for the 'ts' time stamping authority command. | 2 | $! A few very basic tests for the 'ts' time stamping authority command. |
| 3 | $! | 3 | $! |
| 4 | $ | 4 | $ |
| 5 | $ __arch := VAX | 5 | $ __arch = "VAX" |
| 6 | $ if f$getsyi("cpu") .ge. 128 then - | 6 | $ if f$getsyi("cpu") .ge. 128 then - |
| 7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 8 | $ if __arch .eqs. "" then __arch := UNK | 8 | $ if __arch .eqs. "" then __arch = "UNK" |
| 9 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 9 | $! |
| 10 | $ if (p4 .eqs. "64") then __arch = __arch+ "_64" | ||
| 11 | $! | ||
| 12 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 10 | $ | 13 | $ |
| 11 | $ openssl := mcr 'f$parse(exe_dir+"openssl.exe")' | 14 | $ openssl = "mcr ''f$parse(exe_dir+"openssl.exe")'" |
| 12 | $ OPENSSL_CONF := [-]CAtsa.cnf | 15 | $ OPENSSL_CONF = "[-]CAtsa.cnf" |
| 13 | $ ! Because that's what ../apps/CA.sh really looks at | 16 | $ ! Because that's what ../apps/CA.sh really looks at |
| 14 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF | 17 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF |
| 15 | $ | 18 | $ |
| @@ -114,8 +117,8 @@ $ | |||
| 114 | $ time_stamp_response_token_test: | 117 | $ time_stamp_response_token_test: |
| 115 | $ subroutine | 118 | $ subroutine |
| 116 | $ | 119 | $ |
| 117 | $ RESPONSE2:='p2'.copy_tsr | 120 | $ RESPONSE2 = p2+ "-copy_tsr" |
| 118 | $ TOKEN_DER:='p2'.token_der | 121 | $ TOKEN_DER = p2+ "-token_der" |
| 119 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out | 122 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out |
| 120 | $ if $severity .ne. 1 then call error | 123 | $ if $severity .ne. 1 then call error |
| 121 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' | 124 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' |
| @@ -145,13 +148,13 @@ $ verify_time_stamp_token: | |||
| 145 | $ subroutine | 148 | $ subroutine |
| 146 | $ | 149 | $ |
| 147 | $ ! create the token from the response first | 150 | $ ! create the token from the response first |
| 148 | $ openssl ts -reply -in 'p2' -out 'p2'.token -token_out | 151 | $ openssl ts -reply -in "''p2'" -out "''p2'-token" -token_out |
| 149 | $ if $severity .ne. 1 then call error | 152 | $ if $severity .ne. 1 then call error |
| 150 | $ openssl ts -verify -queryfile 'p1' -in 'p2'.token -token_in - | 153 | $ openssl ts -verify -queryfile "''p1'" -in "''p2'-token" - |
| 151 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 154 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
| 152 | $ if $severity .ne. 1 then call error | 155 | $ if $severity .ne. 1 then call error |
| 153 | $ openssl ts -verify -data 'p3' -in 'p2'.token -token_in - | 156 | $ openssl ts -verify -data "''p3'" -in "''p2'-token" - |
| 154 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 157 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
| 155 | $ if $severity .ne. 1 then call error | 158 | $ if $severity .ne. 1 then call error |
| 156 | $ endsubroutine | 159 | $ endsubroutine |
| 157 | $ | 160 | $ |
| @@ -167,6 +170,8 @@ $ endsubroutine | |||
| 167 | $ | 170 | $ |
| 168 | $ ! Main body ---------------------------------------------------------- | 171 | $ ! Main body ---------------------------------------------------------- |
| 169 | $ | 172 | $ |
| 173 | $ set noon | ||
| 174 | $ | ||
| 170 | $ write sys$output "Setting up TSA test directory..." | 175 | $ write sys$output "Setting up TSA test directory..." |
| 171 | $ call setup_dir | 176 | $ call setup_dir |
| 172 | $ | 177 | $ |
| @@ -183,66 +188,68 @@ $ write sys$output "Creating req1.req time stamp request for file testtsa..." | |||
| 183 | $ call create_time_stamp_request1 | 188 | $ call create_time_stamp_request1 |
| 184 | $ | 189 | $ |
| 185 | $ write sys$output "Printing req1.req..." | 190 | $ write sys$output "Printing req1.req..." |
| 186 | $ call print_request req1.tsq | 191 | $ call print_request "req1.tsq" |
| 187 | $ | 192 | $ |
| 188 | $ write sys$output "Generating valid response for req1.req..." | 193 | $ write sys$output "Generating valid response for req1.req..." |
| 189 | $ call create_time_stamp_response req1.tsq resp1.tsr tsa_config1 | 194 | $ call create_time_stamp_response "req1.tsq" "resp1.tsr" "tsa_config1" |
| 190 | $ | 195 | $ |
| 191 | $ write sys$output "Printing response..." | 196 | $ write sys$output "Printing response..." |
| 192 | $ call print_response resp1.tsr | 197 | $ call print_response "resp1.tsr" |
| 193 | $ | 198 | $ |
| 194 | $ write sys$output "Verifying valid response..." | 199 | $ write sys$output "Verifying valid response..." |
| 195 | $ call verify_time_stamp_response req1.tsq resp1.tsr [-]testtsa.com | 200 | $ call verify_time_stamp_response "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
| 196 | $ | 201 | $ |
| 197 | $ write sys$output "Verifying valid token..." | 202 | $ write sys$output "Verifying valid token..." |
| 198 | $ call verify_time_stamp_token req1.tsq resp1.tsr [-]testtsa.com | 203 | $ call verify_time_stamp_token "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
| 199 | $ | 204 | $ |
| 200 | $ ! The tests below are commented out, because invalid signer certificates | 205 | $ ! The tests below are commented out, because invalid signer certificates |
| 201 | $ ! can no longer be specified in the config file. | 206 | $ ! can no longer be specified in the config file. |
| 202 | $ | 207 | $ |
| 203 | $ ! write sys$output "Generating _invalid_ response for req1.req..." | 208 | $ ! write sys$output "Generating _invalid_ response for req1.req..." |
| 204 | $ ! call create_time_stamp_response req1.tsq resp1_bad.tsr tsa_config2 | 209 | $ ! call create_time_stamp_response "req1.tsq" "resp1_bad.tsr" "tsa_config2" |
| 205 | $ | 210 | $ |
| 206 | $ ! write sys$output "Printing response..." | 211 | $ ! write sys$output "Printing response..." |
| 207 | $ ! call print_response resp1_bad.tsr | 212 | $ ! call print_response "resp1_bad.tsr" |
| 208 | $ | 213 | $ |
| 209 | $ ! write sys$output "Verifying invalid response, it should fail..." | 214 | $ ! write sys$output "Verifying invalid response, it should fail..." |
| 210 | $ ! call verify_time_stamp_response_fail req1.tsq resp1_bad.tsr | 215 | $ ! call verify_time_stamp_response_fail "req1.tsq" "resp1_bad.tsr" |
| 211 | $ | 216 | $ |
| 212 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." | 217 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." |
| 213 | $ call create_time_stamp_request2 | 218 | $ call create_time_stamp_request2 |
| 214 | $ | 219 | $ |
| 215 | $ write sys$output "Printing req2.req..." | 220 | $ write sys$output "Printing req2.req..." |
| 216 | $ call print_request req2.tsq | 221 | $ call print_request "req2.tsq" |
| 217 | $ | 222 | $ |
| 218 | $ write sys$output "Generating valid response for req2.req..." | 223 | $ write sys$output "Generating valid response for req2.req..." |
| 219 | $ call create_time_stamp_response req2.tsq resp2.tsr tsa_config1 | 224 | $ call create_time_stamp_response "req2.tsq" "resp2.tsr" "tsa_config1" |
| 220 | $ | 225 | $ |
| 221 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." | 226 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." |
| 222 | $ call time_stamp_response_token_test req2.tsq resp2.tsr | 227 | $ call time_stamp_response_token_test "req2.tsq" "resp2.tsr" |
| 223 | $ | 228 | $ |
| 224 | $ write sys$output "Printing response..." | 229 | $ write sys$output "Printing response..." |
| 225 | $ call print_response resp2.tsr | 230 | $ call print_response "resp2.tsr" |
| 226 | $ | 231 | $ |
| 227 | $ write sys$output "Verifying valid response..." | 232 | $ write sys$output "Verifying valid response..." |
| 228 | $ call verify_time_stamp_response req2.tsq resp2.tsr [-]testtsa.com | 233 | $ call verify_time_stamp_response "req2.tsq" "resp2.tsr" "[-]testtsa.com" |
| 229 | $ | 234 | $ |
| 230 | $ write sys$output "Verifying response against wrong request, it should fail..." | 235 | $ write sys$output "Verifying response against wrong request, it should fail..." |
| 231 | $ call verify_time_stamp_response_fail req1.tsq resp2.tsr | 236 | $ call verify_time_stamp_response_fail "req1.tsq" "resp2.tsr" |
| 232 | $ | 237 | $ |
| 233 | $ write sys$output "Verifying response against wrong request, it should fail..." | 238 | $ write sys$output "Verifying response against wrong request, it should fail..." |
| 234 | $ call verify_time_stamp_response_fail req2.tsq resp1.tsr | 239 | $ call verify_time_stamp_response_fail "req2.tsq" "resp1.tsr" |
| 235 | $ | 240 | $ |
| 236 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." | 241 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." |
| 237 | $ call create_time_stamp_request3 | 242 | $ call create_time_stamp_request3 |
| 238 | $ | 243 | $ |
| 239 | $ write sys$output "Printing req3.req..." | 244 | $ write sys$output "Printing req3.req..." |
| 240 | $ call print_request req3.tsq | 245 | $ call print_request "req3.tsq" |
| 241 | $ | 246 | $ |
| 242 | $ write sys$output "Verifying response against wrong request, it should fail..." | 247 | $ write sys$output "Verifying response against wrong request, it should fail..." |
| 243 | $ call verify_time_stamp_response_fail req3.tsq resp1.tsr | 248 | $ call verify_time_stamp_response_fail "req3.tsq" "resp1.tsr" |
| 244 | $ | 249 | $ |
| 245 | $ write sys$output "Cleaning up..." | 250 | $ write sys$output "Cleaning up..." |
| 246 | $ call clean_up_dir | 251 | $ call clean_up_dir |
| 247 | $ | 252 | $ |
| 253 | $ set on | ||
| 254 | $ | ||
| 248 | $ exit | 255 | $ exit |
diff --git a/src/lib/libssl/test/tpkcs7.com b/src/lib/libssl/test/tpkcs7.com index e107cc141a..3fc4982bb0 100644 --- a/src/lib/libssl/test/tpkcs7.com +++ b/src/lib/libssl/test/tpkcs7.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TPKCS7.COM -- Tests pkcs7 keys | 1 | $! TPKCS7.COM -- Tests pkcs7 keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl pkcs7 | 12 | $ cmd = "mcr ''exe_dir'openssl pkcs7" |
| 10 | $ | 13 | $ |
| 11 | $ t := testp7.pem | 14 | $ t = "testp7.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing PKCS7 conversions" | 17 | $ write sys$output "testing PKCS7 conversions" |
diff --git a/src/lib/libssl/test/tpkcs7d.com b/src/lib/libssl/test/tpkcs7d.com index 5ff653ccee..eea8c888ee 100644 --- a/src/lib/libssl/test/tpkcs7d.com +++ b/src/lib/libssl/test/tpkcs7d.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TPKCS7.COM -- Tests pkcs7 keys | 1 | $! TPKCS7.COM -- Tests pkcs7 keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl pkcs7 | 12 | $ cmd = "mcr ''exe_dir'openssl pkcs7" |
| 10 | $ | 13 | $ |
| 11 | $ t := pkcs7-1.pem | 14 | $ t = "pkcs7-1.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing PKCS7 conversions (2)" | 17 | $ write sys$output "testing PKCS7 conversions (2)" |
diff --git a/src/lib/libssl/test/treq.com b/src/lib/libssl/test/treq.com index d2594be6a7..acf08b79ef 100644 --- a/src/lib/libssl/test/treq.com +++ b/src/lib/libssl/test/treq.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TREQ.COM -- Tests req keys | 1 | $! TREQ.COM -- Tests req keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl req -config [-.apps]openssl-vms.cnf | 12 | $ cmd = "mcr ''exe_dir'openssl req -config [-.apps]openssl-vms.cnf" |
| 10 | $ | 13 | $ |
| 11 | $ t := testreq.pem | 14 | $ t = "testreq.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing req conversions" | 17 | $ write sys$output "testing req conversions" |
diff --git a/src/lib/libssl/test/trsa.com b/src/lib/libssl/test/trsa.com index d3a8a605b7..54180843ee 100644 --- a/src/lib/libssl/test/trsa.com +++ b/src/lib/libssl/test/trsa.com | |||
| @@ -1,10 +1,13 @@ | |||
| 1 | $! TRSA.COM -- Tests rsa keys | 1 | $! TRSA.COM -- Tests rsa keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ set noon | 12 | $ set noon |
| 10 | $ define/user sys$output nla0: | 13 | $ define/user sys$output nla0: |
| @@ -17,9 +20,9 @@ $ write sys$output "skipping RSA conversion test" | |||
| 17 | $ exit | 20 | $ exit |
| 18 | $ endif | 21 | $ endif |
| 19 | $ | 22 | $ |
| 20 | $ cmd := mcr 'exe_dir'openssl rsa | 23 | $ cmd = "mcr ''exe_dir'openssl rsa" |
| 21 | $ | 24 | $ |
| 22 | $ t := testrsa.pem | 25 | $ t = "testrsa.pem" |
| 23 | $ if p1 .nes. "" then t = p1 | 26 | $ if p1 .nes. "" then t = p1 |
| 24 | $ | 27 | $ |
| 25 | $ write sys$output "testing RSA conversions" | 28 | $ write sys$output "testing RSA conversions" |
diff --git a/src/lib/libssl/test/tsid.com b/src/lib/libssl/test/tsid.com index 267ace1135..b6c4e49473 100644 --- a/src/lib/libssl/test/tsid.com +++ b/src/lib/libssl/test/tsid.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TSID.COM -- Tests sid keys | 1 | $! TSID.COM -- Tests sid keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl sess_id | 12 | $ cmd = "mcr ''exe_dir'openssl sess_id" |
| 10 | $ | 13 | $ |
| 11 | $ t := testsid.pem | 14 | $ t = "testsid.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing session-id conversions" | 17 | $ write sys$output "testing session-id conversions" |
diff --git a/src/lib/libssl/test/tverify.com b/src/lib/libssl/test/tverify.com index 01431f4aac..d888344637 100644 --- a/src/lib/libssl/test/tverify.com +++ b/src/lib/libssl/test/tverify.com | |||
| @@ -1,13 +1,15 @@ | |||
| 1 | $! TVERIFY.COM | 1 | $! TVERIFY.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $! | ||
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 7 | $! | 9 | $! |
| 8 | $ line_max = 255 ! Could be longer on modern non-VAX. | 10 | $ line_max = 255 ! Could be longer on modern non-VAX. |
| 9 | $ temp_file_name = "certs_"+ f$getjpi( "", "PID")+ ".tmp" | 11 | $ temp_file_name = "certs_"+ f$getjpi( "", "PID")+ ".tmp" |
| 10 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 12 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" |
| 11 | $ cmd = "mcr ''exe_dir'openssl verify ""-CAfile"" ''temp_file_name'" | 13 | $ cmd = "mcr ''exe_dir'openssl verify ""-CAfile"" ''temp_file_name'" |
| 12 | $ cmd_len = f$length( cmd) | 14 | $ cmd_len = f$length( cmd) |
| 13 | $ pems = "[-.certs...]*.pem" | 15 | $ pems = "[-.certs...]*.pem" |
| @@ -19,7 +21,7 @@ $! | |||
| 19 | $! Loop through all the certificate files. | 21 | $! Loop through all the certificate files. |
| 20 | $! | 22 | $! |
| 21 | $ args = "" | 23 | $ args = "" |
| 22 | $ old_f := | 24 | $ old_f = "" |
| 23 | $ loop_file: | 25 | $ loop_file: |
| 24 | $ f = f$search( pems) | 26 | $ f = f$search( pems) |
| 25 | $ if ((f .nes. "") .and. (f .nes. old_f)) | 27 | $ if ((f .nes. "") .and. (f .nes. old_f)) |
diff --git a/src/lib/libssl/test/tx509.com b/src/lib/libssl/test/tx509.com index 399eb01490..93ce988b41 100644 --- a/src/lib/libssl/test/tx509.com +++ b/src/lib/libssl/test/tx509.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TX509.COM -- Tests x509 certificates | 1 | $! TX509.COM -- Tests x509 certificates |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl x509 | 12 | $ cmd = "mcr ''exe_dir'openssl x509" |
| 10 | $ | 13 | $ |
| 11 | $ t := testx509.pem | 14 | $ t = "testx509.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing X509 conversions" | 17 | $ write sys$output "testing X509 conversions" |
