Add SSLEAY_DIR argument code for SSLeay_version.
Add '-d' option for 'openssl version' (included in '-a').
This commit is contained in:
		
							
								
								
									
										5
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								CHANGES
									
									
									
									
									
								
							@@ -3,6 +3,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 Changes between 0.9.6 and 0.9.7  [xx XXX 2000]
 | 
					 Changes between 0.9.6 and 0.9.7  [xx XXX 2000]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  *) New SSLeay_version code SSLEAY_DIR to determine the compiled-in
 | 
				
			||||||
 | 
					     value of OPENSSLDIR.  This is available via the new '-d' option
 | 
				
			||||||
 | 
					     to 'openssl version', and is also included in 'openssl version -a'.
 | 
				
			||||||
 | 
					     [Bodo Moeller]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *) Fix C code generated by 'openssl dsaparam -C': If a BN_bin2bn
 | 
					  *) Fix C code generated by 'openssl dsaparam -C': If a BN_bin2bn
 | 
				
			||||||
     call failed, free the DSA structure.
 | 
					     call failed, free the DSA structure.
 | 
				
			||||||
     [Bodo Moeller]
 | 
					     [Bodo Moeller]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,7 +71,7 @@ int MAIN(int, char **);
 | 
				
			|||||||
int MAIN(int argc, char **argv)
 | 
					int MAIN(int argc, char **argv)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	int i,ret=0;
 | 
						int i,ret=0;
 | 
				
			||||||
	int cflags=0,version=0,date=0,options=0,platform=0;
 | 
						int cflags=0,version=0,date=0,options=0,platform=0,dir=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apps_startup();
 | 
						apps_startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -92,8 +92,10 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
			options=1;
 | 
								options=1;
 | 
				
			||||||
		else if (strcmp(argv[i],"-p") == 0)
 | 
							else if (strcmp(argv[i],"-p") == 0)
 | 
				
			||||||
			platform=1;
 | 
								platform=1;
 | 
				
			||||||
 | 
							else if (strcmp(argv[i],"-d") == 0)
 | 
				
			||||||
 | 
								dir=1;
 | 
				
			||||||
		else if (strcmp(argv[i],"-a") == 0)
 | 
							else if (strcmp(argv[i],"-a") == 0)
 | 
				
			||||||
			date=version=cflags=options=platform=1;
 | 
								date=version=cflags=options=platform=dir=1;
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
			BIO_printf(bio_err,"usage:version -[avbofp]\n");
 | 
								BIO_printf(bio_err,"usage:version -[avbofp]\n");
 | 
				
			||||||
@@ -127,6 +129,7 @@ int MAIN(int argc, char **argv)
 | 
				
			|||||||
		printf("\n");
 | 
							printf("\n");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	if (cflags)  printf("%s\n",SSLeay_version(SSLEAY_CFLAGS));
 | 
						if (cflags)  printf("%s\n",SSLeay_version(SSLEAY_CFLAGS));
 | 
				
			||||||
 | 
						if (dir)  printf("%s\n",SSLeay_version(SSLEAY_DIR));
 | 
				
			||||||
end:
 | 
					end:
 | 
				
			||||||
	EXIT(ret);
 | 
						EXIT(ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -90,6 +90,7 @@ extern "C" {
 | 
				
			|||||||
#define SSLEAY_CFLAGS		2
 | 
					#define SSLEAY_CFLAGS		2
 | 
				
			||||||
#define SSLEAY_BUILT_ON		3
 | 
					#define SSLEAY_BUILT_ON		3
 | 
				
			||||||
#define SSLEAY_PLATFORM		4
 | 
					#define SSLEAY_PLATFORM		4
 | 
				
			||||||
 | 
					#define SSLEAY_DIR		5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
 | 
					/* When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
 | 
				
			||||||
 * names in cryptlib.c
 | 
					 * names in cryptlib.c
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -98,6 +98,14 @@ const char *SSLeay_version(int t)
 | 
				
			|||||||
		return(buf);
 | 
							return(buf);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
		return("platform: information not available");
 | 
							return("platform: information not available");
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						if (t == SSLEAY_DIR)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
					#ifdef OPENSSLDIR
 | 
				
			||||||
 | 
							return "OPENSSLDIR: \"" OPENSSLDIR "\"";
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
							return "OPENSSLDIR: N/A";
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	return("not available");
 | 
						return("not available");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user