diff options
author | kris <kris@FreeBSD.org> | 2000-04-13 06:33:22 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-04-13 06:33:22 +0000 |
commit | 54c77f990d8a5f46f1d18b67cddb279f49176146 (patch) | |
tree | 85b9c007d5ac1d91a3895eef3fd18d6114b62cc4 /crypto/openssl/util | |
parent | 7e4e44947b1aa16034c99654c268dc92300be719 (diff) | |
download | FreeBSD-src-54c77f990d8a5f46f1d18b67cddb279f49176146.zip FreeBSD-src-54c77f990d8a5f46f1d18b67cddb279f49176146.tar.gz |
Initial import of OpenSSL 0.9.5a
Diffstat (limited to 'crypto/openssl/util')
-rwxr-xr-x | crypto/openssl/util/domd | 2 | ||||
-rwxr-xr-x | crypto/openssl/util/libeay.num | 406 | ||||
-rwxr-xr-x | crypto/openssl/util/mk1mf.pl | 3 | ||||
-rwxr-xr-x | crypto/openssl/util/mkdef.pl | 139 | ||||
-rw-r--r-- | crypto/openssl/util/mkerr.pl | 28 | ||||
-rw-r--r-- | crypto/openssl/util/pl/BC-32.pl | 4 | ||||
-rw-r--r-- | crypto/openssl/util/pl/VC-32.pl | 2 | ||||
-rwxr-xr-x | crypto/openssl/util/pod2man.pl | 1181 | ||||
-rw-r--r-- | crypto/openssl/util/selftest.pl | 188 | ||||
-rwxr-xr-x | crypto/openssl/util/ssleay.num | 10 |
10 files changed, 1924 insertions, 39 deletions
diff --git a/crypto/openssl/util/domd b/crypto/openssl/util/domd index 324051f..9f75131 100755 --- a/crypto/openssl/util/domd +++ b/crypto/openssl/util/domd @@ -7,5 +7,5 @@ shift cp Makefile.ssl Makefile.save makedepend -f Makefile.ssl $@ -$TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new +perl $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new mv Makefile.new Makefile.ssl diff --git a/crypto/openssl/util/libeay.num b/crypto/openssl/util/libeay.num index 59c2040..f611d6b 100755 --- a/crypto/openssl/util/libeay.num +++ b/crypto/openssl/util/libeay.num @@ -499,9 +499,9 @@ SHA1_Update 504 SHA_Final 505 SHA_Init 506 SHA_Update 507 -SSLeay_add_all_algorithms 508 -SSLeay_add_all_ciphers 509 -SSLeay_add_all_digests 510 +OpenSSL_add_all_algorithms 508 +OpenSSL_add_all_ciphers 509 +OpenSSL_add_all_digests 510 TXT_DB_create_index 511 TXT_DB_free 512 TXT_DB_get_by_index 513 @@ -1304,13 +1304,12 @@ i2d_SXNETID 1329 d2i_SXNETID 1330 SXNETID_new 1331 SXNETID_free 1332 -DSA_SIG_new 1333 -DSA_SIG_free 1334 -DSA_do_sign 1335 -DSA_do_verify 1336 -d2i_DSA_SIG 1337 -i2d_DSA_SIG 1338 - +DSA_SIG_new 1333 +DSA_SIG_free 1334 +DSA_do_sign 1335 +DSA_do_verify 1336 +d2i_DSA_SIG 1337 +i2d_DSA_SIG 1338 i2d_ASN1_VISIBLESTRING 1339 d2i_ASN1_VISIBLESTRING 1340 i2d_ASN1_UTF8STRING 1341 @@ -1844,3 +1843,390 @@ sk_DIST_POINT_sort 1868 RSA_check_key 1869 OBJ_obj2txt 1870 DSA_dup_DH 1871 +X509_REQ_get_extensions 1872 +X509_REQ_set_extension_nids 1873 +BIO_nwrite 1874 +X509_REQ_extension_nid 1875 +BIO_nread 1876 +X509_REQ_get_extension_nids 1877 +BIO_nwrite0 1878 +X509_REQ_add_extensions_nid 1879 +BIO_nread0 1880 +X509_REQ_add_extensions 1881 +BIO_new_mem_buf 1882 +DH_set_ex_data 1883 +DH_set_method 1884 +DSA_OpenSSL 1885 +DH_get_ex_data 1886 +DH_get_ex_new_index 1887 +DSA_new_method 1888 +DH_new_method 1889 +DH_OpenSSL 1890 +DSA_get_ex_new_index 1891 +DH_get_default_method 1892 +DSA_set_ex_data 1893 +DH_set_default_method 1894 +DSA_get_ex_data 1895 +X509V3_EXT_REQ_add_conf 1896 +NETSCAPE_SPKI_print 1897 +NETSCAPE_SPKI_set_pubkey 1898 +NETSCAPE_SPKI_b64_encode 1899 +NETSCAPE_SPKI_get_pubkey 1900 +NETSCAPE_SPKI_b64_decode 1901 +UTF8_putc 1902 +UTF8_getc 1903 +RSA_null_method 1904 +ASN1_tag2str 1905 +BIO_ctrl_reset_read_request 1906 +DISPLAYTEXT_new 1907 +ASN1_GENERALIZEDTIME_free 1908 +X509_REVOKED_get_ext_d2i 1909 +X509_set_ex_data 1910 +X509_reject_set_bit_asc 1911 +X509_NAME_add_entry_by_txt 1912 +sk_X509_TRUST_pop 1913 +X509_NAME_add_entry_by_NID 1914 +X509_PURPOSE_get0 1915 +sk_ACCESS_DESCRIPTION_shift 1916 +PEM_read_X509_AUX 1917 +d2i_AUTHORITY_INFO_ACCESS 1918 +sk_X509_TRUST_set_cmp_func 1919 +sk_X509_TRUST_free 1920 +PEM_write_PUBKEY 1921 +sk_X509_TRUST_num 1922 +sk_ACCESS_DESCRIPTION_delete 1923 +sk_ASN1_STRING_TABLE_value 1924 +ACCESS_DESCRIPTION_new 1925 +X509_CERT_AUX_free 1926 +d2i_ACCESS_DESCRIPTION 1927 +X509_trust_clear 1928 +sk_X509_PURPOSE_value 1929 +sk_X509_PURPOSE_zero 1930 +X509_TRUST_add 1931 +ASN1_VISIBLESTRING_new 1932 +X509_alias_set1 1933 +ASN1_PRINTABLESTRING_free 1934 +EVP_PKEY_get1_DSA 1935 +ASN1_BMPSTRING_new 1936 +ASN1_mbstring_copy 1937 +ASN1_UTF8STRING_new 1938 +sk_ACCESS_DESCRIPTION_set 1939 +sk_X509_PURPOSE_pop 1940 +DSA_get_default_method 1941 +sk_X509_PURPOSE_push 1942 +sk_X509_PURPOSE_delete 1943 +sk_X509_PURPOSE_num 1944 +i2d_ASN1_SET_OF_ACCESS_DESCRIPTION 1945 +ASN1_T61STRING_free 1946 +sk_ACCESS_DESCRIPTION_free 1947 +sk_ASN1_STRING_TABLE_pop 1948 +DSA_set_method 1949 +X509_get_ex_data 1950 +ASN1_STRING_type 1951 +X509_PURPOSE_get_by_sname 1952 +sk_X509_PURPOSE_find 1953 +ASN1_TIME_free 1954 +ASN1_OCTET_STRING_cmp 1955 +sk_ACCESS_DESCRIPTION_value 1956 +ASN1_BIT_STRING_new 1957 +X509_get_ext_d2i 1958 +PEM_read_bio_X509_AUX 1959 +ASN1_STRING_set_default_mask_asc 1960 +PEM_write_bio_RSA_PUBKEY 1961 +sk_ASN1_STRING_TABLE_num 1962 +ASN1_INTEGER_cmp 1963 +d2i_RSA_PUBKEY_fp 1964 +sk_ACCESS_DESCRIPTION_unshift 1965 +sk_ASN1_STRING_TABLE_delete_ptr 1966 +X509_trust_set_bit_asc 1967 +PEM_write_bio_DSA_PUBKEY 1968 +X509_STORE_CTX_free 1969 +EVP_PKEY_set1_DSA 1970 +i2d_DSA_PUBKEY_fp 1971 +X509_load_cert_crl_file 1972 +ASN1_TIME_new 1973 +i2d_RSA_PUBKEY 1974 +sk_X509_TRUST_pop_free 1975 +X509_STORE_CTX_purpose_inherit 1976 +PEM_read_RSA_PUBKEY 1977 +sk_X509_TRUST_zero 1978 +sk_ACCESS_DESCRIPTION_pop_free 1979 +d2i_X509_AUX 1980 +i2d_DSA_PUBKEY 1981 +X509_CERT_AUX_print 1982 +sk_X509_PURPOSE_new_null 1983 +PEM_read_DSA_PUBKEY 1984 +i2d_RSA_PUBKEY_bio 1985 +ASN1_BIT_STRING_num_asc 1986 +i2d_PUBKEY 1987 +ASN1_UTCTIME_free 1988 +DSA_set_default_method 1989 +X509_PURPOSE_get_by_id 1990 +sk_X509_TRUST_push 1991 +sk_ASN1_STRING_TABLE_sort 1992 +sk_X509_PURPOSE_set_cmp_func 1993 +ACCESS_DESCRIPTION_free 1994 +PEM_read_bio_PUBKEY 1995 +ASN1_STRING_set_by_NID 1996 +X509_PURPOSE_get_id 1997 +DISPLAYTEXT_free 1998 +OTHERNAME_new 1999 +sk_X509_TRUST_find 2000 +X509_CERT_AUX_new 2001 +sk_ACCESS_DESCRIPTION_dup 2002 +sk_ASN1_STRING_TABLE_pop_free 2003 +sk_ASN1_STRING_TABLE_unshift 2004 +sk_X509_TRUST_shift 2005 +sk_ACCESS_DESCRIPTION_zero 2006 +X509_TRUST_cleanup 2007 +X509_NAME_add_entry_by_OBJ 2008 +X509_CRL_get_ext_d2i 2009 +sk_X509_TRUST_set 2010 +X509_PURPOSE_get0_name 2011 +PEM_read_PUBKEY 2012 +sk_ACCESS_DESCRIPTION_new 2013 +i2d_DSA_PUBKEY_bio 2014 +i2d_OTHERNAME 2015 +ASN1_OCTET_STRING_free 2016 +ASN1_BIT_STRING_set_asc 2017 +sk_ACCESS_DESCRIPTION_push 2018 +X509_get_ex_new_index 2019 +ASN1_STRING_TABLE_cleanup 2020 +X509_TRUST_get_by_id 2021 +X509_PURPOSE_get_trust 2022 +ASN1_STRING_length 2023 +d2i_ASN1_SET_OF_ACCESS_DESCRIPTION 2024 +ASN1_PRINTABLESTRING_new 2025 +X509V3_get_d2i 2026 +ASN1_ENUMERATED_free 2027 +i2d_X509_CERT_AUX 2028 +sk_ACCESS_DESCRIPTION_find 2029 +X509_STORE_CTX_set_trust 2030 +sk_X509_PURPOSE_unshift 2031 +ASN1_STRING_set_default_mask 2032 +X509_STORE_CTX_new 2033 +EVP_PKEY_get1_RSA 2034 +sk_X509_PURPOSE_set 2035 +sk_ASN1_STRING_TABLE_insert 2036 +sk_X509_PURPOSE_sort 2037 +DIRECTORYSTRING_free 2038 +PEM_write_X509_AUX 2039 +ASN1_OCTET_STRING_set 2040 +d2i_DSA_PUBKEY_fp 2041 +sk_ASN1_STRING_TABLE_free 2042 +sk_X509_TRUST_value 2043 +d2i_RSA_PUBKEY 2044 +sk_ASN1_STRING_TABLE_set 2045 +X509_TRUST_get0_name 2046 +X509_TRUST_get0 2047 +AUTHORITY_INFO_ACCESS_free 2048 +ASN1_IA5STRING_new 2049 +d2i_DSA_PUBKEY 2050 +X509_check_purpose 2051 +ASN1_ENUMERATED_new 2052 +d2i_RSA_PUBKEY_bio 2053 +d2i_PUBKEY 2054 +X509_TRUST_get_trust 2055 +X509_TRUST_get_flags 2056 +ASN1_BMPSTRING_free 2057 +ASN1_T61STRING_new 2058 +sk_X509_TRUST_unshift 2059 +ASN1_UTCTIME_new 2060 +sk_ACCESS_DESCRIPTION_pop 2061 +i2d_AUTHORITY_INFO_ACCESS 2062 +EVP_PKEY_set1_RSA 2063 +X509_STORE_CTX_set_purpose 2064 +ASN1_IA5STRING_free 2065 +PEM_write_bio_X509_AUX 2066 +X509_PURPOSE_get_count 2067 +CRYPTO_add_info 2068 +sk_ACCESS_DESCRIPTION_num 2069 +sk_ASN1_STRING_TABLE_set_cmp_func 2070 +X509_NAME_ENTRY_create_by_txt 2071 +ASN1_STRING_get_default_mask 2072 +sk_X509_TRUST_dup 2073 +X509_alias_get0 2074 +ASN1_STRING_data 2075 +sk_X509_TRUST_insert 2076 +i2d_ACCESS_DESCRIPTION 2077 +X509_trust_set_bit 2078 +sk_X509_PURPOSE_delete_ptr 2079 +ASN1_BIT_STRING_free 2080 +PEM_read_bio_RSA_PUBKEY 2081 +X509_add1_reject_object 2082 +X509_check_trust 2083 +sk_X509_TRUST_new_null 2084 +sk_ACCESS_DESCRIPTION_new_null 2085 +sk_ACCESS_DESCRIPTION_delete_ptr 2086 +sk_X509_TRUST_sort 2087 +PEM_read_bio_DSA_PUBKEY 2088 +sk_X509_TRUST_new 2089 +X509_PURPOSE_add 2090 +ASN1_STRING_TABLE_get 2091 +ASN1_UTF8STRING_free 2092 +d2i_DSA_PUBKEY_bio 2093 +sk_ASN1_STRING_TABLE_delete 2094 +PEM_write_RSA_PUBKEY 2095 +d2i_OTHERNAME 2096 +sk_ACCESS_DESCRIPTION_insert 2097 +X509_reject_set_bit 2098 +sk_X509_TRUST_delete_ptr 2099 +sk_X509_PURPOSE_pop_free 2100 +PEM_write_DSA_PUBKEY 2101 +sk_X509_PURPOSE_free 2102 +sk_X509_PURPOSE_dup 2103 +sk_ASN1_STRING_TABLE_zero 2104 +X509_PURPOSE_get0_sname 2105 +sk_ASN1_STRING_TABLE_shift 2106 +EVP_PKEY_set1_DH 2107 +ASN1_OCTET_STRING_dup 2108 +ASN1_BIT_STRING_set 2109 +X509_TRUST_get_count 2110 +ASN1_INTEGER_free 2111 +OTHERNAME_free 2112 +i2d_RSA_PUBKEY_fp 2113 +ASN1_INTEGER_dup 2114 +d2i_X509_CERT_AUX 2115 +sk_ASN1_STRING_TABLE_new_null 2116 +PEM_write_bio_PUBKEY 2117 +ASN1_VISIBLESTRING_free 2118 +X509_PURPOSE_cleanup 2119 +sk_ASN1_STRING_TABLE_push 2120 +sk_ASN1_STRING_TABLE_dup 2121 +sk_X509_PURPOSE_shift 2122 +ASN1_mbstring_ncopy 2123 +sk_X509_PURPOSE_new 2124 +sk_X509_PURPOSE_insert 2125 +ASN1_GENERALIZEDTIME_new 2126 +sk_ACCESS_DESCRIPTION_sort 2127 +EVP_PKEY_get1_DH 2128 +sk_ACCESS_DESCRIPTION_set_cmp_func 2129 +ASN1_OCTET_STRING_new 2130 +ASN1_INTEGER_new 2131 +i2d_X509_AUX 2132 +sk_ASN1_STRING_TABLE_find 2133 +ASN1_BIT_STRING_name_print 2134 +X509_cmp 2135 +ASN1_STRING_length_set 2136 +DIRECTORYSTRING_new 2137 +sk_ASN1_STRING_TABLE_new 2138 +sk_X509_TRUST_delete 2139 +X509_add1_trust_object 2140 +PKCS12_newpass 2141 +SMIME_write_PKCS7 2142 +SMIME_read_PKCS7 2143 +des_set_key_checked 2144 +PKCS7_verify 2145 +PKCS7_encrypt 2146 +des_set_key_unchecked 2147 +SMIME_crlf_copy 2148 +i2d_ASN1_PRINTABLESTRING 2149 +PKCS7_get0_signers 2150 +PKCS7_decrypt 2151 +SMIME_text 2152 +PKCS7_simple_smimecap 2153 +PKCS7_get_smimecap 2154 +PKCS7_sign 2155 +PKCS7_add_attrib_smimecap 2156 +CRYPTO_dbg_set_options 2157 +CRYPTO_remove_all_info 2158 +CRYPTO_get_mem_debug_functions 2159 +CRYPTO_is_mem_check_on 2160 +CRYPTO_set_mem_debug_functions 2161 +CRYPTO_pop_info 2162 +CRYPTO_push_info_ 2163 +CRYPTO_set_mem_debug_options 2164 +PEM_write_PKCS8PrivateKey_nid 2165 +PEM_write_bio_PKCS8PrivateKey_nid 2166 +d2i_PKCS8PrivateKey_bio 2167 +ASN1_NULL_free 2168 +d2i_ASN1_NULL 2169 +ASN1_NULL_new 2170 +i2d_PKCS8PrivateKey_bio 2171 +i2d_PKCS8PrivateKey_fp 2172 +i2d_ASN1_NULL 2173 +i2d_PKCS8PrivateKey_nid_fp 2174 +d2i_PKCS8PrivateKey_fp 2175 +i2d_PKCS8PrivateKey_nid_bio 2176 +i2d_PKCS8PrivateKeyInfo_fp 2177 +i2d_PKCS8PrivateKeyInfo_bio 2178 +PEM_cb 2179 +i2d_PrivateKey_fp 2180 +d2i_PrivateKey_bio 2181 +d2i_PrivateKey_fp 2182 +i2d_PrivateKey_bio 2183 +X509_reject_clear 2184 +X509_TRUST_set_default 2185 +d2i_AutoPrivateKey 2186 +X509_ATTRIBUTE_get0_type 2187 +X509_ATTRIBUTE_set1_data 2188 +X509at_get_attr 2189 +X509at_get_attr_count 2190 +X509_ATTRIBUTE_create_by_NID 2191 +X509_ATTRIBUTE_set1_object 2192 +X509_ATTRIBUTE_count 2193 +X509_ATTRIBUTE_create_by_OBJ 2194 +X509_ATTRIBUTE_get0_object 2195 +X509at_get_attr_by_NID 2196 +X509at_add1_attr 2197 +X509_ATTRIBUTE_get0_data 2198 +X509at_delete_attr 2199 +X509at_get_attr_by_OBJ 2200 +RAND_add 2201 +BIO_number_written 2202 +BIO_number_read 2203 +X509_STORE_CTX_get1_chain 2204 +ERR_load_RAND_strings 2205 +RAND_pseudo_bytes 2206 +X509_REQ_get_attr_by_NID 2207 +X509_REQ_get_attr 2208 +X509_REQ_add1_attr_by_NID 2209 +X509_REQ_get_attr_by_OBJ 2210 +X509at_add1_attr_by_NID 2211 +X509_REQ_add1_attr_by_OBJ 2212 +X509_REQ_get_attr_count 2213 +X509_REQ_add1_attr 2214 +X509_REQ_delete_attr 2215 +X509at_add1_attr_by_OBJ 2216 +X509_REQ_add1_attr_by_txt 2217 +X509_ATTRIBUTE_create_by_txt 2218 +X509at_add1_attr_by_txt 2219 +sk_CRYPTO_EX_DATA_FUNCS_delete 2220 +sk_CRYPTO_EX_DATA_FUNCS_set 2221 +sk_CRYPTO_EX_DATA_FUNCS_unshift 2222 +sk_CRYPTO_EX_DATA_FUNCS_new_null 2223 +sk_CRYPTO_EX_DATA_FUNCS_set_cmp_func 2224 +sk_CRYPTO_EX_DATA_FUNCS_sort 2225 +sk_CRYPTO_EX_DATA_FUNCS_dup 2226 +sk_CRYPTO_EX_DATA_FUNCS_shift 2227 +sk_CRYPTO_EX_DATA_FUNCS_value 2228 +sk_CRYPTO_EX_DATA_FUNCS_pop 2229 +sk_CRYPTO_EX_DATA_FUNCS_push 2230 +sk_CRYPTO_EX_DATA_FUNCS_find 2231 +sk_CRYPTO_EX_DATA_FUNCS_new 2232 +sk_CRYPTO_EX_DATA_FUNCS_free 2233 +sk_CRYPTO_EX_DATA_FUNCS_delete_ptr 2234 +sk_CRYPTO_EX_DATA_FUNCS_num 2235 +sk_CRYPTO_EX_DATA_FUNCS_pop_free 2236 +sk_CRYPTO_EX_DATA_FUNCS_insert 2237 +sk_CRYPTO_EX_DATA_FUNCS_zero 2238 +BN_pseudo_rand 2239 +BN_is_prime_fasttest 2240 +BN_CTX_end 2241 +BN_CTX_start 2242 +BN_CTX_get 2243 +EVP_PKEY2PKCS8_broken 2244 +ASN1_STRING_TABLE_add 2245 +CRYPTO_dbg_get_options 2246 +AUTHORITY_INFO_ACCESS_new 2247 +CRYPTO_get_mem_debug_options 2248 +des_crypt 2249 +PEM_write_bio_X509_REQ_NEW 2250 +PEM_write_X509_REQ_NEW 2251 +BIO_callback_ctrl 2252 +RAND_egd 2253 +RAND_status 2254 +bn_dump1 2255 +des_check_key_parity 2256 +lh_num_items 2257 +RAND_event 2258 diff --git a/crypto/openssl/util/mk1mf.pl b/crypto/openssl/util/mk1mf.pl index 6fbf3ce..100d76f 100755 --- a/crypto/openssl/util/mk1mf.pl +++ b/crypto/openssl/util/mk1mf.pl @@ -8,6 +8,7 @@ $INSTALLTOP="/usr/local/ssl"; $OPTIONS=""; $ssl_version=""; +$banner="\t\@echo Building OpenSSL"; open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; while(<IN>) { @@ -59,6 +60,7 @@ and [options] can be one of just-ssl - remove all non-ssl keys/digest no-asm - No x86 asm nasm - Use NASM for x86 asm + gaswin - Use GNU as with Mingw32 no-socks - No socket code no-err - No error strings dll/shlib - Build shared libraries (MS) @@ -850,6 +852,7 @@ sub read_options elsif (/^no-hmac$/) { $no_hmac=1; } elsif (/^no-asm$/) { $no_asm=1; } elsif (/^nasm$/) { $nasm=1; } + elsif (/^gaswin$/) { $gaswin=1; } elsif (/^no-ssl2$/) { $no_ssl2=1; } elsif (/^no-ssl3$/) { $no_ssl3=1; } elsif (/^no-err$/) { $no_err=1; } diff --git a/crypto/openssl/util/mkdef.pl b/crypto/openssl/util/mkdef.pl index 80384af..4e2845a 100755 --- a/crypto/openssl/util/mkdef.pl +++ b/crypto/openssl/util/mkdef.pl @@ -6,26 +6,34 @@ # prototyped functions: it then prunes the output. # -$crypto_num="util/libeay.num"; -$ssl_num= "util/ssleay.num"; +my $crypto_num="util/libeay.num"; +my $ssl_num= "util/ssleay.num"; my $do_update = 0; my $do_crypto = 0; my $do_ssl = 0; -$rsaref = 0; +my $do_ctest = 0; +my $rsaref = 0; -$W32=1; -$NT=0; +my $W32=1; +my $NT=0; # Set this to make typesafe STACK definitions appear in DEF -$safe_stack_def = 1; +my $safe_stack_def = 1; -$options=""; +my $options=""; open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; while(<IN>) { $options=$1 if (/^OPTIONS=(.*)$/); } close(IN); +# The following ciphers may be excluded (by Configure). This means functions +# defined with ifndef(NO_XXX) are not included in the .def file, and everything +# in directory xxx is ignored. +my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; +my $no_cast; my $no_md2; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; +my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; + foreach (@ARGV, split(/ /, $options)) { $W32=1 if $_ eq "32"; @@ -39,6 +47,7 @@ foreach (@ARGV, split(/ /, $options)) $do_crypto=1 if $_ eq "libeay"; $do_crypto=1 if $_ eq "crypto"; $do_update=1 if $_ eq "update"; + $do_ctest=1 if $_ eq "ctest"; $rsaref=1 if $_ eq "rsaref"; if (/^no-rc2$/) { $no_rc2=1; } @@ -59,6 +68,7 @@ foreach (@ARGV, split(/ /, $options)) elsif (/^no-hmac$/) { $no_hmac=1; } } + if (!$do_ssl && !$do_crypto) { print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 | NT ] [rsaref]\n"; @@ -70,9 +80,9 @@ $max_ssl = $max_num; %crypto_list=&load_numbers($crypto_num); $max_crypto = $max_num; -$ssl="ssl/ssl.h"; +my $ssl="ssl/ssl.h"; -$crypto ="crypto/crypto.h"; +my $crypto ="crypto/crypto.h"; $crypto.=" crypto/des/des.h" unless $no_des; $crypto.=" crypto/idea/idea.h" unless $no_idea; $crypto.=" crypto/rc4/rc4.h" unless $no_rc4; @@ -115,8 +125,8 @@ $crypto.=" crypto/rand/rand.h"; $crypto.=" crypto/comp/comp.h"; $crypto.=" crypto/tmdiff.h"; -@ssl_func = &do_defs("SSLEAY", $ssl); -@crypto_func = &do_defs("LIBEAY", $crypto); +my @ssl_func = &do_defs("SSLEAY", $ssl); +my @crypto_func = &do_defs("LIBEAY", $crypto); if ($do_update) { @@ -131,7 +141,26 @@ if($do_crypto == 1) { open(OUT, ">>$crypto_num"); &update_numbers(*OUT,"LIBEAY",*crypto_list,$max_crypto, @crypto_func); close OUT; -} +} + +} elsif ($do_ctest) { + + print <<"EOF"; + +/* Test file to check all DEF file symbols are present by trying + * to link to all of them. This is *not* intended to be run! + */ + +int main() +{ +EOF + &print_test_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_func) + if $do_ssl == 1; + + &print_test_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_func) + if $do_crypto == 1; + + print "}\n"; } else { @@ -147,14 +176,15 @@ if($do_crypto == 1) { sub do_defs { my($name,$files)=@_; + my $file; my @ret; my %funcs; + my $cpp; foreach $file (split(/\s+/,$files)) { open(IN,"<$file") || die "unable to open $file:$!\n"; - - my $line = "", $def= ""; + my $line = "", my $def= ""; my %tag = ( FreeBSD => 0, NOPROTO => 0, @@ -164,6 +194,22 @@ sub do_defs NO_FP_API => 0, CONST_STRICT => 0, TRUE => 1, + NO_RC2 => 0, + NO_RC4 => 0, + NO_RC5 => 0, + NO_IDEA => 0, + NO_DES => 0, + NO_BF => 0, + NO_CAST => 0, + NO_MD2 => 0, + NO_MD5 => 0, + NO_SHA => 0, + NO_RIPEMD => 0, + NO_MDC2 => 0, + NO_RSA => 0, + NO_DSA => 0, + NO_DH => 0, + NO_HMAC => 0, ); while(<IN>) { last if (/BEGIN ERROR CODES/); @@ -214,6 +260,11 @@ sub do_defs push(@tag,"TRUE"); $tag{"TRUE"}=1; next; + } elsif (/^\#\s*if\s+0/) { + # Dummy tag + push(@tag,"TRUE"); + $tag{"TRUE"}=-1; + next; } elsif (/^\#/) { next; } @@ -250,7 +301,20 @@ sub do_defs } $funcs{"PEM_read_bio_${1}"} = 1; $funcs{"PEM_write_bio_${1}"} = 1; - } elsif ( + } elsif (/^DECLARE_PEM_write\s*\(\s*(\w*)\s*,/ || + /^DECLARE_PEM_write_cb\s*\(\s*(\w*)\s*,/ ) { + if($W32) { + $funcs{"PEM_write_${1}"} = 1; + } + $funcs{"PEM_write_bio_${1}"} = 1; + } elsif (/^DECLARE_PEM_read\s*\(\s*(\w*)\s*,/ || + /^DECLARE_PEM_read_cb\s*\(\s*(\w*)\s*,/ ) { + if($W32) { + $funcs{"PEM_read_${1}"} = 1; + } + $funcs{"PEM_read_bio_${1}"} = 1; + } elsif ( + ($tag{'TRUE'} != -1) && ($tag{'FreeBSD'} != 1) && ($tag{'CONST_STRICT'} != 1) && (($W32 && ($tag{'WIN16'} != 1)) || @@ -260,7 +324,23 @@ sub do_defs ((!$W32 && $tag{'_WINDLL'} != -1) || ($W32 && $tag{'_WINDLL'} != 1)) && ((($tag{'NO_FP_API'} != 1) && $W32) || - (($tag{'NO_FP_API'} != -1) && !$W32))) + (($tag{'NO_FP_API'} != -1) && !$W32)) && + ($tag{'NO_RC2'} == 0 || !$no_rc2) && + ($tag{'NO_RC4'} == 0 || !$no_rc4) && + ($tag{'NO_RC5'} == 0 || !$no_rc5) && + ($tag{'NO_IDEA'} == 0 || !$no_idea) && + ($tag{'NO_DES'} == 0 || !$no_des) && + ($tag{'NO_BF'} == 0 || !$no_bf) && + ($tag{'NO_CAST'} == 0 || !$no_cast) && + ($tag{'NO_MD2'} == 0 || !$no_md2) && + ($tag{'NO_MD5'} == 0 || !$no_md5) && + ($tag{'NO_SHA'} == 0 || !$no_sha) && + ($tag{'NO_RIPEMD'} == 0 || !$no_ripemd) && + ($tag{'NO_MDC2'} == 0 || !$no_mdc2) && + ($tag{'NO_RSA'} == 0 || !$no_rsa) && + ($tag{'NO_DSA'} == 0 || !$no_dsa) && + ($tag{'NO_DH'} == 0 || !$no_dh) && + ($tag{'NO_HMAC'} == 0 || !$no_hmac)) { if (/{|\/\*/) { # } $line = $_; @@ -309,8 +389,8 @@ sub do_defs # Prune the returned functions delete $funcs{"SSL_add_dir_cert_subjects_to_stack"}; - delete $funcs{"des_crypt"}; delete $funcs{"RSA_PKCS1_RSAref"} unless $rsaref; + delete $funcs{"bn_dump1"}; if($W32) { delete $funcs{"BIO_s_file_internal"}; @@ -334,10 +414,31 @@ sub do_defs return(@ret); } +sub print_test_file +{ + (*OUT,my $name,*nums,my @functions)=@_; + my $n = 1; my @e; my @r; + my $func; + + (@e)=grep(/^SSLeay/,@functions); + (@r)=grep(!/^SSLeay/,@functions); + @functions=((sort @e),(sort @r)); + + foreach $func (@functions) { + if (!defined($nums{$func})) { + printf STDERR "$func does not have a number assigned\n" + if(!$do_update); + } else { + $n=$nums{$func}; + print OUT "\t$func();\n"; + } + } +} + sub print_def_file { - (*OUT,my $name,*nums,@functions)=@_; - my $n =1; + (*OUT,my $name,*nums,my @functions)=@_; + my $n = 1; my @e; my @r; if ($W32) { $name.="32"; } diff --git a/crypto/openssl/util/mkerr.pl b/crypto/openssl/util/mkerr.pl index 4b3bccb..8e18f3c 100644 --- a/crypto/openssl/util/mkerr.pl +++ b/crypto/openssl/util/mkerr.pl @@ -284,6 +284,17 @@ EOF # Rewrite the C source file containing the error details. + # First, read any existing reason string definitions: + my %err_reason_strings; + if (open(IN,"<$cfile")) { + while (<IN>) { + if (/\b(${lib}_R_\w*)\b.*\"(.*)\"/) { + $err_reason_strings{$1} = $2; + } + } + close(IN); + } + my $hincf; if($static) { $hfile =~ /([^\/]+)$/; @@ -352,7 +363,8 @@ EOF */ /* NOTE: this file was auto generated by the mkerr.pl script: any changes - * made to it will be overwritten when the script next updates this file. + * made to it will be overwritten when the script next updates this file, + * only reason strings will be preserved. */ #include <stdio.h> @@ -385,9 +397,13 @@ EOF foreach $i (@reasons) { my $rn; my $nspc = 0; - $i =~ /^${lib}_R_(\S+)$/; - $rn = $1; - $rn =~ tr/_[A-Z]/ [a-z]/; + if (exists $err_reason_strings{$i}) { + $rn = $err_reason_strings{$i}; + } else { + $i =~ /^${lib}_R_(\S+)$/; + $rn = $1; + $rn =~ tr/_[A-Z]/ [a-z]/; + } $nspc = 40 - length($i) unless length($i) > 40; $nspc = " " x $nspc; print OUT "{${i}${nspc},\"$rn\"},\n"; @@ -450,7 +466,7 @@ void ERR_load_${lib}_strings(void) #ifdef ${lib}_LIB_NAME ${lib}_lib_name->error = ERR_PACK(${lib}_lib_error_code,0,0); ERR_load_strings(0,${lib}_lib_name); -#endif; +#endif } } @@ -465,7 +481,7 @@ EOF } close OUT; - + undef %err_reason_strings; } if($debug && defined(%notrans)) { diff --git a/crypto/openssl/util/pl/BC-32.pl b/crypto/openssl/util/pl/BC-32.pl index 09c45a2..7f57809 100644 --- a/crypto/openssl/util/pl/BC-32.pl +++ b/crypto/openssl/util/pl/BC-32.pl @@ -19,7 +19,7 @@ $out_def="out32"; $tmp_def="tmp32"; $inc_def="inc32"; #enable max error messages, disable most common warnings -$cflags="-DWIN32_LEAN_AND_MEAN -j255 -w-aus -w-par -w-inl -c -tWC -tWM -DWINDOWS -DWIN32 -DL_ENDIAN "; +$cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DWINDOWS -DWIN32 -DL_ENDIAN "; if ($debug) { $cflags.="-Od -y -v -vi- -D_DEBUG"; @@ -109,7 +109,7 @@ sub do_lib_rule { # $ret.="\t\$(RM) \$(O_$Name)\n"; $ret.="\techo LIB $<\n"; - $ret.="\t\$(MKLIB) $lfile$target \$(addprefix +, $objs)\n"; + $ret.="\t&\$(MKLIB) $lfile$target -+\$**\n"; } else { diff --git a/crypto/openssl/util/pl/VC-32.pl b/crypto/openssl/util/pl/VC-32.pl index 6db1c9f..046f0e2 100644 --- a/crypto/openssl/util/pl/VC-32.pl +++ b/crypto/openssl/util/pl/VC-32.pl @@ -22,7 +22,7 @@ $inc_def="inc32"; if ($debug) { - $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWINDOWS -DWIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG"; + $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG"; $lflags.=" /debug"; $mlflags.=' /debug'; } diff --git a/crypto/openssl/util/pod2man.pl b/crypto/openssl/util/pod2man.pl new file mode 100755 index 0000000..f5ec076 --- /dev/null +++ b/crypto/openssl/util/pod2man.pl @@ -0,0 +1,1181 @@ +: #!/usr/bin/perl-5.005 + eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +$DEF_PM_SECTION = '3pm' || '3'; + +=head1 NAME + +pod2man - translate embedded Perl pod directives into man pages + +=head1 SYNOPSIS + +B<pod2man> +[ B<--section=>I<manext> ] +[ B<--release=>I<relpatch> ] +[ B<--center=>I<string> ] +[ B<--date=>I<string> ] +[ B<--fixed=>I<font> ] +[ B<--official> ] +[ B<--lax> ] +I<inputfile> + +=head1 DESCRIPTION + +B<pod2man> converts its input file containing embedded pod directives (see +L<perlpod>) into nroff source suitable for viewing with nroff(1) or +troff(1) using the man(7) macro set. + +Besides the obvious pod conversions, B<pod2man> also takes care of +func(), func(n), and simple variable references like $foo or @bar so +you don't have to use code escapes for them; complex expressions like +C<$fred{'stuff'}> will still need to be escaped, though. Other nagging +little roffish things that it catches include translating the minus in +something like foo-bar, making a long dash--like this--into a real em +dash, fixing up "paired quotes", putting a little space after the +parens in something like func(), making C++ and PI look right, making +double underbars have a little tiny space between them, making ALLCAPS +a teeny bit smaller in troff(1), and escaping backslashes so you don't +have to. + +=head1 OPTIONS + +=over 8 + +=item center + +Set the centered header to a specific string. The default is +"User Contributed Perl Documentation", unless the C<--official> flag is +given, in which case the default is "Perl Programmers Reference Guide". + +=item date + +Set the left-hand footer string to this value. By default, +the modification date of the input file will be used. + +=item fixed + +The fixed font to use for code refs. Defaults to CW. + +=item official + +Set the default header to indicate that this page is of +the standard release in case C<--center> is not given. + +=item release + +Set the centered footer. By default, this is the current +perl release. + +=item section + +Set the section for the C<.TH> macro. The standard conventions on +sections are to use 1 for user commands, 2 for system calls, 3 for +functions, 4 for devices, 5 for file formats, 6 for games, 7 for +miscellaneous information, and 8 for administrator commands. This works +best if you put your Perl man pages in a separate tree, like +F</usr/local/perl/man/>. By default, section 1 will be used +unless the file ends in F<.pm> in which case section 3 will be selected. + +=item lax + +Don't complain when required sections aren't present. + +=back + +=head1 Anatomy of a Proper Man Page + +For those not sure of the proper layout of a man page, here's +an example of the skeleton of a proper man page. Head of the +major headers should be setout as a C<=head1> directive, and +are historically written in the rather startling ALL UPPER CASE +format, although this is not mandatory. +Minor headers may be included using C<=head2>, and are +typically in mixed case. + +=over 10 + +=item NAME + +Mandatory section; should be a comma-separated list of programs or +functions documented by this podpage, such as: + + foo, bar - programs to do something + +=item SYNOPSIS + +A short usage summary for programs and functions, which +may someday be deemed mandatory. + +=item DESCRIPTION + +Long drawn out discussion of the program. It's a good idea to break this +up into subsections using the C<=head2> directives, like + + =head2 A Sample Subection + + =head2 Yet Another Sample Subection + +=item OPTIONS + +Some people make this separate from the description. + +=item RETURN VALUE + +What the program or function returns if successful. + +=item ERRORS + +Exceptions, return codes, exit stati, and errno settings. + +=item EXAMPLES + +Give some example uses of the program. + +=item ENVIRONMENT + +Envariables this program might care about. + +=item FILES + +All files used by the program. You should probably use the FE<lt>E<gt> +for these. + +=item SEE ALSO + +Other man pages to check out, like man(1), man(7), makewhatis(8), or catman(8). + +=item NOTES + +Miscellaneous commentary. + +=item CAVEATS + +Things to take special care with; sometimes called WARNINGS. + +=item DIAGNOSTICS + +All possible messages the program can print out--and +what they mean. + +=item BUGS + +Things that are broken or just don't work quite right. + +=item RESTRICTIONS + +Bugs you don't plan to fix :-) + +=item AUTHOR + +Who wrote it (or AUTHORS if multiple). + +=item HISTORY + +Programs derived from other sources sometimes have this, or +you might keep a modification log here. + +=back + +=head1 EXAMPLES + + pod2man program > program.1 + pod2man some_module.pm > /usr/perl/man/man3/some_module.3 + pod2man --section=7 note.pod > note.7 + +=head1 DIAGNOSTICS + +The following diagnostics are generated by B<pod2man>. Items +marked "(W)" are non-fatal, whereas the "(F)" errors will cause +B<pod2man> to immediately exit with a non-zero status. + +=over 4 + +=item bad option in paragraph %d of %s: ``%s'' should be [%s]<%s> + +(W) If you start include an option, you should set it off +as bold, italic, or code. + +=item can't open %s: %s + +(F) The input file wasn't available for the given reason. + +=item Improper man page - no dash in NAME header in paragraph %d of %s + +(W) The NAME header did not have an isolated dash in it. This is +considered important. + +=item Invalid man page - no NAME line in %s + +(F) You did not include a NAME header, which is essential. + +=item roff font should be 1 or 2 chars, not `%s' (F) + +(F) The font specified with the C<--fixed> option was not +a one- or two-digit roff font. + +=item %s is missing required section: %s + +(W) Required sections include NAME, DESCRIPTION, and if you're +using a section starting with a 3, also a SYNOPSIS. Actually, +not having a NAME is a fatal. + +=item Unknown escape: %s in %s + +(W) An unknown HTML entity (probably for an 8-bit character) was given via +a C<EE<lt>E<gt>> directive. Besides amp, lt, gt, and quot, recognized +entities are Aacute, aacute, Acirc, acirc, AElig, aelig, Agrave, agrave, +Aring, aring, Atilde, atilde, Auml, auml, Ccedil, ccedil, Eacute, eacute, +Ecirc, ecirc, Egrave, egrave, ETH, eth, Euml, euml, Iacute, iacute, Icirc, +icirc, Igrave, igrave, Iuml, iuml, Ntilde, ntilde, Oacute, oacute, Ocirc, +ocirc, Ograve, ograve, Oslash, oslash, Otilde, otilde, Ouml, ouml, szlig, +THORN, thorn, Uacute, uacute, Ucirc, ucirc, Ugrave, ugrave, Uuml, uuml, +Yacute, yacute, and yuml. + +=item Unmatched =back + +(W) You have a C<=back> without a corresponding C<=over>. + +=item Unrecognized pod directive: %s + +(W) You specified a pod directive that isn't in the known list of +C<=head1>, C<=head2>, C<=item>, C<=over>, C<=back>, or C<=cut>. + + +=back + +=head1 NOTES + +If you would like to print out a lot of man page continuously, you +probably want to set the C and D registers to set contiguous page +numbering and even/odd paging, at least on some versions of man(7). +Settting the F register will get you some additional experimental +indexing: + + troff -man -rC1 -rD1 -rF1 perl.1 perldata.1 perlsyn.1 ... + +The indexing merely outputs messages via C<.tm> for each +major page, section, subsection, item, and any C<XE<lt>E<gt>> +directives. + + +=head1 RESTRICTIONS + +None at this time. + +=head1 BUGS + +The =over and =back directives don't really work right. They +take absolute positions instead of offsets, don't nest well, and +making people count is suboptimal in any event. + +=head1 AUTHORS + +Original prototype by Larry Wall, but so massively hacked over by +Tom Christiansen such that Larry probably doesn't recognize it anymore. + +=cut + +$/ = ""; +$cutting = 1; +@Indices = (); + +# We try first to get the version number from a local binary, in case we're +# running an installed version of Perl to produce documentation from an +# uninstalled newer version's pod files. +if ($^O ne 'plan9' and $^O ne 'dos' and $^O ne 'os2' and $^O ne 'MSWin32') { + my $perl = (-x './perl' && -f './perl' ) ? + './perl' : + ((-x '../perl' && -f '../perl') ? + '../perl' : + ''); + ($version,$patch) = `$perl -e 'print $]'` =~ /^(\d\.\d{3})(\d{2})?/ if $perl; +} +# No luck; we'll just go with the running Perl's version +($version,$patch) = $] =~ /^(.{5})(\d{2})?/ unless $version; +$DEF_RELEASE = "perl $version"; +$DEF_RELEASE .= ", patch $patch" if $patch; + + +sub makedate { + my $secs = shift; + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secs); + my $mname = (qw{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec})[$mon]; + $year += 1900; + return "$mday/$mname/$year"; +} + +use Getopt::Long; + +$DEF_SECTION = 1; +$DEF_CENTER = "User Contributed Perl Documentation"; +$STD_CENTER = "Perl Programmers Reference Guide"; +$DEF_FIXED = 'CW'; +$DEF_LAX = 0; + +sub usage { + warn "$0: @_\n" if @_; + die <<EOF; +usage: $0 [options] podpage +Options are: + --section=manext (default "$DEF_SECTION") + --release=relpatch (default "$DEF_RELEASE") + --center=string (default "$DEF_CENTER") + --date=string (default "$DEF_DATE") + --fixed=font (default "$DEF_FIXED") + --official (default NOT) + --lax (default NOT) +EOF +} + +$uok = GetOptions( qw( + section=s + release=s + center=s + date=s + fixed=s + official + lax + help)); + +$DEF_DATE = makedate((stat($ARGV[0]))[9] || time()); + +usage("Usage error!") unless $uok; +usage() if $opt_help; +usage("Need one and only one podpage argument") unless @ARGV == 1; + +$section = $opt_section || ($ARGV[0] =~ /\.pm$/ + ? $DEF_PM_SECTION : $DEF_SECTION); +$RP = $opt_release || $DEF_RELEASE; +$center = $opt_center || ($opt_official ? $STD_CENTER : $DEF_CENTER); +$lax = $opt_lax || $DEF_LAX; + +$CFont = $opt_fixed || $DEF_FIXED; + +if (length($CFont) == 2) { + $CFont_embed = "\\f($CFont"; +} +elsif (length($CFont) == 1) { + $CFont_embed = "\\f$CFont"; +} +else { + die "roff font should be 1 or 2 chars, not `$CFont_embed'"; +} + +$date = $opt_date || $DEF_DATE; + +for (qw{NAME DESCRIPTION}) { +# for (qw{NAME DESCRIPTION AUTHOR}) { + $wanna_see{$_}++; +} +$wanna_see{SYNOPSIS}++ if $section =~ /^3/; + + +$name = @ARGV ? $ARGV[0] : "<STDIN>"; +$Filename = $name; +if ($section =~ /^1/) { + require File::Basename; + $name = uc File::Basename::basename($name); +} +$name =~ s/\.(pod|p[lm])$//i; + +# Lose everything up to the first of +# */lib/*perl* standard or site_perl module +# */*perl*/lib from -D prefix=/opt/perl +# */*perl*/ random module hierarchy +# which works. +$name =~ s-//+-/-g; +if ($name =~ s-^.*?/lib/[^/]*perl[^/]*/--i + or $name =~ s-^.*?/[^/]*perl[^/]*/lib/--i + or $name =~ s-^.*?/[^/]*perl[^/]*/--i) { + # Lose ^site(_perl)?/. + $name =~ s-^site(_perl)?/--; + # Lose ^arch/. (XXX should we use Config? Just for archname?) + $name =~ s~^(.*-$^O|$^O-.*)/~~o; + # Lose ^version/. + $name =~ s-^\d+\.\d+/--; +} + +# Translate Getopt/Long to Getopt::Long, etc. +$name =~ s(/)(::)g; + +if ($name ne 'something') { + FCHECK: { + open(F, "< $ARGV[0]") || die "can't open $ARGV[0]: $!"; + while (<F>) { + next unless /^=\b/; + if (/^=head1\s+NAME\s*$/) { # an /m would forgive mistakes + $_ = <F>; + unless (/\s*-+\s+/) { + $oops++; + warn "$0: Improper man page - no dash in NAME header in paragraph $. of $ARGV[0]\n" + } else { + my @n = split /\s+-+\s+/; + if (@n != 2) { + $oops++; + warn "$0: Improper man page - malformed NAME header in paragraph $. of $ARGV[0]\n" + } + else { + %namedesc = @n; + } + } + last FCHECK; + } + next if /^=cut\b/; # DB_File and Net::Ping have =cut before NAME + next if /^=pod\b/; # It is OK to have =pod before NAME + die "$0: Invalid man page - 1st pod line is not NAME in $ARGV[0]\n" unless $lax; + } + die "$0: Invalid man page - no documentation in $ARGV[0]\n" unless $lax; + } + close F; +} + +print <<"END"; +.rn '' }` +''' \$RCSfile\$\$Revision\$\$Date\$ +''' +''' \$Log\$ +''' +.de Sh +.br +.if t .Sp +.ne 5 +.PP +\\fB\\\\\$1\\fR +.PP +.. +.de Sp +.if t .sp .5v +.if n .sp +.. +.de Ip +.br +.ie \\\\n(.\$>=3 .ne \\\\\$3 +.el .ne 3 +.IP "\\\\\$1" \\\\\$2 +.. +.de Vb +.ft $CFont +.nf +.ne \\\\\$1 +.. +.de Ve +.ft R + +.fi +.. +''' +''' +''' Set up \\*(-- to give an unbreakable dash; +''' string Tr holds user defined translation string. +''' Bell System Logo is used as a dummy character. +''' +.tr \\(*W-|\\(bv\\*(Tr +.ie n \\{\\ +.ds -- \\(*W- +.ds PI pi +.if (\\n(.H=4u)&(1m=24u) .ds -- \\(*W\\h'-12u'\\(*W\\h'-12u'-\\" diablo 10 pitch +.if (\\n(.H=4u)&(1m=20u) .ds -- \\(*W\\h'-12u'\\(*W\\h'-8u'-\\" diablo 12 pitch +.ds L" "" +.ds R" "" +''' \\*(M", \\*(S", \\*(N" and \\*(T" are the equivalent of +''' \\*(L" and \\*(R", except that they are used on ".xx" lines, +''' such as .IP and .SH, which do another additional levels of +''' double-quote interpretation +.ds M" """ +.ds S" """ +.ds N" """"" +.ds T" """"" +.ds L' ' +.ds R' ' +.ds M' ' +.ds S' ' +.ds N' ' +.ds T' ' +'br\\} +.el\\{\\ +.ds -- \\(em\\| +.tr \\*(Tr +.ds L" `` +.ds R" '' +.ds M" `` +.ds S" '' +.ds N" `` +.ds T" '' +.ds L' ` +.ds R' ' +.ds M' ` +.ds S' ' +.ds N' ` +.ds T' ' +.ds PI \\(*p +'br\\} +END + +print <<'END'; +.\" If the F register is turned on, we'll generate +.\" index entries out stderr for the following things: +.\" TH Title +.\" SH Header +.\" Sh Subsection +.\" Ip Item +.\" X<> Xref (embedded +.\" Of course, you have to process the output yourself +.\" in some meaninful fashion. +.if \nF \{ +.de IX +.tm Index:\\$1\t\\n%\t"\\$2" +.. +.nr % 0 +.rr F +.\} +END + +print <<"END"; +.TH $name $section "$RP" "$date" "$center" +.UC +END + +push(@Indices, qq{.IX Title "$name $section"}); + +while (($name, $desc) = each %namedesc) { + for ($name, $desc) { s/^\s+//; s/\s+$//; } + push(@Indices, qq(.IX Name "$name - $desc"\n)); +} + +print <<'END'; +.if n .hy 0 +.if n .na +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.de CQ \" put $1 in typewriter font +END +print ".ft $CFont\n"; +print <<'END'; +'if n "\c +'if t \\&\\$1\c +'if n \\&\\$1\c +'if n \&" +\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7 +'.ft R +.. +.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2 +. \" AM - accent mark definitions +.bd B 3 +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds ? ? +. ds ! ! +. ds / +. ds q +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10' +. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#] +.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u' +.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u' +.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#] +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +.ds oe o\h'-(\w'o'u*4/10)'e +.ds Oe O\h'-(\w'O'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds v \h'-1'\o'\(aa\(ga' +. ds _ \h'-1'^ +. ds . \h'-1'. +. ds 3 3 +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +. ds oe oe +. ds Oe OE +.\} +.rm #[ #] #H #V #F C +END + +$indent = 0; + +$begun = ""; + +# Unrolling [^A-Z>]|[A-Z](?!<) gives: // MRE pp 165. +my $nonest = '(?:[^A-Z>]*(?:[A-Z](?!<)[^A-Z>]*)*)'; + +while (<>) { + if ($cutting) { + next unless /^=/; + $cutting = 0; + } + if ($begun) { + if (/^=end\s+$begun/) { + $begun = ""; + } + elsif ($begun =~ /^(roff|man)$/) { + print STDOUT $_; + } + next; + } + chomp; + + # Translate verbatim paragraph + + if (/^\s/) { + @lines = split(/\n/); + for (@lines) { + 1 while s + {^( [^\t]* ) \t ( \t* ) } + { $1 . ' ' x (8 - (length($1)%8) + 8 * (length($2))) }ex; + s/\\/\\e/g; + s/\A/\\&/s; + } + $lines = @lines; + makespace() unless $verbatim++; + print ".Vb $lines\n"; + print join("\n", @lines), "\n"; + print ".Ve\n"; + $needspace = 0; + next; + } + + $verbatim = 0; + + if (/^=for\s+(\S+)\s*/s) { + if ($1 eq "man" or $1 eq "roff") { + print STDOUT $',"\n\n"; + } else { + # ignore unknown for + } + next; + } + elsif (/^=begin\s+(\S+)\s*/s) { + $begun = $1; + if ($1 eq "man" or $1 eq "roff") { + print STDOUT $'."\n\n"; + } + next; + } + + # check for things that'll hosed our noremap scheme; affects $_ + init_noremap(); + + if (!/^=item/) { + + # trofficate backslashes; must do it before what happens below + s/\\/noremap('\\e')/ge; + + # protect leading periods and quotes against *roff + # mistaking them for directives + s/^(?:[A-Z]<)?[.']/\\&$&/gm; + + # first hide the escapes in case we need to + # intuit something and get it wrong due to fmting + + 1 while s/([A-Z]<$nonest>)/noremap($1)/ge; + + # func() is a reference to a perl function + s{ + \b + ( + [:\w]+ \(\) + ) + } {I<$1>}gx; + + # func(n) is a reference to a perl function or a man page + s{ + ([:\w]+) + ( + \( [^\051]+ \) + ) + } {I<$1>\\|$2}gx; + + # convert simple variable references + s/(\s+)([\$\@%][\w:]+)(?!\()/${1}C<$2>/g; + + if (m{ ( + [\-\w]+ + \( + [^\051]*? + [\@\$,] + [^\051]*? + \) + ) + }x && $` !~ /([LCI]<[^<>]*|-)$/ && !/^=\w/) + { + warn "$0: bad option in paragraph $. of $ARGV: ``$1'' should be [LCI]<$1>\n"; + $oops++; + } + + while (/(-[a-zA-Z])\b/g && $` !~ /[\w\-]$/) { + warn "$0: bad option in paragraph $. of $ARGV: ``$1'' should be [CB]<$1>\n"; + $oops++; + } + + # put it back so we get the <> processed again; + clear_noremap(0); # 0 means leave the E's + + } else { + # trofficate backslashes + s/\\/noremap('\\e')/ge; + + } + + # need to hide E<> first; they're processed in clear_noremap + s/(E<[^<>]+>)/noremap($1)/ge; + + + $maxnest = 10; + while ($maxnest-- && /[A-Z]</) { + + # can't do C font here + s/([BI])<($nonest)>/font($1) . $2 . font('R')/eg; + + # files and filelike refs in italics + s/F<($nonest)>/I<$1>/g; + + # no break -- usually we want C<> for this + s/S<($nonest)>/nobreak($1)/eg; + + # LREF: a la HREF L<show this text|man/section> + s:L<([^|>]+)\|[^>]+>:$1:g; + + # LREF: a manpage(3f) + s:L<([a-zA-Z][^\s\/]+)(\([^\)]+\))?>:the I<$1>$2 manpage:g; + + # LREF: an =item on another manpage + s{ + L< + ([^/]+) + / + ( + [:\w]+ + (\(\))? + ) + > + } {the C<$2> entry in the I<$1> manpage}gx; + + # LREF: an =item on this manpage + s{ + ((?: + L< + / + ( + [:\w]+ + (\(\))? + ) + > + (,?\s+(and\s+)?)? + )+) + } { internal_lrefs($1) }gex; + + # LREF: a =head2 (head1?), maybe on a manpage, maybe right here + # the "func" can disambiguate + s{ + L< + (?: + ([a-zA-Z]\S+?) / + )? + "?(.*?)"? + > + }{ + do { + $1 # if no $1, assume it means on this page. + ? "the section on I<$2> in the I<$1> manpage" + : "the section on I<$2>" + } + }gesx; # s in case it goes over multiple lines, so . matches \n + + s/Z<>/\\&/g; + + # comes last because not subject to reprocessing + s/C<($nonest)>/noremap("${CFont_embed}${1}\\fR")/eg; + } + + if (s/^=//) { + $needspace = 0; # Assume this. + + s/\n/ /g; + + ($Cmd, $_) = split(' ', $_, 2); + + $dotlevel = 1; + if ($Cmd eq 'head1') { + $dotlevel = 1; + } + elsif ($Cmd eq 'head2') { + $dotlevel = 1; + } + elsif ($Cmd eq 'item') { + $dotlevel = 2; + } + + if (defined $_) { + &escapes($dotlevel); + s/"/""/g; + } + + clear_noremap(1); + + if ($Cmd eq 'cut') { + $cutting = 1; + } + elsif ($Cmd eq 'head1') { + s/\s+$//; + delete $wanna_see{$_} if exists $wanna_see{$_}; + print qq{.SH "$_"\n}; + push(@Indices, qq{.IX Header "$_"\n}); + } + elsif ($Cmd eq 'head2') { + print qq{.Sh "$_"\n}; + push(@Indices, qq{.IX Subsection "$_"\n}); + } + elsif ($Cmd eq 'over') { + push(@indent,$indent); + $indent += ($_ + 0) || 5; + } + elsif ($Cmd eq 'back') { + $indent = pop(@indent); + warn "$0: Unmatched =back in paragraph $. of $ARGV\n" unless defined $indent; + $needspace = 1; + } + elsif ($Cmd eq 'item') { + s/^\*( |$)/\\(bu$1/g; + # if you know how to get ":s please do + s/\\\*\(L"([^"]+?)\\\*\(R"/'$1'/g; + s/\\\*\(L"([^"]+?)""/'$1'/g; + s/[^"]""([^"]+?)""[^"]/'$1'/g; + # here do something about the $" in perlvar? + print STDOUT qq{.Ip "$_" $indent\n}; + push(@Indices, qq{.IX Item "$_"\n}); + } + elsif ($Cmd eq 'pod') { + # this is just a comment + } + else { + warn "$0: Unrecognized pod directive in paragraph $. of $ARGV: $Cmd\n"; + } + } + else { + if ($needspace) { + &makespace; + } + &escapes(0); + clear_noremap(1); + print $_, "\n"; + $needspace = 1; + } +} + +print <<"END"; + +.rn }` '' +END + +if (%wanna_see && !$lax) { + @missing = keys %wanna_see; + warn "$0: $Filename is missing required section" + . (@missing > 1 && "s") + . ": @missing\n"; + $oops++; +} + +foreach (@Indices) { print "$_\n"; } + +exit; +#exit ($oops != 0); + +######################################################################### + +sub nobreak { + my $string = shift; + $string =~ s/ /\\ /g; + $string; +} + +sub escapes { + my $indot = shift; + + s/X<(.*?)>/mkindex($1)/ge; + + # translate the minus in foo-bar into foo\-bar for roff + s/([^0-9a-z-])-([^-])/$1\\-$2/g; + + # make -- into the string version \*(-- (defined above) + s/\b--\b/\\*(--/g; + s/"--([^"])/"\\*(--$1/g; # should be a better way + s/([^"])--"/$1\\*(--"/g; + + # fix up quotes; this is somewhat tricky + my $dotmacroL = 'L'; + my $dotmacroR = 'R'; + if ( $indot == 1 ) { + $dotmacroL = 'M'; + $dotmacroR = 'S'; + } + elsif ( $indot >= 2 ) { + $dotmacroL = 'N'; + $dotmacroR = 'T'; + } + if (!/""/) { + s/(^|\s)(['"])/noremap("$1\\*($dotmacroL$2")/ge; + s/(['"])($|[\-\s,;\\!?.])/noremap("\\*($dotmacroR$1$2")/ge; + } + + #s/(?!")(?:.)--(?!")(?:.)/\\*(--/g; + #s/(?:(?!")(?:.)--(?:"))|(?:(?:")--(?!")(?:.))/\\*(--/g; + + + # make sure that func() keeps a bit a space tween the parens + ### s/\b\(\)/\\|()/g; + ### s/\b\(\)/(\\|)/g; + + # make C++ into \*C+, which is a squinched version (defined above) + s/\bC\+\+/\\*(C+/g; + + # make double underbars have a little tiny space between them + s/__/_\\|_/g; + + # PI goes to \*(PI (defined above) + s/\bPI\b/noremap('\\*(PI')/ge; + + # make all caps a teeny bit smaller, but don't muck with embedded code literals + my $hidCFont = font('C'); + if ($Cmd !~ /^head1/) { # SH already makes smaller + # /g isn't enough; 1 while or we'll be off + +# 1 while s{ +# (?!$hidCFont)(..|^.|^) +# \b +# ( +# [A-Z][\/A-Z+:\-\d_$.]+ +# ) +# (s?) +# \b +# } {$1\\s-1$2\\s0}gmox; + + 1 while s{ + (?!$hidCFont)(..|^.|^) + ( + \b[A-Z]{2,}[\/A-Z+:\-\d_\$]*\b + ) + } { + $1 . noremap( '\\s-1' . $2 . '\\s0' ) + }egmox; + + } +} + +# make troff just be normal, but make small nroff get quoted +# decided to just put the quotes in the text; sigh; +sub ccvt { + local($_,$prev) = @_; + noremap(qq{.CQ "$_" \n\\&}); +} + +sub makespace { + if ($indent) { + print ".Sp\n"; + } + else { + print ".PP\n"; + } +} + +sub mkindex { + my ($entry) = @_; + my @entries = split m:\s*/\s*:, $entry; + push @Indices, ".IX Xref " . join ' ', map {qq("$_")} @entries; + return ''; +} + +sub font { + local($font) = shift; + return '\\f' . noremap($font); +} + +sub noremap { + local($thing_to_hide) = shift; + $thing_to_hide =~ tr/\000-\177/\200-\377/; + return $thing_to_hide; +} + +sub init_noremap { + # escape high bit characters in input stream + s/([\200-\377])/"E<".ord($1).">"/ge; +} + +sub clear_noremap { + my $ready_to_print = $_[0]; + + tr/\200-\377/\000-\177/; + + # trofficate backslashes + # s/(?!\\e)(?:..|^.|^)\\/\\e/g; + + # now for the E<>s, which have been hidden until now + # otherwise the interative \w<> processing would have + # been hosed by the E<gt> + s { + E< + ( + ( \d + ) + | ( [A-Za-z]+ ) + ) + > + } { + do { + defined $2 + ? chr($2) + : + exists $HTML_Escapes{$3} + ? do { $HTML_Escapes{$3} } + : do { + warn "$0: Unknown escape in paragraph $. of $ARGV: ``$&''\n"; + "E<$1>"; + } + } + }egx if $ready_to_print; +} + +sub internal_lrefs { + local($_) = shift; + local $trailing_and = s/and\s+$// ? "and " : ""; + + s{L</([^>]+)>}{$1}g; + my(@items) = split( /(?:,?\s+(?:and\s+)?)/ ); + my $retstr = "the "; + my $i; + for ($i = 0; $i <= $#items; $i++) { + $retstr .= "C<$items[$i]>"; + $retstr .= ", " if @items > 2 && $i != $#items; + $retstr .= " and " if $i+2 == @items; + } + + $retstr .= " entr" . ( @items > 1 ? "ies" : "y" ) + . " elsewhere in this document"; + # terminal space to avoid words running together (pattern used + # strips terminal spaces) + $retstr .= " " if length $trailing_and; + $retstr .= $trailing_and; + + return $retstr; + +} + +BEGIN { +%HTML_Escapes = ( + 'amp' => '&', # ampersand + 'lt' => '<', # left chevron, less-than + 'gt' => '>', # right chevron, greater-than + 'quot' => '"', # double quote + + "Aacute" => "A\\*'", # capital A, acute accent + "aacute" => "a\\*'", # small a, acute accent + "Acirc" => "A\\*^", # capital A, circumflex accent + "acirc" => "a\\*^", # small a, circumflex accent + "AElig" => '\*(AE', # capital AE diphthong (ligature) + "aelig" => '\*(ae', # small ae diphthong (ligature) + "Agrave" => "A\\*`", # capital A, grave accent + "agrave" => "A\\*`", # small a, grave accent + "Aring" => 'A\\*o', # capital A, ring + "aring" => 'a\\*o', # small a, ring + "Atilde" => 'A\\*~', # capital A, tilde + "atilde" => 'a\\*~', # small a, tilde + "Auml" => 'A\\*:', # capital A, dieresis or umlaut mark + "auml" => 'a\\*:', # small a, dieresis or umlaut mark + "Ccedil" => 'C\\*,', # capital C, cedilla + "ccedil" => 'c\\*,', # small c, cedilla + "Eacute" => "E\\*'", # capital E, acute accent + "eacute" => "e\\*'", # small e, acute accent + "Ecirc" => "E\\*^", # capital E, circumflex accent + "ecirc" => "e\\*^", # small e, circumflex accent + "Egrave" => "E\\*`", # capital E, grave accent + "egrave" => "e\\*`", # small e, grave accent + "ETH" => '\\*(D-', # capital Eth, Icelandic + "eth" => '\\*(d-', # small eth, Icelandic + "Euml" => "E\\*:", # capital E, dieresis or umlaut mark + "euml" => "e\\*:", # small e, dieresis or umlaut mark + "Iacute" => "I\\*'", # capital I, acute accent + "iacute" => "i\\*'", # small i, acute accent + "Icirc" => "I\\*^", # capital I, circumflex accent + "icirc" => "i\\*^", # small i, circumflex accent + "Igrave" => "I\\*`", # capital I, grave accent + "igrave" => "i\\*`", # small i, grave accent + "Iuml" => "I\\*:", # capital I, dieresis or umlaut mark + "iuml" => "i\\*:", # small i, dieresis or umlaut mark + "Ntilde" => 'N\*~', # capital N, tilde + "ntilde" => 'n\*~', # small n, tilde + "Oacute" => "O\\*'", # capital O, acute accent + "oacute" => "o\\*'", # small o, acute accent + "Ocirc" => "O\\*^", # capital O, circumflex accent + "ocirc" => "o\\*^", # small o, circumflex accent + "Ograve" => "O\\*`", # capital O, grave accent + "ograve" => "o\\*`", # small o, grave accent + "Oslash" => "O\\*/", # capital O, slash + "oslash" => "o\\*/", # small o, slash + "Otilde" => "O\\*~", # capital O, tilde + "otilde" => "o\\*~", # small o, tilde + "Ouml" => "O\\*:", # capital O, dieresis or umlaut mark + "ouml" => "o\\*:", # small o, dieresis or umlaut mark + "szlig" => '\*8', # small sharp s, German (sz ligature) + "THORN" => '\\*(Th', # capital THORN, Icelandic + "thorn" => '\\*(th',, # small thorn, Icelandic + "Uacute" => "U\\*'", # capital U, acute accent + "uacute" => "u\\*'", # small u, acute accent + "Ucirc" => "U\\*^", # capital U, circumflex accent + "ucirc" => "u\\*^", # small u, circumflex accent + "Ugrave" => "U\\*`", # capital U, grave accent + "ugrave" => "u\\*`", # small u, grave accent + "Uuml" => "U\\*:", # capital U, dieresis or umlaut mark + "uuml" => "u\\*:", # small u, dieresis or umlaut mark + "Yacute" => "Y\\*'", # capital Y, acute accent + "yacute" => "y\\*'", # small y, acute accent + "yuml" => "y\\*:", # small y, dieresis or umlaut mark +); +} + diff --git a/crypto/openssl/util/selftest.pl b/crypto/openssl/util/selftest.pl new file mode 100644 index 0000000..04b4425 --- /dev/null +++ b/crypto/openssl/util/selftest.pl @@ -0,0 +1,188 @@ +#!/usr/local/bin/perl -w +# +# Run the test suite and generate a report +# + +if (! -f "Configure") { + print "Please run perl util/selftest.pl in the OpenSSL directory.\n"; + exit 1; +} + +my $report="testlog"; +my $os="??"; +my $version="??"; +my $platform0="??"; +my $platform="??"; +my $options="??"; +my $last="??"; +my $ok=0; +my $cc="cc"; +my $cversion="??"; +my $sep="-----------------------------------------------------------------------------\n"; + +open(OUT,">$report") or die; + +print OUT "OpenSSL self-test report:\n\n"; + +$uname=`uname -a`; +$uname="??\n" if $uname eq ""; + +$c=`sh config -t`; +foreach $_ (split("\n",$c)) { + $os=$1 if (/Operating system: (.*)$/); + $platform0=$1 if (/Configuring for (.*)$/); +} + +system "sh config" if (! -f "Makefile.ssl"); + +if (open(IN,"<Makefile.ssl")) { + while (<IN>) { + $version=$1 if (/^VERSION=(.*)$/); + $platform=$1 if (/^PLATFORM=(.*)$/); + $options=$1 if (/^OPTIONS=(.*)$/); + $cc=$1 if (/^CC= *(.*)$/); + } + close(IN); +} else { + print OUT "Error running config!\n"; +} + +$cversion=`$cc -v 2>&1`; +$cversion=`$cc -V 2>&1` if $cversion =~ "usage"; +$cversion=`$cc --version` if $cversion eq ""; +$cversion =~ s/Reading specs.*\n//; +$cversion =~ s/usage.*\n//; +chomp $cversion; + +if (open(IN,"<CHANGES")) { + while(<IN>) { + if (/\*\) (.{0,55})/) { + $last=$1; + last; + } + } + close(IN); +} + +print OUT "OpenSSL version: $version\n"; +print OUT "Last change: $last...\n"; +print OUT "Options: $options\n" if $options ne ""; +print OUT "OS (uname): $uname"; +print OUT "OS (config): $os\n"; +print OUT "Target (default): $platform0\n"; +print OUT "Target: $platform\n"; +print OUT "Compiler: $cversion\n"; +print OUT "\n"; + +print "Checking compiler...\n"; +if (open(TEST,">cctest.c")) { + print TEST "#include <stdio.h>\nmain(){printf(\"Hello world\\n\");}\n"; + close(TEST); + system("$cc -o cctest cctest.c"); + if (`./cctest` !~ /Hello world/) { + print OUT "Compiler doesn't work.\n"; + goto err; + } + system("ar r cctest.a /dev/null"); + if (not -f "cctest.a") { + print OUT "Check your archive tool (ar).\n"; + goto err; + } +} else { + print OUT "Can't create cctest.c\n"; +} +if (open(TEST,">cctest.c")) { + print TEST "#include <openssl/opensslv.h>\nmain(){printf(OPENSSL_VERSION_TEXT);}\n"; + close(TEST); + system("$cc -o cctest -Iinclude cctest.c"); + $cctest = `./cctest`; + if ($cctest !~ /OpenSSL $version/) { + if ($cctest =~ /OpenSSL/) { + print OUT "#include uses headers from different OpenSSL version!\n"; + } else { + print OUT "Can't compile test program!\n"; + } + goto err; + } +} else { + print OUT "Can't create cctest.c\n"; +} + +print "Running make...\n"; +if (system("make 2>&1 | tee make.log") > 255) { + + print OUT "make failed!\n"; + if (open(IN,"<make.log")) { + print OUT $sep; + while (<IN>) { + print OUT; + } + close(IN); + print OUT $sep; + } else { + print OUT "make.log not found!\n"; + } + goto err; +} + +$_=$options; +s/no-asm//; +if (/no-/) +{ + print OUT "Test skipped.\n"; + goto err; +} + +print "Running make test...\n"; +if (system("make test 2>&1 | tee maketest.log") > 255) + { + print OUT "make test failed!\n"; +} else { + $ok=1; +} + +if ($ok and open(IN,"<maketest.log")) { + while (<IN>) { + $ok=2 if /^platform: $platform/; + } + close(IN); +} + +if ($ok != 2) { + print OUT "Failure!\n"; + if (open(IN,"<make.log")) { + print OUT $sep; + while (<IN>) { + print OUT; + } + close(IN); + print OUT $sep; + } else { + print OUT "make.log not found!\n"; + } + if (open(IN,"<maketest.log")) { + while (<IN>) { + print OUT; + } + close(IN); + print OUT $sep; + } else { + print OUT "maketest.log not found!\n"; + } +} else { + print OUT "Test passed.\n"; +} +err: +close(OUT); + +print "\n"; +open(IN,"<$report") or die; +while (<IN>) { + if (/$sep/) { + print "[...]\n"; + last; + } + print; +} +print "\nTest report in file $report\n"; + diff --git a/crypto/openssl/util/ssleay.num b/crypto/openssl/util/ssleay.num index 8121738..32b2e96 100755 --- a/crypto/openssl/util/ssleay.num +++ b/crypto/openssl/util/ssleay.num @@ -215,3 +215,13 @@ SSL_CTX_set_cert_verify_callback 232 sk_SSL_COMP_sort 233 sk_SSL_CIPHER_sort 234 SSL_CTX_set_default_passwd_cb_userdata 235 +SSL_set_purpose 236 +SSL_CTX_set_trust 237 +SSL_CTX_set_purpose 238 +SSL_set_trust 239 +SSL_get_finished 240 +SSL_get_peer_finished 241 +SSL_get1_session 242 +SSL_CTX_callback_ctrl 243 +SSL_callback_ctrl 244 +SSL_CTX_sessions 245 |