src/server/config/keyfile.c

changeset 453
4586d534f9b5
parent 415
d938228c382e
equal deleted inserted replaced
452:ce359a2b51fe 453:4586d534f9b5
28 28
29 #include <stdio.h> 29 #include <stdio.h>
30 #include <stdlib.h> 30 #include <stdlib.h>
31 31
32 #include "keyfile.h" 32 #include "keyfile.h"
33 #include "logging.h"
33 34
34 #define KEYFILE_MAX_TOKENS 4096 35 #define KEYFILE_MAX_TOKENS 4096
35 36
36 KeyfileConfig *load_keyfile_config(const char *file) { 37 KeyfileConfig *load_keyfile_config(const char *file) {
37 FILE *in = fopen(file, "r"); 38 FILE *in = fopen(file, "r");
112 entry->hashtype = KEYFILE_SSHA256; 113 entry->hashtype = KEYFILE_SSHA256;
113 } else if(!cx_strcmp(hash_type, cx_str("SSHA512"))) { 114 } else if(!cx_strcmp(hash_type, cx_str("SSHA512"))) {
114 entry->hashtype = KEYFILE_SSHA512; 115 entry->hashtype = KEYFILE_SSHA512;
115 } else { 116 } else {
116 // unkown hash type 117 // unkown hash type
117 log_ereport( 118 ws_cfg_log(
118 LOG_FAILURE, 119 LOG_FAILURE,
119 "keyfile_parse: unknown hash type: %s", 120 "keyfile_parse: unknown hash type: %s",
120 cx_strdup_a(mp, hash_type).ptr); 121 cx_strdup_a(mp, hash_type).ptr);
121 return 1; 122 return 1;
122 } 123 }

mercurial