git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3a4f564
)
added a TODO reminder to fix the certificate subject
author
Tony Mack
<tmack@cs.princeton.edu>
Thu, 5 Nov 2009 01:57:29 +0000
(
01:57
+0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Thu, 5 Nov 2009 01:57:29 +0000
(
01:57
+0000)
sfa/server/sfa-server.py
patch
|
blob
|
history
diff --git
a/sfa/server/sfa-server.py
b/sfa/server/sfa-server.py
index
d7308be
..
3f9c843
100755
(executable)
--- a/
sfa/server/sfa-server.py
+++ b/
sfa/server/sfa-server.py
@@
-89,13
+89,15
@@
def main():
key_file = os.path.join(path, "server.key")
cert_file = os.path.join(path, "server.cert")
key_file = os.path.join(path, "server.key")
cert_file = os.path.join(path, "server.cert")
+ # XX TODO: Subject should be the interfaces's hrn
+ subject = "registry"
if (options.daemon): daemon()
if (os.path.exists(key_file)) and (not os.path.exists(cert_file)):
# If private key exists and cert doesnt, recreate cert
key = Keypair(filename=key_file)
if (options.daemon): daemon()
if (os.path.exists(key_file)) and (not os.path.exists(cert_file)):
# If private key exists and cert doesnt, recreate cert
key = Keypair(filename=key_file)
- cert = Certificate(subject=
"registry"
)
- cert.set_issuer(key=key, subject=
"registry"
)
+ cert = Certificate(subject=
subject
)
+ cert.set_issuer(key=key, subject=
subject
)
cert.set_pubkey(key)
cert.sign()
cert.save_to_file(cert_file)
cert.set_pubkey(key)
cert.sign()
cert.save_to_file(cert_file)
@@
-104,8
+106,8
@@
def main():
# if no key is specified, then make one up
key = Keypair(create=True)
key.save_to_file(key_file)
# if no key is specified, then make one up
key = Keypair(create=True)
key.save_to_file(key_file)
- cert = Certificate(subject=
"registry"
)
- cert.set_issuer(key=key, subject=
"registry"
)
+ cert = Certificate(subject=
subject
)
+ cert.set_issuer(key=key, subject=
subject
)
cert.set_pubkey(key)
cert.sign()
cert.save_to_file(cert_file)
cert.set_pubkey(key)
cert.sign()
cert.save_to_file(cert_file)