X509at_get_attr_by_NID

Find the next attribute in a stack with the given NID.

Synopsis

Declared in <openssl/x509.h>

int
X509at_get_attr_by_NID(
    stack_st_X509_ATTRIBUTE const* x,
    int nid,
    int lastpos);

Return Value

Attribute index, -1 if not found, or -2 if nid is unknown to OpenSSL.

Parameters

NameDescription
xStack of X509_ATTRIBUTE to search; may be NULL.
nidAttribute type NID (see openssl/obj_mac.h).
lastposIndex after which to continue searching (-1 to start from the beginning).