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