ADDED load key store and certificate from input stream