c5048db24c
These headers define the context types that alternative implementations must provide. The context types are dummy types, suitable for building but not meant to be usable by an implementation. This is the output of the following script: ``` perl -0777 -ne ' m@^#if !defined\((MBEDTLS_\w+_ALT)\).*\n((?:.*\n)*?)#else.*\n#include "(.*_alt\.h)"\n#endif@m or next; $symbol = $1; $content = $2; $header = $3; $header_symbol = $header; $header_symbol =~ y/a-z./A-Z_/; m@/\*[ *\n]*Copyright .*?\*/@s or die; $copyright = $&; open OUT, ">tests/include/alt-dummy/$header" or die; $content =~ s@//.*@@mg; $content =~ s@/\*.*?\*/@@sg; $content =~ s@\{.*?\}@{\n int dummy;\n}@sg; $content =~ s@ +$@@mg; $content =~ s@\n{3,}@\n\n@g; $content =~ s@\A\n+@@; $content =~ s@\n*\Z@\n@; print OUT "/* $header with dummy types for $symbol */\n$copyright\n\n#ifndef $header_symbol\n#define $header_symbol\n\n$content\n\n#endif /* $header */\n" or die; close OUT or die; ' include/mbedtls/*.h ``` Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
29 lines
876 B
C
29 lines
876 B
C
/* chacha20_alt.h with dummy types for MBEDTLS_CHACHA20_ALT */
|
|
/*
|
|
* Copyright The Mbed TLS Contributors
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
* not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef CHACHA20_ALT_H
|
|
#define CHACHA20_ALT_H
|
|
|
|
typedef struct mbedtls_chacha20_context
|
|
{
|
|
int dummy;
|
|
}
|
|
mbedtls_chacha20_context;
|
|
|
|
|
|
#endif /* chacha20_alt.h */
|