blob: 04e73f9c2597cace8202532015f8b9cb5b2dd06d [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Defines the format of certificates"><meta name="keywords" content="rust, rustlang, rust-lang, asn1"><title>openssl::asn1 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../openssl/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../openssl/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module asn1</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">openssl</a>::<wbr><a class="mod" href="#">asn1</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/openssl/asn1.rs.html#1-911">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Defines the format of certificates</p>
<p>This module is used by <a href="../x509/struct.X509Builder.html"><code>x509</code></a> and other certificate building functions
to describe time, strings, and objects.</p>
<p>Abstract Syntax Notation One is an interface description language.
The specification comes from <a href="https://www.itu.int/rec/T-REC-X.208-198811-W/en">X.208</a> by OSI, and rewritten in X.680.
ASN.1 describes properties of an object with a type set. Those types
can be atomic, structured, choice, and other (CHOICE and ANY). These
types are expressed as a number and the assignment operator ::= gives
the type a name.</p>
<p>The implementation here provides a subset of the ASN.1 types that OpenSSL
uses, especially in the properties of a certificate used in HTTPS.</p>
<h3 id="examples"><a href="#examples">Examples</a></h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::asn1::Asn1Time;
<span class="kw">let </span>tomorrow = Asn1Time::days_from_now(<span class="number">1</span>);</code></pre></div>
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1BitString.html" title="openssl::asn1::Asn1BitString struct">Asn1BitString</a></div><div class="item-right docblock-short">Sequence of bytes</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1BitStringRef.html" title="openssl::asn1::Asn1BitStringRef struct">Asn1BitStringRef</a></div><div class="item-right docblock-short">A reference to an <a href="struct.Asn1BitString.html" title="Asn1BitString"><code>Asn1BitString</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1Enumerated.html" title="openssl::asn1::Asn1Enumerated struct">Asn1Enumerated</a></div><div class="item-right docblock-short">An ASN.1 enumerated.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1EnumeratedRef.html" title="openssl::asn1::Asn1EnumeratedRef struct">Asn1EnumeratedRef</a></div><div class="item-right docblock-short">A reference to an <a href="struct.Asn1Enumerated.html" title="Asn1Enumerated"><code>Asn1Enumerated</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1GeneralizedTime.html" title="openssl::asn1::Asn1GeneralizedTime struct">Asn1GeneralizedTime</a></div><div class="item-right docblock-short">Non-UTC representation of time</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1GeneralizedTimeRef.html" title="openssl::asn1::Asn1GeneralizedTimeRef struct">Asn1GeneralizedTimeRef</a></div><div class="item-right docblock-short">Reference to a <a href="struct.Asn1GeneralizedTime.html"><code>Asn1GeneralizedTime</code></a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1Integer.html" title="openssl::asn1::Asn1Integer struct">Asn1Integer</a></div><div class="item-right docblock-short">Numeric representation</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1IntegerRef.html" title="openssl::asn1::Asn1IntegerRef struct">Asn1IntegerRef</a></div><div class="item-right docblock-short">A reference to an <a href="struct.Asn1Integer.html" title="Asn1Integer"><code>Asn1Integer</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1Object.html" title="openssl::asn1::Asn1Object struct">Asn1Object</a></div><div class="item-right docblock-short">Object Identifier</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1ObjectRef.html" title="openssl::asn1::Asn1ObjectRef struct">Asn1ObjectRef</a></div><div class="item-right docblock-short">A reference to an <a href="struct.Asn1Object.html" title="Asn1Object"><code>Asn1Object</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1OctetString.html" title="openssl::asn1::Asn1OctetString struct">Asn1OctetString</a></div><div class="item-right docblock-short">ASN.1 OCTET STRING type</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1OctetStringRef.html" title="openssl::asn1::Asn1OctetStringRef struct">Asn1OctetStringRef</a></div><div class="item-right docblock-short">A reference to an <a href="struct.Asn1OctetString.html" title="Asn1OctetString"><code>Asn1OctetString</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1String.html" title="openssl::asn1::Asn1String struct">Asn1String</a></div><div class="item-right docblock-short">Primary ASN.1 type used by OpenSSL</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1StringRef.html" title="openssl::asn1::Asn1StringRef struct">Asn1StringRef</a></div><div class="item-right docblock-short">A reference to an <a href="struct.Asn1String.html" title="Asn1String"><code>Asn1String</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1Time.html" title="openssl::asn1::Asn1Time struct">Asn1Time</a></div><div class="item-right docblock-short">Time storage and comparison</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1TimeRef.html" title="openssl::asn1::Asn1TimeRef struct">Asn1TimeRef</a></div><div class="item-right docblock-short">Reference to an <a href="struct.Asn1Time.html"><code>Asn1Time</code></a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Asn1Type.html" title="openssl::asn1::Asn1Type struct">Asn1Type</a></div><div class="item-right docblock-short">The type of an ASN.1 value.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TimeDiff.html" title="openssl::asn1::TimeDiff struct">TimeDiff</a></div><div class="item-right docblock-short">Difference between two ASN1 times.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="openssl" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>