Subject: [netmod] hex string - allow zero length values?

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 30 Apr 2013 10:44:14 +0200

Hi,

an issue that came up during reviews:

Should hex-string allow zero-length strings?

Right now it does not. Should we change that? If so, how would it
affect other documents we have using the hex-string definition?

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 30 Apr 2013 11:12:24 +0200 (CEST)

> affect other documents we have using the hex-string definition?

It makes some sense to allow it.  We allow zero-length strings and
binary for example.

ietf-x509-cert-to-name and ietf-snmp-common are not affected, they
already have a length restriction.

ietf-snmp-usm uses it for keys, and does not have a restriction but
probably should anyway.

/martin

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 30 Apr 2013 21:02:52 +0200

> ietf-snmp-usm uses it for keys, and does not have a restriction but

OK. So I propose to change hex-string to this:

  typedef hex-string {
    type string {
      pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
    }
    description
     "A hexadecimal string with octets represented as hex digits
      separated by colons.  The canonical representation uses
      lowercase characters.";
  }

/js

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 30 Apr 2013 21:37:17 +0200

>      separated by colons.  The canonical representation uses

+1

Lada

> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C