仇及矢□斥毛del.icio.us卞馨笛 仇及矢□斥毛反化卅皮永弁穴□弁卞馨笛仇及矢□斥毛殖戈反化卅皮永弁穴□弁 仇及矢□斥毛livedoor 弁伉永皿卞馨笛 仇及矢□斥毛Yahoo!皮永弁穴□弁卞馨笛仇及矢□斥毛殖戈Yahoo!皮永弁穴□弁
Top / Network / SSL / 輲弩陘恞篚

IBM及HTTPServer(IHS)匹反﹜SSL厭蹲卞反ikeyman午中丹萼DB毛棟咥允月凶戶及汁□伙毛迕中引允﹝匹﹜ikeyman匹綜嶽今木月萼DB反CMS溥摯(傀艦閡kdb)午中丹白央奶伙溥摯卅及匹允互﹜IHS匹SSL棕雁毛綜勻凶詨卞﹜失弁本仿伊□正支Apache卅升卞啖墊仄方丹午閤勻化手輲弩陘恞篚倇芊互坌井日內漱勻化引仄凶﹝

中欠中欠譬屯化心月午﹜keytool匹綜嶽仄凶輲弩陘娀xport - Security & Trust 丐凶曰卞樹扷互﹝ikeyman毛銀勻化kdb毛Java Key Store溥摯(JKS)卞帎抩忡繡仄﹜公木毛Java匹醜綜允木壬恌今公丹匹允﹝

峸木午仄化反﹜

  • ikeyman匹KDB毛JKS卞忡繡
  • Java皿伕弘仿丞匹JKS井日輲弩陘禰苭丰吤磥Ы篚
  • openssl及戊穴件玉匹Base64及氾平旦玄白央奶伙卞庍晶

匹匹五公丹匹允﹝

Java皿伕弘仿丞

動票及方丹卅皿伕弘仿丞匹﹜田奶瓜伉及輲弩陘珍篚苳リ迨牏飽

public class KeyGenerator {
  public static void main(String[] args) throws Exception {
    String alias = "hoge"; // 萼DBま及帎抩
    String keyStorePass = "fuga"; // 萼DB及由旦伐□玉
    String jksFile = "key.jks"; // 萼DB及白央奶伙抩
    KeyStore keyStore = KeyStore.getInstance("JKS");
    FileInputStream in = new FileInputStream(jksFile);
    keyStore.load(in, keyStorePass.toCharArray());
    Key key = keyStore.getKey(alias, keyStorePass.toCharArray());
    byte[] der = key.getEncoded(); // 田奶瓜伉及輲弩
    write(der); // 輲弩陘禰掍‘丰輮暐
  }

  public static void write(byte[] b) {
    BufferedOutputStream stream = null;
    try {
      File file = new File("key.der");
      FileOutputStream fstream = new FileOutputStream(file);
      stream = new BufferedOutputStream(fstream);
      stream.write(b);
    } catch (IOException e) {
      e.printStackTrace();
    } finally {
      if (stream != null) {
        try {
          stream.close();
        } catch (IOException e1) {
          e1.printStackTrace();
        }
      }
    }
  }
}

OpenSSL及戊穴件玉匹Base64卞庍晶允月

openssl pkcs8 -inform der -in key.der -outform pem -out key.pem -nocrypt

key.pem互鏟請今木引仄凶﹝撢端葦化心月午

-----BEGIN RSA PRIVATE KEY-----
hogehogehoge.....
-----END RSA PRIVATE KEY-----

割井卞輲弩陘珍篚苳リ迨牏楔縑

切卅心卞

./keytool.exe  -export -alias hoge -keystore key.jks  -rfc > hogehoge.cer
pass: fuga

匹據抸踏*1毛鏟請允月仇午互匹五引允﹝

楮洘伉件弁


仇及筏儀反

薊鎗餉 髑冱
云手仄欠井勻凶 3  
公丹匹手卅中 0  

仇及矢□斥毛del.icio.us卞馨笛 仇及矢□斥毛反化卅皮永弁穴□弁卞馨笛仇及矢□斥毛殖戈反化卅皮永弁穴□弁 仇及矢□斥毛livedoor 弁伉永皿卞馨笛 仇及矢□斥毛Yahoo!皮永弁穴□弁卞馨笛仇及矢□斥毛殖戈Yahoo!皮永弁穴□弁
Top / Network / SSL / 輲弩陘恞篚

蜇箕及失弁本旦:9378


*1 跤釩萼午﹜跤釩萼及甩永扑亙襖毛CA及輲弩陘ヶ饕瘝膜楔縣滮<-仇木互踢抩

玄永皿   彸螂 鑠瑛 犒坌 田永弁失永皿 驕尥 呁擠 抩蟆庍凳 伉伕□玉   蕙筋 域厖 簽賄腹綢 瘉蔽凳蕙   目伙皿   瘉蔽凳蕙及RSS
Last-modified: 2011-10-14 (嗯) 13:03:52 (1013d)