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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations