This release extends the XCM socket attribute API. It is also a rewrite of the library-internal XCM socket attribute handling machinery. All API changes are backward compatible.
Generic Socket Attribute Extension
The API is extended to support dynamically-sized lists in the socket attribute tree. The API documentation is extended to cover both new API functionality, and describe the XCM socket attribute data model.
A new function xcm_attr_get_list_len() is added to retrieve the length of a list.
The socket attribute name syntax is properly documented and extended to support list indexing (using ALGOL 60-like syntax, with brackets).
Elements in a list may be retrieved using the regular xcm_attr_get*() family of functions, provided the socket attribute name (path) is constructed by the caller. To make it easier to access lists (and any other future dynamic elements), a new family of functions xcm_attr_getf*() is introduced, which provides a printf formatting-like string formatting service.
Refer to the API documentation for details and examples:
https://ericsson.github.io/xcm/doc/v1.11.1/
The XCM attribute namespace was always hierarchical, but the implementation was a flat name -> <set of callbacks + meta data>
mapping. This worked well when attributes were organized into pseudo dictionaries. It didn't work well with dynamically-sized lists of
attributes.
The new framework does proper parsing of the socket attribute name (path). The socket attribute tree is represented as a tree proper, with dictionaries and lists are predominantly interior nodes, and strings, integers etc as leaf nodes.
See commit 94b261d for more details.
TLS certificate attributes
A number of X.509 certificate-related socket attributes are added in this release:
tls.peer.cert.subject.cn (for the CN part of the subject field DN)
tls.peer.cert.san.dns[] (DNS type SANs)
tls.peer.cert.san.emails[] (RFC 822 type SANs)
tls.peer.cert.san.dirs[].cn (the CN part of the directory name type SAN DNs)
Other Improvements
In addition, v1.11.0 includes the following improvements:
- Fix incorrect log format strings.
- Clean up test directory structure.
- Modernize doxygen.conf.
- Shorten API documentation overviews and various other minor documentation tweaks.
The API/ABI version is bumped to 0.26.