ldns(3) Library Functions Manual ldns(3)

# [NAME](#NAME)

ldns\_key\_set\_algorithm, ldns\_key\_set\_rsa\_key, ldns\_key\_set\_dsa\_key, ldns\_key\_set\_hmac\_key, ldns\_key\_set\_origttl, ldns\_key\_set\_inception, ldns\_key\_set\_expiration, ldns\_key\_set\_pubkey\_owner, ldns\_key\_set\_keytag, ldns\_key\_set\_flags, ldns\_key\_list\_set\_key\_count, ldns\_key\_algo\_supported - set ldns\_key attributes

# [SYNOPSIS](#SYNOPSIS)

#include &lt;stdint.h&gt;  
#include &lt;stdbool.h&gt;

#include &lt;ldns/ldns.h&gt;

void ldns\_key\_set\_algorithm(ldns\_key \*k, ldns\_signing\_algorithm l);

void ldns\_key\_set\_rsa\_key(ldns\_key \*k, RSA \*r);

void ldns\_key\_set\_dsa\_key(ldns\_key \*k, DSA \*d);

void ldns\_key\_set\_hmac\_key(ldns\_key \*k, unsigned char \*hmac);

void ldns\_key\_set\_origttl(ldns\_key \*k, uint32\_t t);

void ldns\_key\_set\_inception(ldns\_key \*k, uint32\_t i);

void ldns\_key\_set\_expiration(ldns\_key \*k, uint32\_t e);

void ldns\_key\_set\_pubkey\_owner(ldns\_key \*k, ldns\_rdf \*r);

void ldns\_key\_set\_keytag(ldns\_key \*k, uint16\_t tag);

void ldns\_key\_set\_flags(ldns\_key \*k, uint16\_t flags);

void ldns\_key\_list\_set\_key\_count(ldns\_key\_list \*key, size\_t count);

int ldns\_key\_algo\_supported(int algo);

# [DESCRIPTION](#DESCRIPTION)

*ldns\_key\_set\_algorithm*() Set the key's algorithm  
**k**: the key  
**l**: the algorithm

*ldns\_key\_set\_rsa\_key*() Set the key's rsa data. The rsa data should be freed by the user.  
**k**: the key  
**r**: the rsa data

*ldns\_key\_set\_dsa\_key*() Set the key's dsa data The dsa data should be freed by the user.  
**k**: the key  
**d**: the dsa data

*ldns\_key\_set\_hmac\_key*() Set the key's hmac data  
**k**: the key  
**hmac**: the raw key data

*ldns\_key\_set\_origttl*() Set the key's original ttl  
**k**: the key  
**t**: the ttl

*ldns\_key\_set\_inception*() Set the key's inception date (seconds after epoch)  
**k**: the key  
**i**: the inception

*ldns\_key\_set\_expiration*() Set the key's expiration date (seconds after epoch)  
**k**: the key  
**e**: the expiration

*ldns\_key\_set\_pubkey\_owner*() Set the key's pubkey owner  
**k**: the key  
**r**: the owner

*ldns\_key\_set\_keytag*() Set the key's key tag  
**k**: the key  
**tag**: the keytag

*ldns\_key\_set\_flags*() Set the key's flags  
**k**: the key  
**flags**: the flags

*ldns\_key\_list\_set\_key\_count*() Set the keylist's key count to count  
**key**: the key  
**count**: the count

*ldns\_key\_algo\_supported*() See if a key algorithm is supported  
**algo**: the signing algorithm number.  
Returns s true if supported.

# [AUTHOR](#AUTHOR)

The ldns team at NLnet Labs.

# [REPORTING BUGS](#REPORTING_BUGS)

Please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues

# [COPYRIGHT](#COPYRIGHT)

Copyright (c) 2004 - 2006 NLnet Labs.

Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# [SEE ALSO](#SEE_ALSO)

*ldns\_key\_push\_key*, *ldns\_key*. And **perldoc Net::DNS**, **RFC1034**, **RFC1035**, **RFC4033**, **RFC4034** and **RFC4035**.

# [REMARKS](#REMARKS)

This manpage was automatically generated from the ldns source code.

30 May 2006

---

Document: ldns_key_set_dsa_key(3) from ldns 1.9.2-r2 (Chainguard OS)
Source: https://github.com/NLnetLabs/ldns.git
