@@ -88,7 +88,7 @@ public function test_valid_hs2019_signatures_for_ec_curves( $curve, $algo ) {
8888
8989 // Mock the remote key retrieval for this curve.
9090 \add_filter (
91- 'pre_get_remote_metadata_by_actor ' ,
91+ 'activitypub_pre_http_get_remote_object ' ,
9292 function () use ( $ public_key ) {
9393 return array (
9494 'name ' => 'Test User ' ,
@@ -103,7 +103,7 @@ function () use ( $public_key ) {
103103 );
104104
105105 $ this ->assertTrue ( Signature::verify_http_signature ( $ request ), "Valid hs2019 signature for curve {$ curve } should verify " );
106- \remove_all_filters ( 'pre_get_remote_metadata_by_actor ' );
106+ \remove_all_filters ( 'activitypub_pre_http_get_remote_object ' );
107107 }
108108
109109 /**
@@ -132,7 +132,7 @@ public function test_invalid_hs2019_signatures_for_ec_curves() {
132132 );
133133
134134 \add_filter (
135- 'pre_get_remote_metadata_by_actor ' ,
135+ 'activitypub_pre_http_get_remote_object ' ,
136136 function () use ( $ public_key ) {
137137 return array (
138138 'name ' => 'Test User ' ,
@@ -146,7 +146,7 @@ function () use ( $public_key ) {
146146 }
147147 );
148148 $ this ->assertWPError ( Signature::verify_http_signature ( $ request ), 'Invalid hs2019 signature for curve prime256v1 should fail ' );
149- \remove_all_filters ( 'pre_get_remote_metadata_by_actor ' );
149+ \remove_all_filters ( 'activitypub_pre_http_get_remote_object ' );
150150 }
151151
152152 /**
@@ -191,7 +191,7 @@ public function test_valid_hs2019_signatures_for_rsa_sizes( $bits, $algo ) {
191191 );
192192
193193 \add_filter (
194- 'pre_get_remote_metadata_by_actor ' ,
194+ 'activitypub_pre_http_get_remote_object ' ,
195195 function () use ( $ public_key ) {
196196 return array (
197197 'name ' => 'Test User ' ,
@@ -205,7 +205,7 @@ function () use ( $public_key ) {
205205 }
206206 );
207207 $ this ->assertTrue ( Signature::verify_http_signature ( $ request ), "Valid hs2019 signature for RSA {$ bits } bits should verify " );
208- \remove_all_filters ( 'pre_get_remote_metadata_by_actor ' );
208+ \remove_all_filters ( 'activitypub_pre_http_get_remote_object ' );
209209 }
210210
211211 /**
@@ -234,7 +234,7 @@ public function test_invalid_hs2019_signatures_for_rsa_sizes() {
234234 );
235235
236236 \add_filter (
237- 'pre_get_remote_metadata_by_actor ' ,
237+ 'activitypub_pre_http_get_remote_object ' ,
238238 function () use ( $ public_key ) {
239239 return array (
240240 'name ' => 'Test User ' ,
@@ -248,7 +248,7 @@ function () use ( $public_key ) {
248248 }
249249 );
250250 $ this ->assertWPError ( Signature::verify_http_signature ( $ request ), 'Invalid hs2019 signature for RSA 2048 bits should fail ' );
251- \remove_all_filters ( 'pre_get_remote_metadata_by_actor ' );
251+ \remove_all_filters ( 'activitypub_pre_http_get_remote_object ' );
252252 }
253253
254254 /**
@@ -276,7 +276,7 @@ public function test_unsupported_ec_curve_for_hs2019() {
276276 ),
277277 );
278278 \add_filter (
279- 'pre_get_remote_metadata_by_actor ' ,
279+ 'activitypub_pre_http_get_remote_object ' ,
280280 function () use ( $ public_key ) {
281281 return array (
282282 'name ' => 'Test User ' ,
@@ -290,7 +290,7 @@ function () use ( $public_key ) {
290290 }
291291 );
292292 $ this ->assertWPError ( Signature::verify_http_signature ( $ request ), 'Unsupported EC curve secp256k1 should fail ' );
293- \remove_all_filters ( 'pre_get_remote_metadata_by_actor ' );
293+ \remove_all_filters ( 'activitypub_pre_http_get_remote_object ' );
294294 }
295295
296296 /**
@@ -303,7 +303,7 @@ public function test_verify_http_signature_with_digest() {
303303 $ keys = Actors::get_keypair ( 1 );
304304
305305 \add_filter (
306- 'pre_get_remote_metadata_by_actor ' ,
306+ 'activitypub_pre_http_get_remote_object ' ,
307307 function () use ( $ keys ) {
308308 return array (
309309 'name ' => 'Admin ' ,
@@ -359,7 +359,7 @@ function () use ( $keys ) {
359359
360360 $ this ->assertTrue ( Signature::verify_http_signature ( $ request ) );
361361
362- \remove_all_filters ( 'pre_get_remote_metadata_by_actor ' );
362+ \remove_all_filters ( 'activitypub_pre_http_get_remote_object ' );
363363 }
364364
365365 /**
@@ -377,7 +377,7 @@ public function test_verify_http_signature_rfc9421() {
377377 $ keys = self ::$ test_keys ['rsa ' ]['4096 ' ];
378378
379379 \add_filter (
380- 'pre_get_remote_metadata_by_actor ' ,
380+ 'activitypub_pre_http_get_remote_object ' ,
381381 function () use ( $ keys ) {
382382 return array (
383383 'name ' => 'Admin ' ,
@@ -441,7 +441,7 @@ function () use ( $keys ) {
441441 // The verification should succeed.
442442 $ this ->assertTrue ( Signature::verify_http_signature ( $ request ) );
443443
444- \remove_all_filters ( 'pre_get_remote_metadata_by_actor ' );
444+ \remove_all_filters ( 'activitypub_pre_http_get_remote_object ' );
445445 \delete_option ( 'activitypub_rfc9421_signature ' );
446446 }
447447
@@ -496,7 +496,7 @@ public function test_verify_http_signature_rfc9421_get_request() {
496496 $ keys = self ::$ test_keys ['rsa ' ]['2048 ' ];
497497
498498 \add_filter (
499- 'pre_get_remote_metadata_by_actor ' ,
499+ 'activitypub_pre_http_get_remote_object ' ,
500500 function () use ( $ keys ) {
501501 return array (
502502 'name ' => 'Admin ' ,
@@ -558,7 +558,7 @@ function () use ( $keys ) {
558558 // The verification should succeed.
559559 $ this ->assertTrue ( Signature::verify_http_signature ( $ request ) );
560560
561- \remove_all_filters ( 'pre_get_remote_metadata_by_actor ' );
561+ \remove_all_filters ( 'activitypub_pre_http_get_remote_object ' );
562562 }
563563
564564 /**
@@ -592,7 +592,7 @@ public function test_verify_http_signature_rfc9421_algorithms() {
592592 */
593593 private function verify_rfc9421_signature_with_keys ( $ keys , $ algorithm ) {
594594 \add_filter (
595- 'pre_get_remote_metadata_by_actor ' ,
595+ 'activitypub_pre_http_get_remote_object ' ,
596596 function () use ( $ keys ) {
597597 return array (
598598 'name ' => 'Admin ' ,
@@ -665,7 +665,7 @@ function () use ( $keys ) {
665665 // The verification should succeed.
666666 $ this ->assertTrue ( Signature::verify_http_signature ( $ request ) );
667667
668- \remove_all_filters ( 'pre_get_remote_metadata_by_actor ' );
668+ \remove_all_filters ( 'activitypub_pre_http_get_remote_object ' );
669669 }
670670
671671 /**
0 commit comments