mirror of https://github.com/openssl/openssl.git
				
				
				
			The handling of DSA_METHOD and DH_METHOD wasn't quite as problematic as
with RSA_METHOD (the **_get_default_methods do set the default value if it's not set). However, the code had some duplication and was a bit conter-intuitive.
This commit is contained in:
		
							parent
							
								
									deb4d50e51
								
							
						
					
					
						commit
						da414db464
					
				|  | @ -103,9 +103,8 @@ DH *DH_new_method(DH_METHOD *meth) | ||||||
| 		DHerr(DH_F_DH_NEW,ERR_R_MALLOC_FAILURE); | 		DHerr(DH_F_DH_NEW,ERR_R_MALLOC_FAILURE); | ||||||
| 		return(NULL); | 		return(NULL); | ||||||
| 		} | 		} | ||||||
| 	if(!default_DH_method) default_DH_method = DH_OpenSSL(); |  | ||||||
| 	if(meth) ret->meth = meth; | 	if(meth) ret->meth = meth; | ||||||
| 	else ret->meth = default_DH_method; | 	else ret->meth = DH_get_default_method(); | ||||||
| 	ret->pad=0; | 	ret->pad=0; | ||||||
| 	ret->version=0; | 	ret->version=0; | ||||||
| 	ret->p=NULL; | 	ret->p=NULL; | ||||||
|  |  | ||||||
|  | @ -107,9 +107,8 @@ DSA *DSA_new_method(DSA_METHOD *meth) | ||||||
| 		DSAerr(DSA_F_DSA_NEW,ERR_R_MALLOC_FAILURE); | 		DSAerr(DSA_F_DSA_NEW,ERR_R_MALLOC_FAILURE); | ||||||
| 		return(NULL); | 		return(NULL); | ||||||
| 		} | 		} | ||||||
| 	if(!default_DSA_method) default_DSA_method = DSA_OpenSSL(); |  | ||||||
| 	if(meth) ret->meth = meth; | 	if(meth) ret->meth = meth; | ||||||
| 	else ret->meth = default_DSA_method; | 	else ret->meth = DSA_get_default_method(); | ||||||
| 	ret->pad=0; | 	ret->pad=0; | ||||||
| 	ret->version=0; | 	ret->version=0; | ||||||
| 	ret->write_params=1; | 	ret->write_params=1; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue