gpt4 book ai didi

org.wildfly.security.x500.X500AttributeTypeAndValue类的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 22:26:40 28 4
gpt4 key购买 nike

本文整理了Java中org.wildfly.security.x500.X500AttributeTypeAndValue类的一些代码示例,展示了X500AttributeTypeAndValue类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X500AttributeTypeAndValue类的具体详情如下:
包路径:org.wildfly.security.x500.X500AttributeTypeAndValue
类名称:X500AttributeTypeAndValue

X500AttributeTypeAndValue介绍

[英]An X.500 directory attribute, which is comprised of an attribute type OID and a single values, whose type is defined by the attribute type.
[中]X.500目录属性,由属性类型OID和单个值组成,其类型由属性类型定义。

代码示例

代码示例来源:origin: wildfly/wildfly

/**
 * Construct a new instance with an OID value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param oid the OID (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue createObjectId(final String attributeType, String oid) {
  return create(attributeType, ASN1Encodable.ofOid(oid));
}

代码示例来源:origin: wildfly/wildfly

public void encodeTo(final ASN1Encoder encoder) {
    encoder.encodeImplicit(1);
    encoder.startSet();
    for (X500AttributeTypeAndValue attribute : attributes) {
      attribute.encodeTo(encoder);
    }
    encoder.endSet();
  }
}

代码示例来源:origin: wildfly/wildfly

/**
 * Construct a new instance with the given value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param value the single value (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue create(final String attributeType, ASN1Encodable value) {
  Assert.checkNotNullParam("attributeType", attributeType);
  Assert.checkNotNullParam("value", value);
  return new X500AttributeTypeAndValue(attributeType, value);
}

代码示例来源:origin: wildfly/wildfly

/**
 * Construct a new instance with a UTF-8 value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param stringValue the string value (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue createUtf8(final String attributeType, String stringValue) {
  Assert.checkNotNullParam("stringValue", stringValue);
  return create(attributeType, ASN1Encodable.ofUtf8String(stringValue));
}

代码示例来源:origin: wildfly/wildfly

/**
   * Build the principal.  On return (with any outcome), this builder is re-set for building a new principal.
   *
   * @return the constructed principal (not {@code null})
   * @throws IllegalArgumentException if the principal is somehow invalid
   */
  public X500Principal build() throws IllegalArgumentException {
    final DEREncoder derEncoder = new DEREncoder();
    derEncoder.startSequence();
    for (Collection<X500AttributeTypeAndValue> itemSet : items) {
      derEncoder.startSet();
      for (X500AttributeTypeAndValue item : itemSet) {
        item.encodeTo(derEncoder);
      }
      derEncoder.endSet();
    }
    derEncoder.endSequence();
    return new X500Principal(derEncoder.getEncoded());
  }
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron-x500

/**
 * Construct a new instance with the given value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param value the single value (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue create(final String attributeType, ASN1Encodable value) {
  Assert.checkNotNullParam("attributeType", attributeType);
  Assert.checkNotNullParam("value", value);
  return new X500AttributeTypeAndValue(attributeType, value);
}

代码示例来源:origin: wildfly/wildfly

principalBuilder.addItem(X500AttributeTypeAndValue.create(X500.OID_AT_COMMON_NAME, ASN1Encodable.ofUtf8String(ACCOUNT_KEY_NAME)));
dn = principalBuilder.build();

代码示例来源:origin: org.wildfly.security/wildfly-elytron

public void encodeTo(final ASN1Encoder encoder) {
    encoder.encodeImplicit(1);
    encoder.startSet();
    for (X500AttributeTypeAndValue attribute : attributes) {
      attribute.encodeTo(encoder);
    }
    encoder.endSet();
  }
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

/**
 * Construct a new instance with the given value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param value the single value (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue create(final String attributeType, ASN1Encodable value) {
  Assert.checkNotNullParam("attributeType", attributeType);
  Assert.checkNotNullParam("value", value);
  return new X500AttributeTypeAndValue(attributeType, value);
}

代码示例来源:origin: wildfly/wildfly

principalBuilder.addItem(X500AttributeTypeAndValue.create(X500.OID_AT_COMMON_NAME, ASN1Encodable.ofUtf8String(((GeneralName.DNSName) generalNames.get(0)).getName())));
X500Principal dn = principalBuilder.build();
if (keyAlgorithmName == null) {

代码示例来源:origin: org.wildfly.security/wildfly-elytron-x500-cert

public void encodeTo(final ASN1Encoder encoder) {
    encoder.encodeImplicit(1);
    encoder.startSet();
    for (X500AttributeTypeAndValue attribute : attributes) {
      attribute.encodeTo(encoder);
    }
    encoder.endSet();
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Construct a new instance with the given value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param value the single value (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue create(final String attributeType, ASN1Encodable value) {
  Assert.checkNotNullParam("attributeType", attributeType);
  Assert.checkNotNullParam("value", value);
  return new X500AttributeTypeAndValue(attributeType, value);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Construct a new instance with an OID value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param oid the OID (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue createObjectId(final String attributeType, String oid) {
  return create(attributeType, ASN1Encodable.ofOid(oid));
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void encodeTo(final ASN1Encoder encoder) {
    encoder.encodeImplicit(1);
    encoder.startSet();
    for (X500AttributeTypeAndValue attribute : attributes) {
      attribute.encodeTo(encoder);
    }
    encoder.endSet();
  }
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron-x500

/**
 * Construct a new instance with an OID value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param oid the OID (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue createObjectId(final String attributeType, String oid) {
  return create(attributeType, ASN1Encodable.ofOid(oid));
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

/**
   * Build the principal.  On return (with any outcome), this builder is re-set for building a new principal.
   *
   * @return the constructed principal (not {@code null})
   * @throws IllegalArgumentException if the principal is somehow invalid
   */
  public X500Principal build() throws IllegalArgumentException {
    final DEREncoder derEncoder = new DEREncoder();
    derEncoder.startSequence();
    for (Collection<X500AttributeTypeAndValue> itemSet : items) {
      derEncoder.startSet();
      for (X500AttributeTypeAndValue item : itemSet) {
        item.encodeTo(derEncoder);
      }
      derEncoder.endSet();
    }
    derEncoder.endSequence();
    return new X500Principal(derEncoder.getEncoded());
  }
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

/**
 * Construct a new instance with an OID value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param oid the OID (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue createObjectId(final String attributeType, String oid) {
  return create(attributeType, ASN1Encodable.ofOid(oid));
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
   * Build the principal.  On return (with any outcome), this builder is re-set for building a new principal.
   *
   * @return the constructed principal (not {@code null})
   * @throws IllegalArgumentException if the principal is somehow invalid
   */
  public X500Principal build() throws IllegalArgumentException {
    final DEREncoder derEncoder = new DEREncoder();
    derEncoder.startSequence();
    for (Collection<X500AttributeTypeAndValue> itemSet : items) {
      derEncoder.startSet();
      for (X500AttributeTypeAndValue item : itemSet) {
        item.encodeTo(derEncoder);
      }
      derEncoder.endSet();
    }
    derEncoder.endSequence();
    return new X500Principal(derEncoder.getEncoded());
  }
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron-x500

/**
 * Construct a new instance with a UTF-8 value.
 *
 * @param attributeType the attribute type OID (must not be {@code null})
 * @param stringValue the string value (must not be {@code null})
 * @return the directory attribute
 */
public static X500AttributeTypeAndValue createUtf8(final String attributeType, String stringValue) {
  Assert.checkNotNullParam("stringValue", stringValue);
  return create(attributeType, ASN1Encodable.ofUtf8String(stringValue));
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron-x500

/**
   * Build the principal.  On return (with any outcome), this builder is re-set for building a new principal.
   *
   * @return the constructed principal (not {@code null})
   * @throws IllegalArgumentException if the principal is somehow invalid
   */
  public X500Principal build() throws IllegalArgumentException {
    final DEREncoder derEncoder = new DEREncoder();
    derEncoder.startSequence();
    for (Collection<X500AttributeTypeAndValue> itemSet : items) {
      derEncoder.startSet();
      for (X500AttributeTypeAndValue item : itemSet) {
        item.encodeTo(derEncoder);
      }
      derEncoder.endSet();
    }
    derEncoder.endSequence();
    return new X500Principal(derEncoder.getEncoded());
  }
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com