code
stringlengths
3
6.57k
pwd.getpwnam(user)
os.chown(priv, uid, -1)
os.chown(pub, uid, -1)
except (KeyError, ImportError, OSError)
sign_message(privkey_path, message)
log.debug('salt.crypt.sign_message: Loading private key')
salt.utils.fopen(privkey_path)
RSA.importKey(f.read()
log.debug('salt.crypt.sign_message: Signing message.')
PKCS1_v1_5.new(key)
signer.sign(SHA.new(message)
verify_signature(pubkey_path, message, signature)
log.debug('salt.crypt.verify_signature: Loading public key')
salt.utils.fopen(pubkey_path)
RSA.importKey(f.read()
log.debug('salt.crypt.verify_signature: Verifying signature')
PKCS1_v1_5.new(pubkey)
verifier.verify(SHA.new(message)
gen_signature(priv_path, pub_path, sign_path)
salt.utils.fopen(pub_path)
fp_.read()
sign_message(priv_path, mpub_64)
binascii.b2a_base64(mpub_sig)
os.path.isfile(sign_path)
format(os.path.basename(pub_path)
os.path.basename(priv_path)
os.path.isfile(sign_path)
format(sign_path)
salt.utils.fopen(sign_path, 'wb+')
sig_f.write(mpub_sig_64)
log.trace('Wrote signature to {0}'.format(sign_path)
private_encrypt(key, message)
salt.utils.rsax931.RSAX931Signer(key.exportKey('PEM')
signer.sign(message)
public_decrypt(pub, message)
message (or digest)
salt.utils.rsax931.RSAX931Verifier(pub.exportKey('PEM')
verifier.verify(message)
MasterKeys(dict)
__init__(self, opts)
super(MasterKeys, self)
__init__()
os.path.join(self.opts['pki_dir'], 'master.pub')
os.path.join(self.opts['pki_dir'], 'master.pem')
self.__get_keys()
os.path.isfile(self.sig_path)
salt.utils.fopen(self.sig_path)
read()
format(os.path.basename(self.pub_path)
format(self.sig_path)
sys.exit(1)
self.__get_keys(name=opts['master_sign_key_name'])
__setstate__(self, state)
self.__init__(state['opts'])
__getstate__(self)
__get_keys(self, name='master')
os.path.exists(path)
salt.utils.fopen(path)
RSA.importKey(f.read()
log.debug('Loaded {0} key: {1}'.format(name, path)
log.info('Generating {0} keys: {1}'.format(name, self.opts['pki_dir'])
self.opts.get('user')
salt.utils.fopen(self.rsa_path)
RSA.importKey(f.read()
get_pub_str(self, name='master')
os.path.isfile(path)
self.__get_keys()
salt.utils.fopen(path, 'wb+')
f.write(key.publickey()
exportKey('PEM')
salt.utils.fopen(path)
read()
get_mkey_paths(self)
get_sign_paths(self)
pubkey_signature(self)
AsyncAuth(object)
weakref.WeakKeyDictionary()
__new__(cls, opts, io_loop=None)
__key()
tornado.ioloop.IOLoop.current()
weakref.WeakValueDictionary()
cls.__key(opts)
log.debug('Initializing new SAuth for {0}'.format(key)
object.__new__(cls)
new_auth.__singleton_init__(opts, io_loop=io_loop)
log.debug('Re-using SAuth for {0}'.format(key)
__key(cls, opts, io_loop=None)
__init__(self, opts, io_loop=None)
__singleton_init__(self, opts, io_loop=None)
Crypticle.generate_key_string()
salt.payload.Serial(self.opts)
os.path.join(self.opts['pki_dir'], 'minion.pub')
os.path.join(self.opts['pki_dir'], 'minion.pem')
os.path.isfile(self.pub_path)
self.get_keys()
tornado.ioloop.IOLoop.current()
salt.utils.reinit_crypto()
self.__key(self.opts)
Crypticle(self.opts, creds['aes'])
tornado.concurrent.Future()