Add test_kron function, which will contain a test for BN_kronecker.
This commit is contained in:
		@@ -91,6 +91,7 @@ int test_mod(BIO *bp,BN_CTX *ctx);
 | 
				
			|||||||
int test_mod_mul(BIO *bp,BN_CTX *ctx);
 | 
					int test_mod_mul(BIO *bp,BN_CTX *ctx);
 | 
				
			||||||
int test_mod_exp(BIO *bp,BN_CTX *ctx);
 | 
					int test_mod_exp(BIO *bp,BN_CTX *ctx);
 | 
				
			||||||
int test_exp(BIO *bp,BN_CTX *ctx);
 | 
					int test_exp(BIO *bp,BN_CTX *ctx);
 | 
				
			||||||
 | 
					int test_kron(BIO *bp,BN_CTX *ctx);
 | 
				
			||||||
int rand_neg(void);
 | 
					int rand_neg(void);
 | 
				
			||||||
static int results=0;
 | 
					static int results=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -228,6 +229,10 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
	if (!test_exp(out,ctx)) goto err;
 | 
						if (!test_exp(out,ctx)) goto err;
 | 
				
			||||||
	BIO_flush(out);
 | 
						BIO_flush(out);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						message(out,"BN_kronecker");
 | 
				
			||||||
 | 
						if (!test_kron(out,ctx)) goto err;
 | 
				
			||||||
 | 
						BIO_flush(out);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	BN_CTX_free(ctx);
 | 
						BN_CTX_free(ctx);
 | 
				
			||||||
	BIO_free(out);
 | 
						BIO_free(out);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -895,6 +900,12 @@ int test_exp(BIO *bp, BN_CTX *ctx)
 | 
				
			|||||||
	return(1);
 | 
						return(1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int test_kron(BIO *bp, BN_CTX *ctx)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						/* XXX */
 | 
				
			||||||
 | 
						return(1);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_)
 | 
					int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	BIGNUM *a,*b,*c,*d;
 | 
						BIGNUM *a,*b,*c,*d;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user