[Pvfs2-cvs] commit by dbonnie in pvfs2/src/common/security: pint-security.c

CVS commit program cvs at parl.clemson.edu
Thu May 22 11:38:13 EDT 2008


Update of /anoncvs/pvfs2/src/common/security
In directory parlweb1:/tmp/cvs-serv4325/src/common/security

Modified Files:
      Tag: cu-security-branch
	pint-security.c 
Log Message:
Added nlmill's code to parse public/private keyfile locations from server config file. Changed pint-security to look in those locations.


Index: pint-security.c
===================================================================
RCS file: /anoncvs/pvfs2/src/common/security/Attic/pint-security.c,v
diff -p -u -r1.1.2.20 -r1.1.2.21
--- pint-security.c	21 May 2008 19:56:25 -0000	1.1.2.20
+++ pint-security.c	22 May 2008 15:38:13 -0000	1.1.2.21
@@ -80,15 +80,23 @@ int PINT_security_initialize(void)
     }
 
 #ifndef SECURITY_ENCRYPTION_NONE
-
-    ret = load_private_key(SECURITY_DEFAULT_PRIVKEYFILE);
+    struct server_configuration_s *server_conf = PINT_get_server_config();
+    char *privkey_path = server_conf->serverkey_path;
+    if (privkey_path == NULL)
+        ret = load_private_key(SECURITY_DEFAULT_PRIVKEYFILE);
+    else
+        ret = load_private_key(privkey_path);
     if (ret < 0)
     {
         return -PVFS_EIO;
     }
     
     /* TODO: better error handling */
-    ret = load_public_keys(SECURITY_DEFAULT_KEYSTORE);
+    char *pubkey_path = server_conf->keystore_path;
+    if (pubkey_path == NULL)
+        ret = load_public_keys(SECURITY_DEFAULT_KEYSTORE);
+    else
+        ret = load_public_keys(pubkey_path);
     if (ret < 0)
     {
         return -PVFS_EIO;



More information about the Pvfs2-cvs mailing list