---
name: "ne_ssl_dname_cmp"
section: "3"
platform: "linux"
package: "libneon27-dev"
version: "0.34.2-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ne_ssl_readable_dname"
---

# ne\_ssl\_dname\_cmp(3)

SSL distinguished name handling

Part of [ne\_ssl\_readable\_dname(3)](/ne_ssl_readable_dname/3.md).

## NAME

ne\_ssl\_readable\_dname, ne\_ssl\_dname\_cmp - SSL distinguished name handling

## SYNOPSIS

```
#include <ne_ssl.h>
```

**const char \*ne\_ssl\_readable\_dname(const ne\_ssl\_dname \****dname***);**

**int ne\_ssl\_dname\_cmp(const ne\_ssl\_dname \****dn1***, const ne\_ssl\_dname \****dn2***);**

## DESCRIPTION

The **ne\_ssl\_readable\_dname** function creates a single-line, human-readable string out of an **ne\_ssl\_dname** object. The returned string is **malloc**()-allocated, and must be **free**()d by the caller.

The **ne\_ssl\_dname\_cmp** function compares two distinguished names, and returns zero if they are equal, or non-zero otherwise.

## RETURN VALUE

**ne\_ssl\_readable\_dname** returns a **malloc**-allocated string, and never NULL.

## EXAMPLES

See ne\_ssl\_cert\_subject for an example use of **ne\_ssl\_readable\_dname**.

## SEE ALSO

ne\_ssl\_cert\_subject

## COPYRIGHT

Copyright © 2001-2024 Joe Orton\
