namespace sts -> namespace ams

namespace sts::ams -> ams::exosphere, ams::.

This is to facilitate future use of ams:: namespace code in
mesosphere, as we'll want to include ams::util, ams::result, ams::svc...
This commit is contained in:
Michael Scire 2019-10-24 02:30:10 -07:00 committed by SciresM
parent 4059dc6187
commit 8cb77ac136
397 changed files with 968 additions and 926 deletions

View file

@ -22,7 +22,7 @@
#include "spl_ctr_drbg.hpp"
namespace sts::spl::impl {
namespace ams::spl::impl {
namespace {
@ -127,14 +127,14 @@ namespace sts::spl::impl {
/* Initialization functionality. */
void InitializeCtrDrbg() {
u8 seed[CtrDrbg::SeedSize];
STS_ASSERT(smc::GenerateRandomBytes(seed, sizeof(seed)) == smc::Result::Success);
AMS_ASSERT(smc::GenerateRandomBytes(seed, sizeof(seed)) == smc::Result::Success);
g_drbg.Initialize(seed);
}
void InitializeSeEvents() {
u64 irq_num;
STS_ASSERT(smc::GetConfig(&irq_num, 1, SplConfigItem_SecurityEngineIrqNumber) == smc::Result::Success);
AMS_ASSERT(smc::GetConfig(&irq_num, 1, SplConfigItem_SecurityEngineIrqNumber) == smc::Result::Success);
R_ASSERT(g_se_event.Initialize(irq_num));
R_ASSERT(g_se_keyslot_available_event.InitializeAsInterProcessEvent());

View file

@ -19,7 +19,7 @@
#include <stratosphere.hpp>
#include <stratosphere/spl/spl_types.hpp>
namespace sts::spl::impl {
namespace ams::spl::impl {
/* Initialization. */
void Initialize();

View file

@ -20,7 +20,7 @@
#include "spl_api_impl.hpp"
#include "spl_crypto_service.hpp"
namespace sts::spl {
namespace ams::spl {
CryptoService::~CryptoService() {
/* Free any keyslots this service is using. */

View file

@ -21,7 +21,7 @@
#include "spl_general_service.hpp"
namespace sts::spl {
namespace ams::spl {
class CryptoService : public GeneralService {
public:

View file

@ -20,7 +20,7 @@
#include "spl_ctr_drbg.hpp"
namespace sts::spl {
namespace ams::spl {
void CtrDrbg::Update(const void *data) {
aes128ContextCreate(&this->aes_ctx, this->key, true);

View file

@ -19,7 +19,7 @@
#include <stratosphere.hpp>
#include <stratosphere/spl/spl_types.hpp>
namespace sts::spl {
namespace ams::spl {
/* Nintendo implements CTR_DRBG for their csrng. We will do the same. */
class CtrDrbg {

View file

@ -20,7 +20,7 @@
#include "spl_api_impl.hpp"
#include "spl_deprecated_service.hpp"
namespace sts::spl {
namespace ams::spl {
Result DeprecatedService::GetConfig(sf::Out<u64> out, u32 which) {
return impl::GetConfig(out.GetPointer(), static_cast<SplConfigItem>(which));

View file

@ -19,7 +19,7 @@
#include <stratosphere.hpp>
#include <stratosphere/spl/spl_types.hpp>
namespace sts::spl {
namespace ams::spl {
class DeprecatedService : public sf::IServiceObject {
protected:

View file

@ -20,7 +20,7 @@
#include "spl_api_impl.hpp"
#include "spl_es_service.hpp"
namespace sts::spl {
namespace ams::spl {
Result EsService::ImportEsKeyDeprecated(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source, u32 option) {
return impl::ImportEsKey(src.GetPointer(), src.GetSize(), access_key, key_source, option);

View file

@ -21,7 +21,7 @@
#include "spl_rsa_service.hpp"
namespace sts::spl {
namespace ams::spl {
class EsService : public RsaService {
public:

View file

@ -20,7 +20,7 @@
#include "spl_api_impl.hpp"
#include "spl_fs_service.hpp"
namespace sts::spl {
namespace ams::spl {
Result FsService::ImportLotusKeyDeprecated(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source, u32 option) {
return impl::ImportLotusKey(src.GetPointer(), src.GetSize(), access_key, key_source, option);

View file

@ -21,7 +21,7 @@
#include "spl_crypto_service.hpp"
namespace sts::spl {
namespace ams::spl {
class FsService : public CryptoService {
public:

View file

@ -20,7 +20,7 @@
#include "spl_api_impl.hpp"
#include "spl_general_service.hpp"
namespace sts::spl {
namespace ams::spl {
Result GeneralService::GetConfig(sf::Out<u64> out, u32 which) {
return impl::GetConfig(out.GetPointer(), static_cast<SplConfigItem>(which));

View file

@ -19,7 +19,7 @@
#include <stratosphere.hpp>
#include <stratosphere/spl/spl_types.hpp>
namespace sts::spl {
namespace ams::spl {
class GeneralService : public sf::IServiceObject {
protected:

View file

@ -53,19 +53,19 @@ extern "C" {
void __libnx_exception_handler(ThreadExceptionDump *ctx);
}
namespace sts::ams {
namespace ams {
ncm::TitleId StratosphereTitleId = ncm::TitleId::Spl;
ncm::TitleId CurrentTitleId = ncm::TitleId::Spl;
namespace result {
bool CallFatalOnResultAssertion = false;
}
}
namespace sts::result {
bool CallFatalOnResultAssertion = false;
}
using namespace sts;
using namespace ams;
void __libnx_exception_handler(ThreadExceptionDump *ctx) {
ams::CrashHandler(ctx);

View file

@ -20,7 +20,7 @@
#include "spl_api_impl.hpp"
#include "spl_manu_service.hpp"
namespace sts::spl {
namespace ams::spl {
Result ManuService::ReEncryptRsaPrivateKey(const sf::OutPointerBuffer &out, const sf::InPointerBuffer &src, AccessKey access_key_dec, KeySource source_dec, AccessKey access_key_enc, KeySource source_enc, u32 option) {
return impl::ReEncryptRsaPrivateKey(out.GetPointer(), out.GetSize(), src.GetPointer(), src.GetSize(), access_key_dec, source_dec, access_key_enc, source_enc, option);

View file

@ -21,7 +21,7 @@
#include "spl_rsa_service.hpp"
namespace sts::spl {
namespace ams::spl {
class ManuService : public RsaService {
public:

View file

@ -20,7 +20,7 @@
#include "spl_api_impl.hpp"
#include "spl_random_service.hpp"
namespace sts::spl {
namespace ams::spl {
Result RandomService::GenerateRandomBytes(const sf::OutBuffer &out) {
return impl::GenerateRandomBytes(out.GetPointer(), out.GetSize());

View file

@ -19,7 +19,7 @@
#include <stratosphere.hpp>
#include <stratosphere/spl/spl_types.hpp>
namespace sts::spl {
namespace ams::spl {
class RandomService final : public sf::IServiceObject {
protected:

View file

@ -20,7 +20,7 @@
#include "spl_api_impl.hpp"
#include "spl_rsa_service.hpp"
namespace sts::spl {
namespace ams::spl {
Result RsaService::DecryptRsaPrivateKeyDeprecated(const sf::OutPointerBuffer &dst, const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source, u32 option) {
return impl::DecryptRsaPrivateKey(dst.GetPointer(), dst.GetSize(), src.GetPointer(), src.GetSize(), access_key, key_source, option);

View file

@ -21,7 +21,7 @@
#include "spl_crypto_service.hpp"
namespace sts::spl {
namespace ams::spl {
class RsaService : public CryptoService {
public:

View file

@ -20,7 +20,7 @@
#include "spl_api_impl.hpp"
#include "spl_ssl_service.hpp"
namespace sts::spl {
namespace ams::spl {
Result SslService::ImportSslKey(const sf::InPointerBuffer &src, AccessKey access_key, KeySource key_source) {
return impl::ImportSslKey(src.GetPointer(), src.GetSize(), access_key, key_source);

View file

@ -21,7 +21,7 @@
#include "spl_rsa_service.hpp"
namespace sts::spl {
namespace ams::spl {
class SslService : public RsaService {
public: