Search in sources :

Example 11 with Tag

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

the class SignerInfo method encode.

@Override
public void encode(Tag tag, OutputStream ostream) throws IOException {
    SEQUENCE sequence = new SEQUENCE();
    sequence.addElement(version);
    sequence.addElement(signerIdentifier);
    sequence.addElement(digestAlgorithm);
    if (signedAttributes != null) {
        sequence.addElement(new Tag(0), signedAttributes);
    }
    sequence.addElement(digestEncryptionAlgorithm);
    sequence.addElement(encryptedDigest);
    if (unsignedAttributes != null) {
        sequence.addElement(new Tag(1), unsignedAttributes);
    }
    sequence.encode(tag, ostream);
}
Also used : SEQUENCE(org.mozilla.jss.asn1.SEQUENCE) Tag(org.mozilla.jss.asn1.Tag)

Example 12 with Tag

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

the class MacData method encode.

@Override
public void encode(Tag implicitTag, OutputStream ostream) throws IOException {
    SEQUENCE seq = new SEQUENCE();
    seq.addElement(mac);
    seq.addElement(macSalt);
    if (!macIterationCount.equals(new INTEGER(DEFAULT_ITERATIONS))) {
        // 1 is the default, only include this element if it is not
        // the default
        seq.addElement(macIterationCount);
    }
    seq.encode(implicitTag, ostream);
}
Also used : SEQUENCE(org.mozilla.jss.asn1.SEQUENCE) INTEGER(org.mozilla.jss.asn1.INTEGER)

Example 13 with Tag

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

the class CertRepContent method encode.

@Override
public void encode(Tag implicitTag, OutputStream ostream) throws IOException {
    SEQUENCE encoding = new SEQUENCE();
    // create sequence of certificates
    if (caPubs != null) {
        SEQUENCE certs = new SEQUENCE();
        for (int i = 0; i < caPubs.length; i++) {
            certs.addElement(new ANY(SEQUENCE.TAG, caPubs[i]));
        }
        encoding.addElement(new Tag(1), certs);
    }
    encoding.addElement(response);
    encoding.encode(implicitTag, ostream);
}
Also used : SEQUENCE(org.mozilla.jss.asn1.SEQUENCE) Tag(org.mozilla.jss.asn1.Tag) ANY(org.mozilla.jss.asn1.ANY)

Example 14 with Tag

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

the class ExtendedFailInfo method encode.

@Override
public void encode(Tag implicit, OutputStream ostream) throws IOException {
    SEQUENCE seq = new SEQUENCE();
    seq.addElement(failInfoOID);
    seq.addElement(failInfoValue);
    seq.encode(implicit, ostream);
}
Also used : SEQUENCE(org.mozilla.jss.asn1.SEQUENCE)

Example 15 with Tag

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

the class CertResponse method encode.

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

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