mirror of
				https://github.com/telekom-security/tpotce.git
				synced 2025-10-31 20:42:53 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			318 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			318 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| # Got root?
 | |
| myWHOAMI=$(whoami)
 | |
| if [ "$myWHOAMI" != "root" ]
 | |
|   then
 | |
|     echo "Need to run as root ..."
 | |
|     exit
 | |
| fi
 | |
| 
 | |
| if [ "$1" = "2048" ] || [ "$1" = "4096" ] || [ "$1" = "8192" ]
 | |
|   then 
 | |
|     openssl dhparam -outform PEM -out dhparam$1.pem $1
 | |
|   else
 | |
|     echo "Usage: ./gen-dhparam [2048, 4096, 8192]..."
 | |
| fi
 | 
