- Timestamp:
- 06/08/10 11:55:08 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/cu-security-branch/src/apps/admin/pvfs2-gencred.c
r8354 r8365 18 18 #include <unistd.h> 19 19 20 #ifdef ENABLE_SECURITY 20 21 #include <openssl/err.h> 21 22 #include <openssl/evp.h> 22 23 #include <openssl/pem.h> 24 #endif 23 25 24 26 #define __PINT_REQPROTO_ENCODE_FUNCS_C … … 132 134 } 133 135 136 #ifdef ENABLE_SECURITY 137 134 138 static int sign_credential(PVFS_credential *cred, time_t timeout, 135 139 const char *keypath) … … 222 226 } 223 227 228 #else /* !ENABLE_SECURITY */ 229 230 static int sign_credential(PVFS_credential *cred, time_t timeout, 231 const char *keypath) 232 { 233 cred->timeout = (PVFS_time)(time(NULL) + timeout); 234 cred->sig_size = 0; 235 cred->signature = NULL; 236 237 return 0; 238 } 239 240 #endif /* ENABLE_SECURITY */ 241 224 242 static int write_credential(const PVFS_credential *cred, 225 243 const struct passwd *pwd) … … 261 279 } 262 280 281 #ifdef ENABLE_SECURITY 263 282 OpenSSL_add_all_algorithms(); 264 283 ERR_load_crypto_strings(); 284 #endif 265 285 266 286 pwd = opts.user ? getpwnam(opts.user) : getpwuid(getuid());
