001/*
002 * acme4j - Java ACME client
003 *
004 * Copyright (C) 2022 Richard "Shred" Körber
005 *   http://acme4j.shredzone.org
006 *
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
013 */
014package org.shredzone.acme4j.smime.exception;
015
016import org.shredzone.acme4j.exception.AcmeException;
017
018/**
019 * This exception is thrown when the challenge message is invalid.
020 * <p>
021 * If this exception is thrown, the challenge message does not match the actual challenge,
022 * and <em>must</em> be rejected.
023 * <p>
024 * Reasons may be:
025 * <ul>
026 *     <li>Unexpected sender address</li>
027 *     <li>Bad S/MIME signature</li>
028 * </ul>
029 *
030 * @since 2.15
031 */
032public class AcmeInvalidMessageException extends AcmeException {
033    private static final long serialVersionUID = 5607857024718309330L;
034
035    /**
036     * Creates a new {@link AcmeInvalidMessageException}.
037     *
038     * @param msg
039     *            Reason of the exception
040     */
041    public AcmeInvalidMessageException(String msg) {
042        super(msg);
043    }
044
045    /**
046     * Creates a new {@link AcmeInvalidMessageException}.
047     *
048     * @param msg
049     *            Reason of the exception
050     * @param cause
051     *            Cause
052     */
053    public AcmeInvalidMessageException(String msg, Throwable cause) {
054        super(msg, cause);
055    }
056
057}