From 350ff852d391e749bf7ab2c46bffcb5f3edba3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20=C3=81ngel=20del=20Pozo=20Dom=C3=ADnguez?= Date: Fri, 6 Jan 2017 23:13:02 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Corregido=20el=20m=C3=A9todo=20para=20leer?= =?UTF-8?q?=20el=20atributo=20"value"=20de=20un=20objeto=20mediante=20java?= =?UTF-8?q?script.=20Hay=20que=20usar=20el=20m=C3=A9todo=20getAttribute=20?= =?UTF-8?q?en=20lugar=20de=20acceder=20directamente=20con=20obj.nombreAttr?= =?UTF-8?q?ibuto.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ISicres-Desktop-Web/src/main/webapp/scripts/frmdata.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/registro/ISicres-Desktop-Web/src/main/webapp/scripts/frmdata.js b/registro/ISicres-Desktop-Web/src/main/webapp/scripts/frmdata.js index e6b8cba8b..b58a2960e 100644 --- a/registro/ISicres-Desktop-Web/src/main/webapp/scripts/frmdata.js +++ b/registro/ISicres-Desktop-Web/src/main/webapp/scripts/frmdata.js @@ -209,7 +209,7 @@ function cambioValor( Field ) var cantidad = FolderBarWnd.FldDataArr.length; - strValue = Field.value; + strValue = Field.getAttribute("value"); if (top.g_CopyFdr == 0){ FolderBarWnd.FldDataArr[cantidad] = @@ -217,7 +217,7 @@ function cambioValor( Field ) } /*Si estamos copiando un registro entonces no hay que meter en el array los campos vacios, solo los que tengan valor*/ else{ - if (Field.value!=null && Field.value!="" && Field.getAttribute("FldId")!=null && Field.getAttribute("FldId")!=""){ + if (Field.getAttribute("value")!=null && Field.getAttribute("value")!="" && Field.getAttribute("FldId")!=null && Field.getAttribute("FldId")!=""){ FolderBarWnd.FldDataArr[cantidad] = new FolderBarWnd.FldData( Field.getAttribute("FldId"), strValue, Field.name, Field.getAttribute("valueSust")); FolderBarWnd.FldDataArr[cantidad].valueSust = top.getSustValue(Field.getAttribute("FldId"), document.getElementById("FrmData")); @@ -1567,4 +1567,4 @@ function changeValueRadioDocFisica(radio, idCampo){ //activamos el boton de guardar top.Main.Folder.FolderBar.ActivateSave(); -} \ No newline at end of file +} From 1802a8e081af0a1cac99e81f23fd1544eb875d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20=C3=81ngel=20del=20Pozo=20Dom=C3=ADnguez?= Date: Fri, 6 Jan 2017 23:20:30 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Cambiar=20la=20detecci=C3=B3n=20de=20certif?= =?UTF-8?q?icados=20de=20la=20FNMT.=20El=20DN=20(Distinguished=20Name)=20d?= =?UTF-8?q?e=20los=20nuevos=20certificados=20emitidos=20por=20la=20FNMT=20?= =?UTF-8?q?ha=20cambiado.=20Este=20cambio=20simplemente=20comprueba=20que?= =?UTF-8?q?=20el=20DN=20contenga=20la=20cadena=20FNMT=20para=20identificar?= =?UTF-8?q?=20al=20certificado=20como=20emitido=20por=20la=20FNMT.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cripto/validacion/impl/bouncycastle/FnmtCertReader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sigem/SIGEM_CriptoValidacion/src/main/java/ieci/tecdoc/sgm/cripto/validacion/impl/bouncycastle/FnmtCertReader.java b/sigem/SIGEM_CriptoValidacion/src/main/java/ieci/tecdoc/sgm/cripto/validacion/impl/bouncycastle/FnmtCertReader.java index 116d06fe5..0e4b7a9c6 100644 --- a/sigem/SIGEM_CriptoValidacion/src/main/java/ieci/tecdoc/sgm/cripto/validacion/impl/bouncycastle/FnmtCertReader.java +++ b/sigem/SIGEM_CriptoValidacion/src/main/java/ieci/tecdoc/sgm/cripto/validacion/impl/bouncycastle/FnmtCertReader.java @@ -6,7 +6,7 @@ public class FnmtCertReader implements IReaderCert { - final static String CADENA = "OU=FNMT Clase 2 CA, O=FNMT, C=ES"; + final static String CADENA = "FNMT"; final static String CN_PERSONA_FISICA = "CN=NOMBRE "; final static String CN_PERSONA_JURIDICA = "CN=ENTIDAD "; final static String SEPARADOR = " - "; @@ -82,7 +82,7 @@ public InfoCertificado getInfo(X509Certificate cert) { } public boolean isTypeOf(X509Certificate cert) { - return CADENA.equals(cert.getIssuerDN().toString()); + return cert.getIssuerDN().toString().toLowerCase().contains(CADENA.toLowerCase()); } }