~smoser/ubuntu/oneiric/openvpn/lp-794916

« back to all changes in this revision

Viewing changes to misc.h

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Gonzalez Iniesta
  • Date: 2008-07-23 10:38:13 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080723103813-axq5wohvwjr4jo0s
Tags: 2.1~rc8-1
* New upstream version
* Added Build-dep on libpkcs11-helper1 to re-enable PKCS#11
  support. Sorry for the delay Florian :) (Closes: #475353)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *             packet encryption, packet authentication, and
6
6
 *             packet compression.
7
7
 *
8
 
 *  Copyright (C) 2002-2005 OpenVPN Solutions LLC <info@openvpn.net>
 
8
 *  Copyright (C) 2002-2008 OpenVPN Solutions LLC <info@openvpn.net>
9
9
 *
10
10
 *  This program is free software; you can redistribute it and/or modify
11
11
 *  it under the terms of the GNU General Public License version 2
165
165
void setenv_str_safe (struct env_set *es, const char *name, const char *value);
166
166
void setenv_del (struct env_set *es, const char *name);
167
167
 
 
168
void setenv_int_i (struct env_set *es, const char *name, const int value, const int i);
 
169
void setenv_str_i (struct env_set *es, const char *name, const char *value, const int i);
 
170
 
168
171
/* struct env_set functions */
169
172
 
170
173
struct env_set *env_set_create (struct gc_arena *gc);
206
209
bool test_file (const char *filename);
207
210
 
208
211
/* create a temporary filename in directory */
209
 
const char *create_temp_filename (const char *directory, struct gc_arena *gc);
 
212
const char *create_temp_filename (const char *directory, const char *prefix, struct gc_arena *gc);
210
213
 
211
214
/* put a directory and filename together */
212
215
const char *gen_path (const char *directory, const char *filename, struct gc_arena *gc);
227
230
  bool nocache;
228
231
 
229
232
/* max length of username/password */
230
 
# define USER_PASS_LEN 128
 
233
# ifdef ENABLE_PKCS11
 
234
#   define USER_PASS_LEN 4096
 
235
# else
 
236
#   define USER_PASS_LEN 128
 
237
# endif
231
238
  char username[USER_PASS_LEN];
232
239
  char password[USER_PASS_LEN];
233
240
};
242
249
#define GET_USER_PASS_PASSWORD_ONLY (1<<2)
243
250
#define GET_USER_PASS_NEED_OK       (1<<3)
244
251
#define GET_USER_PASS_NOFATAL       (1<<4)
 
252
#define GET_USER_PASS_NEED_STR      (1<<5)
245
253
 
246
254
bool get_user_pass (struct user_pass *up,
247
255
                    const char *auth_file,