Commit e236c2a
committed
psa: Don't abort when operations are invalid
In places where we detect a context is in a bad state and there is no
sensitive data to clear, simply return PSA_ERROR_BAD_STATE and don't
abort on behalf of the application. The application will choose what to
do when it gets a bad state error.
The motivation for this change is that an application should decide what
to do when it misuses the API and encounters a PSA_ERROR_BAD_STATE
error. The library should not attempt to abort on behalf of the
application, as that may not be the correct thing to do in all
circumstances.1 parent 36ee5d0 commit e236c2a
1 file changed
+9
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2128 | 2128 | | |
2129 | 2129 | | |
2130 | 2130 | | |
2131 | | - | |
| 2131 | + | |
2132 | 2132 | | |
2133 | | - | |
| 2133 | + | |
2134 | 2134 | | |
2135 | 2135 | | |
2136 | 2136 | | |
| |||
2153 | 2153 | | |
2154 | 2154 | | |
2155 | 2155 | | |
2156 | | - | |
| 2156 | + | |
2157 | 2157 | | |
2158 | 2158 | | |
2159 | | - | |
2160 | 2159 | | |
2161 | 2160 | | |
2162 | 2161 | | |
| |||
2264 | 2263 | | |
2265 | 2264 | | |
2266 | 2265 | | |
2267 | | - | |
2268 | | - | |
| 2266 | + | |
2269 | 2267 | | |
2270 | 2268 | | |
2271 | 2269 | | |
2272 | 2270 | | |
2273 | | - | |
2274 | 2271 | | |
2275 | 2272 | | |
2276 | 2273 | | |
| |||
2298 | 2295 | | |
2299 | 2296 | | |
2300 | 2297 | | |
2301 | | - | |
2302 | | - | |
| 2298 | + | |
2303 | 2299 | | |
2304 | 2300 | | |
2305 | 2301 | | |
| |||
3028 | 3024 | | |
3029 | 3025 | | |
3030 | 3026 | | |
3031 | | - | |
3032 | | - | |
| 3027 | + | |
3033 | 3028 | | |
3034 | 3029 | | |
3035 | 3030 | | |
| |||
3061 | 3056 | | |
3062 | 3057 | | |
3063 | 3058 | | |
3064 | | - | |
3065 | | - | |
| 3059 | + | |
3066 | 3060 | | |
3067 | 3061 | | |
3068 | 3062 | | |
| |||
3136 | 3130 | | |
3137 | 3131 | | |
3138 | 3132 | | |
3139 | | - | |
3140 | | - | |
| 3133 | + | |
3141 | 3134 | | |
3142 | 3135 | | |
3143 | 3136 | | |
3144 | | - | |
3145 | | - | |
| 3137 | + | |
3146 | 3138 | | |
3147 | 3139 | | |
3148 | 3140 | | |
| |||
0 commit comments