mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-04 00:28:51 -04:00
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:
parent
4059dc6187
commit
8cb77ac136
397 changed files with 968 additions and 926 deletions
|
@ -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());
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <stratosphere.hpp>
|
||||
#include <stratosphere/spl/spl_types.hpp>
|
||||
|
||||
namespace sts::spl::impl {
|
||||
namespace ams::spl::impl {
|
||||
|
||||
/* Initialization. */
|
||||
void Initialize();
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "spl_general_service.hpp"
|
||||
|
||||
namespace sts::spl {
|
||||
namespace ams::spl {
|
||||
|
||||
class CryptoService : public GeneralService {
|
||||
public:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "spl_rsa_service.hpp"
|
||||
|
||||
namespace sts::spl {
|
||||
namespace ams::spl {
|
||||
|
||||
class EsService : public RsaService {
|
||||
public:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "spl_crypto_service.hpp"
|
||||
|
||||
namespace sts::spl {
|
||||
namespace ams::spl {
|
||||
|
||||
class FsService : public CryptoService {
|
||||
public:
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "spl_rsa_service.hpp"
|
||||
|
||||
namespace sts::spl {
|
||||
namespace ams::spl {
|
||||
|
||||
class ManuService : public RsaService {
|
||||
public:
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "spl_crypto_service.hpp"
|
||||
|
||||
namespace sts::spl {
|
||||
namespace ams::spl {
|
||||
|
||||
class RsaService : public CryptoService {
|
||||
public:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "spl_rsa_service.hpp"
|
||||
|
||||
namespace sts::spl {
|
||||
namespace ams::spl {
|
||||
|
||||
class SslService : public RsaService {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue