diff --git a/libs/lpad-sm-dp-plus-connector/build.gradle b/libs/lpad-sm-dp-plus-connector/build.gradle index 0ce728f..3314139 100644 --- a/libs/lpad-sm-dp-plus-connector/build.gradle +++ b/libs/lpad-sm-dp-plus-connector/build.gradle @@ -15,11 +15,11 @@ dependencies { testImplementation 'com.github.tomakehurst:wiremock:2.17.0' } -sourceSets.main.java.srcDirs = ['build/generated-sources/asn1','src/main/java'] +sourceSets.main.java.srcDirs = ['src/generated/asn1','src/main/java'] task genAsn1(type: JavaExec) { mainClass = 'com.beanit.asn1bean.compiler.Compiler' - args "-o", "$projectDir/build/generated-sources/asn1", "-p", "com.truphone.rsp.dto.asn1", "-f", "$projectDir/src/main/resources/PKIXExplicit88.asn", "$projectDir/src/main/resources/PKIXImplicit88.asn", "$projectDir/src/main/resources/rsp.asn" + args "-o", "$projectDir/src/generated/asn1", "-p", "com.truphone.rsp.dto.asn1", "-f", "$projectDir/src/main/resources/PKIXExplicit88.asn", "$projectDir/src/main/resources/PKIXImplicit88.asn", "$projectDir/src/main/resources/rsp.asn" classpath configurations.tool } diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AdministrationDomainName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AdministrationDomainName.java new file mode 100644 index 0000000..b4fb579 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AdministrationDomainName.java @@ -0,0 +1,153 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class AdministrationDomainName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 2); + + private BerNumericString numeric = null; + private BerPrintableString printable = null; + + public AdministrationDomainName() { + } + + public AdministrationDomainName(byte[] code) { + this.code = code; + } + + public void setNumeric(BerNumericString numeric) { + this.numeric = numeric; + } + + public BerNumericString getNumeric() { + return numeric; + } + + public void setPrintable(BerPrintableString printable) { + this.printable = printable; + } + + public BerPrintableString getPrintable() { + return printable; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (printable != null) { + codeLength += printable.encode(reverseOS, true); + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (numeric != null) { + codeLength += numeric.encode(reverseOS, true); + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerNumericString.tag)) { + numeric = new BerNumericString(); + tlvByteCount += numeric.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printable = new BerPrintableString(); + tlvByteCount += printable.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (numeric != null) { + sb.append("numeric: ").append(numeric); + return; + } + + if (printable != null) { + sb.append("printable: ").append(printable); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AlgorithmIdentifier.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AlgorithmIdentifier.java new file mode 100644 index 0000000..4da3dde --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AlgorithmIdentifier.java @@ -0,0 +1,184 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class AlgorithmIdentifier implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerObjectIdentifier algorithm = null; + private BerAny parameters = null; + + public AlgorithmIdentifier() { + } + + public AlgorithmIdentifier(byte[] code) { + this.code = code; + } + + public void setAlgorithm(BerObjectIdentifier algorithm) { + this.algorithm = algorithm; + } + + public BerObjectIdentifier getAlgorithm() { + return algorithm; + } + + public void setParameters(BerAny parameters) { + this.parameters = parameters; + } + + public BerAny getParameters() { + return parameters; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (parameters != null) { + codeLength += parameters.encode(reverseOS); + } + + codeLength += algorithm.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerObjectIdentifier.tag)) { + algorithm = new BerObjectIdentifier(); + vByteCount += algorithm.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + parameters = new BerAny(); + numDecodedBytes = parameters.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + parameters = null; + } + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (algorithm != null) { + sb.append("algorithm: ").append(algorithm); + } + else { + sb.append("algorithm: "); + } + + if (parameters != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("parameters: ").append(parameters); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Attribute.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Attribute.java new file mode 100644 index 0000000..1a2f638 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Attribute.java @@ -0,0 +1,317 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class Attribute implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class Values implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17); + private byte[] code = null; + private List seqOf = null; + + public Values() { + seqOf = new ArrayList<>(); + } + + public Values(byte[] code) { + this.code = code; + } + + public List getAttributeValue() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + AttributeValue element = new AttributeValue(); + numDecodedBytes = element.decode(is, berTag); + if (numDecodedBytes == 0) { + throw new IOException("Tag did not match"); + } + vByteCount += numDecodedBytes; + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private AttributeType type = null; + private Values values = null; + + public Attribute() { + } + + public Attribute(byte[] code) { + this.code = code; + } + + public void setType(AttributeType type) { + this.type = type; + } + + public AttributeType getType() { + return type; + } + + public void setValues(Values values) { + this.values = values; + } + + public Values getValues() { + return values; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += values.encode(reverseOS, true); + + codeLength += type.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(AttributeType.tag)) { + type = new AttributeType(); + vByteCount += type.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Values.tag)) { + values = new Values(); + vByteCount += values.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (type != null) { + sb.append("type: ").append(type); + } + else { + sb.append("type: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (values != null) { + sb.append("values: "); + values.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("values: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AttributeType.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AttributeType.java new file mode 100644 index 0000000..9212b0e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AttributeType.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class AttributeType extends BerObjectIdentifier { + + private static final long serialVersionUID = 1L; + + public AttributeType() { + } + + public AttributeType(byte[] code) { + super(code); + } + + public AttributeType(int[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AttributeTypeAndValue.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AttributeTypeAndValue.java new file mode 100644 index 0000000..19cae35 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AttributeTypeAndValue.java @@ -0,0 +1,182 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class AttributeTypeAndValue implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private AttributeType type = null; + private AttributeValue value = null; + + public AttributeTypeAndValue() { + } + + public AttributeTypeAndValue(byte[] code) { + this.code = code; + } + + public void setType(AttributeType type) { + this.type = type; + } + + public AttributeType getType() { + return type; + } + + public void setValue(AttributeValue value) { + this.value = value; + } + + public AttributeValue getValue() { + return value; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += value.encode(reverseOS); + + codeLength += type.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(AttributeType.tag)) { + type = new AttributeType(); + vByteCount += type.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + value = new AttributeValue(); + numDecodedBytes = value.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (type != null) { + sb.append("type: ").append(type); + } + else { + sb.append("type: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (value != null) { + sb.append("value: ").append(value); + } + else { + sb.append("value: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AttributeValue.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AttributeValue.java new file mode 100644 index 0000000..e67ab52 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/AttributeValue.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class AttributeValue extends BerAny { + + private static final long serialVersionUID = 1L; + + public AttributeValue() { + } + + public AttributeValue(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/BuiltInDomainDefinedAttribute.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/BuiltInDomainDefinedAttribute.java new file mode 100644 index 0000000..575d942 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/BuiltInDomainDefinedAttribute.java @@ -0,0 +1,181 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class BuiltInDomainDefinedAttribute implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerPrintableString type = null; + private BerPrintableString value = null; + + public BuiltInDomainDefinedAttribute() { + } + + public BuiltInDomainDefinedAttribute(byte[] code) { + this.code = code; + } + + public void setType(BerPrintableString type) { + this.type = type; + } + + public BerPrintableString getType() { + return type; + } + + public void setValue(BerPrintableString value) { + this.value = value; + } + + public BerPrintableString getValue() { + return value; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += value.encode(reverseOS, true); + + codeLength += type.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerPrintableString.tag)) { + type = new BerPrintableString(); + vByteCount += type.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerPrintableString.tag)) { + value = new BerPrintableString(); + vByteCount += value.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (type != null) { + sb.append("type: ").append(type); + } + else { + sb.append("type: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (value != null) { + sb.append("value: ").append(value); + } + else { + sb.append("value: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/BuiltInDomainDefinedAttributes.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/BuiltInDomainDefinedAttributes.java new file mode 100644 index 0000000..58bac0e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/BuiltInDomainDefinedAttributes.java @@ -0,0 +1,155 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class BuiltInDomainDefinedAttributes implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public BuiltInDomainDefinedAttributes() { + seqOf = new ArrayList<>(); + } + + public BuiltInDomainDefinedAttributes(byte[] code) { + this.code = code; + } + + public List getBuiltInDomainDefinedAttribute() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(BuiltInDomainDefinedAttribute.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + BuiltInDomainDefinedAttribute element = new BuiltInDomainDefinedAttribute(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/BuiltInStandardAttributes.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/BuiltInStandardAttributes.java new file mode 100644 index 0000000..1ca9cd2 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/BuiltInStandardAttributes.java @@ -0,0 +1,446 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class BuiltInStandardAttributes implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private CountryName countryName = null; + private AdministrationDomainName administrationDomainName = null; + private NetworkAddress networkAddress = null; + private TerminalIdentifier terminalIdentifier = null; + private PrivateDomainName privateDomainName = null; + private OrganizationName organizationName = null; + private NumericUserIdentifier numericUserIdentifier = null; + private PersonalName personalName = null; + private OrganizationalUnitNames organizationalUnitNames = null; + + public BuiltInStandardAttributes() { + } + + public BuiltInStandardAttributes(byte[] code) { + this.code = code; + } + + public void setCountryName(CountryName countryName) { + this.countryName = countryName; + } + + public CountryName getCountryName() { + return countryName; + } + + public void setAdministrationDomainName(AdministrationDomainName administrationDomainName) { + this.administrationDomainName = administrationDomainName; + } + + public AdministrationDomainName getAdministrationDomainName() { + return administrationDomainName; + } + + public void setNetworkAddress(NetworkAddress networkAddress) { + this.networkAddress = networkAddress; + } + + public NetworkAddress getNetworkAddress() { + return networkAddress; + } + + public void setTerminalIdentifier(TerminalIdentifier terminalIdentifier) { + this.terminalIdentifier = terminalIdentifier; + } + + public TerminalIdentifier getTerminalIdentifier() { + return terminalIdentifier; + } + + public void setPrivateDomainName(PrivateDomainName privateDomainName) { + this.privateDomainName = privateDomainName; + } + + public PrivateDomainName getPrivateDomainName() { + return privateDomainName; + } + + public void setOrganizationName(OrganizationName organizationName) { + this.organizationName = organizationName; + } + + public OrganizationName getOrganizationName() { + return organizationName; + } + + public void setNumericUserIdentifier(NumericUserIdentifier numericUserIdentifier) { + this.numericUserIdentifier = numericUserIdentifier; + } + + public NumericUserIdentifier getNumericUserIdentifier() { + return numericUserIdentifier; + } + + public void setPersonalName(PersonalName personalName) { + this.personalName = personalName; + } + + public PersonalName getPersonalName() { + return personalName; + } + + public void setOrganizationalUnitNames(OrganizationalUnitNames organizationalUnitNames) { + this.organizationalUnitNames = organizationalUnitNames; + } + + public OrganizationalUnitNames getOrganizationalUnitNames() { + return organizationalUnitNames; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + if (organizationalUnitNames != null) { + codeLength += organizationalUnitNames.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 6 + reverseOS.write(0xA6); + codeLength += 1; + } + + if (personalName != null) { + codeLength += personalName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 5 + reverseOS.write(0xA5); + codeLength += 1; + } + + if (numericUserIdentifier != null) { + codeLength += numericUserIdentifier.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 4 + reverseOS.write(0x84); + codeLength += 1; + } + + if (organizationName != null) { + codeLength += organizationName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 3 + reverseOS.write(0x83); + codeLength += 1; + } + + if (privateDomainName != null) { + sublength = privateDomainName.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 2 + reverseOS.write(0xA2); + codeLength += 1; + } + + if (terminalIdentifier != null) { + codeLength += terminalIdentifier.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + if (networkAddress != null) { + codeLength += networkAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + } + + if (administrationDomainName != null) { + codeLength += administrationDomainName.encode(reverseOS, true); + } + + if (countryName != null) { + codeLength += countryName.encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(CountryName.tag)) { + countryName = new CountryName(); + vByteCount += countryName.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(AdministrationDomainName.tag)) { + administrationDomainName = new AdministrationDomainName(); + vByteCount += administrationDomainName.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + networkAddress = new NetworkAddress(); + vByteCount += networkAddress.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + terminalIdentifier = new TerminalIdentifier(); + vByteCount += terminalIdentifier.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) { + vByteCount += length.decode(is); + privateDomainName = new PrivateDomainName(); + vByteCount += privateDomainName.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { + organizationName = new OrganizationName(); + vByteCount += organizationName.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 4)) { + numericUserIdentifier = new NumericUserIdentifier(); + vByteCount += numericUserIdentifier.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 5)) { + personalName = new PersonalName(); + vByteCount += personalName.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 6)) { + organizationalUnitNames = new OrganizationalUnitNames(); + vByteCount += organizationalUnitNames.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (countryName != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("countryName: "); + countryName.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (administrationDomainName != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("administrationDomainName: "); + administrationDomainName.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (networkAddress != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("networkAddress: ").append(networkAddress); + firstSelectedElement = false; + } + + if (terminalIdentifier != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("terminalIdentifier: ").append(terminalIdentifier); + firstSelectedElement = false; + } + + if (privateDomainName != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("privateDomainName: "); + privateDomainName.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (organizationName != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("organizationName: ").append(organizationName); + firstSelectedElement = false; + } + + if (numericUserIdentifier != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("numericUserIdentifier: ").append(numericUserIdentifier); + firstSelectedElement = false; + } + + if (personalName != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("personalName: "); + personalName.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (organizationalUnitNames != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("organizationalUnitNames: "); + organizationalUnitNames.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Certificate.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Certificate.java new file mode 100644 index 0000000..04770da --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Certificate.java @@ -0,0 +1,214 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class Certificate implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TBSCertificate tbsCertificate = null; + private AlgorithmIdentifier signatureAlgorithm = null; + private BerBitString signature = null; + + public Certificate() { + } + + public Certificate(byte[] code) { + this.code = code; + } + + public void setTbsCertificate(TBSCertificate tbsCertificate) { + this.tbsCertificate = tbsCertificate; + } + + public TBSCertificate getTbsCertificate() { + return tbsCertificate; + } + + public void setSignatureAlgorithm(AlgorithmIdentifier signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + } + + public AlgorithmIdentifier getSignatureAlgorithm() { + return signatureAlgorithm; + } + + public void setSignature(BerBitString signature) { + this.signature = signature; + } + + public BerBitString getSignature() { + return signature; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += signature.encode(reverseOS, true); + + codeLength += signatureAlgorithm.encode(reverseOS, true); + + codeLength += tbsCertificate.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(TBSCertificate.tag)) { + tbsCertificate = new TBSCertificate(); + vByteCount += tbsCertificate.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(AlgorithmIdentifier.tag)) { + signatureAlgorithm = new AlgorithmIdentifier(); + vByteCount += signatureAlgorithm.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerBitString.tag)) { + signature = new BerBitString(); + vByteCount += signature.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (tbsCertificate != null) { + sb.append("tbsCertificate: "); + tbsCertificate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("tbsCertificate: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (signatureAlgorithm != null) { + sb.append("signatureAlgorithm: "); + signatureAlgorithm.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("signatureAlgorithm: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (signature != null) { + sb.append("signature: ").append(signature); + } + else { + sb.append("signature: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CertificateList.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CertificateList.java new file mode 100644 index 0000000..42f50d4 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CertificateList.java @@ -0,0 +1,214 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class CertificateList implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TBSCertList tbsCertList = null; + private AlgorithmIdentifier signatureAlgorithm = null; + private BerBitString signature = null; + + public CertificateList() { + } + + public CertificateList(byte[] code) { + this.code = code; + } + + public void setTbsCertList(TBSCertList tbsCertList) { + this.tbsCertList = tbsCertList; + } + + public TBSCertList getTbsCertList() { + return tbsCertList; + } + + public void setSignatureAlgorithm(AlgorithmIdentifier signatureAlgorithm) { + this.signatureAlgorithm = signatureAlgorithm; + } + + public AlgorithmIdentifier getSignatureAlgorithm() { + return signatureAlgorithm; + } + + public void setSignature(BerBitString signature) { + this.signature = signature; + } + + public BerBitString getSignature() { + return signature; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += signature.encode(reverseOS, true); + + codeLength += signatureAlgorithm.encode(reverseOS, true); + + codeLength += tbsCertList.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(TBSCertList.tag)) { + tbsCertList = new TBSCertList(); + vByteCount += tbsCertList.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(AlgorithmIdentifier.tag)) { + signatureAlgorithm = new AlgorithmIdentifier(); + vByteCount += signatureAlgorithm.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerBitString.tag)) { + signature = new BerBitString(); + vByteCount += signature.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (tbsCertList != null) { + sb.append("tbsCertList: "); + tbsCertList.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("tbsCertList: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (signatureAlgorithm != null) { + sb.append("signatureAlgorithm: "); + signatureAlgorithm.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("signatureAlgorithm: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (signature != null) { + sb.append("signature: ").append(signature); + } + else { + sb.append("signature: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CertificateSerialNumber.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CertificateSerialNumber.java new file mode 100644 index 0000000..cb54729 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CertificateSerialNumber.java @@ -0,0 +1,42 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class CertificateSerialNumber extends BerInteger { + + private static final long serialVersionUID = 1L; + + public CertificateSerialNumber() { + } + + public CertificateSerialNumber(byte[] code) { + super(code); + } + + public CertificateSerialNumber(BigInteger value) { + super(value); + } + + public CertificateSerialNumber(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CommonName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CommonName.java new file mode 100644 index 0000000..c36bba0 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CommonName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class CommonName extends BerPrintableString { + + private static final long serialVersionUID = 1L; + + public CommonName() { + } + + public CommonName(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CountryName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CountryName.java new file mode 100644 index 0000000..be14731 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/CountryName.java @@ -0,0 +1,153 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class CountryName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 1); + + private BerNumericString x121DccCode = null; + private BerPrintableString iso3166Alpha2Code = null; + + public CountryName() { + } + + public CountryName(byte[] code) { + this.code = code; + } + + public void setX121DccCode(BerNumericString x121DccCode) { + this.x121DccCode = x121DccCode; + } + + public BerNumericString getX121DccCode() { + return x121DccCode; + } + + public void setIso3166Alpha2Code(BerPrintableString iso3166Alpha2Code) { + this.iso3166Alpha2Code = iso3166Alpha2Code; + } + + public BerPrintableString getIso3166Alpha2Code() { + return iso3166Alpha2Code; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (iso3166Alpha2Code != null) { + codeLength += iso3166Alpha2Code.encode(reverseOS, true); + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (x121DccCode != null) { + codeLength += x121DccCode.encode(reverseOS, true); + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerNumericString.tag)) { + x121DccCode = new BerNumericString(); + tlvByteCount += x121DccCode.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + iso3166Alpha2Code = new BerPrintableString(); + tlvByteCount += iso3166Alpha2Code.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (x121DccCode != null) { + sb.append("x121DccCode: ").append(x121DccCode); + return; + } + + if (iso3166Alpha2Code != null) { + sb.append("iso3166Alpha2Code: ").append(iso3166Alpha2Code); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/DirectoryString.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/DirectoryString.java new file mode 100644 index 0000000..6d2b053 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/DirectoryString.java @@ -0,0 +1,211 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class DirectoryString implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerTeletexString teletexString = null; + private BerPrintableString printableString = null; + private BerUniversalString universalString = null; + private BerUTF8String utf8String = null; + private BerBMPString bmpString = null; + + public DirectoryString() { + } + + public DirectoryString(byte[] code) { + this.code = code; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setUniversalString(BerUniversalString universalString) { + this.universalString = universalString; + } + + public BerUniversalString getUniversalString() { + return universalString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (universalString != null) { + codeLength += universalString.encode(reverseOS, true); + return codeLength; + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + return codeLength; + } + + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + tlvByteCount += teletexString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + tlvByteCount += printableString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUniversalString.tag)) { + universalString = new BerUniversalString(); + tlvByteCount += universalString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (teletexString != null) { + sb.append("teletexString: ").append(teletexString); + return; + } + + if (printableString != null) { + sb.append("printableString: ").append(printableString); + return; + } + + if (universalString != null) { + sb.append("universalString: ").append(universalString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/DistinguishedName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/DistinguishedName.java new file mode 100644 index 0000000..be52828 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/DistinguishedName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class DistinguishedName extends RDNSequence { + + private static final long serialVersionUID = 1L; + + public DistinguishedName() { + } + + public DistinguishedName(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/DomainComponent.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/DomainComponent.java new file mode 100644 index 0000000..94a7e9e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/DomainComponent.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class DomainComponent extends BerIA5String { + + private static final long serialVersionUID = 1L; + + public DomainComponent() { + } + + public DomainComponent(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/EmailAddress.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/EmailAddress.java new file mode 100644 index 0000000..87e8465 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/EmailAddress.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class EmailAddress extends BerIA5String { + + private static final long serialVersionUID = 1L; + + public EmailAddress() { + } + + public EmailAddress(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtendedNetworkAddress.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtendedNetworkAddress.java new file mode 100644 index 0000000..aaf74e8 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtendedNetworkAddress.java @@ -0,0 +1,305 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class ExtendedNetworkAddress implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static class E1634Address implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerNumericString number = null; + private BerNumericString subAddress = null; + + public E1634Address() { + } + + public E1634Address(byte[] code) { + this.code = code; + } + + public void setNumber(BerNumericString number) { + this.number = number; + } + + public BerNumericString getNumber() { + return number; + } + + public void setSubAddress(BerNumericString subAddress) { + this.subAddress = subAddress; + } + + public BerNumericString getSubAddress() { + return subAddress; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (subAddress != null) { + codeLength += subAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + codeLength += number.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + number = new BerNumericString(); + vByteCount += number.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + subAddress = new BerNumericString(); + vByteCount += subAddress.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (number != null) { + sb.append("number: ").append(number); + } + else { + sb.append("number: "); + } + + if (subAddress != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("subAddress: ").append(subAddress); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + private E1634Address e1634Address = null; + private PresentationAddress psapAddress = null; + + public ExtendedNetworkAddress() { + } + + public ExtendedNetworkAddress(byte[] code) { + this.code = code; + } + + public void setE1634Address(E1634Address e1634Address) { + this.e1634Address = e1634Address; + } + + public E1634Address getE1634Address() { + return e1634Address; + } + + public void setPsapAddress(PresentationAddress psapAddress) { + this.psapAddress = psapAddress; + } + + public PresentationAddress getPsapAddress() { + return psapAddress; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (psapAddress != null) { + codeLength += psapAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + return codeLength; + } + + if (e1634Address != null) { + codeLength += e1634Address.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(E1634Address.tag)) { + e1634Address = new E1634Address(); + tlvByteCount += e1634Address.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + psapAddress = new PresentationAddress(); + tlvByteCount += psapAddress.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (e1634Address != null) { + sb.append("e1634Address: "); + e1634Address.appendAsString(sb, indentLevel + 1); + return; + } + + if (psapAddress != null) { + sb.append("psapAddress: "); + psapAddress.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Extension.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Extension.java new file mode 100644 index 0000000..7272738 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Extension.java @@ -0,0 +1,208 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class Extension implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerObjectIdentifier extnID = null; + private BerBoolean critical = null; + private BerOctetString extnValue = null; + + public Extension() { + } + + public Extension(byte[] code) { + this.code = code; + } + + public void setExtnID(BerObjectIdentifier extnID) { + this.extnID = extnID; + } + + public BerObjectIdentifier getExtnID() { + return extnID; + } + + public void setCritical(BerBoolean critical) { + this.critical = critical; + } + + public BerBoolean getCritical() { + return critical; + } + + public void setExtnValue(BerOctetString extnValue) { + this.extnValue = extnValue; + } + + public BerOctetString getExtnValue() { + return extnValue; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += extnValue.encode(reverseOS, true); + + if (critical != null) { + codeLength += critical.encode(reverseOS, true); + } + + codeLength += extnID.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerObjectIdentifier.tag)) { + extnID = new BerObjectIdentifier(); + vByteCount += extnID.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerBoolean.tag)) { + critical = new BerBoolean(); + vByteCount += critical.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerOctetString.tag)) { + extnValue = new BerOctetString(); + vByteCount += extnValue.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (extnID != null) { + sb.append("extnID: ").append(extnID); + } + else { + sb.append("extnID: "); + } + + if (critical != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("critical: ").append(critical); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (extnValue != null) { + sb.append("extnValue: ").append(extnValue); + } + else { + sb.append("extnValue: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionAttribute.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionAttribute.java new file mode 100644 index 0000000..910aee7 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionAttribute.java @@ -0,0 +1,193 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class ExtensionAttribute implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerInteger extensionAttributeType = null; + private BerAny extensionAttributeValue = null; + + public ExtensionAttribute() { + } + + public ExtensionAttribute(byte[] code) { + this.code = code; + } + + public void setExtensionAttributeType(BerInteger extensionAttributeType) { + this.extensionAttributeType = extensionAttributeType; + } + + public BerInteger getExtensionAttributeType() { + return extensionAttributeType; + } + + public void setExtensionAttributeValue(BerAny extensionAttributeValue) { + this.extensionAttributeValue = extensionAttributeValue; + } + + public BerAny getExtensionAttributeValue() { + return extensionAttributeValue; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + sublength = extensionAttributeValue.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + + codeLength += extensionAttributeType.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + extensionAttributeType = new BerInteger(); + vByteCount += extensionAttributeType.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + vByteCount += length.decode(is); + extensionAttributeValue = new BerAny(); + vByteCount += extensionAttributeValue.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (extensionAttributeType != null) { + sb.append("extensionAttributeType: ").append(extensionAttributeType); + } + else { + sb.append("extensionAttributeType: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (extensionAttributeValue != null) { + sb.append("extensionAttributeValue: ").append(extensionAttributeValue); + } + else { + sb.append("extensionAttributeValue: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionAttributes.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionAttributes.java new file mode 100644 index 0000000..45668ee --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionAttributes.java @@ -0,0 +1,155 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class ExtensionAttributes implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17); + private byte[] code = null; + private List seqOf = null; + + public ExtensionAttributes() { + seqOf = new ArrayList<>(); + } + + public ExtensionAttributes(byte[] code) { + this.code = code; + } + + public List getExtensionAttribute() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(ExtensionAttribute.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + ExtensionAttribute element = new ExtensionAttribute(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionORAddressComponents.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionORAddressComponents.java new file mode 100644 index 0000000..a81f653 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionORAddressComponents.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class ExtensionORAddressComponents extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public ExtensionORAddressComponents() { + } + + public ExtensionORAddressComponents(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionPhysicalDeliveryAddressComponents.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionPhysicalDeliveryAddressComponents.java new file mode 100644 index 0000000..6825450 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ExtensionPhysicalDeliveryAddressComponents.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class ExtensionPhysicalDeliveryAddressComponents extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public ExtensionPhysicalDeliveryAddressComponents() { + } + + public ExtensionPhysicalDeliveryAddressComponents(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Extensions.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Extensions.java new file mode 100644 index 0000000..8fc4905 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Extensions.java @@ -0,0 +1,155 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class Extensions implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public Extensions() { + seqOf = new ArrayList<>(); + } + + public Extensions(byte[] code) { + this.code = code; + } + + public List getExtension() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(Extension.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + Extension element = new Extension(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/LocalPostalAttributes.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/LocalPostalAttributes.java new file mode 100644 index 0000000..94d9266 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/LocalPostalAttributes.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class LocalPostalAttributes extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public LocalPostalAttributes() { + } + + public LocalPostalAttributes(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Name.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Name.java new file mode 100644 index 0000000..572ce78 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Name.java @@ -0,0 +1,112 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class Name implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private RDNSequence rdnSequence = null; + + public Name() { + } + + public Name(byte[] code) { + this.code = code; + } + + public void setRdnSequence(RDNSequence rdnSequence) { + this.rdnSequence = rdnSequence; + } + + public RDNSequence getRdnSequence() { + return rdnSequence; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (rdnSequence != null) { + codeLength += rdnSequence.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(RDNSequence.tag)) { + rdnSequence = new RDNSequence(); + tlvByteCount += rdnSequence.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (rdnSequence != null) { + sb.append("rdnSequence: "); + rdnSequence.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/NetworkAddress.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/NetworkAddress.java new file mode 100644 index 0000000..e8db34c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/NetworkAddress.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class NetworkAddress extends X121Address { + + private static final long serialVersionUID = 1L; + + public NetworkAddress() { + } + + public NetworkAddress(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/NumericUserIdentifier.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/NumericUserIdentifier.java new file mode 100644 index 0000000..e574075 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/NumericUserIdentifier.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class NumericUserIdentifier extends BerNumericString { + + private static final long serialVersionUID = 1L; + + public NumericUserIdentifier() { + } + + public NumericUserIdentifier(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ORAddress.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ORAddress.java new file mode 100644 index 0000000..2c2f688 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/ORAddress.java @@ -0,0 +1,213 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class ORAddress implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BuiltInStandardAttributes builtInStandardAttributes = null; + private BuiltInDomainDefinedAttributes builtInDomainDefinedAttributes = null; + private ExtensionAttributes extensionAttributes = null; + + public ORAddress() { + } + + public ORAddress(byte[] code) { + this.code = code; + } + + public void setBuiltInStandardAttributes(BuiltInStandardAttributes builtInStandardAttributes) { + this.builtInStandardAttributes = builtInStandardAttributes; + } + + public BuiltInStandardAttributes getBuiltInStandardAttributes() { + return builtInStandardAttributes; + } + + public void setBuiltInDomainDefinedAttributes(BuiltInDomainDefinedAttributes builtInDomainDefinedAttributes) { + this.builtInDomainDefinedAttributes = builtInDomainDefinedAttributes; + } + + public BuiltInDomainDefinedAttributes getBuiltInDomainDefinedAttributes() { + return builtInDomainDefinedAttributes; + } + + public void setExtensionAttributes(ExtensionAttributes extensionAttributes) { + this.extensionAttributes = extensionAttributes; + } + + public ExtensionAttributes getExtensionAttributes() { + return extensionAttributes; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (extensionAttributes != null) { + codeLength += extensionAttributes.encode(reverseOS, true); + } + + if (builtInDomainDefinedAttributes != null) { + codeLength += builtInDomainDefinedAttributes.encode(reverseOS, true); + } + + codeLength += builtInStandardAttributes.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BuiltInStandardAttributes.tag)) { + builtInStandardAttributes = new BuiltInStandardAttributes(); + vByteCount += builtInStandardAttributes.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BuiltInDomainDefinedAttributes.tag)) { + builtInDomainDefinedAttributes = new BuiltInDomainDefinedAttributes(); + vByteCount += builtInDomainDefinedAttributes.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(ExtensionAttributes.tag)) { + extensionAttributes = new ExtensionAttributes(); + vByteCount += extensionAttributes.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (builtInStandardAttributes != null) { + sb.append("builtInStandardAttributes: "); + builtInStandardAttributes.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("builtInStandardAttributes: "); + } + + if (builtInDomainDefinedAttributes != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("builtInDomainDefinedAttributes: "); + builtInDomainDefinedAttributes.appendAsString(sb, indentLevel + 1); + } + + if (extensionAttributes != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("extensionAttributes: "); + extensionAttributes.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OidValues.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OidValues.java new file mode 100644 index 0000000..f5d6bbf --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OidValues.java @@ -0,0 +1,37 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public final class OidValues { + public static final BerObjectIdentifier idAd = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 48}); + public static final BerObjectIdentifier idAdCaIssuers = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 48, 2}); + public static final BerObjectIdentifier idAdCaRepository = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 48, 5}); + public static final BerObjectIdentifier idAdOcsp = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 48, 1}); + public static final BerObjectIdentifier idAdTimeStamping = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 48, 3}); + public static final BerObjectIdentifier idAt = new BerObjectIdentifier(new int[]{2, 5, 4}); + public static final BerObjectIdentifier idKp = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 3}); + public static final BerObjectIdentifier idPe = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 1}); + public static final BerObjectIdentifier idPkix = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7}); + public static final BerObjectIdentifier idQt = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 2}); + public static final BerObjectIdentifier idQtCps = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 2, 1}); + public static final BerObjectIdentifier idQtUnotice = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 2, 2}); + public static final BerObjectIdentifier pkcs9 = new BerObjectIdentifier(new int[]{1, 2, 840, 113549, 1, 9}); +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OrganizationName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OrganizationName.java new file mode 100644 index 0000000..655462d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OrganizationName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class OrganizationName extends BerPrintableString { + + private static final long serialVersionUID = 1L; + + public OrganizationName() { + } + + public OrganizationName(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OrganizationalUnitName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OrganizationalUnitName.java new file mode 100644 index 0000000..a2fe885 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OrganizationalUnitName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class OrganizationalUnitName extends BerPrintableString { + + private static final long serialVersionUID = 1L; + + public OrganizationalUnitName() { + } + + public OrganizationalUnitName(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OrganizationalUnitNames.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OrganizationalUnitNames.java new file mode 100644 index 0000000..f791e9c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/OrganizationalUnitNames.java @@ -0,0 +1,155 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class OrganizationalUnitNames implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public OrganizationalUnitNames() { + seqOf = new ArrayList<>(); + } + + public OrganizationalUnitNames(byte[] code) { + this.code = code; + } + + public List getOrganizationalUnitName() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(OrganizationalUnitName.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + OrganizationalUnitName element = new OrganizationalUnitName(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PDSName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PDSName.java new file mode 100644 index 0000000..4850761 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PDSName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PDSName extends BerPrintableString { + + private static final long serialVersionUID = 1L; + + public PDSName() { + } + + public PDSName(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PDSParameter.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PDSParameter.java new file mode 100644 index 0000000..d4a4a18 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PDSParameter.java @@ -0,0 +1,177 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PDSParameter implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17); + + private byte[] code = null; + private BerPrintableString printableString = null; + private BerTeletexString teletexString = null; + + public PDSParameter() { + } + + public PDSParameter(byte[] code) { + this.code = code; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + if (lengthVal == 0) { + return tlByteCount; + } + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + vByteCount += printableString.decode(is, false); + } + else if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + vByteCount += teletexString.decode(is, false); + } + else if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + else { + throw new IOException("Tag does not match any set component: " + berTag); + } + } + if (vByteCount != lengthVal) { + throw new IOException("Length of set does not match length tag, length tag: " + lengthVal + ", actual set length: " + vByteCount); + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (printableString != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("printableString: ").append(printableString); + firstSelectedElement = false; + } + + if (teletexString != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("teletexString: ").append(teletexString); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PersonalName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PersonalName.java new file mode 100644 index 0000000..d318484 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PersonalName.java @@ -0,0 +1,232 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PersonalName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17); + + private byte[] code = null; + private BerPrintableString surname = null; + private BerPrintableString givenName = null; + private BerPrintableString initials = null; + private BerPrintableString generationQualifier = null; + + public PersonalName() { + } + + public PersonalName(byte[] code) { + this.code = code; + } + + public void setSurname(BerPrintableString surname) { + this.surname = surname; + } + + public BerPrintableString getSurname() { + return surname; + } + + public void setGivenName(BerPrintableString givenName) { + this.givenName = givenName; + } + + public BerPrintableString getGivenName() { + return givenName; + } + + public void setInitials(BerPrintableString initials) { + this.initials = initials; + } + + public BerPrintableString getInitials() { + return initials; + } + + public void setGenerationQualifier(BerPrintableString generationQualifier) { + this.generationQualifier = generationQualifier; + } + + public BerPrintableString getGenerationQualifier() { + return generationQualifier; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (generationQualifier != null) { + codeLength += generationQualifier.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 3 + reverseOS.write(0x83); + codeLength += 1; + } + + if (initials != null) { + codeLength += initials.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + } + + if (givenName != null) { + codeLength += givenName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + codeLength += surname.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + surname = new BerPrintableString(); + vByteCount += surname.decode(is, false); + } + else if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + givenName = new BerPrintableString(); + vByteCount += givenName.decode(is, false); + } + else if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + initials = new BerPrintableString(); + vByteCount += initials.decode(is, false); + } + else if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { + generationQualifier = new BerPrintableString(); + vByteCount += generationQualifier.decode(is, false); + } + else if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + else { + throw new IOException("Tag does not match any set component: " + berTag); + } + } + if (vByteCount != lengthVal) { + throw new IOException("Length of set does not match length tag, length tag: " + lengthVal + ", actual set length: " + vByteCount); + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (surname != null) { + sb.append("surname: ").append(surname); + } + else { + sb.append("surname: "); + } + + if (givenName != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("givenName: ").append(givenName); + } + + if (initials != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("initials: ").append(initials); + } + + if (generationQualifier != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("generationQualifier: ").append(generationQualifier); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryCountryName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryCountryName.java new file mode 100644 index 0000000..0bd1591 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryCountryName.java @@ -0,0 +1,136 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PhysicalDeliveryCountryName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerNumericString x121DccCode = null; + private BerPrintableString iso3166Alpha2Code = null; + + public PhysicalDeliveryCountryName() { + } + + public PhysicalDeliveryCountryName(byte[] code) { + this.code = code; + } + + public void setX121DccCode(BerNumericString x121DccCode) { + this.x121DccCode = x121DccCode; + } + + public BerNumericString getX121DccCode() { + return x121DccCode; + } + + public void setIso3166Alpha2Code(BerPrintableString iso3166Alpha2Code) { + this.iso3166Alpha2Code = iso3166Alpha2Code; + } + + public BerPrintableString getIso3166Alpha2Code() { + return iso3166Alpha2Code; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (iso3166Alpha2Code != null) { + codeLength += iso3166Alpha2Code.encode(reverseOS, true); + return codeLength; + } + + if (x121DccCode != null) { + codeLength += x121DccCode.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerNumericString.tag)) { + x121DccCode = new BerNumericString(); + tlvByteCount += x121DccCode.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + iso3166Alpha2Code = new BerPrintableString(); + tlvByteCount += iso3166Alpha2Code.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (x121DccCode != null) { + sb.append("x121DccCode: ").append(x121DccCode); + return; + } + + if (iso3166Alpha2Code != null) { + sb.append("iso3166Alpha2Code: ").append(iso3166Alpha2Code); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryOfficeName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryOfficeName.java new file mode 100644 index 0000000..2b6f796 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryOfficeName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PhysicalDeliveryOfficeName extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public PhysicalDeliveryOfficeName() { + } + + public PhysicalDeliveryOfficeName(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryOfficeNumber.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryOfficeNumber.java new file mode 100644 index 0000000..689d942 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryOfficeNumber.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PhysicalDeliveryOfficeNumber extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public PhysicalDeliveryOfficeNumber() { + } + + public PhysicalDeliveryOfficeNumber(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryOrganizationName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryOrganizationName.java new file mode 100644 index 0000000..6ec545c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryOrganizationName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PhysicalDeliveryOrganizationName extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public PhysicalDeliveryOrganizationName() { + } + + public PhysicalDeliveryOrganizationName(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryPersonalName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryPersonalName.java new file mode 100644 index 0000000..5fb164d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PhysicalDeliveryPersonalName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PhysicalDeliveryPersonalName extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public PhysicalDeliveryPersonalName() { + } + + public PhysicalDeliveryPersonalName(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PostOfficeBoxAddress.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PostOfficeBoxAddress.java new file mode 100644 index 0000000..428aa24 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PostOfficeBoxAddress.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PostOfficeBoxAddress extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public PostOfficeBoxAddress() { + } + + public PostOfficeBoxAddress(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PostalCode.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PostalCode.java new file mode 100644 index 0000000..a5e99d6 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PostalCode.java @@ -0,0 +1,136 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PostalCode implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerNumericString numericCode = null; + private BerPrintableString printableCode = null; + + public PostalCode() { + } + + public PostalCode(byte[] code) { + this.code = code; + } + + public void setNumericCode(BerNumericString numericCode) { + this.numericCode = numericCode; + } + + public BerNumericString getNumericCode() { + return numericCode; + } + + public void setPrintableCode(BerPrintableString printableCode) { + this.printableCode = printableCode; + } + + public BerPrintableString getPrintableCode() { + return printableCode; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (printableCode != null) { + codeLength += printableCode.encode(reverseOS, true); + return codeLength; + } + + if (numericCode != null) { + codeLength += numericCode.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerNumericString.tag)) { + numericCode = new BerNumericString(); + tlvByteCount += numericCode.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableCode = new BerPrintableString(); + tlvByteCount += printableCode.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (numericCode != null) { + sb.append("numericCode: ").append(numericCode); + return; + } + + if (printableCode != null) { + sb.append("printableCode: ").append(printableCode); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PosteRestanteAddress.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PosteRestanteAddress.java new file mode 100644 index 0000000..1717484 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PosteRestanteAddress.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PosteRestanteAddress extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public PosteRestanteAddress() { + } + + public PosteRestanteAddress(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PresentationAddress.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PresentationAddress.java new file mode 100644 index 0000000..29205f0 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PresentationAddress.java @@ -0,0 +1,405 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PresentationAddress implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class NAddresses implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17); + private byte[] code = null; + private List seqOf = null; + + public NAddresses() { + seqOf = new ArrayList<>(); + } + + public NAddresses(byte[] code) { + this.code = code; + } + + public List getBerOctetString() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(BerOctetString.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + BerOctetString element = new BerOctetString(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerOctetString pSelector = null; + private BerOctetString sSelector = null; + private BerOctetString tSelector = null; + private NAddresses nAddresses = null; + + public PresentationAddress() { + } + + public PresentationAddress(byte[] code) { + this.code = code; + } + + public void setPSelector(BerOctetString pSelector) { + this.pSelector = pSelector; + } + + public BerOctetString getPSelector() { + return pSelector; + } + + public void setSSelector(BerOctetString sSelector) { + this.sSelector = sSelector; + } + + public BerOctetString getSSelector() { + return sSelector; + } + + public void setTSelector(BerOctetString tSelector) { + this.tSelector = tSelector; + } + + public BerOctetString getTSelector() { + return tSelector; + } + + public void setNAddresses(NAddresses nAddresses) { + this.nAddresses = nAddresses; + } + + public NAddresses getNAddresses() { + return nAddresses; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + sublength = nAddresses.encode(reverseOS, true); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 3 + reverseOS.write(0xA3); + codeLength += 1; + + if (tSelector != null) { + sublength = tSelector.encode(reverseOS, true); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 2 + reverseOS.write(0xA2); + codeLength += 1; + } + + if (sSelector != null) { + sublength = sSelector.encode(reverseOS, true); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + } + + if (pSelector != null) { + sublength = pSelector.encode(reverseOS, true); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + pSelector = new BerOctetString(); + vByteCount += pSelector.decode(is, true); + vByteCount += length.readEocIfIndefinite(is); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + vByteCount += length.decode(is); + sSelector = new BerOctetString(); + vByteCount += sSelector.decode(is, true); + vByteCount += length.readEocIfIndefinite(is); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) { + vByteCount += length.decode(is); + tSelector = new BerOctetString(); + vByteCount += tSelector.decode(is, true); + vByteCount += length.readEocIfIndefinite(is); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) { + vByteCount += length.decode(is); + nAddresses = new NAddresses(); + vByteCount += nAddresses.decode(is, true); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (pSelector != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("pSelector: ").append(pSelector); + firstSelectedElement = false; + } + + if (sSelector != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("sSelector: ").append(sSelector); + firstSelectedElement = false; + } + + if (tSelector != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("tSelector: ").append(tSelector); + firstSelectedElement = false; + } + + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (nAddresses != null) { + sb.append("nAddresses: "); + nAddresses.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("nAddresses: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PrivateDomainName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PrivateDomainName.java new file mode 100644 index 0000000..534b3ba --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/PrivateDomainName.java @@ -0,0 +1,136 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class PrivateDomainName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerNumericString numeric = null; + private BerPrintableString printable = null; + + public PrivateDomainName() { + } + + public PrivateDomainName(byte[] code) { + this.code = code; + } + + public void setNumeric(BerNumericString numeric) { + this.numeric = numeric; + } + + public BerNumericString getNumeric() { + return numeric; + } + + public void setPrintable(BerPrintableString printable) { + this.printable = printable; + } + + public BerPrintableString getPrintable() { + return printable; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (printable != null) { + codeLength += printable.encode(reverseOS, true); + return codeLength; + } + + if (numeric != null) { + codeLength += numeric.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerNumericString.tag)) { + numeric = new BerNumericString(); + tlvByteCount += numeric.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printable = new BerPrintableString(); + tlvByteCount += printable.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (numeric != null) { + sb.append("numeric: ").append(numeric); + return; + } + + if (printable != null) { + sb.append("printable: ").append(printable); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/RDNSequence.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/RDNSequence.java new file mode 100644 index 0000000..8075cb4 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/RDNSequence.java @@ -0,0 +1,155 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class RDNSequence implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public RDNSequence() { + seqOf = new ArrayList<>(); + } + + public RDNSequence(byte[] code) { + this.code = code; + } + + public List getRelativeDistinguishedName() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(RelativeDistinguishedName.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + RelativeDistinguishedName element = new RelativeDistinguishedName(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/RelativeDistinguishedName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/RelativeDistinguishedName.java new file mode 100644 index 0000000..e0a70f4 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/RelativeDistinguishedName.java @@ -0,0 +1,155 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class RelativeDistinguishedName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17); + private byte[] code = null; + private List seqOf = null; + + public RelativeDistinguishedName() { + seqOf = new ArrayList<>(); + } + + public RelativeDistinguishedName(byte[] code) { + this.code = code; + } + + public List getAttributeTypeAndValue() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(AttributeTypeAndValue.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + AttributeTypeAndValue element = new AttributeTypeAndValue(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/StreetAddress.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/StreetAddress.java new file mode 100644 index 0000000..d3cea73 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/StreetAddress.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class StreetAddress extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public StreetAddress() { + } + + public StreetAddress(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/SubjectPublicKeyInfo.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/SubjectPublicKeyInfo.java new file mode 100644 index 0000000..8f92f52 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/SubjectPublicKeyInfo.java @@ -0,0 +1,182 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class SubjectPublicKeyInfo implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private AlgorithmIdentifier algorithm = null; + private BerBitString subjectPublicKey = null; + + public SubjectPublicKeyInfo() { + } + + public SubjectPublicKeyInfo(byte[] code) { + this.code = code; + } + + public void setAlgorithm(AlgorithmIdentifier algorithm) { + this.algorithm = algorithm; + } + + public AlgorithmIdentifier getAlgorithm() { + return algorithm; + } + + public void setSubjectPublicKey(BerBitString subjectPublicKey) { + this.subjectPublicKey = subjectPublicKey; + } + + public BerBitString getSubjectPublicKey() { + return subjectPublicKey; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += subjectPublicKey.encode(reverseOS, true); + + codeLength += algorithm.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(AlgorithmIdentifier.tag)) { + algorithm = new AlgorithmIdentifier(); + vByteCount += algorithm.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerBitString.tag)) { + subjectPublicKey = new BerBitString(); + vByteCount += subjectPublicKey.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (algorithm != null) { + sb.append("algorithm: "); + algorithm.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("algorithm: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (subjectPublicKey != null) { + sb.append("subjectPublicKey: ").append(subjectPublicKey); + } + else { + sb.append("subjectPublicKey: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TBSCertList.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TBSCertList.java new file mode 100644 index 0000000..1150719 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TBSCertList.java @@ -0,0 +1,677 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TBSCertList implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class RevokedCertificates implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class SEQUENCE implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private CertificateSerialNumber userCertificate = null; + private Time revocationDate = null; + private Extensions crlEntryExtensions = null; + + public SEQUENCE() { + } + + public SEQUENCE(byte[] code) { + this.code = code; + } + + public void setUserCertificate(CertificateSerialNumber userCertificate) { + this.userCertificate = userCertificate; + } + + public CertificateSerialNumber getUserCertificate() { + return userCertificate; + } + + public void setRevocationDate(Time revocationDate) { + this.revocationDate = revocationDate; + } + + public Time getRevocationDate() { + return revocationDate; + } + + public void setCrlEntryExtensions(Extensions crlEntryExtensions) { + this.crlEntryExtensions = crlEntryExtensions; + } + + public Extensions getCrlEntryExtensions() { + return crlEntryExtensions; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (crlEntryExtensions != null) { + codeLength += crlEntryExtensions.encode(reverseOS, true); + } + + codeLength += revocationDate.encode(reverseOS); + + codeLength += userCertificate.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(CertificateSerialNumber.tag)) { + userCertificate = new CertificateSerialNumber(); + vByteCount += userCertificate.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + revocationDate = new Time(); + numDecodedBytes = revocationDate.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (berTag.equals(Extensions.tag)) { + crlEntryExtensions = new Extensions(); + vByteCount += crlEntryExtensions.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (userCertificate != null) { + sb.append("userCertificate: ").append(userCertificate); + } + else { + sb.append("userCertificate: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (revocationDate != null) { + sb.append("revocationDate: "); + revocationDate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("revocationDate: "); + } + + if (crlEntryExtensions != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("crlEntryExtensions: "); + crlEntryExtensions.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public RevokedCertificates() { + seqOf = new ArrayList<>(); + } + + public RevokedCertificates(byte[] code) { + this.code = code; + } + + public List getSEQUENCE() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(SEQUENCE.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + SEQUENCE element = new SEQUENCE(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private Version version = null; + private AlgorithmIdentifier signature = null; + private Name issuer = null; + private Time thisUpdate = null; + private Time nextUpdate = null; + private RevokedCertificates revokedCertificates = null; + private Extensions crlExtensions = null; + + public TBSCertList() { + } + + public TBSCertList(byte[] code) { + this.code = code; + } + + public void setVersion(Version version) { + this.version = version; + } + + public Version getVersion() { + return version; + } + + public void setSignature(AlgorithmIdentifier signature) { + this.signature = signature; + } + + public AlgorithmIdentifier getSignature() { + return signature; + } + + public void setIssuer(Name issuer) { + this.issuer = issuer; + } + + public Name getIssuer() { + return issuer; + } + + public void setThisUpdate(Time thisUpdate) { + this.thisUpdate = thisUpdate; + } + + public Time getThisUpdate() { + return thisUpdate; + } + + public void setNextUpdate(Time nextUpdate) { + this.nextUpdate = nextUpdate; + } + + public Time getNextUpdate() { + return nextUpdate; + } + + public void setRevokedCertificates(RevokedCertificates revokedCertificates) { + this.revokedCertificates = revokedCertificates; + } + + public RevokedCertificates getRevokedCertificates() { + return revokedCertificates; + } + + public void setCrlExtensions(Extensions crlExtensions) { + this.crlExtensions = crlExtensions; + } + + public Extensions getCrlExtensions() { + return crlExtensions; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + if (crlExtensions != null) { + sublength = crlExtensions.encode(reverseOS, true); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + if (revokedCertificates != null) { + codeLength += revokedCertificates.encode(reverseOS, true); + } + + if (nextUpdate != null) { + codeLength += nextUpdate.encode(reverseOS); + } + + codeLength += thisUpdate.encode(reverseOS); + + codeLength += issuer.encode(reverseOS); + + codeLength += signature.encode(reverseOS, true); + + if (version != null) { + codeLength += version.encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(Version.tag)) { + version = new Version(); + vByteCount += version.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(AlgorithmIdentifier.tag)) { + signature = new AlgorithmIdentifier(); + vByteCount += signature.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + issuer = new Name(); + numDecodedBytes = issuer.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + thisUpdate = new Time(); + numDecodedBytes = thisUpdate.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + nextUpdate = new Time(); + numDecodedBytes = nextUpdate.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + nextUpdate = null; + } + if (berTag.equals(RevokedCertificates.tag)) { + revokedCertificates = new RevokedCertificates(); + vByteCount += revokedCertificates.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + crlExtensions = new Extensions(); + vByteCount += crlExtensions.decode(is, true); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (version != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("version: ").append(version); + firstSelectedElement = false; + } + + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (signature != null) { + sb.append("signature: "); + signature.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("signature: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (issuer != null) { + sb.append("issuer: "); + issuer.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("issuer: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (thisUpdate != null) { + sb.append("thisUpdate: "); + thisUpdate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("thisUpdate: "); + } + + if (nextUpdate != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("nextUpdate: "); + nextUpdate.appendAsString(sb, indentLevel + 1); + } + + if (revokedCertificates != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("revokedCertificates: "); + revokedCertificates.appendAsString(sb, indentLevel + 1); + } + + if (crlExtensions != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("crlExtensions: "); + crlExtensions.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TBSCertificate.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TBSCertificate.java new file mode 100644 index 0000000..575c714 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TBSCertificate.java @@ -0,0 +1,455 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TBSCertificate implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private Version version = null; + private CertificateSerialNumber serialNumber = null; + private AlgorithmIdentifier signature = null; + private Name issuer = null; + private Validity validity = null; + private Name subject = null; + private SubjectPublicKeyInfo subjectPublicKeyInfo = null; + private UniqueIdentifier issuerUniqueID = null; + private UniqueIdentifier subjectUniqueID = null; + private Extensions extensions = null; + + public TBSCertificate() { + } + + public TBSCertificate(byte[] code) { + this.code = code; + } + + public void setVersion(Version version) { + this.version = version; + } + + public Version getVersion() { + return version; + } + + public void setSerialNumber(CertificateSerialNumber serialNumber) { + this.serialNumber = serialNumber; + } + + public CertificateSerialNumber getSerialNumber() { + return serialNumber; + } + + public void setSignature(AlgorithmIdentifier signature) { + this.signature = signature; + } + + public AlgorithmIdentifier getSignature() { + return signature; + } + + public void setIssuer(Name issuer) { + this.issuer = issuer; + } + + public Name getIssuer() { + return issuer; + } + + public void setValidity(Validity validity) { + this.validity = validity; + } + + public Validity getValidity() { + return validity; + } + + public void setSubject(Name subject) { + this.subject = subject; + } + + public Name getSubject() { + return subject; + } + + public void setSubjectPublicKeyInfo(SubjectPublicKeyInfo subjectPublicKeyInfo) { + this.subjectPublicKeyInfo = subjectPublicKeyInfo; + } + + public SubjectPublicKeyInfo getSubjectPublicKeyInfo() { + return subjectPublicKeyInfo; + } + + public void setIssuerUniqueID(UniqueIdentifier issuerUniqueID) { + this.issuerUniqueID = issuerUniqueID; + } + + public UniqueIdentifier getIssuerUniqueID() { + return issuerUniqueID; + } + + public void setSubjectUniqueID(UniqueIdentifier subjectUniqueID) { + this.subjectUniqueID = subjectUniqueID; + } + + public UniqueIdentifier getSubjectUniqueID() { + return subjectUniqueID; + } + + public void setExtensions(Extensions extensions) { + this.extensions = extensions; + } + + public Extensions getExtensions() { + return extensions; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + if (extensions != null) { + sublength = extensions.encode(reverseOS, true); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 3 + reverseOS.write(0xA3); + codeLength += 1; + } + + if (subjectUniqueID != null) { + codeLength += subjectUniqueID.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + } + + if (issuerUniqueID != null) { + codeLength += issuerUniqueID.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + codeLength += subjectPublicKeyInfo.encode(reverseOS, true); + + codeLength += subject.encode(reverseOS); + + codeLength += validity.encode(reverseOS, true); + + codeLength += issuer.encode(reverseOS); + + codeLength += signature.encode(reverseOS, true); + + codeLength += serialNumber.encode(reverseOS, true); + + if (version != null) { + sublength = version.encode(reverseOS, true); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + version = new Version(); + vByteCount += version.decode(is, true); + vByteCount += length.readEocIfIndefinite(is); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(CertificateSerialNumber.tag)) { + serialNumber = new CertificateSerialNumber(); + vByteCount += serialNumber.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(AlgorithmIdentifier.tag)) { + signature = new AlgorithmIdentifier(); + vByteCount += signature.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + issuer = new Name(); + numDecodedBytes = issuer.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (berTag.equals(Validity.tag)) { + validity = new Validity(); + vByteCount += validity.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + subject = new Name(); + numDecodedBytes = subject.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (berTag.equals(SubjectPublicKeyInfo.tag)) { + subjectPublicKeyInfo = new SubjectPublicKeyInfo(); + vByteCount += subjectPublicKeyInfo.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + issuerUniqueID = new UniqueIdentifier(); + vByteCount += issuerUniqueID.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + subjectUniqueID = new UniqueIdentifier(); + vByteCount += subjectUniqueID.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) { + vByteCount += length.decode(is); + extensions = new Extensions(); + vByteCount += extensions.decode(is, true); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (version != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("version: ").append(version); + firstSelectedElement = false; + } + + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serialNumber != null) { + sb.append("serialNumber: ").append(serialNumber); + } + else { + sb.append("serialNumber: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (signature != null) { + sb.append("signature: "); + signature.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("signature: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (issuer != null) { + sb.append("issuer: "); + issuer.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("issuer: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (validity != null) { + sb.append("validity: "); + validity.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("validity: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (subject != null) { + sb.append("subject: "); + subject.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("subject: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (subjectPublicKeyInfo != null) { + sb.append("subjectPublicKeyInfo: "); + subjectPublicKeyInfo.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("subjectPublicKeyInfo: "); + } + + if (issuerUniqueID != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("issuerUniqueID: ").append(issuerUniqueID); + } + + if (subjectUniqueID != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("subjectUniqueID: ").append(subjectUniqueID); + } + + if (extensions != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("extensions: "); + extensions.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexCommonName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexCommonName.java new file mode 100644 index 0000000..ee0f818 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexCommonName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TeletexCommonName extends BerTeletexString { + + private static final long serialVersionUID = 1L; + + public TeletexCommonName() { + } + + public TeletexCommonName(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexDomainDefinedAttribute.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexDomainDefinedAttribute.java new file mode 100644 index 0000000..9049509 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexDomainDefinedAttribute.java @@ -0,0 +1,181 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TeletexDomainDefinedAttribute implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerTeletexString type = null; + private BerTeletexString value = null; + + public TeletexDomainDefinedAttribute() { + } + + public TeletexDomainDefinedAttribute(byte[] code) { + this.code = code; + } + + public void setType(BerTeletexString type) { + this.type = type; + } + + public BerTeletexString getType() { + return type; + } + + public void setValue(BerTeletexString value) { + this.value = value; + } + + public BerTeletexString getValue() { + return value; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += value.encode(reverseOS, true); + + codeLength += type.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTeletexString.tag)) { + type = new BerTeletexString(); + vByteCount += type.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTeletexString.tag)) { + value = new BerTeletexString(); + vByteCount += value.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (type != null) { + sb.append("type: ").append(type); + } + else { + sb.append("type: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (value != null) { + sb.append("value: ").append(value); + } + else { + sb.append("value: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexDomainDefinedAttributes.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexDomainDefinedAttributes.java new file mode 100644 index 0000000..db3d4c1 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexDomainDefinedAttributes.java @@ -0,0 +1,155 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TeletexDomainDefinedAttributes implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public TeletexDomainDefinedAttributes() { + seqOf = new ArrayList<>(); + } + + public TeletexDomainDefinedAttributes(byte[] code) { + this.code = code; + } + + public List getTeletexDomainDefinedAttribute() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(TeletexDomainDefinedAttribute.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + TeletexDomainDefinedAttribute element = new TeletexDomainDefinedAttribute(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexOrganizationName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexOrganizationName.java new file mode 100644 index 0000000..4f0175b --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexOrganizationName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TeletexOrganizationName extends BerTeletexString { + + private static final long serialVersionUID = 1L; + + public TeletexOrganizationName() { + } + + public TeletexOrganizationName(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexOrganizationalUnitName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexOrganizationalUnitName.java new file mode 100644 index 0000000..22ae0e0 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexOrganizationalUnitName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TeletexOrganizationalUnitName extends BerTeletexString { + + private static final long serialVersionUID = 1L; + + public TeletexOrganizationalUnitName() { + } + + public TeletexOrganizationalUnitName(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexOrganizationalUnitNames.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexOrganizationalUnitNames.java new file mode 100644 index 0000000..d7b9d36 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexOrganizationalUnitNames.java @@ -0,0 +1,155 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TeletexOrganizationalUnitNames implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public TeletexOrganizationalUnitNames() { + seqOf = new ArrayList<>(); + } + + public TeletexOrganizationalUnitNames(byte[] code) { + this.code = code; + } + + public List getTeletexOrganizationalUnitName() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(TeletexOrganizationalUnitName.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + TeletexOrganizationalUnitName element = new TeletexOrganizationalUnitName(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexPersonalName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexPersonalName.java new file mode 100644 index 0000000..d44ae80 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TeletexPersonalName.java @@ -0,0 +1,232 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TeletexPersonalName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17); + + private byte[] code = null; + private BerTeletexString surname = null; + private BerTeletexString givenName = null; + private BerTeletexString initials = null; + private BerTeletexString generationQualifier = null; + + public TeletexPersonalName() { + } + + public TeletexPersonalName(byte[] code) { + this.code = code; + } + + public void setSurname(BerTeletexString surname) { + this.surname = surname; + } + + public BerTeletexString getSurname() { + return surname; + } + + public void setGivenName(BerTeletexString givenName) { + this.givenName = givenName; + } + + public BerTeletexString getGivenName() { + return givenName; + } + + public void setInitials(BerTeletexString initials) { + this.initials = initials; + } + + public BerTeletexString getInitials() { + return initials; + } + + public void setGenerationQualifier(BerTeletexString generationQualifier) { + this.generationQualifier = generationQualifier; + } + + public BerTeletexString getGenerationQualifier() { + return generationQualifier; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (generationQualifier != null) { + codeLength += generationQualifier.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 3 + reverseOS.write(0x83); + codeLength += 1; + } + + if (initials != null) { + codeLength += initials.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + } + + if (givenName != null) { + codeLength += givenName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + codeLength += surname.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + surname = new BerTeletexString(); + vByteCount += surname.decode(is, false); + } + else if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + givenName = new BerTeletexString(); + vByteCount += givenName.decode(is, false); + } + else if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + initials = new BerTeletexString(); + vByteCount += initials.decode(is, false); + } + else if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { + generationQualifier = new BerTeletexString(); + vByteCount += generationQualifier.decode(is, false); + } + else if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + else { + throw new IOException("Tag does not match any set component: " + berTag); + } + } + if (vByteCount != lengthVal) { + throw new IOException("Length of set does not match length tag, length tag: " + lengthVal + ", actual set length: " + vByteCount); + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (surname != null) { + sb.append("surname: ").append(surname); + } + else { + sb.append("surname: "); + } + + if (givenName != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("givenName: ").append(givenName); + } + + if (initials != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("initials: ").append(initials); + } + + if (generationQualifier != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("generationQualifier: ").append(generationQualifier); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TerminalIdentifier.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TerminalIdentifier.java new file mode 100644 index 0000000..47107ff --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TerminalIdentifier.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TerminalIdentifier extends BerPrintableString { + + private static final long serialVersionUID = 1L; + + public TerminalIdentifier() { + } + + public TerminalIdentifier(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TerminalType.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TerminalType.java new file mode 100644 index 0000000..d05f196 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/TerminalType.java @@ -0,0 +1,42 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class TerminalType extends BerInteger { + + private static final long serialVersionUID = 1L; + + public TerminalType() { + } + + public TerminalType(byte[] code) { + super(code); + } + + public TerminalType(BigInteger value) { + super(value); + } + + public TerminalType(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Time.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Time.java new file mode 100644 index 0000000..f13f120 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Time.java @@ -0,0 +1,136 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class Time implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerUtcTime utcTime = null; + private BerGeneralizedTime generalTime = null; + + public Time() { + } + + public Time(byte[] code) { + this.code = code; + } + + public void setUtcTime(BerUtcTime utcTime) { + this.utcTime = utcTime; + } + + public BerUtcTime getUtcTime() { + return utcTime; + } + + public void setGeneralTime(BerGeneralizedTime generalTime) { + this.generalTime = generalTime; + } + + public BerGeneralizedTime getGeneralTime() { + return generalTime; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (generalTime != null) { + codeLength += generalTime.encode(reverseOS, true); + return codeLength; + } + + if (utcTime != null) { + codeLength += utcTime.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerUtcTime.tag)) { + utcTime = new BerUtcTime(); + tlvByteCount += utcTime.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerGeneralizedTime.tag)) { + generalTime = new BerGeneralizedTime(); + tlvByteCount += generalTime.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (utcTime != null) { + sb.append("utcTime: ").append(utcTime); + return; + } + + if (generalTime != null) { + sb.append("generalTime: ").append(generalTime); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/UnformattedPostalAddress.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/UnformattedPostalAddress.java new file mode 100644 index 0000000..d3b59f7 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/UnformattedPostalAddress.java @@ -0,0 +1,311 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class UnformattedPostalAddress implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class PrintableAddress implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public PrintableAddress() { + seqOf = new ArrayList<>(); + } + + public PrintableAddress(byte[] code) { + this.code = code; + } + + public List getBerPrintableString() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(BerPrintableString.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + BerPrintableString element = new BerPrintableString(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17); + + private byte[] code = null; + private PrintableAddress printableAddress = null; + private BerTeletexString teletexString = null; + + public UnformattedPostalAddress() { + } + + public UnformattedPostalAddress(byte[] code) { + this.code = code; + } + + public void setPrintableAddress(PrintableAddress printableAddress) { + this.printableAddress = printableAddress; + } + + public PrintableAddress getPrintableAddress() { + return printableAddress; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + } + + if (printableAddress != null) { + codeLength += printableAddress.encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + if (lengthVal == 0) { + return tlByteCount; + } + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + if (berTag.equals(PrintableAddress.tag)) { + printableAddress = new PrintableAddress(); + vByteCount += printableAddress.decode(is, false); + } + else if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + vByteCount += teletexString.decode(is, false); + } + else if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + else { + throw new IOException("Tag does not match any set component: " + berTag); + } + } + if (vByteCount != lengthVal) { + throw new IOException("Length of set does not match length tag, length tag: " + lengthVal + ", actual set length: " + vByteCount); + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (printableAddress != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("printableAddress: "); + printableAddress.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (teletexString != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("teletexString: ").append(teletexString); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/UniqueIdentifier.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/UniqueIdentifier.java new file mode 100644 index 0000000..0be6487 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/UniqueIdentifier.java @@ -0,0 +1,42 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class UniqueIdentifier extends BerBitString { + + private static final long serialVersionUID = 1L; + + public UniqueIdentifier() { + } + + public UniqueIdentifier(byte[] code) { + super(code); + } + + public UniqueIdentifier(byte[] value, int numBits) { + super(value, numBits); + } + + public UniqueIdentifier(boolean[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/UniquePostalName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/UniquePostalName.java new file mode 100644 index 0000000..6a5f12e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/UniquePostalName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class UniquePostalName extends PDSParameter { + + private static final long serialVersionUID = 1L; + + public UniquePostalName() { + } + + public UniquePostalName(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Validity.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Validity.java new file mode 100644 index 0000000..8fdc29d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Validity.java @@ -0,0 +1,184 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class Validity implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private Time notBefore = null; + private Time notAfter = null; + + public Validity() { + } + + public Validity(byte[] code) { + this.code = code; + } + + public void setNotBefore(Time notBefore) { + this.notBefore = notBefore; + } + + public Time getNotBefore() { + return notBefore; + } + + public void setNotAfter(Time notAfter) { + this.notAfter = notAfter; + } + + public Time getNotAfter() { + return notAfter; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += notAfter.encode(reverseOS); + + codeLength += notBefore.encode(reverseOS); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + notBefore = new Time(); + numDecodedBytes = notBefore.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + notAfter = new Time(); + numDecodedBytes = notAfter.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (notBefore != null) { + sb.append("notBefore: "); + notBefore.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("notBefore: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (notAfter != null) { + sb.append("notAfter: "); + notAfter.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("notAfter: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Version.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Version.java new file mode 100644 index 0000000..356fd1a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/Version.java @@ -0,0 +1,42 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class Version extends BerInteger { + + private static final long serialVersionUID = 1L; + + public Version() { + } + + public Version(byte[] code) { + super(code); + } + + public Version(BigInteger value) { + super(value); + } + + public Version(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X121Address.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X121Address.java new file mode 100644 index 0000000..c66dd2a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X121Address.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X121Address extends BerNumericString { + + private static final long serialVersionUID = 1L; + + public X121Address() { + } + + public X121Address(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520CommonName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520CommonName.java new file mode 100644 index 0000000..179aece --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520CommonName.java @@ -0,0 +1,211 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520CommonName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerTeletexString teletexString = null; + private BerPrintableString printableString = null; + private BerUniversalString universalString = null; + private BerUTF8String utf8String = null; + private BerBMPString bmpString = null; + + public X520CommonName() { + } + + public X520CommonName(byte[] code) { + this.code = code; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setUniversalString(BerUniversalString universalString) { + this.universalString = universalString; + } + + public BerUniversalString getUniversalString() { + return universalString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (universalString != null) { + codeLength += universalString.encode(reverseOS, true); + return codeLength; + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + return codeLength; + } + + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + tlvByteCount += teletexString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + tlvByteCount += printableString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUniversalString.tag)) { + universalString = new BerUniversalString(); + tlvByteCount += universalString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (teletexString != null) { + sb.append("teletexString: ").append(teletexString); + return; + } + + if (printableString != null) { + sb.append("printableString: ").append(printableString); + return; + } + + if (universalString != null) { + sb.append("universalString: ").append(universalString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520LocalityName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520LocalityName.java new file mode 100644 index 0000000..b8cda5b --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520LocalityName.java @@ -0,0 +1,211 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520LocalityName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerTeletexString teletexString = null; + private BerPrintableString printableString = null; + private BerUniversalString universalString = null; + private BerUTF8String utf8String = null; + private BerBMPString bmpString = null; + + public X520LocalityName() { + } + + public X520LocalityName(byte[] code) { + this.code = code; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setUniversalString(BerUniversalString universalString) { + this.universalString = universalString; + } + + public BerUniversalString getUniversalString() { + return universalString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (universalString != null) { + codeLength += universalString.encode(reverseOS, true); + return codeLength; + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + return codeLength; + } + + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + tlvByteCount += teletexString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + tlvByteCount += printableString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUniversalString.tag)) { + universalString = new BerUniversalString(); + tlvByteCount += universalString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (teletexString != null) { + sb.append("teletexString: ").append(teletexString); + return; + } + + if (printableString != null) { + sb.append("printableString: ").append(printableString); + return; + } + + if (universalString != null) { + sb.append("universalString: ").append(universalString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520OrganizationName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520OrganizationName.java new file mode 100644 index 0000000..cafc1f6 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520OrganizationName.java @@ -0,0 +1,211 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520OrganizationName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerTeletexString teletexString = null; + private BerPrintableString printableString = null; + private BerUniversalString universalString = null; + private BerUTF8String utf8String = null; + private BerBMPString bmpString = null; + + public X520OrganizationName() { + } + + public X520OrganizationName(byte[] code) { + this.code = code; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setUniversalString(BerUniversalString universalString) { + this.universalString = universalString; + } + + public BerUniversalString getUniversalString() { + return universalString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (universalString != null) { + codeLength += universalString.encode(reverseOS, true); + return codeLength; + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + return codeLength; + } + + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + tlvByteCount += teletexString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + tlvByteCount += printableString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUniversalString.tag)) { + universalString = new BerUniversalString(); + tlvByteCount += universalString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (teletexString != null) { + sb.append("teletexString: ").append(teletexString); + return; + } + + if (printableString != null) { + sb.append("printableString: ").append(printableString); + return; + } + + if (universalString != null) { + sb.append("universalString: ").append(universalString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520OrganizationalUnitName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520OrganizationalUnitName.java new file mode 100644 index 0000000..02c05fa --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520OrganizationalUnitName.java @@ -0,0 +1,211 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520OrganizationalUnitName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerTeletexString teletexString = null; + private BerPrintableString printableString = null; + private BerUniversalString universalString = null; + private BerUTF8String utf8String = null; + private BerBMPString bmpString = null; + + public X520OrganizationalUnitName() { + } + + public X520OrganizationalUnitName(byte[] code) { + this.code = code; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setUniversalString(BerUniversalString universalString) { + this.universalString = universalString; + } + + public BerUniversalString getUniversalString() { + return universalString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (universalString != null) { + codeLength += universalString.encode(reverseOS, true); + return codeLength; + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + return codeLength; + } + + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + tlvByteCount += teletexString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + tlvByteCount += printableString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUniversalString.tag)) { + universalString = new BerUniversalString(); + tlvByteCount += universalString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (teletexString != null) { + sb.append("teletexString: ").append(teletexString); + return; + } + + if (printableString != null) { + sb.append("printableString: ").append(printableString); + return; + } + + if (universalString != null) { + sb.append("universalString: ").append(universalString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520Pseudonym.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520Pseudonym.java new file mode 100644 index 0000000..bd97f97 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520Pseudonym.java @@ -0,0 +1,211 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520Pseudonym implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerTeletexString teletexString = null; + private BerPrintableString printableString = null; + private BerUniversalString universalString = null; + private BerUTF8String utf8String = null; + private BerBMPString bmpString = null; + + public X520Pseudonym() { + } + + public X520Pseudonym(byte[] code) { + this.code = code; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setUniversalString(BerUniversalString universalString) { + this.universalString = universalString; + } + + public BerUniversalString getUniversalString() { + return universalString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (universalString != null) { + codeLength += universalString.encode(reverseOS, true); + return codeLength; + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + return codeLength; + } + + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + tlvByteCount += teletexString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + tlvByteCount += printableString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUniversalString.tag)) { + universalString = new BerUniversalString(); + tlvByteCount += universalString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (teletexString != null) { + sb.append("teletexString: ").append(teletexString); + return; + } + + if (printableString != null) { + sb.append("printableString: ").append(printableString); + return; + } + + if (universalString != null) { + sb.append("universalString: ").append(universalString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520SerialNumber.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520SerialNumber.java new file mode 100644 index 0000000..434faf5 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520SerialNumber.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520SerialNumber extends BerPrintableString { + + private static final long serialVersionUID = 1L; + + public X520SerialNumber() { + } + + public X520SerialNumber(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520StateOrProvinceName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520StateOrProvinceName.java new file mode 100644 index 0000000..d82acdc --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520StateOrProvinceName.java @@ -0,0 +1,211 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520StateOrProvinceName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerTeletexString teletexString = null; + private BerPrintableString printableString = null; + private BerUniversalString universalString = null; + private BerUTF8String utf8String = null; + private BerBMPString bmpString = null; + + public X520StateOrProvinceName() { + } + + public X520StateOrProvinceName(byte[] code) { + this.code = code; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setUniversalString(BerUniversalString universalString) { + this.universalString = universalString; + } + + public BerUniversalString getUniversalString() { + return universalString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (universalString != null) { + codeLength += universalString.encode(reverseOS, true); + return codeLength; + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + return codeLength; + } + + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + tlvByteCount += teletexString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + tlvByteCount += printableString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUniversalString.tag)) { + universalString = new BerUniversalString(); + tlvByteCount += universalString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (teletexString != null) { + sb.append("teletexString: ").append(teletexString); + return; + } + + if (printableString != null) { + sb.append("printableString: ").append(printableString); + return; + } + + if (universalString != null) { + sb.append("universalString: ").append(universalString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520Title.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520Title.java new file mode 100644 index 0000000..22e9964 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520Title.java @@ -0,0 +1,211 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520Title implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerTeletexString teletexString = null; + private BerPrintableString printableString = null; + private BerUniversalString universalString = null; + private BerUTF8String utf8String = null; + private BerBMPString bmpString = null; + + public X520Title() { + } + + public X520Title(byte[] code) { + this.code = code; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setUniversalString(BerUniversalString universalString) { + this.universalString = universalString; + } + + public BerUniversalString getUniversalString() { + return universalString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (universalString != null) { + codeLength += universalString.encode(reverseOS, true); + return codeLength; + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + return codeLength; + } + + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + tlvByteCount += teletexString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + tlvByteCount += printableString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUniversalString.tag)) { + universalString = new BerUniversalString(); + tlvByteCount += universalString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (teletexString != null) { + sb.append("teletexString: ").append(teletexString); + return; + } + + if (printableString != null) { + sb.append("printableString: ").append(printableString); + return; + } + + if (universalString != null) { + sb.append("universalString: ").append(universalString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520countryName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520countryName.java new file mode 100644 index 0000000..b4a5341 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520countryName.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520countryName extends BerPrintableString { + + private static final long serialVersionUID = 1L; + + public X520countryName() { + } + + public X520countryName(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520dnQualifier.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520dnQualifier.java new file mode 100644 index 0000000..5dd4563 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520dnQualifier.java @@ -0,0 +1,34 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520dnQualifier extends BerPrintableString { + + private static final long serialVersionUID = 1L; + + public X520dnQualifier() { + } + + public X520dnQualifier(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520name.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520name.java new file mode 100644 index 0000000..e74fa91 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1explicit88/X520name.java @@ -0,0 +1,211 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1explicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + + +public class X520name implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerTeletexString teletexString = null; + private BerPrintableString printableString = null; + private BerUniversalString universalString = null; + private BerUTF8String utf8String = null; + private BerBMPString bmpString = null; + + public X520name() { + } + + public X520name(byte[] code) { + this.code = code; + } + + public void setTeletexString(BerTeletexString teletexString) { + this.teletexString = teletexString; + } + + public BerTeletexString getTeletexString() { + return teletexString; + } + + public void setPrintableString(BerPrintableString printableString) { + this.printableString = printableString; + } + + public BerPrintableString getPrintableString() { + return printableString; + } + + public void setUniversalString(BerUniversalString universalString) { + this.universalString = universalString; + } + + public BerUniversalString getUniversalString() { + return universalString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (universalString != null) { + codeLength += universalString.encode(reverseOS, true); + return codeLength; + } + + if (printableString != null) { + codeLength += printableString.encode(reverseOS, true); + return codeLength; + } + + if (teletexString != null) { + codeLength += teletexString.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTeletexString.tag)) { + teletexString = new BerTeletexString(); + tlvByteCount += teletexString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerPrintableString.tag)) { + printableString = new BerPrintableString(); + tlvByteCount += printableString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUniversalString.tag)) { + universalString = new BerUniversalString(); + tlvByteCount += universalString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (teletexString != null) { + sb.append("teletexString: ").append(teletexString); + return; + } + + if (printableString != null) { + sb.append("printableString: ").append(printableString); + return; + } + + if (universalString != null) { + sb.append("universalString: ").append(universalString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AccessDescription.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AccessDescription.java new file mode 100644 index 0000000..3562f9b --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AccessDescription.java @@ -0,0 +1,189 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class AccessDescription implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerObjectIdentifier accessMethod = null; + private GeneralName accessLocation = null; + + public AccessDescription() { + } + + public AccessDescription(byte[] code) { + this.code = code; + } + + public void setAccessMethod(BerObjectIdentifier accessMethod) { + this.accessMethod = accessMethod; + } + + public BerObjectIdentifier getAccessMethod() { + return accessMethod; + } + + public void setAccessLocation(GeneralName accessLocation) { + this.accessLocation = accessLocation; + } + + public GeneralName getAccessLocation() { + return accessLocation; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += accessLocation.encode(reverseOS); + + codeLength += accessMethod.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerObjectIdentifier.tag)) { + accessMethod = new BerObjectIdentifier(); + vByteCount += accessMethod.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + accessLocation = new GeneralName(); + numDecodedBytes = accessLocation.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (accessMethod != null) { + sb.append("accessMethod: ").append(accessMethod); + } + else { + sb.append("accessMethod: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (accessLocation != null) { + sb.append("accessLocation: "); + accessLocation.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("accessLocation: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AnotherName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AnotherName.java new file mode 100644 index 0000000..832fc42 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AnotherName.java @@ -0,0 +1,196 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class AnotherName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerObjectIdentifier typeId = null; + private BerAny value = null; + + public AnotherName() { + } + + public AnotherName(byte[] code) { + this.code = code; + } + + public void setTypeId(BerObjectIdentifier typeId) { + this.typeId = typeId; + } + + public BerObjectIdentifier getTypeId() { + return typeId; + } + + public void setValue(BerAny value) { + this.value = value; + } + + public BerAny getValue() { + return value; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + sublength = value.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + + codeLength += typeId.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerObjectIdentifier.tag)) { + typeId = new BerObjectIdentifier(); + vByteCount += typeId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + value = new BerAny(); + vByteCount += value.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (typeId != null) { + sb.append("typeId: ").append(typeId); + } + else { + sb.append("typeId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (value != null) { + sb.append("value: ").append(value); + } + else { + sb.append("value: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AuthorityInfoAccessSyntax.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AuthorityInfoAccessSyntax.java new file mode 100644 index 0000000..12ecaf8 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AuthorityInfoAccessSyntax.java @@ -0,0 +1,161 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class AuthorityInfoAccessSyntax implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public AuthorityInfoAccessSyntax() { + seqOf = new ArrayList<>(); + } + + public AuthorityInfoAccessSyntax(byte[] code) { + this.code = code; + } + + public List getAccessDescription() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(AccessDescription.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + AccessDescription element = new AccessDescription(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AuthorityKeyIdentifier.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AuthorityKeyIdentifier.java new file mode 100644 index 0000000..59d2e30 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/AuthorityKeyIdentifier.java @@ -0,0 +1,232 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class AuthorityKeyIdentifier implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private KeyIdentifier keyIdentifier = null; + private GeneralNames authorityCertIssuer = null; + private CertificateSerialNumber authorityCertSerialNumber = null; + + public AuthorityKeyIdentifier() { + } + + public AuthorityKeyIdentifier(byte[] code) { + this.code = code; + } + + public void setKeyIdentifier(KeyIdentifier keyIdentifier) { + this.keyIdentifier = keyIdentifier; + } + + public KeyIdentifier getKeyIdentifier() { + return keyIdentifier; + } + + public void setAuthorityCertIssuer(GeneralNames authorityCertIssuer) { + this.authorityCertIssuer = authorityCertIssuer; + } + + public GeneralNames getAuthorityCertIssuer() { + return authorityCertIssuer; + } + + public void setAuthorityCertSerialNumber(CertificateSerialNumber authorityCertSerialNumber) { + this.authorityCertSerialNumber = authorityCertSerialNumber; + } + + public CertificateSerialNumber getAuthorityCertSerialNumber() { + return authorityCertSerialNumber; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (authorityCertSerialNumber != null) { + codeLength += authorityCertSerialNumber.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + } + + if (authorityCertIssuer != null) { + codeLength += authorityCertIssuer.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + } + + if (keyIdentifier != null) { + codeLength += keyIdentifier.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + keyIdentifier = new KeyIdentifier(); + vByteCount += keyIdentifier.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + authorityCertIssuer = new GeneralNames(); + vByteCount += authorityCertIssuer.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + authorityCertSerialNumber = new CertificateSerialNumber(); + vByteCount += authorityCertSerialNumber.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (keyIdentifier != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("keyIdentifier: ").append(keyIdentifier); + firstSelectedElement = false; + } + + if (authorityCertIssuer != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("authorityCertIssuer: "); + authorityCertIssuer.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (authorityCertSerialNumber != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("authorityCertSerialNumber: ").append(authorityCertSerialNumber); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/BaseCRLNumber.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/BaseCRLNumber.java new file mode 100644 index 0000000..38c82a9 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/BaseCRLNumber.java @@ -0,0 +1,48 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class BaseCRLNumber extends CRLNumber { + + private static final long serialVersionUID = 1L; + + public BaseCRLNumber() { + } + + public BaseCRLNumber(byte[] code) { + super(code); + } + + public BaseCRLNumber(BigInteger value) { + super(value); + } + + public BaseCRLNumber(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/BaseDistance.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/BaseDistance.java new file mode 100644 index 0000000..9b7baef --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/BaseDistance.java @@ -0,0 +1,48 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class BaseDistance extends BerInteger { + + private static final long serialVersionUID = 1L; + + public BaseDistance() { + } + + public BaseDistance(byte[] code) { + super(code); + } + + public BaseDistance(BigInteger value) { + super(value); + } + + public BaseDistance(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/BasicConstraints.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/BasicConstraints.java new file mode 100644 index 0000000..a7e7e33 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/BasicConstraints.java @@ -0,0 +1,189 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class BasicConstraints implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerBoolean cA = null; + private BerInteger pathLenConstraint = null; + + public BasicConstraints() { + } + + public BasicConstraints(byte[] code) { + this.code = code; + } + + public void setCA(BerBoolean cA) { + this.cA = cA; + } + + public BerBoolean getCA() { + return cA; + } + + public void setPathLenConstraint(BerInteger pathLenConstraint) { + this.pathLenConstraint = pathLenConstraint; + } + + public BerInteger getPathLenConstraint() { + return pathLenConstraint; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (pathLenConstraint != null) { + codeLength += pathLenConstraint.encode(reverseOS, true); + } + + if (cA != null) { + codeLength += cA.encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerBoolean.tag)) { + cA = new BerBoolean(); + vByteCount += cA.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerInteger.tag)) { + pathLenConstraint = new BerInteger(); + vByteCount += pathLenConstraint.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (cA != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("cA: ").append(cA); + firstSelectedElement = false; + } + + if (pathLenConstraint != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("pathLenConstraint: ").append(pathLenConstraint); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CPSuri.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CPSuri.java new file mode 100644 index 0000000..6e5d70f --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CPSuri.java @@ -0,0 +1,40 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class CPSuri extends BerIA5String { + + private static final long serialVersionUID = 1L; + + public CPSuri() { + } + + public CPSuri(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CRLDistributionPoints.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CRLDistributionPoints.java new file mode 100644 index 0000000..f872c14 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CRLDistributionPoints.java @@ -0,0 +1,161 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class CRLDistributionPoints implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public CRLDistributionPoints() { + seqOf = new ArrayList<>(); + } + + public CRLDistributionPoints(byte[] code) { + this.code = code; + } + + public List getDistributionPoint() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(DistributionPoint.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + DistributionPoint element = new DistributionPoint(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CRLNumber.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CRLNumber.java new file mode 100644 index 0000000..9dca490 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CRLNumber.java @@ -0,0 +1,48 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class CRLNumber extends BerInteger { + + private static final long serialVersionUID = 1L; + + public CRLNumber() { + } + + public CRLNumber(byte[] code) { + super(code); + } + + public CRLNumber(BigInteger value) { + super(value); + } + + public CRLNumber(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CRLReason.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CRLReason.java new file mode 100644 index 0000000..0b62fbd --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CRLReason.java @@ -0,0 +1,48 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class CRLReason extends BerEnum { + + private static final long serialVersionUID = 1L; + + public CRLReason() { + } + + public CRLReason(byte[] code) { + super(code); + } + + public CRLReason(BigInteger value) { + super(value); + } + + public CRLReason(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CertPolicyId.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CertPolicyId.java new file mode 100644 index 0000000..c3cdb87 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CertPolicyId.java @@ -0,0 +1,44 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class CertPolicyId extends BerObjectIdentifier { + + private static final long serialVersionUID = 1L; + + public CertPolicyId() { + } + + public CertPolicyId(byte[] code) { + super(code); + } + + public CertPolicyId(int[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CertificateIssuer.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CertificateIssuer.java new file mode 100644 index 0000000..5b2703b --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CertificateIssuer.java @@ -0,0 +1,40 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class CertificateIssuer extends GeneralNames { + + private static final long serialVersionUID = 1L; + + public CertificateIssuer() { + } + + public CertificateIssuer(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CertificatePolicies.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CertificatePolicies.java new file mode 100644 index 0000000..65d70c5 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/CertificatePolicies.java @@ -0,0 +1,161 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class CertificatePolicies implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public CertificatePolicies() { + seqOf = new ArrayList<>(); + } + + public CertificatePolicies(byte[] code) { + this.code = code; + } + + public List getPolicyInformation() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(PolicyInformation.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + PolicyInformation element = new PolicyInformation(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/DisplayText.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/DisplayText.java new file mode 100644 index 0000000..ef5561e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/DisplayText.java @@ -0,0 +1,192 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class DisplayText implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerIA5String ia5String = null; + private BerVisibleString visibleString = null; + private BerBMPString bmpString = null; + private BerUTF8String utf8String = null; + + public DisplayText() { + } + + public DisplayText(byte[] code) { + this.code = code; + } + + public void setIa5String(BerIA5String ia5String) { + this.ia5String = ia5String; + } + + public BerIA5String getIa5String() { + return ia5String; + } + + public void setVisibleString(BerVisibleString visibleString) { + this.visibleString = visibleString; + } + + public BerVisibleString getVisibleString() { + return visibleString; + } + + public void setBmpString(BerBMPString bmpString) { + this.bmpString = bmpString; + } + + public BerBMPString getBmpString() { + return bmpString; + } + + public void setUtf8String(BerUTF8String utf8String) { + this.utf8String = utf8String; + } + + public BerUTF8String getUtf8String() { + return utf8String; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (utf8String != null) { + codeLength += utf8String.encode(reverseOS, true); + return codeLength; + } + + if (bmpString != null) { + codeLength += bmpString.encode(reverseOS, true); + return codeLength; + } + + if (visibleString != null) { + codeLength += visibleString.encode(reverseOS, true); + return codeLength; + } + + if (ia5String != null) { + codeLength += ia5String.encode(reverseOS, true); + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerIA5String.tag)) { + ia5String = new BerIA5String(); + tlvByteCount += ia5String.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerVisibleString.tag)) { + visibleString = new BerVisibleString(); + tlvByteCount += visibleString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerBMPString.tag)) { + bmpString = new BerBMPString(); + tlvByteCount += bmpString.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerUTF8String.tag)) { + utf8String = new BerUTF8String(); + tlvByteCount += utf8String.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (ia5String != null) { + sb.append("ia5String: ").append(ia5String); + return; + } + + if (visibleString != null) { + sb.append("visibleString: ").append(visibleString); + return; + } + + if (bmpString != null) { + sb.append("bmpString: ").append(bmpString); + return; + } + + if (utf8String != null) { + sb.append("utf8String: ").append(utf8String); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/DistributionPoint.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/DistributionPoint.java new file mode 100644 index 0000000..d9c8ac6 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/DistributionPoint.java @@ -0,0 +1,239 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class DistributionPoint implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private DistributionPointName distributionPoint = null; + private ReasonFlags reasons = null; + private GeneralNames cRLIssuer = null; + + public DistributionPoint() { + } + + public DistributionPoint(byte[] code) { + this.code = code; + } + + public void setDistributionPoint(DistributionPointName distributionPoint) { + this.distributionPoint = distributionPoint; + } + + public DistributionPointName getDistributionPoint() { + return distributionPoint; + } + + public void setReasons(ReasonFlags reasons) { + this.reasons = reasons; + } + + public ReasonFlags getReasons() { + return reasons; + } + + public void setCRLIssuer(GeneralNames cRLIssuer) { + this.cRLIssuer = cRLIssuer; + } + + public GeneralNames getCRLIssuer() { + return cRLIssuer; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + if (cRLIssuer != null) { + codeLength += cRLIssuer.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 2 + reverseOS.write(0xA2); + codeLength += 1; + } + + if (reasons != null) { + codeLength += reasons.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + if (distributionPoint != null) { + sublength = distributionPoint.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + distributionPoint = new DistributionPointName(); + vByteCount += distributionPoint.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + reasons = new ReasonFlags(); + vByteCount += reasons.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) { + cRLIssuer = new GeneralNames(); + vByteCount += cRLIssuer.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (distributionPoint != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("distributionPoint: "); + distributionPoint.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (reasons != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("reasons: ").append(reasons); + firstSelectedElement = false; + } + + if (cRLIssuer != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("cRLIssuer: "); + cRLIssuer.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/DistributionPointName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/DistributionPointName.java new file mode 100644 index 0000000..4137519 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/DistributionPointName.java @@ -0,0 +1,150 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class DistributionPointName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private GeneralNames fullName = null; + private RelativeDistinguishedName nameRelativeToCRLIssuer = null; + + public DistributionPointName() { + } + + public DistributionPointName(byte[] code) { + this.code = code; + } + + public void setFullName(GeneralNames fullName) { + this.fullName = fullName; + } + + public GeneralNames getFullName() { + return fullName; + } + + public void setNameRelativeToCRLIssuer(RelativeDistinguishedName nameRelativeToCRLIssuer) { + this.nameRelativeToCRLIssuer = nameRelativeToCRLIssuer; + } + + public RelativeDistinguishedName getNameRelativeToCRLIssuer() { + return nameRelativeToCRLIssuer; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (nameRelativeToCRLIssuer != null) { + codeLength += nameRelativeToCRLIssuer.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + return codeLength; + } + + if (fullName != null) { + codeLength += fullName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + fullName = new GeneralNames(); + tlvByteCount += fullName.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + nameRelativeToCRLIssuer = new RelativeDistinguishedName(); + tlvByteCount += nameRelativeToCRLIssuer.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (fullName != null) { + sb.append("fullName: "); + fullName.appendAsString(sb, indentLevel + 1); + return; + } + + if (nameRelativeToCRLIssuer != null) { + sb.append("nameRelativeToCRLIssuer: "); + nameRelativeToCRLIssuer.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/EDIPartyName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/EDIPartyName.java new file mode 100644 index 0000000..06c80bc --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/EDIPartyName.java @@ -0,0 +1,205 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class EDIPartyName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private DirectoryString nameAssigner = null; + private DirectoryString partyName = null; + + public EDIPartyName() { + } + + public EDIPartyName(byte[] code) { + this.code = code; + } + + public void setNameAssigner(DirectoryString nameAssigner) { + this.nameAssigner = nameAssigner; + } + + public DirectoryString getNameAssigner() { + return nameAssigner; + } + + public void setPartyName(DirectoryString partyName) { + this.partyName = partyName; + } + + public DirectoryString getPartyName() { + return partyName; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + sublength = partyName.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + + if (nameAssigner != null) { + sublength = nameAssigner.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + nameAssigner = new DirectoryString(); + vByteCount += nameAssigner.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + vByteCount += length.decode(is); + partyName = new DirectoryString(); + vByteCount += partyName.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (nameAssigner != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("nameAssigner: "); + nameAssigner.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (partyName != null) { + sb.append("partyName: "); + partyName.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("partyName: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/ExtKeyUsageSyntax.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/ExtKeyUsageSyntax.java new file mode 100644 index 0000000..470fb6a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/ExtKeyUsageSyntax.java @@ -0,0 +1,161 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class ExtKeyUsageSyntax implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public ExtKeyUsageSyntax() { + seqOf = new ArrayList<>(); + } + + public ExtKeyUsageSyntax(byte[] code) { + this.code = code; + } + + public List getKeyPurposeId() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(KeyPurposeId.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + KeyPurposeId element = new KeyPurposeId(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/FreshestCRL.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/FreshestCRL.java new file mode 100644 index 0000000..70b5b36 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/FreshestCRL.java @@ -0,0 +1,40 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class FreshestCRL extends CRLDistributionPoints { + + private static final long serialVersionUID = 1L; + + public FreshestCRL() { + } + + public FreshestCRL(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralName.java new file mode 100644 index 0000000..69fafef --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralName.java @@ -0,0 +1,355 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class GeneralName implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private AnotherName otherName = null; + private BerIA5String rfc822Name = null; + private BerIA5String dNSName = null; + private ORAddress x400Address = null; + private Name directoryName = null; + private EDIPartyName ediPartyName = null; + private BerIA5String uniformResourceIdentifier = null; + private BerOctetString iPAddress = null; + private BerObjectIdentifier registeredID = null; + + public GeneralName() { + } + + public GeneralName(byte[] code) { + this.code = code; + } + + public void setOtherName(AnotherName otherName) { + this.otherName = otherName; + } + + public AnotherName getOtherName() { + return otherName; + } + + public void setRfc822Name(BerIA5String rfc822Name) { + this.rfc822Name = rfc822Name; + } + + public BerIA5String getRfc822Name() { + return rfc822Name; + } + + public void setDNSName(BerIA5String dNSName) { + this.dNSName = dNSName; + } + + public BerIA5String getDNSName() { + return dNSName; + } + + public void setX400Address(ORAddress x400Address) { + this.x400Address = x400Address; + } + + public ORAddress getX400Address() { + return x400Address; + } + + public void setDirectoryName(Name directoryName) { + this.directoryName = directoryName; + } + + public Name getDirectoryName() { + return directoryName; + } + + public void setEdiPartyName(EDIPartyName ediPartyName) { + this.ediPartyName = ediPartyName; + } + + public EDIPartyName getEdiPartyName() { + return ediPartyName; + } + + public void setUniformResourceIdentifier(BerIA5String uniformResourceIdentifier) { + this.uniformResourceIdentifier = uniformResourceIdentifier; + } + + public BerIA5String getUniformResourceIdentifier() { + return uniformResourceIdentifier; + } + + public void setIPAddress(BerOctetString iPAddress) { + this.iPAddress = iPAddress; + } + + public BerOctetString getIPAddress() { + return iPAddress; + } + + public void setRegisteredID(BerObjectIdentifier registeredID) { + this.registeredID = registeredID; + } + + public BerObjectIdentifier getRegisteredID() { + return registeredID; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + int sublength; + + if (registeredID != null) { + codeLength += registeredID.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 8 + reverseOS.write(0x88); + codeLength += 1; + return codeLength; + } + + if (iPAddress != null) { + codeLength += iPAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 7 + reverseOS.write(0x87); + codeLength += 1; + return codeLength; + } + + if (uniformResourceIdentifier != null) { + codeLength += uniformResourceIdentifier.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 6 + reverseOS.write(0x86); + codeLength += 1; + return codeLength; + } + + if (ediPartyName != null) { + codeLength += ediPartyName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 5 + reverseOS.write(0xA5); + codeLength += 1; + return codeLength; + } + + if (directoryName != null) { + sublength = directoryName.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 4 + reverseOS.write(0xA4); + codeLength += 1; + return codeLength; + } + + if (x400Address != null) { + codeLength += x400Address.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 3 + reverseOS.write(0xA3); + codeLength += 1; + return codeLength; + } + + if (dNSName != null) { + codeLength += dNSName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + return codeLength; + } + + if (rfc822Name != null) { + codeLength += rfc822Name.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + return codeLength; + } + + if (otherName != null) { + codeLength += otherName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + otherName = new AnotherName(); + tlvByteCount += otherName.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + rfc822Name = new BerIA5String(); + tlvByteCount += rfc822Name.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + dNSName = new BerIA5String(); + tlvByteCount += dNSName.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) { + x400Address = new ORAddress(); + tlvByteCount += x400Address.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 4)) { + BerLength length = new BerLength(); + tlvByteCount += length.decode(is); + directoryName = new Name(); + tlvByteCount += directoryName.decode(is, null); + tlvByteCount += length.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 5)) { + ediPartyName = new EDIPartyName(); + tlvByteCount += ediPartyName.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 6)) { + uniformResourceIdentifier = new BerIA5String(); + tlvByteCount += uniformResourceIdentifier.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 7)) { + iPAddress = new BerOctetString(); + tlvByteCount += iPAddress.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 8)) { + registeredID = new BerObjectIdentifier(); + tlvByteCount += registeredID.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (otherName != null) { + sb.append("otherName: "); + otherName.appendAsString(sb, indentLevel + 1); + return; + } + + if (rfc822Name != null) { + sb.append("rfc822Name: ").append(rfc822Name); + return; + } + + if (dNSName != null) { + sb.append("dNSName: ").append(dNSName); + return; + } + + if (x400Address != null) { + sb.append("x400Address: "); + x400Address.appendAsString(sb, indentLevel + 1); + return; + } + + if (directoryName != null) { + sb.append("directoryName: "); + directoryName.appendAsString(sb, indentLevel + 1); + return; + } + + if (ediPartyName != null) { + sb.append("ediPartyName: "); + ediPartyName.appendAsString(sb, indentLevel + 1); + return; + } + + if (uniformResourceIdentifier != null) { + sb.append("uniformResourceIdentifier: ").append(uniformResourceIdentifier); + return; + } + + if (iPAddress != null) { + sb.append("iPAddress: ").append(iPAddress); + return; + } + + if (registeredID != null) { + sb.append("registeredID: ").append(registeredID); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralNames.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralNames.java new file mode 100644 index 0000000..391568b --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralNames.java @@ -0,0 +1,163 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class GeneralNames implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public GeneralNames() { + seqOf = new ArrayList<>(); + } + + public GeneralNames(byte[] code) { + this.code = code; + } + + public List getGeneralName() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + GeneralName element = new GeneralName(); + numDecodedBytes = element.decode(is, berTag); + if (numDecodedBytes == 0) { + throw new IOException("Tag did not match"); + } + vByteCount += numDecodedBytes; + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralSubtree.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralSubtree.java new file mode 100644 index 0000000..09ed623 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralSubtree.java @@ -0,0 +1,224 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class GeneralSubtree implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private GeneralName base = null; + private BaseDistance minimum = null; + private BaseDistance maximum = null; + + public GeneralSubtree() { + } + + public GeneralSubtree(byte[] code) { + this.code = code; + } + + public void setBase(GeneralName base) { + this.base = base; + } + + public GeneralName getBase() { + return base; + } + + public void setMinimum(BaseDistance minimum) { + this.minimum = minimum; + } + + public BaseDistance getMinimum() { + return minimum; + } + + public void setMaximum(BaseDistance maximum) { + this.maximum = maximum; + } + + public BaseDistance getMaximum() { + return maximum; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (maximum != null) { + codeLength += maximum.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + if (minimum != null) { + codeLength += minimum.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + } + + codeLength += base.encode(reverseOS); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + base = new GeneralName(); + numDecodedBytes = base.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + minimum = new BaseDistance(); + vByteCount += minimum.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + maximum = new BaseDistance(); + vByteCount += maximum.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (base != null) { + sb.append("base: "); + base.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("base: "); + } + + if (minimum != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("minimum: ").append(minimum); + } + + if (maximum != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("maximum: ").append(maximum); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralSubtrees.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralSubtrees.java new file mode 100644 index 0000000..a0133ae --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/GeneralSubtrees.java @@ -0,0 +1,161 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class GeneralSubtrees implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public GeneralSubtrees() { + seqOf = new ArrayList<>(); + } + + public GeneralSubtrees(byte[] code) { + this.code = code; + } + + public List getGeneralSubtree() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(GeneralSubtree.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + GeneralSubtree element = new GeneralSubtree(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/HoldInstructionCode.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/HoldInstructionCode.java new file mode 100644 index 0000000..4709f35 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/HoldInstructionCode.java @@ -0,0 +1,44 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class HoldInstructionCode extends BerObjectIdentifier { + + private static final long serialVersionUID = 1L; + + public HoldInstructionCode() { + } + + public HoldInstructionCode(byte[] code) { + super(code); + } + + public HoldInstructionCode(int[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/InhibitAnyPolicy.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/InhibitAnyPolicy.java new file mode 100644 index 0000000..9985246 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/InhibitAnyPolicy.java @@ -0,0 +1,48 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class InhibitAnyPolicy extends SkipCerts { + + private static final long serialVersionUID = 1L; + + public InhibitAnyPolicy() { + } + + public InhibitAnyPolicy(byte[] code) { + super(code); + } + + public InhibitAnyPolicy(BigInteger value) { + super(value); + } + + public InhibitAnyPolicy(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/InvalidityDate.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/InvalidityDate.java new file mode 100644 index 0000000..0bffaed --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/InvalidityDate.java @@ -0,0 +1,40 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class InvalidityDate extends BerGeneralizedTime { + + private static final long serialVersionUID = 1L; + + public InvalidityDate() { + } + + public InvalidityDate(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/IssuerAltName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/IssuerAltName.java new file mode 100644 index 0000000..ca83d66 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/IssuerAltName.java @@ -0,0 +1,40 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class IssuerAltName extends GeneralNames { + + private static final long serialVersionUID = 1L; + + public IssuerAltName() { + } + + public IssuerAltName(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/IssuingDistributionPoint.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/IssuingDistributionPoint.java new file mode 100644 index 0000000..b0fc77f --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/IssuingDistributionPoint.java @@ -0,0 +1,346 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class IssuingDistributionPoint implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private DistributionPointName distributionPoint = null; + private BerBoolean onlyContainsUserCerts = null; + private BerBoolean onlyContainsCACerts = null; + private ReasonFlags onlySomeReasons = null; + private BerBoolean indirectCRL = null; + private BerBoolean onlyContainsAttributeCerts = null; + + public IssuingDistributionPoint() { + } + + public IssuingDistributionPoint(byte[] code) { + this.code = code; + } + + public void setDistributionPoint(DistributionPointName distributionPoint) { + this.distributionPoint = distributionPoint; + } + + public DistributionPointName getDistributionPoint() { + return distributionPoint; + } + + public void setOnlyContainsUserCerts(BerBoolean onlyContainsUserCerts) { + this.onlyContainsUserCerts = onlyContainsUserCerts; + } + + public BerBoolean getOnlyContainsUserCerts() { + return onlyContainsUserCerts; + } + + public void setOnlyContainsCACerts(BerBoolean onlyContainsCACerts) { + this.onlyContainsCACerts = onlyContainsCACerts; + } + + public BerBoolean getOnlyContainsCACerts() { + return onlyContainsCACerts; + } + + public void setOnlySomeReasons(ReasonFlags onlySomeReasons) { + this.onlySomeReasons = onlySomeReasons; + } + + public ReasonFlags getOnlySomeReasons() { + return onlySomeReasons; + } + + public void setIndirectCRL(BerBoolean indirectCRL) { + this.indirectCRL = indirectCRL; + } + + public BerBoolean getIndirectCRL() { + return indirectCRL; + } + + public void setOnlyContainsAttributeCerts(BerBoolean onlyContainsAttributeCerts) { + this.onlyContainsAttributeCerts = onlyContainsAttributeCerts; + } + + public BerBoolean getOnlyContainsAttributeCerts() { + return onlyContainsAttributeCerts; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + if (onlyContainsAttributeCerts != null) { + codeLength += onlyContainsAttributeCerts.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 5 + reverseOS.write(0x85); + codeLength += 1; + } + + if (indirectCRL != null) { + codeLength += indirectCRL.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 4 + reverseOS.write(0x84); + codeLength += 1; + } + + if (onlySomeReasons != null) { + codeLength += onlySomeReasons.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 3 + reverseOS.write(0x83); + codeLength += 1; + } + + if (onlyContainsCACerts != null) { + codeLength += onlyContainsCACerts.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + } + + if (onlyContainsUserCerts != null) { + codeLength += onlyContainsUserCerts.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + if (distributionPoint != null) { + sublength = distributionPoint.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + distributionPoint = new DistributionPointName(); + vByteCount += distributionPoint.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + onlyContainsUserCerts = new BerBoolean(); + vByteCount += onlyContainsUserCerts.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + onlyContainsCACerts = new BerBoolean(); + vByteCount += onlyContainsCACerts.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { + onlySomeReasons = new ReasonFlags(); + vByteCount += onlySomeReasons.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 4)) { + indirectCRL = new BerBoolean(); + vByteCount += indirectCRL.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 5)) { + onlyContainsAttributeCerts = new BerBoolean(); + vByteCount += onlyContainsAttributeCerts.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (distributionPoint != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("distributionPoint: "); + distributionPoint.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (onlyContainsUserCerts != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("onlyContainsUserCerts: ").append(onlyContainsUserCerts); + firstSelectedElement = false; + } + + if (onlyContainsCACerts != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("onlyContainsCACerts: ").append(onlyContainsCACerts); + firstSelectedElement = false; + } + + if (onlySomeReasons != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("onlySomeReasons: ").append(onlySomeReasons); + firstSelectedElement = false; + } + + if (indirectCRL != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("indirectCRL: ").append(indirectCRL); + firstSelectedElement = false; + } + + if (onlyContainsAttributeCerts != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("onlyContainsAttributeCerts: ").append(onlyContainsAttributeCerts); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/KeyIdentifier.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/KeyIdentifier.java new file mode 100644 index 0000000..462dfef --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/KeyIdentifier.java @@ -0,0 +1,40 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class KeyIdentifier extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public KeyIdentifier() { + } + + public KeyIdentifier(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/KeyPurposeId.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/KeyPurposeId.java new file mode 100644 index 0000000..96ec9b8 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/KeyPurposeId.java @@ -0,0 +1,44 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class KeyPurposeId extends BerObjectIdentifier { + + private static final long serialVersionUID = 1L; + + public KeyPurposeId() { + } + + public KeyPurposeId(byte[] code) { + super(code); + } + + public KeyPurposeId(int[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/KeyUsage.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/KeyUsage.java new file mode 100644 index 0000000..6af7d88 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/KeyUsage.java @@ -0,0 +1,48 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class KeyUsage extends BerBitString { + + private static final long serialVersionUID = 1L; + + public KeyUsage() { + } + + public KeyUsage(byte[] code) { + super(code); + } + + public KeyUsage(byte[] value, int numBits) { + super(value, numBits); + } + + public KeyUsage(boolean[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/NameConstraints.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/NameConstraints.java new file mode 100644 index 0000000..e7f1c55 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/NameConstraints.java @@ -0,0 +1,197 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class NameConstraints implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private GeneralSubtrees permittedSubtrees = null; + private GeneralSubtrees excludedSubtrees = null; + + public NameConstraints() { + } + + public NameConstraints(byte[] code) { + this.code = code; + } + + public void setPermittedSubtrees(GeneralSubtrees permittedSubtrees) { + this.permittedSubtrees = permittedSubtrees; + } + + public GeneralSubtrees getPermittedSubtrees() { + return permittedSubtrees; + } + + public void setExcludedSubtrees(GeneralSubtrees excludedSubtrees) { + this.excludedSubtrees = excludedSubtrees; + } + + public GeneralSubtrees getExcludedSubtrees() { + return excludedSubtrees; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (excludedSubtrees != null) { + codeLength += excludedSubtrees.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + } + + if (permittedSubtrees != null) { + codeLength += permittedSubtrees.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + permittedSubtrees = new GeneralSubtrees(); + vByteCount += permittedSubtrees.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + excludedSubtrees = new GeneralSubtrees(); + vByteCount += excludedSubtrees.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (permittedSubtrees != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("permittedSubtrees: "); + permittedSubtrees.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (excludedSubtrees != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("excludedSubtrees: "); + excludedSubtrees.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/NoticeReference.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/NoticeReference.java new file mode 100644 index 0000000..8a81d19 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/NoticeReference.java @@ -0,0 +1,323 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class NoticeReference implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class NoticeNumbers implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public NoticeNumbers() { + seqOf = new ArrayList<>(); + } + + public NoticeNumbers(byte[] code) { + this.code = code; + } + + public List getBerInteger() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(BerInteger.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + BerInteger element = new BerInteger(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private DisplayText organization = null; + private NoticeNumbers noticeNumbers = null; + + public NoticeReference() { + } + + public NoticeReference(byte[] code) { + this.code = code; + } + + public void setOrganization(DisplayText organization) { + this.organization = organization; + } + + public DisplayText getOrganization() { + return organization; + } + + public void setNoticeNumbers(NoticeNumbers noticeNumbers) { + this.noticeNumbers = noticeNumbers; + } + + public NoticeNumbers getNoticeNumbers() { + return noticeNumbers; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += noticeNumbers.encode(reverseOS, true); + + codeLength += organization.encode(reverseOS); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + organization = new DisplayText(); + numDecodedBytes = organization.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (berTag.equals(NoticeNumbers.tag)) { + noticeNumbers = new NoticeNumbers(); + vByteCount += noticeNumbers.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (organization != null) { + sb.append("organization: "); + organization.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("organization: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (noticeNumbers != null) { + sb.append("noticeNumbers: "); + noticeNumbers.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("noticeNumbers: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/OidValues.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/OidValues.java new file mode 100644 index 0000000..935f2c8 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/OidValues.java @@ -0,0 +1,68 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public final class OidValues { + public static final BerObjectIdentifier anyExtendedKeyUsage = new BerObjectIdentifier(new int[]{2, 5, 29, 37, 0}); + public static final BerObjectIdentifier anyPolicy = new BerObjectIdentifier(new int[]{2, 5, 29, 32, 0}); + public static final BerObjectIdentifier holdInstruction = new BerObjectIdentifier(new int[]{2, 2, 840, 10040, 2}); + public static final BerObjectIdentifier idCe = new BerObjectIdentifier(new int[]{2, 5, 29}); + public static final BerObjectIdentifier idCeAuthorityKeyIdentifier = new BerObjectIdentifier(new int[]{2, 5, 29, 35}); + public static final BerObjectIdentifier idCeBasicConstraints = new BerObjectIdentifier(new int[]{2, 5, 29, 19}); + public static final BerObjectIdentifier idCeCRLDistributionPoints = new BerObjectIdentifier(new int[]{2, 5, 29, 31}); + public static final BerObjectIdentifier idCeCRLNumber = new BerObjectIdentifier(new int[]{2, 5, 29, 20}); + public static final BerObjectIdentifier idCeCRLReasons = new BerObjectIdentifier(new int[]{2, 5, 29, 21}); + public static final BerObjectIdentifier idCeCertificateIssuer = new BerObjectIdentifier(new int[]{2, 5, 29, 29}); + public static final BerObjectIdentifier idCeCertificatePolicies = new BerObjectIdentifier(new int[]{2, 5, 29, 32}); + public static final BerObjectIdentifier idCeDeltaCRLIndicator = new BerObjectIdentifier(new int[]{2, 5, 29, 27}); + public static final BerObjectIdentifier idCeExtKeyUsage = new BerObjectIdentifier(new int[]{2, 5, 29, 37}); + public static final BerObjectIdentifier idCeFreshestCRL = new BerObjectIdentifier(new int[]{2, 5, 29, 46}); + public static final BerObjectIdentifier idCeHoldInstructionCode = new BerObjectIdentifier(new int[]{2, 5, 29, 23}); + public static final BerObjectIdentifier idCeInhibitAnyPolicy = new BerObjectIdentifier(new int[]{2, 5, 29, 54}); + public static final BerObjectIdentifier idCeInvalidityDate = new BerObjectIdentifier(new int[]{2, 5, 29, 24}); + public static final BerObjectIdentifier idCeIssuerAltName = new BerObjectIdentifier(new int[]{2, 5, 29, 18}); + public static final BerObjectIdentifier idCeIssuingDistributionPoint = new BerObjectIdentifier(new int[]{2, 5, 29, 28}); + public static final BerObjectIdentifier idCeKeyUsage = new BerObjectIdentifier(new int[]{2, 5, 29, 15}); + public static final BerObjectIdentifier idCeNameConstraints = new BerObjectIdentifier(new int[]{2, 5, 29, 30}); + public static final BerObjectIdentifier idCePolicyConstraints = new BerObjectIdentifier(new int[]{2, 5, 29, 36}); + public static final BerObjectIdentifier idCePolicyMappings = new BerObjectIdentifier(new int[]{2, 5, 29, 33}); + public static final BerObjectIdentifier idCePrivateKeyUsagePeriod = new BerObjectIdentifier(new int[]{2, 5, 29, 16}); + public static final BerObjectIdentifier idCeSubjectAltName = new BerObjectIdentifier(new int[]{2, 5, 29, 17}); + public static final BerObjectIdentifier idCeSubjectDirectoryAttributes = new BerObjectIdentifier(new int[]{2, 5, 29, 9}); + public static final BerObjectIdentifier idCeSubjectKeyIdentifier = new BerObjectIdentifier(new int[]{2, 5, 29, 14}); + public static final BerObjectIdentifier idHoldinstructionCallissuer = new BerObjectIdentifier(new int[]{2, 2, 840, 10040, 2, 2}); + public static final BerObjectIdentifier idHoldinstructionNone = new BerObjectIdentifier(new int[]{2, 2, 840, 10040, 2, 1}); + public static final BerObjectIdentifier idHoldinstructionReject = new BerObjectIdentifier(new int[]{2, 2, 840, 10040, 2, 3}); + public static final BerObjectIdentifier idKpOCSPSigning = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 3, 9}); + public static final BerObjectIdentifier idKpClientAuth = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 3, 2}); + public static final BerObjectIdentifier idKpCodeSigning = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 3, 3}); + public static final BerObjectIdentifier idKpEmailProtection = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 3, 4}); + public static final BerObjectIdentifier idKpServerAuth = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 3, 1}); + public static final BerObjectIdentifier idKpTimeStamping = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 3, 8}); + public static final BerObjectIdentifier idPeAuthorityInfoAccess = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 1, 1}); + public static final BerObjectIdentifier idPeSubjectInfoAccess = new BerObjectIdentifier(new int[]{1, 3, 6, 1, 5, 5, 7, 1, 11}); +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyConstraints.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyConstraints.java new file mode 100644 index 0000000..57ef3ad --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyConstraints.java @@ -0,0 +1,195 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class PolicyConstraints implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private SkipCerts requireExplicitPolicy = null; + private SkipCerts inhibitPolicyMapping = null; + + public PolicyConstraints() { + } + + public PolicyConstraints(byte[] code) { + this.code = code; + } + + public void setRequireExplicitPolicy(SkipCerts requireExplicitPolicy) { + this.requireExplicitPolicy = requireExplicitPolicy; + } + + public SkipCerts getRequireExplicitPolicy() { + return requireExplicitPolicy; + } + + public void setInhibitPolicyMapping(SkipCerts inhibitPolicyMapping) { + this.inhibitPolicyMapping = inhibitPolicyMapping; + } + + public SkipCerts getInhibitPolicyMapping() { + return inhibitPolicyMapping; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (inhibitPolicyMapping != null) { + codeLength += inhibitPolicyMapping.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + if (requireExplicitPolicy != null) { + codeLength += requireExplicitPolicy.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + requireExplicitPolicy = new SkipCerts(); + vByteCount += requireExplicitPolicy.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + inhibitPolicyMapping = new SkipCerts(); + vByteCount += inhibitPolicyMapping.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (requireExplicitPolicy != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("requireExplicitPolicy: ").append(requireExplicitPolicy); + firstSelectedElement = false; + } + + if (inhibitPolicyMapping != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("inhibitPolicyMapping: ").append(inhibitPolicyMapping); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyInformation.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyInformation.java new file mode 100644 index 0000000..6275a09 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyInformation.java @@ -0,0 +1,320 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class PolicyInformation implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class PolicyQualifiers implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public PolicyQualifiers() { + seqOf = new ArrayList<>(); + } + + public PolicyQualifiers(byte[] code) { + this.code = code; + } + + public List getPolicyQualifierInfo() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(PolicyQualifierInfo.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + PolicyQualifierInfo element = new PolicyQualifierInfo(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private CertPolicyId policyIdentifier = null; + private PolicyQualifiers policyQualifiers = null; + + public PolicyInformation() { + } + + public PolicyInformation(byte[] code) { + this.code = code; + } + + public void setPolicyIdentifier(CertPolicyId policyIdentifier) { + this.policyIdentifier = policyIdentifier; + } + + public CertPolicyId getPolicyIdentifier() { + return policyIdentifier; + } + + public void setPolicyQualifiers(PolicyQualifiers policyQualifiers) { + this.policyQualifiers = policyQualifiers; + } + + public PolicyQualifiers getPolicyQualifiers() { + return policyQualifiers; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (policyQualifiers != null) { + codeLength += policyQualifiers.encode(reverseOS, true); + } + + codeLength += policyIdentifier.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(CertPolicyId.tag)) { + policyIdentifier = new CertPolicyId(); + vByteCount += policyIdentifier.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(PolicyQualifiers.tag)) { + policyQualifiers = new PolicyQualifiers(); + vByteCount += policyQualifiers.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (policyIdentifier != null) { + sb.append("policyIdentifier: ").append(policyIdentifier); + } + else { + sb.append("policyIdentifier: "); + } + + if (policyQualifiers != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("policyQualifiers: "); + policyQualifiers.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyMappings.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyMappings.java new file mode 100644 index 0000000..0bb384a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyMappings.java @@ -0,0 +1,320 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class PolicyMappings implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class SEQUENCE implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private CertPolicyId issuerDomainPolicy = null; + private CertPolicyId subjectDomainPolicy = null; + + public SEQUENCE() { + } + + public SEQUENCE(byte[] code) { + this.code = code; + } + + public void setIssuerDomainPolicy(CertPolicyId issuerDomainPolicy) { + this.issuerDomainPolicy = issuerDomainPolicy; + } + + public CertPolicyId getIssuerDomainPolicy() { + return issuerDomainPolicy; + } + + public void setSubjectDomainPolicy(CertPolicyId subjectDomainPolicy) { + this.subjectDomainPolicy = subjectDomainPolicy; + } + + public CertPolicyId getSubjectDomainPolicy() { + return subjectDomainPolicy; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += subjectDomainPolicy.encode(reverseOS, true); + + codeLength += issuerDomainPolicy.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(CertPolicyId.tag)) { + issuerDomainPolicy = new CertPolicyId(); + vByteCount += issuerDomainPolicy.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(CertPolicyId.tag)) { + subjectDomainPolicy = new CertPolicyId(); + vByteCount += subjectDomainPolicy.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (issuerDomainPolicy != null) { + sb.append("issuerDomainPolicy: ").append(issuerDomainPolicy); + } + else { + sb.append("issuerDomainPolicy: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (subjectDomainPolicy != null) { + sb.append("subjectDomainPolicy: ").append(subjectDomainPolicy); + } + else { + sb.append("subjectDomainPolicy: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public PolicyMappings() { + seqOf = new ArrayList<>(); + } + + public PolicyMappings(byte[] code) { + this.code = code; + } + + public List getSEQUENCE() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(SEQUENCE.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + SEQUENCE element = new SEQUENCE(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyQualifierId.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyQualifierId.java new file mode 100644 index 0000000..a79ffe6 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyQualifierId.java @@ -0,0 +1,44 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class PolicyQualifierId extends BerObjectIdentifier { + + private static final long serialVersionUID = 1L; + + public PolicyQualifierId() { + } + + public PolicyQualifierId(byte[] code) { + super(code); + } + + public PolicyQualifierId(int[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyQualifierInfo.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyQualifierInfo.java new file mode 100644 index 0000000..647ceac --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PolicyQualifierInfo.java @@ -0,0 +1,188 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class PolicyQualifierInfo implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private PolicyQualifierId policyQualifierId = null; + private BerAny qualifier = null; + + public PolicyQualifierInfo() { + } + + public PolicyQualifierInfo(byte[] code) { + this.code = code; + } + + public void setPolicyQualifierId(PolicyQualifierId policyQualifierId) { + this.policyQualifierId = policyQualifierId; + } + + public PolicyQualifierId getPolicyQualifierId() { + return policyQualifierId; + } + + public void setQualifier(BerAny qualifier) { + this.qualifier = qualifier; + } + + public BerAny getQualifier() { + return qualifier; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += qualifier.encode(reverseOS); + + codeLength += policyQualifierId.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(PolicyQualifierId.tag)) { + policyQualifierId = new PolicyQualifierId(); + vByteCount += policyQualifierId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + qualifier = new BerAny(); + numDecodedBytes = qualifier.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (policyQualifierId != null) { + sb.append("policyQualifierId: ").append(policyQualifierId); + } + else { + sb.append("policyQualifierId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (qualifier != null) { + sb.append("qualifier: ").append(qualifier); + } + else { + sb.append("qualifier: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PrivateKeyUsagePeriod.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PrivateKeyUsagePeriod.java new file mode 100644 index 0000000..3e7cb47 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/PrivateKeyUsagePeriod.java @@ -0,0 +1,195 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class PrivateKeyUsagePeriod implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerGeneralizedTime notBefore = null; + private BerGeneralizedTime notAfter = null; + + public PrivateKeyUsagePeriod() { + } + + public PrivateKeyUsagePeriod(byte[] code) { + this.code = code; + } + + public void setNotBefore(BerGeneralizedTime notBefore) { + this.notBefore = notBefore; + } + + public BerGeneralizedTime getNotBefore() { + return notBefore; + } + + public void setNotAfter(BerGeneralizedTime notAfter) { + this.notAfter = notAfter; + } + + public BerGeneralizedTime getNotAfter() { + return notAfter; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (notAfter != null) { + codeLength += notAfter.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + if (notBefore != null) { + codeLength += notBefore.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + notBefore = new BerGeneralizedTime(); + vByteCount += notBefore.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + notAfter = new BerGeneralizedTime(); + vByteCount += notAfter.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (notBefore != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("notBefore: ").append(notBefore); + firstSelectedElement = false; + } + + if (notAfter != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("notAfter: ").append(notAfter); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/ReasonFlags.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/ReasonFlags.java new file mode 100644 index 0000000..817677e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/ReasonFlags.java @@ -0,0 +1,48 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class ReasonFlags extends BerBitString { + + private static final long serialVersionUID = 1L; + + public ReasonFlags() { + } + + public ReasonFlags(byte[] code) { + super(code); + } + + public ReasonFlags(byte[] value, int numBits) { + super(value, numBits); + } + + public ReasonFlags(boolean[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SkipCerts.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SkipCerts.java new file mode 100644 index 0000000..3361c96 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SkipCerts.java @@ -0,0 +1,48 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class SkipCerts extends BerInteger { + + private static final long serialVersionUID = 1L; + + public SkipCerts() { + } + + public SkipCerts(byte[] code) { + super(code); + } + + public SkipCerts(BigInteger value) { + super(value); + } + + public SkipCerts(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectAltName.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectAltName.java new file mode 100644 index 0000000..49a2bc1 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectAltName.java @@ -0,0 +1,40 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class SubjectAltName extends GeneralNames { + + private static final long serialVersionUID = 1L; + + public SubjectAltName() { + } + + public SubjectAltName(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectDirectoryAttributes.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectDirectoryAttributes.java new file mode 100644 index 0000000..21858b8 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectDirectoryAttributes.java @@ -0,0 +1,161 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class SubjectDirectoryAttributes implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public SubjectDirectoryAttributes() { + seqOf = new ArrayList<>(); + } + + public SubjectDirectoryAttributes(byte[] code) { + this.code = code; + } + + public List getAttribute() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(Attribute.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + Attribute element = new Attribute(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectInfoAccessSyntax.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectInfoAccessSyntax.java new file mode 100644 index 0000000..f33ec50 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectInfoAccessSyntax.java @@ -0,0 +1,161 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class SubjectInfoAccessSyntax implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public SubjectInfoAccessSyntax() { + seqOf = new ArrayList<>(); + } + + public SubjectInfoAccessSyntax(byte[] code) { + this.code = code; + } + + public List getAccessDescription() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(AccessDescription.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + AccessDescription element = new AccessDescription(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectKeyIdentifier.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectKeyIdentifier.java new file mode 100644 index 0000000..b8af9e2 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/SubjectKeyIdentifier.java @@ -0,0 +1,40 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class SubjectKeyIdentifier extends KeyIdentifier { + + private static final long serialVersionUID = 1L; + + public SubjectKeyIdentifier() { + } + + public SubjectKeyIdentifier(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/UserNotice.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/UserNotice.java new file mode 100644 index 0000000..840cf52 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/pkix1implicit88/UserNotice.java @@ -0,0 +1,195 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.pkix1implicit88; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Attribute; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateSerialNumber; +import com.truphone.rsp.dto.asn1.pkix1explicit88.DirectoryString; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Name; +import com.truphone.rsp.dto.asn1.pkix1explicit88.ORAddress; +import com.truphone.rsp.dto.asn1.pkix1explicit88.RelativeDistinguishedName; + +public class UserNotice implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private NoticeReference noticeRef = null; + private DisplayText explicitText = null; + + public UserNotice() { + } + + public UserNotice(byte[] code) { + this.code = code; + } + + public void setNoticeRef(NoticeReference noticeRef) { + this.noticeRef = noticeRef; + } + + public NoticeReference getNoticeRef() { + return noticeRef; + } + + public void setExplicitText(DisplayText explicitText) { + this.explicitText = explicitText; + } + + public DisplayText getExplicitText() { + return explicitText; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (explicitText != null) { + codeLength += explicitText.encode(reverseOS); + } + + if (noticeRef != null) { + codeLength += noticeRef.encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(NoticeReference.tag)) { + noticeRef = new NoticeReference(); + vByteCount += noticeRef.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + explicitText = new DisplayText(); + numDecodedBytes = explicitText.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + explicitText = null; + } + if (lengthVal < 0) { + if (!berTag.equals(0, 0, 0)) { + throw new IOException("Decoded sequence has wrong end of contents octets"); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } + + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (noticeRef != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("noticeRef: "); + noticeRef.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (explicitText != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("explicitText: "); + explicitText.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientOk.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientOk.java new file mode 100644 index 0000000..5de6677 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientOk.java @@ -0,0 +1,236 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateClientOk implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private StoreMetadataRequest profileMetaData = null; + private PrepareDownloadRequest prepareDownloadRequest = null; + + public AuthenticateClientOk() { + } + + public AuthenticateClientOk(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setProfileMetaData(StoreMetadataRequest profileMetaData) { + this.profileMetaData = profileMetaData; + } + + public StoreMetadataRequest getProfileMetaData() { + return profileMetaData; + } + + public void setPrepareDownloadRequest(PrepareDownloadRequest prepareDownloadRequest) { + this.prepareDownloadRequest = prepareDownloadRequest; + } + + public PrepareDownloadRequest getPrepareDownloadRequest() { + return prepareDownloadRequest; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += prepareDownloadRequest.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 33 + reverseOS.write(0x21); + reverseOS.write(0xBF); + codeLength += 2; + + codeLength += profileMetaData.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 37 + reverseOS.write(0x25); + reverseOS.write(0xBF); + codeLength += 2; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 37)) { + profileMetaData = new StoreMetadataRequest(); + vByteCount += profileMetaData.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 33)) { + prepareDownloadRequest = new PrepareDownloadRequest(); + vByteCount += prepareDownloadRequest.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (profileMetaData != null) { + sb.append("profileMetaData: "); + profileMetaData.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("profileMetaData: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (prepareDownloadRequest != null) { + sb.append("prepareDownloadRequest: "); + prepareDownloadRequest.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("prepareDownloadRequest: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientOkEs11.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientOkEs11.java new file mode 100644 index 0000000..540cb5c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientOkEs11.java @@ -0,0 +1,332 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateClientOkEs11 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class EventEntries implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public EventEntries() { + seqOf = new ArrayList<>(); + } + + public EventEntries(byte[] code) { + this.code = code; + } + + public List getEventEntries() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(com.truphone.rsp.dto.asn1.rspdefinitions.EventEntries.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + com.truphone.rsp.dto.asn1.rspdefinitions.EventEntries element = new com.truphone.rsp.dto.asn1.rspdefinitions.EventEntries(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private EventEntries eventEntries = null; + + public AuthenticateClientOkEs11() { + } + + public AuthenticateClientOkEs11(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setEventEntries(EventEntries eventEntries) { + this.eventEntries = eventEntries; + } + + public EventEntries getEventEntries() { + return eventEntries; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += eventEntries.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + eventEntries = new EventEntries(); + vByteCount += eventEntries.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (eventEntries != null) { + sb.append("eventEntries: "); + eventEntries.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("eventEntries: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientRequest.java new file mode 100644 index 0000000..5e198fc --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientRequest.java @@ -0,0 +1,200 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateClientRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 59); + + private byte[] code = null; + private TransactionId transactionId = null; + private AuthenticateServerResponse authenticateServerResponse = null; + + public AuthenticateClientRequest() { + } + + public AuthenticateClientRequest(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setAuthenticateServerResponse(AuthenticateServerResponse authenticateServerResponse) { + this.authenticateServerResponse = authenticateServerResponse; + } + + public AuthenticateServerResponse getAuthenticateServerResponse() { + return authenticateServerResponse; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += authenticateServerResponse.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 56 + reverseOS.write(0x38); + reverseOS.write(0xBF); + codeLength += 2; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 56)) { + authenticateServerResponse = new AuthenticateServerResponse(); + vByteCount += authenticateServerResponse.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (authenticateServerResponse != null) { + sb.append("authenticateServerResponse: "); + authenticateServerResponse.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("authenticateServerResponse: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientResponseEs11.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientResponseEs11.java new file mode 100644 index 0000000..7d1f1ae --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientResponseEs11.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateClientResponseEs11 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 64); + + private AuthenticateClientOkEs11 authenticateClientOk = null; + private BerInteger authenticateClientError = null; + + public AuthenticateClientResponseEs11() { + } + + public AuthenticateClientResponseEs11(byte[] code) { + this.code = code; + } + + public void setAuthenticateClientOk(AuthenticateClientOkEs11 authenticateClientOk) { + this.authenticateClientOk = authenticateClientOk; + } + + public AuthenticateClientOkEs11 getAuthenticateClientOk() { + return authenticateClientOk; + } + + public void setAuthenticateClientError(BerInteger authenticateClientError) { + this.authenticateClientError = authenticateClientError; + } + + public BerInteger getAuthenticateClientError() { + return authenticateClientError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (authenticateClientError != null) { + codeLength += authenticateClientError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (authenticateClientOk != null) { + codeLength += authenticateClientOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + authenticateClientOk = new AuthenticateClientOkEs11(); + tlvByteCount += authenticateClientOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + authenticateClientError = new BerInteger(); + tlvByteCount += authenticateClientError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (authenticateClientOk != null) { + sb.append("authenticateClientOk: "); + authenticateClientOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (authenticateClientError != null) { + sb.append("authenticateClientError: ").append(authenticateClientError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientResponseEs9.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientResponseEs9.java new file mode 100644 index 0000000..ec0c976 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateClientResponseEs9.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateClientResponseEs9 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 59); + + private AuthenticateClientOk authenticateClientOk = null; + private BerInteger authenticateClientError = null; + + public AuthenticateClientResponseEs9() { + } + + public AuthenticateClientResponseEs9(byte[] code) { + this.code = code; + } + + public void setAuthenticateClientOk(AuthenticateClientOk authenticateClientOk) { + this.authenticateClientOk = authenticateClientOk; + } + + public AuthenticateClientOk getAuthenticateClientOk() { + return authenticateClientOk; + } + + public void setAuthenticateClientError(BerInteger authenticateClientError) { + this.authenticateClientError = authenticateClientError; + } + + public BerInteger getAuthenticateClientError() { + return authenticateClientError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (authenticateClientError != null) { + codeLength += authenticateClientError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (authenticateClientOk != null) { + codeLength += authenticateClientOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + authenticateClientOk = new AuthenticateClientOk(); + tlvByteCount += authenticateClientOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + authenticateClientError = new BerInteger(); + tlvByteCount += authenticateClientError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (authenticateClientOk != null) { + sb.append("authenticateClientOk: "); + authenticateClientOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (authenticateClientError != null) { + sb.append("authenticateClientError: ").append(authenticateClientError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateErrorCode.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateErrorCode.java new file mode 100644 index 0000000..d15ee24 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateErrorCode.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateErrorCode extends BerInteger { + + private static final long serialVersionUID = 1L; + + public AuthenticateErrorCode() { + } + + public AuthenticateErrorCode(byte[] code) { + super(code); + } + + public AuthenticateErrorCode(BigInteger value) { + super(value); + } + + public AuthenticateErrorCode(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateResponseError.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateResponseError.java new file mode 100644 index 0000000..0e80737 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateResponseError.java @@ -0,0 +1,195 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateResponseError implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private AuthenticateErrorCode authenticateErrorCode = null; + + public AuthenticateResponseError() { + } + + public AuthenticateResponseError(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setAuthenticateErrorCode(AuthenticateErrorCode authenticateErrorCode) { + this.authenticateErrorCode = authenticateErrorCode; + } + + public AuthenticateErrorCode getAuthenticateErrorCode() { + return authenticateErrorCode; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += authenticateErrorCode.encode(reverseOS, true); + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(AuthenticateErrorCode.tag)) { + authenticateErrorCode = new AuthenticateErrorCode(); + vByteCount += authenticateErrorCode.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (authenticateErrorCode != null) { + sb.append("authenticateErrorCode: ").append(authenticateErrorCode); + } + else { + sb.append("authenticateErrorCode: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateResponseOk.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateResponseOk.java new file mode 100644 index 0000000..237ecf0 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateResponseOk.java @@ -0,0 +1,261 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateResponseOk implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private EuiccSigned1 euiccSigned1 = null; + private BerOctetString euiccSignature1 = null; + private Certificate euiccCertificate = null; + private Certificate eumCertificate = null; + + public AuthenticateResponseOk() { + } + + public AuthenticateResponseOk(byte[] code) { + this.code = code; + } + + public void setEuiccSigned1(EuiccSigned1 euiccSigned1) { + this.euiccSigned1 = euiccSigned1; + } + + public EuiccSigned1 getEuiccSigned1() { + return euiccSigned1; + } + + public void setEuiccSignature1(BerOctetString euiccSignature1) { + this.euiccSignature1 = euiccSignature1; + } + + public BerOctetString getEuiccSignature1() { + return euiccSignature1; + } + + public void setEuiccCertificate(Certificate euiccCertificate) { + this.euiccCertificate = euiccCertificate; + } + + public Certificate getEuiccCertificate() { + return euiccCertificate; + } + + public void setEumCertificate(Certificate eumCertificate) { + this.eumCertificate = eumCertificate; + } + + public Certificate getEumCertificate() { + return eumCertificate; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += eumCertificate.encode(reverseOS, true); + + codeLength += euiccCertificate.encode(reverseOS, true); + + codeLength += euiccSignature1.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 55 + reverseOS.write(0x37); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += euiccSigned1.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(EuiccSigned1.tag)) { + euiccSigned1 = new EuiccSigned1(); + vByteCount += euiccSigned1.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 55)) { + euiccSignature1 = new BerOctetString(); + vByteCount += euiccSignature1.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Certificate.tag)) { + euiccCertificate = new Certificate(); + vByteCount += euiccCertificate.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Certificate.tag)) { + eumCertificate = new Certificate(); + vByteCount += eumCertificate.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccSigned1 != null) { + sb.append("euiccSigned1: "); + euiccSigned1.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccSigned1: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccSignature1 != null) { + sb.append("euiccSignature1: ").append(euiccSignature1); + } + else { + sb.append("euiccSignature1: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCertificate != null) { + sb.append("euiccCertificate: "); + euiccCertificate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccCertificate: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (eumCertificate != null) { + sb.append("eumCertificate: "); + eumCertificate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("eumCertificate: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateServerRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateServerRequest.java new file mode 100644 index 0000000..32e7ebd --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateServerRequest.java @@ -0,0 +1,293 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateServerRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 56); + + private byte[] code = null; + private ServerSigned1 serverSigned1 = null; + private BerOctetString serverSignature1 = null; + private SubjectKeyIdentifier euiccCiPKIdToBeUsed = null; + private Certificate serverCertificate = null; + private CtxParams1 ctxParams1 = null; + + public AuthenticateServerRequest() { + } + + public AuthenticateServerRequest(byte[] code) { + this.code = code; + } + + public void setServerSigned1(ServerSigned1 serverSigned1) { + this.serverSigned1 = serverSigned1; + } + + public ServerSigned1 getServerSigned1() { + return serverSigned1; + } + + public void setServerSignature1(BerOctetString serverSignature1) { + this.serverSignature1 = serverSignature1; + } + + public BerOctetString getServerSignature1() { + return serverSignature1; + } + + public void setEuiccCiPKIdToBeUsed(SubjectKeyIdentifier euiccCiPKIdToBeUsed) { + this.euiccCiPKIdToBeUsed = euiccCiPKIdToBeUsed; + } + + public SubjectKeyIdentifier getEuiccCiPKIdToBeUsed() { + return euiccCiPKIdToBeUsed; + } + + public void setServerCertificate(Certificate serverCertificate) { + this.serverCertificate = serverCertificate; + } + + public Certificate getServerCertificate() { + return serverCertificate; + } + + public void setCtxParams1(CtxParams1 ctxParams1) { + this.ctxParams1 = ctxParams1; + } + + public CtxParams1 getCtxParams1() { + return ctxParams1; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += ctxParams1.encode(reverseOS); + + codeLength += serverCertificate.encode(reverseOS, true); + + codeLength += euiccCiPKIdToBeUsed.encode(reverseOS, true); + + codeLength += serverSignature1.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 55 + reverseOS.write(0x37); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += serverSigned1.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(ServerSigned1.tag)) { + serverSigned1 = new ServerSigned1(); + vByteCount += serverSigned1.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 55)) { + serverSignature1 = new BerOctetString(); + vByteCount += serverSignature1.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(SubjectKeyIdentifier.tag)) { + euiccCiPKIdToBeUsed = new SubjectKeyIdentifier(); + vByteCount += euiccCiPKIdToBeUsed.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Certificate.tag)) { + serverCertificate = new Certificate(); + vByteCount += serverCertificate.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + ctxParams1 = new CtxParams1(); + numDecodedBytes = ctxParams1.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverSigned1 != null) { + sb.append("serverSigned1: "); + serverSigned1.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("serverSigned1: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverSignature1 != null) { + sb.append("serverSignature1: ").append(serverSignature1); + } + else { + sb.append("serverSignature1: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCiPKIdToBeUsed != null) { + sb.append("euiccCiPKIdToBeUsed: ").append(euiccCiPKIdToBeUsed); + } + else { + sb.append("euiccCiPKIdToBeUsed: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverCertificate != null) { + sb.append("serverCertificate: "); + serverCertificate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("serverCertificate: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (ctxParams1 != null) { + sb.append("ctxParams1: "); + ctxParams1.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("ctxParams1: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateServerResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateServerResponse.java new file mode 100644 index 0000000..5743b96 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/AuthenticateServerResponse.java @@ -0,0 +1,165 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class AuthenticateServerResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 56); + + private AuthenticateResponseOk authenticateResponseOk = null; + private AuthenticateResponseError authenticateResponseError = null; + + public AuthenticateServerResponse() { + } + + public AuthenticateServerResponse(byte[] code) { + this.code = code; + } + + public void setAuthenticateResponseOk(AuthenticateResponseOk authenticateResponseOk) { + this.authenticateResponseOk = authenticateResponseOk; + } + + public AuthenticateResponseOk getAuthenticateResponseOk() { + return authenticateResponseOk; + } + + public void setAuthenticateResponseError(AuthenticateResponseError authenticateResponseError) { + this.authenticateResponseError = authenticateResponseError; + } + + public AuthenticateResponseError getAuthenticateResponseError() { + return authenticateResponseError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (authenticateResponseError != null) { + codeLength += authenticateResponseError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (authenticateResponseOk != null) { + codeLength += authenticateResponseOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + authenticateResponseOk = new AuthenticateResponseOk(); + tlvByteCount += authenticateResponseOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + authenticateResponseError = new AuthenticateResponseError(); + tlvByteCount += authenticateResponseError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (authenticateResponseOk != null) { + sb.append("authenticateResponseOk: "); + authenticateResponseOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (authenticateResponseError != null) { + sb.append("authenticateResponseError: "); + authenticateResponseError.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/BoundProfilePackage.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/BoundProfilePackage.java new file mode 100644 index 0000000..59a57ba --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/BoundProfilePackage.java @@ -0,0 +1,846 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class BoundProfilePackage implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class FirstSequenceOf87 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public FirstSequenceOf87() { + seqOf = new ArrayList<>(); + } + + public FirstSequenceOf87(byte[] code) { + this.code = code; + } + + public List getBerOctetString() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 7 + reverseOS.write(0x87); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 7)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + BerOctetString element = new BerOctetString(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static class SequenceOf88 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public SequenceOf88() { + seqOf = new ArrayList<>(); + } + + public SequenceOf88(byte[] code) { + this.code = code; + } + + public List getBerOctetString() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 8 + reverseOS.write(0x88); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 8)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + BerOctetString element = new BerOctetString(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static class SecondSequenceOf87 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public SecondSequenceOf87() { + seqOf = new ArrayList<>(); + } + + public SecondSequenceOf87(byte[] code) { + this.code = code; + } + + public List getBerOctetString() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 7 + reverseOS.write(0x87); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 7)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + BerOctetString element = new BerOctetString(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static class SequenceOf86 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public SequenceOf86() { + seqOf = new ArrayList<>(); + } + + public SequenceOf86(byte[] code) { + this.code = code; + } + + public List getBerOctetString() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 6 + reverseOS.write(0x86); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 6)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + BerOctetString element = new BerOctetString(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 54); + + private byte[] code = null; + private InitialiseSecureChannelRequest initialiseSecureChannelRequest = null; + private FirstSequenceOf87 firstSequenceOf87 = null; + private SequenceOf88 sequenceOf88 = null; + private SecondSequenceOf87 secondSequenceOf87 = null; + private SequenceOf86 sequenceOf86 = null; + + public BoundProfilePackage() { + } + + public BoundProfilePackage(byte[] code) { + this.code = code; + } + + public void setInitialiseSecureChannelRequest(InitialiseSecureChannelRequest initialiseSecureChannelRequest) { + this.initialiseSecureChannelRequest = initialiseSecureChannelRequest; + } + + public InitialiseSecureChannelRequest getInitialiseSecureChannelRequest() { + return initialiseSecureChannelRequest; + } + + public void setFirstSequenceOf87(FirstSequenceOf87 firstSequenceOf87) { + this.firstSequenceOf87 = firstSequenceOf87; + } + + public FirstSequenceOf87 getFirstSequenceOf87() { + return firstSequenceOf87; + } + + public void setSequenceOf88(SequenceOf88 sequenceOf88) { + this.sequenceOf88 = sequenceOf88; + } + + public SequenceOf88 getSequenceOf88() { + return sequenceOf88; + } + + public void setSecondSequenceOf87(SecondSequenceOf87 secondSequenceOf87) { + this.secondSequenceOf87 = secondSequenceOf87; + } + + public SecondSequenceOf87 getSecondSequenceOf87() { + return secondSequenceOf87; + } + + public void setSequenceOf86(SequenceOf86 sequenceOf86) { + this.sequenceOf86 = sequenceOf86; + } + + public SequenceOf86 getSequenceOf86() { + return sequenceOf86; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += sequenceOf86.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 3 + reverseOS.write(0xA3); + codeLength += 1; + + if (secondSequenceOf87 != null) { + codeLength += secondSequenceOf87.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 2 + reverseOS.write(0xA2); + codeLength += 1; + } + + codeLength += sequenceOf88.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + + codeLength += firstSequenceOf87.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + + codeLength += initialiseSecureChannelRequest.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 35 + reverseOS.write(0x23); + reverseOS.write(0xBF); + codeLength += 2; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 35)) { + initialiseSecureChannelRequest = new InitialiseSecureChannelRequest(); + vByteCount += initialiseSecureChannelRequest.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + firstSequenceOf87 = new FirstSequenceOf87(); + vByteCount += firstSequenceOf87.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + sequenceOf88 = new SequenceOf88(); + vByteCount += sequenceOf88.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) { + secondSequenceOf87 = new SecondSequenceOf87(); + vByteCount += secondSequenceOf87.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) { + sequenceOf86 = new SequenceOf86(); + vByteCount += sequenceOf86.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (initialiseSecureChannelRequest != null) { + sb.append("initialiseSecureChannelRequest: "); + initialiseSecureChannelRequest.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("initialiseSecureChannelRequest: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (firstSequenceOf87 != null) { + sb.append("firstSequenceOf87: "); + firstSequenceOf87.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("firstSequenceOf87: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (sequenceOf88 != null) { + sb.append("sequenceOf88: "); + sequenceOf88.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("sequenceOf88: "); + } + + if (secondSequenceOf87 != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("secondSequenceOf87: "); + secondSequenceOf87.appendAsString(sb, indentLevel + 1); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (sequenceOf86 != null) { + sb.append("sequenceOf86: "); + sequenceOf86.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("sequenceOf86: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/BppCommandId.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/BppCommandId.java new file mode 100644 index 0000000..196737f --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/BppCommandId.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class BppCommandId extends BerInteger { + + private static final long serialVersionUID = 1L; + + public BppCommandId() { + } + + public BppCommandId(byte[] code) { + super(code); + } + + public BppCommandId(BigInteger value) { + super(value); + } + + public BppCommandId(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionOk.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionOk.java new file mode 100644 index 0000000..dd08359 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionOk.java @@ -0,0 +1,130 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CancelSessionOk implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + + public CancelSessionOk() { + } + + public CancelSessionOk(byte[] code) { + this.code = code; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionReason.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionReason.java new file mode 100644 index 0000000..2189ac4 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionReason.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CancelSessionReason extends BerInteger { + + private static final long serialVersionUID = 1L; + + public CancelSessionReason() { + } + + public CancelSessionReason(byte[] code) { + super(code); + } + + public CancelSessionReason(BigInteger value) { + super(value); + } + + public CancelSessionReason(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionRequest.java new file mode 100644 index 0000000..e511743 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionRequest.java @@ -0,0 +1,198 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CancelSessionRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 65); + + private byte[] code = null; + private TransactionId transactionId = null; + private CancelSessionReason reason = null; + + public CancelSessionRequest() { + } + + public CancelSessionRequest(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setReason(CancelSessionReason reason) { + this.reason = reason; + } + + public CancelSessionReason getReason() { + return reason; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += reason.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + reason = new CancelSessionReason(); + vByteCount += reason.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (reason != null) { + sb.append("reason: ").append(reason); + } + else { + sb.append("reason: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionRequestEs9.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionRequestEs9.java new file mode 100644 index 0000000..8962fa1 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionRequestEs9.java @@ -0,0 +1,199 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CancelSessionRequestEs9 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 65); + + private byte[] code = null; + private TransactionId transactionId = null; + private CancelSessionResponse cancelSessionResponse = null; + + public CancelSessionRequestEs9() { + } + + public CancelSessionRequestEs9(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setCancelSessionResponse(CancelSessionResponse cancelSessionResponse) { + this.cancelSessionResponse = cancelSessionResponse; + } + + public CancelSessionResponse getCancelSessionResponse() { + return cancelSessionResponse; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += cancelSessionResponse.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + cancelSessionResponse = new CancelSessionResponse(); + vByteCount += cancelSessionResponse.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (cancelSessionResponse != null) { + sb.append("cancelSessionResponse: "); + cancelSessionResponse.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("cancelSessionResponse: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionResponse.java new file mode 100644 index 0000000..9406a0c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CancelSessionResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 65); + + private CancelSessionResponseOk cancelSessionResponseOk = null; + private BerInteger cancelSessionResponseError = null; + + public CancelSessionResponse() { + } + + public CancelSessionResponse(byte[] code) { + this.code = code; + } + + public void setCancelSessionResponseOk(CancelSessionResponseOk cancelSessionResponseOk) { + this.cancelSessionResponseOk = cancelSessionResponseOk; + } + + public CancelSessionResponseOk getCancelSessionResponseOk() { + return cancelSessionResponseOk; + } + + public void setCancelSessionResponseError(BerInteger cancelSessionResponseError) { + this.cancelSessionResponseError = cancelSessionResponseError; + } + + public BerInteger getCancelSessionResponseError() { + return cancelSessionResponseError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (cancelSessionResponseError != null) { + codeLength += cancelSessionResponseError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (cancelSessionResponseOk != null) { + codeLength += cancelSessionResponseOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + cancelSessionResponseOk = new CancelSessionResponseOk(); + tlvByteCount += cancelSessionResponseOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + cancelSessionResponseError = new BerInteger(); + tlvByteCount += cancelSessionResponseError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (cancelSessionResponseOk != null) { + sb.append("cancelSessionResponseOk: "); + cancelSessionResponseOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (cancelSessionResponseError != null) { + sb.append("cancelSessionResponseError: ").append(cancelSessionResponseError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionResponseEs9.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionResponseEs9.java new file mode 100644 index 0000000..a6b648c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionResponseEs9.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CancelSessionResponseEs9 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 65); + + private CancelSessionOk cancelSessionOk = null; + private BerInteger cancelSessionError = null; + + public CancelSessionResponseEs9() { + } + + public CancelSessionResponseEs9(byte[] code) { + this.code = code; + } + + public void setCancelSessionOk(CancelSessionOk cancelSessionOk) { + this.cancelSessionOk = cancelSessionOk; + } + + public CancelSessionOk getCancelSessionOk() { + return cancelSessionOk; + } + + public void setCancelSessionError(BerInteger cancelSessionError) { + this.cancelSessionError = cancelSessionError; + } + + public BerInteger getCancelSessionError() { + return cancelSessionError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (cancelSessionError != null) { + codeLength += cancelSessionError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (cancelSessionOk != null) { + codeLength += cancelSessionOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + cancelSessionOk = new CancelSessionOk(); + tlvByteCount += cancelSessionOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + cancelSessionError = new BerInteger(); + tlvByteCount += cancelSessionError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (cancelSessionOk != null) { + sb.append("cancelSessionOk: "); + cancelSessionOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (cancelSessionError != null) { + sb.append("cancelSessionError: ").append(cancelSessionError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionResponseOk.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionResponseOk.java new file mode 100644 index 0000000..e79cf0d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CancelSessionResponseOk.java @@ -0,0 +1,197 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CancelSessionResponseOk implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private EuiccCancelSessionSigned euiccCancelSessionSigned = null; + private BerOctetString euiccCancelSessionSignature = null; + + public CancelSessionResponseOk() { + } + + public CancelSessionResponseOk(byte[] code) { + this.code = code; + } + + public void setEuiccCancelSessionSigned(EuiccCancelSessionSigned euiccCancelSessionSigned) { + this.euiccCancelSessionSigned = euiccCancelSessionSigned; + } + + public EuiccCancelSessionSigned getEuiccCancelSessionSigned() { + return euiccCancelSessionSigned; + } + + public void setEuiccCancelSessionSignature(BerOctetString euiccCancelSessionSignature) { + this.euiccCancelSessionSignature = euiccCancelSessionSignature; + } + + public BerOctetString getEuiccCancelSessionSignature() { + return euiccCancelSessionSignature; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += euiccCancelSessionSignature.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 55 + reverseOS.write(0x37); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += euiccCancelSessionSigned.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(EuiccCancelSessionSigned.tag)) { + euiccCancelSessionSigned = new EuiccCancelSessionSigned(); + vByteCount += euiccCancelSessionSigned.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 55)) { + euiccCancelSessionSignature = new BerOctetString(); + vByteCount += euiccCancelSessionSignature.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCancelSessionSigned != null) { + sb.append("euiccCancelSessionSigned: "); + euiccCancelSessionSigned.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccCancelSessionSigned: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCancelSessionSignature != null) { + sb.append("euiccCancelSessionSignature: ").append(euiccCancelSessionSignature); + } + else { + sb.append("euiccCancelSessionSignature: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CertificateInfo.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CertificateInfo.java new file mode 100644 index 0000000..33a2a07 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CertificateInfo.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CertificateInfo extends BerBitString { + + private static final long serialVersionUID = 1L; + + public CertificateInfo() { + } + + public CertificateInfo(byte[] code) { + super(code); + } + + public CertificateInfo(byte[] value, int numBits) { + super(value, numBits); + } + + public CertificateInfo(boolean[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CertificationDataObject.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CertificationDataObject.java new file mode 100644 index 0000000..128d9d7 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CertificationDataObject.java @@ -0,0 +1,198 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CertificationDataObject implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerUTF8String platformLabel = null; + private BerUTF8String discoveryBaseURL = null; + + public CertificationDataObject() { + } + + public CertificationDataObject(byte[] code) { + this.code = code; + } + + public void setPlatformLabel(BerUTF8String platformLabel) { + this.platformLabel = platformLabel; + } + + public BerUTF8String getPlatformLabel() { + return platformLabel; + } + + public void setDiscoveryBaseURL(BerUTF8String discoveryBaseURL) { + this.discoveryBaseURL = discoveryBaseURL; + } + + public BerUTF8String getDiscoveryBaseURL() { + return discoveryBaseURL; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += discoveryBaseURL.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += platformLabel.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + platformLabel = new BerUTF8String(); + vByteCount += platformLabel.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + discoveryBaseURL = new BerUTF8String(); + vByteCount += discoveryBaseURL.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (platformLabel != null) { + sb.append("platformLabel: ").append(platformLabel); + } + else { + sb.append("platformLabel: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (discoveryBaseURL != null) { + sb.append("discoveryBaseURL: ").append(discoveryBaseURL); + } + else { + sb.append("discoveryBaseURL: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ConfigureISDPRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ConfigureISDPRequest.java new file mode 100644 index 0000000..a03bce4 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ConfigureISDPRequest.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ConfigureISDPRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 36); + + private byte[] code = null; + private DpProprietaryData dpProprietaryData = null; + + public ConfigureISDPRequest() { + } + + public ConfigureISDPRequest(byte[] code) { + this.code = code; + } + + public void setDpProprietaryData(DpProprietaryData dpProprietaryData) { + this.dpProprietaryData = dpProprietaryData; + } + + public DpProprietaryData getDpProprietaryData() { + return dpProprietaryData; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (dpProprietaryData != null) { + codeLength += dpProprietaryData.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 24 + reverseOS.write(0xB8); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 24)) { + dpProprietaryData = new DpProprietaryData(); + vByteCount += dpProprietaryData.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + if (dpProprietaryData != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("dpProprietaryData: "); + dpProprietaryData.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ControlRefTemplate.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ControlRefTemplate.java new file mode 100644 index 0000000..8349a0c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ControlRefTemplate.java @@ -0,0 +1,232 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ControlRefTemplate implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private Octet1 keyType = null; + private Octet1 keyLen = null; + private OctetTo16 hostId = null; + + public ControlRefTemplate() { + } + + public ControlRefTemplate(byte[] code) { + this.code = code; + } + + public void setKeyType(Octet1 keyType) { + this.keyType = keyType; + } + + public Octet1 getKeyType() { + return keyType; + } + + public void setKeyLen(Octet1 keyLen) { + this.keyLen = keyLen; + } + + public Octet1 getKeyLen() { + return keyLen; + } + + public void setHostId(OctetTo16 hostId) { + this.hostId = hostId; + } + + public OctetTo16 getHostId() { + return hostId; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += hostId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 4 + reverseOS.write(0x84); + codeLength += 1; + + codeLength += keyLen.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += keyType.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + keyType = new Octet1(); + vByteCount += keyType.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + keyLen = new Octet1(); + vByteCount += keyLen.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 4)) { + hostId = new OctetTo16(); + vByteCount += hostId.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (keyType != null) { + sb.append("keyType: ").append(keyType); + } + else { + sb.append("keyType: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (keyLen != null) { + sb.append("keyLen: ").append(keyLen); + } + else { + sb.append("keyLen: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (hostId != null) { + sb.append("hostId: ").append(hostId); + } + else { + sb.append("hostId: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CtxParams1.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CtxParams1.java new file mode 100644 index 0000000..5db4518 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CtxParams1.java @@ -0,0 +1,119 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CtxParams1 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private CtxParamsForCommonAuthentication ctxParamsForCommonAuthentication = null; + + public CtxParams1() { + } + + public CtxParams1(byte[] code) { + this.code = code; + } + + public void setCtxParamsForCommonAuthentication(CtxParamsForCommonAuthentication ctxParamsForCommonAuthentication) { + this.ctxParamsForCommonAuthentication = ctxParamsForCommonAuthentication; + } + + public CtxParamsForCommonAuthentication getCtxParamsForCommonAuthentication() { + return ctxParamsForCommonAuthentication; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (ctxParamsForCommonAuthentication != null) { + codeLength += ctxParamsForCommonAuthentication.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + ctxParamsForCommonAuthentication = new CtxParamsForCommonAuthentication(); + tlvByteCount += ctxParamsForCommonAuthentication.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (ctxParamsForCommonAuthentication != null) { + sb.append("ctxParamsForCommonAuthentication: "); + ctxParamsForCommonAuthentication.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CtxParamsForCommonAuthentication.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CtxParamsForCommonAuthentication.java new file mode 100644 index 0000000..6830987 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/CtxParamsForCommonAuthentication.java @@ -0,0 +1,199 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class CtxParamsForCommonAuthentication implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerUTF8String matchingId = null; + private DeviceInfo deviceInfo = null; + + public CtxParamsForCommonAuthentication() { + } + + public CtxParamsForCommonAuthentication(byte[] code) { + this.code = code; + } + + public void setMatchingId(BerUTF8String matchingId) { + this.matchingId = matchingId; + } + + public BerUTF8String getMatchingId() { + return matchingId; + } + + public void setDeviceInfo(DeviceInfo deviceInfo) { + this.deviceInfo = deviceInfo; + } + + public DeviceInfo getDeviceInfo() { + return deviceInfo; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += deviceInfo.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + + if (matchingId != null) { + codeLength += matchingId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + matchingId = new BerUTF8String(); + vByteCount += matchingId.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + deviceInfo = new DeviceInfo(); + vByteCount += deviceInfo.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (matchingId != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("matchingId: ").append(matchingId); + firstSelectedElement = false; + } + + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (deviceInfo != null) { + sb.append("deviceInfo: "); + deviceInfo.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("deviceInfo: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeleteProfileRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeleteProfileRequest.java new file mode 100644 index 0000000..796e253 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeleteProfileRequest.java @@ -0,0 +1,160 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class DeleteProfileRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 51); + + private OctetTo16 isdpAid = null; + private Iccid iccid = null; + + public DeleteProfileRequest() { + } + + public DeleteProfileRequest(byte[] code) { + this.code = code; + } + + public void setIsdpAid(OctetTo16 isdpAid) { + this.isdpAid = isdpAid; + } + + public OctetTo16 getIsdpAid() { + return isdpAid; + } + + public void setIccid(Iccid iccid) { + this.iccid = iccid; + } + + public Iccid getIccid() { + return iccid; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (iccid != null) { + codeLength += iccid.encode(reverseOS, true); + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (isdpAid != null) { + codeLength += isdpAid.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 15 + reverseOS.write(0x4F); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 15)) { + isdpAid = new OctetTo16(); + tlvByteCount += isdpAid.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(Iccid.tag)) { + iccid = new Iccid(); + tlvByteCount += iccid.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (isdpAid != null) { + sb.append("isdpAid: ").append(isdpAid); + return; + } + + if (iccid != null) { + sb.append("iccid: ").append(iccid); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeleteProfileResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeleteProfileResponse.java new file mode 100644 index 0000000..5ef867a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeleteProfileResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class DeleteProfileResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 51); + + private byte[] code = null; + private BerInteger deleteResult = null; + + public DeleteProfileResponse() { + } + + public DeleteProfileResponse(byte[] code) { + this.code = code; + } + + public void setDeleteResult(BerInteger deleteResult) { + this.deleteResult = deleteResult; + } + + public BerInteger getDeleteResult() { + return deleteResult; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += deleteResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + deleteResult = new BerInteger(); + vByteCount += deleteResult.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (deleteResult != null) { + sb.append("deleteResult: ").append(deleteResult); + } + else { + sb.append("deleteResult: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeviceCapabilities.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeviceCapabilities.java new file mode 100644 index 0000000..e06a10e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeviceCapabilities.java @@ -0,0 +1,452 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class DeviceCapabilities implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private VersionType gsmSupportedRelease = null; + private VersionType utranSupportedRelease = null; + private VersionType cdma2000onexSupportedRelease = null; + private VersionType cdma2000hrpdSupportedRelease = null; + private VersionType cdma2000ehrpdSupportedRelease = null; + private VersionType eutranSupportedRelease = null; + private VersionType contactlessSupportedRelease = null; + private VersionType rspCrlSupportedVersion = null; + private VersionType rspRpmSupportedVersion = null; + + public DeviceCapabilities() { + } + + public DeviceCapabilities(byte[] code) { + this.code = code; + } + + public void setGsmSupportedRelease(VersionType gsmSupportedRelease) { + this.gsmSupportedRelease = gsmSupportedRelease; + } + + public VersionType getGsmSupportedRelease() { + return gsmSupportedRelease; + } + + public void setUtranSupportedRelease(VersionType utranSupportedRelease) { + this.utranSupportedRelease = utranSupportedRelease; + } + + public VersionType getUtranSupportedRelease() { + return utranSupportedRelease; + } + + public void setCdma2000onexSupportedRelease(VersionType cdma2000onexSupportedRelease) { + this.cdma2000onexSupportedRelease = cdma2000onexSupportedRelease; + } + + public VersionType getCdma2000onexSupportedRelease() { + return cdma2000onexSupportedRelease; + } + + public void setCdma2000hrpdSupportedRelease(VersionType cdma2000hrpdSupportedRelease) { + this.cdma2000hrpdSupportedRelease = cdma2000hrpdSupportedRelease; + } + + public VersionType getCdma2000hrpdSupportedRelease() { + return cdma2000hrpdSupportedRelease; + } + + public void setCdma2000ehrpdSupportedRelease(VersionType cdma2000ehrpdSupportedRelease) { + this.cdma2000ehrpdSupportedRelease = cdma2000ehrpdSupportedRelease; + } + + public VersionType getCdma2000ehrpdSupportedRelease() { + return cdma2000ehrpdSupportedRelease; + } + + public void setEutranSupportedRelease(VersionType eutranSupportedRelease) { + this.eutranSupportedRelease = eutranSupportedRelease; + } + + public VersionType getEutranSupportedRelease() { + return eutranSupportedRelease; + } + + public void setContactlessSupportedRelease(VersionType contactlessSupportedRelease) { + this.contactlessSupportedRelease = contactlessSupportedRelease; + } + + public VersionType getContactlessSupportedRelease() { + return contactlessSupportedRelease; + } + + public void setRspCrlSupportedVersion(VersionType rspCrlSupportedVersion) { + this.rspCrlSupportedVersion = rspCrlSupportedVersion; + } + + public VersionType getRspCrlSupportedVersion() { + return rspCrlSupportedVersion; + } + + public void setRspRpmSupportedVersion(VersionType rspRpmSupportedVersion) { + this.rspRpmSupportedVersion = rspRpmSupportedVersion; + } + + public VersionType getRspRpmSupportedVersion() { + return rspRpmSupportedVersion; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (rspRpmSupportedVersion != null) { + codeLength += rspRpmSupportedVersion.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 8 + reverseOS.write(0x88); + codeLength += 1; + } + + if (rspCrlSupportedVersion != null) { + codeLength += rspCrlSupportedVersion.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 7 + reverseOS.write(0x87); + codeLength += 1; + } + + if (contactlessSupportedRelease != null) { + codeLength += contactlessSupportedRelease.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 6 + reverseOS.write(0x86); + codeLength += 1; + } + + if (eutranSupportedRelease != null) { + codeLength += eutranSupportedRelease.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 5 + reverseOS.write(0x85); + codeLength += 1; + } + + if (cdma2000ehrpdSupportedRelease != null) { + codeLength += cdma2000ehrpdSupportedRelease.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 4 + reverseOS.write(0x84); + codeLength += 1; + } + + if (cdma2000hrpdSupportedRelease != null) { + codeLength += cdma2000hrpdSupportedRelease.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 3 + reverseOS.write(0x83); + codeLength += 1; + } + + if (cdma2000onexSupportedRelease != null) { + codeLength += cdma2000onexSupportedRelease.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + } + + if (utranSupportedRelease != null) { + codeLength += utranSupportedRelease.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + if (gsmSupportedRelease != null) { + codeLength += gsmSupportedRelease.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + gsmSupportedRelease = new VersionType(); + vByteCount += gsmSupportedRelease.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + utranSupportedRelease = new VersionType(); + vByteCount += utranSupportedRelease.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + cdma2000onexSupportedRelease = new VersionType(); + vByteCount += cdma2000onexSupportedRelease.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { + cdma2000hrpdSupportedRelease = new VersionType(); + vByteCount += cdma2000hrpdSupportedRelease.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 4)) { + cdma2000ehrpdSupportedRelease = new VersionType(); + vByteCount += cdma2000ehrpdSupportedRelease.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 5)) { + eutranSupportedRelease = new VersionType(); + vByteCount += eutranSupportedRelease.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 6)) { + contactlessSupportedRelease = new VersionType(); + vByteCount += contactlessSupportedRelease.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 7)) { + rspCrlSupportedVersion = new VersionType(); + vByteCount += rspCrlSupportedVersion.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 8)) { + rspRpmSupportedVersion = new VersionType(); + vByteCount += rspRpmSupportedVersion.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (gsmSupportedRelease != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("gsmSupportedRelease: ").append(gsmSupportedRelease); + firstSelectedElement = false; + } + + if (utranSupportedRelease != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("utranSupportedRelease: ").append(utranSupportedRelease); + firstSelectedElement = false; + } + + if (cdma2000onexSupportedRelease != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("cdma2000onexSupportedRelease: ").append(cdma2000onexSupportedRelease); + firstSelectedElement = false; + } + + if (cdma2000hrpdSupportedRelease != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("cdma2000hrpdSupportedRelease: ").append(cdma2000hrpdSupportedRelease); + firstSelectedElement = false; + } + + if (cdma2000ehrpdSupportedRelease != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("cdma2000ehrpdSupportedRelease: ").append(cdma2000ehrpdSupportedRelease); + firstSelectedElement = false; + } + + if (eutranSupportedRelease != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("eutranSupportedRelease: ").append(eutranSupportedRelease); + firstSelectedElement = false; + } + + if (contactlessSupportedRelease != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("contactlessSupportedRelease: ").append(contactlessSupportedRelease); + firstSelectedElement = false; + } + + if (rspCrlSupportedVersion != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("rspCrlSupportedVersion: ").append(rspCrlSupportedVersion); + firstSelectedElement = false; + } + + if (rspRpmSupportedVersion != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("rspRpmSupportedVersion: ").append(rspRpmSupportedVersion); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeviceInfo.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeviceInfo.java new file mode 100644 index 0000000..69ceae0 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DeviceInfo.java @@ -0,0 +1,232 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class DeviceInfo implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private Octet8 tac = null; + private DeviceCapabilities deviceCapabilities = null; + private Octet8 imei = null; + + public DeviceInfo() { + } + + public DeviceInfo(byte[] code) { + this.code = code; + } + + public void setTac(Octet8 tac) { + this.tac = tac; + } + + public Octet8 getTac() { + return tac; + } + + public void setDeviceCapabilities(DeviceCapabilities deviceCapabilities) { + this.deviceCapabilities = deviceCapabilities; + } + + public DeviceCapabilities getDeviceCapabilities() { + return deviceCapabilities; + } + + public void setImei(Octet8 imei) { + this.imei = imei; + } + + public Octet8 getImei() { + return imei; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (imei != null) { + codeLength += imei.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + } + + codeLength += deviceCapabilities.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + + codeLength += tac.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + tac = new Octet8(); + vByteCount += tac.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + deviceCapabilities = new DeviceCapabilities(); + vByteCount += deviceCapabilities.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + imei = new Octet8(); + vByteCount += imei.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (tac != null) { + sb.append("tac: ").append(tac); + } + else { + sb.append("tac: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (deviceCapabilities != null) { + sb.append("deviceCapabilities: "); + deviceCapabilities.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("deviceCapabilities: "); + } + + if (imei != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("imei: ").append(imei); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DisableProfileRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DisableProfileRequest.java new file mode 100644 index 0000000..e348804 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DisableProfileRequest.java @@ -0,0 +1,322 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class DisableProfileRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class ProfileIdentifier implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private OctetTo16 isdpAid = null; + private Iccid iccid = null; + + public ProfileIdentifier() { + } + + public ProfileIdentifier(byte[] code) { + this.code = code; + } + + public void setIsdpAid(OctetTo16 isdpAid) { + this.isdpAid = isdpAid; + } + + public OctetTo16 getIsdpAid() { + return isdpAid; + } + + public void setIccid(Iccid iccid) { + this.iccid = iccid; + } + + public Iccid getIccid() { + return iccid; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (iccid != null) { + codeLength += iccid.encode(reverseOS, true); + return codeLength; + } + + if (isdpAid != null) { + codeLength += isdpAid.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 15 + reverseOS.write(0x4F); + codeLength += 1; + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 15)) { + isdpAid = new OctetTo16(); + tlvByteCount += isdpAid.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(Iccid.tag)) { + iccid = new Iccid(); + tlvByteCount += iccid.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (isdpAid != null) { + sb.append("isdpAid: ").append(isdpAid); + return; + } + + if (iccid != null) { + sb.append("iccid: ").append(iccid); + return; + } + + sb.append(""); + } + + } + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 50); + + private byte[] code = null; + private ProfileIdentifier profileIdentifier = null; + private BerBoolean refreshFlag = null; + + public DisableProfileRequest() { + } + + public DisableProfileRequest(byte[] code) { + this.code = code; + } + + public void setProfileIdentifier(ProfileIdentifier profileIdentifier) { + this.profileIdentifier = profileIdentifier; + } + + public ProfileIdentifier getProfileIdentifier() { + return profileIdentifier; + } + + public void setRefreshFlag(BerBoolean refreshFlag) { + this.refreshFlag = refreshFlag; + } + + public BerBoolean getRefreshFlag() { + return refreshFlag; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + codeLength += refreshFlag.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + sublength = profileIdentifier.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + profileIdentifier = new ProfileIdentifier(); + vByteCount += profileIdentifier.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + refreshFlag = new BerBoolean(); + vByteCount += refreshFlag.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (profileIdentifier != null) { + sb.append("profileIdentifier: "); + profileIdentifier.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("profileIdentifier: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (refreshFlag != null) { + sb.append("refreshFlag: ").append(refreshFlag); + } + else { + sb.append("refreshFlag: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DisableProfileResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DisableProfileResponse.java new file mode 100644 index 0000000..a82ff45 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DisableProfileResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class DisableProfileResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 50); + + private byte[] code = null; + private BerInteger disableResult = null; + + public DisableProfileResponse() { + } + + public DisableProfileResponse(byte[] code) { + this.code = code; + } + + public void setDisableResult(BerInteger disableResult) { + this.disableResult = disableResult; + } + + public BerInteger getDisableResult() { + return disableResult; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += disableResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + disableResult = new BerInteger(); + vByteCount += disableResult.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (disableResult != null) { + sb.append("disableResult: ").append(disableResult); + } + else { + sb.append("disableResult: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DownloadErrorCode.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DownloadErrorCode.java new file mode 100644 index 0000000..817177c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DownloadErrorCode.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class DownloadErrorCode extends BerInteger { + + private static final long serialVersionUID = 1L; + + public DownloadErrorCode() { + } + + public DownloadErrorCode(byte[] code) { + super(code); + } + + public DownloadErrorCode(BigInteger value) { + super(value); + } + + public DownloadErrorCode(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DpProprietaryData.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DpProprietaryData.java new file mode 100644 index 0000000..0346989 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/DpProprietaryData.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class DpProprietaryData implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerObjectIdentifier dpOid = null; + + public DpProprietaryData() { + } + + public DpProprietaryData(byte[] code) { + this.code = code; + } + + public void setDpOid(BerObjectIdentifier dpOid) { + this.dpOid = dpOid; + } + + public BerObjectIdentifier getDpOid() { + return dpOid; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += dpOid.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + dpOid = new BerObjectIdentifier(); + vByteCount += dpOid.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (dpOid != null) { + sb.append("dpOid: ").append(dpOid); + } + else { + sb.append("dpOid: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EUICCInfo1.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EUICCInfo1.java new file mode 100644 index 0000000..8c2c3e5 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EUICCInfo1.java @@ -0,0 +1,500 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EUICCInfo1 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class EuiccCiPKIdListForVerification implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public EuiccCiPKIdListForVerification() { + seqOf = new ArrayList<>(); + } + + public EuiccCiPKIdListForVerification(byte[] code) { + this.code = code; + } + + public List getSubjectKeyIdentifier() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(SubjectKeyIdentifier.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + SubjectKeyIdentifier element = new SubjectKeyIdentifier(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static class EuiccCiPKIdListForSigning implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public EuiccCiPKIdListForSigning() { + seqOf = new ArrayList<>(); + } + + public EuiccCiPKIdListForSigning(byte[] code) { + this.code = code; + } + + public List getSubjectKeyIdentifier() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(SubjectKeyIdentifier.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + SubjectKeyIdentifier element = new SubjectKeyIdentifier(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 32); + + private byte[] code = null; + private VersionType svn = null; + private EuiccCiPKIdListForVerification euiccCiPKIdListForVerification = null; + private EuiccCiPKIdListForSigning euiccCiPKIdListForSigning = null; + + public EUICCInfo1() { + } + + public EUICCInfo1(byte[] code) { + this.code = code; + } + + public void setSvn(VersionType svn) { + this.svn = svn; + } + + public VersionType getSvn() { + return svn; + } + + public void setEuiccCiPKIdListForVerification(EuiccCiPKIdListForVerification euiccCiPKIdListForVerification) { + this.euiccCiPKIdListForVerification = euiccCiPKIdListForVerification; + } + + public EuiccCiPKIdListForVerification getEuiccCiPKIdListForVerification() { + return euiccCiPKIdListForVerification; + } + + public void setEuiccCiPKIdListForSigning(EuiccCiPKIdListForSigning euiccCiPKIdListForSigning) { + this.euiccCiPKIdListForSigning = euiccCiPKIdListForSigning; + } + + public EuiccCiPKIdListForSigning getEuiccCiPKIdListForSigning() { + return euiccCiPKIdListForSigning; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += euiccCiPKIdListForSigning.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 10 + reverseOS.write(0xAA); + codeLength += 1; + + codeLength += euiccCiPKIdListForVerification.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 9 + reverseOS.write(0xA9); + codeLength += 1; + + codeLength += svn.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + svn = new VersionType(); + vByteCount += svn.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 9)) { + euiccCiPKIdListForVerification = new EuiccCiPKIdListForVerification(); + vByteCount += euiccCiPKIdListForVerification.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 10)) { + euiccCiPKIdListForSigning = new EuiccCiPKIdListForSigning(); + vByteCount += euiccCiPKIdListForSigning.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (svn != null) { + sb.append("svn: ").append(svn); + } + else { + sb.append("svn: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCiPKIdListForVerification != null) { + sb.append("euiccCiPKIdListForVerification: "); + euiccCiPKIdListForVerification.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccCiPKIdListForVerification: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCiPKIdListForSigning != null) { + sb.append("euiccCiPKIdListForSigning: "); + euiccCiPKIdListForSigning.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccCiPKIdListForSigning: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EUICCInfo2.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EUICCInfo2.java new file mode 100644 index 0000000..8d5ac65 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EUICCInfo2.java @@ -0,0 +1,886 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EUICCInfo2 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class EuiccCiPKIdListForVerification implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public EuiccCiPKIdListForVerification() { + seqOf = new ArrayList<>(); + } + + public EuiccCiPKIdListForVerification(byte[] code) { + this.code = code; + } + + public List getSubjectKeyIdentifier() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(SubjectKeyIdentifier.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + SubjectKeyIdentifier element = new SubjectKeyIdentifier(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static class EuiccCiPKIdListForSigning implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public EuiccCiPKIdListForSigning() { + seqOf = new ArrayList<>(); + } + + public EuiccCiPKIdListForSigning(byte[] code) { + this.code = code; + } + + public List getSubjectKeyIdentifier() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(SubjectKeyIdentifier.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + SubjectKeyIdentifier element = new SubjectKeyIdentifier(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + sb.append(it.next()); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append(it.next()); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 34); + + private byte[] code = null; + private VersionType profileVersion = null; + private VersionType svn = null; + private VersionType euiccFirmwareVer = null; + private BerOctetString extCardResource = null; + private UICCCapability uiccCapability = null; + private VersionType javacardVersion = null; + private VersionType globalplatformVersion = null; + private RspCapability rspCapability = null; + private EuiccCiPKIdListForVerification euiccCiPKIdListForVerification = null; + private EuiccCiPKIdListForSigning euiccCiPKIdListForSigning = null; + private BerInteger euiccCategory = null; + private PprIds forbiddenProfilePolicyRules = null; + private VersionType ppVersion = null; + private BerUTF8String sasAcreditationNumber = null; + private CertificationDataObject certificationDataObject = null; + + public EUICCInfo2() { + } + + public EUICCInfo2(byte[] code) { + this.code = code; + } + + public void setProfileVersion(VersionType profileVersion) { + this.profileVersion = profileVersion; + } + + public VersionType getProfileVersion() { + return profileVersion; + } + + public void setSvn(VersionType svn) { + this.svn = svn; + } + + public VersionType getSvn() { + return svn; + } + + public void setEuiccFirmwareVer(VersionType euiccFirmwareVer) { + this.euiccFirmwareVer = euiccFirmwareVer; + } + + public VersionType getEuiccFirmwareVer() { + return euiccFirmwareVer; + } + + public void setExtCardResource(BerOctetString extCardResource) { + this.extCardResource = extCardResource; + } + + public BerOctetString getExtCardResource() { + return extCardResource; + } + + public void setUiccCapability(UICCCapability uiccCapability) { + this.uiccCapability = uiccCapability; + } + + public UICCCapability getUiccCapability() { + return uiccCapability; + } + + public void setJavacardVersion(VersionType javacardVersion) { + this.javacardVersion = javacardVersion; + } + + public VersionType getJavacardVersion() { + return javacardVersion; + } + + public void setGlobalplatformVersion(VersionType globalplatformVersion) { + this.globalplatformVersion = globalplatformVersion; + } + + public VersionType getGlobalplatformVersion() { + return globalplatformVersion; + } + + public void setRspCapability(RspCapability rspCapability) { + this.rspCapability = rspCapability; + } + + public RspCapability getRspCapability() { + return rspCapability; + } + + public void setEuiccCiPKIdListForVerification(EuiccCiPKIdListForVerification euiccCiPKIdListForVerification) { + this.euiccCiPKIdListForVerification = euiccCiPKIdListForVerification; + } + + public EuiccCiPKIdListForVerification getEuiccCiPKIdListForVerification() { + return euiccCiPKIdListForVerification; + } + + public void setEuiccCiPKIdListForSigning(EuiccCiPKIdListForSigning euiccCiPKIdListForSigning) { + this.euiccCiPKIdListForSigning = euiccCiPKIdListForSigning; + } + + public EuiccCiPKIdListForSigning getEuiccCiPKIdListForSigning() { + return euiccCiPKIdListForSigning; + } + + public void setEuiccCategory(BerInteger euiccCategory) { + this.euiccCategory = euiccCategory; + } + + public BerInteger getEuiccCategory() { + return euiccCategory; + } + + public void setForbiddenProfilePolicyRules(PprIds forbiddenProfilePolicyRules) { + this.forbiddenProfilePolicyRules = forbiddenProfilePolicyRules; + } + + public PprIds getForbiddenProfilePolicyRules() { + return forbiddenProfilePolicyRules; + } + + public void setPpVersion(VersionType ppVersion) { + this.ppVersion = ppVersion; + } + + public VersionType getPpVersion() { + return ppVersion; + } + + public void setSasAcreditationNumber(BerUTF8String sasAcreditationNumber) { + this.sasAcreditationNumber = sasAcreditationNumber; + } + + public BerUTF8String getSasAcreditationNumber() { + return sasAcreditationNumber; + } + + public void setCertificationDataObject(CertificationDataObject certificationDataObject) { + this.certificationDataObject = certificationDataObject; + } + + public CertificationDataObject getCertificationDataObject() { + return certificationDataObject; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (certificationDataObject != null) { + codeLength += certificationDataObject.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 12 + reverseOS.write(0xAC); + codeLength += 1; + } + + codeLength += sasAcreditationNumber.encode(reverseOS, true); + + codeLength += ppVersion.encode(reverseOS, true); + + if (forbiddenProfilePolicyRules != null) { + codeLength += forbiddenProfilePolicyRules.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 25 + reverseOS.write(0x99); + codeLength += 1; + } + + if (euiccCategory != null) { + codeLength += euiccCategory.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 11 + reverseOS.write(0x8B); + codeLength += 1; + } + + codeLength += euiccCiPKIdListForSigning.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 10 + reverseOS.write(0xAA); + codeLength += 1; + + codeLength += euiccCiPKIdListForVerification.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 9 + reverseOS.write(0xA9); + codeLength += 1; + + codeLength += rspCapability.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 8 + reverseOS.write(0x88); + codeLength += 1; + + if (globalplatformVersion != null) { + codeLength += globalplatformVersion.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 7 + reverseOS.write(0x87); + codeLength += 1; + } + + if (javacardVersion != null) { + codeLength += javacardVersion.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 6 + reverseOS.write(0x86); + codeLength += 1; + } + + codeLength += uiccCapability.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 5 + reverseOS.write(0x85); + codeLength += 1; + + codeLength += extCardResource.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 4 + reverseOS.write(0x84); + codeLength += 1; + + codeLength += euiccFirmwareVer.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 3 + reverseOS.write(0x83); + codeLength += 1; + + codeLength += svn.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + + codeLength += profileVersion.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + profileVersion = new VersionType(); + vByteCount += profileVersion.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + svn = new VersionType(); + vByteCount += svn.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { + euiccFirmwareVer = new VersionType(); + vByteCount += euiccFirmwareVer.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 4)) { + extCardResource = new BerOctetString(); + vByteCount += extCardResource.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 5)) { + uiccCapability = new UICCCapability(); + vByteCount += uiccCapability.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 6)) { + javacardVersion = new VersionType(); + vByteCount += javacardVersion.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 7)) { + globalplatformVersion = new VersionType(); + vByteCount += globalplatformVersion.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 8)) { + rspCapability = new RspCapability(); + vByteCount += rspCapability.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 9)) { + euiccCiPKIdListForVerification = new EuiccCiPKIdListForVerification(); + vByteCount += euiccCiPKIdListForVerification.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 10)) { + euiccCiPKIdListForSigning = new EuiccCiPKIdListForSigning(); + vByteCount += euiccCiPKIdListForSigning.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 11)) { + euiccCategory = new BerInteger(); + vByteCount += euiccCategory.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 25)) { + forbiddenProfilePolicyRules = new PprIds(); + vByteCount += forbiddenProfilePolicyRules.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(VersionType.tag)) { + ppVersion = new VersionType(); + vByteCount += ppVersion.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerUTF8String.tag)) { + sasAcreditationNumber = new BerUTF8String(); + vByteCount += sasAcreditationNumber.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 12)) { + certificationDataObject = new CertificationDataObject(); + vByteCount += certificationDataObject.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (profileVersion != null) { + sb.append("profileVersion: ").append(profileVersion); + } + else { + sb.append("profileVersion: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (svn != null) { + sb.append("svn: ").append(svn); + } + else { + sb.append("svn: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccFirmwareVer != null) { + sb.append("euiccFirmwareVer: ").append(euiccFirmwareVer); + } + else { + sb.append("euiccFirmwareVer: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (extCardResource != null) { + sb.append("extCardResource: ").append(extCardResource); + } + else { + sb.append("extCardResource: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (uiccCapability != null) { + sb.append("uiccCapability: ").append(uiccCapability); + } + else { + sb.append("uiccCapability: "); + } + + if (javacardVersion != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("javacardVersion: ").append(javacardVersion); + } + + if (globalplatformVersion != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("globalplatformVersion: ").append(globalplatformVersion); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (rspCapability != null) { + sb.append("rspCapability: ").append(rspCapability); + } + else { + sb.append("rspCapability: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCiPKIdListForVerification != null) { + sb.append("euiccCiPKIdListForVerification: "); + euiccCiPKIdListForVerification.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccCiPKIdListForVerification: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCiPKIdListForSigning != null) { + sb.append("euiccCiPKIdListForSigning: "); + euiccCiPKIdListForSigning.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccCiPKIdListForSigning: "); + } + + if (euiccCategory != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("euiccCategory: ").append(euiccCategory); + } + + if (forbiddenProfilePolicyRules != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("forbiddenProfilePolicyRules: ").append(forbiddenProfilePolicyRules); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (ppVersion != null) { + sb.append("ppVersion: ").append(ppVersion); + } + else { + sb.append("ppVersion: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (sasAcreditationNumber != null) { + sb.append("sasAcreditationNumber: ").append(sasAcreditationNumber); + } + else { + sb.append("sasAcreditationNumber: "); + } + + if (certificationDataObject != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("certificationDataObject: "); + certificationDataObject.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EUICCSigned2.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EUICCSigned2.java new file mode 100644 index 0000000..f0212fc --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EUICCSigned2.java @@ -0,0 +1,229 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EUICCSigned2 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private BerOctetString euiccOtpk = null; + private Octet32 hashCc = null; + + public EUICCSigned2() { + } + + public EUICCSigned2(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setEuiccOtpk(BerOctetString euiccOtpk) { + this.euiccOtpk = euiccOtpk; + } + + public BerOctetString getEuiccOtpk() { + return euiccOtpk; + } + + public void setHashCc(Octet32 hashCc) { + this.hashCc = hashCc; + } + + public Octet32 getHashCc() { + return hashCc; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (hashCc != null) { + codeLength += hashCc.encode(reverseOS, true); + } + + codeLength += euiccOtpk.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 73 + reverseOS.write(0x49); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 73)) { + euiccOtpk = new BerOctetString(); + vByteCount += euiccOtpk.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Octet32.tag)) { + hashCc = new Octet32(); + vByteCount += hashCc.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccOtpk != null) { + sb.append("euiccOtpk: ").append(euiccOtpk); + } + else { + sb.append("euiccOtpk: "); + } + + if (hashCc != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("hashCc: ").append(hashCc); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EnableProfileRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EnableProfileRequest.java new file mode 100644 index 0000000..d57e04a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EnableProfileRequest.java @@ -0,0 +1,322 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EnableProfileRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class ProfileIdentifier implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private OctetTo16 isdpAid = null; + private Iccid iccid = null; + + public ProfileIdentifier() { + } + + public ProfileIdentifier(byte[] code) { + this.code = code; + } + + public void setIsdpAid(OctetTo16 isdpAid) { + this.isdpAid = isdpAid; + } + + public OctetTo16 getIsdpAid() { + return isdpAid; + } + + public void setIccid(Iccid iccid) { + this.iccid = iccid; + } + + public Iccid getIccid() { + return iccid; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (iccid != null) { + codeLength += iccid.encode(reverseOS, true); + return codeLength; + } + + if (isdpAid != null) { + codeLength += isdpAid.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 15 + reverseOS.write(0x4F); + codeLength += 1; + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 15)) { + isdpAid = new OctetTo16(); + tlvByteCount += isdpAid.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(Iccid.tag)) { + iccid = new Iccid(); + tlvByteCount += iccid.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (isdpAid != null) { + sb.append("isdpAid: ").append(isdpAid); + return; + } + + if (iccid != null) { + sb.append("iccid: ").append(iccid); + return; + } + + sb.append(""); + } + + } + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 49); + + private byte[] code = null; + private ProfileIdentifier profileIdentifier = null; + private BerBoolean refreshFlag = null; + + public EnableProfileRequest() { + } + + public EnableProfileRequest(byte[] code) { + this.code = code; + } + + public void setProfileIdentifier(ProfileIdentifier profileIdentifier) { + this.profileIdentifier = profileIdentifier; + } + + public ProfileIdentifier getProfileIdentifier() { + return profileIdentifier; + } + + public void setRefreshFlag(BerBoolean refreshFlag) { + this.refreshFlag = refreshFlag; + } + + public BerBoolean getRefreshFlag() { + return refreshFlag; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + codeLength += refreshFlag.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + sublength = profileIdentifier.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + profileIdentifier = new ProfileIdentifier(); + vByteCount += profileIdentifier.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + refreshFlag = new BerBoolean(); + vByteCount += refreshFlag.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (profileIdentifier != null) { + sb.append("profileIdentifier: "); + profileIdentifier.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("profileIdentifier: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (refreshFlag != null) { + sb.append("refreshFlag: ").append(refreshFlag); + } + else { + sb.append("refreshFlag: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EnableProfileResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EnableProfileResponse.java new file mode 100644 index 0000000..1279738 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EnableProfileResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EnableProfileResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 49); + + private byte[] code = null; + private BerInteger enableResult = null; + + public EnableProfileResponse() { + } + + public EnableProfileResponse(byte[] code) { + this.code = code; + } + + public void setEnableResult(BerInteger enableResult) { + this.enableResult = enableResult; + } + + public BerInteger getEnableResult() { + return enableResult; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += enableResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + enableResult = new BerInteger(); + vByteCount += enableResult.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (enableResult != null) { + sb.append("enableResult: ").append(enableResult); + } + else { + sb.append("enableResult: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ErrorReason.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ErrorReason.java new file mode 100644 index 0000000..8dc6440 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ErrorReason.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ErrorReason extends BerInteger { + + private static final long serialVersionUID = 1L; + + public ErrorReason() { + } + + public ErrorReason(byte[] code) { + super(code); + } + + public ErrorReason(BigInteger value) { + super(value); + } + + public ErrorReason(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ErrorResult.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ErrorResult.java new file mode 100644 index 0000000..e034f96 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ErrorResult.java @@ -0,0 +1,231 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ErrorResult implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BppCommandId bppCommandId = null; + private ErrorReason errorReason = null; + private BerOctetString simaResponse = null; + + public ErrorResult() { + } + + public ErrorResult(byte[] code) { + this.code = code; + } + + public void setBppCommandId(BppCommandId bppCommandId) { + this.bppCommandId = bppCommandId; + } + + public BppCommandId getBppCommandId() { + return bppCommandId; + } + + public void setErrorReason(ErrorReason errorReason) { + this.errorReason = errorReason; + } + + public ErrorReason getErrorReason() { + return errorReason; + } + + public void setSimaResponse(BerOctetString simaResponse) { + this.simaResponse = simaResponse; + } + + public BerOctetString getSimaResponse() { + return simaResponse; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (simaResponse != null) { + codeLength += simaResponse.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + } + + codeLength += errorReason.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += bppCommandId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + bppCommandId = new BppCommandId(); + vByteCount += bppCommandId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + errorReason = new ErrorReason(); + vByteCount += errorReason.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + simaResponse = new BerOctetString(); + vByteCount += simaResponse.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (bppCommandId != null) { + sb.append("bppCommandId: ").append(bppCommandId); + } + else { + sb.append("bppCommandId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (errorReason != null) { + sb.append("errorReason: ").append(errorReason); + } + else { + sb.append("errorReason: "); + } + + if (simaResponse != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("simaResponse: ").append(simaResponse); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccCancelSessionSigned.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccCancelSessionSigned.java new file mode 100644 index 0000000..69024d5 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccCancelSessionSigned.java @@ -0,0 +1,232 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EuiccCancelSessionSigned implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private BerObjectIdentifier smdpOid = null; + private CancelSessionReason reason = null; + + public EuiccCancelSessionSigned() { + } + + public EuiccCancelSessionSigned(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setSmdpOid(BerObjectIdentifier smdpOid) { + this.smdpOid = smdpOid; + } + + public BerObjectIdentifier getSmdpOid() { + return smdpOid; + } + + public void setReason(CancelSessionReason reason) { + this.reason = reason; + } + + public CancelSessionReason getReason() { + return reason; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += reason.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + + codeLength += smdpOid.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + smdpOid = new BerObjectIdentifier(); + vByteCount += smdpOid.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + reason = new CancelSessionReason(); + vByteCount += reason.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (smdpOid != null) { + sb.append("smdpOid: ").append(smdpOid); + } + else { + sb.append("smdpOid: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (reason != null) { + sb.append("reason: ").append(reason); + } + else { + sb.append("reason: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccConfiguredAddressesRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccConfiguredAddressesRequest.java new file mode 100644 index 0000000..22f409c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccConfiguredAddressesRequest.java @@ -0,0 +1,130 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EuiccConfiguredAddressesRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 60); + + private byte[] code = null; + + public EuiccConfiguredAddressesRequest() { + } + + public EuiccConfiguredAddressesRequest(byte[] code) { + this.code = code; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccConfiguredAddressesResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccConfiguredAddressesResponse.java new file mode 100644 index 0000000..ea83471 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccConfiguredAddressesResponse.java @@ -0,0 +1,198 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EuiccConfiguredAddressesResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 60); + + private byte[] code = null; + private BerUTF8String defaultDpAddress = null; + private BerUTF8String rootDsAddress = null; + + public EuiccConfiguredAddressesResponse() { + } + + public EuiccConfiguredAddressesResponse(byte[] code) { + this.code = code; + } + + public void setDefaultDpAddress(BerUTF8String defaultDpAddress) { + this.defaultDpAddress = defaultDpAddress; + } + + public BerUTF8String getDefaultDpAddress() { + return defaultDpAddress; + } + + public void setRootDsAddress(BerUTF8String rootDsAddress) { + this.rootDsAddress = rootDsAddress; + } + + public BerUTF8String getRootDsAddress() { + return rootDsAddress; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += rootDsAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + if (defaultDpAddress != null) { + codeLength += defaultDpAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + defaultDpAddress = new BerUTF8String(); + vByteCount += defaultDpAddress.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + rootDsAddress = new BerUTF8String(); + vByteCount += rootDsAddress.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (defaultDpAddress != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("defaultDpAddress: ").append(defaultDpAddress); + firstSelectedElement = false; + } + + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (rootDsAddress != null) { + sb.append("rootDsAddress: ").append(rootDsAddress); + } + else { + sb.append("rootDsAddress: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccMemoryResetRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccMemoryResetRequest.java new file mode 100644 index 0000000..196344e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccMemoryResetRequest.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EuiccMemoryResetRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 52); + + private byte[] code = null; + private BerBitString resetOptions = null; + + public EuiccMemoryResetRequest() { + } + + public EuiccMemoryResetRequest(byte[] code) { + this.code = code; + } + + public void setResetOptions(BerBitString resetOptions) { + this.resetOptions = resetOptions; + } + + public BerBitString getResetOptions() { + return resetOptions; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += resetOptions.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + resetOptions = new BerBitString(); + vByteCount += resetOptions.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (resetOptions != null) { + sb.append("resetOptions: ").append(resetOptions); + } + else { + sb.append("resetOptions: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccMemoryResetResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccMemoryResetResponse.java new file mode 100644 index 0000000..5e9f7d0 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccMemoryResetResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EuiccMemoryResetResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 52); + + private byte[] code = null; + private BerInteger resetResult = null; + + public EuiccMemoryResetResponse() { + } + + public EuiccMemoryResetResponse(byte[] code) { + this.code = code; + } + + public void setResetResult(BerInteger resetResult) { + this.resetResult = resetResult; + } + + public BerInteger getResetResult() { + return resetResult; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += resetResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + resetResult = new BerInteger(); + vByteCount += resetResult.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (resetResult != null) { + sb.append("resetResult: ").append(resetResult); + } + else { + sb.append("resetResult: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccSignPIR.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccSignPIR.java new file mode 100644 index 0000000..df1ad02 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccSignPIR.java @@ -0,0 +1,65 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EuiccSignPIR extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 55); + + public EuiccSignPIR() { + } + + public EuiccSignPIR(byte[] value) { + super(value); + } + + @Override public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + int codeLength; + + codeLength = super.encode(reverseOS, false); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is, boolean withTag) throws IOException { + + int codeLength = 0; + + if (withTag) { + codeLength += tag.decodeAndCheck(is); + } + + codeLength += super.decode(is, false); + + return codeLength; + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccSigned1.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccSigned1.java new file mode 100644 index 0000000..adb6345 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EuiccSigned1.java @@ -0,0 +1,301 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EuiccSigned1 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private BerUTF8String serverAddress = null; + private Octet16 serverChallenge = null; + private EUICCInfo2 euiccInfo2 = null; + private CtxParams1 ctxParams1 = null; + + public EuiccSigned1() { + } + + public EuiccSigned1(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setServerAddress(BerUTF8String serverAddress) { + this.serverAddress = serverAddress; + } + + public BerUTF8String getServerAddress() { + return serverAddress; + } + + public void setServerChallenge(Octet16 serverChallenge) { + this.serverChallenge = serverChallenge; + } + + public Octet16 getServerChallenge() { + return serverChallenge; + } + + public void setEuiccInfo2(EUICCInfo2 euiccInfo2) { + this.euiccInfo2 = euiccInfo2; + } + + public EUICCInfo2 getEuiccInfo2() { + return euiccInfo2; + } + + public void setCtxParams1(CtxParams1 ctxParams1) { + this.ctxParams1 = ctxParams1; + } + + public CtxParams1 getCtxParams1() { + return ctxParams1; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += ctxParams1.encode(reverseOS); + + codeLength += euiccInfo2.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 34 + reverseOS.write(0x22); + reverseOS.write(0xBF); + codeLength += 2; + + codeLength += serverChallenge.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 4 + reverseOS.write(0x84); + codeLength += 1; + + codeLength += serverAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 3 + reverseOS.write(0x83); + codeLength += 1; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { + serverAddress = new BerUTF8String(); + vByteCount += serverAddress.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 4)) { + serverChallenge = new Octet16(); + vByteCount += serverChallenge.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 34)) { + euiccInfo2 = new EUICCInfo2(); + vByteCount += euiccInfo2.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + ctxParams1 = new CtxParams1(); + numDecodedBytes = ctxParams1.decode(is, berTag); + if (numDecodedBytes != 0) { + vByteCount += numDecodedBytes; + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverAddress != null) { + sb.append("serverAddress: ").append(serverAddress); + } + else { + sb.append("serverAddress: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverChallenge != null) { + sb.append("serverChallenge: ").append(serverChallenge); + } + else { + sb.append("serverChallenge: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccInfo2 != null) { + sb.append("euiccInfo2: "); + euiccInfo2.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccInfo2: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (ctxParams1 != null) { + sb.append("ctxParams1: "); + ctxParams1.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("ctxParams1: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EventEntries.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EventEntries.java new file mode 100644 index 0000000..4c63231 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/EventEntries.java @@ -0,0 +1,198 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class EventEntries implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerUTF8String eventId = null; + private BerUTF8String rspServerAddress = null; + + public EventEntries() { + } + + public EventEntries(byte[] code) { + this.code = code; + } + + public void setEventId(BerUTF8String eventId) { + this.eventId = eventId; + } + + public BerUTF8String getEventId() { + return eventId; + } + + public void setRspServerAddress(BerUTF8String rspServerAddress) { + this.rspServerAddress = rspServerAddress; + } + + public BerUTF8String getRspServerAddress() { + return rspServerAddress; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += rspServerAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += eventId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + eventId = new BerUTF8String(); + vByteCount += eventId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + rspServerAddress = new BerUTF8String(); + vByteCount += rspServerAddress.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (eventId != null) { + sb.append("eventId: ").append(eventId); + } + else { + sb.append("eventId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (rspServerAddress != null) { + sb.append("rspServerAddress: ").append(rspServerAddress); + } + else { + sb.append("rspServerAddress: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ExpirationDate.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ExpirationDate.java new file mode 100644 index 0000000..fe31f7e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ExpirationDate.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ExpirationDate extends Time { + + private static final long serialVersionUID = 1L; + + public ExpirationDate() { + } + + public ExpirationDate(byte[] code) { + super(code); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetBoundProfilePackageOk.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetBoundProfilePackageOk.java new file mode 100644 index 0000000..37ebb6b --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetBoundProfilePackageOk.java @@ -0,0 +1,200 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetBoundProfilePackageOk implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private BoundProfilePackage boundProfilePackage = null; + + public GetBoundProfilePackageOk() { + } + + public GetBoundProfilePackageOk(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setBoundProfilePackage(BoundProfilePackage boundProfilePackage) { + this.boundProfilePackage = boundProfilePackage; + } + + public BoundProfilePackage getBoundProfilePackage() { + return boundProfilePackage; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += boundProfilePackage.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 54 + reverseOS.write(0x36); + reverseOS.write(0xBF); + codeLength += 2; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 54)) { + boundProfilePackage = new BoundProfilePackage(); + vByteCount += boundProfilePackage.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (boundProfilePackage != null) { + sb.append("boundProfilePackage: "); + boundProfilePackage.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("boundProfilePackage: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetBoundProfilePackageRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetBoundProfilePackageRequest.java new file mode 100644 index 0000000..ccd2f2d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetBoundProfilePackageRequest.java @@ -0,0 +1,200 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetBoundProfilePackageRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 58); + + private byte[] code = null; + private TransactionId transactionId = null; + private PrepareDownloadResponse prepareDownloadResponse = null; + + public GetBoundProfilePackageRequest() { + } + + public GetBoundProfilePackageRequest(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setPrepareDownloadResponse(PrepareDownloadResponse prepareDownloadResponse) { + this.prepareDownloadResponse = prepareDownloadResponse; + } + + public PrepareDownloadResponse getPrepareDownloadResponse() { + return prepareDownloadResponse; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += prepareDownloadResponse.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 33 + reverseOS.write(0x21); + reverseOS.write(0xBF); + codeLength += 2; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 33)) { + prepareDownloadResponse = new PrepareDownloadResponse(); + vByteCount += prepareDownloadResponse.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (prepareDownloadResponse != null) { + sb.append("prepareDownloadResponse: "); + prepareDownloadResponse.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("prepareDownloadResponse: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetBoundProfilePackageResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetBoundProfilePackageResponse.java new file mode 100644 index 0000000..b0bc20a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetBoundProfilePackageResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetBoundProfilePackageResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 58); + + private GetBoundProfilePackageOk getBoundProfilePackageOk = null; + private BerInteger getBoundProfilePackageError = null; + + public GetBoundProfilePackageResponse() { + } + + public GetBoundProfilePackageResponse(byte[] code) { + this.code = code; + } + + public void setGetBoundProfilePackageOk(GetBoundProfilePackageOk getBoundProfilePackageOk) { + this.getBoundProfilePackageOk = getBoundProfilePackageOk; + } + + public GetBoundProfilePackageOk getGetBoundProfilePackageOk() { + return getBoundProfilePackageOk; + } + + public void setGetBoundProfilePackageError(BerInteger getBoundProfilePackageError) { + this.getBoundProfilePackageError = getBoundProfilePackageError; + } + + public BerInteger getGetBoundProfilePackageError() { + return getBoundProfilePackageError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (getBoundProfilePackageError != null) { + codeLength += getBoundProfilePackageError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (getBoundProfilePackageOk != null) { + codeLength += getBoundProfilePackageOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + getBoundProfilePackageOk = new GetBoundProfilePackageOk(); + tlvByteCount += getBoundProfilePackageOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + getBoundProfilePackageError = new BerInteger(); + tlvByteCount += getBoundProfilePackageError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (getBoundProfilePackageOk != null) { + sb.append("getBoundProfilePackageOk: "); + getBoundProfilePackageOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (getBoundProfilePackageError != null) { + sb.append("getBoundProfilePackageError: ").append(getBoundProfilePackageError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccChallengeRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccChallengeRequest.java new file mode 100644 index 0000000..696806f --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccChallengeRequest.java @@ -0,0 +1,130 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetEuiccChallengeRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 46); + + private byte[] code = null; + + public GetEuiccChallengeRequest() { + } + + public GetEuiccChallengeRequest(byte[] code) { + this.code = code; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccChallengeResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccChallengeResponse.java new file mode 100644 index 0000000..f3fda73 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccChallengeResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetEuiccChallengeResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 46); + + private byte[] code = null; + private Octet16 euiccChallenge = null; + + public GetEuiccChallengeResponse() { + } + + public GetEuiccChallengeResponse(byte[] code) { + this.code = code; + } + + public void setEuiccChallenge(Octet16 euiccChallenge) { + this.euiccChallenge = euiccChallenge; + } + + public Octet16 getEuiccChallenge() { + return euiccChallenge; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += euiccChallenge.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + euiccChallenge = new Octet16(); + vByteCount += euiccChallenge.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccChallenge != null) { + sb.append("euiccChallenge: ").append(euiccChallenge); + } + else { + sb.append("euiccChallenge: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccDataRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccDataRequest.java new file mode 100644 index 0000000..22b3a9b --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccDataRequest.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetEuiccDataRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 62); + + private byte[] code = null; + private Octet1 tagList = null; + + public GetEuiccDataRequest() { + } + + public GetEuiccDataRequest(byte[] code) { + this.code = code; + } + + public void setTagList(Octet1 tagList) { + this.tagList = tagList; + } + + public Octet1 getTagList() { + return tagList; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += tagList.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 28 + reverseOS.write(0x5C); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 28)) { + tagList = new Octet1(); + vByteCount += tagList.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (tagList != null) { + sb.append("tagList: ").append(tagList); + } + else { + sb.append("tagList: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccDataResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccDataResponse.java new file mode 100644 index 0000000..7434b1f --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccDataResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetEuiccDataResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 62); + + private byte[] code = null; + private Octet16 eidValue = null; + + public GetEuiccDataResponse() { + } + + public GetEuiccDataResponse(byte[] code) { + this.code = code; + } + + public void setEidValue(Octet16 eidValue) { + this.eidValue = eidValue; + } + + public Octet16 getEidValue() { + return eidValue; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += eidValue.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 26 + reverseOS.write(0x5A); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 26)) { + eidValue = new Octet16(); + vByteCount += eidValue.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (eidValue != null) { + sb.append("eidValue: ").append(eidValue); + } + else { + sb.append("eidValue: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccInfo1Request.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccInfo1Request.java new file mode 100644 index 0000000..8e1ff04 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccInfo1Request.java @@ -0,0 +1,130 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetEuiccInfo1Request implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 32); + + private byte[] code = null; + + public GetEuiccInfo1Request() { + } + + public GetEuiccInfo1Request(byte[] code) { + this.code = code; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccInfo2Request.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccInfo2Request.java new file mode 100644 index 0000000..abc8eb2 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetEuiccInfo2Request.java @@ -0,0 +1,130 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetEuiccInfo2Request implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 34); + + private byte[] code = null; + + public GetEuiccInfo2Request() { + } + + public GetEuiccInfo2Request(byte[] code) { + this.code = code; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetRatRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetRatRequest.java new file mode 100644 index 0000000..5eff623 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetRatRequest.java @@ -0,0 +1,130 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetRatRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 67); + + private byte[] code = null; + + public GetRatRequest() { + } + + public GetRatRequest(byte[] code) { + this.code = code; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetRatResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetRatResponse.java new file mode 100644 index 0000000..9739976 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/GetRatResponse.java @@ -0,0 +1,165 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class GetRatResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 67); + + private byte[] code = null; + private RulesAuthorisationTable rat = null; + + public GetRatResponse() { + } + + public GetRatResponse(byte[] code) { + this.code = code; + } + + public void setRat(RulesAuthorisationTable rat) { + this.rat = rat; + } + + public RulesAuthorisationTable getRat() { + return rat; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += rat.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + rat = new RulesAuthorisationTable(); + vByteCount += rat.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (rat != null) { + sb.append("rat: "); + rat.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("rat: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/HandleNotification.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/HandleNotification.java new file mode 100644 index 0000000..b300023 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/HandleNotification.java @@ -0,0 +1,171 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class HandleNotification implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 61); + + private byte[] code = null; + private PendingNotification pendingNotification = null; + + public HandleNotification() { + } + + public HandleNotification(byte[] code) { + this.code = code; + } + + public void setPendingNotification(PendingNotification pendingNotification) { + this.pendingNotification = pendingNotification; + } + + public PendingNotification getPendingNotification() { + return pendingNotification; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + sublength = pendingNotification.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + pendingNotification = new PendingNotification(); + vByteCount += pendingNotification.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (pendingNotification != null) { + sb.append("pendingNotification: "); + pendingNotification.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("pendingNotification: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ISDRProprietaryApplicationTemplate.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ISDRProprietaryApplicationTemplate.java new file mode 100644 index 0000000..807c6e4 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ISDRProprietaryApplicationTemplate.java @@ -0,0 +1,194 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ISDRProprietaryApplicationTemplate implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.PRIVATE_CLASS, BerTag.CONSTRUCTED, 0); + + private byte[] code = null; + private VersionType svn = null; + private BerBitString lpaeSupport = null; + + public ISDRProprietaryApplicationTemplate() { + } + + public ISDRProprietaryApplicationTemplate(byte[] code) { + this.code = code; + } + + public void setSvn(VersionType svn) { + this.svn = svn; + } + + public VersionType getSvn() { + return svn; + } + + public void setLpaeSupport(BerBitString lpaeSupport) { + this.lpaeSupport = lpaeSupport; + } + + public BerBitString getLpaeSupport() { + return lpaeSupport; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (lpaeSupport != null) { + codeLength += lpaeSupport.encode(reverseOS, true); + } + + codeLength += svn.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + svn = new VersionType(); + vByteCount += svn.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerBitString.tag)) { + lpaeSupport = new BerBitString(); + vByteCount += lpaeSupport.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (svn != null) { + sb.append("svn: ").append(svn); + } + else { + sb.append("svn: "); + } + + if (lpaeSupport != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("lpaeSupport: ").append(lpaeSupport); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Iccid.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Iccid.java new file mode 100644 index 0000000..6b41443 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Iccid.java @@ -0,0 +1,65 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class Iccid extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 26); + + public Iccid() { + } + + public Iccid(byte[] value) { + super(value); + } + + @Override public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + int codeLength; + + codeLength = super.encode(reverseOS, false); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is, boolean withTag) throws IOException { + + int codeLength = 0; + + if (withTag) { + codeLength += tag.decodeAndCheck(is); + } + + codeLength += super.decode(is, false); + + return codeLength; + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/IconType.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/IconType.java new file mode 100644 index 0000000..15eb63d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/IconType.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class IconType extends BerInteger { + + private static final long serialVersionUID = 1L; + + public IconType() { + } + + public IconType(byte[] code) { + super(code); + } + + public IconType(BigInteger value) { + super(value); + } + + public IconType(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitialiseSecureChannelRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitialiseSecureChannelRequest.java new file mode 100644 index 0000000..0388445 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitialiseSecureChannelRequest.java @@ -0,0 +1,300 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class InitialiseSecureChannelRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 35); + + private byte[] code = null; + private RemoteOpId remoteOpId = null; + private TransactionId transactionId = null; + private ControlRefTemplate controlRefTemplate = null; + private BerOctetString smdpOtpk = null; + private BerOctetString smdpSign = null; + + public InitialiseSecureChannelRequest() { + } + + public InitialiseSecureChannelRequest(byte[] code) { + this.code = code; + } + + public void setRemoteOpId(RemoteOpId remoteOpId) { + this.remoteOpId = remoteOpId; + } + + public RemoteOpId getRemoteOpId() { + return remoteOpId; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setControlRefTemplate(ControlRefTemplate controlRefTemplate) { + this.controlRefTemplate = controlRefTemplate; + } + + public ControlRefTemplate getControlRefTemplate() { + return controlRefTemplate; + } + + public void setSmdpOtpk(BerOctetString smdpOtpk) { + this.smdpOtpk = smdpOtpk; + } + + public BerOctetString getSmdpOtpk() { + return smdpOtpk; + } + + public void setSmdpSign(BerOctetString smdpSign) { + this.smdpSign = smdpSign; + } + + public BerOctetString getSmdpSign() { + return smdpSign; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += smdpSign.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 55 + reverseOS.write(0x37); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += smdpOtpk.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 73 + reverseOS.write(0x49); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += controlRefTemplate.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 6 + reverseOS.write(0xA6); + codeLength += 1; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += remoteOpId.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(RemoteOpId.tag)) { + remoteOpId = new RemoteOpId(); + vByteCount += remoteOpId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 6)) { + controlRefTemplate = new ControlRefTemplate(); + vByteCount += controlRefTemplate.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 73)) { + smdpOtpk = new BerOctetString(); + vByteCount += smdpOtpk.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 55)) { + smdpSign = new BerOctetString(); + vByteCount += smdpSign.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (remoteOpId != null) { + sb.append("remoteOpId: ").append(remoteOpId); + } + else { + sb.append("remoteOpId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (controlRefTemplate != null) { + sb.append("controlRefTemplate: "); + controlRefTemplate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("controlRefTemplate: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (smdpOtpk != null) { + sb.append("smdpOtpk: ").append(smdpOtpk); + } + else { + sb.append("smdpOtpk: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (smdpSign != null) { + sb.append("smdpSign: ").append(smdpSign); + } + else { + sb.append("smdpSign: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitiateAuthenticationOkEs9.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitiateAuthenticationOkEs9.java new file mode 100644 index 0000000..de0a58b --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitiateAuthenticationOkEs9.java @@ -0,0 +1,294 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class InitiateAuthenticationOkEs9 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private ServerSigned1 serverSigned1 = null; + private BerOctetString serverSignature1 = null; + private SubjectKeyIdentifier euiccCiPKIdToBeUsed = null; + private Certificate serverCertificate = null; + + public InitiateAuthenticationOkEs9() { + } + + public InitiateAuthenticationOkEs9(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setServerSigned1(ServerSigned1 serverSigned1) { + this.serverSigned1 = serverSigned1; + } + + public ServerSigned1 getServerSigned1() { + return serverSigned1; + } + + public void setServerSignature1(BerOctetString serverSignature1) { + this.serverSignature1 = serverSignature1; + } + + public BerOctetString getServerSignature1() { + return serverSignature1; + } + + public void setEuiccCiPKIdToBeUsed(SubjectKeyIdentifier euiccCiPKIdToBeUsed) { + this.euiccCiPKIdToBeUsed = euiccCiPKIdToBeUsed; + } + + public SubjectKeyIdentifier getEuiccCiPKIdToBeUsed() { + return euiccCiPKIdToBeUsed; + } + + public void setServerCertificate(Certificate serverCertificate) { + this.serverCertificate = serverCertificate; + } + + public Certificate getServerCertificate() { + return serverCertificate; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += serverCertificate.encode(reverseOS, true); + + codeLength += euiccCiPKIdToBeUsed.encode(reverseOS, true); + + codeLength += serverSignature1.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 55 + reverseOS.write(0x37); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += serverSigned1.encode(reverseOS, true); + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(ServerSigned1.tag)) { + serverSigned1 = new ServerSigned1(); + vByteCount += serverSigned1.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 55)) { + serverSignature1 = new BerOctetString(); + vByteCount += serverSignature1.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(SubjectKeyIdentifier.tag)) { + euiccCiPKIdToBeUsed = new SubjectKeyIdentifier(); + vByteCount += euiccCiPKIdToBeUsed.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Certificate.tag)) { + serverCertificate = new Certificate(); + vByteCount += serverCertificate.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverSigned1 != null) { + sb.append("serverSigned1: "); + serverSigned1.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("serverSigned1: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverSignature1 != null) { + sb.append("serverSignature1: ").append(serverSignature1); + } + else { + sb.append("serverSignature1: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCiPKIdToBeUsed != null) { + sb.append("euiccCiPKIdToBeUsed: ").append(euiccCiPKIdToBeUsed); + } + else { + sb.append("euiccCiPKIdToBeUsed: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverCertificate != null) { + sb.append("serverCertificate: "); + serverCertificate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("serverCertificate: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitiateAuthenticationRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitiateAuthenticationRequest.java new file mode 100644 index 0000000..622c8b4 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitiateAuthenticationRequest.java @@ -0,0 +1,230 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class InitiateAuthenticationRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 57); + + private byte[] code = null; + private Octet16 euiccChallenge = null; + private BerUTF8String smdpAddress = null; + private EUICCInfo1 euiccInfo1 = null; + + public InitiateAuthenticationRequest() { + } + + public InitiateAuthenticationRequest(byte[] code) { + this.code = code; + } + + public void setEuiccChallenge(Octet16 euiccChallenge) { + this.euiccChallenge = euiccChallenge; + } + + public Octet16 getEuiccChallenge() { + return euiccChallenge; + } + + public void setSmdpAddress(BerUTF8String smdpAddress) { + this.smdpAddress = smdpAddress; + } + + public BerUTF8String getSmdpAddress() { + return smdpAddress; + } + + public void setEuiccInfo1(EUICCInfo1 euiccInfo1) { + this.euiccInfo1 = euiccInfo1; + } + + public EUICCInfo1 getEuiccInfo1() { + return euiccInfo1; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += euiccInfo1.encode(reverseOS, true); + + codeLength += smdpAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 3 + reverseOS.write(0x83); + codeLength += 1; + + codeLength += euiccChallenge.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + euiccChallenge = new Octet16(); + vByteCount += euiccChallenge.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { + smdpAddress = new BerUTF8String(); + vByteCount += smdpAddress.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(EUICCInfo1.tag)) { + euiccInfo1 = new EUICCInfo1(); + vByteCount += euiccInfo1.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccChallenge != null) { + sb.append("euiccChallenge: ").append(euiccChallenge); + } + else { + sb.append("euiccChallenge: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (smdpAddress != null) { + sb.append("smdpAddress: ").append(smdpAddress); + } + else { + sb.append("smdpAddress: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccInfo1 != null) { + sb.append("euiccInfo1: "); + euiccInfo1.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccInfo1: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitiateAuthenticationResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitiateAuthenticationResponse.java new file mode 100644 index 0000000..2bd6bbc --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/InitiateAuthenticationResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class InitiateAuthenticationResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 57); + + private InitiateAuthenticationOkEs9 initiateAuthenticationOk = null; + private BerInteger initiateAuthenticationError = null; + + public InitiateAuthenticationResponse() { + } + + public InitiateAuthenticationResponse(byte[] code) { + this.code = code; + } + + public void setInitiateAuthenticationOk(InitiateAuthenticationOkEs9 initiateAuthenticationOk) { + this.initiateAuthenticationOk = initiateAuthenticationOk; + } + + public InitiateAuthenticationOkEs9 getInitiateAuthenticationOk() { + return initiateAuthenticationOk; + } + + public void setInitiateAuthenticationError(BerInteger initiateAuthenticationError) { + this.initiateAuthenticationError = initiateAuthenticationError; + } + + public BerInteger getInitiateAuthenticationError() { + return initiateAuthenticationError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (initiateAuthenticationError != null) { + codeLength += initiateAuthenticationError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (initiateAuthenticationOk != null) { + codeLength += initiateAuthenticationOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + initiateAuthenticationOk = new InitiateAuthenticationOkEs9(); + tlvByteCount += initiateAuthenticationOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + initiateAuthenticationError = new BerInteger(); + tlvByteCount += initiateAuthenticationError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (initiateAuthenticationOk != null) { + sb.append("initiateAuthenticationOk: "); + initiateAuthenticationOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (initiateAuthenticationError != null) { + sb.append("initiateAuthenticationError: ").append(initiateAuthenticationError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ListNotificationRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ListNotificationRequest.java new file mode 100644 index 0000000..93b194c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ListNotificationRequest.java @@ -0,0 +1,163 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ListNotificationRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 40); + + private byte[] code = null; + private NotificationEvent profileManagementOperation = null; + + public ListNotificationRequest() { + } + + public ListNotificationRequest(byte[] code) { + this.code = code; + } + + public void setProfileManagementOperation(NotificationEvent profileManagementOperation) { + this.profileManagementOperation = profileManagementOperation; + } + + public NotificationEvent getProfileManagementOperation() { + return profileManagementOperation; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (profileManagementOperation != null) { + codeLength += profileManagementOperation.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + profileManagementOperation = new NotificationEvent(); + vByteCount += profileManagementOperation.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + if (profileManagementOperation != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profileManagementOperation: ").append(profileManagementOperation); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ListNotificationResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ListNotificationResponse.java new file mode 100644 index 0000000..9813647 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ListNotificationResponse.java @@ -0,0 +1,297 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ListNotificationResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 40); + + public static class NotificationMetadataList implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public NotificationMetadataList() { + seqOf = new ArrayList<>(); + } + + public NotificationMetadataList(byte[] code) { + this.code = code; + } + + public List getNotificationMetadata() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(NotificationMetadata.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + NotificationMetadata element = new NotificationMetadata(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + private NotificationMetadataList notificationMetadataList = null; + private BerInteger listNotificationsResultError = null; + + public ListNotificationResponse() { + } + + public ListNotificationResponse(byte[] code) { + this.code = code; + } + + public void setNotificationMetadataList(NotificationMetadataList notificationMetadataList) { + this.notificationMetadataList = notificationMetadataList; + } + + public NotificationMetadataList getNotificationMetadataList() { + return notificationMetadataList; + } + + public void setListNotificationsResultError(BerInteger listNotificationsResultError) { + this.listNotificationsResultError = listNotificationsResultError; + } + + public BerInteger getListNotificationsResultError() { + return listNotificationsResultError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (listNotificationsResultError != null) { + codeLength += listNotificationsResultError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (notificationMetadataList != null) { + codeLength += notificationMetadataList.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + notificationMetadataList = new NotificationMetadataList(); + tlvByteCount += notificationMetadataList.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + listNotificationsResultError = new BerInteger(); + tlvByteCount += listNotificationsResultError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (notificationMetadataList != null) { + sb.append("notificationMetadataList: "); + notificationMetadataList.appendAsString(sb, indentLevel + 1); + return; + } + + if (listNotificationsResultError != null) { + sb.append("listNotificationsResultError: ").append(listNotificationsResultError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLRequest.java new file mode 100644 index 0000000..386c6ff --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLRequest.java @@ -0,0 +1,165 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class LoadCRLRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 53); + + private byte[] code = null; + private CertificateList crl = null; + + public LoadCRLRequest() { + } + + public LoadCRLRequest(byte[] code) { + this.code = code; + } + + public void setCrl(CertificateList crl) { + this.crl = crl; + } + + public CertificateList getCrl() { + return crl; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += crl.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + crl = new CertificateList(); + vByteCount += crl.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (crl != null) { + sb.append("crl: "); + crl.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("crl: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLResponse.java new file mode 100644 index 0000000..a6eed38 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class LoadCRLResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 53); + + private LoadCRLResponseOk loadCRLResponseOk = null; + private LoadCRLResponseError loadCRLResponseError = null; + + public LoadCRLResponse() { + } + + public LoadCRLResponse(byte[] code) { + this.code = code; + } + + public void setLoadCRLResponseOk(LoadCRLResponseOk loadCRLResponseOk) { + this.loadCRLResponseOk = loadCRLResponseOk; + } + + public LoadCRLResponseOk getLoadCRLResponseOk() { + return loadCRLResponseOk; + } + + public void setLoadCRLResponseError(LoadCRLResponseError loadCRLResponseError) { + this.loadCRLResponseError = loadCRLResponseError; + } + + public LoadCRLResponseError getLoadCRLResponseError() { + return loadCRLResponseError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (loadCRLResponseError != null) { + codeLength += loadCRLResponseError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (loadCRLResponseOk != null) { + codeLength += loadCRLResponseOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + loadCRLResponseOk = new LoadCRLResponseOk(); + tlvByteCount += loadCRLResponseOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + loadCRLResponseError = new LoadCRLResponseError(); + tlvByteCount += loadCRLResponseError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (loadCRLResponseOk != null) { + sb.append("loadCRLResponseOk: "); + loadCRLResponseOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (loadCRLResponseError != null) { + sb.append("loadCRLResponseError: ").append(loadCRLResponseError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLResponseError.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLResponseError.java new file mode 100644 index 0000000..9afae4d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLResponseError.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class LoadCRLResponseError extends BerInteger { + + private static final long serialVersionUID = 1L; + + public LoadCRLResponseError() { + } + + public LoadCRLResponseError(byte[] code) { + super(code); + } + + public LoadCRLResponseError(BigInteger value) { + super(value); + } + + public LoadCRLResponseError(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLResponseOk.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLResponseOk.java new file mode 100644 index 0000000..c06b8cc --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LoadCRLResponseOk.java @@ -0,0 +1,435 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class LoadCRLResponseOk implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class MissingParts implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class SEQUENCE implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerInteger number = null; + + public SEQUENCE() { + } + + public SEQUENCE(byte[] code) { + this.code = code; + } + + public void setNumber(BerInteger number) { + this.number = number; + } + + public BerInteger getNumber() { + return number; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += number.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + number = new BerInteger(); + vByteCount += number.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (number != null) { + sb.append("number: ").append(number); + } + else { + sb.append("number: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public MissingParts() { + seqOf = new ArrayList<>(); + } + + public MissingParts(byte[] code) { + this.code = code; + } + + public List getSEQUENCE() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(SEQUENCE.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + SEQUENCE element = new SEQUENCE(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private MissingParts missingParts = null; + + public LoadCRLResponseOk() { + } + + public LoadCRLResponseOk(byte[] code) { + this.code = code; + } + + public void setMissingParts(MissingParts missingParts) { + this.missingParts = missingParts; + } + + public MissingParts getMissingParts() { + return missingParts; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (missingParts != null) { + codeLength += missingParts.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + missingParts = new MissingParts(); + vByteCount += missingParts.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + if (missingParts != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("missingParts: "); + missingParts.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LpaeActivationRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LpaeActivationRequest.java new file mode 100644 index 0000000..6e58fc8 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LpaeActivationRequest.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class LpaeActivationRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 66); + + private byte[] code = null; + private BerBitString lpaeOption = null; + + public LpaeActivationRequest() { + } + + public LpaeActivationRequest(byte[] code) { + this.code = code; + } + + public void setLpaeOption(BerBitString lpaeOption) { + this.lpaeOption = lpaeOption; + } + + public BerBitString getLpaeOption() { + return lpaeOption; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += lpaeOption.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + lpaeOption = new BerBitString(); + vByteCount += lpaeOption.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (lpaeOption != null) { + sb.append("lpaeOption: ").append(lpaeOption); + } + else { + sb.append("lpaeOption: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LpaeActivationResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LpaeActivationResponse.java new file mode 100644 index 0000000..8e73956 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/LpaeActivationResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class LpaeActivationResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 66); + + private byte[] code = null; + private BerInteger lpaeActivationResult = null; + + public LpaeActivationResponse() { + } + + public LpaeActivationResponse(byte[] code) { + this.code = code; + } + + public void setLpaeActivationResult(BerInteger lpaeActivationResult) { + this.lpaeActivationResult = lpaeActivationResult; + } + + public BerInteger getLpaeActivationResult() { + return lpaeActivationResult; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += lpaeActivationResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + lpaeActivationResult = new BerInteger(); + vByteCount += lpaeActivationResult.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (lpaeActivationResult != null) { + sb.append("lpaeActivationResult: ").append(lpaeActivationResult); + } + else { + sb.append("lpaeActivationResult: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationConfigurationInformation.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationConfigurationInformation.java new file mode 100644 index 0000000..db67056 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationConfigurationInformation.java @@ -0,0 +1,198 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class NotificationConfigurationInformation implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private NotificationEvent profileManagementOperation = null; + private BerUTF8String notificationAddress = null; + + public NotificationConfigurationInformation() { + } + + public NotificationConfigurationInformation(byte[] code) { + this.code = code; + } + + public void setProfileManagementOperation(NotificationEvent profileManagementOperation) { + this.profileManagementOperation = profileManagementOperation; + } + + public NotificationEvent getProfileManagementOperation() { + return profileManagementOperation; + } + + public void setNotificationAddress(BerUTF8String notificationAddress) { + this.notificationAddress = notificationAddress; + } + + public BerUTF8String getNotificationAddress() { + return notificationAddress; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += notificationAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += profileManagementOperation.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + profileManagementOperation = new NotificationEvent(); + vByteCount += profileManagementOperation.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + notificationAddress = new BerUTF8String(); + vByteCount += notificationAddress.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (profileManagementOperation != null) { + sb.append("profileManagementOperation: ").append(profileManagementOperation); + } + else { + sb.append("profileManagementOperation: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (notificationAddress != null) { + sb.append("notificationAddress: ").append(notificationAddress); + } + else { + sb.append("notificationAddress: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationEvent.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationEvent.java new file mode 100644 index 0000000..7928f3d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationEvent.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class NotificationEvent extends BerBitString { + + private static final long serialVersionUID = 1L; + + public NotificationEvent() { + } + + public NotificationEvent(byte[] code) { + super(code); + } + + public NotificationEvent(byte[] value, int numBits) { + super(value, numBits); + } + + public NotificationEvent(boolean[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationMetadata.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationMetadata.java new file mode 100644 index 0000000..33a3067 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationMetadata.java @@ -0,0 +1,259 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class NotificationMetadata implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 47); + + private byte[] code = null; + private BerInteger seqNumber = null; + private NotificationEvent profileManagementOperation = null; + private BerUTF8String notificationAddress = null; + private Iccid iccid = null; + + public NotificationMetadata() { + } + + public NotificationMetadata(byte[] code) { + this.code = code; + } + + public void setSeqNumber(BerInteger seqNumber) { + this.seqNumber = seqNumber; + } + + public BerInteger getSeqNumber() { + return seqNumber; + } + + public void setProfileManagementOperation(NotificationEvent profileManagementOperation) { + this.profileManagementOperation = profileManagementOperation; + } + + public NotificationEvent getProfileManagementOperation() { + return profileManagementOperation; + } + + public void setNotificationAddress(BerUTF8String notificationAddress) { + this.notificationAddress = notificationAddress; + } + + public BerUTF8String getNotificationAddress() { + return notificationAddress; + } + + public void setIccid(Iccid iccid) { + this.iccid = iccid; + } + + public Iccid getIccid() { + return iccid; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (iccid != null) { + codeLength += iccid.encode(reverseOS, true); + } + + codeLength += notificationAddress.encode(reverseOS, true); + + codeLength += profileManagementOperation.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += seqNumber.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + seqNumber = new BerInteger(); + vByteCount += seqNumber.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + profileManagementOperation = new NotificationEvent(); + vByteCount += profileManagementOperation.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerUTF8String.tag)) { + notificationAddress = new BerUTF8String(); + vByteCount += notificationAddress.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Iccid.tag)) { + iccid = new Iccid(); + vByteCount += iccid.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqNumber != null) { + sb.append("seqNumber: ").append(seqNumber); + } + else { + sb.append("seqNumber: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (profileManagementOperation != null) { + sb.append("profileManagementOperation: ").append(profileManagementOperation); + } + else { + sb.append("profileManagementOperation: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (notificationAddress != null) { + sb.append("notificationAddress: ").append(notificationAddress); + } + else { + sb.append("notificationAddress: "); + } + + if (iccid != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("iccid: ").append(iccid); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationSentRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationSentRequest.java new file mode 100644 index 0000000..4bb06e1 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationSentRequest.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class NotificationSentRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 48); + + private byte[] code = null; + private BerInteger seqNumber = null; + + public NotificationSentRequest() { + } + + public NotificationSentRequest(byte[] code) { + this.code = code; + } + + public void setSeqNumber(BerInteger seqNumber) { + this.seqNumber = seqNumber; + } + + public BerInteger getSeqNumber() { + return seqNumber; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += seqNumber.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + seqNumber = new BerInteger(); + vByteCount += seqNumber.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqNumber != null) { + sb.append("seqNumber: ").append(seqNumber); + } + else { + sb.append("seqNumber: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationSentResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationSentResponse.java new file mode 100644 index 0000000..9e269e5 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/NotificationSentResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class NotificationSentResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 48); + + private byte[] code = null; + private BerInteger deleteNotificationStatus = null; + + public NotificationSentResponse() { + } + + public NotificationSentResponse(byte[] code) { + this.code = code; + } + + public void setDeleteNotificationStatus(BerInteger deleteNotificationStatus) { + this.deleteNotificationStatus = deleteNotificationStatus; + } + + public BerInteger getDeleteNotificationStatus() { + return deleteNotificationStatus; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += deleteNotificationStatus.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + deleteNotificationStatus = new BerInteger(); + vByteCount += deleteNotificationStatus.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (deleteNotificationStatus != null) { + sb.append("deleteNotificationStatus: ").append(deleteNotificationStatus); + } + else { + sb.append("deleteNotificationStatus: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet1.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet1.java new file mode 100644 index 0000000..627e329 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet1.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class Octet1 extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public Octet1() { + } + + public Octet1(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet16.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet16.java new file mode 100644 index 0000000..9f8cbd2 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet16.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class Octet16 extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public Octet16() { + } + + public Octet16(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet2.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet2.java new file mode 100644 index 0000000..c4ea2dc --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet2.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class Octet2 extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public Octet2() { + } + + public Octet2(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet32.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet32.java new file mode 100644 index 0000000..04f98ea --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet32.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class Octet32 extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public Octet32() { + } + + public Octet32(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet8.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet8.java new file mode 100644 index 0000000..577ccde --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/Octet8.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class Octet8 extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public Octet8() { + } + + public Octet8(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OctetTo16.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OctetTo16.java new file mode 100644 index 0000000..2fb7e99 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OctetTo16.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class OctetTo16 extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public OctetTo16() { + } + + public OctetTo16(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OidValues.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OidValues.java new file mode 100644 index 0000000..b277076 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OidValues.java @@ -0,0 +1,43 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public final class OidValues { + public static final BerObjectIdentifier idRsp = new BerObjectIdentifier(new int[]{2, 23, 146, 1}); + public static final BerObjectIdentifier idRspCertObjects = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2}); + public static final BerObjectIdentifier idRspExpDate = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 0, 1}); + public static final BerObjectIdentifier idRspPartialCrlNumber = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 0, 3}); + public static final BerObjectIdentifier idRspTotalPartialCrlNumber = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 0, 2}); + public static final BerObjectIdentifier idRspExt = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 0}); + public static final BerObjectIdentifier idRspRole = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 1}); + public static final BerObjectIdentifier idRspRoleCi = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 1, 0}); + public static final BerObjectIdentifier idRspRoleDpAuth = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 1, 4}); + public static final BerObjectIdentifier idRspRoleDpPb = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 1, 5}); + public static final BerObjectIdentifier idRspRoleDpTls = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 1, 3}); + public static final BerObjectIdentifier idRspRoleDsAuth = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 1, 7}); + public static final BerObjectIdentifier idRspRoleDsTls = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 1, 6}); + public static final BerObjectIdentifier idRspRoleEuicc = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 1, 1}); + public static final BerObjectIdentifier idRspRoleEum = new BerObjectIdentifier(new int[]{2, 23, 146, 1, 2, 1, 2}); +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OperatorID.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OperatorID.java new file mode 100644 index 0000000..e8acc42 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OperatorID.java @@ -0,0 +1,230 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class OperatorID implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerOctetString mccMnc = null; + private BerOctetString gid1 = null; + private BerOctetString gid2 = null; + + public OperatorID() { + } + + public OperatorID(byte[] code) { + this.code = code; + } + + public void setMccMnc(BerOctetString mccMnc) { + this.mccMnc = mccMnc; + } + + public BerOctetString getMccMnc() { + return mccMnc; + } + + public void setGid1(BerOctetString gid1) { + this.gid1 = gid1; + } + + public BerOctetString getGid1() { + return gid1; + } + + public void setGid2(BerOctetString gid2) { + this.gid2 = gid2; + } + + public BerOctetString getGid2() { + return gid2; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (gid2 != null) { + codeLength += gid2.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + } + + if (gid1 != null) { + codeLength += gid1.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + } + + codeLength += mccMnc.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + mccMnc = new BerOctetString(); + vByteCount += mccMnc.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + gid1 = new BerOctetString(); + vByteCount += gid1.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + gid2 = new BerOctetString(); + vByteCount += gid2.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (mccMnc != null) { + sb.append("mccMnc: ").append(mccMnc); + } + else { + sb.append("mccMnc: "); + } + + if (gid1 != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("gid1: ").append(gid1); + } + + if (gid2 != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("gid2: ").append(gid2); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OtherSignedNotification.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OtherSignedNotification.java new file mode 100644 index 0000000..9a56ace --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/OtherSignedNotification.java @@ -0,0 +1,261 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class OtherSignedNotification implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private NotificationMetadata tbsOtherNotification = null; + private BerOctetString euiccNotificationSignature = null; + private Certificate euiccCertificate = null; + private Certificate eumCertificate = null; + + public OtherSignedNotification() { + } + + public OtherSignedNotification(byte[] code) { + this.code = code; + } + + public void setTbsOtherNotification(NotificationMetadata tbsOtherNotification) { + this.tbsOtherNotification = tbsOtherNotification; + } + + public NotificationMetadata getTbsOtherNotification() { + return tbsOtherNotification; + } + + public void setEuiccNotificationSignature(BerOctetString euiccNotificationSignature) { + this.euiccNotificationSignature = euiccNotificationSignature; + } + + public BerOctetString getEuiccNotificationSignature() { + return euiccNotificationSignature; + } + + public void setEuiccCertificate(Certificate euiccCertificate) { + this.euiccCertificate = euiccCertificate; + } + + public Certificate getEuiccCertificate() { + return euiccCertificate; + } + + public void setEumCertificate(Certificate eumCertificate) { + this.eumCertificate = eumCertificate; + } + + public Certificate getEumCertificate() { + return eumCertificate; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += eumCertificate.encode(reverseOS, true); + + codeLength += euiccCertificate.encode(reverseOS, true); + + codeLength += euiccNotificationSignature.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 55 + reverseOS.write(0x37); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += tbsOtherNotification.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(NotificationMetadata.tag)) { + tbsOtherNotification = new NotificationMetadata(); + vByteCount += tbsOtherNotification.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 55)) { + euiccNotificationSignature = new BerOctetString(); + vByteCount += euiccNotificationSignature.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Certificate.tag)) { + euiccCertificate = new Certificate(); + vByteCount += euiccCertificate.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Certificate.tag)) { + eumCertificate = new Certificate(); + vByteCount += eumCertificate.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (tbsOtherNotification != null) { + sb.append("tbsOtherNotification: "); + tbsOtherNotification.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("tbsOtherNotification: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccNotificationSignature != null) { + sb.append("euiccNotificationSignature: ").append(euiccNotificationSignature); + } + else { + sb.append("euiccNotificationSignature: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccCertificate != null) { + sb.append("euiccCertificate: "); + euiccCertificate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccCertificate: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (eumCertificate != null) { + sb.append("eumCertificate: "); + eumCertificate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("eumCertificate: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PartialCrlNumber.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PartialCrlNumber.java new file mode 100644 index 0000000..e85d30a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PartialCrlNumber.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class PartialCrlNumber extends BerInteger { + + private static final long serialVersionUID = 1L; + + public PartialCrlNumber() { + } + + public PartialCrlNumber(byte[] code) { + super(code); + } + + public PartialCrlNumber(BigInteger value) { + super(value); + } + + public PartialCrlNumber(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PendingNotification.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PendingNotification.java new file mode 100644 index 0000000..9f089d9 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PendingNotification.java @@ -0,0 +1,146 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class PendingNotification implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private ProfileInstallationResult profileInstallationResult = null; + private OtherSignedNotification otherSignedNotification = null; + + public PendingNotification() { + } + + public PendingNotification(byte[] code) { + this.code = code; + } + + public void setProfileInstallationResult(ProfileInstallationResult profileInstallationResult) { + this.profileInstallationResult = profileInstallationResult; + } + + public ProfileInstallationResult getProfileInstallationResult() { + return profileInstallationResult; + } + + public void setOtherSignedNotification(OtherSignedNotification otherSignedNotification) { + this.otherSignedNotification = otherSignedNotification; + } + + public OtherSignedNotification getOtherSignedNotification() { + return otherSignedNotification; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (otherSignedNotification != null) { + codeLength += otherSignedNotification.encode(reverseOS, true); + return codeLength; + } + + if (profileInstallationResult != null) { + codeLength += profileInstallationResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 55 + reverseOS.write(0x37); + reverseOS.write(0xBF); + codeLength += 2; + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 55)) { + profileInstallationResult = new ProfileInstallationResult(); + tlvByteCount += profileInstallationResult.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(OtherSignedNotification.tag)) { + otherSignedNotification = new OtherSignedNotification(); + tlvByteCount += otherSignedNotification.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (profileInstallationResult != null) { + sb.append("profileInstallationResult: "); + profileInstallationResult.appendAsString(sb, indentLevel + 1); + return; + } + + if (otherSignedNotification != null) { + sb.append("otherSignedNotification: "); + otherSignedNotification.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PprIds.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PprIds.java new file mode 100644 index 0000000..b7a91e3 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PprIds.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class PprIds extends BerBitString { + + private static final long serialVersionUID = 1L; + + public PprIds() { + } + + public PprIds(byte[] code) { + super(code); + } + + public PprIds(byte[] value, int numBits) { + super(value, numBits); + } + + public PprIds(boolean[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadRequest.java new file mode 100644 index 0000000..4d7729f --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadRequest.java @@ -0,0 +1,256 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class PrepareDownloadRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 33); + + private byte[] code = null; + private SmdpSigned2 smdpSigned2 = null; + private BerOctetString smdpSignature2 = null; + private Octet32 hashCc = null; + private Certificate smdpCertificate = null; + + public PrepareDownloadRequest() { + } + + public PrepareDownloadRequest(byte[] code) { + this.code = code; + } + + public void setSmdpSigned2(SmdpSigned2 smdpSigned2) { + this.smdpSigned2 = smdpSigned2; + } + + public SmdpSigned2 getSmdpSigned2() { + return smdpSigned2; + } + + public void setSmdpSignature2(BerOctetString smdpSignature2) { + this.smdpSignature2 = smdpSignature2; + } + + public BerOctetString getSmdpSignature2() { + return smdpSignature2; + } + + public void setHashCc(Octet32 hashCc) { + this.hashCc = hashCc; + } + + public Octet32 getHashCc() { + return hashCc; + } + + public void setSmdpCertificate(Certificate smdpCertificate) { + this.smdpCertificate = smdpCertificate; + } + + public Certificate getSmdpCertificate() { + return smdpCertificate; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += smdpCertificate.encode(reverseOS, true); + + if (hashCc != null) { + codeLength += hashCc.encode(reverseOS, true); + } + + codeLength += smdpSignature2.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 55 + reverseOS.write(0x37); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += smdpSigned2.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(SmdpSigned2.tag)) { + smdpSigned2 = new SmdpSigned2(); + vByteCount += smdpSigned2.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 55)) { + smdpSignature2 = new BerOctetString(); + vByteCount += smdpSignature2.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(Octet32.tag)) { + hashCc = new Octet32(); + vByteCount += hashCc.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(Certificate.tag)) { + smdpCertificate = new Certificate(); + vByteCount += smdpCertificate.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (smdpSigned2 != null) { + sb.append("smdpSigned2: "); + smdpSigned2.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("smdpSigned2: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (smdpSignature2 != null) { + sb.append("smdpSignature2: ").append(smdpSignature2); + } + else { + sb.append("smdpSignature2: "); + } + + if (hashCc != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("hashCc: ").append(hashCc); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (smdpCertificate != null) { + sb.append("smdpCertificate: "); + smdpCertificate.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("smdpCertificate: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadResponse.java new file mode 100644 index 0000000..b726306 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadResponse.java @@ -0,0 +1,165 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class PrepareDownloadResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 33); + + private PrepareDownloadResponseOk downloadResponseOk = null; + private PrepareDownloadResponseError downloadResponseError = null; + + public PrepareDownloadResponse() { + } + + public PrepareDownloadResponse(byte[] code) { + this.code = code; + } + + public void setDownloadResponseOk(PrepareDownloadResponseOk downloadResponseOk) { + this.downloadResponseOk = downloadResponseOk; + } + + public PrepareDownloadResponseOk getDownloadResponseOk() { + return downloadResponseOk; + } + + public void setDownloadResponseError(PrepareDownloadResponseError downloadResponseError) { + this.downloadResponseError = downloadResponseError; + } + + public PrepareDownloadResponseError getDownloadResponseError() { + return downloadResponseError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (downloadResponseError != null) { + codeLength += downloadResponseError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (downloadResponseOk != null) { + codeLength += downloadResponseOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + downloadResponseOk = new PrepareDownloadResponseOk(); + tlvByteCount += downloadResponseOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + downloadResponseError = new PrepareDownloadResponseError(); + tlvByteCount += downloadResponseError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (downloadResponseOk != null) { + sb.append("downloadResponseOk: "); + downloadResponseOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (downloadResponseError != null) { + sb.append("downloadResponseError: "); + downloadResponseError.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadResponseError.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadResponseError.java new file mode 100644 index 0000000..f4499f3 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadResponseError.java @@ -0,0 +1,195 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class PrepareDownloadResponseError implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private DownloadErrorCode downloadErrorCode = null; + + public PrepareDownloadResponseError() { + } + + public PrepareDownloadResponseError(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setDownloadErrorCode(DownloadErrorCode downloadErrorCode) { + this.downloadErrorCode = downloadErrorCode; + } + + public DownloadErrorCode getDownloadErrorCode() { + return downloadErrorCode; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += downloadErrorCode.encode(reverseOS, true); + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(DownloadErrorCode.tag)) { + downloadErrorCode = new DownloadErrorCode(); + vByteCount += downloadErrorCode.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (downloadErrorCode != null) { + sb.append("downloadErrorCode: ").append(downloadErrorCode); + } + else { + sb.append("downloadErrorCode: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadResponseOk.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadResponseOk.java new file mode 100644 index 0000000..cde260a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/PrepareDownloadResponseOk.java @@ -0,0 +1,197 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class PrepareDownloadResponseOk implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private EUICCSigned2 euiccSigned2 = null; + private BerOctetString euiccSignature2 = null; + + public PrepareDownloadResponseOk() { + } + + public PrepareDownloadResponseOk(byte[] code) { + this.code = code; + } + + public void setEuiccSigned2(EUICCSigned2 euiccSigned2) { + this.euiccSigned2 = euiccSigned2; + } + + public EUICCSigned2 getEuiccSigned2() { + return euiccSigned2; + } + + public void setEuiccSignature2(BerOctetString euiccSignature2) { + this.euiccSignature2 = euiccSignature2; + } + + public BerOctetString getEuiccSignature2() { + return euiccSignature2; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += euiccSignature2.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 55 + reverseOS.write(0x37); + reverseOS.write(0x5F); + codeLength += 2; + + codeLength += euiccSigned2.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(EUICCSigned2.tag)) { + euiccSigned2 = new EUICCSigned2(); + vByteCount += euiccSigned2.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 55)) { + euiccSignature2 = new BerOctetString(); + vByteCount += euiccSignature2.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccSigned2 != null) { + sb.append("euiccSigned2: "); + euiccSigned2.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("euiccSigned2: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccSignature2 != null) { + sb.append("euiccSignature2: ").append(euiccSignature2); + } + else { + sb.append("euiccSignature2: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileClass.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileClass.java new file mode 100644 index 0000000..8c4bb00 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileClass.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ProfileClass extends BerInteger { + + private static final long serialVersionUID = 1L; + + public ProfileClass() { + } + + public ProfileClass(byte[] code) { + super(code); + } + + public ProfileClass(BigInteger value) { + super(value); + } + + public ProfileClass(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfo.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfo.java new file mode 100644 index 0000000..8af7c87 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfo.java @@ -0,0 +1,730 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ProfileInfo implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class NotificationConfigurationInfo implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public NotificationConfigurationInfo() { + seqOf = new ArrayList<>(); + } + + public NotificationConfigurationInfo(byte[] code) { + this.code = code; + } + + public List getNotificationConfigurationInformation() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(NotificationConfigurationInformation.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + NotificationConfigurationInformation element = new NotificationConfigurationInformation(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.PRIVATE_CLASS, BerTag.CONSTRUCTED, 3); + + private byte[] code = null; + private Iccid iccid = null; + private OctetTo16 isdpAid = null; + private ProfileState profileState = null; + private BerUTF8String profileNickname = null; + private BerUTF8String serviceProviderName = null; + private BerUTF8String profileName = null; + private IconType iconType = null; + private BerOctetString icon = null; + private ProfileClass profileClass = null; + private NotificationConfigurationInfo notificationConfigurationInfo = null; + private OperatorID profileOwner = null; + private DpProprietaryData dpProprietaryData = null; + private PprIds profilePolicyRules = null; + + public ProfileInfo() { + } + + public ProfileInfo(byte[] code) { + this.code = code; + } + + public void setIccid(Iccid iccid) { + this.iccid = iccid; + } + + public Iccid getIccid() { + return iccid; + } + + public void setIsdpAid(OctetTo16 isdpAid) { + this.isdpAid = isdpAid; + } + + public OctetTo16 getIsdpAid() { + return isdpAid; + } + + public void setProfileState(ProfileState profileState) { + this.profileState = profileState; + } + + public ProfileState getProfileState() { + return profileState; + } + + public void setProfileNickname(BerUTF8String profileNickname) { + this.profileNickname = profileNickname; + } + + public BerUTF8String getProfileNickname() { + return profileNickname; + } + + public void setServiceProviderName(BerUTF8String serviceProviderName) { + this.serviceProviderName = serviceProviderName; + } + + public BerUTF8String getServiceProviderName() { + return serviceProviderName; + } + + public void setProfileName(BerUTF8String profileName) { + this.profileName = profileName; + } + + public BerUTF8String getProfileName() { + return profileName; + } + + public void setIconType(IconType iconType) { + this.iconType = iconType; + } + + public IconType getIconType() { + return iconType; + } + + public void setIcon(BerOctetString icon) { + this.icon = icon; + } + + public BerOctetString getIcon() { + return icon; + } + + public void setProfileClass(ProfileClass profileClass) { + this.profileClass = profileClass; + } + + public ProfileClass getProfileClass() { + return profileClass; + } + + public void setNotificationConfigurationInfo(NotificationConfigurationInfo notificationConfigurationInfo) { + this.notificationConfigurationInfo = notificationConfigurationInfo; + } + + public NotificationConfigurationInfo getNotificationConfigurationInfo() { + return notificationConfigurationInfo; + } + + public void setProfileOwner(OperatorID profileOwner) { + this.profileOwner = profileOwner; + } + + public OperatorID getProfileOwner() { + return profileOwner; + } + + public void setDpProprietaryData(DpProprietaryData dpProprietaryData) { + this.dpProprietaryData = dpProprietaryData; + } + + public DpProprietaryData getDpProprietaryData() { + return dpProprietaryData; + } + + public void setProfilePolicyRules(PprIds profilePolicyRules) { + this.profilePolicyRules = profilePolicyRules; + } + + public PprIds getProfilePolicyRules() { + return profilePolicyRules; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (profilePolicyRules != null) { + codeLength += profilePolicyRules.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 25 + reverseOS.write(0x99); + codeLength += 1; + } + + if (dpProprietaryData != null) { + codeLength += dpProprietaryData.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 24 + reverseOS.write(0xB8); + codeLength += 1; + } + + if (profileOwner != null) { + codeLength += profileOwner.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 23 + reverseOS.write(0xB7); + codeLength += 1; + } + + if (notificationConfigurationInfo != null) { + codeLength += notificationConfigurationInfo.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 22 + reverseOS.write(0xB6); + codeLength += 1; + } + + if (profileClass != null) { + codeLength += profileClass.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 21 + reverseOS.write(0x95); + codeLength += 1; + } + + if (icon != null) { + codeLength += icon.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 20 + reverseOS.write(0x94); + codeLength += 1; + } + + if (iconType != null) { + codeLength += iconType.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 19 + reverseOS.write(0x93); + codeLength += 1; + } + + if (profileName != null) { + codeLength += profileName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 18 + reverseOS.write(0x92); + codeLength += 1; + } + + if (serviceProviderName != null) { + codeLength += serviceProviderName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 17 + reverseOS.write(0x91); + codeLength += 1; + } + + if (profileNickname != null) { + codeLength += profileNickname.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 16 + reverseOS.write(0x90); + codeLength += 1; + } + + if (profileState != null) { + codeLength += profileState.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 112 + reverseOS.write(0x70); + reverseOS.write(0x9F); + codeLength += 2; + } + + if (isdpAid != null) { + codeLength += isdpAid.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 15 + reverseOS.write(0x4F); + codeLength += 1; + } + + if (iccid != null) { + codeLength += iccid.encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(Iccid.tag)) { + iccid = new Iccid(); + vByteCount += iccid.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 15)) { + isdpAid = new OctetTo16(); + vByteCount += isdpAid.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 112)) { + profileState = new ProfileState(); + vByteCount += profileState.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 16)) { + profileNickname = new BerUTF8String(); + vByteCount += profileNickname.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 17)) { + serviceProviderName = new BerUTF8String(); + vByteCount += serviceProviderName.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 18)) { + profileName = new BerUTF8String(); + vByteCount += profileName.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 19)) { + iconType = new IconType(); + vByteCount += iconType.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 20)) { + icon = new BerOctetString(); + vByteCount += icon.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 21)) { + profileClass = new ProfileClass(); + vByteCount += profileClass.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 22)) { + notificationConfigurationInfo = new NotificationConfigurationInfo(); + vByteCount += notificationConfigurationInfo.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 23)) { + profileOwner = new OperatorID(); + vByteCount += profileOwner.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 24)) { + dpProprietaryData = new DpProprietaryData(); + vByteCount += dpProprietaryData.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 25)) { + profilePolicyRules = new PprIds(); + vByteCount += profilePolicyRules.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (iccid != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("iccid: ").append(iccid); + firstSelectedElement = false; + } + + if (isdpAid != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("isdpAid: ").append(isdpAid); + firstSelectedElement = false; + } + + if (profileState != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profileState: ").append(profileState); + firstSelectedElement = false; + } + + if (profileNickname != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profileNickname: ").append(profileNickname); + firstSelectedElement = false; + } + + if (serviceProviderName != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("serviceProviderName: ").append(serviceProviderName); + firstSelectedElement = false; + } + + if (profileName != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profileName: ").append(profileName); + firstSelectedElement = false; + } + + if (iconType != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("iconType: ").append(iconType); + firstSelectedElement = false; + } + + if (icon != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("icon: ").append(icon); + firstSelectedElement = false; + } + + if (profileClass != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profileClass: ").append(profileClass); + firstSelectedElement = false; + } + + if (notificationConfigurationInfo != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("notificationConfigurationInfo: "); + notificationConfigurationInfo.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (profileOwner != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profileOwner: "); + profileOwner.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (dpProprietaryData != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("dpProprietaryData: "); + dpProprietaryData.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (profilePolicyRules != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profilePolicyRules: ").append(profilePolicyRules); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfoListError.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfoListError.java new file mode 100644 index 0000000..21f4af1 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfoListError.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ProfileInfoListError extends BerInteger { + + private static final long serialVersionUID = 1L; + + public ProfileInfoListError() { + } + + public ProfileInfoListError(byte[] code) { + super(code); + } + + public ProfileInfoListError(BigInteger value) { + super(value); + } + + public ProfileInfoListError(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfoListRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfoListRequest.java new file mode 100644 index 0000000..028ddd5 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfoListRequest.java @@ -0,0 +1,352 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ProfileInfoListRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class SearchCriteria implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private OctetTo16 isdpAid = null; + private Iccid iccid = null; + private ProfileClass profileClass = null; + + public SearchCriteria() { + } + + public SearchCriteria(byte[] code) { + this.code = code; + } + + public void setIsdpAid(OctetTo16 isdpAid) { + this.isdpAid = isdpAid; + } + + public OctetTo16 getIsdpAid() { + return isdpAid; + } + + public void setIccid(Iccid iccid) { + this.iccid = iccid; + } + + public Iccid getIccid() { + return iccid; + } + + public void setProfileClass(ProfileClass profileClass) { + this.profileClass = profileClass; + } + + public ProfileClass getProfileClass() { + return profileClass; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (profileClass != null) { + codeLength += profileClass.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 21 + reverseOS.write(0x95); + codeLength += 1; + return codeLength; + } + + if (iccid != null) { + codeLength += iccid.encode(reverseOS, true); + return codeLength; + } + + if (isdpAid != null) { + codeLength += isdpAid.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 15 + reverseOS.write(0x4F); + codeLength += 1; + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 15)) { + isdpAid = new OctetTo16(); + tlvByteCount += isdpAid.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(Iccid.tag)) { + iccid = new Iccid(); + tlvByteCount += iccid.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 21)) { + profileClass = new ProfileClass(); + tlvByteCount += profileClass.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (isdpAid != null) { + sb.append("isdpAid: ").append(isdpAid); + return; + } + + if (iccid != null) { + sb.append("iccid: ").append(iccid); + return; + } + + if (profileClass != null) { + sb.append("profileClass: ").append(profileClass); + return; + } + + sb.append(""); + } + + } + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 45); + + private byte[] code = null; + private SearchCriteria searchCriteria = null; + private BerOctetString tagList = null; + + public ProfileInfoListRequest() { + } + + public ProfileInfoListRequest(byte[] code) { + this.code = code; + } + + public void setSearchCriteria(SearchCriteria searchCriteria) { + this.searchCriteria = searchCriteria; + } + + public SearchCriteria getSearchCriteria() { + return searchCriteria; + } + + public void setTagList(BerOctetString tagList) { + this.tagList = tagList; + } + + public BerOctetString getTagList() { + return tagList; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + if (tagList != null) { + codeLength += tagList.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 28 + reverseOS.write(0x5C); + codeLength += 1; + } + + if (searchCriteria != null) { + sublength = searchCriteria.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + searchCriteria = new SearchCriteria(); + vByteCount += searchCriteria.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 28)) { + tagList = new BerOctetString(); + vByteCount += tagList.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (searchCriteria != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("searchCriteria: "); + searchCriteria.appendAsString(sb, indentLevel + 1); + firstSelectedElement = false; + } + + if (tagList != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("tagList: ").append(tagList); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfoListResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfoListResponse.java new file mode 100644 index 0000000..31b531a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInfoListResponse.java @@ -0,0 +1,297 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ProfileInfoListResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 45); + + public static class ProfileInfoListOk implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public ProfileInfoListOk() { + seqOf = new ArrayList<>(); + } + + public ProfileInfoListOk(byte[] code) { + this.code = code; + } + + public List getProfileInfo() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(ProfileInfo.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + ProfileInfo element = new ProfileInfo(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + private ProfileInfoListOk profileInfoListOk = null; + private ProfileInfoListError profileInfoListError = null; + + public ProfileInfoListResponse() { + } + + public ProfileInfoListResponse(byte[] code) { + this.code = code; + } + + public void setProfileInfoListOk(ProfileInfoListOk profileInfoListOk) { + this.profileInfoListOk = profileInfoListOk; + } + + public ProfileInfoListOk getProfileInfoListOk() { + return profileInfoListOk; + } + + public void setProfileInfoListError(ProfileInfoListError profileInfoListError) { + this.profileInfoListError = profileInfoListError; + } + + public ProfileInfoListError getProfileInfoListError() { + return profileInfoListError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (profileInfoListError != null) { + codeLength += profileInfoListError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (profileInfoListOk != null) { + codeLength += profileInfoListOk.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + profileInfoListOk = new ProfileInfoListOk(); + tlvByteCount += profileInfoListOk.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + profileInfoListError = new ProfileInfoListError(); + tlvByteCount += profileInfoListError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (profileInfoListOk != null) { + sb.append("profileInfoListOk: "); + profileInfoListOk.appendAsString(sb, indentLevel + 1); + return; + } + + if (profileInfoListError != null) { + sb.append("profileInfoListError: ").append(profileInfoListError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInstallationResult.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInstallationResult.java new file mode 100644 index 0000000..96fd9d9 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInstallationResult.java @@ -0,0 +1,197 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ProfileInstallationResult implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 55); + + private byte[] code = null; + private ProfileInstallationResultData profileInstallationResultData = null; + private EuiccSignPIR euiccSignPIR = null; + + public ProfileInstallationResult() { + } + + public ProfileInstallationResult(byte[] code) { + this.code = code; + } + + public void setProfileInstallationResultData(ProfileInstallationResultData profileInstallationResultData) { + this.profileInstallationResultData = profileInstallationResultData; + } + + public ProfileInstallationResultData getProfileInstallationResultData() { + return profileInstallationResultData; + } + + public void setEuiccSignPIR(EuiccSignPIR euiccSignPIR) { + this.euiccSignPIR = euiccSignPIR; + } + + public EuiccSignPIR getEuiccSignPIR() { + return euiccSignPIR; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += euiccSignPIR.encode(reverseOS, true); + + codeLength += profileInstallationResultData.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 39 + reverseOS.write(0x27); + reverseOS.write(0xBF); + codeLength += 2; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 39)) { + profileInstallationResultData = new ProfileInstallationResultData(); + vByteCount += profileInstallationResultData.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(EuiccSignPIR.tag)) { + euiccSignPIR = new EuiccSignPIR(); + vByteCount += euiccSignPIR.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (profileInstallationResultData != null) { + sb.append("profileInstallationResultData: "); + profileInstallationResultData.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("profileInstallationResultData: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccSignPIR != null) { + sb.append("euiccSignPIR: ").append(euiccSignPIR); + } + else { + sb.append("euiccSignPIR: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInstallationResultData.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInstallationResultData.java new file mode 100644 index 0000000..fe13894 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileInstallationResultData.java @@ -0,0 +1,390 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ProfileInstallationResultData implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class FinalResult implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private SuccessResult successResult = null; + private ErrorResult errorResult = null; + + public FinalResult() { + } + + public FinalResult(byte[] code) { + this.code = code; + } + + public void setSuccessResult(SuccessResult successResult) { + this.successResult = successResult; + } + + public SuccessResult getSuccessResult() { + return successResult; + } + + public void setErrorResult(ErrorResult errorResult) { + this.errorResult = errorResult; + } + + public ErrorResult getErrorResult() { + return errorResult; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (errorResult != null) { + codeLength += errorResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + return codeLength; + } + + if (successResult != null) { + codeLength += successResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + successResult = new SuccessResult(); + tlvByteCount += successResult.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + errorResult = new ErrorResult(); + tlvByteCount += errorResult.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (successResult != null) { + sb.append("successResult: "); + successResult.appendAsString(sb, indentLevel + 1); + return; + } + + if (errorResult != null) { + sb.append("errorResult: "); + errorResult.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + + } + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 39); + + private byte[] code = null; + private TransactionId transactionId = null; + private NotificationMetadata notificationMetadata = null; + private BerObjectIdentifier smdpOid = null; + private FinalResult finalResult = null; + + public ProfileInstallationResultData() { + } + + public ProfileInstallationResultData(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setNotificationMetadata(NotificationMetadata notificationMetadata) { + this.notificationMetadata = notificationMetadata; + } + + public NotificationMetadata getNotificationMetadata() { + return notificationMetadata; + } + + public void setSmdpOid(BerObjectIdentifier smdpOid) { + this.smdpOid = smdpOid; + } + + public BerObjectIdentifier getSmdpOid() { + return smdpOid; + } + + public void setFinalResult(FinalResult finalResult) { + this.finalResult = finalResult; + } + + public FinalResult getFinalResult() { + return finalResult; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + sublength = finalResult.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 2 + reverseOS.write(0xA2); + codeLength += 1; + + if (smdpOid != null) { + codeLength += smdpOid.encode(reverseOS, true); + } + + codeLength += notificationMetadata.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 47 + reverseOS.write(0x2F); + reverseOS.write(0xBF); + codeLength += 2; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 47)) { + notificationMetadata = new NotificationMetadata(); + vByteCount += notificationMetadata.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerObjectIdentifier.tag)) { + smdpOid = new BerObjectIdentifier(); + vByteCount += smdpOid.decode(is, false); + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) { + vByteCount += length.decode(is); + finalResult = new FinalResult(); + vByteCount += finalResult.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (notificationMetadata != null) { + sb.append("notificationMetadata: "); + notificationMetadata.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("notificationMetadata: "); + } + + if (smdpOid != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("smdpOid: ").append(smdpOid); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (finalResult != null) { + sb.append("finalResult: "); + finalResult.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("finalResult: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfilePolicyAuthorisationRule.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfilePolicyAuthorisationRule.java new file mode 100644 index 0000000..784789c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfilePolicyAuthorisationRule.java @@ -0,0 +1,366 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ProfilePolicyAuthorisationRule implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class AllowedOperators implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public AllowedOperators() { + seqOf = new ArrayList<>(); + } + + public AllowedOperators(byte[] code) { + this.code = code; + } + + public List getOperatorID() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(OperatorID.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + OperatorID element = new OperatorID(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private PprIds pprIds = null; + private AllowedOperators allowedOperators = null; + private BerBitString pprFlags = null; + + public ProfilePolicyAuthorisationRule() { + } + + public ProfilePolicyAuthorisationRule(byte[] code) { + this.code = code; + } + + public void setPprIds(PprIds pprIds) { + this.pprIds = pprIds; + } + + public PprIds getPprIds() { + return pprIds; + } + + public void setAllowedOperators(AllowedOperators allowedOperators) { + this.allowedOperators = allowedOperators; + } + + public AllowedOperators getAllowedOperators() { + return allowedOperators; + } + + public void setPprFlags(BerBitString pprFlags) { + this.pprFlags = pprFlags; + } + + public BerBitString getPprFlags() { + return pprFlags; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += pprFlags.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + + codeLength += allowedOperators.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 1 + reverseOS.write(0xA1); + codeLength += 1; + + codeLength += pprIds.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + pprIds = new PprIds(); + vByteCount += pprIds.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) { + allowedOperators = new AllowedOperators(); + vByteCount += allowedOperators.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + pprFlags = new BerBitString(); + vByteCount += pprFlags.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (pprIds != null) { + sb.append("pprIds: ").append(pprIds); + } + else { + sb.append("pprIds: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (allowedOperators != null) { + sb.append("allowedOperators: "); + allowedOperators.appendAsString(sb, indentLevel + 1); + } + else { + sb.append("allowedOperators: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (pprFlags != null) { + sb.append("pprFlags: ").append(pprFlags); + } + else { + sb.append("pprFlags: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileState.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileState.java new file mode 100644 index 0000000..d91a54d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ProfileState.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ProfileState extends BerInteger { + + private static final long serialVersionUID = 1L; + + public ProfileState() { + } + + public ProfileState(byte[] code) { + super(code); + } + + public ProfileState(BigInteger value) { + super(value); + } + + public ProfileState(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RemoteOpId.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RemoteOpId.java new file mode 100644 index 0000000..2694b58 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RemoteOpId.java @@ -0,0 +1,83 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class RemoteOpId extends BerInteger { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2); + + private byte[] code = null; + + public RemoteOpId() { + } + + public RemoteOpId(byte[] code) { + this.code = code; + } + + public RemoteOpId(BigInteger value) { + super(value); + } + + public RemoteOpId(long value) { + super(value); + } + + @Override public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength; + + codeLength = super.encode(reverseOS, false); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is, boolean withTag) throws IOException { + + int codeLength = 0; + + if (withTag) { + codeLength += tag.decodeAndCheck(is); + } + + codeLength += super.decode(is, false); + + return codeLength; + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RemoteProfileProvisioningRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RemoteProfileProvisioningRequest.java new file mode 100644 index 0000000..234d6e4 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RemoteProfileProvisioningRequest.java @@ -0,0 +1,272 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class RemoteProfileProvisioningRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2); + + private InitiateAuthenticationRequest initiateAuthenticationRequest = null; + private AuthenticateClientRequest authenticateClientRequest = null; + private GetBoundProfilePackageRequest getBoundProfilePackageRequest = null; + private CancelSessionRequestEs9 cancelSessionRequestEs9 = null; + private HandleNotification handleNotification = null; + + public RemoteProfileProvisioningRequest() { + } + + public RemoteProfileProvisioningRequest(byte[] code) { + this.code = code; + } + + public void setInitiateAuthenticationRequest(InitiateAuthenticationRequest initiateAuthenticationRequest) { + this.initiateAuthenticationRequest = initiateAuthenticationRequest; + } + + public InitiateAuthenticationRequest getInitiateAuthenticationRequest() { + return initiateAuthenticationRequest; + } + + public void setAuthenticateClientRequest(AuthenticateClientRequest authenticateClientRequest) { + this.authenticateClientRequest = authenticateClientRequest; + } + + public AuthenticateClientRequest getAuthenticateClientRequest() { + return authenticateClientRequest; + } + + public void setGetBoundProfilePackageRequest(GetBoundProfilePackageRequest getBoundProfilePackageRequest) { + this.getBoundProfilePackageRequest = getBoundProfilePackageRequest; + } + + public GetBoundProfilePackageRequest getGetBoundProfilePackageRequest() { + return getBoundProfilePackageRequest; + } + + public void setCancelSessionRequestEs9(CancelSessionRequestEs9 cancelSessionRequestEs9) { + this.cancelSessionRequestEs9 = cancelSessionRequestEs9; + } + + public CancelSessionRequestEs9 getCancelSessionRequestEs9() { + return cancelSessionRequestEs9; + } + + public void setHandleNotification(HandleNotification handleNotification) { + this.handleNotification = handleNotification; + } + + public HandleNotification getHandleNotification() { + return handleNotification; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (handleNotification != null) { + codeLength += handleNotification.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 61 + reverseOS.write(0x3D); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (cancelSessionRequestEs9 != null) { + codeLength += cancelSessionRequestEs9.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 65 + reverseOS.write(0x41); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (getBoundProfilePackageRequest != null) { + codeLength += getBoundProfilePackageRequest.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 58 + reverseOS.write(0x3A); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (authenticateClientRequest != null) { + codeLength += authenticateClientRequest.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 59 + reverseOS.write(0x3B); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (initiateAuthenticationRequest != null) { + codeLength += initiateAuthenticationRequest.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 57 + reverseOS.write(0x39); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 57)) { + initiateAuthenticationRequest = new InitiateAuthenticationRequest(); + tlvByteCount += initiateAuthenticationRequest.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 59)) { + authenticateClientRequest = new AuthenticateClientRequest(); + tlvByteCount += authenticateClientRequest.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 58)) { + getBoundProfilePackageRequest = new GetBoundProfilePackageRequest(); + tlvByteCount += getBoundProfilePackageRequest.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 65)) { + cancelSessionRequestEs9 = new CancelSessionRequestEs9(); + tlvByteCount += cancelSessionRequestEs9.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 61)) { + handleNotification = new HandleNotification(); + tlvByteCount += handleNotification.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (initiateAuthenticationRequest != null) { + sb.append("initiateAuthenticationRequest: "); + initiateAuthenticationRequest.appendAsString(sb, indentLevel + 1); + return; + } + + if (authenticateClientRequest != null) { + sb.append("authenticateClientRequest: "); + authenticateClientRequest.appendAsString(sb, indentLevel + 1); + return; + } + + if (getBoundProfilePackageRequest != null) { + sb.append("getBoundProfilePackageRequest: "); + getBoundProfilePackageRequest.appendAsString(sb, indentLevel + 1); + return; + } + + if (cancelSessionRequestEs9 != null) { + sb.append("cancelSessionRequestEs9: "); + cancelSessionRequestEs9.appendAsString(sb, indentLevel + 1); + return; + } + + if (handleNotification != null) { + sb.append("handleNotification: "); + handleNotification.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RemoteProfileProvisioningResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RemoteProfileProvisioningResponse.java new file mode 100644 index 0000000..358e70d --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RemoteProfileProvisioningResponse.java @@ -0,0 +1,272 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class RemoteProfileProvisioningResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2); + + private InitiateAuthenticationResponse initiateAuthenticationResponse = null; + private AuthenticateClientResponseEs9 authenticateClientResponseEs9 = null; + private GetBoundProfilePackageResponse getBoundProfilePackageResponse = null; + private CancelSessionResponseEs9 cancelSessionResponseEs9 = null; + private AuthenticateClientResponseEs11 authenticateClientResponseEs11 = null; + + public RemoteProfileProvisioningResponse() { + } + + public RemoteProfileProvisioningResponse(byte[] code) { + this.code = code; + } + + public void setInitiateAuthenticationResponse(InitiateAuthenticationResponse initiateAuthenticationResponse) { + this.initiateAuthenticationResponse = initiateAuthenticationResponse; + } + + public InitiateAuthenticationResponse getInitiateAuthenticationResponse() { + return initiateAuthenticationResponse; + } + + public void setAuthenticateClientResponseEs9(AuthenticateClientResponseEs9 authenticateClientResponseEs9) { + this.authenticateClientResponseEs9 = authenticateClientResponseEs9; + } + + public AuthenticateClientResponseEs9 getAuthenticateClientResponseEs9() { + return authenticateClientResponseEs9; + } + + public void setGetBoundProfilePackageResponse(GetBoundProfilePackageResponse getBoundProfilePackageResponse) { + this.getBoundProfilePackageResponse = getBoundProfilePackageResponse; + } + + public GetBoundProfilePackageResponse getGetBoundProfilePackageResponse() { + return getBoundProfilePackageResponse; + } + + public void setCancelSessionResponseEs9(CancelSessionResponseEs9 cancelSessionResponseEs9) { + this.cancelSessionResponseEs9 = cancelSessionResponseEs9; + } + + public CancelSessionResponseEs9 getCancelSessionResponseEs9() { + return cancelSessionResponseEs9; + } + + public void setAuthenticateClientResponseEs11(AuthenticateClientResponseEs11 authenticateClientResponseEs11) { + this.authenticateClientResponseEs11 = authenticateClientResponseEs11; + } + + public AuthenticateClientResponseEs11 getAuthenticateClientResponseEs11() { + return authenticateClientResponseEs11; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (authenticateClientResponseEs11 != null) { + codeLength += authenticateClientResponseEs11.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 64 + reverseOS.write(0x40); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (cancelSessionResponseEs9 != null) { + codeLength += cancelSessionResponseEs9.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 65 + reverseOS.write(0x41); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (getBoundProfilePackageResponse != null) { + codeLength += getBoundProfilePackageResponse.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 58 + reverseOS.write(0x3A); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (authenticateClientResponseEs9 != null) { + codeLength += authenticateClientResponseEs9.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 59 + reverseOS.write(0x3B); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (initiateAuthenticationResponse != null) { + codeLength += initiateAuthenticationResponse.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 57 + reverseOS.write(0x39); + reverseOS.write(0xBF); + codeLength += 2; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 57)) { + initiateAuthenticationResponse = new InitiateAuthenticationResponse(); + tlvByteCount += initiateAuthenticationResponse.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 59)) { + authenticateClientResponseEs9 = new AuthenticateClientResponseEs9(); + tlvByteCount += authenticateClientResponseEs9.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 58)) { + getBoundProfilePackageResponse = new GetBoundProfilePackageResponse(); + tlvByteCount += getBoundProfilePackageResponse.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 65)) { + cancelSessionResponseEs9 = new CancelSessionResponseEs9(); + tlvByteCount += cancelSessionResponseEs9.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 64)) { + authenticateClientResponseEs11 = new AuthenticateClientResponseEs11(); + tlvByteCount += authenticateClientResponseEs11.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (initiateAuthenticationResponse != null) { + sb.append("initiateAuthenticationResponse: "); + initiateAuthenticationResponse.appendAsString(sb, indentLevel + 1); + return; + } + + if (authenticateClientResponseEs9 != null) { + sb.append("authenticateClientResponseEs9: "); + authenticateClientResponseEs9.appendAsString(sb, indentLevel + 1); + return; + } + + if (getBoundProfilePackageResponse != null) { + sb.append("getBoundProfilePackageResponse: "); + getBoundProfilePackageResponse.appendAsString(sb, indentLevel + 1); + return; + } + + if (cancelSessionResponseEs9 != null) { + sb.append("cancelSessionResponseEs9: "); + cancelSessionResponseEs9.appendAsString(sb, indentLevel + 1); + return; + } + + if (authenticateClientResponseEs11 != null) { + sb.append("authenticateClientResponseEs11: "); + authenticateClientResponseEs11.appendAsString(sb, indentLevel + 1); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ReplaceSessionKeysRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ReplaceSessionKeysRequest.java new file mode 100644 index 0000000..08ebe7a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ReplaceSessionKeysRequest.java @@ -0,0 +1,232 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ReplaceSessionKeysRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 38); + + private byte[] code = null; + private BerOctetString initialMacChainingValue = null; + private BerOctetString ppkEnc = null; + private BerOctetString ppkCmac = null; + + public ReplaceSessionKeysRequest() { + } + + public ReplaceSessionKeysRequest(byte[] code) { + this.code = code; + } + + public void setInitialMacChainingValue(BerOctetString initialMacChainingValue) { + this.initialMacChainingValue = initialMacChainingValue; + } + + public BerOctetString getInitialMacChainingValue() { + return initialMacChainingValue; + } + + public void setPpkEnc(BerOctetString ppkEnc) { + this.ppkEnc = ppkEnc; + } + + public BerOctetString getPpkEnc() { + return ppkEnc; + } + + public void setPpkCmac(BerOctetString ppkCmac) { + this.ppkCmac = ppkCmac; + } + + public BerOctetString getPpkCmac() { + return ppkCmac; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += ppkCmac.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 2 + reverseOS.write(0x82); + codeLength += 1; + + codeLength += ppkEnc.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += initialMacChainingValue.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + initialMacChainingValue = new BerOctetString(); + vByteCount += initialMacChainingValue.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + ppkEnc = new BerOctetString(); + vByteCount += ppkEnc.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) { + ppkCmac = new BerOctetString(); + vByteCount += ppkCmac.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (initialMacChainingValue != null) { + sb.append("initialMacChainingValue: ").append(initialMacChainingValue); + } + else { + sb.append("initialMacChainingValue: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (ppkEnc != null) { + sb.append("ppkEnc: ").append(ppkEnc); + } + else { + sb.append("ppkEnc: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (ppkCmac != null) { + sb.append("ppkCmac: ").append(ppkCmac); + } + else { + sb.append("ppkCmac: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RetrieveNotificationsListRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RetrieveNotificationsListRequest.java new file mode 100644 index 0000000..0b9cffa --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RetrieveNotificationsListRequest.java @@ -0,0 +1,290 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class RetrieveNotificationsListRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class SearchCriteria implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + private BerInteger seqNumber = null; + private NotificationEvent profileManagementOperation = null; + + public SearchCriteria() { + } + + public SearchCriteria(byte[] code) { + this.code = code; + } + + public void setSeqNumber(BerInteger seqNumber) { + this.seqNumber = seqNumber; + } + + public BerInteger getSeqNumber() { + return seqNumber; + } + + public void setProfileManagementOperation(NotificationEvent profileManagementOperation) { + this.profileManagementOperation = profileManagementOperation; + } + + public NotificationEvent getProfileManagementOperation() { + return profileManagementOperation; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + + if (code != null) { + reverseOS.write(code); + return code.length; + } + + int codeLength = 0; + if (profileManagementOperation != null) { + codeLength += profileManagementOperation.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + return codeLength; + } + + if (seqNumber != null) { + codeLength += seqNumber.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, null); + } + + public int decode(InputStream is, BerTag berTag) throws IOException { + + int tlvByteCount = 0; + boolean tagWasPassed = (berTag != null); + + if (berTag == null) { + berTag = new BerTag(); + tlvByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + seqNumber = new BerInteger(); + tlvByteCount += seqNumber.decode(is, false); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + profileManagementOperation = new NotificationEvent(); + tlvByteCount += profileManagementOperation.decode(is, false); + return tlvByteCount; + } + + if (tagWasPassed) { + return 0; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (seqNumber != null) { + sb.append("seqNumber: ").append(seqNumber); + return; + } + + if (profileManagementOperation != null) { + sb.append("profileManagementOperation: ").append(profileManagementOperation); + return; + } + + sb.append(""); + } + + } + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 43); + + private byte[] code = null; + private SearchCriteria searchCriteria = null; + + public RetrieveNotificationsListRequest() { + } + + public RetrieveNotificationsListRequest(byte[] code) { + this.code = code; + } + + public void setSearchCriteria(SearchCriteria searchCriteria) { + this.searchCriteria = searchCriteria; + } + + public SearchCriteria getSearchCriteria() { + return searchCriteria; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + int sublength; + + if (searchCriteria != null) { + sublength = searchCriteria.encode(reverseOS); + codeLength += sublength; + codeLength += BerLength.encodeLength(reverseOS, sublength); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + vByteCount += length.decode(is); + searchCriteria = new SearchCriteria(); + vByteCount += searchCriteria.decode(is, null); + vByteCount += length.readEocIfIndefinite(is); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + if (searchCriteria != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("searchCriteria: "); + searchCriteria.appendAsString(sb, indentLevel + 1); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RetrieveNotificationsListResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RetrieveNotificationsListResponse.java new file mode 100644 index 0000000..eb756ee --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RetrieveNotificationsListResponse.java @@ -0,0 +1,299 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class RetrieveNotificationsListResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + private byte[] code = null; + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 43); + + public static class NotificationList implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public NotificationList() { + seqOf = new ArrayList<>(); + } + + public NotificationList(byte[] code) { + this.code = code; + } + + public List getPendingNotification() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + int numDecodedBytes; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + PendingNotification element = new PendingNotification(); + numDecodedBytes = element.decode(is, berTag); + if (numDecodedBytes == 0) { + throw new IOException("Tag did not match"); + } + vByteCount += numDecodedBytes; + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + private NotificationList notificationList = null; + private BerInteger notificationsListResultError = null; + + public RetrieveNotificationsListResponse() { + } + + public RetrieveNotificationsListResponse(byte[] code) { + this.code = code; + } + + public void setNotificationList(NotificationList notificationList) { + this.notificationList = notificationList; + } + + public NotificationList getNotificationList() { + return notificationList; + } + + public void setNotificationsListResultError(BerInteger notificationsListResultError) { + this.notificationsListResultError = notificationsListResultError; + } + + public BerInteger getNotificationsListResultError() { + return notificationsListResultError; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (notificationsListResultError != null) { + codeLength += notificationsListResultError.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + if (notificationList != null) { + codeLength += notificationList.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 + reverseOS.write(0xA0); + codeLength += 1; + codeLength += BerLength.encodeLength(reverseOS, codeLength); + if (withTag) { + codeLength += tag.encode(reverseOS); + } + return codeLength; + } + + throw new IOException("Error encoding CHOICE: No element of CHOICE was selected."); + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlvByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlvByteCount += tag.decodeAndCheck(is); + } + + BerLength explicitTagLength = new BerLength(); + tlvByteCount += explicitTagLength.decode(is); + tlvByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { + notificationList = new NotificationList(); + tlvByteCount += notificationList.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + notificationsListResultError = new BerInteger(); + tlvByteCount += notificationsListResultError.decode(is, false); + tlvByteCount += explicitTagLength.readEocIfIndefinite(is); + return tlvByteCount; + } + + throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item."); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + if (notificationList != null) { + sb.append("notificationList: "); + notificationList.appendAsString(sb, indentLevel + 1); + return; + } + + if (notificationsListResultError != null) { + sb.append("notificationsListResultError: ").append(notificationsListResultError); + return; + } + + sb.append(""); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RspCapability.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RspCapability.java new file mode 100644 index 0000000..c2888d3 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RspCapability.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class RspCapability extends BerBitString { + + private static final long serialVersionUID = 1L; + + public RspCapability() { + } + + public RspCapability(byte[] code) { + super(code); + } + + public RspCapability(byte[] value, int numBits) { + super(value, numBits); + } + + public RspCapability(boolean[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RulesAuthorisationTable.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RulesAuthorisationTable.java new file mode 100644 index 0000000..a4b0897 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/RulesAuthorisationTable.java @@ -0,0 +1,159 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class RulesAuthorisationTable implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public RulesAuthorisationTable() { + seqOf = new ArrayList<>(); + } + + public RulesAuthorisationTable(byte[] code) { + this.code = code; + } + + public List getProfilePolicyAuthorisationRule() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(ProfilePolicyAuthorisationRule.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + ProfilePolicyAuthorisationRule element = new ProfilePolicyAuthorisationRule(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ServerSigned1.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ServerSigned1.java new file mode 100644 index 0000000..6bb8ef1 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/ServerSigned1.java @@ -0,0 +1,266 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class ServerSigned1 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private Octet16 euiccChallenge = null; + private BerUTF8String serverAddress = null; + private Octet16 serverChallenge = null; + + public ServerSigned1() { + } + + public ServerSigned1(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setEuiccChallenge(Octet16 euiccChallenge) { + this.euiccChallenge = euiccChallenge; + } + + public Octet16 getEuiccChallenge() { + return euiccChallenge; + } + + public void setServerAddress(BerUTF8String serverAddress) { + this.serverAddress = serverAddress; + } + + public BerUTF8String getServerAddress() { + return serverAddress; + } + + public void setServerChallenge(Octet16 serverChallenge) { + this.serverChallenge = serverChallenge; + } + + public Octet16 getServerChallenge() { + return serverChallenge; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += serverChallenge.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 4 + reverseOS.write(0x84); + codeLength += 1; + + codeLength += serverAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 3 + reverseOS.write(0x83); + codeLength += 1; + + codeLength += euiccChallenge.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 1 + reverseOS.write(0x81); + codeLength += 1; + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { + euiccChallenge = new Octet16(); + vByteCount += euiccChallenge.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { + serverAddress = new BerUTF8String(); + vByteCount += serverAddress.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 4)) { + serverChallenge = new Octet16(); + vByteCount += serverChallenge.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (euiccChallenge != null) { + sb.append("euiccChallenge: ").append(euiccChallenge); + } + else { + sb.append("euiccChallenge: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverAddress != null) { + sb.append("serverAddress: ").append(serverAddress); + } + else { + sb.append("serverAddress: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serverChallenge != null) { + sb.append("serverChallenge: ").append(serverChallenge); + } + else { + sb.append("serverChallenge: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetDefaultDpAddressRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetDefaultDpAddressRequest.java new file mode 100644 index 0000000..1243d63 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetDefaultDpAddressRequest.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class SetDefaultDpAddressRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 63); + + private byte[] code = null; + private BerUTF8String defaultDpAddress = null; + + public SetDefaultDpAddressRequest() { + } + + public SetDefaultDpAddressRequest(byte[] code) { + this.code = code; + } + + public void setDefaultDpAddress(BerUTF8String defaultDpAddress) { + this.defaultDpAddress = defaultDpAddress; + } + + public BerUTF8String getDefaultDpAddress() { + return defaultDpAddress; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += defaultDpAddress.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + defaultDpAddress = new BerUTF8String(); + vByteCount += defaultDpAddress.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (defaultDpAddress != null) { + sb.append("defaultDpAddress: ").append(defaultDpAddress); + } + else { + sb.append("defaultDpAddress: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetDefaultDpAddressResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetDefaultDpAddressResponse.java new file mode 100644 index 0000000..d8d8b9a --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetDefaultDpAddressResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class SetDefaultDpAddressResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 63); + + private byte[] code = null; + private BerInteger setDefaultDpAddressResult = null; + + public SetDefaultDpAddressResponse() { + } + + public SetDefaultDpAddressResponse(byte[] code) { + this.code = code; + } + + public void setSetDefaultDpAddressResult(BerInteger setDefaultDpAddressResult) { + this.setDefaultDpAddressResult = setDefaultDpAddressResult; + } + + public BerInteger getSetDefaultDpAddressResult() { + return setDefaultDpAddressResult; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += setDefaultDpAddressResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + setDefaultDpAddressResult = new BerInteger(); + vByteCount += setDefaultDpAddressResult.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (setDefaultDpAddressResult != null) { + sb.append("setDefaultDpAddressResult: ").append(setDefaultDpAddressResult); + } + else { + sb.append("setDefaultDpAddressResult: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetNicknameRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetNicknameRequest.java new file mode 100644 index 0000000..5d2b3b1 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetNicknameRequest.java @@ -0,0 +1,195 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class SetNicknameRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 41); + + private byte[] code = null; + private Iccid iccid = null; + private BerUTF8String profileNickname = null; + + public SetNicknameRequest() { + } + + public SetNicknameRequest(byte[] code) { + this.code = code; + } + + public void setIccid(Iccid iccid) { + this.iccid = iccid; + } + + public Iccid getIccid() { + return iccid; + } + + public void setProfileNickname(BerUTF8String profileNickname) { + this.profileNickname = profileNickname; + } + + public BerUTF8String getProfileNickname() { + return profileNickname; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += profileNickname.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 16 + reverseOS.write(0x90); + codeLength += 1; + + codeLength += iccid.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(Iccid.tag)) { + iccid = new Iccid(); + vByteCount += iccid.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 16)) { + profileNickname = new BerUTF8String(); + vByteCount += profileNickname.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (iccid != null) { + sb.append("iccid: ").append(iccid); + } + else { + sb.append("iccid: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (profileNickname != null) { + sb.append("profileNickname: ").append(profileNickname); + } + else { + sb.append("profileNickname: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetNicknameResponse.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetNicknameResponse.java new file mode 100644 index 0000000..60c4b7c --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SetNicknameResponse.java @@ -0,0 +1,164 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class SetNicknameResponse implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 41); + + private byte[] code = null; + private BerInteger setNicknameResult = null; + + public SetNicknameResponse() { + } + + public SetNicknameResponse(byte[] code) { + this.code = code; + } + + public void setSetNicknameResult(BerInteger setNicknameResult) { + this.setNicknameResult = setNicknameResult; + } + + public BerInteger getSetNicknameResult() { + return setNicknameResult; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += setNicknameResult.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + setNicknameResult = new BerInteger(); + vByteCount += setNicknameResult.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (setNicknameResult != null) { + sb.append("setNicknameResult: ").append(setNicknameResult); + } + else { + sb.append("setNicknameResult: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SmdpSigned2.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SmdpSigned2.java new file mode 100644 index 0000000..a7a3ff1 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SmdpSigned2.java @@ -0,0 +1,229 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class SmdpSigned2 implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private TransactionId transactionId = null; + private BerBoolean ccRequiredFlag = null; + private BerOctetString bppEuiccOtpk = null; + + public SmdpSigned2() { + } + + public SmdpSigned2(byte[] code) { + this.code = code; + } + + public void setTransactionId(TransactionId transactionId) { + this.transactionId = transactionId; + } + + public TransactionId getTransactionId() { + return transactionId; + } + + public void setCcRequiredFlag(BerBoolean ccRequiredFlag) { + this.ccRequiredFlag = ccRequiredFlag; + } + + public BerBoolean getCcRequiredFlag() { + return ccRequiredFlag; + } + + public void setBppEuiccOtpk(BerOctetString bppEuiccOtpk) { + this.bppEuiccOtpk = bppEuiccOtpk; + } + + public BerOctetString getBppEuiccOtpk() { + return bppEuiccOtpk; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (bppEuiccOtpk != null) { + codeLength += bppEuiccOtpk.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 73 + reverseOS.write(0x49); + reverseOS.write(0x5F); + codeLength += 2; + } + + codeLength += ccRequiredFlag.encode(reverseOS, true); + + codeLength += transactionId.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 0 + reverseOS.write(0x80); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) { + transactionId = new TransactionId(); + vByteCount += transactionId.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerBoolean.tag)) { + ccRequiredFlag = new BerBoolean(); + vByteCount += ccRequiredFlag.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 73)) { + bppEuiccOtpk = new BerOctetString(); + vByteCount += bppEuiccOtpk.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (transactionId != null) { + sb.append("transactionId: ").append(transactionId); + } + else { + sb.append("transactionId: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (ccRequiredFlag != null) { + sb.append("ccRequiredFlag: ").append(ccRequiredFlag); + } + else { + sb.append("ccRequiredFlag: "); + } + + if (bppEuiccOtpk != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("bppEuiccOtpk: ").append(bppEuiccOtpk); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/StoreMetadataRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/StoreMetadataRequest.java new file mode 100644 index 0000000..a63c553 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/StoreMetadataRequest.java @@ -0,0 +1,562 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class StoreMetadataRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static class NotificationConfigurationInfo implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + private byte[] code = null; + private List seqOf = null; + + public NotificationConfigurationInfo() { + seqOf = new ArrayList<>(); + } + + public NotificationConfigurationInfo(byte[] code) { + this.code = code; + } + + public List getNotificationConfigurationInformation() { + if (seqOf == null) { + seqOf = new ArrayList<>(); + } + return seqOf; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + for (int i = (seqOf.size() - 1); i >= 0; i--) { + codeLength += seqOf.get(i).encode(reverseOS, true); + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + + while (vByteCount < lengthVal || lengthVal < 0) { + vByteCount += berTag.decode(is); + + if (lengthVal < 0 && berTag.equals(0, 0, 0)) { + vByteCount += BerLength.readEocByte(is); + break; + } + + if (!berTag.equals(NotificationConfigurationInformation.tag)) { + throw new IOException("Tag does not match mandatory sequence of/set of component."); + } + NotificationConfigurationInformation element = new NotificationConfigurationInformation(); + vByteCount += element.decode(is, false); + seqOf.add(element); + } + if (lengthVal >= 0 && vByteCount != lengthVal) { + throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + lengthVal + " but has " + vByteCount); + + } + return tlByteCount + vByteCount; + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (seqOf == null) { + sb.append("null"); + } + else { + Iterator it = seqOf.iterator(); + if (it.hasNext()) { + it.next().appendAsString(sb, indentLevel + 1); + while (it.hasNext()) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + it.next().appendAsString(sb, indentLevel + 1); + } + } + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + + } + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 37); + + private byte[] code = null; + private Iccid iccid = null; + private BerUTF8String serviceProviderName = null; + private BerUTF8String profileName = null; + private IconType iconType = null; + private BerOctetString icon = null; + private ProfileClass profileClass = null; + private NotificationConfigurationInfo notificationConfigurationInfo = null; + private OperatorID profileOwner = null; + private PprIds profilePolicyRules = null; + + public StoreMetadataRequest() { + } + + public StoreMetadataRequest(byte[] code) { + this.code = code; + } + + public void setIccid(Iccid iccid) { + this.iccid = iccid; + } + + public Iccid getIccid() { + return iccid; + } + + public void setServiceProviderName(BerUTF8String serviceProviderName) { + this.serviceProviderName = serviceProviderName; + } + + public BerUTF8String getServiceProviderName() { + return serviceProviderName; + } + + public void setProfileName(BerUTF8String profileName) { + this.profileName = profileName; + } + + public BerUTF8String getProfileName() { + return profileName; + } + + public void setIconType(IconType iconType) { + this.iconType = iconType; + } + + public IconType getIconType() { + return iconType; + } + + public void setIcon(BerOctetString icon) { + this.icon = icon; + } + + public BerOctetString getIcon() { + return icon; + } + + public void setProfileClass(ProfileClass profileClass) { + this.profileClass = profileClass; + } + + public ProfileClass getProfileClass() { + return profileClass; + } + + public void setNotificationConfigurationInfo(NotificationConfigurationInfo notificationConfigurationInfo) { + this.notificationConfigurationInfo = notificationConfigurationInfo; + } + + public NotificationConfigurationInfo getNotificationConfigurationInfo() { + return notificationConfigurationInfo; + } + + public void setProfileOwner(OperatorID profileOwner) { + this.profileOwner = profileOwner; + } + + public OperatorID getProfileOwner() { + return profileOwner; + } + + public void setProfilePolicyRules(PprIds profilePolicyRules) { + this.profilePolicyRules = profilePolicyRules; + } + + public PprIds getProfilePolicyRules() { + return profilePolicyRules; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (profilePolicyRules != null) { + codeLength += profilePolicyRules.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 25 + reverseOS.write(0x99); + codeLength += 1; + } + + if (profileOwner != null) { + codeLength += profileOwner.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 23 + reverseOS.write(0xB7); + codeLength += 1; + } + + if (notificationConfigurationInfo != null) { + codeLength += notificationConfigurationInfo.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, CONSTRUCTED, 22 + reverseOS.write(0xB6); + codeLength += 1; + } + + if (profileClass != null) { + codeLength += profileClass.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 21 + reverseOS.write(0x95); + codeLength += 1; + } + + if (icon != null) { + codeLength += icon.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 20 + reverseOS.write(0x94); + codeLength += 1; + } + + if (iconType != null) { + codeLength += iconType.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 19 + reverseOS.write(0x93); + codeLength += 1; + } + + codeLength += profileName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 18 + reverseOS.write(0x92); + codeLength += 1; + + codeLength += serviceProviderName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 17 + reverseOS.write(0x91); + codeLength += 1; + + codeLength += iccid.encode(reverseOS, true); + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(Iccid.tag)) { + iccid = new Iccid(); + vByteCount += iccid.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 17)) { + serviceProviderName = new BerUTF8String(); + vByteCount += serviceProviderName.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 18)) { + profileName = new BerUTF8String(); + vByteCount += profileName.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 19)) { + iconType = new IconType(); + vByteCount += iconType.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 20)) { + icon = new BerOctetString(); + vByteCount += icon.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 21)) { + profileClass = new ProfileClass(); + vByteCount += profileClass.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 22)) { + notificationConfigurationInfo = new NotificationConfigurationInfo(); + vByteCount += notificationConfigurationInfo.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 23)) { + profileOwner = new OperatorID(); + vByteCount += profileOwner.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 25)) { + profilePolicyRules = new PprIds(); + vByteCount += profilePolicyRules.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (iccid != null) { + sb.append("iccid: ").append(iccid); + } + else { + sb.append("iccid: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (serviceProviderName != null) { + sb.append("serviceProviderName: ").append(serviceProviderName); + } + else { + sb.append("serviceProviderName: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (profileName != null) { + sb.append("profileName: ").append(profileName); + } + else { + sb.append("profileName: "); + } + + if (iconType != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("iconType: ").append(iconType); + } + + if (icon != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("icon: ").append(icon); + } + + if (profileClass != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profileClass: ").append(profileClass); + } + + if (notificationConfigurationInfo != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("notificationConfigurationInfo: "); + notificationConfigurationInfo.appendAsString(sb, indentLevel + 1); + } + + if (profileOwner != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profileOwner: "); + profileOwner.appendAsString(sb, indentLevel + 1); + } + + if (profilePolicyRules != null) { + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profilePolicyRules: ").append(profilePolicyRules); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SuccessResult.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SuccessResult.java new file mode 100644 index 0000000..407027e --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/SuccessResult.java @@ -0,0 +1,195 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class SuccessResult implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); + + private byte[] code = null; + private BerOctetString aid = null; + private BerOctetString simaResponse = null; + + public SuccessResult() { + } + + public SuccessResult(byte[] code) { + this.code = code; + } + + public void setAid(BerOctetString aid) { + this.aid = aid; + } + + public BerOctetString getAid() { + return aid; + } + + public void setSimaResponse(BerOctetString simaResponse) { + this.simaResponse = simaResponse; + } + + public BerOctetString getSimaResponse() { + return simaResponse; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + codeLength += simaResponse.encode(reverseOS, true); + + codeLength += aid.encode(reverseOS, false); + // write tag: APPLICATION_CLASS, PRIMITIVE, 15 + reverseOS.write(0x4F); + codeLength += 1; + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.APPLICATION_CLASS, BerTag.PRIMITIVE, 15)) { + aid = new BerOctetString(); + vByteCount += aid.decode(is, false); + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (berTag.equals(BerOctetString.tag)) { + simaResponse = new BerOctetString(); + vByteCount += simaResponse.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + else { + throw new IOException("Tag does not match mandatory sequence component."); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (aid != null) { + sb.append("aid: ").append(aid); + } + else { + sb.append("aid: "); + } + + sb.append(",\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + if (simaResponse != null) { + sb.append("simaResponse: ").append(simaResponse); + } + else { + sb.append("simaResponse: "); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/TotalPartialCrlNumber.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/TotalPartialCrlNumber.java new file mode 100644 index 0000000..a3cfca8 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/TotalPartialCrlNumber.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class TotalPartialCrlNumber extends BerInteger { + + private static final long serialVersionUID = 1L; + + public TotalPartialCrlNumber() { + } + + public TotalPartialCrlNumber(byte[] code) { + super(code); + } + + public TotalPartialCrlNumber(BigInteger value) { + super(value); + } + + public TotalPartialCrlNumber(long value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/TransactionId.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/TransactionId.java new file mode 100644 index 0000000..45fba42 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/TransactionId.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class TransactionId extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public TransactionId() { + } + + public TransactionId(byte[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/UICCCapability.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/UICCCapability.java new file mode 100644 index 0000000..f395664 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/UICCCapability.java @@ -0,0 +1,46 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class UICCCapability extends BerBitString { + + private static final long serialVersionUID = 1L; + + public UICCCapability() { + } + + public UICCCapability(byte[] code) { + super(code); + } + + public UICCCapability(byte[] value, int numBits) { + super(value, numBits); + } + + public UICCCapability(boolean[] value) { + super(value); + } + +} diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/UpdateMetadataRequest.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/UpdateMetadataRequest.java new file mode 100644 index 0000000..dbf13f8 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/UpdateMetadataRequest.java @@ -0,0 +1,308 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class UpdateMetadataRequest implements BerType, Serializable { + + private static final long serialVersionUID = 1L; + + public static final BerTag tag = new BerTag(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 42); + + private byte[] code = null; + private BerUTF8String serviceProviderName = null; + private BerUTF8String profileName = null; + private IconType iconType = null; + private BerOctetString icon = null; + private PprIds profilePolicyRules = null; + + public UpdateMetadataRequest() { + } + + public UpdateMetadataRequest(byte[] code) { + this.code = code; + } + + public void setServiceProviderName(BerUTF8String serviceProviderName) { + this.serviceProviderName = serviceProviderName; + } + + public BerUTF8String getServiceProviderName() { + return serviceProviderName; + } + + public void setProfileName(BerUTF8String profileName) { + this.profileName = profileName; + } + + public BerUTF8String getProfileName() { + return profileName; + } + + public void setIconType(IconType iconType) { + this.iconType = iconType; + } + + public IconType getIconType() { + return iconType; + } + + public void setIcon(BerOctetString icon) { + this.icon = icon; + } + + public BerOctetString getIcon() { + return icon; + } + + public void setProfilePolicyRules(PprIds profilePolicyRules) { + this.profilePolicyRules = profilePolicyRules; + } + + public PprIds getProfilePolicyRules() { + return profilePolicyRules; + } + + @Override public int encode(OutputStream reverseOS) throws IOException { + return encode(reverseOS, true); + } + + public int encode(OutputStream reverseOS, boolean withTag) throws IOException { + + if (code != null) { + reverseOS.write(code); + if (withTag) { + return tag.encode(reverseOS) + code.length; + } + return code.length; + } + + int codeLength = 0; + if (profilePolicyRules != null) { + codeLength += profilePolicyRules.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 25 + reverseOS.write(0x99); + codeLength += 1; + } + + if (icon != null) { + codeLength += icon.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 20 + reverseOS.write(0x94); + codeLength += 1; + } + + if (iconType != null) { + codeLength += iconType.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 19 + reverseOS.write(0x93); + codeLength += 1; + } + + if (profileName != null) { + codeLength += profileName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 18 + reverseOS.write(0x92); + codeLength += 1; + } + + if (serviceProviderName != null) { + codeLength += serviceProviderName.encode(reverseOS, false); + // write tag: CONTEXT_CLASS, PRIMITIVE, 17 + reverseOS.write(0x91); + codeLength += 1; + } + + codeLength += BerLength.encodeLength(reverseOS, codeLength); + + if (withTag) { + codeLength += tag.encode(reverseOS); + } + + return codeLength; + + } + + @Override public int decode(InputStream is) throws IOException { + return decode(is, true); + } + + public int decode(InputStream is, boolean withTag) throws IOException { + int tlByteCount = 0; + int vByteCount = 0; + BerTag berTag = new BerTag(); + + if (withTag) { + tlByteCount += tag.decodeAndCheck(is); + } + + BerLength length = new BerLength(); + tlByteCount += length.decode(is); + int lengthVal = length.val; + if (lengthVal == 0) { + return tlByteCount; + } + vByteCount += berTag.decode(is); + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 17)) { + serviceProviderName = new BerUTF8String(); + vByteCount += serviceProviderName.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 18)) { + profileName = new BerUTF8String(); + vByteCount += profileName.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 19)) { + iconType = new IconType(); + vByteCount += iconType.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 20)) { + icon = new BerOctetString(); + vByteCount += icon.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 25)) { + profilePolicyRules = new PprIds(); + vByteCount += profilePolicyRules.decode(is, false); + if (lengthVal >= 0 && vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + + if (lengthVal < 0) { + while (!berTag.equals(0, 0, 0)) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + vByteCount += berTag.decode(is); + } + vByteCount += BerLength.readEocByte(is); + return tlByteCount + vByteCount; + } else { + while (vByteCount < lengthVal) { + vByteCount += DecodeUtil.decodeUnknownComponent(is); + if (vByteCount == lengthVal) { + return tlByteCount + vByteCount; + } + vByteCount += berTag.decode(is); + } + } + throw new IOException("Unexpected end of sequence, length tag: " + lengthVal + ", bytes decoded: " + vByteCount); + } + + public void encodeAndSave(int encodingSizeGuess) throws IOException { + ReverseByteArrayOutputStream reverseOS = new ReverseByteArrayOutputStream(encodingSizeGuess); + encode(reverseOS, false); + code = reverseOS.getArray(); + } + + @Override public String toString() { + StringBuilder sb = new StringBuilder(); + appendAsString(sb, 0); + return sb.toString(); + } + + public void appendAsString(StringBuilder sb, int indentLevel) { + + sb.append("{"); + boolean firstSelectedElement = true; + if (serviceProviderName != null) { + sb.append("\n"); + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("serviceProviderName: ").append(serviceProviderName); + firstSelectedElement = false; + } + + if (profileName != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profileName: ").append(profileName); + firstSelectedElement = false; + } + + if (iconType != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("iconType: ").append(iconType); + firstSelectedElement = false; + } + + if (icon != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("icon: ").append(icon); + firstSelectedElement = false; + } + + if (profilePolicyRules != null) { + if (!firstSelectedElement) { + sb.append(",\n"); + } + for (int i = 0; i < indentLevel + 1; i++) { + sb.append("\t"); + } + sb.append("profilePolicyRules: ").append(profilePolicyRules); + } + + sb.append("\n"); + for (int i = 0; i < indentLevel; i++) { + sb.append("\t"); + } + sb.append("}"); + } + +} + diff --git a/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/VersionType.java b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/VersionType.java new file mode 100644 index 0000000..4c423e9 --- /dev/null +++ b/libs/lpad-sm-dp-plus-connector/src/generated/asn1/com/truphone/rsp/dto/asn1/rspdefinitions/VersionType.java @@ -0,0 +1,38 @@ +/* + * This class file was automatically generated by ASN1bean v1.13.0 (http://www.beanit.com) + */ + +package com.truphone.rsp.dto.asn1.rspdefinitions; + +import java.io.IOException; +import java.io.EOFException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.io.Serializable; +import com.beanit.asn1bean.ber.*; +import com.beanit.asn1bean.ber.types.*; +import com.beanit.asn1bean.ber.types.string.*; + +import com.truphone.rsp.dto.asn1.pkix1explicit88.Certificate; +import com.truphone.rsp.dto.asn1.pkix1explicit88.CertificateList; +import com.truphone.rsp.dto.asn1.pkix1explicit88.Time; +import com.truphone.rsp.dto.asn1.pkix1implicit88.SubjectKeyIdentifier; + +public class VersionType extends BerOctetString { + + private static final long serialVersionUID = 1L; + + public VersionType() { + } + + public VersionType(byte[] value) { + super(value); + } + +}