1PKCS8_PKEY_ADD1_ATTR(3ossl)         OpenSSL        PKCS8_PKEY_ADD1_ATTR(3ossl)
2
3
4

NAME

6       PKCS8_pkey_get0_attrs, PKCS8_pkey_add1_attr,
7       PKCS8_pkey_add1_attr_by_NID, PKCS8_pkey_add1_attr_by_OBJ - PKCS8
8       attribute functions
9

SYNOPSIS

11        #include <openssl/x509.h>
12
13        const STACK_OF(X509_ATTRIBUTE) *
14        PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8);
15        int PKCS8_pkey_add1_attr(PKCS8_PRIV_KEY_INFO *p8, X509_ATTRIBUTE *attr);
16        int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type,
17                                        const unsigned char *bytes, int len);
18        int PKCS8_pkey_add1_attr_by_OBJ(PKCS8_PRIV_KEY_INFO *p8, const ASN1_OBJECT *obj,
19                                       int type, const unsigned char *bytes, int len);
20

DESCRIPTION

22       PKCS8_pkey_get0_attrs() returns a const STACK of X509_ATTRIBUTE present
23       in the passed const PKCS8_PRIV_KEY_INFO structure p8.
24
25       PKCS8_pkey_add1_attr() adds a constructed X509_ATTRIBUTE attr to the
26       existing PKCS8_PRIV_KEY_INFO structure p8.
27
28       PKCS8_pkey_add1_attr_by_NID() and PKCS8_pkey_add1_attr_by_OBJ()
29       construct a new X509_ATTRIBUTE from the passed arguments and add it to
30       the existing PKCS8_PRIV_KEY_INFO structure p8.
31

RETURN VALUES

33       PKCS8_pkey_add1_attr(), PKCS8_pkey_add1_attr_by_NID(), and
34       PKCS8_pkey_add1_attr_by_OBJ() return 1 for success and 0 for failure.
35

NOTES

37       STACK of X509_ATTRIBUTE is present in many X509-related structures and
38       some of them have the corresponding set of similar functions.
39

SEE ALSO

41       crypto(7)
42
44       Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
45
46       Licensed under the Apache License 2.0 (the "License").  You may not use
47       this file except in compliance with the License.  You can obtain a copy
48       in the file LICENSE in the source distribution or at
49       <https://www.openssl.org/source/license.html>.
50
51
52
533.0.5                             2022-11-01       PKCS8_PKEY_ADD1_ATTR(3ossl)
Impressum