chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR ISC
#include <openssl/rand.h>
#include "internal.h"
#if defined(OPENSSL_RAND_CCRANDOMGENERATEBYTES)
#include <CommonCrypto/CommonRandom.h>
#include <stdio.h>
#include <stdlib.h>
void CRYPTO_sysrand(uint8_t *out, size_t requested) {
if (requested == 0) {
return;
}
// To get system randomness on iOS we use |CCRandomGenerateBytes|. On MacOS we
// use |getentropy| but iOS doesn't expose that.
if (CCRandomGenerateBytes(out, requested) != kCCSuccess) {
fprintf(stderr, "CCRandomGenerateBytes failed.\n");
abort();
}
}
#endif