Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
NAMEcrypto — OpenSSL cryptographic library
DESCRIPTIONThe OpenSSL crypto library implements a wide range of cryptographic algorithms used in various Internet standards. The services provided by this library are used by the OpenSSL implementations of TLS and S/MIME, and they have also been used to implement SSH, OpenPGP, and other cryptographic standards.
- configuration file handling: see OPENSSL_config(3)
- error reporting: see ERR(3)
NAMING CONVENTIONSElements used in the names of API functions include the following:
- See “set0” below.
- See “set1” below.
- basic input and/or output abstraction: The function manipulates objects of the idiosyncratic OpenSSL BIO object type. See BIO_new(3).
- The function uses a BIO object for input or output. In many cases, simpler variants of the function are available that operate directly on <stdio.h> FILE objects or directly in RAM, usually using byte arrays.
- filter BIO: The function returns a pointer to a static built-in object that, when passed to BIO_new(3), results in the creation of a BIO object that can write data to and/or read data from another BIO object.
- source and/or sink BIO: The function returns a pointer to a static built-in object that, when passed to BIO_new(3), results in the creation of a BIO object that can write data to an external destination and/or read data from an external source, for example a file descriptor or object, a memory buffer, or the network.
- big number: The function operates on BIGNUM objects representing integer numbers of variable, almost unlimited size. See BN_new(3).
- callback: The function takes or returns a function pointer that is called by API functions from inside the library. The function pointed to may be defined by the application program. In some cases, API functions with “cb” in their name may return function pointers to internal functions defined inside the library that are not API functions. The element “cb” is also used in the names of some function pointer datatypes declared with typedef. In a small number of cases, the all caps form “CB” is used with the same meaning.
- context: The function operates on a wrapper object around another object. The purposes and properties of such “CTX” wrapper objects vary wildly depending on the objects in question. A few function names use the lower case form “ctx” in the same sense.
- DER to internal: The function decodes input conforming to ASN.1 basic encoding rules (BER) and either stores the result in an existing object or in a newly allocated object. The latter is usually preferable because creating a new object is more robust and less error prone. In spite of the name, the input usually does not need to conform to ASN.1 distinguished encoding rules (DER), which are more restrictive than BER.
- digital EnVeloPe library: See evp(3).
This name element is used for two completely unrelated purposes.
- file pointer: The function takes a FILE * argument. Usually, the function is a variant of another function taking a BIO * argument instead.
- internal to DER: The function encodes an object passed as an argument according to ASN.1 distinguished encoding rules (DER). There are a few rare exceptions of functions that have “i2d” in their name but produce output anyway that only conforms to ASN.1 basic encoding rules (BER) and not to DER.
- The function returns an internal pointer owned by the object passed as an argument. The returned pointer must not be freed by the calling code. It will be freed automatically when the object owning the pointer will be freed.
The function returns a copy of a sub-object of an object passed as an argument. The caller is responsible for freeing the returned object when it is no longer needed.
- Functions containing “get” in their name without a following digit may behave in “get0” or, more rarely, in “get1” style. To find out which is the case, refer to the individual manual pages.
- linear hash: The function manipulates a dynamic hash table. See lh_new(3).
- message digest. Some function names use the all caps form “MD” in the same sense.
- The function manipulates an object holding a function table. Usually, such function tables allow the application program to implement additional cryptographic or I/O algorithms and to use them with the same high-level API functions as the algorithms provided by the library itself, or to replace the implementations of algorithms provided by the library with custom implementations provided by the application program. Some API functions use the name elements “method” or “METHOD” in the same sense. See also the “cb” entry in the present list.
- indefinite length form: The function encodes according to ASN.1 basic encoding rules (BER) using the indefinite length form. Even if the function name also includes “i2d”, the output does not conform to ASN.1 distinguished encoding rules (DER). See ASN1_item_ndef_i2d(3). Some function names contain the all caps version “NDEF” with the same meaning.
- numerical identifier: A non-standard, LibreSSL-specific int number associated with an ASN.1 object identifier. In several cases, the all caps form “NID” is used in the same sense. See OBJ_nid2obj(3).
- This name element and its all caps form “OBJ” usually refer to ASN.1 object identifiers represented by the ASN1_OBJECT data type. See ASN1_OBJECT_new(3).
- In most cases, this name element and its lower case form “pkey” mean “private key”, but for both forms, there are some cases where they mean “public key” instead.
- The function transfers ownership of a pointer passed as an argument to an object passed as another argument, by storing the pointer inside the object. The transferred pointer must not be freed by the calling code. It will be freed automatically when the object now owning the pointer will be freed.
The function copies the content of one object passed as an argument into another object also passed as an argument. When the calling code no longer needs the copied object, it can free that object.
- Functions containing “set” in their name without a following digit may behave in “set0” or, more rarely, in “set1” style. To find out which is the case, refer to the individual manual pages.
- stack: The function manipulates a variable-sized array of pointers in the idiosyncratic style described in OPENSSL_sk_new(3).
- X.509 time-stamp protocol: See TS_REQ_new(3).
- The function increments the reference count of the argument by one. Only a minority of object types support reference counting. For those that do, if the reference count is greater than one, the corresponding “free” function reverses the effect of one call to the “up_ref” function rather than freeing the object.