#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import struct
sys.exit(1)
print 'Auditing %s...' % fn
# First, parse the audit file into a series of related
#
# 1. PEM file with certificate chain
# 2. Individual SCT files
#
# Next, for each SCT, invoke verify_single_proof to verify.
offset = 0
print 'Got package from server...'
offset += 2
offset += 2
offset += 2
# at least one certificate
# for each certificate:
offset += 2
offset += 3
# at least one SCT
# for each SCT:
offset += 2
offset += 2
print ' Log id: %s' % log_id_hex
print ' Timestamp: %s' % timestamp_ms
# If we ever need the full SCT: sct = (offset, sct_size)
print ' (SCTs already checked)'
continue
log_url_arg = ''
if cur:
stmt = 'SELECT * FROM loginfo WHERE log_id = ?'
# verify_single_proof doesn't accept <scheme>://
print ' Log URL: ' + log_url
cmd = 'verify_single_proof.py --cert %s --timestamp %s %s' % \
(tmp_leaf_pem[1], timestamp_ms, log_url_arg)
print '>%s<' % cmd
usage()
tmp = '/tmp'
else:
# could serialize this between runs to further limit duplicate checking
if __name__ == "__main__":
main()