saltstack/salt — pull request #11928 by jcsp (2014-04-11 16:42:41+00:00)
Title: Detect AES key changes in _fire_master

This is a follow up to 8ba9543, which changed the fire_master
implementation to use existing AES key instead of re-authenticating.

That change caused a problem in use cases which send a lot of events
but don't run jobs, because when the AES key changed, the minion
would never notice, and keep sending messages with the old key
indefinitely.

This change adds an attempt to decrypted to response to the sent
event, and to re-authenticated if the response can't be decrypted
in order to handle AES key changes.