Ben Dennerley 958e95cf5c
Make IoT certificate ID generation deterministic and prevent duplicate certificates from being created (#3331)
* Make IoT certificate id generation deterministic

Fixes #3321

As per https://stackoverflow.com/questions/55847788/how-does-aws-iot-generate-a-certificate-id,
the IoT certificate ID is the SHA256 fingerprint of the
certificate. Since moto doesn't generate full certificates we will
instead use the SHA256 hash of the passed certificate pem.

* Don't allow duplicate IoT certificates to be created

Fixes #3320

When using boto3, trying to register a certificate that already
exists will throw a ResourceAlreadyExistsException. Moto should
follow the same pattern to allow testing error handling code in
this area.
2020-09-22 10:28:12 +01:00
..
2019-12-16 21:25:20 -05:00
2019-12-26 16:06:53 +01:00
2020-04-06 19:55:54 +10:00
2019-12-16 21:25:20 -05:00
2020-03-06 18:11:07 -03:00
2020-07-19 10:00:24 +01:00
2020-01-23 10:15:02 -08:00
2020-03-02 13:07:34 +00:00
2020-01-23 10:15:02 -08:00