Show
Ignore:
Timestamp:
06/08/10 11:55:08 (3 years ago)
Author:
nlmills
Message:

more work to allow robust security to be disabled

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/cu-security-branch/src/apps/admin/pvfs2-gencred.c

    r8354 r8365  
    1818#include <unistd.h> 
    1919 
     20#ifdef ENABLE_SECURITY 
    2021#include <openssl/err.h> 
    2122#include <openssl/evp.h> 
    2223#include <openssl/pem.h> 
     24#endif 
    2325 
    2426#define __PINT_REQPROTO_ENCODE_FUNCS_C 
     
    132134} 
    133135 
     136#ifdef ENABLE_SECURITY 
     137 
    134138static int sign_credential(PVFS_credential *cred, time_t timeout, 
    135139    const char *keypath) 
     
    222226} 
    223227 
     228#else /* !ENABLE_SECURITY */ 
     229 
     230static 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 
    224242static int write_credential(const PVFS_credential *cred,  
    225243    const struct passwd *pwd) 
     
    261279    } 
    262280     
     281#ifdef ENABLE_SECURITY 
    263282    OpenSSL_add_all_algorithms(); 
    264283    ERR_load_crypto_strings(); 
     284#endif 
    265285     
    266286    pwd = opts.user ? getpwnam(opts.user) : getpwuid(getuid());