.ad l .TH ldns 3 "30 May 2006" .SH NAME ldns_key_new, ldns_key_new_frm_algorithm, ldns_key_new_frm_fp, ldns_key_new_frm_fp_l, ldns_key_new_frm_fp_rsa, ldns_key_new_frm_fp_rsa_l, ldns_key_new_frm_fp_dsa, ldns_key_new_frm_fp_dsa_l \- create a ldns_key .SH SYNOPSIS #include .br #include .br .PP #include .PP ldns_key* ldns_key_new(void); .PP ldns_key* ldns_key_new_frm_algorithm(ldns_signing_algorithm a, uint16_t size); .PP ldns_status ldns_key_new_frm_fp(ldns_key **k, FILE *fp); .PP ldns_status ldns_key_new_frm_fp_l(ldns_key **k, FILE *fp, int *line_nr); .PP RSA* ldns_key_new_frm_fp_rsa(FILE *fp); .PP RSA* ldns_key_new_frm_fp_rsa_l(FILE *fp, int *line_nr); .PP DSA* ldns_key_new_frm_fp_dsa(FILE *fp); .PP DSA* ldns_key_new_frm_fp_dsa_l(FILE *fp, int *line_nr); .PP .SH DESCRIPTION .HP \fIldns_key_new\fR() Creates a new empty key structure \.br Returns a new ldns_key * structure .PP .HP \fIldns_key_new_frm_algorithm\fR() Creates a new key based on the algorithm \.br \fBa\fR: The algorithm to use \.br \fBsize\fR: the number of bytes for the keysize \.br Returns a new ldns_key structure with the key .PP .HP \fIldns_key_new_frm_fp\fR() Creates a new priv key based on the contents of the file pointed by fp. The file should be in Private-key-format v1.x. \.br \fBk\fR: the new ldns_key structure \.br \fBfp\fR: the file pointer to use \.br Returns an error or \%LDNS_STATUS_OK .PP .HP \fIldns_key_new_frm_fp_l\fR() Creates a new private key based on the contents of the file pointed by fp The file should be in Private-key-format v1.x. \.br \fBk\fR: the new ldns_key structure \.br \fBfp\fR: the file pointer to use \.br \fBline_nr\fR: pointer to an integer containing the current line number (for debugging purposes) \.br Returns an error or \%LDNS_STATUS_OK .PP .HP \fIldns_key_new_frm_fp_rsa\fR() frm_fp helper function. This function parses the remainder of the (\%RSA) priv. key file generated from bind9 \.br \fBfp\fR: the file to parse \.br Returns \%NULL on failure otherwise a \%RSA structure .PP .HP \fIldns_key_new_frm_fp_rsa_l\fR() frm_fp helper function. This function parses the remainder of the (\%RSA) priv. key file generated from bind9 \.br \fBfp\fR: the file to parse \.br \fBline_nr\fR: pointer to an integer containing the current line number (for debugging purposes) \.br Returns \%NULL on failure otherwise a \%RSA structure .PP .HP \fIldns_key_new_frm_fp_dsa\fR() frm_fp helper function. This function parses the remainder of the (\%DSA) priv. key file \.br \fBfp\fR: the file to parse \.br Returns \%NULL on failure otherwise a \%RSA structure .PP .HP \fIldns_key_new_frm_fp_dsa_l\fR() frm_fp helper function. This function parses the remainder of the (\%DSA) priv. key file \.br \fBfp\fR: the file to parse \.br \fBline_nr\fR: pointer to an integer containing the current line number (for debugging purposes) \.br Returns \%NULL on failure otherwise a \%RSA structure .PP .SH AUTHOR The ldns team at NLnet Labs. .SH REPORTING BUGS Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at http://www.nlnetlabs.nl/bugs/index.html .SH COPYRIGHT Copyright (c) 2004 - 2006 NLnet Labs. .PP Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO \fIldns_key\fR. And \fBperldoc Net::DNS\fR, \fBRFC1034\fR, \fBRFC1035\fR, \fBRFC4033\fR, \fBRFC4034\fR and \fBRFC4035\fR. .SH REMARKS This manpage was automatically generated from the ldns source code.