mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-24 17:44:17 +01:00
e655cc70df
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
32 lines
925 B
C
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
|