Class U2F::FakeU2F
In: lib/u2f/fake_u2f.rb
Parent: Object

Methods

Constants

CURVE_NAME = "prime256v1".freeze

Attributes

app_id  [RW] 
cert_subject  [RW] 
counter  [RW] 
key_handle_raw  [RW] 

Public Class methods

Initialize a new FakeU2F device for use in tests.

app_id - The appId/origin this is being tested against. options - A Hash of optional parameters (optional).

          :counter      - The initial counter for this device.
          :key_handle   - The raw key-handle this device should use.
          :cert_subject - The subject field for the certificate generated
                          for this device.

Returns nothing.

Public Instance methods

The raw device attestation certificate as returned in the registrationData field of a RegisterResponse Hash.

Returns a DER formatted certificate String.

The appId specific public key as returned in the registrationData field of a RegisterResponse Hash.

Returns a binary formatted EC public key String.

A registerResponse hash as returned by the u2f.register JavaScript API.

challenge - The challenge to sign. error - Boolean. Whether to return an error response (optional).

Returns a JSON encoded Hash String.

A SignResponse hash as returned by the u2f.sign JavaScript API.

challenge - The challenge to sign.

Returns a JSON encoded Hash String.

[Validate]