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