Changeset 248631 in webkit


Ignore:
Timestamp:
Aug 13, 2019 1:43:00 PM (5 years ago)
Author:
jiewen_tan@apple.com
Message:

[WebAuthn] Make CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator
https://bugs.webkit.org/show_bug.cgi?id=191527
<rdar://problem/54237146>

Reviewed by Chris Dumez.

This patch makes an ABC CtapDriver, which services as an abstract interface for CtapAuthenticator/U2fAuthenticator to talk to
the actual object that implement the specific CTAP protocol that mananges communications over different transports, for example,
CtapHidDriver, such that CtapAuthenticator/U2fAuthenticator can be shared across different transports.

This patch also renames CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator correspondingly.

  • Sources.txt:
  • UIProcess/WebAuthentication/Cocoa/HidService.mm:

(WebKit::HidService::continueAddDeviceAfterGetInfo):

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp.

(WebKit::CtapAuthenticator::CtapAuthenticator):
(WebKit::CtapAuthenticator::makeCredential):
(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const):
(WebKit::CtapAuthenticator::getAssertion):
(WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
(WebKit::CtapAuthenticator::tryDowngrade):

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
  • UIProcess/WebAuthentication/fido/CtapDriver.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
  • UIProcess/WebAuthentication/fido/CtapHidDriver.h:

(WebKit::CtapHidDriver::setProtocol):

  • UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp.

(WebKit::U2fAuthenticator::U2fAuthenticator):
(WebKit::U2fAuthenticator::makeCredential):
(WebKit::U2fAuthenticator::checkExcludeList):
(WebKit::U2fAuthenticator::issueRegisterCommand):
(WebKit::U2fAuthenticator::getAssertion):
(WebKit::U2fAuthenticator::issueSignCommand):
(WebKit::U2fAuthenticator::issueNewCommand):
(WebKit::U2fAuthenticator::issueCommand):
(WebKit::U2fAuthenticator::responseReceived):
(WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueCheckOnlyCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueBogusCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived):

  • UIProcess/WebAuthentication/fido/U2fAuthenticator.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h.
  • WebKit.xcodeproj/project.pbxproj:
Location:
trunk/Source/WebKit
Files:
6 edited
1 copied
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r248598 r248631  
     12019-08-12  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        [WebAuthn] Make CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator
     4        https://bugs.webkit.org/show_bug.cgi?id=191527
     5        <rdar://problem/54237146>
     6
     7        Reviewed by Chris Dumez.
     8
     9        This patch makes an ABC CtapDriver, which services as an abstract interface for CtapAuthenticator/U2fAuthenticator to talk to
     10        the actual object that implement the specific CTAP protocol that mananges communications over different transports, for example,
     11        CtapHidDriver, such that CtapAuthenticator/U2fAuthenticator can be shared across different transports.
     12
     13        This patch also renames CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator correspondingly.
     14
     15        * Sources.txt:
     16        * UIProcess/WebAuthentication/Cocoa/HidService.mm:
     17        (WebKit::HidService::continueAddDeviceAfterGetInfo):
     18        * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp.
     19        (WebKit::CtapAuthenticator::CtapAuthenticator):
     20        (WebKit::CtapAuthenticator::makeCredential):
     21        (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const):
     22        (WebKit::CtapAuthenticator::getAssertion):
     23        (WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
     24        (WebKit::CtapAuthenticator::tryDowngrade):
     25        * UIProcess/WebAuthentication/fido/CtapAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
     26        * UIProcess/WebAuthentication/fido/CtapDriver.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
     27        * UIProcess/WebAuthentication/fido/CtapHidDriver.h:
     28        (WebKit::CtapHidDriver::setProtocol):
     29        * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp.
     30        (WebKit::U2fAuthenticator::U2fAuthenticator):
     31        (WebKit::U2fAuthenticator::makeCredential):
     32        (WebKit::U2fAuthenticator::checkExcludeList):
     33        (WebKit::U2fAuthenticator::issueRegisterCommand):
     34        (WebKit::U2fAuthenticator::getAssertion):
     35        (WebKit::U2fAuthenticator::issueSignCommand):
     36        (WebKit::U2fAuthenticator::issueNewCommand):
     37        (WebKit::U2fAuthenticator::issueCommand):
     38        (WebKit::U2fAuthenticator::responseReceived):
     39        (WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived):
     40        (WebKit::U2fAuthenticator::continueCheckOnlyCommandAfterResponseReceived):
     41        (WebKit::U2fAuthenticator::continueBogusCommandAfterResponseReceived):
     42        (WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived):
     43        * UIProcess/WebAuthentication/fido/U2fAuthenticator.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h.
     44        * WebKit.xcodeproj/project.pbxproj:
     45
    1462019-08-13  Chris Dumez  <cdumez@apple.com>
    247
  • trunk/Source/WebKit/Sources.txt

    r248593 r248631  
    406406UIProcess/UserContent/WebUserContentControllerProxy.cpp
    407407
    408 UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp
     408UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp
    409409UIProcess/WebAuthentication/fido/CtapHidDriver.cpp
    410 UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp
     410UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp
    411411
    412412UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp
  • trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm

    r239852 r248631  
    2929#if ENABLE(WEB_AUTHN) && PLATFORM(MAC)
    3030
    31 #import "CtapHidAuthenticator.h"
     31#import "CtapAuthenticator.h"
    3232#import "CtapHidDriver.h"
    3333#import "HidConnection.h"
    34 #import "U2fHidAuthenticator.h"
     34#import "U2fAuthenticator.h"
    3535#import <WebCore/DeviceRequestConverter.h>
    3636#import <WebCore/DeviceResponseConverter.h>
     
    113113    auto info = readCTAPGetInfoResponse(response);
    114114    if (info && info->versions().find(ProtocolVersion::kCtap) != info->versions().end()) {
    115         observer()->authenticatorAdded(CtapHidAuthenticator::create(WTFMove(driver), WTFMove(*info)));
     115        observer()->authenticatorAdded(CtapAuthenticator::create(WTFMove(driver), WTFMove(*info)));
    116116        return;
    117117    }
    118118    LOG_ERROR("Couldn't parse a ctap get info response.");
    119119    driver->setProtocol(ProtocolVersion::kU2f);
    120     observer()->authenticatorAdded(U2fHidAuthenticator::create(WTFMove(driver)));
     120    observer()->authenticatorAdded(U2fAuthenticator::create(WTFMove(driver)));
    121121}
    122122
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp

    r248630 r248631  
    2525
    2626#include "config.h"
    27 #include "CtapHidAuthenticator.h"
     27#include "CtapAuthenticator.h"
    2828
    2929#if ENABLE(WEB_AUTHN) && PLATFORM(MAC)
    3030
     31#include "CtapDriver.h"
    3132#include "CtapHidDriver.h"
    32 #include "U2fHidAuthenticator.h"
     33#include "U2fAuthenticator.h"
    3334#include <WebCore/DeviceRequestConverter.h>
    3435#include <WebCore/DeviceResponseConverter.h>
     
    4142using namespace fido;
    4243
    43 CtapHidAuthenticator::CtapHidAuthenticator(std::unique_ptr<CtapHidDriver>&& driver, AuthenticatorGetInfoResponse&& info)
     44CtapAuthenticator::CtapAuthenticator(std::unique_ptr<CtapDriver>&& driver, AuthenticatorGetInfoResponse&& info)
    4445    : m_driver(WTFMove(driver))
    4546    , m_info(WTFMove(info))
     
    4950}
    5051
    51 void CtapHidAuthenticator::makeCredential()
     52void CtapAuthenticator::makeCredential()
    5253{
    5354    ASSERT(!m_isDowngraded);
     
    6162}
    6263
    63 void CtapHidAuthenticator::continueMakeCredentialAfterResponseReceived(Vector<uint8_t>&& data) const
     64void CtapAuthenticator::continueMakeCredentialAfterResponseReceived(Vector<uint8_t>&& data) const
    6465{
    6566    auto response = readCTAPMakeCredentialResponse(data, requestData().creationOptions.attestation);
     
    7576}
    7677
    77 void CtapHidAuthenticator::getAssertion()
     78void CtapAuthenticator::getAssertion()
    7879{
    7980    ASSERT(!m_isDowngraded);
     
    8788}
    8889
    89 void CtapHidAuthenticator::continueGetAssertionAfterResponseReceived(Vector<uint8_t>&& data)
     90void CtapAuthenticator::continueGetAssertionAfterResponseReceived(Vector<uint8_t>&& data)
    9091{
    9192    auto response = readCTAPGetAssertionResponse(data);
     
    100101}
    101102
    102 bool CtapHidAuthenticator::tryDowngrade()
     103bool CtapAuthenticator::tryDowngrade()
    103104{
    104105    if (m_info.versions().find(ProtocolVersion::kU2f) == m_info.versions().end())
     
    109110    m_isDowngraded = true;
    110111    m_driver->setProtocol(ProtocolVersion::kU2f);
    111     observer()->downgrade(this, U2fHidAuthenticator::create(WTFMove(m_driver)));
     112    observer()->downgrade(this, U2fAuthenticator::create(WTFMove(m_driver)));
    112113    return true;
    113114}
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.h

    r248630 r248631  
    3333namespace WebKit {
    3434
    35 class CtapHidDriver;
     35class CtapDriver;
    3636
    37 class CtapHidAuthenticator final : public Authenticator {
     37class CtapAuthenticator final : public Authenticator {
    3838public:
    39     static Ref<CtapHidAuthenticator> create(std::unique_ptr<CtapHidDriver>&& driver, fido::AuthenticatorGetInfoResponse&& info)
     39    static Ref<CtapAuthenticator> create(std::unique_ptr<CtapDriver>&& driver, fido::AuthenticatorGetInfoResponse&& info)
    4040    {
    41         return adoptRef(*new CtapHidAuthenticator(WTFMove(driver), WTFMove(info)));
     41        return adoptRef(*new CtapAuthenticator(WTFMove(driver), WTFMove(info)));
    4242    }
    4343
    4444private:
    45     explicit CtapHidAuthenticator(std::unique_ptr<CtapHidDriver>&&, fido::AuthenticatorGetInfoResponse&&);
     45    explicit CtapAuthenticator(std::unique_ptr<CtapDriver>&&, fido::AuthenticatorGetInfoResponse&&);
    4646
    4747    void makeCredential() final;
     
    5252    bool tryDowngrade();
    5353
    54     std::unique_ptr<CtapHidDriver> m_driver;
     54    std::unique_ptr<CtapDriver> m_driver;
    5555    fido::AuthenticatorGetInfoResponse m_info;
    5656    bool m_isDowngraded { false };
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapDriver.h

    r248630 r248631  
    11/*
    2  * Copyright (C) 2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2626#pragma once
    2727
    28 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)
     28#if ENABLE(WEB_AUTHN)
    2929
    30 #include "Authenticator.h"
    31 #include <WebCore/AuthenticatorGetInfoResponse.h>
     30#include <WebCore/FidoConstants.h>
     31#include <wtf/Forward.h>
     32#include <wtf/Function.h>
     33#include <wtf/Noncopyable.h>
     34#include <wtf/WeakPtr.h>
    3235
    3336namespace WebKit {
    3437
    35 class CtapHidDriver;
     38class CtapDriver : public CanMakeWeakPtr<CtapDriver> {
     39    WTF_MAKE_FAST_ALLOCATED;
     40    WTF_MAKE_NONCOPYABLE(CtapDriver);
     41public:
     42    using ResponseCallback = Function<void(Vector<uint8_t>&&)>;
    3643
    37 class CtapHidAuthenticator final : public Authenticator {
    38 public:
    39     static Ref<CtapHidAuthenticator> create(std::unique_ptr<CtapHidDriver>&& driver, fido::AuthenticatorGetInfoResponse&& info)
    40     {
    41         return adoptRef(*new CtapHidAuthenticator(WTFMove(driver), WTFMove(info)));
    42     }
     44    CtapDriver() = default;
     45    virtual ~CtapDriver() = default;
     46
     47    void setProtocol(fido::ProtocolVersion protocol) { m_protocol = protocol; }
     48
     49    virtual void transact(Vector<uint8_t>&& data, ResponseCallback&&) = 0;
     50
     51protected:
     52    fido::ProtocolVersion protocol() const { return m_protocol; }
    4353
    4454private:
    45     explicit CtapHidAuthenticator(std::unique_ptr<CtapHidDriver>&&, fido::AuthenticatorGetInfoResponse&&);
    46 
    47     void makeCredential() final;
    48     void continueMakeCredentialAfterResponseReceived(Vector<uint8_t>&&) const;
    49     void getAssertion() final;
    50     void continueGetAssertionAfterResponseReceived(Vector<uint8_t>&&);
    51 
    52     bool tryDowngrade();
    53 
    54     std::unique_ptr<CtapHidDriver> m_driver;
    55     fido::AuthenticatorGetInfoResponse m_info;
    56     bool m_isDowngraded { false };
     55    fido::ProtocolVersion m_protocol { fido::ProtocolVersion::kCtap };
    5756};
    5857
    5958} // namespace WebKit
    6059
    61 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)
     60#endif // ENABLE(WEB_AUTHN)
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp

    r239852 r248631  
    195195    m_channelId |= static_cast<uint32_t>(payload[index]);
    196196    // FIXME(191534): Check the reset of the payload.
    197     auto cmd = FidoHidMessage::create(m_channelId, m_protocol == ProtocolVersion::kCtap ? FidoHidDeviceCommand::kCbor : FidoHidDeviceCommand::kMsg, m_requestData);
     197    auto cmd = FidoHidMessage::create(m_channelId, protocol() == ProtocolVersion::kCtap ? FidoHidDeviceCommand::kCbor : FidoHidDeviceCommand::kMsg, m_requestData);
    198198    ASSERT(cmd);
    199199    m_worker->transact(WTFMove(*cmd), [weakThis = makeWeakPtr(*this)](Optional<FidoHidMessage>&& response) mutable {
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.h

    r239752 r248631  
    2828#if ENABLE(WEB_AUTHN) && PLATFORM(MAC)
    2929
     30#include "CtapDriver.h"
    3031#include "HidConnection.h"
    31 #include <WebCore/FidoConstants.h>
    3232#include <WebCore/FidoHidMessage.h>
    33 #include <wtf/CompletionHandler.h>
    34 #include <wtf/Forward.h>
    35 #include <wtf/Noncopyable.h>
    3633#include <wtf/UniqueRef.h>
    37 #include <wtf/WeakPtr.h>
    3834
    3935namespace WebKit {
     
    4238// https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#usb
    4339// FSM: Idle => AllocateChannel => Ready
    44 class CtapHidDriver : public CanMakeWeakPtr<CtapHidDriver> {
    45     WTF_MAKE_FAST_ALLOCATED;
    46     WTF_MAKE_NONCOPYABLE(CtapHidDriver);
     40class CtapHidDriver : public CtapDriver {
    4741public:
    48     using ResponseCallback = Function<void(Vector<uint8_t>&&)>;
    49 
    5042    enum class State : uint8_t {
    5143        Idle,
     
    5850    explicit CtapHidDriver(UniqueRef<HidConnection>&&);
    5951
    60     void setProtocol(fido::ProtocolVersion protocol) { m_protocol = protocol; }
    61     void transact(Vector<uint8_t>&& data, ResponseCallback&&);
     52    void transact(Vector<uint8_t>&& data, ResponseCallback&&) final;
    6253
    6354private:
     
    10596    ResponseCallback m_responseCallback;
    10697    Vector<uint8_t> m_nonce;
    107     fido::ProtocolVersion m_protocol { fido::ProtocolVersion::kCtap };
    10898};
    10999
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp

    r248630 r248631  
    2525
    2626#include "config.h"
    27 #include "U2fHidAuthenticator.h"
     27#include "U2fAuthenticator.h"
    2828
    2929#if ENABLE(WEB_AUTHN) && PLATFORM(MAC)
    3030
    31 #include "CtapHidDriver.h"
     31#include "CtapDriver.h"
    3232#include <WebCore/ApduResponse.h>
    3333#include <WebCore/ExceptionData.h>
     
    4646}
    4747
    48 U2fHidAuthenticator::U2fHidAuthenticator(std::unique_ptr<CtapHidDriver>&& driver)
     48U2fAuthenticator::U2fAuthenticator(std::unique_ptr<CtapDriver>&& driver)
    4949    : m_driver(WTFMove(driver))
    50     , m_retryTimer(RunLoop::main(), this, &U2fHidAuthenticator::retryLastCommand)
     50    , m_retryTimer(RunLoop::main(), this, &U2fAuthenticator::retryLastCommand)
    5151{
    5252    // FIXME(191520): We need a way to convert std::unique_ptr to UniqueRef.
     
    5454}
    5555
    56 void U2fHidAuthenticator::makeCredential()
     56void U2fAuthenticator::makeCredential()
    5757{
    5858    if (!isConvertibleToU2fRegisterCommand(requestData().creationOptions)) {
     
    6868}
    6969
    70 void U2fHidAuthenticator::checkExcludeList(size_t index)
     70void U2fAuthenticator::checkExcludeList(size_t index)
    7171{
    7272    if (index >= requestData().creationOptions.excludeCredentials.size()) {
     
    7979}
    8080
    81 void U2fHidAuthenticator::issueRegisterCommand()
     81void U2fAuthenticator::issueRegisterCommand()
    8282{
    8383    auto u2fCmd = convertToU2fRegisterCommand(requestData().hash, requestData().creationOptions);
     
    8686}
    8787
    88 void U2fHidAuthenticator::getAssertion()
     88void U2fAuthenticator::getAssertion()
    8989{
    9090    if (!isConvertibleToU2fSignCommand(requestData().requestOptions)) {
     
    9696}
    9797
    98 void U2fHidAuthenticator::issueSignCommand(size_t index)
     98void U2fAuthenticator::issueSignCommand(size_t index)
    9999{
    100100    if (index >= requestData().requestOptions.allowCredentials.size()) {
     
    107107}
    108108
    109 void U2fHidAuthenticator::issueNewCommand(Vector<uint8_t>&& command, CommandType type)
     109void U2fAuthenticator::issueNewCommand(Vector<uint8_t>&& command, CommandType type)
    110110{
    111111    m_lastCommand = WTFMove(command);
     
    114114}
    115115
    116 void U2fHidAuthenticator::issueCommand(const Vector<uint8_t>& command, CommandType type)
     116void U2fAuthenticator::issueCommand(const Vector<uint8_t>& command, CommandType type)
    117117{
    118118    m_driver->transact(Vector<uint8_t>(command), [weakThis = makeWeakPtr(*this), type](Vector<uint8_t>&& data) {
     
    124124}
    125125
    126 void U2fHidAuthenticator::responseReceived(Vector<uint8_t>&& response, CommandType type)
     126void U2fAuthenticator::responseReceived(Vector<uint8_t>&& response, CommandType type)
    127127{
    128128    auto apduResponse = ApduResponse::createFromMessage(response);
     
    149149}
    150150
    151 void U2fHidAuthenticator::continueRegisterCommandAfterResponseReceived(ApduResponse&& apduResponse)
     151void U2fAuthenticator::continueRegisterCommandAfterResponseReceived(ApduResponse&& apduResponse)
    152152{
    153153    switch (apduResponse.status()) {
     
    170170}
    171171
    172 void U2fHidAuthenticator::continueCheckOnlyCommandAfterResponseReceived(ApduResponse&& apduResponse)
     172void U2fAuthenticator::continueCheckOnlyCommandAfterResponseReceived(ApduResponse&& apduResponse)
    173173{
    174174    switch (apduResponse.status()) {
     
    182182}
    183183
    184 void U2fHidAuthenticator::continueBogusCommandAfterResponseReceived(ApduResponse&& apduResponse)
     184void U2fAuthenticator::continueBogusCommandAfterResponseReceived(ApduResponse&& apduResponse)
    185185{
    186186    switch (apduResponse.status()) {
     
    197197}
    198198
    199 void U2fHidAuthenticator::continueSignCommandAfterResponseReceived(ApduResponse&& apduResponse)
     199void U2fAuthenticator::continueSignCommandAfterResponseReceived(ApduResponse&& apduResponse)
    200200{
    201201    switch (apduResponse.status()) {
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.h

    r248630 r248631  
    3737namespace WebKit {
    3838
    39 class CtapHidDriver;
     39class CtapDriver;
    4040
    41 class U2fHidAuthenticator final : public Authenticator {
     41class U2fAuthenticator final : public Authenticator {
    4242public:
    43     static Ref<U2fHidAuthenticator> create(std::unique_ptr<CtapHidDriver>&& driver)
     43    static Ref<U2fAuthenticator> create(std::unique_ptr<CtapDriver>&& driver)
    4444    {
    45         return adoptRef(*new U2fHidAuthenticator(WTFMove(driver)));
     45        return adoptRef(*new U2fAuthenticator(WTFMove(driver)));
    4646    }
    4747
    4848private:
    49     explicit U2fHidAuthenticator(std::unique_ptr<CtapHidDriver>&&);
     49    explicit U2fAuthenticator(std::unique_ptr<CtapDriver>&&);
    5050
    5151    void makeCredential() final;
     
    7070    void continueSignCommandAfterResponseReceived(apdu::ApduResponse&&);
    7171
    72     std::unique_ptr<CtapHidDriver> m_driver;
    73     RunLoop::Timer<U2fHidAuthenticator> m_retryTimer;
     72    std::unique_ptr<CtapDriver> m_driver;
     73    RunLoop::Timer<U2fAuthenticator> m_retryTimer;
    7474    Vector<uint8_t> m_lastCommand;
    7575    CommandType m_lastCommandType;
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r248593 r248631  
    10391039                572FD44322265CE200A1ECC3 /* WebViewDidMoveToWindowObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 572FD44122265CE200A1ECC3 /* WebViewDidMoveToWindowObserver.h */; };
    10401040                57597EB921811D9A0037F924 /* CtapHidDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 57597EB721811D9A0037F924 /* CtapHidDriver.h */; };
    1041                 57597EBD218184900037F924 /* CtapHidAuthenticator.h in Headers */ = {isa = PBXBuildFile; fileRef = 57597EBB2181848F0037F924 /* CtapHidAuthenticator.h */; };
     1041                57597EBD218184900037F924 /* CtapAuthenticator.h in Headers */ = {isa = PBXBuildFile; fileRef = 57597EBB2181848F0037F924 /* CtapAuthenticator.h */; };
    10421042                576CA9D722B862180030143C /* SOAuthorizationNSURLExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FD317322B35148008D0E8B /* SOAuthorizationNSURLExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
    10431043                5772F206217DBD6A0056BF2C /* HidService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5772F204217DBD6A0056BF2C /* HidService.h */; };
     
    10631063                57DCEDC7214F18300016B847 /* MockLocalConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 57DCEDC5214F18300016B847 /* MockLocalConnection.h */; };
    10641064                57DCEDCB214F4E420016B847 /* MockAuthenticatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 57DCEDC9214F4E420016B847 /* MockAuthenticatorManager.h */; };
    1065                 57EB2E3A21E1983E00B89CDF /* U2fHidAuthenticator.h in Headers */ = {isa = PBXBuildFile; fileRef = 57EB2E3821E1983E00B89CDF /* U2fHidAuthenticator.h */; };
     1065                57EB2E3A21E1983E00B89CDF /* U2fAuthenticator.h in Headers */ = {isa = PBXBuildFile; fileRef = 57EB2E3821E1983E00B89CDF /* U2fAuthenticator.h */; };
    10661066                57FD318022B35158008D0E8B /* NavigationSOAuthorizationSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FD317822B35149008D0E8B /* NavigationSOAuthorizationSession.h */; };
    10671067                57FD318122B3515B008D0E8B /* PopUpSOAuthorizationSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FD317022B35148008D0E8B /* PopUpSOAuthorizationSession.h */; };
     
    34683468                570AB90020B2517400B8BE87 /* AuthenticationChallengeProxyCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AuthenticationChallengeProxyCocoa.mm; sourceTree = "<group>"; };
    34693469                570AB90320B2541C00B8BE87 /* SecKeyProxyStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SecKeyProxyStore.mm; sourceTree = "<group>"; };
     3470                570B73CF230236DD00FAEC53 /* CtapDriver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CtapDriver.h; sourceTree = "<group>"; };
    34703471                572FD44122265CE200A1ECC3 /* WebViewDidMoveToWindowObserver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebViewDidMoveToWindowObserver.h; sourceTree = "<group>"; };
    34713472                575075A720AB763600693EA9 /* WebCredentialMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCredentialMac.mm; sourceTree = "<group>"; };
     
    34763477                5756DD77218D14A200D4EE6A /* MockHidConnection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MockHidConnection.cpp; sourceTree = "<group>"; };
    34773478                57597EB721811D9A0037F924 /* CtapHidDriver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CtapHidDriver.h; sourceTree = "<group>"; };
    3478                 57597EBB2181848F0037F924 /* CtapHidAuthenticator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CtapHidAuthenticator.h; sourceTree = "<group>"; };
    3479                 57597EBC2181848F0037F924 /* CtapHidAuthenticator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CtapHidAuthenticator.cpp; sourceTree = "<group>"; };
     3479                57597EBB2181848F0037F924 /* CtapAuthenticator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CtapAuthenticator.h; sourceTree = "<group>"; };
     3480                57597EBC2181848F0037F924 /* CtapAuthenticator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CtapAuthenticator.cpp; sourceTree = "<group>"; };
    34803481                57597EC021818BE20037F924 /* CtapHidDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CtapHidDriver.cpp; sourceTree = "<group>"; };
    34813482                5760828B2029854200116678 /* WebAuthenticatorCoordinator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebAuthenticatorCoordinator.h; sourceTree = "<group>"; };
     
    35183519                57DCEDC9214F4E420016B847 /* MockAuthenticatorManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MockAuthenticatorManager.h; sourceTree = "<group>"; };
    35193520                57DCEDCD214F51680016B847 /* MockAuthenticatorManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockAuthenticatorManager.cpp; sourceTree = "<group>"; };
    3520                 57EB2E3821E1983E00B89CDF /* U2fHidAuthenticator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = U2fHidAuthenticator.h; sourceTree = "<group>"; };
    3521                 57EB2E3921E1983E00B89CDF /* U2fHidAuthenticator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = U2fHidAuthenticator.cpp; sourceTree = "<group>"; };
     3521                57EB2E3821E1983E00B89CDF /* U2fAuthenticator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = U2fAuthenticator.h; sourceTree = "<group>"; };
     3522                57EB2E3921E1983E00B89CDF /* U2fAuthenticator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = U2fAuthenticator.cpp; sourceTree = "<group>"; };
    35223523                57FD317022B35148008D0E8B /* PopUpSOAuthorizationSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopUpSOAuthorizationSession.h; sourceTree = "<group>"; };
    35233524                57FD317122B35148008D0E8B /* WKSOAuthorizationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKSOAuthorizationDelegate.h; sourceTree = "<group>"; };
     
    69556956                        isa = PBXGroup;
    69566957                        children = (
    6957                                 57597EBC2181848F0037F924 /* CtapHidAuthenticator.cpp */,
    6958                                 57597EBB2181848F0037F924 /* CtapHidAuthenticator.h */,
     6958                                57597EBC2181848F0037F924 /* CtapAuthenticator.cpp */,
     6959                                57597EBB2181848F0037F924 /* CtapAuthenticator.h */,
     6960                                570B73CF230236DD00FAEC53 /* CtapDriver.h */,
    69596961                                57597EC021818BE20037F924 /* CtapHidDriver.cpp */,
    69606962                                57597EB721811D9A0037F924 /* CtapHidDriver.h */,
    6961                                 57EB2E3921E1983E00B89CDF /* U2fHidAuthenticator.cpp */,
    6962                                 57EB2E3821E1983E00B89CDF /* U2fHidAuthenticator.h */,
     6963                                57EB2E3921E1983E00B89CDF /* U2fAuthenticator.cpp */,
     6964                                57EB2E3821E1983E00B89CDF /* U2fAuthenticator.h */,
    69636965                        );
    69646966                        path = fido;
     
    93389340                                B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */,
    93399341                                A1FB68271F6E51C100C43F9F /* CrashReporterClientSPI.h in Headers */,
    9340                                 57597EBD218184900037F924 /* CtapHidAuthenticator.h in Headers */,
     9342                                57597EBD218184900037F924 /* CtapAuthenticator.h in Headers */,
    93419343                                57597EB921811D9A0037F924 /* CtapHidDriver.h in Headers */,
    93429344                                C55F91711C59676E0029E92D /* DataDetectionResult.h in Headers */,
     
    96859687                                2F8336861FA139DF00C6E080 /* TouchBarMenuData.h in Headers */,
    96869688                                46BEB6E322FBB21A00269867 /* TransientLocalStorageNamespace.h in Headers */,
    9687                                 57EB2E3A21E1983E00B89CDF /* U2fHidAuthenticator.h in Headers */,
     9689                                57EB2E3A21E1983E00B89CDF /* U2fAuthenticator.h in Headers */,
    96889690                                1AFE436618B6C081009C7A48 /* UIDelegate.h in Headers */,
    96899691                                515BE1B51D5917FF00DD7C68 /* UIGamepad.h in Headers */,
Note: See TracChangeset for help on using the changeset viewer.