@@ -139,17 +139,16 @@ impl ECDSAPubFactory {
139139 factory
140140 }
141141}
142-
143142impl ObjectFactory for ECDSAPubFactory {
144143 /// Creates an EC Public-Key Object from a template
145144 ///
146145 /// Validates that the provided attributes are consistent with the
147- /// factory via [ObjectFactory::default_object_create ()]
146+ /// factory via [ObjectFactory::default_key_create ()]
148147 ///
149148 /// Additionally validates the Public Point Format and that its size
150149 /// is consistent with the EC Parameters provided
151150 fn create ( & self , template : & [ CK_ATTRIBUTE ] ) -> Result < Object > {
152- let mut obj = self . default_object_create ( template) ?;
151+ let mut obj = self . default_key_create ( template) ?;
153152
154153 /* According to PKCS#11 v3.1 6.3.3:
155154 * CKA_EC_PARAMS, Byte array,
@@ -252,17 +251,16 @@ impl ECDSAPrivFactory {
252251 factory
253252 }
254253}
255-
256254impl ObjectFactory for ECDSAPrivFactory {
257255 /// Creates an ECDSA Private-Key Object from a template
258256 ///
259257 /// Validates that the provided attributes are consistent with the
260- /// factory via [ObjectFactory::default_object_create ()]
258+ /// factory via [ObjectFactory::default_key_create ()]
261259 ///
262260 /// Additionally validates that the private key size is consistent
263261 /// with the EC Parameters provided
264262 fn create ( & self , template : & [ CK_ATTRIBUTE ] ) -> Result < Object > {
265- let mut obj = self . default_object_create ( template) ?;
263+ let mut obj = self . default_key_create ( template) ?;
266264
267265 /* According to PKCS#11 v3.1 6.3.4:
268266 * CKA_EC_PARAMS, Byte array,
@@ -350,7 +348,7 @@ impl PrivKeyFactory for ECDSAPrivFactory {
350348 data : Vec < u8 > ,
351349 template : & [ CK_ATTRIBUTE ] ,
352350 ) -> Result < Object > {
353- import_from_wrapped ( CKK_EC , data, self . default_object_unwrap ( template) ?)
351+ import_from_wrapped ( CKK_EC , data, self . default_key_unwrap ( template) ?)
354352 }
355353}
356354
@@ -425,7 +423,7 @@ impl Mechanism for EcdsaMechanism {
425423 prikey_template : & [ CK_ATTRIBUTE ] ,
426424 ) -> Result < ( Object , Object ) > {
427425 let mut pubkey =
428- PUBLIC_KEY_FACTORY . default_object_generate ( pubkey_template) ?;
426+ PUBLIC_KEY_FACTORY . default_key_generate ( pubkey_template) ?;
429427 pubkey
430428 . ensure_ulong ( CKA_CLASS , CKO_PUBLIC_KEY )
431429 . map_err ( |_| CKR_TEMPLATE_INCONSISTENT ) ?;
@@ -434,7 +432,7 @@ impl Mechanism for EcdsaMechanism {
434432 . map_err ( |_| CKR_TEMPLATE_INCONSISTENT ) ?;
435433
436434 let mut privkey =
437- PRIVATE_KEY_FACTORY . default_object_generate ( prikey_template) ?;
435+ PRIVATE_KEY_FACTORY . default_key_generate ( prikey_template) ?;
438436 privkey
439437 . ensure_ulong ( CKA_CLASS , CKO_PRIVATE_KEY )
440438 . map_err ( |_| CKR_TEMPLATE_INCONSISTENT ) ?;
0 commit comments