@@ -3573,31 +3573,44 @@ namespace jwt {
3573
3573
}
3574
3574
3575
3575
if (alg_name == " RS256" ) {
3576
- return std::make_unique<algo<jwt::algorithm::rs256>>(jwt::algorithm::rs256 (key.get_pkey ()));
3576
+ return std::unique_ptr<algo<jwt::algorithm::rs256>>(
3577
+ new algo<jwt::algorithm::rs256>(jwt::algorithm::rs256 (key.get_pkey ())));
3577
3578
} else if (alg_name == " RS384" ) {
3578
- return std::make_unique<algo<jwt::algorithm::rs384>>(jwt::algorithm::rs384 (key.get_pkey ()));
3579
+ return std::unique_ptr<algo<jwt::algorithm::rs384>>(
3580
+ new algo<jwt::algorithm::rs384>(jwt::algorithm::rs384 (key.get_pkey ())));
3579
3581
} else if (alg_name == " RS512" ) {
3580
- return std::make_unique<algo<jwt::algorithm::rs512>>(jwt::algorithm::rs512 (key.get_pkey ()));
3582
+ return std::unique_ptr<algo<jwt::algorithm::rs512>>(
3583
+ new algo<jwt::algorithm::rs512>(jwt::algorithm::rs512 (key.get_pkey ())));
3581
3584
} else if (alg_name == " PS256" ) {
3582
- return std::make_unique<algo<jwt::algorithm::ps256>>(jwt::algorithm::ps256 (key.get_pkey ()));
3585
+ return std::unique_ptr<algo<jwt::algorithm::ps256>>(
3586
+ new algo<jwt::algorithm::ps256>(jwt::algorithm::ps256 (key.get_pkey ())));
3583
3587
} else if (alg_name == " PS384" ) {
3584
- return std::make_unique<algo<jwt::algorithm::ps384>>(jwt::algorithm::ps384 (key.get_pkey ()));
3588
+ return std::unique_ptr<algo<jwt::algorithm::ps384>>(
3589
+ new algo<jwt::algorithm::ps384>(jwt::algorithm::ps384 (key.get_pkey ())));
3585
3590
} else if (alg_name == " PS512" ) {
3586
- return std::make_unique<algo<jwt::algorithm::ps512>>(jwt::algorithm::ps512 (key.get_pkey ()));
3591
+ return std::unique_ptr<algo<jwt::algorithm::ps512>>(
3592
+ new algo<jwt::algorithm::ps512>(jwt::algorithm::ps512 (key.get_pkey ())));
3587
3593
} else if (alg_name == " ES256" ) {
3588
- return std::make_unique<algo<jwt::algorithm::es256>>(jwt::algorithm::es256 (key.get_pkey ()));
3594
+ return std::unique_ptr<algo<jwt::algorithm::es256>>(
3595
+ new algo<jwt::algorithm::es256>(jwt::algorithm::es256 (key.get_pkey ())));
3589
3596
} else if (alg_name == " ES384" ) {
3590
- return std::make_unique<algo<jwt::algorithm::es384>>(jwt::algorithm::es384 (key.get_pkey ()));
3597
+ return std::unique_ptr<algo<jwt::algorithm::es384>>(
3598
+ new algo<jwt::algorithm::es384>(jwt::algorithm::es384 (key.get_pkey ())));
3591
3599
} else if (alg_name == " ES512" ) {
3592
- return std::make_unique<algo<jwt::algorithm::es512>>(jwt::algorithm::es512 (key.get_pkey ()));
3600
+ return std::unique_ptr<algo<jwt::algorithm::es512>>(
3601
+ new algo<jwt::algorithm::es512>(jwt::algorithm::es512 (key.get_pkey ())));
3593
3602
} else if (alg_name == " ES256K" ) {
3594
- return std::make_unique<algo<jwt::algorithm::es256k>>(jwt::algorithm::es256k (key.get_pkey ()));
3603
+ return std::unique_ptr<algo<jwt::algorithm::es256k>>(
3604
+ new algo<jwt::algorithm::es256k>(jwt::algorithm::es256k (key.get_pkey ())));
3595
3605
} else if (alg_name == " HS256" ) {
3596
- return std::make_unique<algo<jwt::algorithm::hs256>>(jwt::algorithm::hs256 (key.get_oct_key ()));
3606
+ return std::unique_ptr<algo<jwt::algorithm::hs256>>(
3607
+ new algo<jwt::algorithm::hs256>(jwt::algorithm::hs256 (key.get_oct_key ())));
3597
3608
} else if (alg_name == " HS384" ) {
3598
- return std::make_unique<algo<jwt::algorithm::hs384>>(jwt::algorithm::hs384 (key.get_oct_key ()));
3609
+ return std::unique_ptr<algo<jwt::algorithm::hs384>>(
3610
+ new algo<jwt::algorithm::hs384>(jwt::algorithm::hs384 (key.get_oct_key ())));
3599
3611
} else if (alg_name == " HS512" ) {
3600
- return std::make_unique<algo<jwt::algorithm::hs512>>(jwt::algorithm::hs512 (key.get_oct_key ()));
3612
+ return std::unique_ptr<algo<jwt::algorithm::hs512>>(
3613
+ new algo<jwt::algorithm::hs512>(jwt::algorithm::hs512 (key.get_oct_key ())));
3601
3614
}
3602
3615
3603
3616
ec = error::token_verification_error::wrong_algorithm;
0 commit comments