code: @Override
      public void addCertificateToKeyStore(String keyStoreName, String alias, Certificate certificate) throws KeyStoreException, CertificateException {
          try {
              WSKeyStore wks = ksMgr.getKeyStore(keyStoreName);
              if (wks == null) {
                  throw new KeyStoreException("The keystore [" + keyStoreName + "] is not present in the configuration");
              } else {
                  wks.setCertificateEntry(alias, certificate);
                  wks.store();
              }
          } catch (CertificateException e) {
              throw e;
          } catch (KeyStoreException e) {
              throw e;
          } catch (Exception e) {
              throw new KeyStoreException("Unexpected error while adding the Certificate for alias [" + alias + "] to keystore: " + keyStoreName, e);
          }
      }
docs: {@inheritDoc}