Loading crypto/bn/bntest.c +28 −6 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ int test_add(BIO *bp); int test_sub(BIO *bp); int test_lshift1(BIO *bp); int test_lshift(BIO *bp,BN_CTX *ctx); int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_); int test_rshift1(BIO *bp); int test_rshift(BIO *bp,BN_CTX *ctx); int test_div(BIO *bp,BN_CTX *ctx); Loading @@ -95,6 +95,9 @@ static int results=0; #include "bss_file.c" #endif static unsigned char lst1[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8\xC9" "\x9B\x04\x5D\x48\x36\xC2\xFD\x16\xC9\x64\xF0"; int main(int argc, char *argv[]) { BN_CTX *ctx; Loading Loading @@ -152,8 +155,13 @@ int main(int argc, char *argv[]) if (!test_lshift1(out)) goto err; fflush(stdout); fprintf(stderr,"test BN_lshift (fixed)\n"); if (!test_lshift(out,ctx,BN_bin2bn(lst1,sizeof(lst1)-1,NULL))) goto err; fflush(stdout); fprintf(stderr,"test BN_lshift\n"); if (!test_lshift(out,ctx)) goto err; if (!test_lshift(out,ctx,NULL)) goto err; fflush(stdout); fprintf(stderr,"test BN_rshift1\n"); Loading Loading @@ -815,19 +823,24 @@ int test_exp(BIO *bp, BN_CTX *ctx) return(1); } int test_lshift(BIO *bp,BN_CTX *ctx) int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_) { BIGNUM *a,*b,*c,*d; int i; a=BN_new(); b=BN_new(); c=BN_new(); d=BN_new(); BN_one(c); if(a_) a=a_; else { a=BN_new(); BN_rand(a,200,0,0); /**/ a->neg=rand_neg(); } for (i=0; i<70; i++) { BN_lshift(b,a,i+1); Loading @@ -849,6 +862,15 @@ int test_lshift(BIO *bp,BN_CTX *ctx) if(!BN_is_zero(d)) { BIO_puts(bp,"Left shift test failed!\n"); BIO_puts(bp,"a="); BN_print(bp,a); BIO_puts(bp,"\nb="); BN_print(bp,b); BIO_puts(bp,"\nc="); BN_print(bp,c); BIO_puts(bp,"\nd="); BN_print(bp,d); BIO_puts(bp,"\n"); return 0; } } Loading crypto/md5/Makefile.ssl +2 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,6 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. md5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslv.h md5_dgst.o: ../md32_common.h md5_locl.h md5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h md5_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md5_locl.h md5_one.o: ../../include/openssl/md5.h crypto/sha/Makefile.ssl +2 −0 Original line number Diff line number Diff line Loading @@ -102,8 +102,10 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. sha1_one.o: ../../include/openssl/sha.h sha1dgst.o: ../../include/openssl/opensslconf.h sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h sha1dgst.o: sha_locl.h sha_dgst.o: ../../include/openssl/opensslconf.h sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h sha_dgst.o: sha_locl.h sha_one.o: ../../include/openssl/sha.h Loading
crypto/bn/bntest.c +28 −6 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ int test_add(BIO *bp); int test_sub(BIO *bp); int test_lshift1(BIO *bp); int test_lshift(BIO *bp,BN_CTX *ctx); int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_); int test_rshift1(BIO *bp); int test_rshift(BIO *bp,BN_CTX *ctx); int test_div(BIO *bp,BN_CTX *ctx); Loading @@ -95,6 +95,9 @@ static int results=0; #include "bss_file.c" #endif static unsigned char lst1[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8\xC9" "\x9B\x04\x5D\x48\x36\xC2\xFD\x16\xC9\x64\xF0"; int main(int argc, char *argv[]) { BN_CTX *ctx; Loading Loading @@ -152,8 +155,13 @@ int main(int argc, char *argv[]) if (!test_lshift1(out)) goto err; fflush(stdout); fprintf(stderr,"test BN_lshift (fixed)\n"); if (!test_lshift(out,ctx,BN_bin2bn(lst1,sizeof(lst1)-1,NULL))) goto err; fflush(stdout); fprintf(stderr,"test BN_lshift\n"); if (!test_lshift(out,ctx)) goto err; if (!test_lshift(out,ctx,NULL)) goto err; fflush(stdout); fprintf(stderr,"test BN_rshift1\n"); Loading Loading @@ -815,19 +823,24 @@ int test_exp(BIO *bp, BN_CTX *ctx) return(1); } int test_lshift(BIO *bp,BN_CTX *ctx) int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_) { BIGNUM *a,*b,*c,*d; int i; a=BN_new(); b=BN_new(); c=BN_new(); d=BN_new(); BN_one(c); if(a_) a=a_; else { a=BN_new(); BN_rand(a,200,0,0); /**/ a->neg=rand_neg(); } for (i=0; i<70; i++) { BN_lshift(b,a,i+1); Loading @@ -849,6 +862,15 @@ int test_lshift(BIO *bp,BN_CTX *ctx) if(!BN_is_zero(d)) { BIO_puts(bp,"Left shift test failed!\n"); BIO_puts(bp,"a="); BN_print(bp,a); BIO_puts(bp,"\nb="); BN_print(bp,b); BIO_puts(bp,"\nc="); BN_print(bp,c); BIO_puts(bp,"\nd="); BN_print(bp,d); BIO_puts(bp,"\n"); return 0; } } Loading
crypto/md5/Makefile.ssl +2 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,6 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. md5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslv.h md5_dgst.o: ../md32_common.h md5_locl.h md5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h md5_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md5_locl.h md5_one.o: ../../include/openssl/md5.h
crypto/sha/Makefile.ssl +2 −0 Original line number Diff line number Diff line Loading @@ -102,8 +102,10 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. sha1_one.o: ../../include/openssl/sha.h sha1dgst.o: ../../include/openssl/opensslconf.h sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h sha1dgst.o: sha_locl.h sha_dgst.o: ../../include/openssl/opensslconf.h sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h sha_dgst.o: sha_locl.h sha_one.o: ../../include/openssl/sha.h