{
fko_ctx_t ctx, ctx2;
int res;
- char *spa_data, *version;
+ char *spa_data;
char access_buf[MAX_LINE_LEN];
fko_cli_options_t options;
else if (!options.no_save_args)
save_args(argc, argv);
+ /* Display version info and exit.
+ */
+ if (options.version) {
+ fprintf(stdout, "fwknop client %s, FKO protocol version %s\n",
+ MY_VERSION, FKO_PROTOCOL_VERSION);
+ return(EXIT_SUCCESS);
+ }
+
/* Intialize the context
*/
res = fko_new(&ctx);
return(EXIT_FAILURE);
}
- /* Display version info and exit.
- */
- if (options.version) {
- fko_get_version(ctx, &version);
-
- fprintf(stdout, "fwknop client %s, FKO protocol version %s\n",
- MY_VERSION, version);
-
- fko_destroy(ctx);
- return(EXIT_SUCCESS);
- }
-
/* Set client timeout
*/
if(options.fw_timeout >= 0)
libfko_la_SOURCES = $(libfko_source_files)
libfko_la_LIBADD = libfko_util.a
-libfko_la_LDFLAGS = -version-info 0:4:0 $(GPGME_LIBS) -export-symbols-regex '^fko_'
+libfko_la_LDFLAGS = -version-info 1:0:0 $(GPGME_LIBS) -export-symbols-regex '^fko_'
noinst_LIBRARIES = libfko_util.a
libfko_util_source_files = strlcpy.c strlcat.c fko_util.h
if(username == NULL || strnlen(username, MAX_SPA_USERNAME_SIZE) == 0)
return(FKO_ERROR_INVALID_DATA);
- /* Make sure it is just alpha-numeric chars, dashes, and underscores
+ /* Make sure it is just alpha-numeric chars, dashes, dots, and underscores
*/
if(isalnum(username[0]) == 0)
return(FKO_ERROR_INVALID_DATA);
for (i=1; i < (int)strnlen(username, MAX_SPA_USERNAME_SIZE); i++)
if((isalnum(username[i]) == 0)
- && username[i] != '-' && username[i] != '_')
+ && username[i] != '-' && username[i] != '_' && username[i] != '.')
return(FKO_ERROR_INVALID_DATA);
return FKO_SUCCESS;