Search in sources :

Example 6 with Tag

use of org.mozilla.jss.asn1.Tag in project jss by dogtagpki.

the class Extension method encode.

@Override
public void encode(Tag implicit, OutputStream ostream) throws IOException {
    SEQUENCE seq = new SEQUENCE();
    seq.addElement(extnId);
    if (critical == true) {
        // false is default, so we only code true
        seq.addElement(new BOOLEAN(true));
    }
    seq.addElement(extnValue);
    seq.encode(implicit, ostream);
}
Also used : SEQUENCE(org.mozilla.jss.asn1.SEQUENCE) BOOLEAN(org.mozilla.jss.asn1.BOOLEAN)

Example 7 with Tag

use of org.mozilla.jss.asn1.Tag in project jss by dogtagpki.

the class CMCStatusInfo method encode.

@Override
public void encode(Tag implicitTag, OutputStream ostream) throws IOException {
    SEQUENCE seq = new SEQUENCE();
    seq.addElement(status);
    seq.addElement(bodyList);
    if (statusString != null) {
        seq.addElement(statusString);
    }
    if (otherInfo != null) {
        seq.addElement(otherInfo);
    }
    seq.encode(implicitTag, ostream);
}
Also used : SEQUENCE(org.mozilla.jss.asn1.SEQUENCE)

Example 8 with Tag

use of org.mozilla.jss.asn1.Tag in project jss by dogtagpki.

the class CertificateInfo method encode.

@Override
public void encode(Tag implicitTag, OutputStream ostream) throws IOException {
    SEQUENCE seq = new SEQUENCE();
    if (version != v1) {
        // v1 is the default
        seq.addElement(new EXPLICIT(new Tag(0), new INTEGER(version.getNumber())));
    }
    seq.addElement(serialNumber);
    seq.addElement(signatureAlgId);
    seq.addElement(issuer);
    SEQUENCE validity = new SEQUENCE();
    validity.addElement(encodeValidityDate(notBefore));
    validity.addElement(encodeValidityDate(notAfter));
    seq.addElement(validity);
    seq.addElement(subject);
    seq.addElement(subjectPublicKeyInfo);
    if (issuerUniqueIdentifier != null) {
        seq.addElement(new Tag(1), issuerUniqueIdentifier);
    }
    if (subjectUniqueIdentifier != null) {
        seq.addElement(new Tag(2), subjectUniqueIdentifier);
    }
    if (extensions.size() > 0) {
        seq.addElement(new EXPLICIT(new Tag(3), extensions));
    }
    seq.encode(implicitTag, ostream);
}
Also used : SEQUENCE(org.mozilla.jss.asn1.SEQUENCE) Tag(org.mozilla.jss.asn1.Tag) EXPLICIT(org.mozilla.jss.asn1.EXPLICIT) INTEGER(org.mozilla.jss.asn1.INTEGER)

Example 9 with Tag

use of org.mozilla.jss.asn1.Tag in project jss by dogtagpki.

the class PFX method encode.

@Override
public void encode(Tag implicitTag, OutputStream ostream) throws IOException {
    SEQUENCE seq = new SEQUENCE();
    seq.addElement(version);
    seq.addElement(new ContentInfo(ASN1Util.encode(authSafes)));
    if (macData != null) {
        seq.addElement(macData);
    }
    seq.encode(implicitTag, ostream);
}
Also used : ContentInfo(org.mozilla.jss.pkcs7.ContentInfo) SEQUENCE(org.mozilla.jss.asn1.SEQUENCE)

Example 10 with Tag

use of org.mozilla.jss.asn1.Tag in project jss by dogtagpki.

the class SafeBag method encode.

@Override
public void encode(Tag implicitTag, OutputStream ostream) throws IOException {
    SEQUENCE seq = new SEQUENCE();
    seq.addElement(bagType);
    seq.addElement(new EXPLICIT(new Tag(0), bagContent));
    if (bagAttributes != null) {
        seq.addElement(bagAttributes);
    }
    seq.encode(implicitTag, ostream);
}
Also used : SEQUENCE(org.mozilla.jss.asn1.SEQUENCE) Tag(org.mozilla.jss.asn1.Tag) EXPLICIT(org.mozilla.jss.asn1.EXPLICIT)

Aggregations

Tag (org.openstreetmap.osmosis.core.domain.v0_6.Tag)66 SEQUENCE (org.mozilla.jss.asn1.SEQUENCE)23 CommonEntityData (org.openstreetmap.osmosis.core.domain.v0_6.CommonEntityData)23 WayNode (org.openstreetmap.osmosis.core.domain.v0_6.WayNode)17 IOException (java.io.IOException)16 Test (org.junit.Test)16 Node (org.openstreetmap.osmosis.core.domain.v0_6.Node)16 OsmUser (org.openstreetmap.osmosis.core.domain.v0_6.OsmUser)16 Way (org.openstreetmap.osmosis.core.domain.v0_6.Way)12 Date (java.util.Date)10 RelationMember (org.openstreetmap.osmosis.core.domain.v0_6.RelationMember)10 OsmosisRuntimeException (org.openstreetmap.osmosis.core.OsmosisRuntimeException)9 Relation (org.openstreetmap.osmosis.core.domain.v0_6.Relation)9 Tag (org.mozilla.jss.asn1.Tag)7 SQLException (java.sql.SQLException)6 ArrayList (java.util.ArrayList)6 EXPLICIT (org.mozilla.jss.asn1.EXPLICIT)6 Osmformat (crosby.binary.Osmformat)5 NodeContainer (org.openstreetmap.osmosis.core.container.v0_6.NodeContainer)5 Point (com.vividsolutions.jts.geom.Point)4