refactor: [13/n] Nuke Truphone LPAd implementation

This commit is contained in:
Peter Cai 2023-11-25 14:39:26 -05:00
parent b305e1a2d6
commit 25da3671c7
351 changed files with 1 additions and 50451 deletions

View file

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="target/generated-sources/asn1">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View file

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>lpad-sm-dp-plus-connector</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View file

@ -1,6 +0,0 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//target/generated-sources/asn1=UTF-8
encoding/<project>=UTF-8

View file

@ -1,2 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=false

View file

@ -1,9 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=11

View file

@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View file

@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1,29 +0,0 @@
apply plugin: 'java'
apply plugin: 'kotlin'
configurations {
tool
}
dependencies {
tool 'javax.xml.bind:jaxb-api:2.3.0'
tool 'com.beanit:asn1bean-compiler:1.13.0'
implementation 'com.beanit:asn1bean:1.13.0'
implementation 'com.google.code.gson:gson:2.8.4'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'com.github.tomakehurst:wiremock:2.17.0'
}
sourceSets.main.java.srcDirs = ['src/generated/asn1','src/main/java']
task genAsn1(type: JavaExec) {
mainClass = 'com.beanit.asn1bean.compiler.Compiler'
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
}
compileJava.dependsOn genAsn1
compileKotlin.dependsOn genAsn1
description = 'LPAd SM-DP+ Connector'

View file

@ -1,170 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>lpad-sm-dp-plus-parent</artifactId>
<groupId>com.truphone.lpad</groupId>
<version>1.0.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>lpad-sm-dp-plus-connector</artifactId>
<name>LPAd SM-DP+ Connector</name>
<dependencies>
<dependency>
<groupId>org.openmuc</groupId>
<artifactId>jasn1-compiler</artifactId>
</dependency>
<dependency>
<groupId>com.fazecast</groupId>
<artifactId>jSerialComm</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerVersion>${java.version}</compilerVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<mainClass>org.openmuc.jasn1.compiler.Compiler</mainClass>
<arguments>
<argument>-o</argument>
<argument>${project.basedir}/target/generated-sources/asn1/</argument>
<argument>-p</argument>
<argument>com.truphone.rsp.dto.asn1</argument>
<argument>-f</argument>
<argument>${project.basedir}/src/main/resources/PKIXExplicit88.asn</argument>
<argument>${project.basedir}/src/main/resources/PKIXImplicit88.asn</argument>
<argument>${project.basedir}/src/main/resources/rsp.asn</argument>
</arguments>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/target/generated-sources/asn1/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.truphone.lpa.ProfileAssistant</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<configuration>
<archive>
<manifest>
<mainClass>com.truphone.lpa.ProfileAssistant</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -1,153 +0,0 @@
/*
* 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("<none>");
}
}

View file

@ -1,184 +0,0 @@
/*
* 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: <empty-required-field>");
}
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("}");
}
}

View file

@ -1,317 +0,0 @@
/*
* 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<AttributeValue> seqOf = null;
public Values() {
seqOf = new ArrayList<>();
}
public Values(byte[] code) {
this.code = code;
}
public List<AttributeValue> 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<AttributeValue> 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: <empty-required-field>");
}
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: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}

View file

@ -1,38 +0,0 @@
/*
* 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);
}
}

View file

@ -1,182 +0,0 @@
/*
* 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: <empty-required-field>");
}
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: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,181 +0,0 @@
/*
* 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: <empty-required-field>");
}
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: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}

View file

@ -1,155 +0,0 @@
/*
* 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<BuiltInDomainDefinedAttribute> seqOf = null;
public BuiltInDomainDefinedAttributes() {
seqOf = new ArrayList<>();
}
public BuiltInDomainDefinedAttributes(byte[] code) {
this.code = code;
}
public List<BuiltInDomainDefinedAttribute> 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<BuiltInDomainDefinedAttribute> 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("}");
}
}

View file

@ -1,446 +0,0 @@
/*
* 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("}");
}
}

View file

@ -1,214 +0,0 @@
/*
* 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: <empty-required-field>");
}
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: <empty-required-field>");
}
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: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}

View file

@ -1,214 +0,0 @@
/*
* 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: <empty-required-field>");
}
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: <empty-required-field>");
}
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: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}

View file

@ -1,42 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,153 +0,0 @@
/*
* 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("<none>");
}
}

View file

@ -1,211 +0,0 @@
/*
* 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("<none>");
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,305 +0,0 @@
/*
* 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: <empty-required-field>");
}
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("<none>");
}
}

View file

@ -1,208 +0,0 @@
/*
* 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: <empty-required-field>");
}
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: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}

View file

@ -1,193 +0,0 @@
/*
* 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: <empty-required-field>");
}
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: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}

View file

@ -1,155 +0,0 @@
/*
* 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<ExtensionAttribute> seqOf = null;
public ExtensionAttributes() {
seqOf = new ArrayList<>();
}
public ExtensionAttributes(byte[] code) {
this.code = code;
}
public List<ExtensionAttribute> 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<ExtensionAttribute> 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("}");
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,155 +0,0 @@
/*
* 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<Extension> seqOf = null;
public Extensions() {
seqOf = new ArrayList<>();
}
public Extensions(byte[] code) {
this.code = code;
}
public List<Extension> 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<Extension> 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("}");
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,112 +0,0 @@
/*
* 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("<none>");
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,213 +0,0 @@
/*
* 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: <empty-required-field>");
}
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("}");
}
}

View file

@ -1,37 +0,0 @@
/*
* 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});
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,155 +0,0 @@
/*
* 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<OrganizationalUnitName> seqOf = null;
public OrganizationalUnitNames() {
seqOf = new ArrayList<>();
}
public OrganizationalUnitNames(byte[] code) {
this.code = code;
}
public List<OrganizationalUnitName> 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<OrganizationalUnitName> 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("}");
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,177 +0,0 @@
/*
* 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("}");
}
}

View file

@ -1,232 +0,0 @@
/*
* 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: <empty-required-field>");
}
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("}");
}
}

View file

@ -1,136 +0,0 @@
/*
* 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("<none>");
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,136 +0,0 @@
/*
* 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("<none>");
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,405 +0,0 @@
/*
* 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<BerOctetString> seqOf = null;
public NAddresses() {
seqOf = new ArrayList<>();
}
public NAddresses(byte[] code) {
this.code = code;
}
public List<BerOctetString> 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<BerOctetString> 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: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}

View file

@ -1,136 +0,0 @@
/*
* 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("<none>");
}
}

View file

@ -1,155 +0,0 @@
/*
* 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<RelativeDistinguishedName> seqOf = null;
public RDNSequence() {
seqOf = new ArrayList<>();
}
public RDNSequence(byte[] code) {
this.code = code;
}
public List<RelativeDistinguishedName> 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<RelativeDistinguishedName> 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("}");
}
}

View file

@ -1,155 +0,0 @@
/*
* 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<AttributeTypeAndValue> seqOf = null;
public RelativeDistinguishedName() {
seqOf = new ArrayList<>();
}
public RelativeDistinguishedName(byte[] code) {
this.code = code;
}
public List<AttributeTypeAndValue> 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<AttributeTypeAndValue> 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("}");
}
}

View file

@ -1,34 +0,0 @@
/*
* 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);
}
}

View file

@ -1,182 +0,0 @@
/*
* 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: <empty-required-field>");
}
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: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}

View file

@ -1,677 +0,0 @@
/*
* 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;
}