Changeset 110 for trunk


Ignore:
Timestamp:
07/22/16 21:41:13 (8 years ago)
Author:
tim
Message:

randomizing serial number since some browsers don't like repeats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bletchley/ssltls.py

    r109 r110  
    2121import argparse
    2222import traceback
     23import random
    2324import socket
    2425try:
     
    196197
    197198
     199def randomizeSerialNumber(certificate):
     200    certificate.set_serial_number(random.randint(0,2**64))
     201   
    198202def genFakeCertificateChain(cert_chain):
    199203    ret_val = []
     
    209213    c.set_pubkey(k)
    210214    removePeskyExtensions(c)
     215    randomizeSerialNumber(c)
    211216    c.sign(k, getDigestAlgorithm(c))
    212217    ret_val.append(c)
     
    217222        c.set_pubkey(k)
    218223        removePeskyExtensions(c)
     224        randomizeSerialNumber(c)
    219225        c.sign(prev, getDigestAlgorithm(c))
    220226        prev = k
Note: See TracChangeset for help on using the changeset viewer.