summaryrefslogtreecommitdiff
path: root/chromium/device/fido/public_key.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/device/fido/public_key.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/device/fido/public_key.h')
-rw-r--r--chromium/device/fido/public_key.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/chromium/device/fido/public_key.h b/chromium/device/fido/public_key.h
index c3e51ab7269..f9e97012984 100644
--- a/chromium/device/fido/public_key.h
+++ b/chromium/device/fido/public_key.h
@@ -6,41 +6,36 @@
#define DEVICE_FIDO_PUBLIC_KEY_H_
#include <stdint.h>
-#include <string>
#include <vector>
#include "base/component_export.h"
#include "base/containers/span.h"
#include "base/macros.h"
+#include "base/optional.h"
namespace device {
// https://www.w3.org/TR/webauthn/#credentialpublickey
-class COMPONENT_EXPORT(DEVICE_FIDO) PublicKey {
- public:
+struct COMPONENT_EXPORT(DEVICE_FIDO) PublicKey {
PublicKey(int32_t algorithm,
base::span<const uint8_t> cbor_bytes,
base::Optional<std::vector<uint8_t>> der_bytes);
- virtual ~PublicKey();
+ ~PublicKey();
- // algorithm returns the COSE algorithm identifier for this public key.
- int32_t algorithm() const;
+ // algorithm contains the COSE algorithm identifier for this public key.
+ const int32_t algorithm;
- // The credential public key as a COSE_Key map as defined in Section 7
- // of https://tools.ietf.org/html/rfc8152.
- const std::vector<uint8_t>& cose_key_bytes() const;
+ // cose_key_bytes contains the credential public key as a COSE_Key map as
+ // defined in Section 7 of https://tools.ietf.org/html/rfc8152.
+ const std::vector<uint8_t> cose_key_bytes;
- // der_bytes returns an ASN.1, DER, SubjectPublicKeyInfo describing this
+ // der_bytes contains an ASN.1, DER, SubjectPublicKeyInfo describing this
// public key, if possible. (WebAuthn can negotiate the use of unknown
// public-key algorithms so not all public keys can be transformed into SPKI
// form.)
- const base::Optional<std::vector<uint8_t>>& der_bytes() const;
+ const base::Optional<std::vector<uint8_t>> der_bytes;
private:
- const int32_t algorithm_;
- std::vector<uint8_t> cbor_bytes_;
- base::Optional<std::vector<uint8_t>> der_bytes_;
-
DISALLOW_COPY_AND_ASSIGN(PublicKey);
};