v3_pci.c revision 9dc0df1bac950d6e491f9a7c7e4888f2b301cb15
/* v3_pci.c -*- mode:C; c-file-style: "eay" -*- */
/* Contributed to the OpenSSL Project 2004
* by Richard Levitte (richard@levitte.org)
*/
/* Copyright (c) 2004 Kungliga Tekniska H�gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
*
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <stdio.h>
#include "cryptlib.h"
0,0,0,0,
0,0,
NULL,
};
{
if (pci->pcPathLengthConstraint)
else
return 1;
}
{
int free_policy = 0;
{
if (*language)
{
return 0;
}
{
return 0;
}
}
{
if (*pathlen)
{
return 0;
}
{
return 0;
}
}
{
long val_len;
if (!*policy)
{
*policy = ASN1_OCTET_STRING_new();
if (!*policy)
{
return 0;
}
free_policy = 1;
}
{
unsigned char *tmp_data2 =
if (tmp_data)
{
}
}
{
unsigned char buf[2048];
int n;
if (!b)
{
goto err;
}
|| (n == 0 && BIO_should_retry(b)))
{
if (!n) continue;
if (!tmp_data)
break;
buf, n);
}
if (n < 0)
{
goto err;
}
}
{
if (tmp_data)
{
}
}
else
{
goto err;
}
if (!tmp_data)
{
goto err;
}
}
return 1;
err:
if (free_policy)
{
}
return 0;
}
{
int i, j;
for (i = 0; i < sk_CONF_VALUE_num(vals); i++)
{
{
goto err;
}
{
int success_p = 1;
if (!sect)
{
goto err;
}
{
}
if (!success_p)
goto err;
}
else
{
if (!process_pci_value(cnf,
{
goto err;
}
}
}
/* Language is mandatory */
if (!language)
{
goto err;
}
i = OBJ_obj2nid(language);
{
goto err;
}
if (!pci)
{
goto err;
}
if (!pci->proxyPolicy)
{
goto err;
}
goto end;
err:
{
}
end:
return pci;
}