openssl-1.1.1l fails to build in macOS 10.13.6 with Xcode 10.1

Scott Lasley selasley at icloud.com
Fri Aug 27 17:34:21 UTC 2021


Building openssl-1.1.1l with Xcode 10.1 under macOS 10.13.6 fails with this error 


In file included from crypto/rand/rand_unix.c:38:
/usr/include/CommonCrypto/CommonRandom.h:35:9: error: unknown type name 'CCCryptorStatus'
typedef CCCryptorStatus CCRNGStatus;
       ^
crypto/rand/rand_unix.c:385:47: error: use of undeclared identifier 'kCCSuccess'
   if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
                                             ^
2 errors generated.
make[1]: *** [crypto/rand/rand_unix.o] Error 1




The build succeeds and all tests pass if CommonCryptoError.h is added to the __APPLE__ includes in crypto/rand/rand_unix.c

#if defined(__APPLE__)
# include <CommonCrypto/CommonCryptoError.h>
# include <CommonCrypto/CommonRandom.h>
#endif

Is this a safe change to make?

Best regards,
Scott


More information about the openssl-users mailing list