]>
Commit | Line | Data |
---|---|---|
39037602 A |
1 | /* |
2 | * cc_abort.c | |
3 | * corecrypto | |
4 | * | |
5 | * Created on 7/16/2015 | |
6 | * | |
7 | * Copyright (c) 2014,2015 Apple Inc. All rights reserved. | |
8 | * | |
9 | */ | |
10 | ||
11 | #include <corecrypto/cc_priv.h> | |
12 | ||
13 | //cc_abort() is implemented to comply with by FIPS 140-2, when DRBG produces | |
14 | //two equal consecutive blocks. See radar 19129408 | |
15 | ||
16 | #if CC_KERNEL | |
17 | #include <kern/debug.h> | |
18 | void cc_abort(const char * msg CC_UNUSED , ...) | |
19 | { | |
20 | panic(msg); | |
21 | } | |
22 | ||
23 | #elif CC_USE_SEPROM || CC_USE_S3 || CC_BASEBAND || CC_EFI || CC_IBOOT | |
24 | void cc_abort(const char * msg CC_UNUSED, ...) | |
25 | { | |
26 | //do nothing and return becasue we don't have panic() in those | |
27 | //environments | |
28 | } | |
29 | ||
30 | #else | |
31 | #include <stdlib.h> | |
32 | void cc_abort(const char * msg CC_UNUSED, ...) | |
33 | { | |
34 | abort(); | |
35 | } | |
36 | #endif |