Changeset 1561:699c3fb0c57b in freeDiameter for libfdproto/ostr.c
- Timestamp:
- Jun 17, 2021, 1:44:45 AM (3 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdproto/ostr.c
r1127 r1561 37 37 38 38 #if (!defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT)) 39 /* Process IDNA with stringprep -- See RFC5890 -- and libidn documentation... */40 #include <idn a.h> /* idna_to_ascii_8z() */39 /* Process IDNA with stringprep -- See RFC5890 -- and libidn2 documentation... */ 40 #include <idn2.h> /* idn2_to_ascii_8z() */ 41 41 #endif /* !defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT) */ 42 42 … … 227 227 } 228 228 229 ret = idn a_to_ascii_8z ( *id, &processed, IDNA_USE_STD3_ASCII_RULES );230 if (ret == IDN A_SUCCESS) {229 ret = idn2_to_ascii_8z ( *id, &processed, IDNA_USE_STD3_ASCII_RULES ); 230 if (ret == IDN2_OK) { 231 231 TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity, it was changed to '%s'", *id, processed); 232 232 if (memory == 0) … … 236 236 /* Done! */ 237 237 } else { 238 TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity and cannot be sanit anized: %s", *id, idna_strerror (ret));238 TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity and cannot be sanitized: %s", *id, idn2_strerror (ret)); 239 239 return EINVAL; 240 240 }
Note: See TracChangeset
for help on using the changeset viewer.