freebsd-src/sys/crypto/openssl/ossl_aarch64.h
Mark Johnston e655cc70df ossl: Move arm_arch.h to a common subdirectory
OpenSSL itself keeps only a single copy of this header.  Do the same in
sys/crypto/openssl to avoid the extra maintenance burden.  This requires
adjusting the include paths for generated asm files.

No functional change intended.

Reported by:	jrtc27
Reviewed by:	jhb
MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D42866
2023-12-04 12:29:11 -05:00

32 lines
925 B
C

/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#ifndef __OSSL_AARCH64__
#define __OSSL_AARCH64__
#include <crypto/openssl/ossl.h>
#include <crypto/openssl/ossl_cipher.h>
#include <crypto/openssl/arm_arch.h>
/* aesv8-armx.S */
ossl_cipher_encrypt_t aes_v8_cbc_encrypt;
/* vpaes-armv8.S */
ossl_cipher_encrypt_t vpaes_cbc_encrypt;
static void
AES_CBC_ENCRYPT(const unsigned char *in, unsigned char *out,
size_t length, const void *key, unsigned char *iv, int encrypt)
{
if (OPENSSL_armcap_P & ARMV8_AES)
aes_v8_cbc_encrypt(in, out, length, key, iv, encrypt);
else
vpaes_cbc_encrypt(in, out, length, key, iv, encrypt);
}
#endif