def METHOD_NAME(op):
    """
    Copies the key and the certificate to /etc/cups/ssl if both
    are in different dirs, or sets ServerKeychain value to the dir
    where the key and the certificate are. Removes old directives
    :param list directives: list of wanted directives
    :param obj op: file operations object
    """
    try:
        lines = op.readlines(CUPSFILES_CONF)
    except IOError as error:
        raise IOError(error)
    certkey_values = []
    for line in lines:
        for name in ['ServerKey', 'ServerCertificate']:
            if line.lstrip().startswith(name):
                value = line.split()[1]
                if value.startswith('ssl'):
                    value = os.path.join('/etc/cups', value)
                certkey_values.append(value)
                lines[lines.index(line)] = ''
    op.write(CUPSFILES_CONF, 'w', lines)
    # we need to decide whether we copy the files to /etc/cups/ssl
    # or set ServerKeychain to non-default directory or do nothing
    if all(os.path.dirname(val) == '/etc/cups/ssl' for val in certkey_values):
        return
    # Check that all files are inside the same directory
    if len(set([os.path.dirname(certkey) for certkey in certkey_values])) == 1:
        path = os.path.dirname(certkey_values[0])
        op.write(CUPSFILES_CONF, 'a',
                 '\n# added by Leapp\nServerKeychain {}\n'.format(path))
    else:
        for value in certkey_values:
            if not os.path.dirname(value) == '/etc/cups/ssl':
                op.copy_to_ssl(value)