Remove the certificate from the given certificate store.

    :param str thumbprint: The thumbprint value of the target certificate.
    :param str context: The name of the certificate store location context.
    :param str store: The name of the certificate store.

    Example of usage with only the required arguments:

    .. code-block:: yaml

        site0-cert-removed:
            win_pki.remove_cert:
                - thumbprint: 9988776655443322111000AAABBBCCCDDDEEEFFF

    Example of usage specifying all available arguments:

    .. code-block:: yaml

        site0-cert-removed:
            win_pki.remove_cert:
                - thumbprint: 9988776655443322111000AAABBBCCCDDDEEEFFF
                - context: LocalMachine
                - store: My

def remove_cert(name, thumbprint, context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE):
    '''
    Remove the certificate from the given certificate store.

    :param str thumbprint: The thumbprint value of the target certificate.
    :param str context: The name of the certificate store location context.
    :param str store: The name of the certificate store.

    Example of usage with only the required arguments:

    .. code-block:: yaml

        site0-cert-removed:
            win_pki.remove_cert:
                - thumbprint: 9988776655443322111000AAABBBCCCDDDEEEFFF

    Example of usage specifying all available arguments:

    .. code-block:: yaml

        site0-cert-removed:
            win_pki.remove_cert:
                - thumbprint: 9988776655443322111000AAABBBCCCDDDEEEFFF
                - context: LocalMachine
                - store: My
    '''
    ret = {'name': name,
           'changes': dict(),
           'comment': six.text_type(),
           'result': None}

    store_path = r'Cert:\{0}\{1}'.format(context, store)
    current_certs = __salt__['win_pki.get_certs'](context=context, store=store)

    if thumbprint not in current_certs:
        ret['comment'] = "Certificate '{0}' already removed from store: {1}".format(thumbprint,
                                                                                    store_path)
        ret['result'] = True
    elif __opts__['test']:
        ret['comment'] = "Certificate '{0}' will be removed from store: {1}".format(thumbprint,
                                                                                    store_path)
        ret['changes'] = {'old': thumbprint,
                          'new': None}
    else:
        ret['changes'] = {'old': thumbprint,
                          'new': None}
        ret['result'] = __salt__['win_pki.remove_cert'](thumbprint=thumbprint, context=context,
                                                        store=store)
        if ret['result']:
            ret['comment'] = "Certificate '{0}' removed from store: {1}".format(thumbprint, store_path)
        else:
            ret['comment'] = "Certificate '{0}' unable to be removed from store: {1}".format(thumbprint,
                                                                                             store_path)
    return ret