Skip to content

Instantly share code, notes, and snippets.

View tharikaGitHub's full-sized avatar

Tharika Madurapperuma tharikaGitHub

View GitHub Profile
/*
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
#!/bin/bash
echo " "
echo "Password encryption started .. !"
export WSO2_SERVER_HOME="/home/user/wso2am-2.6.0"
cp -RL data/* $WSO2_SERVER_HOME/
sleep 2
rm -rf data/*
PRODUCT_HOME=${WSO2_SERVER_HOME}
CRYPTO_TOOL_HOME="$PRODUCT_HOME/bin/crypto-tool"
USERSTORE_FILE="$PRODUCT_HOME/repository/deployment/server/userstores/xyz_com.xml"
keytool -import -alias wso2carbon1 -file wso2carbon.cer -keystore client-truststore.jks -storepass wso2carbon
keytool -export -keystore wso2carbon.jks -alias wso2carbon -file wso2carbon.cer