类 PemContent
java.lang.Object
cn.taketoday.core.ssl.pem.PemContent
Utility to load PEM content.
- 从以下版本开始:
- 4.0
- 作者:
- Scott Frederick, Phillip Webb, Harry Yang
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanParse and return allcertificatesfrom the PEM content.Parse and return theprivate keysfrom the PEM content.getPrivateKey(String password) Parse and return theprivate keysfrom the PEM content ornullif there is no private key.inthashCode()static booleanisPresentInText(String text) Return if PEM content is present in the given text.private static PemContentload(InputStream in) (专用程序包) static PemContentLoadPemContentfrom the given content (either the PEM content itself or a reference to the resource to load).private static PemContentstatic PemContentLoadPemContentfrom the givenPath.static PemContentReturn a newPemContentinstance containing the given text.toString()
-
字段详细资料
-
PEM_HEADER
-
PEM_FOOTER
-
text
-
-
构造器详细资料
-
PemContent
-
-
方法详细资料
-
getCertificates
Parse and return allcertificatesfrom the PEM content. Most PEM files either contain a single certificate or a certificate chain.- 返回:
- the certificates
- 抛出:
IllegalStateException- if no certificates could be loaded
-
getPrivateKey
Parse and return theprivate keysfrom the PEM content.- 返回:
- the private keys
- 抛出:
IllegalStateException- if no private key could be loaded
-
getPrivateKey
Parse and return theprivate keysfrom the PEM content ornullif there is no private key.- 参数:
password- the password to decrypt the private keys ornull- 返回:
- the private keys
-
equals
-
hashCode
public int hashCode() -
toString
-
load
LoadPemContentfrom the given content (either the PEM content itself or a reference to the resource to load).- 参数:
content- the content to load- 返回:
- a new
PemContentinstance - 抛出:
IOException- on IO error
-
load
LoadPemContentfrom the givenPath.- 参数:
path- a path to load the content from- 返回:
- the loaded PEM content
- 抛出:
IOException- on IO error
-
load
- 抛出:
IOException
-
load
- 抛出:
IOException
-
of
Return a newPemContentinstance containing the given text.- 参数:
text- the text containing PEM encoded content- 返回:
- a new
PemContentinstance
-
isPresentInText
Return if PEM content is present in the given text.- 参数:
text- the text to check- 返回:
- if the text includes PEM encoded content.
-