0.2.0-dev Download ZIP
42 lines ·1.7 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="X509Certificate" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | An X509 certificate (e.g. for TLS). |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource]. |
| 8 | They can be used as the server certificate in [method StreamPeerTLS.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to a TLS server via [method StreamPeerTLS.connect_to_stream]. |
| 9 | </description> |
| 10 | <tutorials> |
| 11 | <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link> |
| 12 | </tutorials> |
| 13 | <methods> |
| 14 | <method name="load"> |
| 15 | <return type="int" enum="Error" /> |
| 16 | <param index="0" name="path" type="String" /> |
| 17 | <description> |
| 18 | Loads a certificate from [param path] ("*.crt" file). |
| 19 | </description> |
| 20 | </method> |
| 21 | <method name="load_from_string"> |
| 22 | <return type="int" enum="Error" /> |
| 23 | <param index="0" name="string" type="String" /> |
| 24 | <description> |
| 25 | Loads a certificate from the given [param string]. |
| 26 | </description> |
| 27 | </method> |
| 28 | <method name="save"> |
| 29 | <return type="int" enum="Error" /> |
| 30 | <param index="0" name="path" type="String" /> |
| 31 | <description> |
| 32 | Saves a certificate to the given [param path] (should be a "*.crt" file). |
| 33 | </description> |
| 34 | </method> |
| 35 | <method name="save_to_string"> |
| 36 | <return type="String" /> |
| 37 | <description> |
| 38 | Returns a string representation of the certificate, or an empty string if the certificate is invalid. |
| 39 | </description> |
| 40 | </method> |
| 41 | </methods> |
| 42 | </class> |