xref: /openssl/crypto/x509/v3_iobo.c (revision 25469328)
1 /*
2  * Copyright 2024 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License 2.0 (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9 
10 #include <openssl/x509v3.h>
11 #include "ext_dat.h"
12 
i2r_ISSUED_ON_BEHALF_OF(X509V3_EXT_METHOD * method,GENERAL_NAME * gn,BIO * out,int indent)13 static int i2r_ISSUED_ON_BEHALF_OF(X509V3_EXT_METHOD *method,
14                                    GENERAL_NAME *gn, BIO *out,
15                                    int indent)
16 {
17     if (BIO_printf(out, "%*s", indent, "") <= 0)
18         return 0;
19     if (GENERAL_NAME_print(out, gn) <= 0)
20         return 0;
21     return BIO_puts(out, "\n") > 0;
22 }
23 
24 const X509V3_EXT_METHOD ossl_v3_issued_on_behalf_of = {
25     NID_issued_on_behalf_of, 0, ASN1_ITEM_ref(GENERAL_NAME),
26     0, 0, 0, 0,
27     0, 0,
28     0, 0,
29     (X509V3_EXT_I2R)i2r_ISSUED_ON_BEHALF_OF,
30     0,
31     NULL
32 };
33