summaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Expand)Author
2017-03-06drm: Fix compilation error when CONFIG_DEBUG_FS is undefinedSean Paul
2017-03-06drm/bridge: analogix_dp: add helpers for capture of frame CRCsTomeu Vizoso
2017-03-06drm/dp: add helpers for capture of frame CRCsTomeu Vizoso
2017-03-06drm/dp: add crtc backpointer to drm_dp_auxTomeu Vizoso
2017-03-06drm/atomic: Add macros to access existing old/new state, v2.Maarten Lankhorst
2017-03-06drm/atomic: Make drm_atomic_plane_disabling easier to understand.Maarten Lankhorst
2017-03-02drm/fb-helper: implement ioctl FBIO_WAITFORVSYNCMaxime Ripard
2017-03-01drm: Fix the kernel doc warning for drm_link_statusManasi Navare
2017-02-28drm: Rename connector list iterator APIThierry Reding
2017-02-28drm: Introduce drm_property_blob_{get,put}()Thierry Reding
2017-02-28drm: Introduce drm_gem_object_{get,put}()Thierry Reding
2017-02-28drm: Introduce drm_framebuffer_{get,put}()Thierry Reding
2017-02-28drm: Introduce drm_connector_{get,put}()Thierry Reding
2017-02-28drm: Introduce drm_mode_object_{get,put}()Thierry Reding
2017-02-27of: add devm_ functions for populate and depopulateBenjamin Gaignard
2017-02-27drm: Add a new connector atomic property for link statusManasi Navare
2017-02-27drm/doc: Fix up some kms function namesArchit Taneja
2017-02-26dma-buf/reservation: Wrap ww_mutex_trylockChris Wilson
2017-02-26drm: drm_printer: add __printf validationJoe Perches
2017-02-26Merge airlied/drm-next into drm-misc-nextDaniel Vetter
2017-02-24drm/tinydrm: helpers: Properly fix backlight dependencyNoralf Trønnes
2017-02-24Merge tag 'drm/panel/for-4.11-rc1' of git://anongit.freedesktop.org/tegra/lin...Dave Airlie
2017-02-23Merge tag 'v4.10-rc8' into drm-nextDave Airlie
2017-02-21drm: move edid property update and add modes out of edid firmware loaderJani Nikula
2017-02-18drm/tinydrm: Add support for Multi-Inno MI0283QT displayNoralf Trønnes
2017-02-18drm/tinydrm: Add MIPI DBI supportNoralf Trønnes
2017-02-18drm/tinydrm: Add helper functionsNoralf Trønnes
2017-02-18drm: Add DRM support for tiny LCD displaysNoralf Trønnes
2017-02-17Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux int...Dave Airlie
2017-02-16drm/ttm: make TTM_MAX_BO_PRIORITY unsignedNicolai Hähnle
2017-02-14uapi: add missing install of dma-buf.hDenys Dmytriyenko
2017-02-14drm/atomic: Add new iterators over all state, v3.Maarten Lankhorst
2017-02-12drm: Constify drm_mode_config atomic helper private pointerLaurent Pinchart
2017-02-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds
2017-02-10Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledfo...Linus Torvalds
2017-02-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds
2017-02-08cpumask: use nr_cpumask_bits for parsing functionsTejun Heo
2017-02-08mm: avoid returning VM_FAULT_RETRY from ->page_mkwrite handlersJan Kara
2017-02-08net: introduce device min_header_lenWillem de Bruijn
2017-02-08lwtunnel: valid encap attr check should return 0 when lwtunnel is disabledDavid Ahern
2017-02-08RDMA: Don't reference kernel private header from UAPI headerLeon Romanovsky
2017-02-08target: Fix multi-session dynamic se_node_acl double free OOPsNicholas Bellinger
2017-02-08Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/g...Dave Airlie
2017-02-07drm: unexport function drm_vblank_no_hw_counter()Shawn Guo
2017-02-07drm: add vblank hooks to struct drm_crtc_funcsShawn Guo
2017-02-07drm/fb-helper: Automatically clean up fb_infoDaniel Vetter
2017-02-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds
2017-02-07udp: properly cope with csum errorsEric Dumazet
2017-02-07drm/exynos/decon5433: signal vblank only on odd fieldsAndrzej Hajda
2017-02-07drm/exynos/decon5433: add support for interlace modesAndrzej Hajda
ighlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the OpenSSL license (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
 * in the file LICENSE in the source distribution or at
 * https://www.openssl.org/source/license.html
 */

#include <openssl/asn1t.h>
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/err.h>
#include <openssl/cms.h>
#include "cms_lcl.h"

/* CMS SignedData Attribute utilities */

int CMS_signed_get_attr_count(const CMS_SignerInfo *si)
{
    return X509at_get_attr_count(si->signedAttrs);
}

int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos)
{
    return X509at_get_attr_by_NID(si->signedAttrs, nid, lastpos);
}

int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
                               int lastpos)
{
    return X509at_get_attr_by_OBJ(si->signedAttrs, obj, lastpos);
}

X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc)
{
    return X509at_get_attr(si->signedAttrs, loc);
}

X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc)
{
    return X509at_delete_attr(si->signedAttrs, loc);
}

int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr)
{
    if (X509at_add1_attr(&si->signedAttrs, attr))
        return 1;
    return 0;
}

int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
                                const ASN1_OBJECT *obj, int type,
                                const void *bytes, int len)
{
    if (X509at_add1_attr_by_OBJ(&si->signedAttrs, obj, type, bytes, len))
        return 1;
    return 0;
}

int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
                                int nid, int type, const void *bytes, int len)
{
    if (X509at_add1_attr_by_NID(&si->signedAttrs, nid, type, bytes, len))
        return 1;
    return 0;
}

int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
                                const char *attrname, int type,
                                const void *bytes, int len)
{
    if (X509at_add1_attr_by_txt(&si->signedAttrs, attrname, type, bytes, len))
        return 1;
    return 0;
}

void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid,
                                  int lastpos, int type)
{
    return X509at_get0_data_by_OBJ(si->signedAttrs, oid, lastpos, type);
}

int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si)
{
    return X509at_get_attr_count(si->unsignedAttrs);
}

int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
                                 int lastpos)
{
    return X509at_get_attr_by_NID(si->unsignedAttrs, nid, lastpos);
}

int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
                                 const ASN1_OBJECT *obj, int lastpos)
{
    return X509at_get_attr_by_OBJ(si->unsignedAttrs, obj, lastpos);
}

X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc)
{
    return X509at_get_attr(si->unsignedAttrs, loc);
}

X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc)
{
    return X509at_delete_attr(si->unsignedAttrs, loc);
}

int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr)
{
    if (X509at_add1_attr(&si->unsignedAttrs, attr))
        return 1;
    return 0;
}

int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
                                  const ASN1_OBJECT *obj, int type,
                                  const void *bytes, int len)
{
    if (X509at_add1_attr_by_OBJ(&si->unsignedAttrs, obj, type, bytes, len))
        return 1;
    return 0;
}

int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
                                  int nid, int type,
                                  const void *bytes, int len)
{
    if (X509at_add1_attr_by_NID(&si->unsignedAttrs, nid, type, bytes, len))
        return 1;
    return 0;
}

int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
                                  const char *attrname, int type,
                                  const void *bytes, int len)
{
    if (X509at_add1_attr_by_txt(&si->unsignedAttrs, attrname,
                                type, bytes, len))
        return 1;
    return 0;
}

void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
                                    int lastpos, int type)
{
    return X509at_get0_data_by_OBJ(si->unsignedAttrs, oid, lastpos, type);
}

/* Specific attribute cases */