Merge change 6177 into donut

* changes:
  Two small checks in keymgmt.