zoukankan      html  css  js  c++  java
  • Generate BKS File( Bouncy Castle KeyStore)

    echo "Enter BKS output file name : c"
    read filename
    
    echo "Enter BKS Password : c"
    read BKSPWD
    
    echo "Enter P12 or PFX file : c"
    read p12File
    
    if [ ! -f $p12File ]
    then
      echo "$p12File file is missing"
      exit 2
    fi
    
    echo "Enter P12 or PFX password : c"
    read p12FilePWD
    
    
    
    
    if [ -f "bcprov-jdk15on-152.jar" ]
    then
      
      echo "Please wait ...."
      
      keytool -importkeystore -destkeystore $filename.bks -deststoretype BKS -providerpath "bcprov-jdk15on-152.jar" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -deststorepass $BKSPWD -srcstorepass $p12FilePWD -srckeystore $p12File -srcstoretype pkcs12
    
    
      echo "Pleaes copy the following base64 
    
    "
      openssl base64 -in $filename.bks -out b64.txt && cat b64.txt
      rm b64.txt
      
    else
      echo "bcprov-jdk15on-152.jar is missing"
    fi
  • 相关阅读:
    noi.ac NOI挑战营模拟赛1-5
    TJOI2015 弦论
    CQOI2018 破解D-H协议
    NOI2013 矩阵游戏
    NOI2015 荷马史诗
    NOI2015 寿司晚宴
    SDOI2014 重建
    NOI1999 生日蛋糕
    NOI2015 程序自动分析
    ZJOI2008 泡泡堂
  • 原文地址:https://www.cnblogs.com/frankyou/p/9036787.html
Copyright © 2011-2022 走看看