Sets specified engine  as default for all
    algorithms, supported by it

    For compatibility with 0.2.x if string is passed instead
    of engine, attempts to load engine with this id

def set_default(eng, algorithms=0xFFFF):
    """
    Sets specified engine  as default for all
    algorithms, supported by it

    For compatibility with 0.2.x if string is passed instead
    of engine, attempts to load engine with this id
    """
    if not isinstance(eng,Engine):
        eng=Engine(eng)
    global default
    libcrypto.ENGINE_set_default(eng.ptr, c_int(algorithms))
    default = eng