java SunX509 的用途是什么,它可以与使用 IbmX509 的各方一起使用吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10073202/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 23:29:24  来源:igfitidea点击:

What is SunX509 used for and can it work with parties using IbmX509?

javassl-certificatejsse

提问by daramasala

When I manually create a KeyManager, one of the steps is this:

当我手动创建 a 时KeyManager,其中一个步骤是:

KeyManagerFactory.getInstance("SunX509")

This does not work on IBM jre where I need to specify "IbmX509".
My questions:

这不适用于我需要指定“IbmX509”的 IBM jre。
我的问题:

  1. I read that this is called the "certificate encoding algorithm". What does that mean? When is it used?
  2. What happens when the client is using the IBM algorithm and the server is using the Sun algorithm?
  1. 我读到这称为“证书编码算法”。这意味着什么?什么时候使用?
  2. 当客户端使用 IBM 算法而服务器使用 Sun 算法时会发生什么?

Thanks,
Doron

谢谢,
多伦

回答by user207421

I read that this is called the "certificate encoding algorithm".

我读到这称为“证书编码算法”。

No it isn't. It is a key manager algorithm that defines both a provider and a content type, in this case "Sun" or "IBM" and X.509. Basically it is a keystore type.

不,不是。它是一种密钥管理器算法,用于定义提供者和内容类型,在本例中为“Sun”或“IBM”和 X.509。基本上它是一种密钥库类型。

Anyway the best solution is not to use either. Just use

无论如何,最好的解决方案是不要使用。只需使用

KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());

The KeyManagerand KeyManagerFactoryjust deal with the local keystore/truststore. The peer doesn't care about that, only about the certificates that are in them, and that only indirectly.

KeyManagerKeyManagerFactory刚刚处理本地密钥库/信任。对等方不关心这个,只关心其中的证书,而且只是间接的。