# provider-object - A specification for a provider-native object abstrac... - man(7ssl) - [phpMan]

[_PROVIDER-OBJECT_(7SSL)](https://www.chedong.com/phpMan.php/man/PROVIDER-OBJECT/7SSL/markdown)                          OpenSSL                         [_PROVIDER-OBJECT_(7SSL)](https://www.chedong.com/phpMan.php/man/PROVIDER-OBJECT/7SSL/markdown)

## NAME
       provider-object - A specification for a provider-native object abstraction

## SYNOPSIS
        #include <openssl/core_object.h>
        #include <openssl/core_names.h>

## DESCRIPTION
       The provider-native object abstraction is a set of [**OSSL_PARAM**(3)](https://www.chedong.com/phpMan.php/man/OSSLPARAM/3/markdown) keys and values that can be
       used to pass provider-native objects to OpenSSL library code or between different provider
       operation implementations with the help of OpenSSL library code.

       The intention is that certain provider-native operations can pass any sort of object that
       belong with other operations, or with OpenSSL library code.

       An object may be passed in the following manners:

       1.  _By_ _value_

           This means that the _object_ _data_ is passed as an octet string or an UTF8 string, which can
           be handled in diverse ways by other provided implementations.  The encoding of the object
           depends  on  the  context  it's  used  in;  for  example, [**OSSL_DECODER**(3)](https://www.chedong.com/phpMan.php/man/OSSLDECODER/3/markdown) allows multiple
           encodings, depending on existing decoders.  If central OpenSSL library  functionality  is
           to  handle  the  data directly, it **must **be encoded in DER for all object types except for
           **OSSL_OBJECT_NAME **(see "Parameter reference" below), where it's assumed to  a  plain  UTF8
           string.

       2.  _By_ _reference_

           This  means  that  the  _object_  _data_ isn't passed directly, an _object_ _reference_ is passed
           instead.  It's an octet string that only the correct provider understands correctly.

       Objects _by_ _value_ can be used by anything that handles DER encoded objects.

       Objects _by_ _reference_ need a higher level of cooperation from  the  implementation  where  the
       object originated (let's call it X) and its target implementation (let's call it Y):

       1.  _An_ _object_ _loading_ _function_ _in_ _the_ _target_ _implementation_

           The  target  implementation  (Y)  may  have a function that can take an _object_ _reference_.
           This can only be used if the target implementation is from the same provider as  the  one
           originating the object abstraction in question (X).

           The  exact  target  implementation to use is determined from the _object_ _type_ and possibly
           the _object_ _data_  _type_.   For  example,  when  the  OpenSSL  library  receives  an  object
           abstraction  with  the  _object_ _type_ **OSSL_OBJECT_PKEY**, it will fetch a [**provider-keymgmt**(7)](https://www.chedong.com/phpMan.php/man/provider-keymgmt/7/markdown)
           using the _object_ _data_ _type_ as its key type (the second argument in [**EVP_KEYMGMT_fetch**(3)](https://www.chedong.com/phpMan.php/man/EVPKEYMGMTfetch/3/markdown)).

       2.  _An_ _object_ _exporter_ _in_ _the_ _originating_ _implementation_

           The originating implementation (X) may have an exporter function.  This exporter function
           can be used to export the object in [**OSSL_PARAM**(3)](https://www.chedong.com/phpMan.php/man/OSSLPARAM/3/markdown) form, that can then be imported by  the
           target implementation's imported function.

           This  can  be used when it's not possible to fetch the target implementation (Y) from the
           same provider.

### Parameter reference
       A provider-native object abstraction is an [**OSSL_PARAM**(3)](https://www.chedong.com/phpMan.php/man/OSSLPARAM/3/markdown) with a selection  of  the  following
       parameters:

       "data" (**OSSL_OBJECT_PARAM_DATA**) <octet string> or <UTF8 string>
           The object data _passed_ _by_ _value_.

       "reference" (**OSSL_OBJECT_PARAM_REFERENCE**) <octet string>
           The object data _passed_ _by_ _reference_.

       "type" (**OSSL_OBJECT_PARAM_TYPE**) <integer>
           The  _object_  _type_,  a  number  that  may have any of the following values (all defined in
           _<openssl/core_object.h>_):

           **OSSL_OBJECT_NAME**
               The object data may only be _passed_ _by_ _value_, and should be a UTF8 string.

               This is useful for [**provider-storemgmt**(7)](https://www.chedong.com/phpMan.php/man/provider-storemgmt/7/markdown) when a URI load results in new URIs.

           **OSSL_OBJECT_PKEY**
               The object data is suitable as provider-native **EVP_PKEY **key data.   The  object  data
               may be _passed_ _by_ _value_ or _passed_ _by_ _reference_.

           **OSSL_OBJECT_CERT**
               The  object  data is suitable as **X509 **data.  The object data for this object type can
               only be _passed_ _by_ _value_, and should be an octet string.

               Since there's no provider-native X.509 object, OpenSSL libraries  that  receive  this
               object abstraction are expected to convert the data to a **X509 **object with **d2i_X509()**.

           **OSSL_OBJECT_CRL**
               The  object data is suitable as **X509_CRL **data.  The object data can only be _passed_ _by_
               _value_, and should be an octet string.

               Since there's no provider-native X.509 CRL object,  OpenSSL  libraries  that  receive
               this  object  abstraction  are expected to convert the data to a **X509_CRL **object with
               **d2i_X509_CRL()**.

       "data-type" (**OSSL_OBJECT_PARAM_DATA_TYPE**) <UTF8 string>
           The specific type of the object content.  Legitimate values depend on the object type; if
           it is **OSSL_OBJECT_PKEY**, the data type is expected to be a key type suitable for  fetching
           a [**provider-keymgmt**(7)](https://www.chedong.com/phpMan.php/man/provider-keymgmt/7/markdown) that can handle the data.

       "data-structure" (**OSSL_OBJECT_PARAM_DATA_STRUCTURE**) <UTF8 string>
           The  outermost  structure  of the object content.  Legitimate values depend on the object
           type.

       "desc" (**OSSL_OBJECT_PARAM_DESC**) <UTF8 string>
           A human readable text that describes extra details on the object.

       When a provider-native object abstraction is used, it _must_ contain object data  in  at  least
       one  form  (object  data  _passed_  _by_  _value_,  i.e.  the "data" item, or object data _passed_ _by_
       _reference_, i.e. the "reference" item).  Both may be  present  at  once,  in  which  case  the
       OpenSSL library code that receives this will use the most optimal variant.

       For objects with the object type **OSSL_OBJECT_NAME**, that object type _must_ be given.

## SEE ALSO
       [**provider**(7)](https://www.chedong.com/phpMan.php/man/provider/7/markdown), [**OSSL_DECODER**(3)](https://www.chedong.com/phpMan.php/man/OSSLDECODER/3/markdown)

## HISTORY
       The concept of providers and everything surrounding them was introduced in OpenSSL 3.0.

## COPYRIGHT
       Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved.

       Licensed  under  the Apache License 2.0 (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>>.

3.0.13                                       2026-07-29                        [_PROVIDER-OBJECT_(7SSL)](https://www.chedong.com/phpMan.php/man/PROVIDER-OBJECT/7SSL/markdown)
