1e1051a39Sopenharmony_ci/*
2e1051a39Sopenharmony_ci * Copyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved.
3e1051a39Sopenharmony_ci *
4e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License").  You may not use
5e1051a39Sopenharmony_ci * this file except in compliance with the License.  You can obtain a copy
6e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at
7e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html
8e1051a39Sopenharmony_ci */
9e1051a39Sopenharmony_ci
10e1051a39Sopenharmony_ci/*
11e1051a39Sopenharmony_ci * Options are shared by apps (see apps.h) and the test system
12e1051a39Sopenharmony_ci * (see test/testutil.h').
13e1051a39Sopenharmony_ci * In order to remove the dependency between apps and options, the following
14e1051a39Sopenharmony_ci * shared fields have been moved into this file.
15e1051a39Sopenharmony_ci */
16e1051a39Sopenharmony_ci
17e1051a39Sopenharmony_ci#ifndef OSSL_APPS_FMT_H
18e1051a39Sopenharmony_ci#define OSSL_APPS_FMT_H
19e1051a39Sopenharmony_ci
20e1051a39Sopenharmony_ci/*
21e1051a39Sopenharmony_ci * On some platforms, it's important to distinguish between text and binary
22e1051a39Sopenharmony_ci * files.  On some, there might even be specific file formats for different
23e1051a39Sopenharmony_ci * contents.  The FORMAT_xxx macros are meant to express an intent with the
24e1051a39Sopenharmony_ci * file being read or created.
25e1051a39Sopenharmony_ci */
26e1051a39Sopenharmony_ci# define B_FORMAT_TEXT   0x8000
27e1051a39Sopenharmony_ci# define FORMAT_UNDEF    0
28e1051a39Sopenharmony_ci# define FORMAT_TEXT    (1 | B_FORMAT_TEXT)     /* Generic text */
29e1051a39Sopenharmony_ci# define FORMAT_BINARY   2                      /* Generic binary */
30e1051a39Sopenharmony_ci# define FORMAT_BASE64  (3 | B_FORMAT_TEXT)     /* Base64 */
31e1051a39Sopenharmony_ci# define FORMAT_ASN1     4                      /* ASN.1/DER */
32e1051a39Sopenharmony_ci# define FORMAT_PEM     (5 | B_FORMAT_TEXT)
33e1051a39Sopenharmony_ci# define FORMAT_PKCS12   6
34e1051a39Sopenharmony_ci# define FORMAT_SMIME   (7 | B_FORMAT_TEXT)
35e1051a39Sopenharmony_ci# define FORMAT_ENGINE   8                      /* Not really a file format */
36e1051a39Sopenharmony_ci# define FORMAT_PEMRSA  (9 | B_FORMAT_TEXT)     /* PEM RSAPublicKey format */
37e1051a39Sopenharmony_ci# define FORMAT_ASN1RSA  10                     /* DER RSAPublicKey format */
38e1051a39Sopenharmony_ci# define FORMAT_MSBLOB   11                     /* MS Key blob format */
39e1051a39Sopenharmony_ci# define FORMAT_PVK      12                     /* MS PVK file format */
40e1051a39Sopenharmony_ci# define FORMAT_HTTP     13                     /* Download using HTTP */
41e1051a39Sopenharmony_ci# define FORMAT_NSS      14                     /* NSS keylog format */
42e1051a39Sopenharmony_ci
43e1051a39Sopenharmony_ciint FMT_istext(int format);
44e1051a39Sopenharmony_ci
45e1051a39Sopenharmony_ci#endif /* OSSL_APPS_FMT_H_ */
46