Sync patches r15425 and r15426 from main trunk.
1. Check the parameter before use it.
2. Add missing parameter comment in AddPubKeyInStore()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2010.SR1@15429 6f19259b-4bc3-4df7-8a09-765794883524