From aad596c8559b3d3d081617736cdbeda1374f017b Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Fri, 11 May 2012 21:58:30 +0000
Subject: [PATCH] Fix OPENDJ-482: Validation for the CertificateSyntax

---
 opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
index ac9ae3f..956b39d 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 Forgerock AS
  */
 package org.opends.server.protocols.asn1;
 
@@ -116,6 +117,18 @@
 
 
   /**
+   * Finishes reading an explicit tag. Any elements not read in the
+   * explicit tag will be discarded.
+   *
+   * @throws ASN1Exception
+   *           If an error occurs while advancing to the end of the
+   *           explicit tag.
+   */
+  void readEndExplicitTag() throws ASN1Exception;
+
+
+
+  /**
    * Finishes reading a sequence. Any elements not read in the
    * sequence will be discarded.
    *
@@ -234,6 +247,18 @@
 
 
   /**
+   * Reads the next ASN.1 element as an explicit tag. All further
+   * reads will read the elements in the explicit tag until
+   * {@link #readEndExplicitTag()} is called.
+   *
+   * @throws ASN1Exception
+   *           If the next element is not an explicit tag.
+   */
+  void readStartExplicitTag() throws ASN1Exception;
+
+
+
+  /**
    * Reads the next ASN.1 element as a sequence. All further reads
    * will read the elements in the sequence until
    * {@link #readEndSequence()} is called.

--
Gitblit v1.10.0