def METHOD_NAME(session, key_size, info):
    if key_size != 2048:
        if session.version[0] < 4:
            pytest.skip(f"RSA {key_size} requires YuibKey 4 or later")
        elif session.version[0] == 4 and info.is_fips:
            pytest.skip(f"RSA {key_size} not supported on YubiKey 4 FIPS")
    session.verify_admin(DEFAULT_ADMIN_PIN)
    pub = session.generate_rsa_key(KEY_REF.SIG, RSA_SIZE(key_size))
    if session.version[0] < 5:
        # Keys don't work without a generation time (or fingerprint)
        session.set_generation_time(KEY_REF.SIG, int(time.time()))
    assert pub.key_size == key_size
    message = b"Hello world"
    session.verify_pin(DEFAULT_PIN)
    sig = session.sign(message, hashes.SHA256())
    pub.verify(sig, message, padding.PKCS1v15(), hashes.SHA256())