diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-11-13 10:51:14 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-11-13 23:19:05 +1100 |
commit | 4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608 (patch) | |
tree | ca189d440b0a298cdcb3769d994828508dcd2e76 /source4/heimdal/lib/hx509/file.c | |
parent | 5bc87c14a1f5b45ed86e7ff9663f5f0aa2f70094 (diff) | |
download | samba-4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608.tar.gz samba-4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608.tar.bz2 samba-4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608.zip |
s4:heimdal: import lorikeet-heimdal-200911122202 (commit 9291fd2d101f3eecec550178634faa94ead3e9a1)
Diffstat (limited to 'source4/heimdal/lib/hx509/file.c')
-rw-r--r-- | source4/heimdal/lib/hx509/file.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/heimdal/lib/hx509/file.c b/source4/heimdal/lib/hx509/file.c index 674d2706ce..56e25766ef 100644 --- a/source4/heimdal/lib/hx509/file.c +++ b/source4/heimdal/lib/hx509/file.c @@ -66,7 +66,7 @@ _hx509_write_file(const char *fn, const void *data, size_t length) */ static void -header(FILE *f, const char *type, const char *str) +print_pem_stamp(FILE *f, const char *type, const char *str) { fprintf(f, "-----%s %s-----\n", type, str); } @@ -82,7 +82,7 @@ hx509_pem_write(hx509_context context, const char *type, #define ENCODE_LINE_LENGTH 54 - header(f, "BEGIN", type); + print_pem_stamp(f, "BEGIN", type); while (headers) { fprintf(f, "%s: %s\n%s", @@ -110,7 +110,7 @@ hx509_pem_write(hx509_context context, const char *type, free(line); } - header(f, "END", type); + print_pem_stamp(f, "END", type); return 0; } @@ -121,14 +121,14 @@ hx509_pem_write(hx509_context context, const char *type, int hx509_pem_add_header(hx509_pem_header **headers, - const char *hdr, const char *value) + const char *header, const char *value) { hx509_pem_header *h; h = calloc(1, sizeof(*h)); if (h == NULL) return ENOMEM; - h->header = strdup(hdr); + h->header = strdup(header); if (h->header == NULL) { free(h); return ENOMEM; @@ -164,10 +164,10 @@ hx509_pem_free_header(hx509_pem_header *headers) */ const char * -hx509_pem_find_header(const hx509_pem_header *h, const char *hdr) +hx509_pem_find_header(const hx509_pem_header *h, const char *header) { while(h) { - if (strcmp(hdr, h->header) == 0) + if (strcmp(header, h->header) == 0) return h->value; h = h->next; } |