Migrate the keystone.common.cms to keystoneclient

- Add checking the openssl return code 2, related to following review

  https://review.openstack.org/#/c/22716/

- Add support set subprocess to the cms, when we already know which
  subprocess to use.

Closes-Bug: #1142574
Change-Id: I3f86e6ca8bb7738f57051ce7f0f5662b20e7a22b
Encode the text before print it to console

Closes-Bug: #1250490
Change-Id: I516806a0f8a136bb66c64dcdcd07cee6d297e619
Merge "Migrate the keystone.common.cms to keystoneclient"
Merge "Encode the text before print it to console"