# Type of request: This is a ...
[ ] bug report
[x] feature request

# Detailed description
As a Developer,
I want to be able to simulate BadDigest and InvalidDigest errors,
So that I can test the error handling logic

## Expected behavior
https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
BadDigest: The Content-MD5 you specified did not match what we received.
InvalidDigest: The Content-MD5 you specified is not valid.

## Actual behavior
localstack returns InvalidDigest when MD5 does not match payload.


out = run('whoami').strip()
    return out == 'root'
def cleanup_resources():
    cleanup_tmp_files()
    cleanup_threads_and_processes()
@synchronized(lock=SSL_CERT_LOCK)
def generate_ssl_cert(target_file=None, overwrite=False, random=False, return_content=False, serial_number=None):
    
    
    from OpenSSL import crypto
    def all_exist(*files):
        return all([os.path.exists(f) for f in files])
    def store_cert_key_files(base_filename):
        key_file_name = '%s.key' % base_filename
        cert_file_name = '%s.crt' % base_filename
        
        content = load_file(target_file)
        key_start = '-----BEGIN PRIVATE KEY-----'
        key_end = '-----END PRIVATE KEY-----'
        cert_start = '-----BEGIN CERTIFICATE-----'
        cert_end = '-----END CERTIFICATE-----'
        key_content = content[content.index(key_start): content.index(key_end) + len(key_end)]