xref: /third_party/openssl/crypto/x509/v3_pcia.c (revision e1051a39)
1e1051a39Sopenharmony_ci/*
2e1051a39Sopenharmony_ci * Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved.
3e1051a39Sopenharmony_ci *
4e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License").  You may not use
5e1051a39Sopenharmony_ci * this file except in compliance with the License.  You can obtain a copy
6e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at
7e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html
8e1051a39Sopenharmony_ci */
9e1051a39Sopenharmony_ci
10e1051a39Sopenharmony_ci/*
11e1051a39Sopenharmony_ci * This file is dual-licensed and is also available under the following
12e1051a39Sopenharmony_ci * terms:
13e1051a39Sopenharmony_ci *
14e1051a39Sopenharmony_ci * Copyright (c) 2004 Kungliga Tekniska Högskolan
15e1051a39Sopenharmony_ci * (Royal Institute of Technology, Stockholm, Sweden).
16e1051a39Sopenharmony_ci * All rights reserved.
17e1051a39Sopenharmony_ci *
18e1051a39Sopenharmony_ci * Redistribution and use in source and binary forms, with or without
19e1051a39Sopenharmony_ci * modification, are permitted provided that the following conditions
20e1051a39Sopenharmony_ci * are met:
21e1051a39Sopenharmony_ci *
22e1051a39Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright
23e1051a39Sopenharmony_ci *    notice, this list of conditions and the following disclaimer.
24e1051a39Sopenharmony_ci *
25e1051a39Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright
26e1051a39Sopenharmony_ci *    notice, this list of conditions and the following disclaimer in the
27e1051a39Sopenharmony_ci *    documentation and/or other materials provided with the distribution.
28e1051a39Sopenharmony_ci *
29e1051a39Sopenharmony_ci * 3. Neither the name of the Institute nor the names of its contributors
30e1051a39Sopenharmony_ci *    may be used to endorse or promote products derived from this software
31e1051a39Sopenharmony_ci *    without specific prior written permission.
32e1051a39Sopenharmony_ci *
33e1051a39Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
34e1051a39Sopenharmony_ci * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35e1051a39Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36e1051a39Sopenharmony_ci * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
37e1051a39Sopenharmony_ci * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38e1051a39Sopenharmony_ci * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39e1051a39Sopenharmony_ci * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40e1051a39Sopenharmony_ci * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41e1051a39Sopenharmony_ci * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42e1051a39Sopenharmony_ci * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43e1051a39Sopenharmony_ci * SUCH DAMAGE.
44e1051a39Sopenharmony_ci */
45e1051a39Sopenharmony_ci
46e1051a39Sopenharmony_ci#include <openssl/asn1.h>
47e1051a39Sopenharmony_ci#include <openssl/asn1t.h>
48e1051a39Sopenharmony_ci#include <openssl/x509v3.h>
49e1051a39Sopenharmony_ci
50e1051a39Sopenharmony_ciASN1_SEQUENCE(PROXY_POLICY) =
51e1051a39Sopenharmony_ci        {
52e1051a39Sopenharmony_ci        ASN1_SIMPLE(PROXY_POLICY,policyLanguage,ASN1_OBJECT),
53e1051a39Sopenharmony_ci        ASN1_OPT(PROXY_POLICY,policy,ASN1_OCTET_STRING)
54e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(PROXY_POLICY)
55e1051a39Sopenharmony_ci
56e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(PROXY_POLICY)
57e1051a39Sopenharmony_ci
58e1051a39Sopenharmony_ciASN1_SEQUENCE(PROXY_CERT_INFO_EXTENSION) =
59e1051a39Sopenharmony_ci        {
60e1051a39Sopenharmony_ci        ASN1_OPT(PROXY_CERT_INFO_EXTENSION,pcPathLengthConstraint,ASN1_INTEGER),
61e1051a39Sopenharmony_ci        ASN1_SIMPLE(PROXY_CERT_INFO_EXTENSION,proxyPolicy,PROXY_POLICY)
62e1051a39Sopenharmony_ci} ASN1_SEQUENCE_END(PROXY_CERT_INFO_EXTENSION)
63e1051a39Sopenharmony_ci
64e1051a39Sopenharmony_ciIMPLEMENT_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION)
65