ObjFW
Loading...
Searching...
No Matches
OFX509Certificate.h
1/*
2 * Copyright (c) 2008-2026 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
71+ (OFArray OF_GENERIC(OFX509Certificate *) *)
72 certificateChainFromPEMFileAtIRI: (OFIRI *)certificatesIRI
73 privateKeyIRI: (nullable OFIRI *)privateKeyIRI;
74
90+ (OFArray OF_GENERIC(OFX509Certificate *) *)
91 certificateChainFromPKCS12FileAtIRI: (OFIRI *)IRI
92 passphrase: (nullable OFString *)passphrase;
93@end
94
95#ifdef __cplusplus
96extern "C" {
97#endif
105extern Class OFX509CertificateImplementation;
106#ifdef __cplusplus
107}
108#endif
109
110OF_ASSUME_NONNULL_END
An abstract class for storing objects in an array.
Definition OFArray.h:110
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:956
A class for handling strings.
Definition OFString.h:143
An X.509 certificate, optionally with an associated private key.
Definition OFX509Certificate.h:33