added default value of 4096 bits to config for master and minion RSA-Key

modified key-generation for master and minion to use self.opts['keysize'] instead of defaulting to 4096
This commit is contained in:
vs 2013-12-13 17:50:11 +01:00
parent eeba7dffbe
commit bb0e10a0b3
2 changed files with 5 additions and 2 deletions

View File

@ -177,6 +177,7 @@ VALID_OPTS = {
'jinja_trim_blocks': bool,
'minion_id_caching': bool,
'sign_pub_messages': bool,
'keysize' : int
}
# default configurations
@ -268,6 +269,7 @@ DEFAULT_MINION_OPTS = {
'modules_max_memory': -1,
'grains_refresh_every': 0,
'minion_id_caching': True,
'keysize' : 4096
}
DEFAULT_MASTER_OPTS = {
@ -375,6 +377,7 @@ DEFAULT_MASTER_OPTS = {
'jinja_lstrip_blocks': False,
'jinja_trim_blocks': False,
'sign_pub_messages': False,
'keysize' : 4096
}
# ----- Salt Cloud Configuration Defaults ----------------------------------->

View File

@ -164,7 +164,7 @@ class MasterKeys(dict):
log.info('Generating keys: {0}'.format(self.opts['pki_dir']))
gen_keys(self.opts['pki_dir'],
'master',
4096,
self.opts['keysize'],
self.opts.get('user'))
key = RSA.load_key(self.rsa_path)
return key
@ -218,7 +218,7 @@ class Auth(object):
log.info('Generating keys: {0}'.format(self.opts['pki_dir']))
gen_keys(self.opts['pki_dir'],
'minion',
4096,
self.opts['keysize'],
self.opts.get('user'))
key = RSA.load_key(self.rsa_path)
return key