Bump default DKIM key length to 2048
This matches the Debian default for opendkim-genkey Refs #337
This commit is contained in:
		
							parent
							
								
									7523d6bebf
								
							
						
					
					
						commit
						4687bff96d
					
				| 
						 | 
					@ -1182,10 +1182,12 @@ ORDER BY
 | 
				
			||||||
        if (!file_exists($target_dir.'/alternc.txt')) {
 | 
					        if (!file_exists($target_dir.'/alternc.txt')) {
 | 
				
			||||||
            $this->shouldreloaddkim=true;
 | 
					            $this->shouldreloaddkim=true;
 | 
				
			||||||
            if (! is_dir($target_dir)) mkdir($target_dir); // create dir
 | 
					            if (! is_dir($target_dir)) mkdir($target_dir); // create dir
 | 
				
			||||||
            // Generate the key, 1200 bits (better than 1024)
 | 
					 | 
				
			||||||
            $old_dir=getcwd();
 | 
					            $old_dir=getcwd();
 | 
				
			||||||
            chdir($target_dir);
 | 
					            chdir($target_dir);
 | 
				
			||||||
            exec('opendkim-genkey -b 1200 -r -d '.escapeshellarg($domain).' -s "alternc" ');
 | 
					            // Generate the key, 2048 bits (better than 1024)
 | 
				
			||||||
 | 
					            // 2048 bits is also the default in recent Debian builds of opendkim
 | 
				
			||||||
 | 
					            // @see man opendkim-genkey
 | 
				
			||||||
 | 
					            exec('opendkim-genkey -b 2048 -r -d '.escapeshellarg($domain).' -s "alternc" ');
 | 
				
			||||||
            chdir($old_dir);
 | 
					            chdir($old_dir);
 | 
				
			||||||
            // opendkim must be owner of the key
 | 
					            // opendkim must be owner of the key
 | 
				
			||||||
            chown("$target_dir/alternc.private", 'opendkim');
 | 
					            chown("$target_dir/alternc.private", 'opendkim');
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue