def __init__(self, server_address): """TimeStampClient(server_address) -> timestamping client""" self.address = server_address self._interface = TimeStampInterface( config.algorithm, config.policy, os.path.sep.join([config.data_dir, config.config]), use_token=config.use_token, ca_file=config.CAfile, ca_path=config.CApath, untrusted=config.untrusted)
@author: Brian Visel <*****@*****.**> """ import os import bottle from bottle import get, put, post, request, response # route, run import config import exception from stamp import TimeStampInterface DEBUG = True interface = TimeStampInterface( config.algorithm, config.policy, os.path.sep.join([config.data_dir, config.config]), config.signer, config.passin, config.inkey, config.chain, config.use_token) @get('/') def index_get(): return "Timestamp Server" #@route('/', method='PUT') @put('/') def index_put(): return request.body.read() @post('/')