@@ -3607,31 +3607,44 @@ namespace jwt {
3607
3607
}
3608
3608
3609
3609
if (alg_name == " RS256" ) {
3610
- return std::make_unique<algo<jwt::algorithm::rs256>>(jwt::algorithm::rs256 (key.get_pkey ()));
3610
+ return std::unique_ptr<algo<jwt::algorithm::rs256>>(
3611
+ new algo<jwt::algorithm::rs256>(jwt::algorithm::rs256 (key.get_pkey ())));
3611
3612
} else if (alg_name == " RS384" ) {
3612
- return std::make_unique<algo<jwt::algorithm::rs384>>(jwt::algorithm::rs384 (key.get_pkey ()));
3613
+ return std::unique_ptr<algo<jwt::algorithm::rs384>>(
3614
+ new algo<jwt::algorithm::rs384>(jwt::algorithm::rs384 (key.get_pkey ())));
3613
3615
} else if (alg_name == " RS512" ) {
3614
- return std::make_unique<algo<jwt::algorithm::rs512>>(jwt::algorithm::rs512 (key.get_pkey ()));
3616
+ return std::unique_ptr<algo<jwt::algorithm::rs512>>(
3617
+ new algo<jwt::algorithm::rs512>(jwt::algorithm::rs512 (key.get_pkey ())));
3615
3618
} else if (alg_name == " PS256" ) {
3616
- return std::make_unique<algo<jwt::algorithm::ps256>>(jwt::algorithm::ps256 (key.get_pkey ()));
3619
+ return std::unique_ptr<algo<jwt::algorithm::ps256>>(
3620
+ new algo<jwt::algorithm::ps256>(jwt::algorithm::ps256 (key.get_pkey ())));
3617
3621
} else if (alg_name == " PS384" ) {
3618
- return std::make_unique<algo<jwt::algorithm::ps384>>(jwt::algorithm::ps384 (key.get_pkey ()));
3622
+ return std::unique_ptr<algo<jwt::algorithm::ps384>>(
3623
+ new algo<jwt::algorithm::ps384>(jwt::algorithm::ps384 (key.get_pkey ())));
3619
3624
} else if (alg_name == " PS512" ) {
3620
- return std::make_unique<algo<jwt::algorithm::ps512>>(jwt::algorithm::ps512 (key.get_pkey ()));
3625
+ return std::unique_ptr<algo<jwt::algorithm::ps512>>(
3626
+ new algo<jwt::algorithm::ps512>(jwt::algorithm::ps512 (key.get_pkey ())));
3621
3627
} else if (alg_name == " ES256" ) {
3622
- return std::make_unique<algo<jwt::algorithm::es256>>(jwt::algorithm::es256 (key.get_pkey ()));
3628
+ return std::unique_ptr<algo<jwt::algorithm::es256>>(
3629
+ new algo<jwt::algorithm::es256>(jwt::algorithm::es256 (key.get_pkey ())));
3623
3630
} else if (alg_name == " ES384" ) {
3624
- return std::make_unique<algo<jwt::algorithm::es384>>(jwt::algorithm::es384 (key.get_pkey ()));
3631
+ return std::unique_ptr<algo<jwt::algorithm::es384>>(
3632
+ new algo<jwt::algorithm::es384>(jwt::algorithm::es384 (key.get_pkey ())));
3625
3633
} else if (alg_name == " ES512" ) {
3626
- return std::make_unique<algo<jwt::algorithm::es512>>(jwt::algorithm::es512 (key.get_pkey ()));
3634
+ return std::unique_ptr<algo<jwt::algorithm::es512>>(
3635
+ new algo<jwt::algorithm::es512>(jwt::algorithm::es512 (key.get_pkey ())));
3627
3636
} else if (alg_name == " ES256K" ) {
3628
- return std::make_unique<algo<jwt::algorithm::es256k>>(jwt::algorithm::es256k (key.get_pkey ()));
3637
+ return std::unique_ptr<algo<jwt::algorithm::es256k>>(
3638
+ new algo<jwt::algorithm::es256k>(jwt::algorithm::es256k (key.get_pkey ())));
3629
3639
} else if (alg_name == " HS256" ) {
3630
- return std::make_unique<algo<jwt::algorithm::hs256>>(jwt::algorithm::hs256 (key.get_oct_key ()));
3640
+ return std::unique_ptr<algo<jwt::algorithm::hs256>>(
3641
+ new algo<jwt::algorithm::hs256>(jwt::algorithm::hs256 (key.get_oct_key ())));
3631
3642
} else if (alg_name == " HS384" ) {
3632
- return std::make_unique<algo<jwt::algorithm::hs384>>(jwt::algorithm::hs384 (key.get_oct_key ()));
3643
+ return std::unique_ptr<algo<jwt::algorithm::hs384>>(
3644
+ new algo<jwt::algorithm::hs384>(jwt::algorithm::hs384 (key.get_oct_key ())));
3633
3645
} else if (alg_name == " HS512" ) {
3634
- return std::make_unique<algo<jwt::algorithm::hs512>>(jwt::algorithm::hs512 (key.get_oct_key ()));
3646
+ return std::unique_ptr<algo<jwt::algorithm::hs512>>(
3647
+ new algo<jwt::algorithm::hs512>(jwt::algorithm::hs512 (key.get_oct_key ())));
3635
3648
}
3636
3649
3637
3650
ec = error::token_verification_error::wrong_algorithm;
0 commit comments