public final class DomainLoadStoreParameter extends Object implements KeyStore.LoadStoreParameter
KeyStore
load
和
store
操作过程中使用的。
支持配置数据的以下语法:
domain <domainName> [<property> ...] {
keystore <keystoreName> [<property> ...] ;
...
};
...
哪里
domainName
和
keystoreName
是标识符和
property
是一个键/值对。键和值是由一个“等于”符号分隔的,该值是用双引号括起来的。一个属性的值可以是字符串或一个冒号分隔的十六进制数字对二进制字符串。多值属性表示为一个逗号分隔的值列表,用方括号括起来。看到
Arrays.toString(java.lang.Object[])
。
确保密钥库条目是唯一标识,每个条目的别名是以其keystoreName
随后进入名称分隔每个keystoreName
必须在其领域是独一无二的。条目名称前缀略当存储密钥库。
性能:性能是上下文敏感应用到域中的所有库位于域的条款,和属性仅适用于特定的密钥库是位于keystore的条款。除非另有规定,在密钥库条款属性重写同名的属性域中的条款。所有的属性名称都是不区分大小写的。支持下列属性:
keystoreType="<type>"
keystoreURI="<url>"
keystoreProviderName="<name>"
keystorePasswordEnv="<environment-variable>"
Map<String, ProtectionParameter>
构造函数的方法。
entryNameSeparator="<separator>"
例如,一个简单的密钥存储区域包括三个密钥存储配置数据显示如下:
域App1 {密钥库App1信任库keystoreuri =“文件:/ / /型/ etc /信任库。张根硕”;该密钥系统keystoreuri =“$ { java。家} / lib /安全/ cacerts”;密钥库App1密钥库keystoretype =“12”keystoreuri =“文件:/ / /型/ etc /密钥库。P12”;};
Constructor and Description |
---|
DomainLoadStoreParameter(URI configuration, Map<String,KeyStore.ProtectionParameter> protectionParams)
构造了一个用于保护私钥的密钥数据参数域domainloadstoreparameter。
|
Modifier and Type | Method and Description |
---|---|
URI |
getConfiguration()
获取域配置数据的标识符。
|
KeyStore.ProtectionParameter |
getProtectionParameter()
获取此域密钥保护参数。
|
Map<String,KeyStore.ProtectionParameter> |
getProtectionParams()
获取此域中的密钥的私钥保护参数。
|
public DomainLoadStoreParameter(URI configuration, Map<String,KeyStore.ProtectionParameter> protectionParams)
configuration
-标识域配置数据。目标域中的名称应在
java.net.URI
片段部分指定时,有必要区分几个域之间的配置在同一地点。
protectionParams
从密钥库的名字用来保护密钥数据的参数图。一个
java.util.Collections.EMPTY_MAP
时应使用保护参数不要求或当他们已在域配置数据属性指定。它被克隆,以防止随后的修改。
NullPointerException
-如果
configuration
或
protectionParams
是
null
public URI getConfiguration()
public Map<String,KeyStore.ProtectionParameter> getProtectionParams()
public KeyStore.ProtectionParameter getProtectionParameter()
getProtectionParameter
接口
KeyStore.LoadStoreParameter
null
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.