Skip to content

Commit 200dbb2

Browse files
author
tlspuffin
committed
1 parent 33d64fd commit 200dbb2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+251
-78
lines changed

website/api/search-index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/api/search.desc/tlspuffin/tlspuffin-desc-0-.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/api/src/tlspuffin/home/runner/work/tlspuffin/tlspuffin/target/debug/build/tlspuffin-6b665250d7faafbd/out/bindings.rs.html

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,17 @@
574574
<a href="#574" id="574">574</a>
575575
<a href="#575" id="575">575</a>
576576
<a href="#576" id="576">576</a>
577+
<a href="#577" id="577">577</a>
578+
<a href="#578" id="578">578</a>
579+
<a href="#579" id="579">579</a>
580+
<a href="#580" id="580">580</a>
581+
<a href="#581" id="581">581</a>
582+
<a href="#582" id="582">582</a>
583+
<a href="#583" id="583">583</a>
584+
<a href="#584" id="584">584</a>
585+
<a href="#585" id="585">585</a>
586+
<a href="#586" id="586">586</a>
587+
<a href="#587" id="587">587</a>
577588
</pre></div><pre class="rust"><code><span class="comment">/* automatically generated by rust-bindgen 0.69.1 */
578589

579590
</span><span class="attr">#[repr(C)]
@@ -943,7 +954,8 @@
943954
<span class="kw">pub </span>tls_version: TLS_VERSION,
944955
<span class="kw">pub </span>client_authentication: bool,
945956
<span class="kw">pub </span>server_authentication: bool,
946-
<span class="kw">pub </span>cipher_string: <span class="kw-2">*const </span>::libc::c_char,
957+
<span class="kw">pub </span>cipher_string_tls13: <span class="kw-2">*const </span>::libc::c_char,
958+
<span class="kw">pub </span>cipher_string_tls12: <span class="kw-2">*const </span>::libc::c_char,
947959
<span class="kw">pub </span>group_list: <span class="kw-2">*const </span>::libc::c_char,
948960
<span class="kw">pub </span>cert: <span class="kw-2">*const </span>PEM,
949961
<span class="kw">pub </span>pkey: <span class="kw-2">*const </span>PEM,
@@ -956,7 +968,7 @@
956968
<span class="kw">let </span>ptr = UNINIT.as_ptr();
957969
<span class="macro">assert_eq!</span>(
958970
::std::mem::size_of::&lt;TLS_AGENT_DESCRIPTOR&gt;(),
959-
<span class="number">64usize</span>,
971+
<span class="number">72usize</span>,
960972
<span class="macro">concat!</span>(<span class="string">"Size of: "</span>, <span class="macro">stringify!</span>(TLS_AGENT_DESCRIPTOR))
961973
);
962974
<span class="macro">assert_eq!</span>(
@@ -1015,18 +1027,28 @@
10151027
)
10161028
);
10171029
<span class="macro">assert_eq!</span>(
1018-
<span class="kw">unsafe </span>{ <span class="macro">::std::ptr::addr_of!</span>((<span class="kw-2">*</span>ptr).cipher_string) <span class="kw">as </span>usize - ptr <span class="kw">as </span>usize },
1030+
<span class="kw">unsafe </span>{ <span class="macro">::std::ptr::addr_of!</span>((<span class="kw-2">*</span>ptr).cipher_string_tls13) <span class="kw">as </span>usize - ptr <span class="kw">as </span>usize },
10191031
<span class="number">16usize</span>,
10201032
<span class="macro">concat!</span>(
10211033
<span class="string">"Offset of field: "</span>,
10221034
<span class="macro">stringify!</span>(TLS_AGENT_DESCRIPTOR),
10231035
<span class="string">"::"</span>,
1024-
<span class="macro">stringify!</span>(cipher_string)
1036+
<span class="macro">stringify!</span>(cipher_string_tls13)
10251037
)
10261038
);
10271039
<span class="macro">assert_eq!</span>(
1028-
<span class="kw">unsafe </span>{ <span class="macro">::std::ptr::addr_of!</span>((<span class="kw-2">*</span>ptr).group_list) <span class="kw">as </span>usize - ptr <span class="kw">as </span>usize },
1040+
<span class="kw">unsafe </span>{ <span class="macro">::std::ptr::addr_of!</span>((<span class="kw-2">*</span>ptr).cipher_string_tls12) <span class="kw">as </span>usize - ptr <span class="kw">as </span>usize },
10291041
<span class="number">24usize</span>,
1042+
<span class="macro">concat!</span>(
1043+
<span class="string">"Offset of field: "</span>,
1044+
<span class="macro">stringify!</span>(TLS_AGENT_DESCRIPTOR),
1045+
<span class="string">"::"</span>,
1046+
<span class="macro">stringify!</span>(cipher_string_tls12)
1047+
)
1048+
);
1049+
<span class="macro">assert_eq!</span>(
1050+
<span class="kw">unsafe </span>{ <span class="macro">::std::ptr::addr_of!</span>((<span class="kw-2">*</span>ptr).group_list) <span class="kw">as </span>usize - ptr <span class="kw">as </span>usize },
1051+
<span class="number">32usize</span>,
10301052
<span class="macro">concat!</span>(
10311053
<span class="string">"Offset of field: "</span>,
10321054
<span class="macro">stringify!</span>(TLS_AGENT_DESCRIPTOR),
@@ -1036,7 +1058,7 @@
10361058
);
10371059
<span class="macro">assert_eq!</span>(
10381060
<span class="kw">unsafe </span>{ <span class="macro">::std::ptr::addr_of!</span>((<span class="kw-2">*</span>ptr).cert) <span class="kw">as </span>usize - ptr <span class="kw">as </span>usize },
1039-
<span class="number">32usize</span>,
1061+
<span class="number">40usize</span>,
10401062
<span class="macro">concat!</span>(
10411063
<span class="string">"Offset of field: "</span>,
10421064
<span class="macro">stringify!</span>(TLS_AGENT_DESCRIPTOR),
@@ -1046,7 +1068,7 @@
10461068
);
10471069
<span class="macro">assert_eq!</span>(
10481070
<span class="kw">unsafe </span>{ <span class="macro">::std::ptr::addr_of!</span>((<span class="kw-2">*</span>ptr).pkey) <span class="kw">as </span>usize - ptr <span class="kw">as </span>usize },
1049-
<span class="number">40usize</span>,
1071+
<span class="number">48usize</span>,
10501072
<span class="macro">concat!</span>(
10511073
<span class="string">"Offset of field: "</span>,
10521074
<span class="macro">stringify!</span>(TLS_AGENT_DESCRIPTOR),
@@ -1056,7 +1078,7 @@
10561078
);
10571079
<span class="macro">assert_eq!</span>(
10581080
<span class="kw">unsafe </span>{ <span class="macro">::std::ptr::addr_of!</span>((<span class="kw-2">*</span>ptr).store) <span class="kw">as </span>usize - ptr <span class="kw">as </span>usize },
1059-
<span class="number">48usize</span>,
1081+
<span class="number">56usize</span>,
10601082
<span class="macro">concat!</span>(
10611083
<span class="string">"Offset of field: "</span>,
10621084
<span class="macro">stringify!</span>(TLS_AGENT_DESCRIPTOR),
@@ -1066,7 +1088,7 @@
10661088
);
10671089
<span class="macro">assert_eq!</span>(
10681090
<span class="kw">unsafe </span>{ <span class="macro">::std::ptr::addr_of!</span>((<span class="kw-2">*</span>ptr).store_length) <span class="kw">as </span>usize - ptr <span class="kw">as </span>usize },
1069-
<span class="number">56usize</span>,
1091+
<span class="number">64usize</span>,
10701092
<span class="macro">concat!</span>(
10711093
<span class="string">"Offset of field: "</span>,
10721094
<span class="macro">stringify!</span>(TLS_AGENT_DESCRIPTOR),

website/api/src/tlspuffin/protocol.rs.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,11 @@
390390
<a href="#390" id="390">390</a>
391391
<a href="#391" id="391">391</a>
392392
<a href="#392" id="392">392</a>
393+
<a href="#393" id="393">393</a>
394+
<a href="#394" id="394">394</a>
395+
<a href="#395" id="395">395</a>
396+
<a href="#396" id="396">396</a>
397+
<a href="#397" id="397">397</a>
393398
</pre></div><pre class="rust"><code><span class="kw">use </span>core::any::TypeId;
394399

395400
<span class="kw">use </span>extractable_macro::Extractable;
@@ -680,7 +685,8 @@
680685
/// as openssl agents rotate ticket keys if they are recreated.
681686
</span><span class="kw">pub </span>try_reuse: bool,
682687
<span class="doccomment">/// List of available TLS ciphers
683-
</span><span class="kw">pub </span>cipher_string: String,
688+
</span><span class="kw">pub </span>cipher_string_tls13: String,
689+
<span class="kw">pub </span>cipher_string_tls12: String,
684690
<span class="doccomment">/// List of available TLS groups/curves
685691
/// If `None`, use the default PUT groups
686692
</span><span class="kw">pub </span>groups: <span class="prelude-ty">Option</span>&lt;String&gt;,
@@ -718,11 +724,14 @@
718724
<span class="kw">fn </span>is_reusable_with(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span><span class="self">Self</span>) -&gt; bool {
719725
<span class="self">self</span>.typ == other.typ
720726
&amp;&amp; <span class="self">self</span>.tls_version == other.tls_version
721-
&amp;&amp; <span class="self">self</span>.cipher_string == other.cipher_string
727+
&amp;&amp; <span class="self">self</span>.cipher_string_tls13 == other.cipher_string_tls13
728+
&amp;&amp; <span class="self">self</span>.cipher_string_tls12 == other.cipher_string_tls12
722729
&amp;&amp; <span class="self">self</span>.groups == other.groups
723730
}
724731
}
725732

733+
<span class="kw">const </span>TLS_DEFAULT_CIPHER: <span class="kw-2">&amp;</span>str = <span class="string">"ALL:!EXPORT:!LOW:!aNULL:!eNULL:!SSLv2"</span>;
734+
726735
<span class="kw">impl </span>Default <span class="kw">for </span>TLSDescriptorConfig {
727736
<span class="kw">fn </span>default() -&gt; <span class="self">Self </span>{
728737
<span class="self">Self </span>{
@@ -731,7 +740,8 @@
731740
server_authentication: <span class="bool-val">true</span>,
732741
try_reuse: <span class="bool-val">false</span>,
733742
typ: AgentType::Server,
734-
cipher_string: String::from(<span class="string">"ALL:!EXPORT:!LOW:!aNULL:!eNULL:!SSLv2"</span>),
743+
cipher_string_tls13: TLS_DEFAULT_CIPHER.into(),
744+
cipher_string_tls12: TLS_DEFAULT_CIPHER.into(),
735745
groups: <span class="prelude-val">None</span>,
736746
}
737747
}

website/api/src/tlspuffin/put.rs.html

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,24 @@
451451
<a href="#451" id="451">451</a>
452452
<a href="#452" id="452">452</a>
453453
<a href="#453" id="453">453</a>
454+
<a href="#454" id="454">454</a>
455+
<a href="#455" id="455">455</a>
456+
<a href="#456" id="456">456</a>
457+
<a href="#457" id="457">457</a>
458+
<a href="#458" id="458">458</a>
459+
<a href="#459" id="459">459</a>
460+
<a href="#460" id="460">460</a>
461+
<a href="#461" id="461">461</a>
462+
<a href="#462" id="462">462</a>
463+
<a href="#463" id="463">463</a>
464+
<a href="#464" id="464">464</a>
465+
<a href="#465" id="465">465</a>
466+
<a href="#466" id="466">466</a>
467+
<a href="#467" id="467">467</a>
468+
<a href="#468" id="468">468</a>
469+
<a href="#469" id="469">469</a>
470+
<a href="#470" id="470">470</a>
471+
<a href="#471" id="471">471</a>
454472
</pre></div><pre class="rust"><code><span class="kw">use </span>std::cell::RefCell;
455473
<span class="kw">use </span>std::collections::HashSet;
456474
<span class="kw">use </span>std::ffi::CString;
@@ -637,8 +655,22 @@
637655

638656
<span class="kw">let </span>server_store = [<span class="kw-2">&amp;</span>client_cert <span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>, <span class="kw-2">&amp;</span>other_cert];
639657
<span class="kw">let </span>client_store = [<span class="kw-2">&amp;</span>server_cert <span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>, <span class="kw-2">&amp;</span>other_cert];
640-
<span class="kw">let </span>ciphers =
641-
CString::new(config.descriptor.protocol_config.cipher_string.clone()).unwrap();
658+
<span class="kw">let </span>ciphers_tls13 = CString::new(
659+
config
660+
.descriptor
661+
.protocol_config
662+
.cipher_string_tls13
663+
.clone(),
664+
)
665+
.unwrap();
666+
<span class="kw">let </span>ciphers_tls12 = CString::new(
667+
config
668+
.descriptor
669+
.protocol_config
670+
.cipher_string_tls12
671+
.clone(),
672+
)
673+
.unwrap();
642674
<span class="kw">let </span>groups = config
643675
.descriptor
644676
.protocol_config
@@ -652,15 +684,17 @@
652684
<span class="kw-2">&amp;</span>server_cert,
653685
<span class="kw-2">&amp;</span>server_pkey,
654686
<span class="kw-2">&amp;</span>server_store,
655-
<span class="kw-2">&amp;</span>ciphers,
687+
<span class="kw-2">&amp;</span>ciphers_tls13,
688+
<span class="kw-2">&amp;</span>ciphers_tls12,
656689
<span class="kw-2">&amp;</span>groups,
657690
),
658691
AgentType::Client =&gt; make_descriptor(
659692
<span class="kw-2">&amp;</span>config,
660693
<span class="kw-2">&amp;</span>client_cert,
661694
<span class="kw-2">&amp;</span>client_pkey,
662695
<span class="kw-2">&amp;</span>client_store,
663-
<span class="kw-2">&amp;</span>ciphers,
696+
<span class="kw-2">&amp;</span>ciphers_tls13,
697+
<span class="kw-2">&amp;</span>ciphers_tls12,
664698
<span class="kw-2">&amp;</span>groups,
665699
),
666700
};
@@ -815,7 +849,8 @@
815849
cert: <span class="kw-2">*const </span>PEM,
816850
pkey: <span class="kw-2">*const </span>PEM,
817851
store: <span class="kw-2">&amp;</span>[<span class="kw-2">*const </span>PEM],
818-
ciphers: <span class="kw-2">&amp;</span>CString,
852+
ciphers_tls13: <span class="kw-2">&amp;</span>CString,
853+
ciphers_tls12: <span class="kw-2">&amp;</span>CString,
819854
groups: <span class="kw-2">&amp;</span><span class="prelude-ty">Option</span>&lt;CString&gt;,
820855
) -&gt; TLS_AGENT_DESCRIPTOR {
821856
<span class="comment">// eprintln!("{:?}", cert);
@@ -836,7 +871,8 @@
836871
},
837872
client_authentication: config.descriptor.protocol_config.client_authentication,
838873
server_authentication: config.descriptor.protocol_config.server_authentication,
839-
cipher_string: ciphers.as_ptr(),
874+
cipher_string_tls13: ciphers_tls13.as_ptr(),
875+
cipher_string_tls12: ciphers_tls12.as_ptr(),
840876
group_list: <span class="kw">if let </span><span class="prelude-val">Some</span>(group_list) = groups {
841877
group_list.as_ref().as_ptr()
842878
} <span class="kw">else </span>{

website/api/src/tlspuffin/tls/seeds.rs.html

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2568,6 +2568,53 @@
25682568
<a href="#2568" id="2568">2568</a>
25692569
<a href="#2569" id="2569">2569</a>
25702570
<a href="#2570" id="2570">2570</a>
2571+
<a href="#2571" id="2571">2571</a>
2572+
<a href="#2572" id="2572">2572</a>
2573+
<a href="#2573" id="2573">2573</a>
2574+
<a href="#2574" id="2574">2574</a>
2575+
<a href="#2575" id="2575">2575</a>
2576+
<a href="#2576" id="2576">2576</a>
2577+
<a href="#2577" id="2577">2577</a>
2578+
<a href="#2578" id="2578">2578</a>
2579+
<a href="#2579" id="2579">2579</a>
2580+
<a href="#2580" id="2580">2580</a>
2581+
<a href="#2581" id="2581">2581</a>
2582+
<a href="#2582" id="2582">2582</a>
2583+
<a href="#2583" id="2583">2583</a>
2584+
<a href="#2584" id="2584">2584</a>
2585+
<a href="#2585" id="2585">2585</a>
2586+
<a href="#2586" id="2586">2586</a>
2587+
<a href="#2587" id="2587">2587</a>
2588+
<a href="#2588" id="2588">2588</a>
2589+
<a href="#2589" id="2589">2589</a>
2590+
<a href="#2590" id="2590">2590</a>
2591+
<a href="#2591" id="2591">2591</a>
2592+
<a href="#2592" id="2592">2592</a>
2593+
<a href="#2593" id="2593">2593</a>
2594+
<a href="#2594" id="2594">2594</a>
2595+
<a href="#2595" id="2595">2595</a>
2596+
<a href="#2596" id="2596">2596</a>
2597+
<a href="#2597" id="2597">2597</a>
2598+
<a href="#2598" id="2598">2598</a>
2599+
<a href="#2599" id="2599">2599</a>
2600+
<a href="#2600" id="2600">2600</a>
2601+
<a href="#2601" id="2601">2601</a>
2602+
<a href="#2602" id="2602">2602</a>
2603+
<a href="#2603" id="2603">2603</a>
2604+
<a href="#2604" id="2604">2604</a>
2605+
<a href="#2605" id="2605">2605</a>
2606+
<a href="#2606" id="2606">2606</a>
2607+
<a href="#2607" id="2607">2607</a>
2608+
<a href="#2608" id="2608">2608</a>
2609+
<a href="#2609" id="2609">2609</a>
2610+
<a href="#2610" id="2610">2610</a>
2611+
<a href="#2611" id="2611">2611</a>
2612+
<a href="#2612" id="2612">2612</a>
2613+
<a href="#2613" id="2613">2613</a>
2614+
<a href="#2614" id="2614">2614</a>
2615+
<a href="#2615" id="2615">2615</a>
2616+
<a href="#2616" id="2616">2616</a>
2617+
<a href="#2617" id="2617">2617</a>
25712618
</pre></div><pre class="rust"><code><span class="doccomment">//! Implementation of special traces. Each may represent a special TLS execution like a full
25722619
//! handshake or an execution which crashes OpenSSL.
25732620
</span><span class="attr">#![allow(dead_code)]
@@ -2967,6 +3014,53 @@
29673014
}
29683015
}
29693016

3017+
<span class="doccomment">/// This seed performs a TLS 1.2 handshake between a client and a server by only
3018+
/// forwarding messages between the agents
3019+
</span><span class="kw">pub fn </span>seed_successful12_forward(client: AgentName, server: AgentName) -&gt; Trace&lt;TLSProtocolTypes&gt; {
3020+
Trace {
3021+
prior_traces: <span class="macro">vec!</span>[],
3022+
descriptors: <span class="macro">vec!</span>[
3023+
TLSDescriptorConfig::new_client(client, TLSVersion::V1_2),
3024+
TLSDescriptorConfig::new_server(server, TLSVersion::V1_2),
3025+
],
3026+
steps: <span class="macro">vec!</span>[
3027+
OutputAction::new_step(client),
3028+
<span class="comment">// Client Hello Client -&gt; Server
3029+
</span>Step {
3030+
agent: server,
3031+
action: Action::Input(<span class="macro">input_action!</span> { <span class="macro">term!</span> {
3032+
(client, <span class="number">0</span>)/MessageFlight
3033+
}
3034+
}),
3035+
},
3036+
<span class="comment">// ServerHello/EncryptedExtensions/Certificate/CertificateVerify/ServerFinished -&gt;
3037+
// Client
3038+
</span>Step {
3039+
agent: client,
3040+
action: Action::Input(<span class="macro">input_action!</span> { <span class="macro">term!</span> {
3041+
(server, <span class="number">0</span>)/MessageFlight
3042+
}
3043+
}),
3044+
},
3045+
<span class="comment">// Client Finished -&gt; server
3046+
</span>Step {
3047+
agent: server,
3048+
action: Action::Input(<span class="macro">input_action!</span> { <span class="macro">term!</span> {
3049+
(client, <span class="number">1</span>)/MessageFlight
3050+
}
3051+
}),
3052+
},
3053+
Step {
3054+
agent: client,
3055+
action: Action::Input(<span class="macro">input_action!</span> { <span class="macro">term!</span> {
3056+
(server, <span class="number">1</span>)/MessageFlight
3057+
}
3058+
}),
3059+
},
3060+
],
3061+
}
3062+
}
3063+
29703064
<span class="comment">// TODO: `[BAD_DECRYPT] [DECRYPTION_FAILED_OR_BAD_RECORD_MAC]` error with BoringSSL
29713065
</span><span class="kw">pub fn </span>seed_successful_with_ccs(client: AgentName, server: AgentName) -&gt; Trace&lt;TLSProtocolTypes&gt; {
29723066
Trace {

website/api/tlspuffin/all.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)