Explorar el Código

[crypto] Shrink raw certificate data to fit certificate

The certificate may be part of an ASN.1-encoded certificate chain, and
so may not be the only object contained within the ASN.1 cursor.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown hace 14 años
padre
commit
5c66395939
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1
    0
      src/crypto/x509.c

+ 1
- 0
src/crypto/x509.c Ver fichero

902
 	memset ( cert, 0, sizeof ( *cert ) );
902
 	memset ( cert, 0, sizeof ( *cert ) );
903
 	cert->raw.data = data;
903
 	cert->raw.data = data;
904
 	cert->raw.len = len;
904
 	cert->raw.len = len;
905
+	asn1_shrink_any ( &cert->raw );
905
 
906
 
906
 	/* Enter certificate */
907
 	/* Enter certificate */
907
 	memcpy ( &cursor, &cert->raw, sizeof ( cursor ) );
908
 	memcpy ( &cursor, &cert->raw, sizeof ( cursor ) );

Loading…
Cancelar
Guardar