We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4852539 commit 8974b7fCopy full SHA for 8974b7f
rcgen/tests/generic.rs
@@ -357,3 +357,20 @@ mod test_parse_other_name_alt_name {
357
assert_eq!(subject_alt_names, expected_alt_names);
358
}
359
360
+
361
+#[cfg(feature = "x509-parser")]
362
+mod test_csr {
363
+ use rcgen::{CertificateParams, CertificateSigningRequestParams, KeyPair};
364
365
+ #[test]
366
+ fn test_csr_roundtrip() {
367
+ // We should be able to serialize a CSR, and then parse the CSR.
368
+ _ = CertificateSigningRequestParams::from_der(
369
+ CertificateParams::default()
370
+ .serialize_request(&KeyPair::generate().unwrap())
371
+ .unwrap()
372
+ .der(),
373
+ )
374
+ .unwrap();
375
+ }
376
+}
0 commit comments