I realize the number of question about SSL certificates is legion, but after much searching I couldn't find a precise answer to the following confusion.
For one-way SSL, under what circumstances does the consumer of an HTTPS web service need to import the provider of said web service's certificate/public key? I've consumed a few web services over https before and never had to add the other company's certificate or public key to the key store (or is it trust store?) of any device at my company.
And yet apparently sometimes that is the case, as evidenced by these examples:
certificate mechanism between webservice provider and consumer
Consuming RESTful service over https with certificate using Java
Is it only necessary when the provider of the service's certificate is not issued by a CA known to the consumer?
Also, if the consumer does end up having to import the provider's certificate, AND it's the case that the consumer's consuming app itself consists of a client part and a server part, does the consumer import it into the store of the consumer's web server or into the store of each and every client computer at the consumer's company?
Finally, for two-way SSL, does the consumer send his own client certificate with code that executes on his (possibly many) client computers or on his own web server?
Thanks for any clarification.