From 084c3fc9d6dd02dc86dc16d99f2d2476c50bbbec 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

---
 opendj-sdk/opends/src/server/org/opends/server/schema/CertificateSyntax.java                                                |  270 +++++++++
 opendj-sdk/opends/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java                                       |   12 
 opendj-sdk/opends/src/server/org/opends/server/schema/PrintableStringSyntax.java                                            |   11 
 opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java                   |   64 ++
 opendj-sdk/opends/src/messages/messages/core.properties                                                                     |    8 
 opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java                                               |   25 
 opendj-sdk/opends/src/server/org/opends/server/schema/CertificateListSyntax.java                                            |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java                                  |   11 
 opendj-sdk/opends/src/messages/messages/core_fr.properties                                                                  |    8 
 opendj-sdk/opends/src/server/org/opends/server/schema/NameFormSyntax.java                                                   |   12 
 opendj-sdk/opends/src/admin/defn/org/opends/server/admin/std/CertificateAttributeSyntaxConfiguration.xml                    |   75 ++
 opendj-sdk/opends/src/server/org/opends/server/schema/FaxNumberSyntax.java                                                  |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/OIDSyntax.java                                                        |   11 
 opendj-sdk/opends/resource/config/config.ldif                                                                               |    2 
 opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java                                                     |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java                                                       |   11 
 opendj-sdk/opends/src/messages/messages/schema_fr.properties                                                                |    6 
 opendj-sdk/opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java                                             |   12 
 opendj-sdk/opends/src/messages/messages/schema_zh_TW.properties                                                             |    6 
 opendj-sdk/opends/src/server/org/opends/server/schema/UTCTimeSyntax.java                                                    |   11 
 opendj-sdk/opends/src/messages/messages/schema_de.properties                                                                |    3 
 opendj-sdk/opends/src/server/org/opends/server/schema/NumericStringSyntax.java                                              |   11 
 opendj-sdk/opends/src/messages/messages/schema_zh_CN.properties                                                             |    6 
 opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java                                            |    8 
 opendj-sdk/opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java                                      |   18 
 opendj-sdk/opends/src/server/org/opends/server/schema/UserPasswordSyntax.java                                               |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java                                           |   12 
 opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExternalSASLMechanismHandlerTestCase.java |   39 +
 opendj-sdk/opends/src/messages/messages/schema_es.properties                                                                |    6 
 opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java                                          |   11 
 opendj-sdk/opends/src/messages/messages/core_de.properties                                                                  |    3 
 opendj-sdk/opends/src/messages/messages/core_ca_ES.properties                                                               |    8 
 opendj-sdk/opends/src/server/org/opends/server/schema/IA5StringSyntax.java                                                  |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/PostalAddressSyntax.java                                              |   11 
 opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/CertificateSyntaxTest.java                    |  197 +++++++
 opendj-sdk/opends/src/server/org/opends/server/schema/GuideSyntax.java                                                      |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java                                               |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/TelexNumberSyntax.java                                                |   11 
 opendj-sdk/opends/src/messages/messages/core_zh_CN.properties                                                               |    8 
 opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java                                                |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java                                         |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java                                         |   11 
 opendj-sdk/opends/src/server/org/opends/server/api/AttributeSyntax.java                                                     |   18 
 opendj-sdk/opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java                                             |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/BitStringSyntax.java                                                  |   11 
 opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteSequenceReader.java                                   |   21 
 opendj-sdk/opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java                                        |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java                                              |   14 
 opendj-sdk/opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java                                              |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java                                               |   14 
 opendj-sdk/opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java                                            |   11 
 opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BinaryAttributeSyntaxTest.java                |   87 +++
 opendj-sdk/opends/src/admin/messages/CertificateAttributeSyntaxCfgDefn.properties                                           |    7 
 opendj-sdk/opends/src/messages/messages/core_pl.properties                                                                  |    8 
 opendj-sdk/opends/src/messages/messages/schema.properties                                                                   |    6 
 opendj-sdk/opends/src/server/org/opends/server/schema/AciSyntax.java                                                        |   12 
 opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java                                            |   12 
 opendj-sdk/opends/src/server/org/opends/server/schema/OctetStringSyntax.java                                                |   11 
 opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/ModifyOperationTestCase.java                    |   22 
 opendj-sdk/opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java                                               |   11 
 opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LDAPBinaryOptionTestCase.java         |   13 
 opendj-sdk/opends/src/server/org/opends/server/schema/BooleanSyntax.java                                                    |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java                                            |   11 
 opendj-sdk/opends/src/messages/messages/core_es.properties                                                                  |    8 
 opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java                |   53 +
 opendj-sdk/opends/src/messages/messages/core_zh_TW.properties                                                               |    8 
 opendj-sdk/opends/src/messages/messages/core_ko.properties                                                                  |    8 
 opendj-sdk/opends/src/messages/messages/schema_ja.properties                                                                |    6 
 opendj-sdk/opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java                                         |   11 
 opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1InputStreamReader.java                                    |   21 
 opendj-sdk/opends/src/server/org/opends/server/schema/UUIDSyntax.java                                                       |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/CountryStringSyntax.java                                              |   11 
 opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteChannelReader.java                                    |   16 
 opendj-sdk/opends/src/server/org/opends/server/schema/CertificatePairSyntax.java                                            |   11 
 opendj-sdk/opends/src/server/org/opends/server/types/AttributeType.java                                                     |   28 
 opendj-sdk/opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java                                        |   11 
 opendj-sdk/opends/src/messages/messages/core_ja.properties                                                                  |    8 
 opendj-sdk/opends/src/server/org/opends/server/schema/IntegerSyntax.java                                                    |   10 
 opendj-sdk/opends/src/messages/messages/schema_ko.properties                                                                |    6 
 opendj-sdk/opends/src/server/org/opends/server/schema/FaxSyntax.java                                                        |   11 
 opendj-sdk/opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java                                            |   11 
 opendj-sdk/opends/resource/schema/02-config.ldif                                                                            |    6 
 82 files changed, 1,552 insertions(+), 53 deletions(-)

diff --git a/opendj-sdk/opends/resource/config/config.ldif b/opendj-sdk/opends/resource/config/config.ldif
index 07bcf23..cc9e977 100644
--- a/opendj-sdk/opends/resource/config/config.ldif
+++ b/opendj-sdk/opends/resource/config/config.ldif
@@ -2044,9 +2044,11 @@
 dn: cn=Certificate,cn=Syntaxes,cn=config
 objectClass: top
 objectClass: ds-cfg-attribute-syntax
+objectClass: ds-cfg-certificate-attribute-syntax
 cn: Certificate
 ds-cfg-java-class: org.opends.server.schema.CertificateSyntax
 ds-cfg-enabled: true
+ds-cfg-strict-format: true
 
 dn: cn=Certificate List,cn=Syntaxes,cn=config
 objectClass: top
diff --git a/opendj-sdk/opends/resource/schema/02-config.ldif b/opendj-sdk/opends/resource/schema/02-config.ldif
index a4f4312..5d15c52 100644
--- a/opendj-sdk/opends/resource/schema/02-config.ldif
+++ b/opendj-sdk/opends/resource/schema/02-config.ldif
@@ -5135,3 +5135,9 @@
   SUP ds-cfg-virtual-attribute
   STRUCTURAL
   X-ORIGIN 'OpenDJ Directory Server' )
+objectClasses: ( 1.3.6.1.4.1.36733.2.1.2.10
+  NAME 'ds-cfg-certificate-attribute-syntax'
+  SUP ds-cfg-attribute-syntax
+  STRUCTURAL
+  MAY ds-cfg-strict-format
+  X-ORIGIN 'OpenDJ Directory Server' )
diff --git a/opendj-sdk/opends/src/admin/defn/org/opends/server/admin/std/CertificateAttributeSyntaxConfiguration.xml b/opendj-sdk/opends/src/admin/defn/org/opends/server/admin/std/CertificateAttributeSyntaxConfiguration.xml
new file mode 100644
index 0000000..f98b7ba
--- /dev/null
+++ b/opendj-sdk/opends/src/admin/defn/org/opends/server/admin/std/CertificateAttributeSyntaxConfiguration.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ! CDDL HEADER START
+  !
+  ! The contents of this file are subject to the terms of the
+  ! Common Development and Distribution License, Version 1.0 only
+  ! (the "License").  You may not use this file except in compliance
+  ! with the License.
+  !
+  ! You can obtain a copy of the license at
+  ! trunk/opends/resource/legal-notices/CDDLv1_0.txt
+  ! or http://forgerock.org/license/CDDLv1.0.html.
+  ! See the License for the specific language governing permissions
+  ! and limitations under the License.
+  !
+  ! When distributing Covered Code, include this CDDL HEADER in each
+  ! file and include the License file at
+  ! trunk/opends/resource/legal-notices/CDDLv1_0.txt.  If applicable,
+  ! add the following below this CDDL HEADER, with the fields enclosed
+  ! by brackets "[]" replaced with your own identifying information:
+  !      Portions Copyright [yyyy] [name of copyright owner]
+  !
+  ! CDDL HEADER END
+  !
+  !
+  !      Copyright 2012 ForgeRock AS.
+  ! -->
+<adm:managed-object name="certificate-attribute-syntax"
+  plural-name="certificate-attribute-syntaxes"
+  extends="attribute-syntax" package="org.opends.server.admin.std"
+  xmlns:adm="http://www.opends.org/admin"
+  xmlns:ldap="http://www.opends.org/admin-ldap">
+  <adm:synopsis>
+    <adm:user-friendly-plural-name />
+    define an attribute syntax for storing X.509 Certificates.
+  </adm:synopsis>
+  <adm:profile name="ldap">
+    <ldap:object-class>
+      <ldap:name>ds-cfg-certificate-attribute-syntax</ldap:name>
+      <ldap:superior>ds-cfg-attribute-syntax</ldap:superior>
+    </ldap:object-class>
+  </adm:profile>
+  <adm:property-override name="java-class" advanced="true">
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>
+          org.opends.server.schema.CertificateSyntax
+        </adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+  </adm:property-override>
+  <adm:property name="strict-format" advanced="true">
+    <adm:synopsis>
+      Indicates whether or not X.509 Certificate values are required to
+      strictly comply with the standard definition for this syntax.
+    </adm:synopsis>
+    <adm:description>
+      When set to false, certificates will not be validation and, as a result
+      any sequence of bytes will be acceptable.
+    </adm:description>
+    <adm:default-behavior>
+      <adm:defined>
+        <adm:value>true</adm:value>
+      </adm:defined>
+    </adm:default-behavior>
+    <adm:syntax>
+      <adm:boolean />
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-strict-format</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+</adm:managed-object>
diff --git a/opendj-sdk/opends/src/admin/messages/CertificateAttributeSyntaxCfgDefn.properties b/opendj-sdk/opends/src/admin/messages/CertificateAttributeSyntaxCfgDefn.properties
new file mode 100644
index 0000000..827ed0c
--- /dev/null
+++ b/opendj-sdk/opends/src/admin/messages/CertificateAttributeSyntaxCfgDefn.properties
@@ -0,0 +1,7 @@
+user-friendly-name=Certificate Attribute Syntax
+user-friendly-plural-name=Certificate Attribute Syntaxes
+synopsis=Certificate Attribute Syntaxes define an attribute syntax for storing X.509 Certificates.
+property.enabled.synopsis=Indicates whether the Certificate Attribute Syntax is enabled.
+property.java-class.synopsis=Specifies the fully-qualified name of the Java class that provides the Certificate Attribute Syntax implementation.
+property.strict-format.synopsis=Indicates whether or not X.509 Certificate values are required to strictly comply with the standard definition for this syntax.
+property.strict-format.description=When set to false, certificates will not be validation and, as a result any sequence of bytes will be acceptable.
diff --git a/opendj-sdk/opends/src/messages/messages/core.properties b/opendj-sdk/opends/src/messages/messages/core.properties
index d292f67..60ad090 100644
--- a/opendj-sdk/opends/src/messages/messages/core.properties
+++ b/opendj-sdk/opends/src/messages/messages/core.properties
@@ -1853,3 +1853,11 @@
  operation has been rejected because request handler thread was interrupted \
  while attempting to put the operation on the work queue
 INFO_DISCONNECT_DUE_TO_INVALID_CREDENTIALS_741=Invalid Credentials
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Entry "%s" contains a value for \
+ attribute %s that is invalid according to the syntax for that attribute:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=When attempting to modify entry \
+ %s, one value for attribute %s was found to be invalid according to the \
+ associated syntax:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=When attempting to modify \
+ entry %s to replace the set of values for attribute %s, one value was found to \
+ be invalid according to the associated syntax:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/core_ca_ES.properties b/opendj-sdk/opends/src/messages/messages/core_ca_ES.properties
index 0dc5d4f..ee919c7 100644
--- a/opendj-sdk/opends/src/messages/messages/core_ca_ES.properties
+++ b/opendj-sdk/opends/src/messages/messages/core_ca_ES.properties
@@ -31,3 +31,11 @@
 INFO_ERGONOMIC_SIZING_OF_WORKER_THREAD_POOL_720=No s'ha especificat cap mida de conjunt de fils d'execuci\u00f3 de la cua de treball: re-dimensionat autom\u00e0ticament a utilitzar %d fils d'execuci\u00f3
 SEVERE_ERR_CRYPTOMGR_FAILED_INSTANCE_CERTIFICATE_NULL_721=L'entrada CryptoManager "%s" (inst\u00e0ncia-parell-claus certificat-clau-p\u00fablica) no cont\u00e9 un certificat de clau-p\u00fablica
 INFO_DSCORE_DESCRIPTION_TIMEOUT_722=Temps m\u00e0xim (ens segons) per esperar abans del retorn de la comanda (el servidor continua el proc\u00e9s d'arranc, independentment). Un valor de '0' indica una expiraci\u00f3 de temps infinita, la qual significa que la comanda \u00fanicament retorna quant el servidor ha completat l'arranc. El valor predeterminat es de 60 segons. Aquesta opci\u00f3 no pot ser utilitzada amb l'opci\u00f3 -N, --nodetach
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Entry "%s" contains a value for \
+ attribute %s that is invalid according to the syntax for that attribute:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=When attempting to modify entry \
+ %s, one value for attribute %s was found to be invalid according to the \
+ associated syntax:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=When attempting to modify \
+ entry %s to replace the set of values for attribute %s, one value was found to \
+ be invalid according to the associated syntax:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/core_de.properties b/opendj-sdk/opends/src/messages/messages/core_de.properties
index 5847d9e..abdcbc9 100644
--- a/opendj-sdk/opends/src/messages/messages/core_de.properties
+++ b/opendj-sdk/opends/src/messages/messages/core_de.properties
@@ -742,3 +742,6 @@
 MILD_ERR_RDN_MISSING_ATTRIBUTE_VALUE_727=Die angegebene Zeichenfolge "%s" konnte nicht als ein relativer Distinguished Name entschl\u00fcsselt werden, da die angegebene Zeichenfolge keinen Wert f\u00fcr den Attributtyp "%s" enth\u00e4lt
 MILD_ERR_CRYPTOMGR_INVALID_SYMMETRIC_KEY_LENGTH_728=CryptoManager konnte nicht gestartet werden, weil die angegebene Schl\u00fcssell\u00e4nge "%d" f\u00fcr die Verschl\u00fcsselung \u00fcber der zul\u00e4ssigen Verschl\u00fcsselungsst\u00e4rke "%d" in Jurisdiction Policy-Dateien liegt
 MILD_ERR_DISK_SPACE_MONITOR_UPDATE_FAILED_729=Fehler beim Aktualisieren des freien Speicherplatzes f\u00fcr Verzeichnis %s: %s
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Eintrag "%s" enth\u00e4lt einen Wert f\u00fcr Attribut %s, das entsprechend der Syntax f\u00fcr dieses Attribut ung\u00fcltig ist:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=Beim Versuch, Eintrag %s zu \u00e4ndern und einen oder mehrere Werte f\u00fcr Attribut %s hinzuzuf\u00fcgen, wurde festgestellt, dass ein Wert nach der zugeordneten Syntax ung\u00fcltig ist:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=Beim Versuch, Eintrag %s zu \u00e4ndern und den Satz mit Werten f\u00fcr Attribut %s zu ersetzen, wurde festgestellt, dass ein Wert nach der zugeordneten Syntax ung\u00fcltig ist:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/core_es.properties b/opendj-sdk/opends/src/messages/messages/core_es.properties
index c49c4dc..7b5300f 100644
--- a/opendj-sdk/opends/src/messages/messages/core_es.properties
+++ b/opendj-sdk/opends/src/messages/messages/core_es.properties
@@ -742,3 +742,11 @@
 MILD_ERR_RDN_MISSING_ATTRIBUTE_VALUE_727=No se puede decodificar la cadena proporcionada "%s" como un nombre distinguido relativo porque no contiene ning\u00fan valor para el tipo de atributo %s
 MILD_ERR_CRYPTOMGR_INVALID_SYMMETRIC_KEY_LENGTH_728=CryptoManager no pudo inicializarse porque la longitud de la clave de cifrado de "%d" especificada supera la intensidad de criptograf\u00eda permitida de "%d" en los archivos de directiva de jurisdicci\u00f3n
 MILD_ERR_DISK_SPACE_MONITOR_UPDATE_FAILED_729=No pudo actualizarse el espacio libre en el disco para el directorio %s: %s
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Entry "%s" contains a value for \
+ attribute %s that is invalid according to the syntax for that attribute:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=When attempting to modify entry \
+ %s, one value for attribute %s was found to be invalid according to the \
+ associated syntax:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=When attempting to modify \
+ entry %s to replace the set of values for attribute %s, one value was found to \
+ be invalid according to the associated syntax:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/core_fr.properties b/opendj-sdk/opends/src/messages/messages/core_fr.properties
index 3eb7395..a1319df 100644
--- a/opendj-sdk/opends/src/messages/messages/core_fr.properties
+++ b/opendj-sdk/opends/src/messages/messages/core_fr.properties
@@ -742,3 +742,11 @@
 MILD_ERR_RDN_MISSING_ATTRIBUTE_VALUE_727=Impossible de d\u00e9coder le cha\u00eene fournie "%s" en tant que nom distinctif relatif, car elle ne contient pas de valeur pour le type d'attribut %s
 MILD_ERR_CRYPTOMGR_INVALID_SYMMETRIC_KEY_LENGTH_728=CryptoManager n'a pas r\u00e9ussi \u00e0 s'initialiser car la longueur de la cl\u00e9 de chiffrement sp\u00e9cifi\u00e9e "%d" est bien au-del\u00e0 de la force de chiffrement "%d" dans les fichiers de strat\u00e9gie de juridiction
 MILD_ERR_DISK_SPACE_MONITOR_UPDATE_FAILED_729=\u00c9chec de la mise \u00e0 jour de l'espace disque libre dans le r\u00e9pertoire\u00a0%s: %s
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Entry "%s" contains a value for \
+ attribute %s that is invalid according to the syntax for that attribute:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=When attempting to modify entry \
+ %s, one value for attribute %s was found to be invalid according to the \
+ associated syntax:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=When attempting to modify \
+ entry %s to replace the set of values for attribute %s, one value was found to \
+ be invalid according to the associated syntax:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/core_ja.properties b/opendj-sdk/opends/src/messages/messages/core_ja.properties
index 078e441..3d34912 100644
--- a/opendj-sdk/opends/src/messages/messages/core_ja.properties
+++ b/opendj-sdk/opends/src/messages/messages/core_ja.properties
@@ -743,3 +743,11 @@
 MILD_ERR_RDN_MISSING_ATTRIBUTE_VALUE_727=\u6307\u5b9a\u3055\u308c\u305f\u6587\u5b57\u5217 "%s" \u3092\u76f8\u5bfe\u8b58\u5225\u540d\u3068\u3057\u3066\u5fa9\u53f7\u5316\u3067\u304d\u307e\u305b\u3093\u3002\u5c5e\u6027\u578b %s \u306e\u5024\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093
 MILD_ERR_CRYPTOMGR_INVALID_SYMMETRIC_KEY_LENGTH_728=\u6307\u5b9a\u3055\u308c\u305f\u6697\u53f7\u5316\u30ad\u30fc\u306e\u9577\u3055 "%d" \u304c\u7ba1\u8f44\u30dd\u30ea\u30b7\u30fc\u30d5\u30a1\u30a4\u30eb\u5185\u3067\u8a31\u53ef\u3055\u308c\u308b\u6697\u53f7\u5316\u306e\u9577\u3055 "%d" \u3092\u8d85\u3048\u3066\u3044\u308b\u305f\u3081\u3001CryptoManager \u306f\u521d\u671f\u5316\u306b\u5931\u6557\u3057\u307e\u3057\u305f
 MILD_ERR_DISK_SPACE_MONITOR_UPDATE_FAILED_729=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea %s \u306e\u7a7a\u304d\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u3092\u66f4\u65b0\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f: %s
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Entry "%s" contains a value for \
+ attribute %s that is invalid according to the syntax for that attribute:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=When attempting to modify entry \
+ %s, one value for attribute %s was found to be invalid according to the \
+ associated syntax:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=When attempting to modify \
+ entry %s to replace the set of values for attribute %s, one value was found to \
+ be invalid according to the associated syntax:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/core_ko.properties b/opendj-sdk/opends/src/messages/messages/core_ko.properties
index eb5822e..51c968f 100644
--- a/opendj-sdk/opends/src/messages/messages/core_ko.properties
+++ b/opendj-sdk/opends/src/messages/messages/core_ko.properties
@@ -736,3 +736,11 @@
 SEVERE_ERR_CRYPTOMGR_FAILED_INSTANCE_CERTIFICATE_NULL_721=The CryptoManager entry "%s" (the instance-key-pair public-key-certificate) does not contain a public-key certificate
 INFO_DSCORE_DESCRIPTION_TIMEOUT_722=Maximum time (in seconds) to wait before the command returns (the server continues the startup process, regardless). A value of '0' indicates an infinite timeout, which means that the command returns only when the server startup is completed. The default value is 60 seconds. This option cannot be used with the -N, --nodetach option
 FATAL_ERR_DSCORE_ERROR_NODETACH_TIMEOUT_723=In no-detach mode, the 'timeout' option cannot be used
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Entry "%s" contains a value for \
+ attribute %s that is invalid according to the syntax for that attribute:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=When attempting to modify entry \
+ %s, one value for attribute %s was found to be invalid according to the \
+ associated syntax:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=When attempting to modify \
+ entry %s to replace the set of values for attribute %s, one value was found to \
+ be invalid according to the associated syntax:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/core_pl.properties b/opendj-sdk/opends/src/messages/messages/core_pl.properties
index e996f69..3a97d49 100644
--- a/opendj-sdk/opends/src/messages/messages/core_pl.properties
+++ b/opendj-sdk/opends/src/messages/messages/core_pl.properties
@@ -19,3 +19,11 @@
 INFO_RESULT_OTHER_105=Inny
 INFO_RESULT_SIZE_LIMIT_EXCEEDED_67=Przekroczony limit rozmiary
 SEVERE_ERR_ADD_ENTRY_ALREADY_EXISTS_400=Wpis %s nie mo\u017ce zosta\u0107 dodatny, gdy\u017c wpis o takiej nazwie ju\u017c istnieje
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Entry "%s" contains a value for \
+ attribute %s that is invalid according to the syntax for that attribute:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=When attempting to modify entry \
+ %s, one value for attribute %s was found to be invalid according to the \
+ associated syntax:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=When attempting to modify \
+ entry %s to replace the set of values for attribute %s, one value was found to \
+ be invalid according to the associated syntax:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/core_zh_CN.properties b/opendj-sdk/opends/src/messages/messages/core_zh_CN.properties
index 1656a3b..b7f6c51 100644
--- a/opendj-sdk/opends/src/messages/messages/core_zh_CN.properties
+++ b/opendj-sdk/opends/src/messages/messages/core_zh_CN.properties
@@ -742,3 +742,11 @@
 MILD_ERR_RDN_MISSING_ATTRIBUTE_VALUE_727=\u65e0\u6cd5\u5c06\u63d0\u4f9b\u7684\u5b57\u7b26\u4e32 "%s" \u89e3\u7801\u4e3a\u76f8\u5bf9\u6807\u8bc6\u540d\uff0c\u56e0\u4e3a\u5b83\u672a\u5305\u542b\u5c5e\u6027\u7c7b\u578b %s \u7684\u503c
 MILD_ERR_CRYPTOMGR_INVALID_SYMMETRIC_KEY_LENGTH_728=CryptoManager \u65e0\u6cd5\u521d\u59cb\u5316\uff0c\u56e0\u4e3a\u6307\u5b9a\u7684\u52a0\u5bc6\u5668\u5bc6\u94a5\u957f\u5ea6 "%d" \u8d85\u8fc7\u7ba1\u8f96\u6743\u7b56\u7565\u6587\u4ef6\u4e2d\u5141\u8bb8\u7684\u52a0\u5bc6\u5f3a\u5ea6 "%d"
 MILD_ERR_DISK_SPACE_MONITOR_UPDATE_FAILED_729=\u65e0\u6cd5\u66f4\u65b0\u76ee\u5f55 %s \u7684\u53ef\u7528\u78c1\u76d8\u7a7a\u95f4: %s
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Entry "%s" contains a value for \
+ attribute %s that is invalid according to the syntax for that attribute:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=When attempting to modify entry \
+ %s, one value for attribute %s was found to be invalid according to the \
+ associated syntax:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=When attempting to modify \
+ entry %s to replace the set of values for attribute %s, one value was found to \
+ be invalid according to the associated syntax:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/core_zh_TW.properties b/opendj-sdk/opends/src/messages/messages/core_zh_TW.properties
index ccf0388..7bf4af0 100644
--- a/opendj-sdk/opends/src/messages/messages/core_zh_TW.properties
+++ b/opendj-sdk/opends/src/messages/messages/core_zh_TW.properties
@@ -737,3 +737,11 @@
 SEVERE_ERR_CRYPTOMGR_FAILED_INSTANCE_CERTIFICATE_NULL_721=The CryptoManager entry "%s" (the instance-key-pair public-key-certificate) does not contain a public-key certificate
 INFO_DSCORE_DESCRIPTION_TIMEOUT_722=Maximum time (in seconds) to wait before the command returns (the server continues the startup process, regardless). A value of '0' indicates an infinite timeout, which means that the command returns only when the server startup is completed. The default value is 60 seconds. This option cannot be used with the -N, --nodetach option
 FATAL_ERR_DSCORE_ERROR_NODETACH_TIMEOUT_723=In no-detach mode, the 'timeout' option cannot be used
+SEVERE_WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE_742=Entry "%s" contains a value for \
+ attribute %s that is invalid according to the syntax for that attribute:  %s
+MILD_ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE_743=When attempting to modify entry \
+ %s, one value for attribute %s was found to be invalid according to the \
+ associated syntax:  %s
+MILD_ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE_744=When attempting to modify \
+ entry %s to replace the set of values for attribute %s, one value was found to \
+ be invalid according to the associated syntax:  %s
diff --git a/opendj-sdk/opends/src/messages/messages/schema.properties b/opendj-sdk/opends/src/messages/messages/schema.properties
index 8eb9d3e..3cd2c95 100644
--- a/opendj-sdk/opends/src/messages/messages/schema.properties
+++ b/opendj-sdk/opends/src/messages/messages/schema.properties
@@ -1067,3 +1067,9 @@
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_QUOTE_AT_POS_329=The provided value \
  "%s" could not be parsed as an ldap syntax description because a single \
  quote was expected at position %d but the character %s was found instead
+SEVERE_ERR_SYNTAX_CERTIFICATE_NOTVALID_330=The provided value is not a valid \
+ X.509 Certificate
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_VERSION_331=The provided value is not \
+ a valid X.509 Certificate because it contains an invalid version number (%d)
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_DER_332=The provided value is not a valid \
+ X.509 Certificate because it contains invalid DER encodings
diff --git a/opendj-sdk/opends/src/messages/messages/schema_de.properties b/opendj-sdk/opends/src/messages/messages/schema_de.properties
index fa169e8..b4aa260 100644
--- a/opendj-sdk/opends/src/messages/messages/schema_de.properties
+++ b/opendj-sdk/opends/src/messages/messages/schema_de.properties
@@ -376,3 +376,6 @@
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXTENSION_INVALID_CHARACTER_327=The provided value "%s" could not be parsed as an ldap syntax extension because an invalid character was found at position %d
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_CLOSE_PARENTHESIS_328=The provided value "%s" could not be parsed as an ldap syntax description because a close parenthesis was expected at position %d but instead a '%s' character was found
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_QUOTE_AT_POS_329=The provided value "%s" could not be parsed as an ldap syntax description because a single quote was expected at position %d but the character %s was found instead
+SEVERE_ERR_SYNTAX_CERTIFICATE_NOTVALID_330=Der angegebene Wert ist kein g\u00fcltiges X.509 Zertifikat
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_VERSION_331=Der angegebene Wert ist kein g\u00fcltiges X.509 Zertifikat, da es eine ung\u00fcltige Versionsnummer beinhaltet (%d)
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_DER_332=Der angegebene Wert ist kein g\u00fcltiges X.509 Zertifikat, da es ung\u00fcltige DER Kodierungen beinhaltet
diff --git a/opendj-sdk/opends/src/messages/messages/schema_es.properties b/opendj-sdk/opends/src/messages/messages/schema_es.properties
index 82fd7a2..faadfe0 100644
--- a/opendj-sdk/opends/src/messages/messages/schema_es.properties
+++ b/opendj-sdk/opends/src/messages/messages/schema_es.properties
@@ -376,3 +376,9 @@
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXTENSION_INVALID_CHARACTER_327=No se pudo analizar el valor proporcionado "%s" como sintaxis LDAP porque se encontr\u00f3 un car\u00e1cter no v\u00e1lido en la posici\u00f3n %d
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_CLOSE_PARENTHESIS_328=No se pudo analizar el valor proporcionado "%s" como sintaxis LDAP porque conten\u00eda un par\u00e9ntesis de cierre inesperado en la posici\u00f3n %d
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_QUOTE_AT_POS_329=No se pudo analizar el valor proporcionado "%s" como sintaxis LDAP porque, en lugar de la comilla sencilla esperada en la posici\u00f3n %d, se encontr\u00f3 el car\u00e1cter %s
+SEVERE_ERR_SYNTAX_CERTIFICATE_NOTVALID_330=The provided value is not a valid \
+ X.509 Certificate
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_VERSION_331=The provided value is not \
+ a valid X.509 Certificate because it contains an invalid version number (%d)
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_DER_332=The provided value is not a valid \
+ X.509 Certificate because it contains invalid DER encodings
diff --git a/opendj-sdk/opends/src/messages/messages/schema_fr.properties b/opendj-sdk/opends/src/messages/messages/schema_fr.properties
index cc41135..2ac7d26 100644
--- a/opendj-sdk/opends/src/messages/messages/schema_fr.properties
+++ b/opendj-sdk/opends/src/messages/messages/schema_fr.properties
@@ -376,3 +376,9 @@
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXTENSION_INVALID_CHARACTER_327=Impossible d'analyser la valeur indiqu\u00e9e "%s" en tant qu'extension de syntaxe ldap car un caract\u00e8re invalide se trouve \u00e0 la position %d
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_CLOSE_PARENTHESIS_328=Impossible d'analyser la valeur indiqu\u00e9e "%s" en tant que syntaxe ldap car elle contient une parenth\u00e8se de fermeture inattendue \u00e0 la position %d
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_QUOTE_AT_POS_329=Impossible d'analyser la valeur fournie ("%s") en tant que syntaxe ldap car une apostrophe devrait se trouver \u00e0 la position %d au lieu du caract\u00e8re %s
+SEVERE_ERR_SYNTAX_CERTIFICATE_NOTVALID_330=The provided value is not a valid \
+ X.509 Certificate
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_VERSION_331=The provided value is not \
+ a valid X.509 Certificate because it contains an invalid version number (%d)
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_DER_332=The provided value is not a valid \
+ X.509 Certificate because it contains invalid DER encodings
diff --git a/opendj-sdk/opends/src/messages/messages/schema_ja.properties b/opendj-sdk/opends/src/messages/messages/schema_ja.properties
index b53bdad..2a9c33c 100644
--- a/opendj-sdk/opends/src/messages/messages/schema_ja.properties
+++ b/opendj-sdk/opends/src/messages/messages/schema_ja.properties
@@ -376,3 +376,9 @@
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXTENSION_INVALID_CHARACTER_327=The provided value "%s" could not be parsed as an ldap syntax extension because an invalid character was found at position %d
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_CLOSE_PARENTHESIS_328=The provided value "%s" could not be parsed as an ldap syntax description because a close parenthesis was expected at position %d but instead a '%s' character was found
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_QUOTE_AT_POS_329=The provided value "%s" could not be parsed as an ldap syntax description because a single quote was expected at position %d but the character %s was found instead
+SEVERE_ERR_SYNTAX_CERTIFICATE_NOTVALID_330=The provided value is not a valid \
+ X.509 Certificate
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_VERSION_331=The provided value is not \
+ a valid X.509 Certificate because it contains an invalid version number (%d)
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_DER_332=The provided value is not a valid \
+ X.509 Certificate because it contains invalid DER encodings
diff --git a/opendj-sdk/opends/src/messages/messages/schema_ko.properties b/opendj-sdk/opends/src/messages/messages/schema_ko.properties
index f56d4e2..640f6bd 100644
--- a/opendj-sdk/opends/src/messages/messages/schema_ko.properties
+++ b/opendj-sdk/opends/src/messages/messages/schema_ko.properties
@@ -377,3 +377,9 @@
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXTENSION_INVALID_CHARACTER_327=The provided value "%s" could not be parsed as an ldap syntax extension because an invalid character was found at position %d
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_CLOSE_PARENTHESIS_328=The provided value "%s" could not be parsed as an ldap syntax description because a close parenthesis was expected at position %d but instead a '%s' character was found
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_QUOTE_AT_POS_329=The provided value "%s" could not be parsed as an ldap syntax description because a single quote was expected at position %d but the character %s was found instead
+SEVERE_ERR_SYNTAX_CERTIFICATE_NOTVALID_330=The provided value is not a valid \
+ X.509 Certificate
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_VERSION_331=The provided value is not \
+ a valid X.509 Certificate because it contains an invalid version number (%d)
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_DER_332=The provided value is not a valid \
+ X.509 Certificate because it contains invalid DER encodings
diff --git a/opendj-sdk/opends/src/messages/messages/schema_zh_CN.properties b/opendj-sdk/opends/src/messages/messages/schema_zh_CN.properties
index ef54af3..4598ef9 100644
--- a/opendj-sdk/opends/src/messages/messages/schema_zh_CN.properties
+++ b/opendj-sdk/opends/src/messages/messages/schema_zh_CN.properties
@@ -376,3 +376,9 @@
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXTENSION_INVALID_CHARACTER_327=The provided value "%s" could not be parsed as an ldap syntax extension because an invalid character was found at position %d
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_CLOSE_PARENTHESIS_328=The provided value "%s" could not be parsed as an ldap syntax description because a close parenthesis was expected at position %d but instead a '%s' character was found
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_QUOTE_AT_POS_329=The provided value "%s" could not be parsed as an ldap syntax description because a single quote was expected at position %d but the character %s was found instead
+SEVERE_ERR_SYNTAX_CERTIFICATE_NOTVALID_330=The provided value is not a valid \
+ X.509 Certificate
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_VERSION_331=The provided value is not \
+ a valid X.509 Certificate because it contains an invalid version number (%d)
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_DER_332=The provided value is not a valid \
+ X.509 Certificate because it contains invalid DER encodings
diff --git a/opendj-sdk/opends/src/messages/messages/schema_zh_TW.properties b/opendj-sdk/opends/src/messages/messages/schema_zh_TW.properties
index c0cd9ef..c4b3de1 100644
--- a/opendj-sdk/opends/src/messages/messages/schema_zh_TW.properties
+++ b/opendj-sdk/opends/src/messages/messages/schema_zh_TW.properties
@@ -377,3 +377,9 @@
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXTENSION_INVALID_CHARACTER_327=The provided value "%s" could not be parsed as an ldap syntax extension because an invalid character was found at position %d
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_CLOSE_PARENTHESIS_328=The provided value "%s" could not be parsed as an ldap syntax description because a close parenthesis was expected at position %d but instead a '%s' character was found
 MILD_ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_QUOTE_AT_POS_329=The provided value "%s" could not be parsed as an ldap syntax description because a single quote was expected at position %d but the character %s was found instead
+SEVERE_ERR_SYNTAX_CERTIFICATE_NOTVALID_330=The provided value is not a valid \
+ X.509 Certificate
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_VERSION_331=The provided value is not \
+ a valid X.509 Certificate because it contains an invalid version number (%d)
+SEVERE_ERR_SYNTAX_CERTIFICATE_INVALID_DER_332=The provided value is not a valid \
+ X.509 Certificate because it contains invalid DER encodings
diff --git a/opendj-sdk/opends/src/server/org/opends/server/api/AttributeSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/api/AttributeSyntax.java
index 3438ad4..f299fe0 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/api/AttributeSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/api/AttributeSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Portions copyright 2012 ForgeRock AS.
  */
 package org.opends.server.api;
 import org.opends.messages.Message;
@@ -215,15 +216,24 @@
 
 
   /**
-   * Indicates whether this attribute syntax is a binary one.
-   * @return  {@code true} if it is a binary syntax rule
-   *          , or {@code false} if not.
+   * Indicates whether this attribute syntax requires BER encoding.
+   *
+   * @return {@code true} if this syntax required BER encoding.
    */
   public abstract boolean isBinary();
 
 
 
   /**
+   * Indicates whether this attribute syntax is human readable.
+   *
+   * @return {@code true} if this syntax is human readable.
+   */
+  public abstract boolean isHumanReadable();
+
+
+
+  /**
    * Retrieves the hash code for this attribute syntax.  It will be
    * calculated as the sum of the characters in the OID.
    *
@@ -273,7 +283,7 @@
       return false;
     }
 
-    return getOID().equals(((AttributeSyntax) o).getOID());
+    return getOID().equals(((AttributeSyntax<?>) o).getOID());
   }
 
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteChannelReader.java b/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteChannelReader.java
index baa94ad..e981fb5 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteChannelReader.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteChannelReader.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions copyright 2011 ForgeRock AS.
+ *      Portions copyright 2011-2012 ForgeRock AS.
  */
 package org.opends.server.protocols.asn1;
 
@@ -405,6 +405,13 @@
   /**
    * {@inheritDoc}
    */
+  public void readEndExplicitTag() throws ASN1Exception {
+    reader.readEndExplicitTag();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
   public void readEndSequence() throws ASN1Exception {
     reader.readEndSequence();
   }
@@ -468,6 +475,13 @@
   /**
    * {@inheritDoc}
    */
+  public void readStartExplicitTag() throws ASN1Exception {
+    reader.readStartExplicitTag();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
   public void readStartSequence() throws ASN1Exception {
     reader.readStartSequence();
   }
diff --git a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteSequenceReader.java b/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteSequenceReader.java
index 921a4fc..7ef1e4c 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteSequenceReader.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1ByteSequenceReader.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 Forgerock AS
  */
 package org.opends.server.protocols.asn1;
 
@@ -460,6 +461,16 @@
   /**
    * {@inheritDoc}
    */
+  public void readStartExplicitTag() throws ASN1Exception
+  {
+    // From an implementation point of view, an explicit tag is equivalent to a
+    // sequence, as it is a constructed type.
+    readStartSequence();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
   public void readStartSet() throws ASN1Exception
   {
     // From an implementation point of view, a set is equivalent to a
@@ -493,6 +504,16 @@
   /**
    * {@inheritDoc}
    */
+  public void readEndExplicitTag() throws ASN1Exception
+  {
+    // From an implementation point of view, an explicit tag is equivalent to a
+    // sequence, as it is also a constructed type.
+    readEndSequence();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
   public void readEndSet() throws ASN1Exception
   {
     // From an implementation point of view, a set is equivalent to a
diff --git a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java b/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java
index a27197a..1034854 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 Forgerock AS
  */
 package org.opends.server.protocols.asn1;
 
@@ -54,6 +55,13 @@
 
 
   /**
+   * The BER type that is assigned to the universal bit string type.
+   */
+  public static final byte UNIVERSAL_BIT_STRING_TYPE = 0x03;
+
+
+
+  /**
    * The BER type that is assigned to the universal octet string type.
    */
   public static final byte UNIVERSAL_OCTET_STRING_TYPE = 0x04;
diff --git a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1InputStreamReader.java b/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1InputStreamReader.java
index f3a7e86..d6e0dbe 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1InputStreamReader.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1InputStreamReader.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.protocols.asn1;
 
@@ -747,6 +748,16 @@
   /**
    * {@inheritDoc}
    */
+  public void readStartExplicitTag() throws ASN1Exception
+  {
+    // From an implementation point of view, an explicit tag is equivalent to a
+    // sequence, as it is also a constructed type.
+    readStartSequence();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
   public void readStartSet() throws ASN1Exception
   {
     // From an implementation point of view, a set is equivalent to a
@@ -796,6 +807,16 @@
   /**
    * {@inheritDoc}
    */
+  public void readEndExplicitTag() throws ASN1Exception
+  {
+    // From an implementation point of view, an explicit tag is equivalent to a
+    // sequence, as it is also a constructed type.
+    readEndSequence();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
   public void readEndSet() throws ASN1Exception
   {
     // From an implementation point of view, a set is equivalent to a
diff --git a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java b/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
index ac9ae3f..956b39d 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
+++ b/opendj-sdk/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.
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/AciSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/AciSyntax.java
index 04b8b89..38b7d68 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/AciSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/AciSyntax.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
- *      Portions Copyright 2011 ForgeRock AS
+ *      Portions Copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -250,5 +250,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java
index 35c7446..2f467a9 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2011 ForgeRock AS
+ *      Portions Copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -448,7 +448,7 @@
     List<String> typeNames = new LinkedList<String>();
     String description = null;
     AttributeType superiorType = null;
-    AttributeSyntax syntax = DirectoryServer.getDefaultAttributeSyntax();
+    AttributeSyntax<?> syntax = DirectoryServer.getDefaultAttributeSyntax();
     ApproximateMatchingRule approximateMatchingRule = null;
     EqualityMatchingRule equalityMatchingRule = null;
     OrderingMatchingRule orderingMatchingRule = null;
@@ -1605,4 +1605,14 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java
index 7ad2110..ab9d9a7 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions copyright 2012 ForgeRock AS.
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -512,5 +513,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java
index 34a28c0..2d25a70 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/BinarySyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -249,5 +250,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return false;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/BitStringSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/BitStringSyntax.java
index 5174973..3ce78fc 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/BitStringSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/BitStringSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -252,5 +253,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/BooleanSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/BooleanSyntax.java
index b474f7f..e81f8ef 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/BooleanSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/BooleanSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -293,5 +294,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/CertificateListSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/CertificateListSyntax.java
index bc04f98..4c493ea 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/CertificateListSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/CertificateListSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -236,5 +237,15 @@
   {
     return true;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return false;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/CertificatePairSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/CertificatePairSyntax.java
index b0c467d..40acdf5 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/CertificatePairSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/CertificatePairSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -236,5 +237,15 @@
   {
     return true;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return false;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/CertificateSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/CertificateSyntax.java
index 00724f4..6555af5 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/CertificateSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/CertificateSyntax.java
@@ -23,12 +23,16 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 Forgerock AS
  */
 package org.opends.server.schema;
 
 
 
-import org.opends.server.admin.std.server.AttributeSyntaxCfg;
+import java.util.List;
+
+import org.opends.server.admin.server.ConfigurationChangeListener;
+import org.opends.server.admin.std.server.CertificateAttributeSyntaxCfg;
 import org.opends.server.api.ApproximateMatchingRule;
 import org.opends.server.api.AttributeSyntax;
 import org.opends.server.api.EqualityMatchingRule;
@@ -37,12 +41,20 @@
 import org.opends.server.config.ConfigException;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.types.ByteSequence;
+import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.types.ResultCode;
 
+import org.opends.server.protocols.asn1.ASN1;
+import org.opends.server.protocols.asn1.ASN1Exception;
+import org.opends.server.protocols.asn1.ASN1Reader;
 
 import static org.opends.server.loggers.ErrorLogger.*;
 import static org.opends.messages.SchemaMessages.*;
+
+import org.opends.messages.Message;
 import org.opends.messages.MessageBuilder;
 import static org.opends.server.schema.SchemaConstants.*;
+import static org.opends.server.protocols.asn1.ASN1Constants.*;
 
 
 /**
@@ -51,7 +63,8 @@
  * bytes.  It will be treated much like the octet string attribute syntax.
  */
 public class CertificateSyntax
-       extends AttributeSyntax<AttributeSyntaxCfg>
+       extends AttributeSyntax<CertificateAttributeSyntaxCfg>
+       implements ConfigurationChangeListener<CertificateAttributeSyntaxCfg>
 {
   // The default equality matching rule for this syntax.
   private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -62,6 +75,9 @@
   // The default substring matching rule for this syntax.
   private SubstringMatchingRule defaultSubstringMatchingRule;
 
+  // The current configuration.
+  private volatile CertificateAttributeSyntaxCfg config;
+
 
 
   /**
@@ -80,7 +96,7 @@
   /**
    * {@inheritDoc}
    */
-  public void initializeSyntax(AttributeSyntaxCfg configuration)
+  public void initializeSyntax(CertificateAttributeSyntaxCfg configuration)
          throws ConfigException
   {
     defaultEqualityMatchingRule =
@@ -106,6 +122,34 @@
       logError(ERR_ATTR_SYNTAX_UNKNOWN_SUBSTRING_MATCHING_RULE.get(
           SMR_OCTET_STRING_OID, SYNTAX_CERTIFICATE_NAME));
     }
+
+    this.config = configuration;
+    config.addCertificateChangeListener(this);
+  }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isConfigurationChangeAcceptable(
+      CertificateAttributeSyntaxCfg configuration,
+      List<Message> unacceptableReasons)
+  {
+    // The configuration is always acceptable.
+    return true;
+  }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public ConfigChangeResult applyConfigurationChange(
+      CertificateAttributeSyntaxCfg configuration)
+  {
+    this.config = configuration;
+    return new ConfigChangeResult(ResultCode.SUCCESS, false);
   }
 
 
@@ -222,7 +266,215 @@
   public boolean valueIsAcceptable(ByteSequence value,
                                    MessageBuilder invalidReason)
   {
-    // All values will be acceptable for the certificate syntax.
+    // Skip validation if strict validation is disabled.
+    if (!config.isStrictFormat())
+    {
+      return true;
+    }
+
+    // Validate the ByteSequence against the definitions of X.509, clause 7
+    long x509Version=0;
+    ASN1Reader reader = ASN1.getReader(value);
+    try
+    {
+      // Certificate SIGNED SEQUENCE
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_SEQUENCE_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.readStartSequence();
+
+      // CertificateContent SEQUENCE
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_SEQUENCE_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.readStartSequence();
+
+      // Optional Version
+      if (reader.hasNextElement() &&
+          reader.peekType() == (TYPE_MASK_CONTEXT | TYPE_MASK_CONSTRUCTED))
+      {
+        reader.readStartExplicitTag();
+        if (!reader.hasNextElement() ||
+            reader.peekType() != UNIVERSAL_INTEGER_TYPE)
+        {
+          invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+          return false;
+        }
+        x509Version=reader.readInteger();
+        if (x509Version < 0 || x509Version >2)
+        {
+          // invalid Version specified
+          invalidReason.append(ERR_SYNTAX_CERTIFICATE_INVALID_VERSION
+            .get(x509Version));
+          return false;
+        }
+        if (x509Version == 0)
+        {
+          // DEFAULT values shall not be included in DER encoded SEQUENCE
+          // (X.690, 11.5)
+          invalidReason.append(ERR_SYNTAX_CERTIFICATE_INVALID_DER.get());
+          return false;
+        }
+        reader.readEndExplicitTag();
+      }
+
+      // serialNumber
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_INTEGER_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.skipElement();
+
+      // signature AlgorithmIdentifier
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_SEQUENCE_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.skipElement();
+
+      // issuer name (SEQUENCE as of X.501, 9.2)
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_SEQUENCE_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.skipElement();
+
+      // validity (SEQUENCE)
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_SEQUENCE_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.skipElement();
+
+      // subject name (SEQUENCE as of X.501, 9.2)
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_SEQUENCE_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.skipElement();
+
+      // SubjectPublicKeyInfo (SEQUENCE)
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_SEQUENCE_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.skipElement();
+
+      // OPTIONAL issuerUniqueIdentifier
+      if (reader.hasNextElement() &&
+          reader.peekType() == (TYPE_MASK_CONTEXT + 1))
+      {
+        if (x509Version < 1)
+        {
+          // only valid in v2 and v3
+          invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+          return false;
+        }
+        reader.skipElement();
+      }
+
+      // OPTIONAL subjectUniqueIdentifier
+      if (reader.hasNextElement() &&
+          reader.peekType() == (TYPE_MASK_CONTEXT + 2))
+      {
+        if (x509Version < 1)
+        {
+          // only valid in v2 and v3
+          invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+          return false;
+        }
+        reader.skipElement();
+      }
+
+      // OPTIONAL extensions
+      if (reader.hasNextElement() &&
+          reader.peekType() == ((TYPE_MASK_CONTEXT|TYPE_MASK_CONSTRUCTED) + 3))
+      {
+        if (x509Version < 2)
+        {
+          // only valid in v3
+          invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+          return false;
+        }
+        reader.readStartExplicitTag(); // read Tag
+        if (!reader.hasNextElement() ||
+            reader.peekType() != UNIVERSAL_SEQUENCE_TYPE)
+        {
+          // only valid in v3
+          invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+          return false;
+        }
+        reader.readEndExplicitTag(); // read end Tag
+      }
+
+      // There should not be any further ASN.1 elements within this SEQUENCE
+      if (reader.hasNextElement())
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.readEndSequence(); // End CertificateContent SEQUENCE
+
+      // AlgorithmIdentifier SEQUENCE
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_SEQUENCE_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.skipElement();
+
+      // ENCRYPTED HASH BIT STRING
+      if (!reader.hasNextElement() ||
+          reader.peekType() != UNIVERSAL_BIT_STRING_TYPE)
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.skipElement();
+
+      // There should not be any further ASN.1 elements within this SEQUENCE
+      if (reader.hasNextElement())
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      reader.readEndSequence(); // End Certificate SEQUENCE
+
+      // There should not be any further ASN.1 elements
+      if (reader.hasNextElement())
+      {
+        invalidReason.append(ERR_SYNTAX_CERTIFICATE_NOTVALID.get());
+        return false;
+      }
+      // End of the certificate
+    }
+    catch (ASN1Exception e)
+    {
+      System.out.println(e.getMessageObject());
+      invalidReason.append(e.getMessageObject());
+      return false;
+    }
+
+    // The basic structure of the value is an X.509 certificate
     return true;
   }
 
@@ -235,5 +487,15 @@
   {
     return true;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return false;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/CountryStringSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/CountryStringSyntax.java
index 98462cb..231676a 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/CountryStringSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/CountryStringSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -265,5 +266,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java
index ec78b58..c073eab 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2011 ForgeRock AS
+ *      Portions Copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -1484,5 +1484,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
index 38e23ec..a574897 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2011 ForgeRock AS
+ *      Portions Copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -1231,5 +1231,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
index 2b37358..eb10f9f 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -311,5 +312,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java
index 443c85e..79cb9a3 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -355,5 +356,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
index 5060b27..aefaacd 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -279,5 +280,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
index 1d567b8..ca6af89 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -312,5 +313,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/FaxNumberSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/FaxNumberSyntax.java
index d8d9d5e..5433785 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/FaxNumberSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/FaxNumberSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -367,5 +368,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/FaxSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/FaxSyntax.java
index 450d364..8aa3f1b 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/FaxSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/FaxSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -235,5 +236,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return false;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
index a685a26..d8acce1 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
@@ -24,6 +24,7 @@
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
  *      Portions Copyright 2009 D. J. Hagberg, Millibits Consulting, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -1653,5 +1654,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/GuideSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/GuideSyntax.java
index 8990a07..609af5e 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/GuideSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/GuideSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -556,5 +557,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/IA5StringSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/IA5StringSyntax.java
index 6ddccd4..c7e5901 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/IA5StringSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/IA5StringSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -262,5 +263,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/IntegerSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/IntegerSyntax.java
index 462ac49..d90e855 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/IntegerSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/IntegerSyntax.java
@@ -394,5 +394,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java
index 4e20310..1e858b7 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -235,5 +236,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return false;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
index 4f76afe..9b02cc1 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2011 ForgeRock AS
+ *      Portions Copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -473,7 +473,7 @@
         StringBuilder woidBuffer = new StringBuilder();
         pos = readQuotedString(valueStr, woidBuffer, pos);
         String syntaxOID = toLowerCase(woidBuffer.toString());
-        AttributeSyntax subSyntax = schema.getSyntax(syntaxOID);
+        AttributeSyntax<?> subSyntax = schema.getSyntax(syntaxOID);
         if (subSyntax == null)
         {
           Message message = ERR_ATTR_SYNTAX_LDAPSYNTAX_UNKNOWN_SYNTAX.get(
@@ -933,6 +933,16 @@
 
 
   /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
+
+
+
+  /**
    * This class provides a substitution mechanism where one unimplemented
    * syntax can be substituted by another defined syntax. A substitution syntax
    * is an LDAPSyntaxDescriptionSyntax with X-SUBST extension.
@@ -941,7 +951,7 @@
           LDAPSyntaxDescriptionSyntax
   {
     // The syntax that will subsittute the unimplemented syntax.
-    private AttributeSyntax subSyntax;
+    private AttributeSyntax<?> subSyntax;
 
     // The description of this syntax.
     private String description;
@@ -956,7 +966,7 @@
 
 
     //Creates a new instance of this syntax.
-    private SubstitutionSyntax(AttributeSyntax subSyntax,
+    private SubstitutionSyntax(AttributeSyntax<?> subSyntax,
             String definition,
             String description,
             String oid)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java
index c72c31e..c90ccf9 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2011 ForgeRock AS
+ *      Portions Copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -396,7 +396,7 @@
     // for everything else we might need to know.
     ConcurrentHashMap<String,String> names =
          new ConcurrentHashMap<String,String>();
-    AttributeSyntax syntax = null;
+    AttributeSyntax<?> syntax = null;
     ConcurrentHashMap<String,CopyOnWriteArrayList<String>> extraProperties =
          new ConcurrentHashMap<String,CopyOnWriteArrayList<String>>();
 
@@ -1186,5 +1186,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
index d3fb5c0..517154f 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2011 ForgeRock AS
+ *      Portions Copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -1176,5 +1176,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
index cf52ef1..bc96e03 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -298,5 +299,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/NameFormSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/NameFormSyntax.java
index 8095168..3e0c112 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/NameFormSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/NameFormSyntax.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2011 ForgeRock AS
+ *      Portions Copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -1291,5 +1291,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/NumericStringSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/NumericStringSyntax.java
index 98a0b29..97a21d7 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/NumericStringSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/NumericStringSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -262,5 +263,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/OIDSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/OIDSyntax.java
index b26acaf..38c4cee 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/OIDSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/OIDSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -226,5 +227,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
index f89c918..550d549 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2010 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -1514,5 +1515,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/OctetStringSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/OctetStringSyntax.java
index 5fcbc01..768ca32 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/OctetStringSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/OctetStringSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -235,5 +236,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return false;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java
index 015212a..ebab4da 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -302,5 +303,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/PostalAddressSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/PostalAddressSyntax.java
index e9a130a..d2328ce 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/PostalAddressSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/PostalAddressSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -227,5 +228,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java
index f626378..69d2d7c 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -245,5 +246,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/PrintableStringSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/PrintableStringSyntax.java
index 2de4831..a84ed98 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/PrintableStringSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/PrintableStringSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -284,5 +285,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
index 704f25e..211a05c 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -245,5 +246,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
index 792685d..a7c1d37 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -272,5 +273,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java
index 17f5893..c1b6f8f 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2010 Sun Microsystems, Inc.
- *      Portions copyright 2011 ForgeRock AS
+ *      Portions copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -273,4 +273,14 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
index 16902ad..b92485d 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -236,5 +237,15 @@
   {
     return true;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return false;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
index 47a2446..9c4faeb 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -387,5 +388,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
index b877652..27a9255 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -400,5 +401,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/TelexNumberSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/TelexNumberSyntax.java
index 0b93028..6fad409 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/TelexNumberSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/TelexNumberSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -356,5 +357,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/UTCTimeSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/UTCTimeSyntax.java
index 55c7d08..1599e17 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/UTCTimeSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/UTCTimeSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -894,5 +895,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/UUIDSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/UUIDSyntax.java
index 4bf49ba..b34b3a4 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/UUIDSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/UUIDSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 
@@ -291,5 +292,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/UserPasswordSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/UserPasswordSyntax.java
index 5dc61ef..4b7bc05 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/UserPasswordSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/UserPasswordSyntax.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.schema;
 import org.opends.messages.Message;
@@ -343,5 +344,15 @@
   {
     return false;
   }
+
+
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean isHumanReadable()
+  {
+    return true;
+  }
 }
 
diff --git a/opendj-sdk/opends/src/server/org/opends/server/types/AttributeType.java b/opendj-sdk/opends/src/server/org/opends/server/types/AttributeType.java
index 7c1afb7..d7f2d5e 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/types/AttributeType.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/types/AttributeType.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
- *      Portions Copyright 2011 ForgeRock AS
+ *      Portions Copyright 2011-2012 ForgeRock AS
  */
 package org.opends.server.types;
 
@@ -80,7 +80,7 @@
   private final ApproximateMatchingRule approximateMatchingRule;
 
   // The syntax for this attribute type.
-  private final AttributeSyntax syntax;
+  private final AttributeSyntax<?> syntax;
 
   // The superior attribute type from which this attribute type
   // inherits.
@@ -179,7 +179,7 @@
                        Collection<String> typeNames,
                        String oid, String description,
                        AttributeType superiorType,
-                       AttributeSyntax syntax,
+                       AttributeSyntax<?> syntax,
                        AttributeUsage attributeUsage,
                        boolean isCollective,
                        boolean isNoUserModification,
@@ -258,7 +258,7 @@
                        Collection<String> typeNames,
                        String oid, String description,
                        AttributeType superiorType,
-                       AttributeSyntax syntax,
+                       AttributeSyntax<?> syntax,
                        ApproximateMatchingRule
                             approximateMatchingRule,
                        EqualityMatchingRule equalityMatchingRule,
@@ -514,7 +514,7 @@
    *
    * @return  The syntax for this attribute type.
    */
-  public AttributeSyntax getSyntax()
+  public AttributeSyntax<?> getSyntax()
   {
     return syntax;
   }
@@ -522,9 +522,9 @@
 
 
   /**
-   * Indicates whether this attribute syntax is a binary one.
-   * @return  {@code true} if it is a binary syntax rule
-   *          , or {@code false} if not.
+   * Indicates whether this attribute syntax requires BER encoding.
+   *
+   * @return {@code true} if this syntax required BER encoding.
    */
   public boolean isBinary()
   {
@@ -534,6 +534,18 @@
 
 
   /**
+   * Indicates whether this attribute syntax is human readable.
+   *
+   * @return {@code true} if this syntax is human readable.
+   */
+  public boolean isHumanReadable()
+  {
+    return syntax.isHumanReadable();
+  }
+
+
+
+  /**
    * Retrieves the OID for this syntax associated with this attribute
    * type.
    *
diff --git a/opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java b/opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java
index d358780..0de8635 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java
@@ -1259,15 +1259,30 @@
                 {
                   if (! syntax.valueIsAcceptable(v.getValue(), invalidReason))
                   {
-                    Message message = WARN_ADD_OP_INVALID_SYNTAX.get(
+                    if (!syntax.isHumanReadable() || syntax.isBinary())
+                    {
+                      // Value is not human-readable
+                      Message message = WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE.get(
+                                        String.valueOf(entryDN),
+                                        String.valueOf(a.getName()),
+                                        String.valueOf(invalidReason));
+
+                      throw new DirectoryException(
+                                   ResultCode.INVALID_ATTRIBUTE_SYNTAX,
+                                   message);
+                    }
+                    else
+                    {
+                      Message message = WARN_ADD_OP_INVALID_SYNTAX.get(
                                         String.valueOf(entryDN),
                                         String.valueOf(v.getValue().toString()),
                                         String.valueOf(a.getName()),
                                         String.valueOf(invalidReason));
 
-                    throw new DirectoryException(
+                      throw new DirectoryException(
                                    ResultCode.INVALID_ATTRIBUTE_SYNTAX,
                                    message);
+                    }
                   }
                 }
               }
@@ -1287,15 +1302,30 @@
                   if (! syntax.valueIsAcceptable(v.getValue(),
                                                  invalidReason))
                   {
-                    Message message = WARN_ADD_OP_INVALID_SYNTAX.
+                    if (!syntax.isHumanReadable() || syntax.isBinary())
+                    {
+                      // Value is not human-readable
+                      Message message = WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE.
+                        get(String.valueOf(entryDN),
+                            String.valueOf(a.getName()),
+                            String.valueOf(invalidReason));
+
+                      throw new DirectoryException(
+                                   ResultCode.INVALID_ATTRIBUTE_SYNTAX,
+                                   message);
+                    }
+                    else
+                    {
+                      Message message = WARN_ADD_OP_INVALID_SYNTAX.
                         get(String.valueOf(entryDN),
                             String.valueOf(v.getValue().toString()),
                             String.valueOf(a.getName()),
                             String.valueOf(invalidReason));
 
-                    throw new DirectoryException(
+                      throw new DirectoryException(
                                    ResultCode.INVALID_ATTRIBUTE_SYNTAX,
                                    message);
+                    }
                   }
                 }
               }
@@ -1319,11 +1349,22 @@
                   if (! syntax.valueIsAcceptable(v.getValue(),
                                                  invalidReason))
                   {
-                    logError(WARN_ADD_OP_INVALID_SYNTAX.get(
+                    if (!syntax.isHumanReadable() || syntax.isBinary())
+                    {
+                      // Value is not human-readable
+                      logError(WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE.get(
+                                  String.valueOf(entryDN),
+                                  String.valueOf(a.getName()),
+                                  String.valueOf(invalidReason)));
+                    }
+                    else
+                    {
+                      logError(WARN_ADD_OP_INVALID_SYNTAX.get(
                                   String.valueOf(entryDN),
                                   String.valueOf(v.getValue().toString()),
                                   String.valueOf(a.getName()),
                                   String.valueOf(invalidReason)));
+                    }
                   }
                 }
               }
@@ -1342,11 +1383,22 @@
                   if (! syntax.valueIsAcceptable(v.getValue(),
                                                  invalidReason))
                   {
-                    logError(WARN_ADD_OP_INVALID_SYNTAX.get(
+                    if (!syntax.isHumanReadable() || syntax.isBinary())
+                    {
+                      // Value is not human-readable
+                      logError(WARN_ADD_OP_INVALID_SYNTAX_NO_VALUE.get(
+                                  String.valueOf(entryDN),
+                                  String.valueOf(a.getName()),
+                                  String.valueOf(invalidReason)));
+                    }
+                    else
+                    {
+                      logError(WARN_ADD_OP_INVALID_SYNTAX.get(
                                   String.valueOf(entryDN),
                                   String.valueOf(v.getValue().toString()),
                                   String.valueOf(a.getName()),
                                   String.valueOf(invalidReason)));
+                    }
                   }
                 }
               }
diff --git a/opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java b/opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
index fd779b0..b3ff2b2 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
@@ -1492,9 +1492,19 @@
         {
           if (!syntax.valueIsAcceptable(v.getValue(), invalidReason))
           {
-            throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
+            if (!syntax.isHumanReadable() || syntax.isBinary())
+            {
+              // Value is not human-readable
+              throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
+                ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE.get(
+                    String.valueOf(entryDN), attr.getName(), invalidReason));
+            }
+            else
+            {
+              throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
                 ERR_MODIFY_ADD_INVALID_SYNTAX.get(String.valueOf(entryDN), attr
                     .getName(), v.getValue().toString(), invalidReason));
+            }
           }
         }
       }
@@ -1506,8 +1516,18 @@
           if (!syntax.valueIsAcceptable(v.getValue(), invalidReason))
           {
             setResultCode(ResultCode.INVALID_ATTRIBUTE_SYNTAX);
-            logError(ERR_MODIFY_ADD_INVALID_SYNTAX.get(String.valueOf(entryDN),
-                attr.getName(), v.getValue().toString(), invalidReason));
+            if (!syntax.isHumanReadable() || syntax.isBinary())
+            {
+              // Value is not human-readable
+              logError(ERR_MODIFY_ADD_INVALID_SYNTAX_NO_VALUE.get(
+                  String.valueOf(entryDN), attr.getName(), invalidReason));
+            }
+            else
+            {
+              logError(ERR_MODIFY_ADD_INVALID_SYNTAX.get(String
+                  .valueOf(entryDN), attr.getName(), v.getValue().toString(),
+                  invalidReason));
+            }
             invalidReason = new MessageBuilder();
           }
         }
@@ -1695,9 +1715,19 @@
         {
           if (!syntax.valueIsAcceptable(v.getValue(), invalidReason))
           {
-            throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
+            if (!syntax.isHumanReadable() || syntax.isBinary())
+            {
+              // Value is not human-readable
+              throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
+                ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE.get(
+                    String.valueOf(entryDN), attr.getName(), invalidReason));
+            }
+            else
+            {
+              throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
                 ERR_MODIFY_REPLACE_INVALID_SYNTAX.get(String.valueOf(entryDN),
                     attr.getName(), v.getValue().toString(), invalidReason));
+            }
           }
         }
       }
@@ -1709,9 +1739,18 @@
           if (!syntax.valueIsAcceptable(v.getValue(), invalidReason))
           {
             setResultCode(ResultCode.INVALID_ATTRIBUTE_SYNTAX);
-            logError(ERR_MODIFY_REPLACE_INVALID_SYNTAX.get(String
-                .valueOf(entryDN), attr.getName(), v.getValue().toString(),
-                invalidReason));
+            if (!syntax.isHumanReadable() || syntax.isBinary())
+            {
+              // Value is not human-readable
+              logError(ERR_MODIFY_REPLACE_INVALID_SYNTAX_NO_VALUE.get(String
+                  .valueOf(entryDN), attr.getName(), invalidReason));
+            }
+            else
+            {
+              logError(ERR_MODIFY_REPLACE_INVALID_SYNTAX.get(String
+                  .valueOf(entryDN), attr.getName(), v.getValue().toString(),
+                  invalidReason));
+            }
             invalidReason = new MessageBuilder();
           }
         }
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/ModifyOperationTestCase.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/ModifyOperationTestCase.java
index ac88a81..3770d33 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/ModifyOperationTestCase.java
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/core/ModifyOperationTestCase.java
@@ -59,6 +59,7 @@
 import org.opends.server.tools.LDAPModify;
 import org.opends.server.tools.LDAPWriter;
 import org.opends.server.types.*;
+import org.opends.server.util.Base64;
 import org.opends.server.util.ServerConstants;
 import org.opends.server.workflowelement.localbackend.LocalBackendModifyOperation;
 
@@ -5163,8 +5164,25 @@
     InternalClientConnection conn =
          InternalClientConnection.getRootConnection();
 
+    String certificateValue = 
+      "MIICpTCCAg6gAwIBAgIJALeoA6I3ZC/cMA0GCSqGSIb3DQEBBQUAMFYxCzAJBgNV" +
+      "BAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRpb25lMRwwGgYDVQQLExNQcm9kdWN0IERl" +
+      "dmVsb3BtZW50MRQwEgYDVQQDEwtCYWJzIEplbnNlbjAeFw0xMjA1MDIxNjM0MzVa" +
+      "Fw0xMjEyMjExNjM0MzVaMFYxCzAJBgNVBAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRp" +
+      "b25lMRwwGgYDVQQLExNQcm9kdWN0IERldmVsb3BtZW50MRQwEgYDVQQDEwtCYWJz" +
+      "IEplbnNlbjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEApysa0c9qc8FB8gIJ" +
+      "8zAb1pbJ4HzC7iRlVGhRJjFORkGhyvU4P5o2wL0iz/uko6rL9/pFhIlIMbwbV8sm" +
+      "mKeNUPitwiKOjoFDmtimcZ4bx5UTAYLbbHMpEdwSpMC5iF2UioM7qdiwpAfZBd6Z" +
+      "69vqNxuUJ6tP+hxtr/aSgMH2i8ECAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgB" +
+      "hvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE" +
+      "FLlZD3aKDa8jdhzoByOFMAJDs2osMB8GA1UdIwQYMBaAFLlZD3aKDa8jdhzoByOF" +
+      "MAJDs2osMA0GCSqGSIb3DQEBBQUAA4GBAE5vccY8Ydd7by2bbwiDKgQqVyoKrkUg" +
+      "6CD0WRmc2pBeYX2z94/PWO5L3Fx+eIZh2wTxScF+FdRWJzLbUaBuClrxuy0Y5ifj" + 
+      "axuJ8LFNbZtsp1ldW3i84+F5+SYT+xI67ZcoAtwx/VFVI9s5I/Gkmu9f9nxjPpK7" + 
+      "1AIUXiE3Qcck";
+
     ArrayList<ByteString> values = new ArrayList<ByteString>();
-    values.add(ByteString.valueOf("2468"));
+    values.add(ByteString.wrap(Base64.decode(certificateValue)));
     LDAPAttribute attr = new LDAPAttribute("usercertificate", values);
     ArrayList<RawModification> mods = new ArrayList<RawModification>();
     mods.add(new LDAPModification(ModificationType.ADD, attr));
@@ -5184,7 +5202,7 @@
     Attribute a = attrList.get(0);
     assertTrue(a.hasOption("binary"));
     assertEquals(a.size(), 1);
-    assertEquals(a.iterator().next().getValue().toString(), "2468");
+    assertEquals(Base64.encode(a.iterator().next().getValue()), certificateValue);
   }
 
 }
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExternalSASLMechanismHandlerTestCase.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExternalSASLMechanismHandlerTestCase.java
index fb36c47..d7670c8 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExternalSASLMechanismHandlerTestCase.java
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/ExternalSASLMechanismHandlerTestCase.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 Forgerock AS
  */
 package org.opends.server.extensions;
 
@@ -507,6 +508,23 @@
   {
     TestCaseUtils.initializeTestBackend(true);
 
+    String Certificate = 
+      "MIICpTCCAg6gAwIBAgIJALeoA6I3ZC/cMA0GCSqGSIb3DQEBBQUAMFYxCzAJBgNV" +
+      "BAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRpb25lMRwwGgYDVQQLExNQcm9kdWN0IERl" +
+      "dmVsb3BtZW50MRQwEgYDVQQDEwtCYWJzIEplbnNlbjAeFw0xMjA1MDIxNjM0MzVa" +
+      "Fw0xMjEyMjExNjM0MzVaMFYxCzAJBgNVBAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRp" +
+      "b25lMRwwGgYDVQQLExNQcm9kdWN0IERldmVsb3BtZW50MRQwEgYDVQQDEwtCYWJz" +
+      "IEplbnNlbjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEApysa0c9qc8FB8gIJ" +
+      "8zAb1pbJ4HzC7iRlVGhRJjFORkGhyvU4P5o2wL0iz/uko6rL9/pFhIlIMbwbV8sm" +
+      "mKeNUPitwiKOjoFDmtimcZ4bx5UTAYLbbHMpEdwSpMC5iF2UioM7qdiwpAfZBd6Z" +
+      "69vqNxuUJ6tP+hxtr/aSgMH2i8ECAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgB" +
+      "hvhCAQ0EHxYdSW52YWxpZCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE" +
+      "FLlZD3aKDa8jdhzoByOFMAJDs2osMB8GA1UdIwQYMBaAFLlZD3aKDa8jdhzoByOF" +
+      "MAJDs2osMA0GCSqGSIb3DQEBBQUAA4GBAE5vccY8Ydd7by2bbwiDKgQqVyoKrkUg" +
+      "6CD0WRmc2pBeYX2z94/PWO5L3Fx+eIZh2wTxScF+FdRWJzLbUaBuClrxuy0Y5ifj" +
+      "axuJ8LFNbZtsp1ldW3i84+F5+SYT+xI67ZcoAtwx/VFVI9s5I/Gkmu9f9nxjPpK7" +
+      "1AIUXiE3Qcck";
+
     Entry e = TestCaseUtils.makeEntry(
          "dn: cn=Test User,o=test",
          "objectClass: top",
@@ -516,7 +534,7 @@
          "cn: Test User",
          "givenName: Test",
          "sn: User",
-         "userCertificate;binary: invalid");
+         "userCertificate;binary:: " + Certificate);
 
     InternalClientConnection conn =
          InternalClientConnection.getRootConnection();
@@ -642,6 +660,23 @@
   {
     TestCaseUtils.initializeTestBackend(true);
 
+    String Certificate = 
+      "MIICpTCCAg6gAwIBAgIJALeoA6I3ZC/cMA0GCSqGSIb3DQEBBQUAMFYxCzAJBgNV" +
+      "BAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRpb25lMRwwGgYDVQQLExNQcm9kdWN0IERl" +
+      "dmVsb3BtZW50MRQwEgYDVQQDEwtCYWJzIEplbnNlbjAeFw0xMjA1MDIxNjM0MzVa" +
+      "Fw0xMjEyMjExNjM0MzVaMFYxCzAJBgNVBAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRp" +
+      "b25lMRwwGgYDVQQLExNQcm9kdWN0IERldmVsb3BtZW50MRQwEgYDVQQDEwtCYWJz" +
+      "IEplbnNlbjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEApysa0c9qc8FB8gIJ" +
+      "8zAb1pbJ4HzC7iRlVGhRJjFORkGhyvU4P5o2wL0iz/uko6rL9/pFhIlIMbwbV8sm" +
+      "mKeNUPitwiKOjoFDmtimcZ4bx5UTAYLbbHMpEdwSpMC5iF2UioM7qdiwpAfZBd6Z" +
+      "69vqNxuUJ6tP+hxtr/aSgMH2i8ECAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgB" +
+      "hvhCAQ0EHxYdSW52YWxpZCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE" +
+      "FLlZD3aKDa8jdhzoByOFMAJDs2osMB8GA1UdIwQYMBaAFLlZD3aKDa8jdhzoByOF" +
+      "MAJDs2osMA0GCSqGSIb3DQEBBQUAA4GBAE5vccY8Ydd7by2bbwiDKgQqVyoKrkUg" +
+      "6CD0WRmc2pBeYX2z94/PWO5L3Fx+eIZh2wTxScF+FdRWJzLbUaBuClrxuy0Y5ifj" +
+      "axuJ8LFNbZtsp1ldW3i84+F5+SYT+xI67ZcoAtwx/VFVI9s5I/Gkmu9f9nxjPpK7" +
+      "1AIUXiE3Qcck";
+
     Entry e = TestCaseUtils.makeEntry(
          "dn: cn=Test User,o=test",
          "objectClass: top",
@@ -651,7 +686,7 @@
          "cn: Test User",
          "givenName: Test",
          "sn: User",
-         "userCertificate;binary: invalid");
+         "userCertificate;binary:: " + Certificate);
 
     InternalClientConnection conn =
          InternalClientConnection.getRootConnection();
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LDAPBinaryOptionTestCase.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LDAPBinaryOptionTestCase.java
index c6b09e2..ac72e5d 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LDAPBinaryOptionTestCase.java
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LDAPBinaryOptionTestCase.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright  2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 Forgerock AS
  */
 
 package org.opends.server.protocols.ldap;
@@ -44,6 +45,7 @@
 import org.opends.server.protocols.internal.InternalSearchOperation;
 import org.opends.server.tools.*;
 import org.opends.server.types.*;
+import org.opends.server.util.Base64;
 import org.testng.annotations.*;
 import static org.testng.Assert.*;
 
@@ -63,7 +65,7 @@
 
   //Constant value of userCertificate attribute.
   private static final String CERT=
-      ": MIIB5TCCAU6gAwIBAgIERloIajANBgkqhkiG9" +
+      "MIIB5TCCAU6gAwIBAgIERloIajANBgkqhkiG9" +
       "w0BAQUFADA3MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRXhhbXBs" +
       "ZSBDb3JwMREwDwYDVQQDEwhKb2huIERvZTAeFw0wNzA1MjcyMjM4" +
       "MzRaFw0wNzA4MjUyMjM4MzRaMDcxCzAJBgNVBAYTAlVTMRUwEwYD" +
@@ -110,7 +112,7 @@
       "uid: user.1",
       "sn: 1",
       "cn: user 1",
-      "userCertificate"+CERT
+      "userCertificate:: "+CERT
       );
     String[] args = new String []
     {
@@ -131,7 +133,7 @@
       "uid: user.2",
       "sn: 2",
       "cn: user 2",
-      "userCertificate;binary"+CERT
+      "userCertificate;binary:: "+CERT
       );
     args = new String []
     {
@@ -292,7 +294,8 @@
       addAttrs.add(RawAttribute.create("sn", "sn#1"));
       addAttrs.add(RawAttribute.create("sn;x-foo", "sn#2"));
       addAttrs.add(RawAttribute.create("sn;lang-fr", "sn#3"));
-      addAttrs.add(RawAttribute.create("userCertificate;binary", CERT));
+      addAttrs.add(RawAttribute.create("userCertificate;binary",
+                                       ByteString.wrap(Base64.decode(CERT))));
 
       AddRequestProtocolOp addRequest =
            new AddRequestProtocolOp(ByteString.valueOf("uid=user.7,o=test"),
@@ -488,7 +491,7 @@
      "dn: uid=user.4,o=test",
      "changetype: modify",
      "add: usercertificate;binary",
-     "userCertificate;binary" + CERT);
+     "userCertificate;binary:: " + CERT);
     args = new String[]
     {
       "-h", "127.0.0.1",
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BinaryAttributeSyntaxTest.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BinaryAttributeSyntaxTest.java
new file mode 100644
index 0000000..c3686fe
--- /dev/null
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/BinaryAttributeSyntaxTest.java
@@ -0,0 +1,87 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 Forgerock AS
+ */
+package org.opends.server.schema;
+
+import static org.testng.Assert.*;
+
+import org.opends.server.api.AttributeSyntax;
+import org.opends.server.types.ByteString;
+import org.opends.messages.MessageBuilder;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public abstract class BinaryAttributeSyntaxTest extends SchemaTestCase
+{
+  /**
+   * Create data for the testAcceptableValues test.
+   * This should be a table of tables with 2 elements.
+   * The first one should be the value to test, the second the expected
+   * result of the test. 
+   * 
+   * @return a table containing data for the testAcceptableValues Test.
+   */
+  @DataProvider(name="acceptableValues")
+  public abstract Object[][] createAcceptableValues();
+
+  /**
+   * Get an instance of the attribute syntax that muste be tested.
+   * 
+   * @return An instance of the attribute syntax that muste be tested.
+   */
+  protected abstract AttributeSyntax getRule();
+
+  /**
+   * Test the normalization and the approximate comparison.
+   */
+  @Test(dataProvider= "acceptableValues")
+  public void testAcceptableValues(ByteString value, Boolean result)
+         throws Exception
+  {
+    // Make sure that the specified class can be instantiated as a task.
+    AttributeSyntax syntax = getRule();
+
+    MessageBuilder reason = new MessageBuilder();
+    // test the valueIsAcceptable method
+    Boolean liveResult =
+      syntax.valueIsAcceptable(value, reason);
+    
+    if (liveResult != result)
+      fail(syntax + ".valueIsAcceptable gave bad result for " + value.toString() + 
+          "reason : " + reason);
+
+    // call the getters
+    syntax.getApproximateMatchingRule();
+    syntax.getDescription();
+    syntax.getEqualityMatchingRule();
+    syntax.getOID();
+    syntax.getOrderingMatchingRule();
+    syntax.getSubstringMatchingRule();
+    syntax.getSyntaxName();
+    syntax.toString();
+  }
+}
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/CertificateSyntaxTest.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/CertificateSyntaxTest.java
new file mode 100644
index 0000000..2c086f0
--- /dev/null
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/schema/CertificateSyntaxTest.java
@@ -0,0 +1,197 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying information:
+ *      Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 Forgerock AS
+ */
+package org.opends.server.schema;
+
+import org.opends.server.admin.server.ConfigurationChangeListener;
+import org.opends.server.admin.std.server.AttributeSyntaxCfg;
+import org.opends.server.admin.std.server.CertificateAttributeSyntaxCfg;
+import org.opends.server.api.AttributeSyntax;
+import org.opends.server.config.ConfigException;
+import org.testng.annotations.DataProvider;
+import org.opends.server.types.ByteString;
+import org.opends.server.types.DN;
+import org.opends.server.util.Base64;
+
+/**
+ * Test the CertificateSyntax.
+ */
+public class CertificateSyntaxTest extends BinaryAttributeSyntaxTest
+{
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  protected AttributeSyntax<?> getRule()
+  {
+    CertificateSyntax syntax = new CertificateSyntax();
+    CertificateAttributeSyntaxCfg cfg = new CertificateAttributeSyntaxCfg()
+    {
+      public DN dn()
+      {
+        return null;
+      }
+
+
+
+      public void removeChangeListener(
+          ConfigurationChangeListener<AttributeSyntaxCfg> listener)
+      {
+        // Stub.
+      }
+
+
+
+      public boolean isEnabled()
+      {
+        // Stub.
+        return false;
+      }
+
+
+
+      public void addChangeListener(
+          ConfigurationChangeListener<AttributeSyntaxCfg> listener)
+      {
+        // Stub.
+      }
+
+
+
+      public void removeCertificateChangeListener(
+          ConfigurationChangeListener<CertificateAttributeSyntaxCfg> listener)
+      {
+        // Stub.
+      }
+
+
+
+      public boolean isStrictFormat()
+      {
+        return true;
+      }
+
+
+
+      public String getJavaClass()
+      {
+        // Stub.
+        return null;
+      }
+
+
+
+      public Class<? extends CertificateAttributeSyntaxCfg> configurationClass()
+      {
+        // Stub.
+        return null;
+      }
+
+
+
+      public void addCertificateChangeListener(
+          ConfigurationChangeListener<CertificateAttributeSyntaxCfg> listener)
+      {
+        // Stub.
+      }
+    };
+
+    try
+    {
+      syntax.initializeSyntax(cfg);
+    }
+    catch (ConfigException e)
+    {
+      // Should never happen.
+      throw new RuntimeException(e);
+    }
+
+    return syntax;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  @DataProvider(name="acceptableValues")
+  public Object[][] createAcceptableValues()
+  {
+    String validcert1 =
+      "MIICpTCCAg6gAwIBAgIJALeoA6I3ZC/cMA0GCSqGSIb3DQEBBQUAMFYxCzAJBgNV" +
+      "BAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRpb25lMRwwGgYDVQQLExNQcm9kdWN0IERl" +
+      "dmVsb3BtZW50MRQwEgYDVQQDEwtCYWJzIEplbnNlbjAeFw0xMjA1MDIxNjM0MzVa" +
+      "Fw0xMjEyMjExNjM0MzVaMFYxCzAJBgNVBAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRp" +
+      "b25lMRwwGgYDVQQLExNQcm9kdWN0IERldmVsb3BtZW50MRQwEgYDVQQDEwtCYWJz" +
+      "IEplbnNlbjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEApysa0c9qc8FB8gIJ" +
+      "8zAb1pbJ4HzC7iRlVGhRJjFORkGhyvU4P5o2wL0iz/uko6rL9/pFhIlIMbwbV8sm" +
+      "mKeNUPitwiKOjoFDmtimcZ4bx5UTAYLbbHMpEdwSpMC5iF2UioM7qdiwpAfZBd6Z" +
+      "69vqNxuUJ6tP+hxtr/aSgMH2i8ECAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgB" +
+      "hvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE" +
+      "FLlZD3aKDa8jdhzoByOFMAJDs2osMB8GA1UdIwQYMBaAFLlZD3aKDa8jdhzoByOF" +
+      "MAJDs2osMA0GCSqGSIb3DQEBBQUAA4GBAE5vccY8Ydd7by2bbwiDKgQqVyoKrkUg" +
+      "6CD0WRmc2pBeYX2z94/PWO5L3Fx+eIZh2wTxScF+FdRWJzLbUaBuClrxuy0Y5ifj" +
+      "axuJ8LFNbZtsp1ldW3i84+F5+SYT+xI67ZcoAtwx/VFVI9s5I/Gkmu9f9nxjPpK7" +
+      "1AIUXiE3Qcck";
+
+    String invalidcert1 =
+      "MIICpTCCAg6gAwIBBQIJALeoA6I3ZC/cMA0GCSqGSIb3DQEBBQUAMFYxCzAJBgNV" +
+      "BAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRpb25lMRwwGgYDVQQLExNQcm9kdWN0IERl" +
+      "dmVsb3BtZW50MRQwEgYDVQQDEwtCYWJzIEplbnNlbjAeFw0xMjA1MDIxNjM0MzVa" +
+      "Fw0xMjEyMjExNjM0MzVaMFYxCzAJBgNVBAYTAlVTMRMwEQYDVQQHEwpDdXBlcnRp" +
+      "b25lMRwwGgYDVQQLExNQcm9kdWN0IERldmVsb3BtZW50MRQwEgYDVQQDEwtCYWJz" +
+      "IEplbnNlbjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEApysa0c9qc8FB8gIJ" +
+      "8zAb1pbJ4HzC7iRlVGhRJjFORkGhyvU4P5o2wL0iz/uko6rL9/pFhIlIMbwbV8sm" +
+      "mKeNUPitwiKOjoFDmtimcZ4bx5UTAYLbbHMpEdwSpMC5iF2UioM7qdiwpAfZBd6Z" +
+      "69vqNxuUJ6tP+hxtr/aSgMH2i8ECAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgB" +
+      "hvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE" +
+      "FLlZD3aKDa8jdhzoByOFMAJDs2osMB8GA1UdIwQYMBaAFLlZD3aKDa8jdhzoByOF" +
+      "MAJDs2osMA0GCSqGSIb3DQEBBQUAA4GBAE5vccY8Ydd7by2bbwiDKgQqVyoKrkUg" +
+      "6CD0WRmc2pBeYX2z94/PWO5L3Fx+eIZh2wTxScF+FdRWJzLbUaBuClrxuy0Y5ifj" +
+      "axuJ8LFNbZtsp1ldW3i84+F5+SYT+xI67ZcoAtwx/VFVI9s5I/Gkmu9f9nxjPpK7" +
+      "1AIUXiE3Qcck";
+
+    String brokencert1 =
+      "MIICpTCCAg6gAwIBAgIJALeoA6I3ZC/cMA0GCSqGSIb3DQEBBQUAMFYxCzAJBgNV";
+
+    try {
+      return new Object [][] {
+        {ByteString.wrap(Base64.decode(validcert1)), true},
+        {ByteString.valueOf(validcert1), false},
+        {ByteString.wrap(Base64.decode(invalidcert1)), false},
+        {ByteString.wrap(Base64.decode(brokencert1)), false},
+        {ByteString.valueOf("invalid"), false}
+      };
+    }
+    catch (Exception e)
+    {
+      return new Object[][] {};
+    }
+  }
+
+
+}

--
Gitblit v1.10.0