Skip to content

Commit d68efc7

Browse files
authored
Rename rust_policy to policy_inner in PyExtensionPolicy. (#12438)
1 parent 5c3219d commit d68efc7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/rust/src/x509/verify/extension_policy.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ use cryptography_x509_verification::policy::ExtensionPolicy;
77
name = "ExtensionPolicy"
88
)]
99
pub(crate) struct PyExtensionPolicy {
10-
rust_policy: ExtensionPolicy<'static, PyCryptoOps>,
10+
inner_policy: ExtensionPolicy<'static, PyCryptoOps>,
1111
}
1212

1313
impl PyExtensionPolicy {
14-
pub(super) fn clone_rust_policy(&self) -> ExtensionPolicy<'static, PyCryptoOps> {
15-
self.rust_policy.clone()
14+
pub(super) fn clone_inner_policy(&self) -> ExtensionPolicy<'static, PyCryptoOps> {
15+
self.inner_policy.clone()
1616
}
1717

18-
fn new(rust_policy: ExtensionPolicy<'static, PyCryptoOps>) -> Self {
19-
PyExtensionPolicy { rust_policy }
18+
fn new(inner_policy: ExtensionPolicy<'static, PyCryptoOps>) -> Self {
19+
PyExtensionPolicy { inner_policy }
2020
}
2121
}
2222

src/rust/src/x509/verify/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ impl PolicyBuilder {
193193
self.max_chain_depth,
194194
self.ca_ext_policy
195195
.as_ref()
196-
.map(|p| p.get().clone_rust_policy()),
196+
.map(|p| p.get().clone_inner_policy()),
197197
self.ee_ext_policy
198198
.as_ref()
199-
.map(|p| p.get().clone_rust_policy()),
199+
.map(|p| p.get().clone_inner_policy()),
200200
)
201201
});
202202

@@ -249,10 +249,10 @@ impl PolicyBuilder {
249249
self.max_chain_depth,
250250
self.ca_ext_policy
251251
.as_ref()
252-
.map(|p| p.get().clone_rust_policy()),
252+
.map(|p| p.get().clone_inner_policy()),
253253
self.ee_ext_policy
254254
.as_ref()
255-
.map(|p| p.get().clone_rust_policy()),
255+
.map(|p| p.get().clone_inner_policy()),
256256
))
257257
})?;
258258

0 commit comments

Comments
 (0)