- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.bouncycastle.asn1.x509.X509Extension
类的一些代码示例,展示了X509Extension
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509Extension
类的具体详情如下:
包路径:org.bouncycastle.asn1.x509.X509Extension
类名称:X509Extension
[英]an object for the elements in the X.509 V3 extension block.
[中]X.509 V3扩展块中元素的对象。
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public ASN1Encodable getParsedValue()
{
return convertValueToObject(this);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public boolean equals(
Object o)
{
if (!(o instanceof X509Extension))
{
return false;
}
X509Extension other = (X509Extension)o;
return other.getValue().equals(this.getValue())
&& (other.isCritical() == this.isCritical());
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
/**
* Constructor which will take an extension
*
* @param extension a X509Extension object containing an AuthorityKeyIdentifier.
* @deprecated use constructor that takes Extension
*/
public AuthorityKeyIdentifierStructure(
X509Extension extension)
{
super((ASN1Sequence)extension.getParsedValue());
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
/**
* Add an extension with the given oid and the passed in byte array to be wrapped in the
* OCTET STRING associated with the extension.
*
* @param oid OID for the extension.
* @param critical true if critical, false otherwise.
* @param value the byte array to be wrapped.
*/
public void addExtension(
ASN1ObjectIdentifier oid,
boolean critical,
byte[] value)
{
if (extensions.containsKey(oid))
{
throw new IllegalArgumentException("extension " + oid + " already added");
}
extOrdering.addElement(oid);
extensions.put(oid, new X509Extension(critical, new DEROctetString(value)));
}
代码示例来源:origin: org.codeartisans.qipki/qipki-crypto
DERObjectIdentifier oid = ( DERObjectIdentifier ) e.nextElement();
X509Extension extension = requestedExtensions.getExtension( oid );
extractedExtensions.add( new X509ExtensionHolder( oid, extension.isCritical(), X509Extension.convertValueToObject( extension ) ) );
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
/**
* Convert the value of the passed in extension to an object
* @param ext the extension to parse
* @return the object the value string contains
* @exception IllegalArgumentException if conversion is not possible
*/
public static ASN1Primitive convertValueToObject(
X509Extension ext)
throws IllegalArgumentException
{
try
{
return ASN1Primitive.fromByteArray(ext.getValue().getOctets());
}
catch (IOException e)
{
throw new IllegalArgumentException("can't convert extension: " + e);
}
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
private ASN1ObjectIdentifier[] getExtensionOIDs(boolean isCritical)
{
Vector oidVec = new Vector();
for (int i = 0; i != ordering.size(); i++)
{
Object oid = ordering.elementAt(i);
if (((X509Extension)extensions.get(oid)).isCritical() == isCritical)
{
oidVec.addElement(oid);
}
}
return toOidArray(oidVec);
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Add an extension with the given oid and the passed in byte array to be wrapped in the
* OCTET STRING associated with the extension.
*
* @param oid OID for the extension.
* @param critical true if critical, false otherwise.
* @param value the byte array to be wrapped.
*/
public void addExtension(
ASN1ObjectIdentifier oid,
boolean critical,
byte[] value)
{
if (extensions.containsKey(oid))
{
throw new IllegalArgumentException("extension " + oid + " already added");
}
extOrdering.addElement(oid);
extensions.put(oid, new X509Extension(critical, new DEROctetString(value)));
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Convert the value of the passed in extension to an object
* @param ext the extension to parse
* @return the object the value string contains
* @exception IllegalArgumentException if conversion is not possible
*/
public static ASN1Primitive convertValueToObject(
X509Extension ext)
throws IllegalArgumentException
{
try
{
return ASN1Primitive.fromByteArray(ext.getValue().getOctets());
}
catch (IOException e)
{
throw new IllegalArgumentException("can't convert extension: " + e);
}
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
private ASN1ObjectIdentifier[] getExtensionOIDs(boolean isCritical)
{
Vector oidVec = new Vector();
for (int i = 0; i != ordering.size(); i++)
{
Object oid = ordering.elementAt(i);
if (((X509Extension)extensions.get(oid)).isCritical() == isCritical)
{
oidVec.addElement(oid);
}
}
return toOidArray(oidVec);
}
代码示例来源:origin: redfish64/TinyTravelTracker
public boolean equals(
Object o)
{
if (!(o instanceof X509Extension))
{
return false;
}
X509Extension other = (X509Extension)o;
return other.getValue().equals(this.getValue())
&& (other.isCritical() == this.isCritical());
}
代码示例来源:origin: org.codeartisans.qipki/qipki-crypto
@SuppressWarnings( { "UseOfObsoleteCollectionType", "unchecked" } )
private DERSet generateSANAttribute( GeneralNames subGeneralNames )
{
if ( subGeneralNames == null ) {
return new DERSet();
}
Vector oids = new Vector();
Vector values = new Vector();
oids.add( X509Extensions.SubjectAlternativeName );
values.add( new X509Extension( false, new DEROctetString( subGeneralNames ) ) );
X509Extensions extensions = new X509Extensions( oids, values );
Attribute attribute = new Attribute( PKCSObjectIdentifiers.pkcs_9_at_extensionRequest, new DERSet( extensions ) );
return new DERSet( attribute );
}
代码示例来源:origin: redfish64/TinyTravelTracker
public ASN1Encodable getParsedValue()
{
return convertValueToObject(this);
}
代码示例来源:origin: open-eid/digidoc4j
ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)o;
X509Extension extVal = ext.getExtension(oid);
ASN1OctetString oct = extVal.getValue();
ASN1InputStream extIn = new ASN1InputStream(new ByteArrayInputStream(oct.getOctets()));
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public int hashCode()
{
if (this.isCritical())
{
return this.getValue().hashCode();
}
return ~this.getValue().hashCode();
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
/**
* Constructor from ASN1Sequence.
*
* the extensions are a list of constructed sequences, either with (OID, OctetString) or (OID, Boolean, OctetString)
*/
public X509Extensions(
ASN1Sequence seq)
{
Enumeration e = seq.getObjects();
while (e.hasMoreElements())
{
ASN1Sequence s = ASN1Sequence.getInstance(e.nextElement());
if (s.size() == 3)
{
extensions.put(s.getObjectAt(0), new X509Extension(ASN1Boolean.getInstance(s.getObjectAt(1)), ASN1OctetString.getInstance(s.getObjectAt(2))));
}
else if (s.size() == 2)
{
extensions.put(s.getObjectAt(0), new X509Extension(false, ASN1OctetString.getInstance(s.getObjectAt(1))));
}
else
{
throw new IllegalArgumentException("Bad sequence size: " + s.size());
}
ordering.addElement(s.getObjectAt(0));
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
public static BasicConstraints getInstance(
Object obj)
{
if (obj instanceof BasicConstraints)
{
return (BasicConstraints)obj;
}
if (obj instanceof X509Extension)
{
return getInstance(X509Extension.convertValueToObject((X509Extension)obj));
}
if (obj != null)
{
return new BasicConstraints(ASN1Sequence.getInstance(obj));
}
return null;
}
代码示例来源:origin: redfish64/TinyTravelTracker
public int hashCode()
{
if (this.isCritical())
{
return this.getValue().hashCode();
}
return ~this.getValue().hashCode();
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Constructor from ASN1Sequence.
*
* the extensions are a list of constructed sequences, either with (OID, OctetString) or (OID, Boolean, OctetString)
*/
public X509Extensions(
ASN1Sequence seq)
{
Enumeration e = seq.getObjects();
while (e.hasMoreElements())
{
ASN1Sequence s = ASN1Sequence.getInstance(e.nextElement());
if (s.size() == 3)
{
extensions.put(s.getObjectAt(0), new X509Extension(ASN1Boolean.getInstance(s.getObjectAt(1)), ASN1OctetString.getInstance(s.getObjectAt(2))));
}
else if (s.size() == 2)
{
extensions.put(s.getObjectAt(0), new X509Extension(false, ASN1OctetString.getInstance(s.getObjectAt(1))));
}
else
{
throw new IllegalArgumentException("Bad sequence size: " + s.size());
}
ordering.addElement(s.getObjectAt(0));
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public static BasicConstraints getInstance(
Object obj)
{
if (obj instanceof BasicConstraints)
{
return (BasicConstraints)obj;
}
if (obj instanceof X509Extension)
{
return getInstance(X509Extension.convertValueToObject((X509Extension)obj));
}
if (obj != null)
{
return new BasicConstraints(ASN1Sequence.getInstance(obj));
}
return null;
}
问题故障解决记录 -- Java RMI Connection refused to host: x.x.x.x .... 在学习JavaRMI时,我遇到了以下情况 问题原因:可
我正在玩 Rank-N-type 并尝试输入 x x .但我发现这两个函数可以以相同的方式输入,这很不直观。 f :: (forall a b. a -> b) -> c f x = x x g ::
这个问题已经有答案了: How do you compare two version Strings in Java? (31 个回答) 已关闭 8 年前。 有谁知道如何在Java中比较两个版本字符串
这个问题已经有答案了: How do the post increment (i++) and pre increment (++i) operators work in Java? (14 个回答)
下面是带有 -n 和 -r 选项的 netstat 命令的输出,其中目标字段显示压缩地址 (127.1/16)。我想知道 netstat 命令是否有任何方法或选项可以显示整个目标 IP (127.1.
我知道要证明 : (¬ ∀ x, p x) → (∃ x, ¬ p x) 证明是: theorem : (¬ ∀ x, p x) → (∃ x, ¬ p x) := begin intro n
x * x 如何通过将其存储在“auto 变量”中来更改?我认为它应该仍然是相同的,并且我的测试表明类型、大小和值显然都是相同的。 但即使 x * x == (xx = x * x) 也是错误的。什么
假设,我们这样表达: someIQueryable.Where(x => x.SomeBoolProperty) someIQueryable.Where(x => !x.SomeBoolProper
我有一个字符串 1234X5678 我使用这个正则表达式来匹配模式 .X|..X|X. 我得到了 34X 问题是为什么我没有得到 4X 或 X5? 为什么正则表达式选择执行第二种模式? 最佳答案 这里
我的一个 friend 在面试时遇到了这个问题 找到使该函数返回真值的 x 值 function f(x) { return (x++ !== x) && (x++ === x); } 面试官
这个问题在这里已经有了答案: 10年前关闭。 Possible Duplicate: Isn't it easier to work with foo when it is represented b
我是 android 的新手,我一直在练习开发一个针对 2.2 版本的应用程序,我需要帮助了解如何将我的应用程序扩展到其他版本,即 1.x、2.3.x、3 .x 和 4.x.x,以及一些针对屏幕分辨率
为什么案例 1 给我们 :error: TypeError: x is undefined on line... //case 1 var x; x.push(x); console.log(x);
代码优先: # CASE 01 def test1(x): x += x print x l = [100] test1(l) print l CASE01 输出: [100, 100
我正在努力温习我的大计算。如果我有将所有项目移至 'i' 2 个空格右侧的函数,我有一个如下所示的公式: (n -1) + (n - 2) + (n - 3) ... (n - n) 第一次迭代我必须
给定 IP 字符串(如 x.x.x.x/x),我如何或将如何计算 IP 的范围最常见的情况可能是 198.162.1.1/24但可以是任何东西,因为法律允许的任何东西。 我要带198.162.1.1/
在我作为初学者努力编写干净的 Javascript 代码时,我最近阅读了 this article当我偶然发现这一段时,关于 JavaScript 中的命名空间: The code at the ve
我正在编写一个脚本,我希望避免污染 DOM 的其余部分,它将是一个用于收集一些基本访问者分析数据的第 3 方脚本。 我通常使用以下内容创建一个伪“命名空间”: var x = x || {}; 我正在
我尝试运行我的test_container_services.py套件,但遇到了以下问题: docker.errors.APIError:500服务器错误:内部服务器错误(“ b'{” message
是否存在这两个 if 语句会产生不同结果的情况? if(x as X != null) { // Do something } if(x is X) { // Do something } 编
我是一名优秀的程序员,十分优秀!