All the WSO2 servers ships with its own keystore and truststore. These files are found under <PRODUCT_HOME>/repository/resources/security/
directory. The keystore file is wso2carbon.jks
and it contains the private key and the certificate of the server. The truststore file is client-truststore.jks
and it stores all the public certs that the server will use when it is acting as a client to connect with other endpoints.
If you have your own keystore and truststore files, you can simply change the relevant configurations and make the server to use your new keystore file. But you have to make sure that your new certificates created for your expected domain name are imported into the keystore and truststore.
Following is an example command line based approach to import the certificates into the keystore. It uses the keytool application for importing certificates into keystore.
keytool -import -v -trustcacerts -alias ExternalCARoot -file AddTrustExternalCARoot.crt -keystore newkeystore.jks -storepass mypassword
keytool -import -v -trustcacerts -alias TrustCA -file COMODORSAAddTrustCA.crt -keystore newkeystore.jks -storepass mypassword
keytool -import -v -trustcacerts -alias SecureServerCA -file COMODORSADomainValidationSecureServerCA.crt -keystore newkeystore.jks -storepass mypassword
So like the above, you can import your own certificate and use with the WSO2 servers. A guide on creating new keystores, importing certificating, etc can be found in here - https://docs.wso2.com/display/ADMIN44x/Creating+New+Keystores
A guide on how to change configurations with new keytore and truststore files is found in here - https://docs.wso2.com/display/AM260/Configuring+Keystores+in+WSO2+API+Manager