ObjFW
Loading...
Searching...
No Matches
OFX509Certificate.h
1/*
2 * Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFObject.h"
21
22OF_ASSUME_NONNULL_BEGIN
23
24@class OFArray OF_GENERIC(ObjectType);
25@class OFIRI;
26
33{
34 OF_RESERVE_IVARS(OFX509Certificate, 4)
35}
36
37#ifdef OF_HAVE_CLASS_PROPERTIES
38@property (class, readonly, nonatomic) bool supportsPEMFiles;
39@property (class, readonly, nonatomic) bool supportsPKCS12Files;
40#endif
41
48+ (bool)supportsPEMFiles;
49
57+ (bool)supportsPKCS12Files;
58
74+ (OFArray OF_GENERIC(OFX509Certificate *) *)
75 certificateChainFromPEMFileAtIRI: (OFIRI *)certificatesIRI
76 privateKeyIRI: (nullable OFIRI *)privateKeyIRI;
77
93+ (OFArray OF_GENERIC(OFX509Certificate *) *)
94 certificateChainFromPKCS12FileAtIRI: (OFIRI *)IRI
95 passphrase: (nullable OFString *)passphrase;
96@end
97
98#ifdef __cplusplus
99extern "C" {
100#endif
108extern Class OFX509CertificateImplementation;
109#ifdef __cplusplus
110}
111#endif
112
113OF_ASSUME_NONNULL_END
An abstract class for storing objects in an array.
Definition OFArray.h:109
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition OFIRI.h:41
The root class for all other classes inside ObjFW.
Definition OFObject.h:692
A class for handling strings.
Definition OFString.h:143
An X.509 certificate, optionally with an associated private key.
Definition OFX509Certificate.h:33