Example usage for org.bouncycastle.asn1.x500 X500Name toASN1Primitive

List of usage examples for org.bouncycastle.asn1.x500 X500Name toASN1Primitive

Introduction

In this page you can find the example usage for org.bouncycastle.asn1.x500 X500Name toASN1Primitive.

Prototype

public ASN1Primitive toASN1Primitive() 

Source Link

Usage

From source file:org.globus.gsi.bc.X509NameHelper.java

License:Apache License

/**
 * Creates an instance using existing {@link X500Name X500Name}
 * object.//from  w w w  . j  a va  2 s  . c om
 * This behaves like a copy constructor.
 *
 * @param name existing <code>X500Name</code>
 */
public X509NameHelper(X500Name name) {
    try {
        this.seq = (ASN1Sequence) BouncyCastleUtil.duplicate(name.toASN1Primitive());
    } catch (IOException e) {
        throw new RuntimeException(e.getMessage());
    }
}

From source file:org.jruby.ext.openssl.X509Name.java

License:LGPL

public static X509Name create(Ruby runtime, org.bouncycastle.asn1.x500.X500Name realName) {
    X509Name name = new X509Name(runtime, Utils.getClassFromPath(runtime, "OpenSSL::X509::Name"));
    name.fromASN1Sequence((ASN1Sequence) realName.toASN1Primitive());
    return name;/*from  w  w  w  .  j a  v a  2s  .c om*/
}