1N/A# Licensed to the Apache Software Foundation (ASF) under one or more 1N/A# contributor license agreements. See the NOTICE file distributed with 1N/A# this work for additional information regarding copyright ownership. 1N/A# The ASF licenses this file to You under the Apache License, Version 2.0 1N/A# (the "License"); you may not use this file except in compliance with 1N/A# the License. You may obtain a copy of the License at 1N/A# Unless required by applicable law or agreed to in writing, software 1N/A# distributed under the License is distributed on an "AS IS" BASIS, 1N/A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1N/A# See the License for the specific language governing permissions and 1N/A# limitations under the License. + 'id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, ' + 'public_key TEXT, ' # path to PEM-encoded file + 'distrusted INTEGER, ' # non-zero if not trusted + 'min_valid_timestamp INTEGER, ' + 'max_valid_timestamp INTEGER, ' print >>
sys.stderr,
'A record id was not provided' stmt =
'SELECT * FROM loginfo WHERE id = ?' print >>
sys.stderr,
'The log id is not formatted properly' print >>
sys.stderr,
'A public key file was not provided' print >>
sys.stderr,
'A timestamp was not provided' print >>
sys.stderr,
'The timestamp "%s" is invalid' % t
stmt =
'INSERT INTO loginfo (public_key) VALUES(?)' stmt =
'UPDATE loginfo SET public_key = ? WHERE id = ?' # can't specify more than one of record-id and log-id stmt =
'UPDATE loginfo SET url = ? WHERE id = ?' stmt =
'INSERT INTO loginfo (log_id, url) VALUES(?, ?)' stmt =
'INSERT INTO loginfo (url) VALUES(?)' stmt =
'DELETE FROM loginfo WHERE id = ?' stmt =
'DELETE FROM loginfo WHERE log_id = ?' # could take a record id or a log id stmt =
'INSERT INTO loginfo (log_id, distrusted) VALUES(?, ?)' stmt =
'UPDATE loginfo SET distrusted = ? WHERE id = ?' # could take a record id or a log id stmt =
'INSERT INTO loginfo ' + \
'(log_id, min_valid_timestamp, max_valid_timestamp) ' + \
stmt =
'UPDATE loginfo SET min_valid_timestamp = ?, ' + \
'max_valid_timestamp = ? WHERE id = ?' stmt =
'SELECT * FROM loginfo' print ' Public key file: ' + \
print ' Time range : ' +
mint +
' to ' +
maxt display config-db contents: configure min and/or max valid timestamps: valid-time-range log-id|record-id min-range max-range mark log as trusted (default): distrust log-id|record-id remove log config from config-db: log-id is a 64-character hex string representation of a log id record-id references an existing entry and is in the form: (displayable with the dump command)