|
@@ -1112,7 +1112,7 @@ WebIDL::ExceptionOr<GC::Ref<JS::Object>> RSAOAEP::export_key(Bindings::KeyFormat
|
|
|
// that represents the RSA public key represented by the [[handle]] internal slot of key
|
|
|
auto maybe_data = handle.visit(
|
|
|
[&](::Crypto::PK::RSAPublicKey<> const& public_key) -> ErrorOr<ByteBuffer> {
|
|
|
- return TRY(::Crypto::PK::wrap_in_subject_public_key_info(public_key, Array { ::Crypto::Certificate::rsa_encryption_oid }));
|
|
|
+ return TRY(::Crypto::PK::wrap_in_subject_public_key_info(public_key, Array { ::Crypto::Certificate::rsa_encryption_oid }, nullptr));
|
|
|
},
|
|
|
[](auto) -> ErrorOr<ByteBuffer> {
|
|
|
VERIFY_NOT_REACHED();
|
|
@@ -1139,7 +1139,7 @@ WebIDL::ExceptionOr<GC::Ref<JS::Object>> RSAOAEP::export_key(Bindings::KeyFormat
|
|
|
// that represents the RSA private key represented by the [[handle]] internal slot of key
|
|
|
auto maybe_data = handle.visit(
|
|
|
[&](::Crypto::PK::RSAPrivateKey<> const& private_key) -> ErrorOr<ByteBuffer> {
|
|
|
- return TRY(::Crypto::PK::wrap_in_private_key_info(private_key, Array { ::Crypto::Certificate::rsa_encryption_oid }));
|
|
|
+ return TRY(::Crypto::PK::wrap_in_private_key_info(private_key, Array { ::Crypto::Certificate::rsa_encryption_oid }, nullptr));
|
|
|
},
|
|
|
[](auto) -> ErrorOr<ByteBuffer> {
|
|
|
VERIFY_NOT_REACHED();
|
|
@@ -2971,7 +2971,7 @@ WebIDL::ExceptionOr<GC::Ref<JS::Object>> ED25519::export_key(Bindings::KeyFormat
|
|
|
// * Set the algorithm object identifier to the id-Ed25519 OID defined in [RFC8410].
|
|
|
// * Set the subjectPublicKey field to keyData.
|
|
|
auto ed25519_oid = ::Crypto::Certificate::ed25519_oid;
|
|
|
- auto data = TRY_OR_THROW_OOM(vm, ::Crypto::PK::wrap_in_subject_public_key_info(key_data, ed25519_oid));
|
|
|
+ auto data = TRY_OR_THROW_OOM(vm, ::Crypto::PK::wrap_in_subject_public_key_info(key_data, ed25519_oid, nullptr));
|
|
|
|
|
|
// 3. Let result be a new ArrayBuffer associated with the relevant global object of this [HTML], and containing data.
|
|
|
return JS::ArrayBuffer::create(m_realm, move(data));
|
|
@@ -2990,7 +2990,7 @@ WebIDL::ExceptionOr<GC::Ref<JS::Object>> ED25519::export_key(Bindings::KeyFormat
|
|
|
// * Set the privateKey field to the result of DER-encoding a CurvePrivateKey ASN.1 type, as defined in Section 7 of [RFC8410], that represents the Ed25519 private key represented by the [[handle]] internal slot of key
|
|
|
|
|
|
auto ed25519_oid = ::Crypto::Certificate::ed25519_oid;
|
|
|
- auto data = TRY_OR_THROW_OOM(vm, ::Crypto::PK::wrap_in_private_key_info(key_data, ed25519_oid));
|
|
|
+ auto data = TRY_OR_THROW_OOM(vm, ::Crypto::PK::wrap_in_private_key_info(key_data, ed25519_oid, nullptr));
|
|
|
|
|
|
// 3. Let result be a new ArrayBuffer associated with the relevant global object of this [HTML], and containing data.
|
|
|
return JS::ArrayBuffer::create(m_realm, move(data));
|
|
@@ -3659,7 +3659,7 @@ WebIDL::ExceptionOr<GC::Ref<JS::Object>> X25519::export_key(Bindings::KeyFormat
|
|
|
// Set the algorithm object identifier to the id-X25519 OID defined in [RFC8410].
|
|
|
// Set the subjectPublicKey field to keyData.
|
|
|
auto public_key = handle.get<ByteBuffer>();
|
|
|
- auto data = TRY_OR_THROW_OOM(vm, ::Crypto::PK::wrap_in_subject_public_key_info(public_key, Array { ::Crypto::Certificate::x25519_oid }));
|
|
|
+ auto data = TRY_OR_THROW_OOM(vm, ::Crypto::PK::wrap_in_subject_public_key_info(public_key, Array { ::Crypto::Certificate::x25519_oid }, nullptr));
|
|
|
|
|
|
// 3. Let result be a new ArrayBuffer associated with the relevant global object of this [HTML], and containing data.
|
|
|
result = JS::ArrayBuffer::create(m_realm, data);
|
|
@@ -3678,7 +3678,7 @@ WebIDL::ExceptionOr<GC::Ref<JS::Object>> X25519::export_key(Bindings::KeyFormat
|
|
|
// Set the privateKey field to the result of DER-encoding a CurvePrivateKey ASN.1 type, as defined in Section 7 of [RFC8410],
|
|
|
// that represents the X25519 private key represented by the [[handle]] internal slot of key
|
|
|
auto private_key = handle.get<ByteBuffer>();
|
|
|
- auto data = TRY_OR_THROW_OOM(vm, ::Crypto::PK::wrap_in_private_key_info(private_key, Array { ::Crypto::Certificate::x25519_oid }));
|
|
|
+ auto data = TRY_OR_THROW_OOM(vm, ::Crypto::PK::wrap_in_private_key_info(private_key, Array { ::Crypto::Certificate::x25519_oid }, nullptr));
|
|
|
|
|
|
// 3. Let result be a new ArrayBuffer associated with the relevant global object of this [HTML], and containing data.
|
|
|
result = JS::ArrayBuffer::create(m_realm, data);
|
|
@@ -3903,7 +3903,7 @@ WebIDL::ExceptionOr<GC::Ref<JS::Object>> X448::export_key(Bindings::KeyFormat fo
|
|
|
// * Set the algorithm object identifier to the id-X448 OID defined in [RFC8410].
|
|
|
// * Set the subjectPublicKey field to keyData.
|
|
|
auto x448_oid = ::Crypto::Certificate::x448_oid;
|
|
|
- auto data = TRY_OR_THROW_OOM(m_realm->vm(), ::Crypto::PK::wrap_in_subject_public_key_info(key_data, x448_oid));
|
|
|
+ auto data = TRY_OR_THROW_OOM(m_realm->vm(), ::Crypto::PK::wrap_in_subject_public_key_info(key_data, x448_oid, nullptr));
|
|
|
|
|
|
// 3. Let result be a new ArrayBuffer associated with the relevant global object of this [HTML], and containing data.
|
|
|
return JS::ArrayBuffer::create(m_realm, data);
|
|
@@ -3921,7 +3921,7 @@ WebIDL::ExceptionOr<GC::Ref<JS::Object>> X448::export_key(Bindings::KeyFormat fo
|
|
|
// * Set the algorithm object identifier to the id-X448 OID defined in [RFC8410].
|
|
|
// * Set the privateKey field to the result of DER-encoding a CurvePrivateKey ASN.1 type, as defined in Section 7 of [RFC8410], that represents the X448 private key represented by the [[handle]] internal slot of key
|
|
|
auto x448_oid = ::Crypto::Certificate::x448_oid;
|
|
|
- auto data = TRY_OR_THROW_OOM(m_realm->vm(), ::Crypto::PK::wrap_in_private_key_info(key_data, x448_oid));
|
|
|
+ auto data = TRY_OR_THROW_OOM(m_realm->vm(), ::Crypto::PK::wrap_in_private_key_info(key_data, x448_oid, nullptr));
|
|
|
|
|
|
// 3. Let result be a new ArrayBuffer associated with the relevant global object of this [HTML], and containing data.
|
|
|
return JS::ArrayBuffer::create(m_realm, data);
|