diff options
author | djm <> | 2009-04-06 06:30:08 +0000 |
---|---|---|
committer | djm <> | 2009-04-06 06:30:08 +0000 |
commit | 5d1f64994b96668ba794f5211364ed54dd7ee08d (patch) | |
tree | 6e736297805c79ec70ef2ba631b5dbb38c60ef68 /src/lib/libcrypto | |
parent | 76dd4d55fdccad54d20608e7caf577b9d67b216f (diff) | |
download | openbsd-5d1f64994b96668ba794f5211364ed54dd7ee08d.tar.gz openbsd-5d1f64994b96668ba794f5211364ed54dd7ee08d.tar.bz2 openbsd-5d1f64994b96668ba794f5211364ed54dd7ee08d.zip |
import of OpenSSL 0.9.8k
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r-- | src/lib/libcrypto/bn/bntest.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/crypto-lib.com | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/des/times/usparc.cc | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/enc_min.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp_test.c | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/rand/rand_unix.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_x931g.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/symhacks.h | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/util/domd | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/util/libeay.num | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/util/pl/VC-32.pl | 6 |
11 files changed, 26 insertions, 21 deletions
diff --git a/src/lib/libcrypto/bn/bntest.c b/src/lib/libcrypto/bn/bntest.c index 310763eca0..cf190380f5 100644 --- a/src/lib/libcrypto/bn/bntest.c +++ b/src/lib/libcrypto/bn/bntest.c | |||
@@ -926,7 +926,7 @@ int test_mod_exp(BIO *bp, BN_CTX *ctx) | |||
926 | BN_bntest_rand(b,2+i,0,0); /**/ | 926 | BN_bntest_rand(b,2+i,0,0); /**/ |
927 | 927 | ||
928 | if (!BN_mod_exp(d,a,b,c,ctx)) | 928 | if (!BN_mod_exp(d,a,b,c,ctx)) |
929 | return(00); | 929 | return(0); |
930 | 930 | ||
931 | if (bp != NULL) | 931 | if (bp != NULL) |
932 | { | 932 | { |
@@ -1028,7 +1028,7 @@ int test_exp(BIO *bp, BN_CTX *ctx) | |||
1028 | BN_bntest_rand(b,2+i,0,0); /**/ | 1028 | BN_bntest_rand(b,2+i,0,0); /**/ |
1029 | 1029 | ||
1030 | if (!BN_exp(d,a,b,ctx)) | 1030 | if (!BN_exp(d,a,b,ctx)) |
1031 | return(00); | 1031 | return(0); |
1032 | 1032 | ||
1033 | if (bp != NULL) | 1033 | if (bp != NULL) |
1034 | { | 1034 | { |
diff --git a/src/lib/libcrypto/crypto-lib.com b/src/lib/libcrypto/crypto-lib.com index db9c882fb0..e72af90822 100644 --- a/src/lib/libcrypto/crypto-lib.com +++ b/src/lib/libcrypto/crypto-lib.com | |||
@@ -169,7 +169,7 @@ $ LIB_SHA = "sha_dgst,sha1dgst,sha_one,sha1_one,sha256,sha512" | |||
169 | $ LIB_MDC2 = "mdc2dgst,mdc2_one" | 169 | $ LIB_MDC2 = "mdc2dgst,mdc2_one" |
170 | $ LIB_HMAC = "hmac" | 170 | $ LIB_HMAC = "hmac" |
171 | $ LIB_RIPEMD = "rmd_dgst,rmd_one" | 171 | $ LIB_RIPEMD = "rmd_dgst,rmd_one" |
172 | $ LIB_DES = "set_key,ecb_enc,cbc_enc,"+ - | 172 | $ LIB_DES = "des_lib,set_key,ecb_enc,cbc_enc,"+ - |
173 | "ecb3_enc,cfb64enc,cfb64ede,cfb_enc,ofb64ede,"+ - | 173 | "ecb3_enc,cfb64enc,cfb64ede,cfb_enc,ofb64ede,"+ - |
174 | "enc_read,enc_writ,ofb64enc,"+ - | 174 | "enc_read,enc_writ,ofb64enc,"+ - |
175 | "ofb_enc,str2key,pcbc_enc,qud_cksm,rand_key,"+ - | 175 | "ofb_enc,str2key,pcbc_enc,qud_cksm,rand_key,"+ - |
@@ -191,7 +191,7 @@ $ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ - | |||
191 | "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ - | 191 | "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ - |
192 | "bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ - | 192 | "bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ - |
193 | "bn_recp,bn_mont,bn_mpi,bn_exp2,bn_gf2m,bn_nist,"+ - | 193 | "bn_recp,bn_mont,bn_mpi,bn_exp2,bn_gf2m,bn_nist,"+ - |
194 | "bn_depr,bn_const" | 194 | "bn_depr,bn_x931p,bn_const,bn_opt" |
195 | $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ - | 195 | $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ - |
196 | "ec_err,ec_curve,ec_check,ec_print,ec_asn1,ec_key,"+ - | 196 | "ec_err,ec_curve,ec_check,ec_print,ec_asn1,ec_key,"+ - |
197 | "ec2_smpl,ec2_mult" | 197 | "ec2_smpl,ec2_mult" |
@@ -211,7 +211,7 @@ $ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ - | |||
211 | "tb_cipher,tb_digest,"+ - | 211 | "tb_cipher,tb_digest,"+ - |
212 | "eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,eng_padlock" | 212 | "eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,eng_padlock" |
213 | $ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,"+ - | 213 | $ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,"+ - |
214 | "aes_ctr,aes_ige" | 214 | "aes_ctr,aes_ige,aes_wrap" |
215 | $ LIB_BUFFER = "buffer,buf_str,buf_err" | 215 | $ LIB_BUFFER = "buffer,buf_str,buf_err" |
216 | $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ - | 216 | $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ - |
217 | "bss_mem,bss_null,bss_fd,"+ - | 217 | "bss_mem,bss_null,bss_fd,"+ - |
@@ -246,7 +246,7 @@ $ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ - | |||
246 | $ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ - | 246 | $ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ - |
247 | "tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ - | 247 | "tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ - |
248 | "f_int,f_string,n_pkey,"+ - | 248 | "f_int,f_string,n_pkey,"+ - |
249 | "f_enum,a_hdr,x_pkey,a_bool,x_exten,"+ - | 249 | "f_enum,a_hdr,x_pkey,a_bool,x_exten,asn_mime,"+ - |
250 | "asn1_gen,asn1_par,asn1_lib,asn1_err,a_meth,a_bytes,a_strnid,"+ - | 250 | "asn1_gen,asn1_par,asn1_lib,asn1_err,a_meth,a_bytes,a_strnid,"+ - |
251 | "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid" | 251 | "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid" |
252 | $ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ - | 252 | $ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ - |
diff --git a/src/lib/libcrypto/des/times/usparc.cc b/src/lib/libcrypto/des/times/usparc.cc index f6ec8e8831..0864285ef6 100644 --- a/src/lib/libcrypto/des/times/usparc.cc +++ b/src/lib/libcrypto/des/times/usparc.cc | |||
@@ -2,7 +2,7 @@ solaris 2.5.1 usparc 167mhz?? - SC4.0 cc -fast -Xa -xO5 | |||
2 | 2 | ||
3 | For the ultra sparc, SunC 4.0 cc -fast -Xa -xO5, running 'des_opts' | 3 | For the ultra sparc, SunC 4.0 cc -fast -Xa -xO5, running 'des_opts' |
4 | gives a speed of 475,000 des/s while 'speed' gives 417,000 des/s. | 4 | gives a speed of 475,000 des/s while 'speed' gives 417,000 des/s. |
5 | I belive the difference is tied up in optimisation that the compiler | 5 | I believe the difference is tied up in optimisation that the compiler |
6 | is able to perform when the code is 'inlined'. For 'speed', the DES | 6 | is able to perform when the code is 'inlined'. For 'speed', the DES |
7 | routines are being linked from a library. I'll record the higher | 7 | routines are being linked from a library. I'll record the higher |
8 | speed since if performance is everything, you can always inline | 8 | speed since if performance is everything, you can always inline |
diff --git a/src/lib/libcrypto/evp/enc_min.c b/src/lib/libcrypto/evp/enc_min.c index 3cb4626bef..7fba38ee24 100644 --- a/src/lib/libcrypto/evp/enc_min.c +++ b/src/lib/libcrypto/evp/enc_min.c | |||
@@ -199,7 +199,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp | |||
199 | enc = 1; | 199 | enc = 1; |
200 | ctx->encrypt = enc; | 200 | ctx->encrypt = enc; |
201 | } | 201 | } |
202 | #ifdef OPENSSL_NO_FIPS | 202 | #ifdef OPENSSL_FIPS |
203 | if(FIPS_selftest_failed()) | 203 | if(FIPS_selftest_failed()) |
204 | { | 204 | { |
205 | FIPSerr(FIPS_F_EVP_CIPHERINIT_EX,FIPS_R_FIPS_SELFTEST_FAILED); | 205 | FIPSerr(FIPS_F_EVP_CIPHERINIT_EX,FIPS_R_FIPS_SELFTEST_FAILED); |
diff --git a/src/lib/libcrypto/evp/evp_test.c b/src/lib/libcrypto/evp/evp_test.c index bb6f02c2e9..436be20bf1 100644 --- a/src/lib/libcrypto/evp/evp_test.c +++ b/src/lib/libcrypto/evp/evp_test.c | |||
@@ -220,18 +220,18 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, | |||
220 | test1_exit(7); | 220 | test1_exit(7); |
221 | } | 221 | } |
222 | 222 | ||
223 | if(outl+outl2 != cn) | 223 | if(outl+outl2 != pn) |
224 | { | 224 | { |
225 | fprintf(stderr,"Plaintext length mismatch got %d expected %d\n", | 225 | fprintf(stderr,"Plaintext length mismatch got %d expected %d\n", |
226 | outl+outl2,cn); | 226 | outl+outl2,pn); |
227 | test1_exit(8); | 227 | test1_exit(8); |
228 | } | 228 | } |
229 | 229 | ||
230 | if(memcmp(out,plaintext,cn)) | 230 | if(memcmp(out,plaintext,pn)) |
231 | { | 231 | { |
232 | fprintf(stderr,"Plaintext mismatch\n"); | 232 | fprintf(stderr,"Plaintext mismatch\n"); |
233 | hexdump(stderr,"Got",out,cn); | 233 | hexdump(stderr,"Got",out,pn); |
234 | hexdump(stderr,"Expected",plaintext,cn); | 234 | hexdump(stderr,"Expected",plaintext,pn); |
235 | test1_exit(9); | 235 | test1_exit(9); |
236 | } | 236 | } |
237 | } | 237 | } |
diff --git a/src/lib/libcrypto/rand/rand_unix.c b/src/lib/libcrypto/rand/rand_unix.c index 6c2be5cb96..71b98ec212 100644 --- a/src/lib/libcrypto/rand/rand_unix.c +++ b/src/lib/libcrypto/rand/rand_unix.c | |||
@@ -232,7 +232,7 @@ int RAND_poll(void) | |||
232 | t.tv_sec = 0; | 232 | t.tv_sec = 0; |
233 | t.tv_usec = usec; | 233 | t.tv_usec = usec; |
234 | 234 | ||
235 | if (FD_SETSIZE > 0 && fd >= FD_SETSIZE) | 235 | if (FD_SETSIZE > 0 && (unsigned)fd >= FD_SETSIZE) |
236 | { | 236 | { |
237 | /* can't use select, so just try to read once anyway */ | 237 | /* can't use select, so just try to read once anyway */ |
238 | try_read = 1; | 238 | try_read = 1; |
diff --git a/src/lib/libcrypto/rsa/rsa_x931g.c b/src/lib/libcrypto/rsa/rsa_x931g.c index c640cc2ec9..bf94f8be7a 100644 --- a/src/lib/libcrypto/rsa/rsa_x931g.c +++ b/src/lib/libcrypto/rsa/rsa_x931g.c | |||
@@ -79,9 +79,9 @@ int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2, | |||
79 | goto err; | 79 | goto err; |
80 | 80 | ||
81 | ctx = BN_CTX_new(); | 81 | ctx = BN_CTX_new(); |
82 | BN_CTX_start(ctx); | ||
83 | if (!ctx) | 82 | if (!ctx) |
84 | goto err; | 83 | goto err; |
84 | BN_CTX_start(ctx); | ||
85 | 85 | ||
86 | r0 = BN_CTX_get(ctx); | 86 | r0 = BN_CTX_get(ctx); |
87 | r1 = BN_CTX_get(ctx); | 87 | r1 = BN_CTX_get(ctx); |
@@ -190,7 +190,7 @@ int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2, | |||
190 | if (ctx2) | 190 | if (ctx2) |
191 | BN_CTX_free(ctx2); | 191 | BN_CTX_free(ctx2); |
192 | /* If this is set all calls successful */ | 192 | /* If this is set all calls successful */ |
193 | if (rsa->iqmp != NULL) | 193 | if (rsa && rsa->iqmp != NULL) |
194 | return 1; | 194 | return 1; |
195 | 195 | ||
196 | return 0; | 196 | return 0; |
diff --git a/src/lib/libcrypto/symhacks.h b/src/lib/libcrypto/symhacks.h index 6cfb5fe479..8728e6124d 100644 --- a/src/lib/libcrypto/symhacks.h +++ b/src/lib/libcrypto/symhacks.h | |||
@@ -62,6 +62,10 @@ | |||
62 | VAX. */ | 62 | VAX. */ |
63 | #ifdef OPENSSL_SYS_VMS | 63 | #ifdef OPENSSL_SYS_VMS |
64 | 64 | ||
65 | /* Hack a long name in crypto/cryptlib.c */ | ||
66 | #undef int_CRYPTO_set_do_dynlock_callback | ||
67 | #define int_CRYPTO_set_do_dynlock_callback int_CRYPTO_set_do_dynlock_cb | ||
68 | |||
65 | /* Hack a long name in crypto/ex_data.c */ | 69 | /* Hack a long name in crypto/ex_data.c */ |
66 | #undef CRYPTO_get_ex_data_implementation | 70 | #undef CRYPTO_get_ex_data_implementation |
67 | #define CRYPTO_get_ex_data_implementation CRYPTO_get_ex_data_impl | 71 | #define CRYPTO_get_ex_data_implementation CRYPTO_get_ex_data_impl |
diff --git a/src/lib/libcrypto/util/domd b/src/lib/libcrypto/util/domd index 691be7a440..560ebeaf82 100644 --- a/src/lib/libcrypto/util/domd +++ b/src/lib/libcrypto/util/domd | |||
@@ -22,7 +22,7 @@ if [ "$MAKEDEPEND" = "gcc" ]; then | |||
22 | done | 22 | done |
23 | sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp | 23 | sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp |
24 | echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp | 24 | echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp |
25 | gcc -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp | 25 | ${CC:-gcc} -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp |
26 | ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new | 26 | ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new |
27 | rm -f Makefile.tmp | 27 | rm -f Makefile.tmp |
28 | else | 28 | else |
diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num index 0eb54ddc89..74eb337227 100644 --- a/src/lib/libcrypto/util/libeay.num +++ b/src/lib/libcrypto/util/libeay.num | |||
@@ -3667,7 +3667,8 @@ CRYPTO_set_mem_info_functions 4053 EXIST::FUNCTION: | |||
3667 | RSA_X931_generate_key_ex 4054 EXIST::FUNCTION:RSA | 3667 | RSA_X931_generate_key_ex 4054 EXIST::FUNCTION:RSA |
3668 | int_ERR_set_state_func 4055 EXIST:OPENSSL_FIPS:FUNCTION: | 3668 | int_ERR_set_state_func 4055 EXIST:OPENSSL_FIPS:FUNCTION: |
3669 | int_EVP_MD_set_engine_callbacks 4056 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE | 3669 | int_EVP_MD_set_engine_callbacks 4056 EXIST:OPENSSL_FIPS:FUNCTION:ENGINE |
3670 | int_CRYPTO_set_do_dynlock_callback 4057 EXIST::FUNCTION: | 3670 | int_CRYPTO_set_do_dynlock_callback 4057 EXIST:!VMS:FUNCTION: |
3671 | int_CRYPTO_set_do_dynlock_cb 4057 EXIST:VMS:FUNCTION: | ||
3671 | FIPS_rng_stick 4058 EXIST:OPENSSL_FIPS:FUNCTION: | 3672 | FIPS_rng_stick 4058 EXIST:OPENSSL_FIPS:FUNCTION: |
3672 | EVP_CIPHER_CTX_set_flags 4059 EXIST::FUNCTION: | 3673 | EVP_CIPHER_CTX_set_flags 4059 EXIST::FUNCTION: |
3673 | BN_X931_generate_prime_ex 4060 EXIST::FUNCTION: | 3674 | BN_X931_generate_prime_ex 4060 EXIST::FUNCTION: |
diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl index 730c2083bd..85121c8ed1 100644 --- a/src/lib/libcrypto/util/pl/VC-32.pl +++ b/src/lib/libcrypto/util/pl/VC-32.pl | |||
@@ -164,7 +164,7 @@ if ($FLAVOR =~ /NT/) | |||
164 | $ex_libs="unicows.lib $ex_libs"; | 164 | $ex_libs="unicows.lib $ex_libs"; |
165 | } | 165 | } |
166 | # static library stuff | 166 | # static library stuff |
167 | $mklib='lib'; | 167 | $mklib='lib /nologo'; |
168 | $ranlib=''; | 168 | $ranlib=''; |
169 | $plib=""; | 169 | $plib=""; |
170 | $libp=".lib"; | 170 | $libp=".lib"; |
@@ -184,7 +184,7 @@ if ($nasm) { | |||
184 | $asm.=' /Zi' if $debug; | 184 | $asm.=' /Zi' if $debug; |
185 | $afile='/Fo'; | 185 | $afile='/Fo'; |
186 | } else { | 186 | } else { |
187 | $asm='ml /Cp /coff /c /Cx'; | 187 | $asm='ml /nologo /Cp /coff /c /Cx'; |
188 | $asm.=" /Zi" if $debug; | 188 | $asm.=" /Zi" if $debug; |
189 | $afile='/Fo'; | 189 | $afile='/Fo'; |
190 | } | 190 | } |
@@ -405,7 +405,7 @@ sub do_link_rule | |||
405 | if ($standalone == 1) | 405 | if ($standalone == 1) |
406 | { | 406 | { |
407 | $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n\t"; | 407 | $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n\t"; |
408 | $ret.= "$mwex advapi32.lib " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild); | 408 | $ret.= "\$(EX_LIBS) " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild); |
409 | $ret.="$files $libs\n<<\n"; | 409 | $ret.="$files $libs\n<<\n"; |
410 | } | 410 | } |
411 | elsif ($standalone == 2) | 411 | elsif ($standalone == 2) |