Changeset 159213 in webkit


Ignore:
Timestamp:
Nov 13, 2013, 11:33:15 AM (12 years ago)
Author:
ap@apple.com
Message:

Check WebCrypto parameter types when casting
https://bugs.webkit.org/show_bug.cgi?id=124297

Reviewed by Sam Weinig.

Also changed existing toCryptoXXX functions to use TYPE_CASTS_BASE mechanism.

  • bindings/js/JSCryptoAlgorithmDictionary.cpp:

(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
And sure enough, there was a bug caught by the added checks.

  • bindings/js/JSCryptoKeySerializationJWK.cpp:

(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):

  • crypto/CryptoAlgorithmParameters.h:

(WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
(WebCore::CryptoAlgorithmParameters::parametersClass):

  • crypto/CryptoKey.h:
  • crypto/CryptoKeyData.h:
  • crypto/CryptoKeySerialization.h:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::generateKey):

  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):

  • crypto/keys/CryptoKeyAES.h:
  • crypto/keys/CryptoKeyDataOctetSequence.h:

(WebCore::isCryptoKeyDataOctetSequence):

  • crypto/keys/CryptoKeyDataRSAComponents.h:

(WebCore::isCryptoKeyDataRSAComponents):

  • crypto/keys/CryptoKeyHMAC.h:
  • crypto/keys/CryptoKeyRSA.h:
  • crypto/keys/CryptoKeySerializationRaw.h:
  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):

  • crypto/mac/CryptoAlgorithmHMACMac.cpp:

(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):

  • crypto/parameters/CryptoAlgorithmAesCbcParams.h:
  • crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
  • crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
  • crypto/parameters/CryptoAlgorithmHmacParams.h:
  • crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
  • crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h:
  • crypto/parameters/CryptoAlgorithmRsaSsaParams.h:
Location:
trunk/Source/WebCore
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r159211 r159213  
     12013-11-13  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Check WebCrypto parameter types when casting
     4        https://bugs.webkit.org/show_bug.cgi?id=124297
     5
     6        Reviewed by Sam Weinig.
     7
     8        Also changed existing toCryptoXXX functions to use TYPE_CASTS_BASE mechanism.
     9
     10        * bindings/js/JSCryptoAlgorithmDictionary.cpp:
     11        (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
     12        And sure enough, there was a bug caught by the added checks.
     13
     14        * bindings/js/JSCryptoKeySerializationJWK.cpp:
     15        (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
     16        * crypto/CryptoAlgorithmParameters.h:
     17        (WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
     18        (WebCore::CryptoAlgorithmParameters::parametersClass):
     19        * crypto/CryptoKey.h:
     20        * crypto/CryptoKeyData.h:
     21        * crypto/CryptoKeySerialization.h:
     22        * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
     23        (WebCore::CryptoAlgorithmAES_CBC::generateKey):
     24        * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
     25        (WebCore::CryptoAlgorithmHMAC::generateKey):
     26        (WebCore::CryptoAlgorithmHMAC::importKey):
     27        * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
     28        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
     29        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
     30        * crypto/keys/CryptoKeyAES.h:
     31        * crypto/keys/CryptoKeyDataOctetSequence.h:
     32        (WebCore::isCryptoKeyDataOctetSequence):
     33        * crypto/keys/CryptoKeyDataRSAComponents.h:
     34        (WebCore::isCryptoKeyDataRSAComponents):
     35        * crypto/keys/CryptoKeyHMAC.h:
     36        * crypto/keys/CryptoKeyRSA.h:
     37        * crypto/keys/CryptoKeySerializationRaw.h:
     38        * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
     39        (WebCore::CryptoAlgorithmAES_CBC::encrypt):
     40        (WebCore::CryptoAlgorithmAES_CBC::decrypt):
     41        * crypto/mac/CryptoAlgorithmHMACMac.cpp:
     42        (WebCore::CryptoAlgorithmHMAC::sign):
     43        (WebCore::CryptoAlgorithmHMAC::verify):
     44        * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
     45        * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
     46        * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
     47        * crypto/parameters/CryptoAlgorithmHmacParams.h:
     48        * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
     49        * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h:
     50        * crypto/parameters/CryptoAlgorithmRsaSsaParams.h:
     51
    1522013-11-13  Alexey Proskuryakov  <ap@apple.com>
    253
  • trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp

    r159180 r159213  
    539539        return std::make_unique<CryptoAlgorithmParameters>();
    540540    case CryptoAlgorithmIdentifier::HMAC:
    541         return createHmacKeyParams(exec, value);
     541        return createHmacParams(exec, value);
    542542    case CryptoAlgorithmIdentifier::DH:
    543543        return std::make_unique<CryptoAlgorithmParameters>();
  • trunk/Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp

    r159180 r159213  
    213213
    214214    if (algorithm->identifier() == CryptoAlgorithmIdentifier::HMAC)
    215         return static_cast<CryptoAlgorithmHmacParams&>(*parameters).hash == static_cast<CryptoAlgorithmHmacParams&>(*suggestedParameters).hash;
     215        return toCryptoAlgorithmHmacParams(*parameters).hash == toCryptoAlgorithmHmacParams(*suggestedParameters).hash;
    216216    if (algorithm->identifier() == CryptoAlgorithmIdentifier::RSASSA_PKCS1_v1_5) {
    217         CryptoAlgorithmRsaSsaKeyParams& rsaSSAParameters = static_cast<CryptoAlgorithmRsaSsaKeyParams&>(*parameters);
    218         CryptoAlgorithmRsaSsaKeyParams& suggestedRSASSAParameters = static_cast<CryptoAlgorithmRsaSsaKeyParams&>(*suggestedParameters);
     217        CryptoAlgorithmRsaSsaKeyParams& rsaSSAParameters = toCryptoAlgorithmRsaSsaKeyParams(*parameters);
     218        CryptoAlgorithmRsaSsaKeyParams& suggestedRSASSAParameters = toCryptoAlgorithmRsaSsaKeyParams(*suggestedParameters);
    219219        ASSERT(rsaSSAParameters.hasHash);
    220220        if (suggestedRSASSAParameters.hasHash)
  • trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h

    r158363 r159213  
    3838    CryptoAlgorithmParameters() { }
    3939    virtual ~CryptoAlgorithmParameters() { }
     40
     41    ENUM_CLASS(Class) {
     42        None,
     43        AesCbcParams,
     44        AesKeyGenParams,
     45        HmacKeyParams,
     46        HmacParams,
     47        RsaKeyGenParams,
     48        RsaSsaKeyParams,
     49        RsaSsaParams
     50    };
     51    virtual Class parametersClass() const { return Class::None; }
    4052};
     53
     54#define CRYPTO_ALGORITHM_PARAMETERS_CASTS(ToClassName) \
     55    TYPE_CASTS_BASE(CryptoAlgorithm##ToClassName, CryptoAlgorithmParameters, parameters, parameters->parametersClass() == CryptoAlgorithmParameters::Class::ToClassName, parameters.parametersClass() == CryptoAlgorithmParameters::Class::ToClassName)
    4156
    4257}
  • trunk/Source/WebCore/crypto/CryptoKey.h

    r159180 r159213  
    6969};
    7070
     71#define CRYPTO_KEY_TYPE_CASTS(ToClassName) \
     72    TYPE_CASTS_BASE(ToClassName, CryptoKey, key, WebCore::is##ToClassName(*key), WebCore::is##ToClassName(key))
     73
    7174} // namespace WebCore
    7275
  • trunk/Source/WebCore/crypto/CryptoKeyData.h

    r159180 r159213  
    3434
    3535class CryptoKeyData {
    36 WTF_MAKE_NONCOPYABLE(CryptoKeyData);
     36    WTF_MAKE_NONCOPYABLE(CryptoKeyData);
    3737public:
    3838    ENUM_CLASS(Format) {
     
    5353};
    5454
     55#define CRYPTO_KEY_DATA_CASTS(ToClassName) \
     56    TYPE_CASTS_BASE(ToClassName, CryptoKeyData, keyData, WebCore::is##ToClassName(*keyData), WebCore::is##ToClassName(keyData))
     57
    5558} // namespace WebCore
    5659
  • trunk/Source/WebCore/crypto/CryptoKeySerialization.h

    r158943 r159213  
    4141
    4242class CryptoKeySerialization {
    43 WTF_MAKE_NONCOPYABLE(CryptoKeySerialization);
     43    WTF_MAKE_NONCOPYABLE(CryptoKeySerialization);
    4444public:
    4545    CryptoKeySerialization() { }
  • trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp

    r159180 r159213  
    5959void CryptoAlgorithmAES_CBC::generateKey(const CryptoAlgorithmParameters& parameters, bool extractable, CryptoKeyUsage usages, std::unique_ptr<PromiseWrapper> promise, ExceptionCode&)
    6060{
    61     const CryptoAlgorithmAesKeyGenParams& aesParameters = static_cast<const CryptoAlgorithmAesKeyGenParams&>(parameters);
     61    const CryptoAlgorithmAesKeyGenParams& aesParameters = toCryptoAlgorithmAesKeyGenParams(parameters);
    6262
    6363    RefPtr<CryptoKeyAES> result = CryptoKeyAES::generate(CryptoAlgorithmIdentifier::AES_CBC, aesParameters.length, extractable, usages);
  • trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp

    r159180 r159213  
    6060void CryptoAlgorithmHMAC::generateKey(const CryptoAlgorithmParameters& parameters, bool extractable, CryptoKeyUsage usages, std::unique_ptr<PromiseWrapper> promise, ExceptionCode&)
    6161{
    62     const CryptoAlgorithmHmacKeyParams& hmacParameters = static_cast<const CryptoAlgorithmHmacKeyParams&>(parameters);
     62    const CryptoAlgorithmHmacKeyParams& hmacParameters = toCryptoAlgorithmHmacKeyParams(parameters);
    6363
    6464    RefPtr<CryptoKeyHMAC> result = CryptoKeyHMAC::generate(hmacParameters.hasLength ? hmacParameters.length : 0, hmacParameters.hash, extractable, usages);
     
    7979    const CryptoKeyDataOctetSequence& keyDataOctetSequence = toCryptoKeyDataOctetSequence(keyData);
    8080
    81     const CryptoAlgorithmHmacParams& hmacParameters = static_cast<const CryptoAlgorithmHmacParams&>(parameters);
     81    const CryptoAlgorithmHmacParams& hmacParameters = toCryptoAlgorithmHmacParams(parameters);
    8282
    8383    RefPtr<CryptoKeyHMAC> result = CryptoKeyHMAC::create(keyDataOctetSequence.octetSequence(), hmacParameters.hash, extractable, usage);
  • trunk/Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp

    r159180 r159213  
    5959void CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey(const CryptoAlgorithmParameters& parameters, const CryptoKeyData& keyData, bool extractable, CryptoKeyUsage usage, std::unique_ptr<PromiseWrapper> promise, ExceptionCode&)
    6060{
    61     const CryptoAlgorithmRsaSsaKeyParams& rsaSSAParameters = static_cast<const CryptoAlgorithmRsaSsaKeyParams&>(parameters);
     61    const CryptoAlgorithmRsaSsaKeyParams& rsaSSAParameters = toCryptoAlgorithmRsaSsaKeyParams(parameters);
    6262    const CryptoKeyDataRSAComponents& rsaComponents = toCryptoKeyDataRSAComponents(keyData);
    6363
     
    7676void CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey(const CryptoAlgorithmParameters& parameters, bool extractable, CryptoKeyUsage usages, std::unique_ptr<PromiseWrapper> promise, ExceptionCode&)
    7777{
    78     const CryptoAlgorithmRsaKeyGenParams& rsaParameters = static_cast<const CryptoAlgorithmRsaKeyGenParams&>(parameters);
     78    const CryptoAlgorithmRsaKeyGenParams& rsaParameters = toCryptoAlgorithmRsaKeyGenParams(parameters);
    7979
    8080    CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier::RSASSA_PKCS1_v1_5, rsaParameters.modulusLength, rsaParameters.publicExponent, extractable, usages, std::move(promise));
  • trunk/Source/WebCore/crypto/keys/CryptoKeyAES.h

    r159180 r159213  
    6262}
    6363
    64 inline const CryptoKeyAES& toCryptoKeyAES(const CryptoKey& key)
    65 {
    66     ASSERT_WITH_SECURITY_IMPLICATION(isCryptoKeyAES(key));
    67     return static_cast<const CryptoKeyAES&>(key);
    68 }
    69 
    70 inline CryptoKeyAES& toCryptoKeyAES(CryptoKey& key)
    71 {
    72     ASSERT_WITH_SECURITY_IMPLICATION(isCryptoKeyAES(key));
    73     return static_cast<CryptoKeyAES&>(key);
    74 }
     64CRYPTO_KEY_TYPE_CASTS(CryptoKeyAES)
    7565
    7666} // namespace WebCore
  • trunk/Source/WebCore/crypto/keys/CryptoKeyDataOctetSequence.h

    r159180 r159213  
    5050};
    5151
    52 inline const CryptoKeyDataOctetSequence& toCryptoKeyDataOctetSequence(const CryptoKeyData& data)
     52inline bool isCryptoKeyDataOctetSequence(const CryptoKeyData& data)
    5353{
    54     ASSERT(data.format() == CryptoKeyData::Format::OctetSequence);
    55     return static_cast<const CryptoKeyDataOctetSequence&>(data);
     54    return data.format() == CryptoKeyData::Format::OctetSequence;
    5655}
     56
     57CRYPTO_KEY_DATA_CASTS(CryptoKeyDataOctetSequence)
    5758
    5859} // namespace WebCore
  • trunk/Source/WebCore/crypto/keys/CryptoKeyDataRSAComponents.h

    r159180 r159213  
    9696};
    9797
    98 inline const CryptoKeyDataRSAComponents& toCryptoKeyDataRSAComponents(const CryptoKeyData& data)
     98inline bool isCryptoKeyDataRSAComponents(const CryptoKeyData& data)
    9999{
    100     ASSERT(data.format() == CryptoKeyData::Format::RSAComponents);
    101     return static_cast<const CryptoKeyDataRSAComponents&>(data);
     100    return data.format() == CryptoKeyData::Format::RSAComponents;
    102101}
     102
     103CRYPTO_KEY_DATA_CASTS(CryptoKeyDataRSAComponents)
    103104
    104105} // namespace WebCore
  • trunk/Source/WebCore/crypto/keys/CryptoKeyHMAC.h

    r159180 r159213  
    6363}
    6464
    65 inline const CryptoKeyHMAC& toCryptoKeyHMAC(const CryptoKey& key)
    66 {
    67     ASSERT_WITH_SECURITY_IMPLICATION(isCryptoKeyHMAC(key));
    68     return static_cast<const CryptoKeyHMAC&>(key);
    69 }
    70 
    71 inline CryptoKeyHMAC& toCryptoKeyHMAC(CryptoKey& key)
    72 {
    73     ASSERT_WITH_SECURITY_IMPLICATION(isCryptoKeyHMAC(key));
    74     return static_cast<CryptoKeyHMAC&>(key);
    75 }
     65CRYPTO_KEY_TYPE_CASTS(CryptoKeyHMAC)
    7666
    7767} // namespace WebCore
  • trunk/Source/WebCore/crypto/keys/CryptoKeyRSA.h

    r159180 r159213  
    7575}
    7676
    77 inline const CryptoKeyRSA& toCryptoKeyRSA(const CryptoKey& key)
    78 {
    79     ASSERT_WITH_SECURITY_IMPLICATION(isCryptoKeyRSA(key));
    80     return static_cast<const CryptoKeyRSA&>(key);
    81 }
    82 
    83 inline CryptoKeyRSA& asCryptoKeyRSA(CryptoKey& key)
    84 {
    85     ASSERT_WITH_SECURITY_IMPLICATION(isCryptoKeyRSA(key));
    86     return static_cast<CryptoKeyRSA&>(key);
    87 }
     77CRYPTO_KEY_TYPE_CASTS(CryptoKeyRSA)
    8878
    8979} // namespace WebCore
  • trunk/Source/WebCore/crypto/keys/CryptoKeySerializationRaw.h

    r158943 r159213  
    3636
    3737class CryptoKeySerializationRaw FINAL : public CryptoKeySerialization {
    38 WTF_MAKE_NONCOPYABLE(CryptoKeySerializationRaw);
     38    WTF_MAKE_NONCOPYABLE(CryptoKeySerializationRaw);
    3939public:
    4040    static std::unique_ptr<CryptoKeySerializationRaw> create(const CryptoOperationData& data)
     
    4545    virtual ~CryptoKeySerializationRaw();
    4646
     47private:
     48    CryptoKeySerializationRaw(const CryptoOperationData&);
     49
    4750    virtual bool reconcileAlgorithm(std::unique_ptr<CryptoAlgorithm>&, std::unique_ptr<CryptoAlgorithmParameters>&) const OVERRIDE;
    4851
     
    5154
    5255    virtual std::unique_ptr<CryptoKeyData> keyData() const OVERRIDE;
    53 
    54 private:
    55     CryptoKeySerializationRaw(const CryptoOperationData&);
    5656
    5757    Vector<char> m_data;
  • trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp

    r159180 r159213  
    9292void CryptoAlgorithmAES_CBC::encrypt(const CryptoAlgorithmParameters& parameters, const CryptoKey& key, const Vector<CryptoOperationData>& data, std::unique_ptr<PromiseWrapper> promise, ExceptionCode& ec)
    9393{
    94     const CryptoAlgorithmAesCbcParams& aesCBCParameters = static_cast<const CryptoAlgorithmAesCbcParams&>(parameters);
     94    const CryptoAlgorithmAesCbcParams& aesCBCParameters = toCryptoAlgorithmAesCbcParams(parameters);
    9595
    9696    if (!isCryptoKeyAES(key)) {
     
    105105void CryptoAlgorithmAES_CBC::decrypt(const CryptoAlgorithmParameters& parameters, const CryptoKey& key, const Vector<CryptoOperationData>& data, std::unique_ptr<PromiseWrapper> promise, ExceptionCode& ec)
    106106{
    107     const CryptoAlgorithmAesCbcParams& aesCBCParameters = static_cast<const CryptoAlgorithmAesCbcParams&>(parameters);
     107    const CryptoAlgorithmAesCbcParams& aesCBCParameters = toCryptoAlgorithmAesCbcParams(parameters);
    108108
    109109    if (!isCryptoKeyAES(key)) {
  • trunk/Source/WebCore/crypto/mac/CryptoAlgorithmHMACMac.cpp

    r159180 r159213  
    9595void CryptoAlgorithmHMAC::sign(const CryptoAlgorithmParameters& parameters, const CryptoKey& key, const Vector<CryptoOperationData>& data, std::unique_ptr<PromiseWrapper> promise, ExceptionCode& ec)
    9696{
    97     const CryptoAlgorithmHmacParams& hmacParameters = static_cast<const CryptoAlgorithmHmacParams&>(parameters);
     97    const CryptoAlgorithmHmacParams& hmacParameters = toCryptoAlgorithmHmacParams(parameters);
    9898
    9999    if (!isCryptoKeyHMAC(key)) {
     
    116116void CryptoAlgorithmHMAC::verify(const CryptoAlgorithmParameters& parameters, const CryptoKey& key, const CryptoOperationData& expectedSignature, const Vector<CryptoOperationData>& data, std::unique_ptr<PromiseWrapper> promise, ExceptionCode& ec)
    117117{
    118     const CryptoAlgorithmHmacParams& hmacParameters = static_cast<const CryptoAlgorithmHmacParams&>(parameters);
     118    const CryptoAlgorithmHmacParams& hmacParameters = toCryptoAlgorithmHmacParams(parameters);
    119119
    120120    if (!isCryptoKeyHMAC(key)) {
  • trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h

    r158945 r159213  
    3838    // The initialization vector. MUST be 16 bytes.
    3939    FixedArray<char, 16> iv;
     40
     41    virtual Class parametersClass() const OVERRIDE { return Class::AesCbcParams; }
    4042};
     43
     44CRYPTO_ALGORITHM_PARAMETERS_CASTS(AesCbcParams)
    4145
    4246}
  • trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmAesKeyGenParams.h

    r158945 r159213  
    3737    // The length, in bits, of the key.
    3838    unsigned length;
     39
     40    virtual Class parametersClass() const OVERRIDE { return Class::AesKeyGenParams; }
    3941};
     42
     43CRYPTO_ALGORITHM_PARAMETERS_CASTS(AesKeyGenParams)
    4044
    4145}
  • trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmHmacKeyParams.h

    r159180 r159213  
    4848    bool hasLength;
    4949    unsigned length;
     50
     51    virtual Class parametersClass() const OVERRIDE { return Class::HmacKeyParams; }
    5052};
     53
     54CRYPTO_ALGORITHM_PARAMETERS_CASTS(HmacKeyParams)
    5155
    5256}
  • trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmHmacParams.h

    r158366 r159213  
    3838    // The inner hash function to use.
    3939    CryptoAlgorithmIdentifier hash;
     40
     41    virtual Class parametersClass() const OVERRIDE { return Class::HmacParams; }
    4042};
     43
     44CRYPTO_ALGORITHM_PARAMETERS_CASTS(HmacParams)
    4145
    4246}
  • trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h

    r159180 r159213  
    3939    // The RSA public exponent, encoded as BigInteger.
    4040    Vector<char> publicExponent;
     41
     42    virtual Class parametersClass() const OVERRIDE { return Class::RsaKeyGenParams; }
    4143};
     44
     45CRYPTO_ALGORITHM_PARAMETERS_CASTS(RsaKeyGenParams)
    4246
    4347}
  • trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h

    r159180 r159213  
    4747    bool hasHash;
    4848    CryptoAlgorithmIdentifier hash;
     49
     50    virtual Class parametersClass() const OVERRIDE { return Class::RsaSsaKeyParams; }
    4951};
     52
     53CRYPTO_ALGORITHM_PARAMETERS_CASTS(RsaSsaKeyParams)
    5054
    5155}
  • trunk/Source/WebCore/crypto/parameters/CryptoAlgorithmRsaSsaParams.h

    r159180 r159213  
    3838    // The hash algorithm to use.
    3939    CryptoAlgorithmIdentifier hash;
     40
     41    virtual Class parametersClass() const OVERRIDE { return Class::RsaSsaParams; }
    4042};
     43
     44CRYPTO_ALGORITHM_PARAMETERS_CASTS(RsaSsaParams)
    4145
    4246}
Note: See TracChangeset for help on using the changeset viewer.