@@ -1791,116 +1791,15 @@ X.509 Certificates
17911791 Return a (statically allocated) string associated with the verification
17921792 result, or NULL if the code is not known.
17931793
1794- .. cpp :type :: opaque* botan_x509_cert_opts_t
1795-
1796- An opaque data type for X.509 certificate options. Don't mess with it.
1797-
1798- .. cpp :type :: opaque* botan_x509_time_t
1799-
1800- An opaque data type for an X.509 time. Don't mess with it.
1801-
1802- .. cpp :type :: opaque* botan_x509_ext_as_blocks_t
1803-
1804- An opaque data type for an X.509 AS Blocks extension (RFC 3779). Don't mess with it.
18051794
18061795.. cpp :type :: opaque* botan_x509_ext_ip_addr_blocks_t
18071796
18081797 An opaque data type for an X.509 IP Address Blocks extension (RFC 3779). Don't mess with it.
18091798
1810- .. cpp :type :: opaque* botan_x509_ca_t
1811-
1812- An opaque data type for an X.509 CA. Don't mess with it.
1813-
1814- .. cpp :type :: opaque* botan_x509_pkcs10_req_t
1815-
1816- An opaque data type for a PKCS #10 certificate request. Don't mess with it.
1817-
1818- .. cpp :function ::int botan_x509_cert_opts_destroy (botan_x509_cert_opts_t opts)
1819-
1820- Destroy the options object.
1821-
1822- .. cpp :function ::int botan_x509_time_destroy (botan_x509_time_t time)
1823-
1824- Destroy the time object.
1825-
18261799.. cpp :function ::int botan_x509_ext_ip_addr_blocks_destroy (botan_x509_ext_ip_addr_blocks_t ip_addr_blocks)
18271800
18281801 Destroy the IP Address Blocks object.
18291802
1830- .. cpp :function ::int botan_x509_ext_as_blocks_destroy (botan_x509_ext_as_blocks_t as_blocks)
1831-
1832- Destroy the AS Blocks object.
1833-
1834- .. cpp :function ::int botan_x509_ca_destroy (botan_x509_ca_t ca)
1835-
1836- Destroy the CA object.
1837-
1838- .. cpp :function ::int botan_x509_pkcs10_req_destroy (botan_x509_pkcs10_req_t req)
1839-
1840- Destroy the PKCS #10 certificate request object.
1841-
1842- .. cpp :function ::int int botan_x509_create_cert_opts (botan_x509_cert_opts_t* opts_obj, const char* opts, uint32_t* expire_time)
1843-
1844- Creates a new options object. ``opts `` defines the common name (e.g. `common_name/country/organization/organizational_unit `), ``expire_time `` if given
1845- is the expiration time from current clock in seconds.
1846-
1847- .. cpp :function ::int botan_x509_cert_opts_common_name (botan_x509_cert_opts_t opts, const char* name)
1848-
1849- Set the common name for the object.
1850-
1851- .. cpp :function ::int botan_x509_cert_opts_country (botan_x509_cert_opts_t opts, const char* country)
1852-
1853- Set the country for the objects.
1854-
1855- .. cpp :function ::int botan_x509_cert_opts_organization (botan_x509_cert_opts_t opts, const char* organization)
1856-
1857- .. cpp :function ::int botan_x509_cert_opts_org_unit (botan_x509_cert_opts_t opts, const char* org_unit)
1858-
1859- .. cpp :function ::int botan_x509_cert_opts_locality (botan_x509_cert_opts_t opts, const char* locality)
1860-
1861- .. cpp :function ::int botan_x509_cert_opts_state (botan_x509_cert_opts_t opts, const char* state)
1862-
1863- .. cpp :function ::int botan_x509_cert_opts_serial_number (botan_x509_cert_opts_t opts, const char* serial_number)
1864-
1865- .. cpp :function ::int botan_x509_cert_opts_email (botan_x509_cert_opts_t opts, const char* email)
1866-
1867- .. cpp :function ::int botan_x509_cert_opts_uri (botan_x509_cert_opts_t opts, const char* uri)
1868-
1869- .. cpp :function ::int botan_x509_cert_opts_ip (botan_x509_cert_opts_t opts, const char* ip)
1870-
1871- .. cpp :function ::int botan_x509_cert_opts_dns (botan_x509_cert_opts_t opts, const char* dns)
1872-
1873- .. cpp :function ::int botan_x509_cert_opts_xmpp (botan_x509_cert_opts_t opts, const char* xmpp)
1874-
1875- .. cpp :function ::int botan_x509_cert_opts_challenge (botan_x509_cert_opts_t opts, const char* challenge)
1876-
1877- .. cpp :function ::int int botan_x509_cert_opts_more_org_units (botan_x509_cert_opts_t opts, const char** more_org_units, size_t cnt)
1878-
1879- .. cpp :function ::int int botan_x509_cert_opts_more_dns (botan_x509_cert_opts_t opts, const char** more_dns, size_t cnt)
1880-
1881- .. cpp :function ::int botan_x509_cert_opts_ca_key (botan_x509_cert_opts_t opts, size_t limit)
1882-
1883- Mark the certificate for CA usage.
1884-
1885- .. cpp :function ::int botan_x509_cert_opts_padding_scheme (botan_x509_cert_opts_t opts, const char* scheme)
1886-
1887- .. cpp :function ::int botan_x509_cert_opts_not_before (botan_x509_cert_opts_t opts, botan_x509_time_t not_before)
1888-
1889- .. cpp :function ::int botan_x509_cert_opts_not_after (botan_x509_cert_opts_t opts, botan_x509_time_t not_after)
1890-
1891- .. cpp :function ::int botan_x509_cert_opts_constraints (botan_x509_cert_opts_t opts, uint32_t usage)
1892-
1893- .. cpp :function ::int botan_x509_cert_opts_ex_constraint (botan_x509_cert_opts_t opts, botan_asn1_oid_t oid)
1894-
1895- .. cpp :function ::int botan_x509_create_time (botan_x509_time_t* time_obj, uint64_t time_since_epoch)
1896-
1897- Create a new time object.
1898-
1899- .. cpp :function ::int int botan_x509_cert_opts_ext_ip_addr_blocks (botan_x509_cert_opts_t opts, \
1900- botan_x509_ext_ip_addr_blocks_t ip_addr_blocks)
1901-
1902- .. cpp :function ::int int botan_x509_cert_opts_ext_as_blocks (botan_x509_cert_opts_t opts, botan_x509_ext_as_blocks_t as_blocks)
1903-
19041803.. cpp :function ::int botan_x509_ext_create_ip_addr_blocks (botan_x509_ext_ip_addr_blocks_t* ip_addr_blocks)
19051804
19061805 Create a new IP Address Blocks object.
@@ -1910,8 +1809,11 @@ X.509 Certificates
19101809
19111810 Get an IP Address Blocks object from a certificate. Cannot be mutated.
19121811
1913- .. cpp :function ::int int botan_x509_ext_ip_addr_blocks_add_ip_addr (
1914- botan_x509_ext_ip_addr_blocks_t ip_addr_blocks, const uint8_t* min, const uint8_t* max, int ipv6, uint8_t* safi)
1812+ .. cpp :function ::int int botan_x509_ext_ip_addr_blocks_add_ip_addr (botan_x509_ext_ip_addr_blocks_t ip_addr_blocks, \
1813+ const uint8_t * min, \
1814+ const uint8_t * max, \
1815+ int ipv6, \
1816+ uint8_t * safi)
19151817
19161818 Add a new IP Address to the extension. Set ``ipv6 `` to 0 if the address is v4, 1 if it is v6.
19171819 ``safi `` may be NULL.
@@ -1966,6 +1868,14 @@ X.509 Certificates
19661868 ``min_out `` and ``max_out `` will be set to the minimum and maximum of the IP range.
19671869 You must provide 4 / 16 bytes of buffer space for each for IP v4 / v6 respectively.
19681870
1871+ .. cpp :type :: opaque* botan_x509_ext_as_blocks_t
1872+
1873+ An opaque data type for an X.509 AS Blocks extension (RFC 3779). Don't mess with it.
1874+
1875+ .. cpp :function ::int botan_x509_ext_as_blocks_destroy (botan_x509_ext_as_blocks_t as_blocks)
1876+
1877+ Destroy the AS Blocks object.
1878+
19691879.. cpp :function ::int botan_x509_ext_create_as_blocks (botan_x509_ext_as_blocks_t* as_blocks)
19701880
19711881 Create a new AS Blocks object.
@@ -2005,23 +1915,82 @@ X.509 Certificates
20051915
20061916.. cpp :function ::int int botan_x509_ext_as_blocks_get_rdi_at (botan_x509_ext_as_blocks_t as_blocks, size_t i, uint32_t* min, uint32_t* max)
20071917
1918+ .. cpp :type :: opaque* botan_x509_cert_params_builder_t
1919+
1920+ .. cpp :function ::int botan_x509_cert_opts_destroy (botan_x509_cert_opts_t opts)
1921+
1922+ Destroy the options object.
1923+
1924+ .. cpp :function ::int botan_x509_create_cert_params_builder (botan_x509_cert_params_builder_t* builder_obj, \
1925+ const char * opts, \
1926+ uint32_t * expire_time);
1927+
1928+ Create a new certificate builder object. ``opts `` defines the common name (e.g. `common_name/country/organization/organizational_unit `).
1929+ ``expire_time `` if given is the expiration time from current clock in seconds.
1930+
1931+ .. cpp :function ::int botan_x509_cert_params_builder_add_common_name (botan_x509_cert_params_builder_t builder, const char* name);
1932+
1933+ .. cpp :function ::int botan_x509_cert_params_builder_add_country (botan_x509_cert_params_builder_t builder, const char* country);
1934+
1935+ .. cpp :function ::int botan_x509_cert_params_builder_add_organization (botan_x509_cert_params_builder_t builder, const char* organization);
1936+
1937+ .. cpp :function ::int botan_x509_cert_params_builder_add_org_unit (botan_x509_cert_params_builder_t builder, const char* org_unit);
1938+
1939+ .. cpp :function ::int botan_x509_cert_params_builder_add_locality (botan_x509_cert_params_builder_t builder, const char* locality);
1940+
1941+ .. cpp :function ::int botan_x509_cert_params_builder_add_state (botan_x509_cert_params_builder_t builder, const char* state);
1942+
1943+ .. cpp :function ::int botan_x509_cert_params_builder_add_serial_number (botan_x509_cert_params_builder_t builder, const char* serial_number);
1944+
1945+ .. cpp :function ::int botan_x509_cert_params_builder_add_email (botan_x509_cert_params_builder_t builder, const char* email);
1946+
1947+ .. cpp :function ::int botan_x509_cert_params_builder_add_uri (botan_x509_cert_params_builder_t builder, const char* uri);
1948+
1949+ .. cpp :function ::int botan_x509_cert_params_builder_add_ip (botan_x509_cert_params_builder_t builder, const char* ip);
1950+
1951+ .. cpp :function ::int botan_x509_cert_params_builder_add_dns (botan_x509_cert_params_builder_t builder, const char* dns);
1952+
1953+ .. cpp :function ::int botan_x509_cert_params_builder_add_xmpp (botan_x509_cert_params_builder_t builder, const char* xmpp);
1954+
1955+ .. cpp :function ::int botan_x509_cert_params_builder_add_challenge (botan_x509_cert_params_builder_t builder, const char* challenge);
1956+
1957+ .. cpp :function ::int botan_x509_cert_params_builder_mark_as_ca_key (botan_x509_cert_params_builder_t builder, size_t limit);
1958+
1959+ Mark the certificate for CA usage.
1960+
1961+ .. cpp :function ::int botan_x509_cert_params_builder_add_not_before (botan_x509_cert_params_builder_t builder, uint64_t time_since_epoch);
1962+
1963+ ``time_since_epoch `` is expected to be in seconds.
1964+
1965+ .. cpp :function ::int botan_x509_cert_params_builder_add_not_after (botan_x509_cert_params_builder_t builder, uint64_t time_since_epoch);
1966+
1967+ .. cpp :function ::int botan_x509_cert_params_builder_add_constraints (botan_x509_cert_params_builder_t builder, uint32_t usage);
1968+
1969+ .. cpp :function ::int botan_x509_cert_params_builder_add_ex_constraint (botan_x509_cert_params_builder_t builder, botan_asn1_oid_t oid);
1970+
1971+ .. cpp :function ::int botan_x509_cert_params_builder_add_ext_ip_addr_blocks (botan_x509_cert_params_builder_t builder, \
1972+ botan_x509_ext_ip_addr_blocks_t ip_addr_blocks);
1973+
1974+ .. cpp :function ::int botan_x509_cert_params_builder_add_ext_as_blocks (botan_x509_cert_params_builder_t builder, \
1975+ botan_x509_ext_as_blocks_t as_blocks);
1976+
20081977.. cpp :function ::int int botan_x509_create_self_signed_cert (botan_x509_cert_t* cert_obj, \
20091978 botan_privkey_t key, \
20101979 botan_x509_cert_opts_t opts, \
20111980 const char * hash_fn, \
2012- const char * sig_padding , \
1981+ const char * padding , \
20131982 botan_rng_t rng)
20141983
1984+
20151985 Create a new self-signed X.509 certificate.
20161986
2017- .. cpp :function ::int int botan_x509_create_ca (botan_x509_ca_t* ca_obj, \
2018- botan_x509_cert_t ca_cert, \
2019- botan_privkey_t key, \
2020- const char * hash_fn, \
2021- const char * sig_padding, \
2022- botan_rng_t rng)
1987+ .. cpp :type :: opaque* botan_x509_pkcs10_req_t
20231988
2024- Create a CA object capable of signing other certificates.
1989+ An opaque data type for a PKCS #10 certificate request. Don't mess with it.
1990+
1991+ .. cpp :function ::int botan_x509_pkcs10_req_destroy (botan_x509_pkcs10_req_t req)
1992+
1993+ Destroy the PKCS #10 certificate request object.
20251994
20261995.. cpp :function ::int int botan_x509_create_pkcs10_req (botan_x509_pkcs10_req_t* req_obj, \
20271996 botan_x509_cert_opts_t opts, \
@@ -2031,14 +2000,17 @@ X.509 Certificates
20312000
20322001 Create a PCKS #10 certificate request.
20332002
2034- .. cpp :function ::int int botan_x509_sign_req (botan_x509_cert_t* cert_obj, \
2035- botan_x509_ca_t ca, \
2036- botan_x509_pkcs10_req_t req, \
2003+ .. cpp :function ::int int botan_x509_sign_req (botan_x509_cert_t* subject_cert, \
2004+ botan_x509_pkcs10_req_t subject_req, \
2005+ botan_x509_cert_t issuing_cert, \
2006+ botan_privkey_t issuing_key, \
20372007 botan_rng_t rng, \
2038- botan_x509_time_t not_before, \
2039- botan_x509_time_t not_after)
2008+ uint64_t not_before, \
2009+ uint64_t not_after, \
2010+ const char * hash_fn, \
2011+ const char * padding)
20402012
2041- Sign a PKCS #10 certificate request
2013+ Sign a PKCS #10 certificate request. `` not_before `` and `` not_after `` are expected to be the time since the UNIX epoch, in seconds.
20422014
20432015X.509 Certificate Revocation Lists
20442016----------------------------------------
0 commit comments