[Openlanhouse-development] SF.net SVN: openlanhouse:[312] trunk/openlh-server/src/OpenlhServer
Status: Pre-Alpha
Brought to you by:
n3rd3x
|
From: <n3...@us...> - 2008-10-20 15:46:57
|
Revision: 312
http://openlanhouse.svn.sourceforge.net/openlanhouse/?rev=312&view=rev
Author: n3rd3x
Date: 2008-10-20 15:46:50 +0000 (Mon, 20 Oct 2008)
Log Message:
-----------
openlh-server/src/OpenlhServer/certgen: This file is removed
Modified Paths:
--------------
trunk/openlh-server/src/OpenlhServer/Makefile.am
trunk/openlh-server/src/OpenlhServer/__init__.py
Removed Paths:
-------------
trunk/openlh-server/src/OpenlhServer/certgen.py
Modified: trunk/openlh-server/src/OpenlhServer/Makefile.am
===================================================================
--- trunk/openlh-server/src/OpenlhServer/Makefile.am 2008-10-20 15:45:01 UTC (rev 311)
+++ trunk/openlh-server/src/OpenlhServer/Makefile.am 2008-10-20 15:46:50 UTC (rev 312)
@@ -3,7 +3,6 @@
openlhdir = $(pythondir)/OpenlhServer
openlh_PYTHON = \
__init__.py \
- certgen.py \
daemon.py \
globals.py \
g_timer.py \
Modified: trunk/openlh-server/src/OpenlhServer/__init__.py
===================================================================
--- trunk/openlh-server/src/OpenlhServer/__init__.py 2008-10-20 15:45:01 UTC (rev 311)
+++ trunk/openlh-server/src/OpenlhServer/__init__.py 2008-10-20 15:46:50 UTC (rev 312)
@@ -17,4 +17,4 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
__all__ = ('daemon', 'globals', 'ui', 'db', 'g_timer',
- 'utils', 'certgen', 'config', 'plugins')
+ 'utils', 'config', 'plugins')
Deleted: trunk/openlh-server/src/OpenlhServer/certgen.py
===================================================================
--- trunk/openlh-server/src/OpenlhServer/certgen.py 2008-10-20 15:45:01 UTC (rev 311)
+++ trunk/openlh-server/src/OpenlhServer/certgen.py 2008-10-20 15:46:50 UTC (rev 312)
@@ -1,84 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2008 Wilson Pinto Júnior (N3RD3X) <n3...@gu...>
-# Copyright (C) 2008 Gabriel Falcão <ga...@na...>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-import sys
-import os
-
-TYPE_RSA = 0
-TYPE_DSA = 1
-
-from OpenlhServer.utils import execute_command, is_in_path
-
-CERTTOOL_PATH = is_in_path("certtool")
-
-class CreateTemplateError(Exception): pass
-
-def generate_private_key(type=TYPE_RSA, bits=1024):
-
- print CERTTOOL_PATH
-
- cmd = [CERTTOOL_PATH, "--generate-privkey", "--bits", str(bits)]
-
- if type == TYPE_DSA:
- cmd.append('--dsa')
-
- (stdout, stderr, retval) = execute_command(cmd)
-
- if retval != 0:
- raise SystemError(stderr)
- else:
- return stdout
-
-def generate_self_signed(template_file, privkey_file):
-
- cmd = [CERTTOOL_PATH, "--template", template_file, "--generate-self-signed",
- "--load-privkey", privkey_file]
-
- (stdout, stderr, retval) = execute_command(cmd)
-
- if retval != 0:
- raise IOError(stdout)
- else:
- return stdout
-
-def create_template(organization, common_name, expiration_days, email=None,
- unit=None, locality=None, state=None, country=None):
-
- data = []
- data.append('organization = "%s"' % organization)
-
- if unit:
- data.append('unit = "%s"' % unit)
-
- if locality:
- data.append('locality = "%s"' % locality)
-
- if state:
- data.append('state = "%s"' % state)
-
- if country:
- data.append('country = %s' % country)
-
- data.append('cn = "%s"' % common_name)
- data.append('expiration_days = %d' % expiration_days)
-
- if email:
- data.append('email = "%s"' % email)
-
- return '\n'.join(data)
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|