File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 502502 end
503503
504504 describe "migrated U2F credential" do
505- let ( :origin ) { "https://f69df4d9.ngrok.io " }
505+ let ( :origin ) { "https://example.org " }
506506 let ( :app_id ) { "#{ origin } /appid" }
507507 let ( :migrated_credential ) do
508508 WebAuthn ::U2fMigrator . new (
Original file line number Diff line number Diff line change 298298 ) . to be_truthy
299299 end
300300
301- context "if appid extension is not requested " do
301+ context "if appid extension output is not present " do
302302 let ( :public_key_credential ) do
303303 WebAuthn ::PublicKeyCredentialWithAssertion . new (
304304 type : credential_type ,
331331 end . to raise_error ( "Unspecified legacy U2F AppID" )
332332 end
333333
334- context "if appid extension is not requested " do
334+ context "if appid extension output is not present " do
335335 let ( :public_key_credential ) do
336336 WebAuthn ::PublicKeyCredentialWithAssertion . new (
337337 type : credential_type ,
Original file line number Diff line number Diff line change 1818 end
1919
2020 let ( :stored_credential ) { seeds [ :u2f_migration ] [ :stored_credential ] }
21- let ( :app_id ) { URI ( "https://f69df4d9.ngrok.io " ) }
21+ let ( :app_id ) { URI ( "https://example.org " ) }
2222
2323 it "returns the credential ID" do
2424 expect ( WebAuthn ::Encoders ::Base64Encoder . encode ( u2f_migrator . credential . id ) )
25- . to eq ( "1a9tIwwYiYNdmfmxVaksOkxKapK2HtDNSsL4MssbCHILhkMzA0xZYk5IHmBljyblTQ/SnsQea+QEMzgTN2L1Mw= =" )
25+ . to eq ( "pLpuLSz+xDZI19JcXtVlm8GPK3gVOFJ+vUkt4DJWvfQ =" )
2626 end
2727
2828 it "returns the credential public key in COSE format" do
2929 public_key = COSE ::Key . deserialize ( u2f_migrator . credential . public_key )
3030
3131 expect ( public_key . alg ) . to eq ( -7 )
3232 expect ( public_key . crv ) . to eq ( 1 )
33- expect ( public_key . x ) . to eq ( WebAuthn ::Encoders ::Base64Encoder . decode ( "FtOd9t3mxj6sLFkNCLzv5qS9l52MipHznrsZ+uwtHQY =" ) )
34- expect ( public_key . y ) . to eq ( WebAuthn ::Encoders ::Base64Encoder . decode ( "np4zBpD5zhdSq1wKPvhzEoKJvFuYel1cpdTCzpahrBA =" ) )
33+ expect ( public_key . x ) . to eq ( WebAuthn ::Encoders ::Base64Encoder . decode ( "sNYt5rMPhvC6x6kBaVE5HC4xhJ4uZGYcvSsTzX1VCK0 =" ) )
34+ expect ( public_key . y ) . to eq ( WebAuthn ::Encoders ::Base64Encoder . decode ( "UDsL2io1eppLNEdaKOZbZgtImKnj6bvwgg1DSUKX7dA =" ) )
3535 end
3636
3737 it "returns the signature counter" do
4545 it "returns the attestation certificate" do
4646 certificate = u2f_migrator . attestation_trust_path . first
4747
48- expect ( certificate . subject . to_s ) . to eq ( "/CN=U2F Device " )
49- expect ( certificate . issuer . to_s ) . to eq ( "/CN=U2F Issuer " )
48+ expect ( certificate . subject . to_s ) . to eq ( "/CN=WebAuthn test vectors/O=W3C/OU=Authenticator Attestation/C=AA " )
49+ expect ( certificate . issuer . to_s ) . to eq ( "/CN=WebAuthn test vectors/O=W3C/OU=Authenticator Attestation CA/C=AA " )
5050 end
5151end
You can’t perform that action at this time.
0 commit comments