#include <sys/types.h>
#ifndef LDID_NOSMIME
-#include <openssl/provider.h>
+#include <openssl/opensslv.h>
+# if OPENSSL_VERSION_NUMBER >= 0x30000000
+# include <openssl/provider.h>
+# endif
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/pkcs7.h>
#define _scope(function) \
_scope_(__COUNTER__, function)
-#define CPU_ARCH_MASK uint32_t(0xff000000)
-#define CPU_ARCH_ABI64 uint32_t(0x01000000)
+#define CPU_ARCH_MASK uint32_t(0xff000000)
+#define CPU_ARCH_ABI64 uint32_t(0x01000000)
+#define CPU_ARCH_ABI64_32 uint32_t(0x02000000)
#define CPU_TYPE_ANY uint32_t(-1)
#define CPU_TYPE_VAX uint32_t( 1)
#define CPU_TYPE_ARM64 (CPU_ARCH_ABI64 | CPU_TYPE_ARM)
#define CPU_TYPE_POWERPC64 (CPU_ARCH_ABI64 | CPU_TYPE_POWERPC)
#define CPU_TYPE_X86_64 (CPU_ARCH_ABI64 | CPU_TYPE_X86)
+#define CPU_TYPE_ARM64_32 (CPU_TYPE_ARM | CPU_ARCH_ABI64_32)
struct fat_header {
uint32_t magic;
static std::vector<Algorithm *> algorithms;
if (algorithms.empty()) {
- if (do_sha1)
- algorithms.push_back(&sha1);
if (do_sha256)
algorithms.push_back(&sha256);
+ if (do_sha1)
+ algorithms.push_back(&sha1);
}
return algorithms;
break;
case CPU_TYPE_ARM:
case CPU_TYPE_ARM64:
+ case CPU_TYPE_ARM64_32:
align = 0xe;
break;
default:
case CPU_TYPE_ARM64:
arch = "arm64";
break;
+ case CPU_TYPE_ARM64_32:
+ arch = "arm64_32";
+ break;
}
offset = Align(offset, 1 << align);
int main(int argc, char *argv[]) {
#ifndef LDID_NOSMIME
OpenSSL_add_all_algorithms();
+# if OPENSSL_VERSION_NUMBER >= 0x30000000
OSSL_PROVIDER *legacy = OSSL_PROVIDER_load(NULL, "legacy");
OSSL_PROVIDER *deflt = OSSL_PROVIDER_load(NULL, "default");
+# endif
#endif
union {
}
#ifndef LDID_NOSMINE
+# if OPENSSL_VERSION_NUM >= 0x30000000
OSSL_PROVIDER_unload(legacy);
OSSL_PROVIDER_unload(deflt);
+# endif
#endif
return filee;