Lines Matching refs:tkey
425 * space needed for TKEY RDATA as specified by the tkey parameter.
430 * tkey: pointer to DNS TKEY RDATA structure
435 dyndns_build_tkey(uchar_t *buf, size_t buf_sz, const dyndns_tkey_rdata_t *tkey)
441 if (tkey == NULL) {
442 syslog(LOG_DEBUG, "dyndns: build_tkey: tkey == NULL");
445 if (tkey->tk_alg_name == NULL) {
450 if (ns_name_pton(tkey->tk_alg_name, alg_buf, sizeof (alg_buf)) == -1) {
456 tkey_len = alg_len + tkey->tk_key_size + tkey->tk_other_size + 16;
466 if (tkey->tk_key_size > 0 && tkey->tk_key_data == NULL) {
471 if (tkey->tk_other_size > 0 && tkey->tk_other_data == NULL) {
479 DYNDNS_PUT32(tkey->tk_incept_time, buf);
480 DYNDNS_PUT32(tkey->tk_expire_time, buf);
481 DYNDNS_PUT16(tkey->tk_mode, buf);
482 DYNDNS_PUT16(tkey->tk_error, buf);
483 DYNDNS_PUT16(tkey->tk_key_size, buf);
484 if (tkey->tk_key_size > 0) {
485 (void) memcpy(buf, tkey->tk_key_data, tkey->tk_key_size);
486 buf += tkey->tk_key_size;
488 DYNDNS_PUT16(tkey->tk_other_size, buf);
489 if (tkey->tk_other_size > 0)
490 (void) memcpy(buf, tkey->tk_other_data, tkey->tk_other_size);
646 * tkey: pointer to DNS TKEY RDATA structure
652 const char *key_name, const dyndns_tkey_rdata_t *tkey)
660 tkey_sz = dyndns_build_tkey(NULL, 0, tkey);
665 if (dyndns_build_tkey(tkey_buf, tkey_sz, tkey) == -1) {
816 dyndns_tkey_rdata_t tkey;
830 tkey.tk_alg_name = DYNDNS_MSAD_GSS_ALG;
831 tkey.tk_mode = DYNDNS_TKEY_MODE_GSS;
832 tkey.tk_error = ns_r_noerror;
833 tkey.tk_other_size = 0;
834 tkey.tk_other_data = NULL;
876 tkey.tk_incept_time = tv.tv_sec;
877 tkey.tk_expire_time = tv.tv_sec +
879 tkey.tk_key_size = out_tok.length;
880 tkey.tk_key_data = out_tok.value;
882 buf, buf_sz, key_name, &tkey)) <= 0) {