Merge branch 'operation_step_refactor' into openssl_padding_refactor

# Conflicts:
#	cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/AlgToAVCFlow.qll
#	cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/PaddingAlgorithmInstance.qll
This commit is contained in:
REDMOND\brodes
2025-06-27 09:42:06 -04:00
2369 changed files with 46564 additions and 23226 deletions

View File

@@ -53,7 +53,7 @@ jobs:
- name: Create database
run: |
"${CODEQL}" database create \
--search-path "${{ github.workspace }}"
--search-path "${{ github.workspace }}" \
--threads 4 \
--language ql --source-root "${{ github.workspace }}/repo" \
"${{ runner.temp }}/database"

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Added `sql-injection` sink models for the Oracle Call Interface (OCI) database library functions `OCIStmtPrepare` and `OCIStmtPrepare2`.

View File

@@ -56,7 +56,7 @@ module ArtifactFlowConfig implements DataFlow::ConfigSig {
module ArtifactFlow = DataFlow::Global<ArtifactFlowConfig>;
/**
* Artifact output to node input configuration
* An artifact output to node input configuration
*/
abstract class AdditionalFlowInputStep extends DataFlow::Node {
abstract DataFlow::Node getOutput();
@@ -91,9 +91,8 @@ module GenericDataSourceFlowConfig implements DataFlow::ConfigSig {
module GenericDataSourceFlow = TaintTracking::Global<GenericDataSourceFlowConfig>;
private class ConstantDataSource extends Crypto::GenericConstantSourceInstance instanceof Literal {
ConstantDataSource() { this instanceof OpenSslGenericSourceCandidateLiteral }
private class ConstantDataSource extends Crypto::GenericConstantSourceInstance instanceof OpenSslGenericSourceCandidateLiteral
{
override DataFlow::Node getOutputNode() { result.asExpr() = this }
override predicate flowsTo(Crypto::FlowAwareElement other) {

View File

@@ -48,7 +48,7 @@ module KnownOpenSslAlgorithmToAlgorithmValueConsumerConfig implements DataFlow::
module KnownOpenSslAlgorithmToAlgorithmValueConsumerFlow =
DataFlow::Global<KnownOpenSslAlgorithmToAlgorithmValueConsumerConfig>;
module RSAPaddingAlgorithmToPaddingAlgorithmValueConsumerConfig implements DataFlow::ConfigSig {
module RsaPaddingAlgorithmToPaddingAlgorithmValueConsumerConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) {
source.asExpr() instanceof OpenSslSpecialPaddingLiteral
}
@@ -62,8 +62,8 @@ module RSAPaddingAlgorithmToPaddingAlgorithmValueConsumerConfig implements DataF
}
}
module RSAPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow =
DataFlow::Global<RSAPaddingAlgorithmToPaddingAlgorithmValueConsumerConfig>;
module RsaPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow =
DataFlow::Global<RsaPaddingAlgorithmToPaddingAlgorithmValueConsumerConfig>;
class OpenSslAlgorithmAdditionalFlowStep extends AdditionalFlowInputStep {
OpenSslAlgorithmAdditionalFlowStep() { exists(AlgorithmPassthroughCall c | c.getInNode() = this) }
@@ -116,11 +116,11 @@ class CopyAndDupAlgorithmPassthroughCall extends AlgorithmPassthroughCall {
override DataFlow::Node getOutNode() { result = outNode }
}
class NIDToPointerPassthroughCall extends AlgorithmPassthroughCall {
class NidToPointerPassthroughCall extends AlgorithmPassthroughCall {
DataFlow::Node inNode;
DataFlow::Node outNode;
NIDToPointerPassthroughCall() {
NidToPointerPassthroughCall() {
this.getTarget().getName() in ["OBJ_nid2obj", "OBJ_nid2ln", "OBJ_nid2sn"] and
inNode.asExpr() = this.getArgument(0) and
outNode.asExpr() = this
@@ -152,11 +152,11 @@ class PointerToPointerPassthroughCall extends AlgorithmPassthroughCall {
override DataFlow::Node getOutNode() { result = outNode }
}
class PointerToNIDPassthroughCall extends AlgorithmPassthroughCall {
class PointerToNidPassthroughCall extends AlgorithmPassthroughCall {
DataFlow::Node inNode;
DataFlow::Node outNode;
PointerToNIDPassthroughCall() {
PointerToNidPassthroughCall() {
this.getTarget().getName() in ["OBJ_obj2nid", "OBJ_ln2nid", "OBJ_sn2nid", "OBJ_txt2nid"] and
(
inNode.asIndirectExpr() = this.getArgument(0)

View File

@@ -5,36 +5,35 @@ private import experimental.quantum.OpenSSL.AlgorithmInstances.KnownAlgorithmCon
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.DirectAlgorithmValueConsumer
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumerBase
private import AlgToAVCFlow
private import codeql.quantum.experimental.Standardization::Types::KeyOpAlg as KeyOpAlg
/**
* Given a `KnownOpenSslBlockModeAlgorithmExpr`, converts this to a block family type.
* Does not bind if there is no mapping (no mapping to 'unknown' or 'other').
*/
predicate knownOpenSslConstantToBlockModeFamilyType(
KnownOpenSslBlockModeAlgorithmExpr e, Crypto::TBlockCipherModeOfOperationType type
KnownOpenSslBlockModeAlgorithmExpr e, KeyOpAlg::ModeOfOperationType type
) {
exists(string name |
name = e.(KnownOpenSslAlgorithmExpr).getNormalizedName() and
(
name.matches("CBC") and type instanceof Crypto::CBC
name = "CBC" and type instanceof KeyOpAlg::CBC
or
name.matches("CFB%") and type instanceof Crypto::CFB
name = "CFB%" and type instanceof KeyOpAlg::CFB
or
name.matches("CTR") and type instanceof Crypto::CTR
name = "CTR" and type instanceof KeyOpAlg::CTR
or
name.matches("GCM") and type instanceof Crypto::GCM
name = "GCM" and type instanceof KeyOpAlg::GCM
or
name.matches("OFB") and type instanceof Crypto::OFB
name = "OFB" and type instanceof KeyOpAlg::OFB
or
name.matches("XTS") and type instanceof Crypto::XTS
name = "XTS" and type instanceof KeyOpAlg::XTS
or
name.matches("CCM") and type instanceof Crypto::CCM
name = "CCM" and type instanceof KeyOpAlg::CCM
or
name.matches("GCM") and type instanceof Crypto::GCM
name = "CCM" and type instanceof KeyOpAlg::CCM
or
name.matches("CCM") and type instanceof Crypto::CCM
or
name.matches("ECB") and type instanceof Crypto::ECB
name = "ECB" and type instanceof KeyOpAlg::ECB
)
)
}
@@ -64,10 +63,10 @@ class KnownOpenSslBlockModeConstantAlgorithmInstance extends OpenSslAlgorithmIns
getterCall = this
}
override Crypto::TBlockCipherModeOfOperationType getModeType() {
override KeyOpAlg::ModeOfOperationType getModeType() {
knownOpenSslConstantToBlockModeFamilyType(this, result)
or
not knownOpenSslConstantToBlockModeFamilyType(this, _) and result = Crypto::OtherMode()
not knownOpenSslConstantToBlockModeFamilyType(this, _) and result = KeyOpAlg::OtherMode()
}
// NOTE: I'm not going to attempt to parse out the mode specific part, so returning

View File

@@ -34,9 +34,9 @@ predicate knownOpenSslConstantToCipherFamilyType(
or
name.matches("CAST5%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::CAST5())
or
name.matches("2DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::DoubleDES())
name.matches("2DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::DOUBLE_DES())
or
name.matches("3DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::TripleDES())
name.matches("3DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::TRIPLE_DES())
or
name.matches("DES%") and type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::DES())
or
@@ -117,7 +117,7 @@ class KnownOpenSslCipherConstantAlgorithmInstance extends OpenSslAlgorithmInstan
this.(KnownOpenSslCipherAlgorithmExpr).getExplicitKeySize() = result
}
override Crypto::KeyOpAlg::Algorithm getAlgorithmType() {
override KeyOpAlg::AlgorithmType getAlgorithmType() {
knownOpenSslConstantToCipherFamilyType(this, result)
or
not knownOpenSslConstantToCipherFamilyType(this, _) and

View File

@@ -39,8 +39,14 @@ class KnownOpenSslEllipticCurveConstantAlgorithmInstance extends OpenSslAlgorith
result = this.(Call).getTarget().getName()
}
override Crypto::TEllipticCurveType getEllipticCurveType() {
Crypto::ellipticCurveNameToKeySizeAndFamilyMapping(this.getParsedEllipticCurveName(), _, result)
override Crypto::EllipticCurveFamilyType getEllipticCurveFamilyType() {
if
Crypto::ellipticCurveNameToKnownKeySizeAndFamilyMapping(this.getParsedEllipticCurveName(), _,
_)
then
Crypto::ellipticCurveNameToKnownKeySizeAndFamilyMapping(this.getParsedEllipticCurveName(), _,
result)
else result = Crypto::OtherEllipticCurveType()
}
override string getParsedEllipticCurveName() {
@@ -48,7 +54,7 @@ class KnownOpenSslEllipticCurveConstantAlgorithmInstance extends OpenSslAlgorith
}
override int getKeySize() {
Crypto::ellipticCurveNameToKeySizeAndFamilyMapping(this.(KnownOpenSslAlgorithmExpr)
Crypto::ellipticCurveNameToKnownKeySizeAndFamilyMapping(this.(KnownOpenSslAlgorithmExpr)
.getNormalizedName(), result, _)
}
}

View File

@@ -11,21 +11,21 @@ predicate knownOpenSslConstantToHashFamilyType(
exists(string name |
name = e.(KnownOpenSslAlgorithmExpr).getNormalizedName() and
(
name.matches("BLAKE2B") and type instanceof Crypto::BLAKE2B
name = "BLAKE2B" and type instanceof Crypto::BLAKE2B
or
name.matches("BLAKE2S") and type instanceof Crypto::BLAKE2S
name = "BLAKE2S" and type instanceof Crypto::BLAKE2S
or
name.matches("GOST%") and type instanceof Crypto::GOSTHash
name.matches("GOST%") and type instanceof Crypto::GOST_HASH
or
name.matches("MD2") and type instanceof Crypto::MD2
name = "MD2" and type instanceof Crypto::MD2
or
name.matches("MD4") and type instanceof Crypto::MD4
name = "MD4" and type instanceof Crypto::MD4
or
name.matches("MD5") and type instanceof Crypto::MD5
name = "MD5" and type instanceof Crypto::MD5
or
name.matches("MDC2") and type instanceof Crypto::MDC2
name = "MDC2" and type instanceof Crypto::MDC2
or
name.matches("POLY1305") and type instanceof Crypto::POLY1305
name = "POLY1305" and type instanceof Crypto::POLY1305
or
name.matches(["SHA", "SHA1"]) and type instanceof Crypto::SHA1
or
@@ -33,13 +33,13 @@ predicate knownOpenSslConstantToHashFamilyType(
or
name.matches("SHA3-%") and type instanceof Crypto::SHA3
or
name.matches(["SHAKE"]) and type instanceof Crypto::SHAKE
name = "SHAKE" and type instanceof Crypto::SHAKE
or
name.matches("SM3") and type instanceof Crypto::SM3
name = "SM3" and type instanceof Crypto::SM3
or
name.matches("RIPEMD160") and type instanceof Crypto::RIPEMD160
name = "RIPEMD160" and type instanceof Crypto::RIPEMD160
or
name.matches("WHIRLPOOL") and type instanceof Crypto::WHIRLPOOL
name = "WHIRLPOOL" and type instanceof Crypto::WHIRLPOOL
)
)
}

View File

@@ -210,7 +210,8 @@ string getAlgorithmAlias(string alias) {
}
/**
* Finds aliases of known alagorithms defined by users (through obj_name_add and various macros pointing to this function)
* Holds for aliases of known algorithms defined by users
* (through obj_name_add and various macros pointing to this function).
*
* The `target` and `alias` are converted to lowercase to be of a standard form.
*/
@@ -222,7 +223,7 @@ predicate customAliases(string target, string alias) {
}
/**
* A hard-coded mapping of known algorithm aliases in OpenSsl.
* Holds for a hard-coded mapping of known algorithm aliases in OpenSsl.
* This was derived by applying the same kind of logic foun din `customAliases` to the
* OpenSsl code base directly.
*

View File

@@ -7,7 +7,7 @@ private import experimental.quantum.OpenSSL.Operations.OpenSSLOperations
private import AlgToAVCFlow
class KnownOpenSslMacConstantAlgorithmInstance extends OpenSslAlgorithmInstance,
Crypto::MACAlgorithmInstance instanceof KnownOpenSslMacAlgorithmExpr
Crypto::MacAlgorithmInstance instanceof KnownOpenSslMacAlgorithmExpr
{
OpenSslAlgorithmValueConsumer getterCall;
@@ -39,14 +39,14 @@ class KnownOpenSslMacConstantAlgorithmInstance extends OpenSslAlgorithmInstance,
result = this.(Call).getTarget().getName()
}
override Crypto::TMACType getMacType() {
this instanceof KnownOpenSslHMacAlgorithmExpr and result instanceof Crypto::THMAC
override Crypto::MacType getMacType() {
this instanceof KnownOpenSslHMacAlgorithmExpr and result = Crypto::HMAC()
or
this instanceof KnownOpenSslCMacAlgorithmExpr and result instanceof Crypto::TCMAC
this instanceof KnownOpenSslCMacAlgorithmExpr and result = Crypto::CMAC()
}
}
class KnownOpenSslHMacConstantAlgorithmInstance extends Crypto::HMACAlgorithmInstance,
class KnownOpenSslHMacConstantAlgorithmInstance extends Crypto::HmacAlgorithmInstance,
KnownOpenSslMacConstantAlgorithmInstance
{
override Crypto::AlgorithmValueConsumer getHashAlgorithmValueConsumer() {
@@ -54,7 +54,7 @@ class KnownOpenSslHMacConstantAlgorithmInstance extends Crypto::HMACAlgorithmIns
then
// ASSUMPTION: if there is an explicit hash algorithm, it is already modeled
// and we can simply grab that model's AVC
exists(OpenSslAlgorithmInstance inst | inst.getAvc() = result and inst = this)
this.(OpenSslAlgorithmInstance).getAvc() = result
else
// ASSUMPTION: If no explicit algorithm is given, then find
// where the current AVC traces to a HashAlgorithmIO consuming operation step.

View File

@@ -6,6 +6,7 @@ private import experimental.quantum.OpenSSL.AlgorithmInstances.KnownAlgorithmCon
private import AlgToAVCFlow
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.DirectAlgorithmValueConsumer
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumerBase
private import codeql.quantum.experimental.Standardization::Types::KeyOpAlg as KeyOpAlg
/**
* A class to define padding specific integer values.
@@ -30,18 +31,18 @@ class OpenSslSpecialPaddingLiteral extends Literal {
* Does not bind if there is no mapping (no mapping to 'unknown' or 'other').
*/
predicate knownOpenSslConstantToPaddingFamilyType(
KnownOpenSslPaddingAlgorithmExpr e, Crypto::TPaddingType type
KnownOpenSslPaddingAlgorithmExpr e, KeyOpAlg::PaddingSchemeType type
) {
exists(string name |
name = e.(KnownOpenSslAlgorithmExpr).getNormalizedName() and
(
name.matches("OAEP") and type = Crypto::OAEP()
name = "OAEP" and type = KeyOpAlg::OAEP()
or
name.matches("PSS") and type = Crypto::PSS()
name = "PSS" and type = KeyOpAlg::PSS()
or
name.matches("PKCS7") and type = Crypto::PKCS7()
name = "PKCS7" and type = KeyOpAlg::PKCS7()
or
name.matches("PKCS1V15") and type = Crypto::PKCS1_v1_5()
name = "PKCS1V15" and type = KeyOpAlg::PKCS1_V1_5()
)
)
}
@@ -84,7 +85,7 @@ class KnownOpenSslPaddingConstantAlgorithmInstance extends OpenSslAlgorithmInsta
// Source is `this`
src.asExpr() = this and
// This traces to a padding-specific consumer
RSAPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow::flow(src, sink)
RsaPaddingAlgorithmToPaddingAlgorithmValueConsumerFlow::flow(src, sink)
) and
isPaddingSpecificConsumer = true
}
@@ -97,24 +98,24 @@ class KnownOpenSslPaddingConstantAlgorithmInstance extends OpenSslAlgorithmInsta
override OpenSslAlgorithmValueConsumer getAvc() { result = getterCall }
Crypto::TPaddingType getKnownPaddingType() {
this.(Literal).getValue().toInt() in [1, 7, 8] and result = Crypto::PKCS1_v1_5()
KeyOpAlg::PaddingSchemeType getKnownPaddingType() {
this.(Literal).getValue().toInt() in [1, 7, 8] and result = KeyOpAlg::PKCS1_V1_5()
or
this.(Literal).getValue().toInt() = 3 and result = Crypto::NoPadding()
this.(Literal).getValue().toInt() = 3 and result = KeyOpAlg::NoPadding()
or
this.(Literal).getValue().toInt() = 4 and result = Crypto::OAEP()
this.(Literal).getValue().toInt() = 4 and result = KeyOpAlg::OAEP()
or
this.(Literal).getValue().toInt() = 5 and result = Crypto::ANSI_X9_23()
this.(Literal).getValue().toInt() = 5 and result = KeyOpAlg::ANSI_X9_23()
or
this.(Literal).getValue().toInt() = 6 and result = Crypto::PSS()
this.(Literal).getValue().toInt() = 6 and result = KeyOpAlg::PSS()
}
override Crypto::TPaddingType getPaddingType() {
override KeyOpAlg::PaddingSchemeType getPaddingType() {
isPaddingSpecificConsumer = true and
(
result = this.getKnownPaddingType()
or
not exists(this.getKnownPaddingType()) and result = Crypto::OtherPadding()
not exists(this.getKnownPaddingType()) and result = KeyOpAlg::OtherPadding()
)
or
isPaddingSpecificConsumer = false and
@@ -122,14 +123,14 @@ class KnownOpenSslPaddingConstantAlgorithmInstance extends OpenSslAlgorithmInsta
}
}
class OAEPPaddingAlgorithmInstance extends Crypto::OAEPPaddingAlgorithmInstance,
class OaepPaddingAlgorithmInstance extends Crypto::OaepPaddingAlgorithmInstance,
KnownOpenSslPaddingConstantAlgorithmInstance
{
OAEPPaddingAlgorithmInstance() {
this.(Crypto::PaddingAlgorithmInstance).getPaddingType() = Crypto::OAEP()
OaepPaddingAlgorithmInstance() {
this.(Crypto::PaddingAlgorithmInstance).getPaddingType() = KeyOpAlg::OAEP()
}
override Crypto::HashAlgorithmInstance getOAEPEncodingHashAlgorithm() {
override Crypto::HashAlgorithmInstance getOaepEncodingHashAlgorithm() {
exists(OperationStep s |
this.getAvc().(AvcContextCreationStep).flowsToOperationStep(s) and
s.getAlgorithmValueConsumerForInput(HashAlgorithmOaepIO()) =
@@ -137,7 +138,7 @@ class OAEPPaddingAlgorithmInstance extends Crypto::OAEPPaddingAlgorithmInstance,
)
}
override Crypto::HashAlgorithmInstance getMGF1HashAlgorithm() {
override Crypto::HashAlgorithmInstance getMgf1HashAlgorithm() {
exists(OperationStep s |
this.getAvc().(AvcContextCreationStep).flowsToOperationStep(s) and
s.getAlgorithmValueConsumerForInput(HashAlgorithmMgf1IO()) =

View File

@@ -73,7 +73,7 @@ class KnownOpenSslSignatureConstantAlgorithmInstance extends OpenSslAlgorithmIns
none()
}
override KeyOpAlg::Algorithm getAlgorithmType() {
override KeyOpAlg::AlgorithmType getAlgorithmType() {
knownOpenSslConstantToSignatureFamilyType(this, result)
or
not knownOpenSslConstantToSignatureFamilyType(this, _) and

View File

@@ -4,10 +4,10 @@ private import experimental.quantum.OpenSSL.AlgorithmInstances.KnownAlgorithmCon
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumerBase
/**
* Cases like EVP_MD5(),
* there is no input, rather it directly gets an algorithm
* and returns it.
* Also includes operations directly using an algorithm
* A call that is considered to inherently 'consume' an algorithm value.
* E.g., cases like EVP_MD5(),
* where there is no input, rather it directly gets an algorithm
* and returns it. Also includes operations directly using an algorithm
* like AES_encrypt().
*/
class DirectAlgorithmValueConsumer extends OpenSslAlgorithmValueConsumer instanceof OpenSslAlgorithmCall

View File

@@ -7,7 +7,7 @@ private import experimental.quantum.OpenSSL.AlgorithmInstances.OpenSSLAlgorithmI
abstract class HashAlgorithmValueConsumer extends OpenSslAlgorithmValueConsumer { }
/**
* EVP_Q_Digest directly consumes algorithm constant values
* An EVP_Q_Digest directly consumes algorithm constant values
*/
class Evp_Q_Digest_Algorithm_Consumer extends HashAlgorithmValueConsumer {
Evp_Q_Digest_Algorithm_Consumer() { this.(Call).getTarget().getName() = "EVP_Q_digest" }

View File

@@ -12,9 +12,10 @@ abstract class EvpCipherInitializer extends OperationStep {
or
result.asExpr() = this.getArgument(1) and
type = PrimaryAlgorithmIO() and
// Null for the algorithm indicates the algorithm is not actually set
// This pattern can occur during a multi-step initialization
// TODO/Note: not flowing 0 to the sink, assuming a direct use of NULL for now
// Constants that are not equal to zero or
// non-constants (e.g., variable accesses, which require data-flow to determine the value)
// A zero (null) value typically indicates use of this operation step to initialize
// other out parameters in a multi-step initialization.
(exists(result.asExpr().getValue()) implies result.asExpr().getValue().toInt() != 0)
}
@@ -33,9 +34,10 @@ abstract class EvpEXInitializer extends EvpCipherInitializer {
result = super.getInput(type)
or
(
// Null key or nonce indicates the key/nonce is not actually set
// This pattern can occur during a multi-step initialization
// TODO/Note: not flowing 0 to the sink, assuming a direct use of NULL for now
// Constants that are not equal to zero or
// non-constants (e.g., variable accesses, which require data-flow to determine the value)
// A zero (null) value typically indicates use of this operation step to initialize
// other out parameters in a multi-step initialization.
result.asExpr() = this.getArgument(3) and type = KeyIO()
or
result.asExpr() = this.getArgument(4) and type = IVorNonceIO()

View File

@@ -12,21 +12,19 @@ private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgor
* - `EVP_DigestInit_ex`
* - `EVP_DigestInit_ex2`
*/
class EvpDigestInitVariantCalls extends OperationStep {
class EvpDigestInitVariantCalls extends OperationStep instanceof Call {
EvpDigestInitVariantCalls() {
this.(Call).getTarget().getName() in [
"EVP_DigestInit", "EVP_DigestInit_ex", "EVP_DigestInit_ex2"
]
this.getTarget().getName() in ["EVP_DigestInit", "EVP_DigestInit_ex", "EVP_DigestInit_ex2"]
}
override DataFlow::Node getInput(IOType type) {
result.asExpr() = this.(Call).getArgument(0) and type = ContextIO()
result.asExpr() = this.getArgument(0) and type = ContextIO()
or
result.asExpr() = this.(Call).getArgument(1) and type = PrimaryAlgorithmIO()
result.asExpr() = this.getArgument(1) and type = PrimaryAlgorithmIO()
}
override DataFlow::Node getOutput(IOType type) {
result.asExpr() = this.(Call).getArgument(0) and
result.asExpr() = this.getArgument(0) and
type = ContextIO()
}
@@ -36,17 +34,17 @@ class EvpDigestInitVariantCalls extends OperationStep {
/**
* A call to `EVP_DigestUpdate`.
*/
class EvpDigestUpdateCall extends OperationStep {
EvpDigestUpdateCall() { this.(Call).getTarget().getName() = "EVP_DigestUpdate" }
class EvpDigestUpdateCall extends OperationStep instanceof Call {
EvpDigestUpdateCall() { this.getTarget().getName() = "EVP_DigestUpdate" }
override DataFlow::Node getInput(IOType type) {
result.asExpr() = this.(Call).getArgument(0) and type = ContextIO()
result.asExpr() = this.getArgument(0) and type = ContextIO()
or
result.asExpr() = this.(Call).getArgument(1) and type = PlaintextIO()
result.asExpr() = this.getArgument(1) and type = PlaintextIO()
}
override DataFlow::Node getOutput(IOType type) {
result.asExpr() = this.(Call).getArgument(0) and
result.asExpr() = this.getArgument(0) and
type = ContextIO()
}
@@ -64,58 +62,56 @@ abstract class EvpFinalDigestOperationStep extends OperationStep {
* A call to `EVP_Q_digest`
* https://docs.openssl.org/3.0/man3/EVP_DigestInit/#synopsis
*/
class EvpQDigestOperation extends EvpFinalDigestOperationStep {
EvpQDigestOperation() { this.(Call).getTarget().getName() = "EVP_Q_digest" }
class EvpQDigestOperation extends EvpFinalDigestOperationStep instanceof Call {
EvpQDigestOperation() { this.getTarget().getName() = "EVP_Q_digest" }
override DataFlow::Node getInput(IOType type) {
result.asExpr() = this.(Call).getArgument(1) and type = PrimaryAlgorithmIO()
result.asExpr() = this.getArgument(1) and type = PrimaryAlgorithmIO()
or
result.asExpr() = this.(Call).getArgument(0) and type = ContextIO()
result.asExpr() = this.getArgument(0) and type = ContextIO()
or
result.asExpr() = this.(Call).getArgument(3) and type = PlaintextIO()
result.asExpr() = this.getArgument(3) and type = PlaintextIO()
}
override DataFlow::Node getOutput(IOType type) {
result.asExpr() = this.(Call).getArgument(0) and
result.asExpr() = this.getArgument(0) and
type = ContextIO()
or
result.asDefiningArgument() = this.(Call).getArgument(5) and type = DigestIO()
result.asDefiningArgument() = this.getArgument(5) and type = DigestIO()
}
}
class EvpDigestOperation extends EvpFinalDigestOperationStep {
EvpDigestOperation() { this.(Call).getTarget().getName() = "EVP_Digest" }
class EvpDigestOperation extends EvpFinalDigestOperationStep instanceof Call {
EvpDigestOperation() { this.getTarget().getName() = "EVP_Digest" }
override DataFlow::Node getInput(IOType type) {
result.asExpr() = this.(Call).getArgument(4) and type = PrimaryAlgorithmIO()
result.asExpr() = this.getArgument(4) and type = PrimaryAlgorithmIO()
or
result.asExpr() = this.(Call).getArgument(0) and type = PlaintextIO()
result.asExpr() = this.getArgument(0) and type = PlaintextIO()
}
override DataFlow::Node getOutput(IOType type) {
result.asDefiningArgument() = this.(Call).getArgument(2) and type = DigestIO()
result.asDefiningArgument() = this.getArgument(2) and type = DigestIO()
}
}
/**
* A call to EVP_DigestFinal variants
*/
class EvpDigestFinalCall extends EvpFinalDigestOperationStep {
class EvpDigestFinalCall extends EvpFinalDigestOperationStep instanceof Call {
EvpDigestFinalCall() {
this.(Call).getTarget().getName() in [
"EVP_DigestFinal", "EVP_DigestFinal_ex", "EVP_DigestFinalXOF"
]
this.getTarget().getName() in ["EVP_DigestFinal", "EVP_DigestFinal_ex", "EVP_DigestFinalXOF"]
}
override DataFlow::Node getInput(IOType type) {
result.asExpr() = this.(Call).getArgument(0) and type = ContextIO()
result.asExpr() = this.getArgument(0) and type = ContextIO()
}
override DataFlow::Node getOutput(IOType type) {
result.asExpr() = this.(Call).getArgument(0) and
result.asExpr() = this.getArgument(0) and
type = ContextIO()
or
result.asDefiningArgument() = this.(Call).getArgument(1) and type = DigestIO()
result.asDefiningArgument() = this.getArgument(1) and type = DigestIO()
}
}

View File

@@ -177,6 +177,10 @@ class KeyGenOperationInstance extends Crypto::KeyGenerationOperationInstance ins
super.getOutputStepFlowingToStep(KeyIO()).getOutput(KeyIO()) = result
}
override predicate hasKeyValueConsumer() {
exists(OperationStep s | s.flowsToOperationStep(this) and s.setsValue(KeyIO()))
}
override Crypto::ConsumerInputDataFlowNode getKeySizeConsumer() {
super.getDominatingInitializersToStep(KeySizeIO()).getInput(KeySizeIO()) = result
}
@@ -194,7 +198,7 @@ class KeyGenOperationInstance extends Crypto::KeyGenerationOperationInstance ins
// .getKeySize()
}
override Crypto::ConsumerInputDataFlowNode getRawKeyValueConsumer() {
override Crypto::ConsumerInputDataFlowNode getKeyValueConsumer() {
super.getDominatingInitializersToStep(KeyIO()).getInput(KeyIO()) = result
}
}

View File

@@ -0,0 +1,8 @@
# partial model of the Oracle Call Interface (OCI) library
extensions:
- addsTo:
pack: codeql/cpp-all
extensible: sinkModel
data: # namespace, type, subtypes, name, signature, ext, input, kind, provenance
- ["", "", False, "OCIStmtPrepare", "", "", "Argument[*2]", "sql-injection", "manual"]
- ["", "", False, "OCIStmtPrepare2", "", "", "Argument[*3]", "sql-injection", "manual"]

View File

@@ -229,6 +229,49 @@ private predicate summaryModel0(
)
}
/**
* Holds if the given extension tuple `madId` should pretty-print as `model`.
*
* This predicate should only be used in tests.
*/
predicate interpretModelForTest(QlBuiltins::ExtensionId madId, string model) {
exists(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
string output, string kind, string provenance
|
Extensions::sourceModel(namespace, type, subtypes, name, signature, ext, output, kind,
provenance, madId)
|
model =
"Source: " + namespace + "; " + type + "; " + subtypes + "; " + name + "; " + signature + "; "
+ ext + "; " + output + "; " + kind + "; " + provenance
)
or
exists(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
string input, string kind, string provenance
|
Extensions::sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance,
madId)
|
model =
"Sink: " + namespace + "; " + type + "; " + subtypes + "; " + name + "; " + signature + "; " +
ext + "; " + input + "; " + kind + "; " + provenance
)
or
exists(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
string input, string output, string kind, string provenance
|
Extensions::summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind,
provenance, madId)
|
model =
"Summary: " + namespace + "; " + type + "; " + subtypes + "; " + name + "; " + signature +
"; " + ext + "; " + input + "; " + output + "; " + kind + "; " + provenance
)
}
/**
* Holds if `input` is `input0`, but with all occurrences of `@` replaced
* by `n` repetitions of `*` (and similarly for `output` and `output0`).

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
/**
* @kind test-postprocess
*/
import semmle.code.cpp.dataflow.ExternalFlow
import codeql.dataflow.test.ProvenancePathGraph::TestPostProcessing::TranslateProvenanceResults<interpretModelForTest/2>

View File

@@ -38,6 +38,9 @@ module SqlTaintedConfig implements DataFlow::ConfigSig {
predicate isSink(DataFlow::Node node) {
exists(SqlLikeFunction runSql | runSql.outermostWrapperFunctionCall(asSinkExpr(node), _))
or
// sink defined using models-as-data
sinkNode(node, "sql-injection")
}
predicate isBarrier(DataFlow::Node node) {
@@ -56,13 +59,21 @@ module SqlTaintedConfig implements DataFlow::ConfigSig {
module SqlTainted = TaintTracking::Global<SqlTaintedConfig>;
from
SqlLikeFunction runSql, Expr taintedArg, FlowSource taintSource, SqlTainted::PathNode sourceNode,
SqlTainted::PathNode sinkNode, string callChain
Expr taintedArg, FlowSource taintSource, SqlTainted::PathNode sourceNode,
SqlTainted::PathNode sinkNode, string extraText
where
runSql.outermostWrapperFunctionCall(taintedArg, callChain) and
(
exists(SqlLikeFunction runSql, string callChain |
runSql.outermostWrapperFunctionCall(taintedArg, callChain) and
extraText = " and then passed to " + callChain
)
or
sinkNode(sinkNode.getNode(), "sql-injection") and
extraText = ""
) and
SqlTainted::flowPath(sourceNode, sinkNode) and
taintedArg = asSinkExpr(sinkNode.getNode()) and
taintSource = sourceNode.getNode()
select taintedArg, sourceNode, sinkNode,
"This argument to a SQL query function is derived from $@ and then passed to " + callChain + ".",
taintSource, "user input (" + taintSource.getSourceType() + ")"
"This argument to a SQL query function is derived from $@" + extraText + ".", taintSource,
"user input (" + taintSource.getSourceType() + ")"

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The query `cpp/sql-injection` now can be extended using the `sql-injection` Models as Data (MaD) sink kind.

View File

@@ -32,8 +32,10 @@
| openssl_basic.c:144:46:144:51 | Digest | Source | openssl_basic.c:144:46:144:51 | Digest |
| openssl_basic.c:155:22:155:41 | Key | Algorithm | openssl_basic.c:155:22:155:41 | Key |
| openssl_basic.c:155:22:155:41 | KeyGeneration | Algorithm | openssl_basic.c:155:22:155:41 | KeyGeneration |
| openssl_basic.c:155:22:155:41 | KeyGeneration | KeyInput | openssl_basic.c:155:64:155:66 | Key |
| openssl_basic.c:155:22:155:41 | KeyGeneration | Output | openssl_basic.c:155:22:155:41 | Key |
| openssl_basic.c:155:43:155:55 | MACAlgorithm | H | openssl_basic.c:160:39:160:48 | HashAlgorithm |
| openssl_basic.c:155:64:155:66 | Key | Source | openssl_basic.c:179:43:179:76 | Constant |
| openssl_basic.c:160:59:160:62 | Key | Source | openssl_basic.c:155:22:155:41 | Key |
| openssl_basic.c:163:35:163:41 | Message | Source | openssl_basic.c:181:49:181:87 | Constant |
| openssl_basic.c:167:9:167:27 | SignOperation | Algorithm | openssl_basic.c:167:9:167:27 | SignOperation |
@@ -168,7 +170,9 @@
| openssl_signature.c:548:9:548:23 | KeyGeneration | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
| openssl_signature.c:548:9:548:23 | KeyGeneration | Output | openssl_signature.c:548:34:548:37 | Key |
| openssl_signature.c:548:34:548:37 | Key | Algorithm | openssl_signature.c:543:35:543:46 | KeyOperationAlgorithm |
| openssl_signature.c:575:32:575:37 | Key | Source | openssl_signature.c:575:32:575:37 | Key |
| openssl_signature.c:578:9:578:23 | KeyGeneration | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
| openssl_signature.c:578:9:578:23 | KeyGeneration | KeyInput | openssl_signature.c:575:32:575:37 | Key |
| openssl_signature.c:578:9:578:23 | KeyGeneration | Output | openssl_signature.c:578:34:578:37 | Key |
| openssl_signature.c:578:34:578:37 | Key | Algorithm | openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
| openssl_signature.c:702:60:702:71 | KeyOperationAlgorithm | Padding | openssl_signature.c:702:60:702:71 | KeyOperationAlgorithm |

View File

@@ -23,6 +23,7 @@
| openssl_basic.c:155:22:155:41 | Key | KeyType | Asymmetric | openssl_basic.c:155:22:155:41 | openssl_basic.c:155:22:155:41 |
| openssl_basic.c:155:43:155:55 | MACAlgorithm | Name | HMAC | openssl_basic.c:155:43:155:55 | openssl_basic.c:155:43:155:55 |
| openssl_basic.c:155:43:155:55 | MACAlgorithm | RawName | 855 | openssl_basic.c:155:43:155:55 | openssl_basic.c:155:43:155:55 |
| openssl_basic.c:155:64:155:66 | Key | KeyType | Unknown | openssl_basic.c:155:64:155:66 | openssl_basic.c:155:64:155:66 |
| openssl_basic.c:160:39:160:48 | HashAlgorithm | DigestSize | 256 | openssl_basic.c:160:39:160:48 | openssl_basic.c:160:39:160:48 |
| openssl_basic.c:160:39:160:48 | HashAlgorithm | Name | SHA2 | openssl_basic.c:160:39:160:48 | openssl_basic.c:160:39:160:48 |
| openssl_basic.c:160:39:160:48 | HashAlgorithm | RawName | EVP_sha256 | openssl_basic.c:160:39:160:48 | openssl_basic.c:160:39:160:48 |
@@ -80,6 +81,7 @@
| openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm | Name | DSA | openssl_signature.c:565:50:565:54 | openssl_signature.c:565:50:565:54 |
| openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm | RawName | dsa | openssl_signature.c:565:50:565:54 | openssl_signature.c:565:50:565:54 |
| openssl_signature.c:569:55:569:58 | Constant | Description | 2048 | openssl_signature.c:569:55:569:58 | openssl_signature.c:569:55:569:58 |
| openssl_signature.c:575:32:575:37 | Key | KeyType | Unknown | openssl_signature.c:575:32:575:37 | openssl_signature.c:575:32:575:37 |
| openssl_signature.c:578:34:578:37 | Key | KeyType | Asymmetric | openssl_signature.c:578:34:578:37 | openssl_signature.c:578:34:578:37 |
| openssl_signature.c:602:37:602:77 | Constant | Description | Test message for OpenSSL signature APIs | openssl_signature.c:602:37:602:77 | openssl_signature.c:602:37:602:77 |
| openssl_signature.c:684:24:684:33 | HashAlgorithm | DigestSize | 256 | openssl_signature.c:684:24:684:33 | openssl_signature.c:684:24:684:33 |

View File

@@ -25,6 +25,7 @@
| openssl_basic.c:155:22:155:41 | Key |
| openssl_basic.c:155:22:155:41 | KeyGeneration |
| openssl_basic.c:155:43:155:55 | MACAlgorithm |
| openssl_basic.c:155:64:155:66 | Key |
| openssl_basic.c:160:39:160:48 | HashAlgorithm |
| openssl_basic.c:160:59:160:62 | Key |
| openssl_basic.c:163:35:163:41 | Message |
@@ -98,6 +99,7 @@
| openssl_signature.c:548:34:548:37 | Key |
| openssl_signature.c:565:50:565:54 | KeyOperationAlgorithm |
| openssl_signature.c:569:55:569:58 | Constant |
| openssl_signature.c:575:32:575:37 | Key |
| openssl_signature.c:578:9:578:23 | KeyGeneration |
| openssl_signature.c:578:34:578:37 | Key |
| openssl_signature.c:602:37:602:77 | Constant |

View File

@@ -1,57 +1,80 @@
testFailures
models
| 1 | Sink: ; ; false; ymlSink; ; ; Argument[0]; test-sink; manual |
| 2 | Sink: boost::asio; ; false; write; ; ; Argument[*1]; remote-sink; manual |
| 3 | Source: ; ; false; GetCommandLineA; ; ; ReturnValue[*]; local; manual |
| 4 | Source: ; ; false; GetEnvironmentStringsA; ; ; ReturnValue[*]; local; manual |
| 5 | Source: ; ; false; GetEnvironmentVariableA; ; ; Argument[*1]; local; manual |
| 6 | Source: ; ; false; MapViewOfFile2; ; ; ReturnValue[*]; local; manual |
| 7 | Source: ; ; false; MapViewOfFile3; ; ; ReturnValue[*]; local; manual |
| 8 | Source: ; ; false; MapViewOfFile3FromApp; ; ; ReturnValue[*]; local; manual |
| 9 | Source: ; ; false; MapViewOfFile; ; ; ReturnValue[*]; local; manual |
| 10 | Source: ; ; false; MapViewOfFileEx; ; ; ReturnValue[*]; local; manual |
| 11 | Source: ; ; false; MapViewOfFileFromApp; ; ; ReturnValue[*]; local; manual |
| 12 | Source: ; ; false; MapViewOfFileNuma2; ; ; ReturnValue[*]; local; manual |
| 13 | Source: ; ; false; NtReadFile; ; ; Argument[*5]; local; manual |
| 14 | Source: ; ; false; ReadFile; ; ; Argument[*1]; local; manual |
| 15 | Source: ; ; false; ReadFileEx; ; ; Argument[*1]; local; manual |
| 16 | Source: ; ; false; ymlSource; ; ; ReturnValue; local; manual |
| 17 | Source: boost::asio; ; false; read_until; ; ; Argument[*1]; remote; manual |
| 18 | Summary: ; ; false; CommandLineToArgvA; ; ; Argument[*0]; ReturnValue[**]; taint; manual |
| 19 | Summary: ; ; false; ReadFileEx; ; ; Argument[*3].Field[@hEvent]; Argument[4].Parameter[*2].Field[@hEvent]; value; manual |
| 20 | Summary: ; ; false; ymlStepGenerated; ; ; Argument[0]; ReturnValue; taint; df-generated |
| 21 | Summary: ; ; false; ymlStepManual; ; ; Argument[0]; ReturnValue; taint; manual |
| 22 | Summary: ; ; false; ymlStepManual_with_body; ; ; Argument[0]; ReturnValue; taint; manual |
| 23 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual |
edges
| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:10 |
| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:2 |
| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:2 Sink:MaD:6 |
| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:23 |
| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:17 |
| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:17 Sink:MaD:2 |
| asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:98:7:98:14 | send_str | provenance | TaintFunction |
| asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:100:64:100:71 | *send_str | provenance | TaintFunction |
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | |
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:101:7:101:17 | send_buffer | provenance | |
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:6 |
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:2 |
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | provenance | |
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:10 |
| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | provenance | MaD:26955 |
| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | provenance | MaD:26956 |
| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | provenance | MaD:26957 |
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:23 |
| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | provenance | MaD:21 |
| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | provenance | MaD:20 |
| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | provenance | MaD:22 |
| test.cpp:7:47:7:52 | value2 | test.cpp:7:64:7:69 | value2 | provenance | |
| test.cpp:7:64:7:69 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | provenance | |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:26953 |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:14:10:14:10 | x | provenance | Sink:MaD:26954 |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:16 |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:14:10:14:10 | x | provenance | Sink:MaD:1 |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:17:24:17:24 | x | provenance | |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:21:27:21:27 | x | provenance | |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:25:35:25:35 | x | provenance | |
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:32:41:32:41 | x | provenance | |
| test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | |
| test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:18:10:18:10 | y | provenance | Sink:MaD:26954 |
| test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:18:10:18:10 | y | provenance | Sink:MaD:1 |
| test.cpp:17:24:17:24 | x | test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | provenance | |
| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:26955 |
| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:21 |
| test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | |
| test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:22:10:22:10 | z | provenance | Sink:MaD:26954 |
| test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:22:10:22:10 | z | provenance | Sink:MaD:1 |
| test.cpp:21:27:21:27 | x | test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | provenance | |
| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:26956 |
| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:20 |
| test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | |
| test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:26:10:26:11 | y2 | provenance | Sink:MaD:26954 |
| test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:26:10:26:11 | y2 | provenance | Sink:MaD:1 |
| test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | provenance | |
| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:26957 |
| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:22 |
| test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | provenance | |
| test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:33:10:33:11 | z2 | provenance | Sink:MaD:26954 |
| test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:33:10:33:11 | z2 | provenance | Sink:MaD:1 |
| test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | provenance | |
| test.cpp:32:41:32:41 | x | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | provenance | |
| windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:341 |
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:22:15:22:29 | *call to GetCommandLineA | provenance | Src:MaD:325 |
| windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:18 |
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:22:15:22:29 | *call to GetCommandLineA | provenance | Src:MaD:3 |
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:24:8:24:11 | * ... | provenance | |
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:27:36:27:38 | *cmd | provenance | |
| windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | |
| windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | windows.cpp:30:8:30:15 | * ... | provenance | |
| windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | provenance | |
| windows.cpp:27:36:27:38 | *cmd | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | MaD:341 |
| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | provenance | Src:MaD:327 |
| windows.cpp:27:36:27:38 | *cmd | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | MaD:18 |
| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | provenance | Src:MaD:4 |
| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:36:10:36:13 | * ... | provenance | |
| windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | windows.cpp:41:10:41:13 | * ... | provenance | Src:MaD:329 |
| windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | windows.cpp:41:10:41:13 | * ... | provenance | Src:MaD:5 |
| windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [*hEvent] | windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | provenance | |
| windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [hEvent] | windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | provenance | |
| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | provenance | MaD:343 |
| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx | provenance | MaD:343 |
| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | provenance | MaD:19 |
| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx | provenance | MaD:19 |
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] | windows.cpp:147:16:147:27 | *lpOverlapped [*hEvent] | provenance | |
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [hEvent] | windows.cpp:157:16:157:27 | *lpOverlapped [hEvent] | provenance | |
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] | provenance | |
@@ -67,36 +90,36 @@ edges
| windows.cpp:159:12:159:55 | hEvent | windows.cpp:160:8:160:8 | c | provenance | |
| windows.cpp:159:35:159:46 | *lpOverlapped [hEvent] | windows.cpp:159:12:159:55 | hEvent | provenance | |
| windows.cpp:159:35:159:46 | *lpOverlapped [hEvent] | windows.cpp:159:12:159:55 | hEvent | provenance | |
| windows.cpp:168:35:168:40 | ReadFile output argument | windows.cpp:170:10:170:16 | * ... | provenance | Src:MaD:331 |
| windows.cpp:177:23:177:28 | ReadFileEx output argument | windows.cpp:179:10:179:16 | * ... | provenance | Src:MaD:332 |
| windows.cpp:189:21:189:26 | ReadFile output argument | windows.cpp:190:5:190:56 | *... = ... | provenance | Src:MaD:331 |
| windows.cpp:168:35:168:40 | ReadFile output argument | windows.cpp:170:10:170:16 | * ... | provenance | Src:MaD:14 |
| windows.cpp:177:23:177:28 | ReadFileEx output argument | windows.cpp:179:10:179:16 | * ... | provenance | Src:MaD:15 |
| windows.cpp:189:21:189:26 | ReadFile output argument | windows.cpp:190:5:190:56 | *... = ... | provenance | Src:MaD:14 |
| windows.cpp:190:5:190:14 | *overlapped [post update] [*hEvent] | windows.cpp:192:53:192:63 | *& ... [*hEvent] | provenance | |
| windows.cpp:190:5:190:56 | *... = ... | windows.cpp:190:5:190:14 | *overlapped [post update] [*hEvent] | provenance | |
| windows.cpp:192:53:192:63 | *& ... [*hEvent] | windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [*hEvent] | provenance | |
| windows.cpp:198:21:198:26 | ReadFile output argument | windows.cpp:199:5:199:57 | ... = ... | provenance | Src:MaD:331 |
| windows.cpp:198:21:198:26 | ReadFile output argument | windows.cpp:199:5:199:57 | ... = ... | provenance | Src:MaD:14 |
| windows.cpp:199:5:199:14 | *overlapped [post update] [hEvent] | windows.cpp:201:53:201:63 | *& ... [hEvent] | provenance | |
| windows.cpp:199:5:199:57 | ... = ... | windows.cpp:199:5:199:14 | *overlapped [post update] [hEvent] | provenance | |
| windows.cpp:201:53:201:63 | *& ... [hEvent] | windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [hEvent] | provenance | |
| windows.cpp:209:84:209:89 | NtReadFile output argument | windows.cpp:211:10:211:16 | * ... | provenance | Src:MaD:340 |
| windows.cpp:286:23:286:35 | *call to MapViewOfFile | windows.cpp:286:23:286:35 | *call to MapViewOfFile | provenance | Src:MaD:333 |
| windows.cpp:209:84:209:89 | NtReadFile output argument | windows.cpp:211:10:211:16 | * ... | provenance | Src:MaD:13 |
| windows.cpp:286:23:286:35 | *call to MapViewOfFile | windows.cpp:286:23:286:35 | *call to MapViewOfFile | provenance | Src:MaD:9 |
| windows.cpp:286:23:286:35 | *call to MapViewOfFile | windows.cpp:287:20:287:52 | *pMapView | provenance | |
| windows.cpp:287:20:287:52 | *pMapView | windows.cpp:289:10:289:16 | * ... | provenance | |
| windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | provenance | Src:MaD:334 |
| windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | provenance | Src:MaD:6 |
| windows.cpp:293:23:293:36 | *call to MapViewOfFile2 | windows.cpp:294:20:294:52 | *pMapView | provenance | |
| windows.cpp:294:20:294:52 | *pMapView | windows.cpp:296:10:296:16 | * ... | provenance | |
| windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | provenance | Src:MaD:335 |
| windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | provenance | Src:MaD:7 |
| windows.cpp:302:23:302:36 | *call to MapViewOfFile3 | windows.cpp:303:20:303:52 | *pMapView | provenance | |
| windows.cpp:303:20:303:52 | *pMapView | windows.cpp:305:10:305:16 | * ... | provenance | |
| windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | provenance | Src:MaD:336 |
| windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | provenance | Src:MaD:8 |
| windows.cpp:311:23:311:43 | *call to MapViewOfFile3FromApp | windows.cpp:312:20:312:52 | *pMapView | provenance | |
| windows.cpp:312:20:312:52 | *pMapView | windows.cpp:314:10:314:16 | * ... | provenance | |
| windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | provenance | Src:MaD:337 |
| windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | provenance | Src:MaD:10 |
| windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | windows.cpp:319:20:319:52 | *pMapView | provenance | |
| windows.cpp:319:20:319:52 | *pMapView | windows.cpp:321:10:321:16 | * ... | provenance | |
| windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | provenance | Src:MaD:338 |
| windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | provenance | Src:MaD:11 |
| windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | windows.cpp:326:20:326:52 | *pMapView | provenance | |
| windows.cpp:326:20:326:52 | *pMapView | windows.cpp:328:10:328:16 | * ... | provenance | |
| windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | provenance | Src:MaD:339 |
| windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | provenance | Src:MaD:12 |
| windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:333:20:333:52 | *pMapView | provenance | |
| windows.cpp:333:20:333:52 | *pMapView | windows.cpp:335:10:335:16 | * ... | provenance | |
nodes
@@ -222,3 +245,4 @@ subpaths
| test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body |
| test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body |
| windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA |
testFailures

View File

@@ -1,7 +1,7 @@
import utils.test.dataflow.FlowTestCommon
import cpp
import semmle.code.cpp.security.FlowSources
import IRTest::IRFlow::PathGraph
import codeql.dataflow.test.ProvenancePathGraph
module IRTest {
private import semmle.code.cpp.ir.IR
@@ -33,3 +33,4 @@ module IRTest {
}
import MakeTest<IRFlowTest<IRTest::IRFlow>>
import ShowProvenance<interpretModelForTest/2, IRTest::IRFlow::PathNode, IRTest::IRFlow::PathGraph>

View File

@@ -1,3 +1,11 @@
#select
| test.c:21:18:21:23 | query1 | test.c:14:27:14:30 | **argv | test.c:21:18:21:23 | *query1 | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | **argv | user input (a command-line argument) |
| test.c:51:18:51:23 | query1 | test.c:14:27:14:30 | **argv | test.c:51:18:51:23 | *query1 | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | **argv | user input (a command-line argument) |
| test.c:76:17:76:25 | userInput | test.c:75:8:75:16 | gets output argument | test.c:76:17:76:25 | *userInput | This argument to a SQL query function is derived from $@ and then passed to SQLPrepare(StatementText). | test.c:75:8:75:16 | gets output argument | user input (string read by gets) |
| test.c:77:20:77:28 | userInput | test.c:75:8:75:16 | gets output argument | test.c:77:20:77:28 | *userInput | This argument to a SQL query function is derived from $@ and then passed to SQLExecDirect(StatementText). | test.c:75:8:75:16 | gets output argument | user input (string read by gets) |
| test.c:106:24:106:29 | query1 | test.c:101:8:101:16 | gets output argument | test.c:106:24:106:29 | *query1 | This argument to a SQL query function is derived from $@. | test.c:101:8:101:16 | gets output argument | user input (string read by gets) |
| test.c:107:28:107:33 | query1 | test.c:101:8:101:16 | gets output argument | test.c:107:28:107:33 | *query1 | This argument to a SQL query function is derived from $@. | test.c:101:8:101:16 | gets output argument | user input (string read by gets) |
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | **argv | test.cpp:43:27:43:33 | *access to array | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | **argv | user input (a command-line argument) |
edges
| test.c:14:27:14:30 | **argv | test.c:15:20:15:26 | *access to array | provenance | |
| test.c:15:20:15:26 | *access to array | test.c:21:18:21:23 | *query1 | provenance | TaintFunction |
@@ -9,7 +17,12 @@ edges
| test.c:48:20:48:33 | *globalUsername | test.c:51:18:51:23 | *query1 | provenance | TaintFunction |
| test.c:75:8:75:16 | gets output argument | test.c:76:17:76:25 | *userInput | provenance | |
| test.c:75:8:75:16 | gets output argument | test.c:77:20:77:28 | *userInput | provenance | |
| test.c:101:8:101:16 | gets output argument | test.c:106:24:106:29 | *query1 | provenance | TaintFunction Sink:MaD:2 |
| test.c:101:8:101:16 | gets output argument | test.c:107:28:107:33 | *query1 | provenance | TaintFunction Sink:MaD:1 |
| test.cpp:39:27:39:30 | **argv | test.cpp:43:27:43:33 | *access to array | provenance | |
models
| 1 | Sink: ; ; false; OCIStmtPrepare2; ; ; Argument[*3]; sql-injection; manual |
| 2 | Sink: ; ; false; OCIStmtPrepare; ; ; Argument[*2]; sql-injection; manual |
nodes
| test.c:14:27:14:30 | **argv | semmle.label | **argv |
| test.c:15:20:15:26 | *access to array | semmle.label | *access to array |
@@ -23,12 +36,9 @@ nodes
| test.c:75:8:75:16 | gets output argument | semmle.label | gets output argument |
| test.c:76:17:76:25 | *userInput | semmle.label | *userInput |
| test.c:77:20:77:28 | *userInput | semmle.label | *userInput |
| test.c:101:8:101:16 | gets output argument | semmle.label | gets output argument |
| test.c:106:24:106:29 | *query1 | semmle.label | *query1 |
| test.c:107:28:107:33 | *query1 | semmle.label | *query1 |
| test.cpp:39:27:39:30 | **argv | semmle.label | **argv |
| test.cpp:43:27:43:33 | *access to array | semmle.label | *access to array |
subpaths
#select
| test.c:21:18:21:23 | query1 | test.c:14:27:14:30 | **argv | test.c:21:18:21:23 | *query1 | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | **argv | user input (a command-line argument) |
| test.c:51:18:51:23 | query1 | test.c:14:27:14:30 | **argv | test.c:51:18:51:23 | *query1 | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | **argv | user input (a command-line argument) |
| test.c:76:17:76:25 | userInput | test.c:75:8:75:16 | gets output argument | test.c:76:17:76:25 | *userInput | This argument to a SQL query function is derived from $@ and then passed to SQLPrepare(StatementText). | test.c:75:8:75:16 | gets output argument | user input (string read by gets) |
| test.c:77:20:77:28 | userInput | test.c:75:8:75:16 | gets output argument | test.c:77:20:77:28 | *userInput | This argument to a SQL query function is derived from $@ and then passed to SQLExecDirect(StatementText). | test.c:75:8:75:16 | gets output argument | user input (string read by gets) |
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | **argv | test.cpp:43:27:43:33 | *access to array | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | **argv | user input (a command-line argument) |

View File

@@ -1 +1,5 @@
Security/CWE/CWE-089/SqlTainted.ql
query: Security/CWE/CWE-089/SqlTainted.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql

View File

@@ -11,14 +11,14 @@ int atoi(const char *nptr);
void exit(int i);
///// Test code /////
int main(int argc, char** argv) {
int main(int argc, char** argv) { // $ Source
char *userName = argv[2];
int userNumber = atoi(argv[3]);
// a string from the user is injected directly into an SQL query.
char query1[1000] = {0};
snprintf(query1, 1000, "SELECT UID FROM USERS where name = \"%s\"", userName);
mysql_query(0, query1); // BAD
mysql_query(0, query1); // $ Alert
// the user string is encoded by a library routine.
char userNameSanitized[1000] = {0};
@@ -48,7 +48,7 @@ void badFunc() {
char *userName = globalUsername;
char query1[1000] = {0};
snprintf(query1, 1000, "SELECT UID FROM USERS where name = \"%s\"", userName);
mysql_query(0, query1); // BAD
mysql_query(0, query1); // $ Alert
}
//ODBC Library Rountines
@@ -72,7 +72,44 @@ SQLRETURN SQLPrepare(
void ODBCTests(){
char userInput[100];
gets(userInput);
SQLPrepare(0, userInput, 100); // BAD
SQLExecDirect(0, userInput, 100); // BAD
gets(userInput); // $ Source
SQLPrepare(0, userInput, 100); // $ Alert
SQLExecDirect(0, userInput, 100); // $ Alert
}
// Oracle Call Interface (OCI) Routines
int OCIStmtPrepare(
void *arg0,
void *arg1,
const unsigned char *sql,
unsigned int arg3,
unsigned int arg4,
unsigned int arg5);
int OCIStmtPrepare2(
void *arg0,
void **arg1,
void *arg2,
const unsigned char *sql,
unsigned int arg4,
const unsigned char *arg5,
unsigned int arg6,
unsigned int arg7,
unsigned int arg8);
void OCITests(){
char userInput[100];
gets(userInput); // $ Source
// a string from the user is injected directly into an SQL query.
char query1[1000] = {0};
snprintf(query1, 1000, "SELECT UID FROM USERS where name = \"%s\"", userInput);
OCIStmtPrepare(0, 0, query1, 0, 0, 0); // $ Alert
OCIStmtPrepare2(0, 0, 0, query1, 0, 0, 0, 0, 0); // $ Alert
// an integer from the user is injected into an SQL query.
int userNumber = atoi(userInput);
char query2[1000] = {0};
snprintf(query2, 1000, "SELECT UID FROM USERS where number = \"%i\"", userNumber);
OCIStmtPrepare(0, 0, query2, 0, 0, 0); // GOOD
OCIStmtPrepare2(0, 0, 0, query2, 0, 0, 0, 0, 0); // GOOD
}

View File

@@ -36,11 +36,11 @@ namespace pqxx {
};
}
int main(int argc, char** argv) {
int main(int argc, char** argv) { // $ Source
pqxx::connection c;
pqxx::work w(c);
pqxx::row r = w.exec1(argv[1]); // BAD
pqxx::row r = w.exec1(argv[1]); // $ Alert
pqxx::result r2 = w.exec(w.quote(argv[1])); // GOOD

View File

@@ -0,0 +1,20 @@
extensions:
- addsTo:
pack: codeql/csharp-all
extensible: sinkModel
data:
- ["Microsoft.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String)", "", "Argument[0]", "sql-injection", "manual"]
- ["Microsoft.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String,Microsoft.Data.SqlClient.SqlConnection)", "", "Argument[0]", "sql-injection", "manual"]
- ["Microsoft.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String,Microsoft.Data.SqlClient.SqlConnection,Microsoft.Data.SqlClient.SqlTransaction)", "", "Argument[0]", "sql-injection", "manual"]
- ["Microsoft.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String,Microsoft.Data.SqlClient.SqlConnection,Microsoft.Data.SqlClient.SqlTransaction,Microsoft.Data.SqlClient.SqlCommandColumnEncryptionSetting)", "", "Argument[0]", "sql-injection", "manual"]
- ["Microsoft.Data.SqlClient", "SqlDataAdapter", False, "SqlDataAdapter", "(Microsoft.Data.SqlClient.SqlCommand)", "", "Argument[0]", "sql-injection", "manual"]
- ["Microsoft.Data.SqlClient", "SqlDataAdapter", False, "SqlDataAdapter", "(System.String,Microsoft.Data.SqlClient.SqlConnection)", "", "Argument[0]", "sql-injection", "manual"]
- ["Microsoft.Data.SqlClient", "SqlDataAdapter", False, "SqlDataAdapter", "(System.String,System.String)", "", "Argument[0]", "sql-injection", "manual"]
- addsTo:
pack: codeql/csharp-all
extensible: summaryModel
data:
- ["Microsoft.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
- ["Microsoft.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String,Microsoft.Data.SqlClient.SqlConnection)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
- ["Microsoft.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String,Microsoft.Data.SqlClient.SqlConnection,Microsoft.Data.SqlClient.SqlTransaction)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
- ["Microsoft.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String,Microsoft.Data.SqlClient.SqlConnection,Microsoft.Data.SqlClient.SqlTransaction,Microsoft.Data.SqlClient.SqlCommandColumnEncryptionSetting)", "", "Argument[0]", "Argument[this]", "taint", "manual"]

View File

@@ -1,6 +1,8 @@
/**
* Provides classes for representing abstract bounds for use in, for example, range analysis.
*/
overlay[local?]
module;
private import internal.rangeanalysis.BoundSpecific

View File

@@ -3,6 +3,8 @@
* an expression, `b` is a `Bound` (typically zero or the value of an SSA
* variable), and `v` is an integer in the range `[0 .. m-1]`.
*/
overlay[local?]
module;
private import internal.rangeanalysis.ModulusAnalysisSpecific::Private
private import Bound

View File

@@ -1,3 +1,6 @@
overlay[local?]
module;
newtype TSign =
TNeg() or
TZero() or

View File

@@ -5,6 +5,8 @@
* The analysis is implemented as an abstract interpretation over the
* three-valued domain `{negative, zero, positive}`.
*/
overlay[local?]
module;
private import SignAnalysisSpecific::Private
private import SsaReadPositionCommon

View File

@@ -1,6 +1,8 @@
/**
* Provides classes for representing a position at which an SSA variable is read.
*/
overlay[local?]
module;
private import SsaReadPositionSpecific
import SsaReadPositionSpecific::Public

View File

@@ -35,6 +35,7 @@ class IDbCommandConstructionSqlExpr extends SqlExpr, ObjectCreation {
ic.getParameter(0).getType() instanceof StringType and
not exists(Type t | t = ic.getDeclaringType() |
// Known sealed classes:
t.hasFullyQualifiedName("Microsoft.Data.SqlClient", "SqlCommand") or
t.hasFullyQualifiedName("System.Data.SqlClient", "SqlCommand") or
t.hasFullyQualifiedName("System.Data.Odbc", "OdbcCommand") or
t.hasFullyQualifiedName("System.Data.OleDb", "OleDbCommand") or

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Added explicit SQL injection Models as Data models for `Microsoft.Data.SqlClient.SqlCommand` and `Microsoft.Data.SqlClient.SqlDataAdapter`. This reduces false negatives for the query `cs/sql-injection`.

View File

@@ -0,0 +1,33 @@
using System;
using Microsoft.Data;
using Microsoft.Data.SqlClient;
namespace Test
{
class SqlInjection
{
string connectionString;
System.Windows.Forms.TextBox box1;
public void MakeSqlCommand()
{
// BAD: Text from a local textbox
using (var connection = new SqlConnection(connectionString))
{
var queryString = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='"
+ box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var cmd = new SqlCommand(queryString); // $ Alert[cs/sql-injection]
var adapter = new SqlDataAdapter(cmd); // $ Alert[cs/sql-injection]
}
// BAD: Input from the command line.
using (var connection = new SqlConnection(connectionString))
{
var queryString = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='"
+ Console.ReadLine() + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var cmd = new SqlCommand(queryString); // $ Alert[cs/sql-injection]
var adapter = new SqlDataAdapter(cmd); // $ Alert[cs/sql-injection]
}
}
}
}

View File

@@ -0,0 +1,39 @@
#select
| SqlInjection.cs:19:42:19:52 | access to local variable queryString | SqlInjection.cs:18:21:18:29 | access to property Text : String | SqlInjection.cs:19:42:19:52 | access to local variable queryString | This query depends on $@. | SqlInjection.cs:18:21:18:29 | access to property Text : String | this TextBox text |
| SqlInjection.cs:20:50:20:52 | access to local variable cmd | SqlInjection.cs:18:21:18:29 | access to property Text : String | SqlInjection.cs:20:50:20:52 | access to local variable cmd | This query depends on $@. | SqlInjection.cs:18:21:18:29 | access to property Text : String | this TextBox text |
| SqlInjection.cs:28:42:28:52 | access to local variable queryString | SqlInjection.cs:27:21:27:38 | call to method ReadLine : String | SqlInjection.cs:28:42:28:52 | access to local variable queryString | This query depends on $@. | SqlInjection.cs:27:21:27:38 | call to method ReadLine : String | this read from stdin |
| SqlInjection.cs:29:50:29:52 | access to local variable cmd | SqlInjection.cs:27:21:27:38 | call to method ReadLine : String | SqlInjection.cs:29:50:29:52 | access to local variable cmd | This query depends on $@. | SqlInjection.cs:27:21:27:38 | call to method ReadLine : String | this read from stdin |
edges
| SqlInjection.cs:17:21:17:31 | access to local variable queryString : String | SqlInjection.cs:19:42:19:52 | access to local variable queryString | provenance | Sink:MaD:1 |
| SqlInjection.cs:17:21:17:31 | access to local variable queryString : String | SqlInjection.cs:19:42:19:52 | access to local variable queryString : String | provenance | |
| SqlInjection.cs:18:21:18:29 | access to property Text : String | SqlInjection.cs:17:21:17:31 | access to local variable queryString : String | provenance | |
| SqlInjection.cs:19:21:19:23 | access to local variable cmd : SqlCommand | SqlInjection.cs:20:50:20:52 | access to local variable cmd | provenance | Sink:MaD:2 |
| SqlInjection.cs:19:27:19:53 | object creation of type SqlCommand : SqlCommand | SqlInjection.cs:19:21:19:23 | access to local variable cmd : SqlCommand | provenance | |
| SqlInjection.cs:19:42:19:52 | access to local variable queryString : String | SqlInjection.cs:19:27:19:53 | object creation of type SqlCommand : SqlCommand | provenance | MaD:4 |
| SqlInjection.cs:26:21:26:31 | access to local variable queryString : String | SqlInjection.cs:28:42:28:52 | access to local variable queryString | provenance | Sink:MaD:1 |
| SqlInjection.cs:26:21:26:31 | access to local variable queryString : String | SqlInjection.cs:28:42:28:52 | access to local variable queryString : String | provenance | |
| SqlInjection.cs:27:21:27:38 | call to method ReadLine : String | SqlInjection.cs:26:21:26:31 | access to local variable queryString : String | provenance | Src:MaD:3 |
| SqlInjection.cs:28:21:28:23 | access to local variable cmd : SqlCommand | SqlInjection.cs:29:50:29:52 | access to local variable cmd | provenance | Sink:MaD:2 |
| SqlInjection.cs:28:27:28:53 | object creation of type SqlCommand : SqlCommand | SqlInjection.cs:28:21:28:23 | access to local variable cmd : SqlCommand | provenance | |
| SqlInjection.cs:28:42:28:52 | access to local variable queryString : String | SqlInjection.cs:28:27:28:53 | object creation of type SqlCommand : SqlCommand | provenance | MaD:4 |
models
| 1 | Sink: Microsoft.Data.SqlClient; SqlCommand; false; SqlCommand; (System.String); ; Argument[0]; sql-injection; manual |
| 2 | Sink: Microsoft.Data.SqlClient; SqlDataAdapter; false; SqlDataAdapter; (Microsoft.Data.SqlClient.SqlCommand); ; Argument[0]; sql-injection; manual |
| 3 | Source: System; Console; false; ReadLine; ; ; ReturnValue; stdin; manual |
| 4 | Summary: Microsoft.Data.SqlClient; SqlCommand; false; SqlCommand; (System.String); ; Argument[0]; Argument[this]; taint; manual |
nodes
| SqlInjection.cs:17:21:17:31 | access to local variable queryString : String | semmle.label | access to local variable queryString : String |
| SqlInjection.cs:18:21:18:29 | access to property Text : String | semmle.label | access to property Text : String |
| SqlInjection.cs:19:21:19:23 | access to local variable cmd : SqlCommand | semmle.label | access to local variable cmd : SqlCommand |
| SqlInjection.cs:19:27:19:53 | object creation of type SqlCommand : SqlCommand | semmle.label | object creation of type SqlCommand : SqlCommand |
| SqlInjection.cs:19:42:19:52 | access to local variable queryString | semmle.label | access to local variable queryString |
| SqlInjection.cs:19:42:19:52 | access to local variable queryString : String | semmle.label | access to local variable queryString : String |
| SqlInjection.cs:20:50:20:52 | access to local variable cmd | semmle.label | access to local variable cmd |
| SqlInjection.cs:26:21:26:31 | access to local variable queryString : String | semmle.label | access to local variable queryString : String |
| SqlInjection.cs:27:21:27:38 | call to method ReadLine : String | semmle.label | call to method ReadLine : String |
| SqlInjection.cs:28:21:28:23 | access to local variable cmd : SqlCommand | semmle.label | access to local variable cmd : SqlCommand |
| SqlInjection.cs:28:27:28:53 | object creation of type SqlCommand : SqlCommand | semmle.label | object creation of type SqlCommand : SqlCommand |
| SqlInjection.cs:28:42:28:52 | access to local variable queryString | semmle.label | access to local variable queryString |
| SqlInjection.cs:28:42:28:52 | access to local variable queryString : String | semmle.label | access to local variable queryString : String |
| SqlInjection.cs:29:50:29:52 | access to local variable cmd | semmle.label | access to local variable cmd |
subpaths

View File

@@ -0,0 +1,7 @@
extensions:
- addsTo:
pack: codeql/threat-models
extensible: threatModelConfiguration
data:
- ["local", true, 0]

View File

@@ -0,0 +1,4 @@
query: Security Features/CWE-089/SqlInjection.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql

View File

@@ -0,0 +1,4 @@
semmle-extractor-options: /nostdlib /noconfig
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/Microsoft.Data.SqlClient/6.0.2/Microsoft.Data.SqlClient.csproj
semmle-extractor-options: ${testdir}/../../../resources/stubs/System.Windows.cs
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj

View File

@@ -17,12 +17,12 @@ namespace Test
{
connection.Open();
SqlCommand customerCommand = new SqlCommand("SELECT * FROM customers", connection);
SqlDataReader customerReader = customerCommand.ExecuteReader();
SqlDataReader customerReader = customerCommand.ExecuteReader(); // $ Source[cs/sql-injection]
while (customerReader.Read())
{
// BAD: Read from database, write it straight to another query
SqlCommand secondCustomerCommand = new SqlCommand("SELECT * FROM customers WHERE customerName=" + customerReader.GetString(1), connection);
SqlCommand secondCustomerCommand = new SqlCommand("SELECT * FROM customers WHERE customerName=" + customerReader.GetString(1), connection); // $ Alert[cs/sql-injection]
}
customerReader.Close();
}
@@ -30,7 +30,7 @@ namespace Test
public void RunSQLFromFile()
{
using (FileStream fs = new FileStream("myfile.txt", FileMode.Open))
using (FileStream fs = new FileStream("myfile.txt", FileMode.Open)) // $ Source[cs/sql-injection]
{
using (StreamReader sr = new StreamReader(fs, Encoding.UTF8))
{
@@ -42,7 +42,7 @@ namespace Test
continue;
using (var connection = new SQLiteConnection(""))
{
var cmd = new SQLiteCommand(sql, connection);
var cmd = new SQLiteCommand(sql, connection); // $ Alert[cs/sql-injection]
cmd.ExecuteScalar();
}
}

View File

@@ -35,8 +35,8 @@ namespace Test
using (var connection = new SqlConnection(connectionString))
{
var query1 = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='"
+ categoryTextBox.Text + "' ORDER BY PRICE";
var adapter = new SqlDataAdapter(query1, connection);
+ categoryTextBox.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var adapter = new SqlDataAdapter(query1, connection); // $ Alert[cs/sql-injection]
var result = new DataSet();
adapter.Fill(result);
}
@@ -70,9 +70,9 @@ namespace Test
{
// BAD: Use EntityFramework direct Sql execution methods
var query1 = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='"
+ categoryTextBox.Text + "' ORDER BY PRICE";
context.Database.ExecuteSqlCommand(query1);
context.Database.SqlQuery<string>(query1);
+ categoryTextBox.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
context.Database.ExecuteSqlCommand(query1); // $ Alert[cs/sql-injection]
context.Database.SqlQuery<string>(query1); // $ Alert[cs/sql-injection]
// GOOD: Use EntityFramework direct Sql execution methods with parameter
var query2 = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY="
+ "@p0 ORDER BY PRICE";
@@ -84,8 +84,8 @@ namespace Test
using (var connection = new SqlConnection(connectionString))
{
var query1 = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='"
+ box1.Text + "' ORDER BY PRICE";
var adapter = new SqlDataAdapter(query1, connection);
+ box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var adapter = new SqlDataAdapter(query1, connection); // $ Alert[cs/sql-injection]
var result = new DataSet();
adapter.Fill(result);
}
@@ -94,9 +94,9 @@ namespace Test
using (var connection = new SqlConnection(connectionString))
{
var queryString = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='"
+ box1.Text + "' ORDER BY PRICE";
var cmd = new SqlCommand(queryString);
var adapter = new SqlDataAdapter(cmd);
+ box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var cmd = new SqlCommand(queryString); // $ Alert[cs/sql-injection]
var adapter = new SqlDataAdapter(cmd); // $ Alert[cs/sql-injection]
var result = new DataSet();
adapter.Fill(result);
}
@@ -105,9 +105,9 @@ namespace Test
using (var connection = new SqlConnection(connectionString))
{
var queryString = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='"
+ Console.ReadLine()! + "' ORDER BY PRICE";
var cmd = new SqlCommand(queryString);
var adapter = new SqlDataAdapter(cmd);
+ Console.ReadLine()! + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var cmd = new SqlCommand(queryString); // $ Alert[cs/sql-injection]
var adapter = new SqlDataAdapter(cmd); // $ Alert[cs/sql-injection]
var result = new DataSet();
adapter.Fill(result);
}
@@ -119,14 +119,14 @@ namespace Test
public abstract class MyController : Controller
{
[HttpPost("{userId:string}")]
public async Task<IActionResult> GetUserById([FromRoute] string userId, CancellationToken cancellationToken)
public async Task<IActionResult> GetUserById([FromRoute] string userId, CancellationToken cancellationToken) // $ Source[cs/sql-injection]
{
// This is a vulnerable method due to SQL injection
string query = "SELECT * FROM Users WHERE UserId = '" + userId + "'";
using (SqlConnection connection = new SqlConnection("YourConnectionString"))
{
SqlCommand command = new SqlCommand(query, connection);
SqlCommand command = new SqlCommand(query, connection); // $ Alert[cs/sql-injection]
connection.Open();
SqlDataReader reader = command.ExecuteReader();

View File

@@ -1,2 +1,4 @@
query: Security Features/CWE-089/SqlInjection.ql
postprocess: utils/test/PrettyPrintModels.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql

View File

@@ -17,8 +17,8 @@ namespace Test
{
using (var connection = new SqlConnection(connectionString))
{
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE";
var result = connection.Query<object>(query);
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var result = connection.Query<object>(query); // $ Alert[cs/sql-injection]
}
}
@@ -26,8 +26,8 @@ namespace Test
{
using (var connection = new SqlConnection(connectionString))
{
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE";
var result = await connection.QueryAsync<object>(query);
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var result = await connection.QueryAsync<object>(query); // $ Alert[cs/sql-injection]
}
}
@@ -35,8 +35,8 @@ namespace Test
{
using (var connection = new SqlConnection(connectionString))
{
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE";
var result = await connection.QueryFirstAsync(query);
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var result = await connection.QueryFirstAsync(query); // $ Alert[cs/sql-injection]
}
}
@@ -44,9 +44,9 @@ namespace Test
{
using (var connection = new SqlConnection(connectionString))
{
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE";
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
await connection.ExecuteAsync(query);
await connection.ExecuteAsync(query); // $ Alert[cs/sql-injection]
}
}
@@ -54,8 +54,8 @@ namespace Test
{
using (var connection = new SqlConnection(connectionString))
{
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE";
connection.ExecuteScalar(query);
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
connection.ExecuteScalar(query); // $ Alert[cs/sql-injection]
}
}
@@ -63,8 +63,8 @@ namespace Test
{
using (var connection = new SqlConnection(connectionString))
{
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE";
connection.ExecuteReader(query);
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
connection.ExecuteReader(query); // $ Alert[cs/sql-injection]
}
}
@@ -72,9 +72,9 @@ namespace Test
{
using (var connection = new SqlConnection(connectionString))
{
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE";
var query = "SELECT ITEM,PRICE FROM PRODUCT WHERE ITEM_CATEGORY='" + box1.Text + "' ORDER BY PRICE"; // $ Source[cs/sql-injection]
var comDef = new CommandDefinition(query);
var comDef = new CommandDefinition(query); // $ Alert[cs/sql-injection]
var result = await connection.QueryFirstAsync(comDef);
}
}

View File

@@ -16,12 +16,12 @@ namespace TestSqlite
public void InjectUntrustedData()
{
// BAD: untrusted data is not sanitized.
SQLiteCommand cmd = new SQLiteCommand(untrustedData.Text);
SQLiteCommand cmd = new SQLiteCommand(untrustedData.Text); // $ Alert[cs/sql-injection]
// BAD: untrusted data is not sanitized.
using (var connection = new SQLiteConnection(connectionString))
{
cmd = new SQLiteCommand(untrustedData.Text, connection);
cmd = new SQLiteCommand(untrustedData.Text, connection); // $ Source[cs/sql-injection] Alert[cs/sql-injection]
}
SQLiteDataAdapter adapter;
@@ -30,23 +30,23 @@ namespace TestSqlite
// BAD: untrusted data is not sanitized.
using (var connection = new SQLiteConnection(connectionString))
{
adapter = new SQLiteDataAdapter(untrustedData.Text, connection);
adapter = new SQLiteDataAdapter(untrustedData.Text, connection); // $ Alert[cs/sql-injection]
result = new DataSet();
adapter.Fill(result);
}
// BAD: untrusted data is not sanitized.
adapter = new SQLiteDataAdapter(untrustedData.Text, connectionString);
adapter = new SQLiteDataAdapter(untrustedData.Text, connectionString); // $ Alert[cs/sql-injection]
result = new DataSet();
adapter.Fill(result);
// BAD: untrusted data is not sanitized.
adapter = new SQLiteDataAdapter(cmd);
adapter = new SQLiteDataAdapter(cmd); // $ Alert[cs/sql-injection]
result = new DataSet();
adapter.Fill(result);
// BAD: untrusted data as filename is not sanitized.
using (FileStream fs = new FileStream(untrustedData.Text, FileMode.Open))
using (FileStream fs = new FileStream(untrustedData.Text, FileMode.Open)) // $ Source[cs/sql-injection]
{
using (StreamReader sr = new StreamReader(fs, Encoding.UTF8))
{
@@ -58,7 +58,7 @@ namespace TestSqlite
continue;
using (var connection = new SQLiteConnection(""))
{
cmd = new SQLiteCommand(sql, connection);
cmd = new SQLiteCommand(sql, connection); // $ Alert[cs/sql-injection]
cmd.ExecuteScalar();
}
}
@@ -66,4 +66,4 @@ namespace TestSqlite
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.Bcl.AsyncInterfaces/1.1.1/Microsoft.Bcl.AsyncInterfaces.csproj" />
<ProjectReference Include="../../System.ClientModel/1.0.0/System.ClientModel.csproj" />
<ProjectReference Include="../../System.Diagnostics.DiagnosticSource/6.0.1/System.Diagnostics.DiagnosticSource.csproj" />
<ProjectReference Include="../../System.Memory.Data/1.0.2/System.Memory.Data.csproj" />
<ProjectReference Include="../../System.Numerics.Vectors/4.5.0/System.Numerics.Vectors.csproj" />
<ProjectReference Include="../../System.Text.Encodings.Web/4.7.2/System.Text.Encodings.Web.csproj" />
<ProjectReference Include="../../System.Text.Json/4.7.2/System.Text.Json.csproj" />
<ProjectReference Include="../../System.Threading.Tasks.Extensions/4.5.4/System.Threading.Tasks.Extensions.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,431 @@
// This file contains auto-generated code.
// Generated from `Azure.Identity, Version=1.11.4.0, Culture=neutral, PublicKeyToken=92742159e12e44c8`.
namespace Azure
{
namespace Identity
{
public class AuthenticationFailedException : System.Exception
{
public AuthenticationFailedException(string message) => throw null;
public AuthenticationFailedException(string message, System.Exception innerException) => throw null;
protected AuthenticationFailedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class AuthenticationRecord
{
public string Authority { get => throw null; }
public string ClientId { get => throw null; }
public static Azure.Identity.AuthenticationRecord Deserialize(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public static System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public string HomeAccountId { get => throw null; }
public void Serialize(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public string TenantId { get => throw null; }
public string Username { get => throw null; }
}
public class AuthenticationRequiredException : Azure.Identity.CredentialUnavailableException
{
public AuthenticationRequiredException(string message, Azure.Core.TokenRequestContext context) : base(default(string)) => throw null;
public AuthenticationRequiredException(string message, Azure.Core.TokenRequestContext context, System.Exception innerException) : base(default(string)) => throw null;
protected AuthenticationRequiredException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(string)) => throw null;
public Azure.Core.TokenRequestContext TokenRequestContext { get => throw null; }
}
public class AuthorizationCodeCredential : Azure.Core.TokenCredential
{
protected AuthorizationCodeCredential() => throw null;
public AuthorizationCodeCredential(string tenantId, string clientId, string clientSecret, string authorizationCode) => throw null;
public AuthorizationCodeCredential(string tenantId, string clientId, string clientSecret, string authorizationCode, Azure.Identity.AuthorizationCodeCredentialOptions options) => throw null;
public AuthorizationCodeCredential(string tenantId, string clientId, string clientSecret, string authorizationCode, Azure.Identity.TokenCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class AuthorizationCodeCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public AuthorizationCodeCredentialOptions() => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
public System.Uri RedirectUri { get => throw null; set { } }
}
public static class AzureAuthorityHosts
{
public static System.Uri AzureChina { get => throw null; }
public static System.Uri AzureGermany { get => throw null; }
public static System.Uri AzureGovernment { get => throw null; }
public static System.Uri AzurePublicCloud { get => throw null; }
}
public class AzureCliCredential : Azure.Core.TokenCredential
{
public AzureCliCredential() => throw null;
public AzureCliCredential(Azure.Identity.AzureCliCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class AzureCliCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public AzureCliCredentialOptions() => throw null;
public System.TimeSpan? ProcessTimeout { get => throw null; set { } }
public string TenantId { get => throw null; set { } }
}
public class AzureDeveloperCliCredential : Azure.Core.TokenCredential
{
public AzureDeveloperCliCredential() => throw null;
public AzureDeveloperCliCredential(Azure.Identity.AzureDeveloperCliCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class AzureDeveloperCliCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public AzureDeveloperCliCredentialOptions() => throw null;
public System.TimeSpan? ProcessTimeout { get => throw null; set { } }
public string TenantId { get => throw null; set { } }
}
public class AzurePowerShellCredential : Azure.Core.TokenCredential
{
public AzurePowerShellCredential() => throw null;
public AzurePowerShellCredential(Azure.Identity.AzurePowerShellCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class AzurePowerShellCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public AzurePowerShellCredentialOptions() => throw null;
public System.TimeSpan? ProcessTimeout { get => throw null; set { } }
public string TenantId { get => throw null; set { } }
}
public class BrowserCustomizationOptions
{
public BrowserCustomizationOptions() => throw null;
public string ErrorMessage { get => throw null; set { } }
public string SuccessMessage { get => throw null; set { } }
public bool? UseEmbeddedWebView { get => throw null; set { } }
}
public class ChainedTokenCredential : Azure.Core.TokenCredential
{
public ChainedTokenCredential(params Azure.Core.TokenCredential[] sources) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class ClientAssertionCredential : Azure.Core.TokenCredential
{
protected ClientAssertionCredential() => throw null;
public ClientAssertionCredential(string tenantId, string clientId, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<string>> assertionCallback, Azure.Identity.ClientAssertionCredentialOptions options = default(Azure.Identity.ClientAssertionCredentialOptions)) => throw null;
public ClientAssertionCredential(string tenantId, string clientId, System.Func<string> assertionCallback, Azure.Identity.ClientAssertionCredentialOptions options = default(Azure.Identity.ClientAssertionCredentialOptions)) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class ClientAssertionCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public ClientAssertionCredentialOptions() => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
}
public class ClientCertificateCredential : Azure.Core.TokenCredential
{
protected ClientCertificateCredential() => throw null;
public ClientCertificateCredential(string tenantId, string clientId, string clientCertificatePath) => throw null;
public ClientCertificateCredential(string tenantId, string clientId, string clientCertificatePath, Azure.Identity.TokenCredentialOptions options) => throw null;
public ClientCertificateCredential(string tenantId, string clientId, string clientCertificatePath, Azure.Identity.ClientCertificateCredentialOptions options) => throw null;
public ClientCertificateCredential(string tenantId, string clientId, System.Security.Cryptography.X509Certificates.X509Certificate2 clientCertificate) => throw null;
public ClientCertificateCredential(string tenantId, string clientId, System.Security.Cryptography.X509Certificates.X509Certificate2 clientCertificate, Azure.Identity.TokenCredentialOptions options) => throw null;
public ClientCertificateCredential(string tenantId, string clientId, System.Security.Cryptography.X509Certificates.X509Certificate2 clientCertificate, Azure.Identity.ClientCertificateCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class ClientCertificateCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public ClientCertificateCredentialOptions() => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
public bool SendCertificateChain { get => throw null; set { } }
public Azure.Identity.TokenCachePersistenceOptions TokenCachePersistenceOptions { get => throw null; set { } }
}
public class ClientSecretCredential : Azure.Core.TokenCredential
{
protected ClientSecretCredential() => throw null;
public ClientSecretCredential(string tenantId, string clientId, string clientSecret) => throw null;
public ClientSecretCredential(string tenantId, string clientId, string clientSecret, Azure.Identity.ClientSecretCredentialOptions options) => throw null;
public ClientSecretCredential(string tenantId, string clientId, string clientSecret, Azure.Identity.TokenCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class ClientSecretCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public ClientSecretCredentialOptions() => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
public Azure.Identity.TokenCachePersistenceOptions TokenCachePersistenceOptions { get => throw null; set { } }
}
public class CredentialUnavailableException : Azure.Identity.AuthenticationFailedException
{
public CredentialUnavailableException(string message) : base(default(string)) => throw null;
public CredentialUnavailableException(string message, System.Exception innerException) : base(default(string)) => throw null;
protected CredentialUnavailableException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(string)) => throw null;
}
public class DefaultAzureCredential : Azure.Core.TokenCredential
{
public DefaultAzureCredential(bool includeInteractiveCredentials = default(bool)) => throw null;
public DefaultAzureCredential(Azure.Identity.DefaultAzureCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class DefaultAzureCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public System.TimeSpan? CredentialProcessTimeout { get => throw null; set { } }
public DefaultAzureCredentialOptions() => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
public bool ExcludeAzureCliCredential { get => throw null; set { } }
public bool ExcludeAzureDeveloperCliCredential { get => throw null; set { } }
public bool ExcludeAzurePowerShellCredential { get => throw null; set { } }
public bool ExcludeEnvironmentCredential { get => throw null; set { } }
public bool ExcludeInteractiveBrowserCredential { get => throw null; set { } }
public bool ExcludeManagedIdentityCredential { get => throw null; set { } }
public bool ExcludeSharedTokenCacheCredential { get => throw null; set { } }
public bool ExcludeVisualStudioCodeCredential { get => throw null; set { } }
public bool ExcludeVisualStudioCredential { get => throw null; set { } }
public bool ExcludeWorkloadIdentityCredential { get => throw null; set { } }
public string InteractiveBrowserCredentialClientId { get => throw null; set { } }
public string InteractiveBrowserTenantId { get => throw null; set { } }
public string ManagedIdentityClientId { get => throw null; set { } }
public Azure.Core.ResourceIdentifier ManagedIdentityResourceId { get => throw null; set { } }
public string SharedTokenCacheTenantId { get => throw null; set { } }
public string SharedTokenCacheUsername { get => throw null; set { } }
public string TenantId { get => throw null; set { } }
public string VisualStudioCodeTenantId { get => throw null; set { } }
public string VisualStudioTenantId { get => throw null; set { } }
public string WorkloadIdentityClientId { get => throw null; set { } }
}
public class DeviceCodeCredential : Azure.Core.TokenCredential
{
public virtual Azure.Identity.AuthenticationRecord Authenticate(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public virtual Azure.Identity.AuthenticationRecord Authenticate(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public virtual System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> AuthenticateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public virtual System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> AuthenticateAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public DeviceCodeCredential() => throw null;
public DeviceCodeCredential(Azure.Identity.DeviceCodeCredentialOptions options) => throw null;
public DeviceCodeCredential(System.Func<Azure.Identity.DeviceCodeInfo, System.Threading.CancellationToken, System.Threading.Tasks.Task> deviceCodeCallback, string clientId, Azure.Identity.TokenCredentialOptions options = default(Azure.Identity.TokenCredentialOptions)) => throw null;
public DeviceCodeCredential(System.Func<Azure.Identity.DeviceCodeInfo, System.Threading.CancellationToken, System.Threading.Tasks.Task> deviceCodeCallback, string tenantId, string clientId, Azure.Identity.TokenCredentialOptions options = default(Azure.Identity.TokenCredentialOptions)) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class DeviceCodeCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public Azure.Identity.AuthenticationRecord AuthenticationRecord { get => throw null; set { } }
public string ClientId { get => throw null; set { } }
public DeviceCodeCredentialOptions() => throw null;
public System.Func<Azure.Identity.DeviceCodeInfo, System.Threading.CancellationToken, System.Threading.Tasks.Task> DeviceCodeCallback { get => throw null; set { } }
public bool DisableAutomaticAuthentication { get => throw null; set { } }
public bool DisableInstanceDiscovery { get => throw null; set { } }
public string TenantId { get => throw null; set { } }
public Azure.Identity.TokenCachePersistenceOptions TokenCachePersistenceOptions { get => throw null; set { } }
}
public struct DeviceCodeInfo
{
public string ClientId { get => throw null; }
public string DeviceCode { get => throw null; }
public System.DateTimeOffset ExpiresOn { get => throw null; }
public string Message { get => throw null; }
public System.Collections.Generic.IReadOnlyCollection<string> Scopes { get => throw null; }
public string UserCode { get => throw null; }
public System.Uri VerificationUri { get => throw null; }
}
public class EnvironmentCredential : Azure.Core.TokenCredential
{
public EnvironmentCredential() => throw null;
public EnvironmentCredential(Azure.Identity.TokenCredentialOptions options) => throw null;
public EnvironmentCredential(Azure.Identity.EnvironmentCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class EnvironmentCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public EnvironmentCredentialOptions() => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
}
public static class IdentityModelFactory
{
public static Azure.Identity.AuthenticationRecord AuthenticationRecord(string username, string authority, string homeAccountId, string tenantId, string clientId) => throw null;
public static Azure.Identity.DeviceCodeInfo DeviceCodeInfo(string userCode, string deviceCode, System.Uri verificationUri, System.DateTimeOffset expiresOn, string message, string clientId, System.Collections.Generic.IReadOnlyCollection<string> scopes) => throw null;
}
public class InteractiveBrowserCredential : Azure.Core.TokenCredential
{
public virtual Azure.Identity.AuthenticationRecord Authenticate(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public virtual Azure.Identity.AuthenticationRecord Authenticate(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public virtual System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> AuthenticateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public virtual System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> AuthenticateAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public InteractiveBrowserCredential() => throw null;
public InteractiveBrowserCredential(Azure.Identity.InteractiveBrowserCredentialOptions options) => throw null;
public InteractiveBrowserCredential(string clientId) => throw null;
public InteractiveBrowserCredential(string tenantId, string clientId, Azure.Identity.TokenCredentialOptions options = default(Azure.Identity.TokenCredentialOptions)) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class InteractiveBrowserCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public Azure.Identity.AuthenticationRecord AuthenticationRecord { get => throw null; set { } }
public Azure.Identity.BrowserCustomizationOptions BrowserCustomization { get => throw null; set { } }
public string ClientId { get => throw null; set { } }
public InteractiveBrowserCredentialOptions() => throw null;
public bool DisableAutomaticAuthentication { get => throw null; set { } }
public bool DisableInstanceDiscovery { get => throw null; set { } }
public string LoginHint { get => throw null; set { } }
public System.Uri RedirectUri { get => throw null; set { } }
public string TenantId { get => throw null; set { } }
public Azure.Identity.TokenCachePersistenceOptions TokenCachePersistenceOptions { get => throw null; set { } }
}
public class ManagedIdentityCredential : Azure.Core.TokenCredential
{
protected ManagedIdentityCredential() => throw null;
public ManagedIdentityCredential(string clientId = default(string), Azure.Identity.TokenCredentialOptions options = default(Azure.Identity.TokenCredentialOptions)) => throw null;
public ManagedIdentityCredential(Azure.Core.ResourceIdentifier resourceId, Azure.Identity.TokenCredentialOptions options = default(Azure.Identity.TokenCredentialOptions)) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class OnBehalfOfCredential : Azure.Core.TokenCredential
{
protected OnBehalfOfCredential() => throw null;
public OnBehalfOfCredential(string tenantId, string clientId, System.Security.Cryptography.X509Certificates.X509Certificate2 clientCertificate, string userAssertion) => throw null;
public OnBehalfOfCredential(string tenantId, string clientId, System.Security.Cryptography.X509Certificates.X509Certificate2 clientCertificate, string userAssertion, Azure.Identity.OnBehalfOfCredentialOptions options) => throw null;
public OnBehalfOfCredential(string tenantId, string clientId, string clientSecret, string userAssertion) => throw null;
public OnBehalfOfCredential(string tenantId, string clientId, string clientSecret, string userAssertion, Azure.Identity.OnBehalfOfCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken) => throw null;
}
public class OnBehalfOfCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public OnBehalfOfCredentialOptions() => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
public bool SendCertificateChain { get => throw null; set { } }
public Azure.Identity.TokenCachePersistenceOptions TokenCachePersistenceOptions { get => throw null; set { } }
}
public class SharedTokenCacheCredential : Azure.Core.TokenCredential
{
public SharedTokenCacheCredential() => throw null;
public SharedTokenCacheCredential(Azure.Identity.SharedTokenCacheCredentialOptions options) => throw null;
public SharedTokenCacheCredential(string username, Azure.Identity.TokenCredentialOptions options = default(Azure.Identity.TokenCredentialOptions)) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class SharedTokenCacheCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public Azure.Identity.AuthenticationRecord AuthenticationRecord { get => throw null; set { } }
public string ClientId { get => throw null; set { } }
public SharedTokenCacheCredentialOptions() => throw null;
public SharedTokenCacheCredentialOptions(Azure.Identity.TokenCachePersistenceOptions tokenCacheOptions) => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
public bool EnableGuestTenantAuthentication { get => throw null; set { } }
public string TenantId { get => throw null; set { } }
public Azure.Identity.TokenCachePersistenceOptions TokenCachePersistenceOptions { get => throw null; set { } }
public string Username { get => throw null; set { } }
}
public struct TokenCacheData
{
public System.ReadOnlyMemory<byte> CacheBytes { get => throw null; }
public TokenCacheData(System.ReadOnlyMemory<byte> cacheBytes) => throw null;
}
public class TokenCachePersistenceOptions
{
public TokenCachePersistenceOptions() => throw null;
public string Name { get => throw null; set { } }
public bool UnsafeAllowUnencryptedStorage { get => throw null; set { } }
}
public class TokenCacheRefreshArgs
{
public bool IsCaeEnabled { get => throw null; }
public string SuggestedCacheKey { get => throw null; }
}
public class TokenCacheUpdatedArgs
{
public bool IsCaeEnabled { get => throw null; }
public System.ReadOnlyMemory<byte> UnsafeCacheData { get => throw null; }
}
public class TokenCredentialDiagnosticsOptions : Azure.Core.DiagnosticsOptions
{
public TokenCredentialDiagnosticsOptions() => throw null;
public bool IsAccountIdentifierLoggingEnabled { get => throw null; set { } }
}
public class TokenCredentialOptions : Azure.Core.ClientOptions
{
public System.Uri AuthorityHost { get => throw null; set { } }
public TokenCredentialOptions() => throw null;
public Azure.Identity.TokenCredentialDiagnosticsOptions Diagnostics { get => throw null; }
public bool IsUnsafeSupportLoggingEnabled { get => throw null; set { } }
}
public abstract class UnsafeTokenCacheOptions : Azure.Identity.TokenCachePersistenceOptions
{
protected UnsafeTokenCacheOptions() => throw null;
protected abstract System.Threading.Tasks.Task<System.ReadOnlyMemory<byte>> RefreshCacheAsync();
protected virtual System.Threading.Tasks.Task<Azure.Identity.TokenCacheData> RefreshCacheAsync(Azure.Identity.TokenCacheRefreshArgs args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
protected abstract System.Threading.Tasks.Task TokenCacheUpdatedAsync(Azure.Identity.TokenCacheUpdatedArgs tokenCacheUpdatedArgs);
}
public class UsernamePasswordCredential : Azure.Core.TokenCredential
{
public virtual Azure.Identity.AuthenticationRecord Authenticate(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public virtual Azure.Identity.AuthenticationRecord Authenticate(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public virtual System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> AuthenticateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public virtual System.Threading.Tasks.Task<Azure.Identity.AuthenticationRecord> AuthenticateAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
protected UsernamePasswordCredential() => throw null;
public UsernamePasswordCredential(string username, string password, string tenantId, string clientId) => throw null;
public UsernamePasswordCredential(string username, string password, string tenantId, string clientId, Azure.Identity.TokenCredentialOptions options) => throw null;
public UsernamePasswordCredential(string username, string password, string tenantId, string clientId, Azure.Identity.UsernamePasswordCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class UsernamePasswordCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public UsernamePasswordCredentialOptions() => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
public Azure.Identity.TokenCachePersistenceOptions TokenCachePersistenceOptions { get => throw null; set { } }
}
public class VisualStudioCodeCredential : Azure.Core.TokenCredential
{
public VisualStudioCodeCredential() => throw null;
public VisualStudioCodeCredential(Azure.Identity.VisualStudioCodeCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken) => throw null;
}
public class VisualStudioCodeCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public VisualStudioCodeCredentialOptions() => throw null;
public string TenantId { get => throw null; set { } }
}
public class VisualStudioCredential : Azure.Core.TokenCredential
{
public VisualStudioCredential() => throw null;
public VisualStudioCredential(Azure.Identity.VisualStudioCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken) => throw null;
}
public class VisualStudioCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public VisualStudioCredentialOptions() => throw null;
public System.TimeSpan? ProcessTimeout { get => throw null; set { } }
public string TenantId { get => throw null; set { } }
}
public class WorkloadIdentityCredential : Azure.Core.TokenCredential
{
public WorkloadIdentityCredential() => throw null;
public WorkloadIdentityCredential(Azure.Identity.WorkloadIdentityCredentialOptions options) => throw null;
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
}
public class WorkloadIdentityCredentialOptions : Azure.Identity.TokenCredentialOptions
{
public System.Collections.Generic.IList<string> AdditionallyAllowedTenants { get => throw null; }
public string ClientId { get => throw null; set { } }
public WorkloadIdentityCredentialOptions() => throw null;
public bool DisableInstanceDiscovery { get => throw null; set { } }
public string TenantId { get => throw null; set { } }
public string TokenFilePath { get => throw null; set { } }
}
}
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Azure.Core/1.38.0/Azure.Core.csproj" />
<ProjectReference Include="../../Microsoft.Identity.Client/4.61.3/Microsoft.Identity.Client.csproj" />
<ProjectReference Include="../../Microsoft.Identity.Client.Extensions.Msal/4.61.3/Microsoft.Identity.Client.Extensions.Msal.csproj" />
<ProjectReference Include="../../System.Memory/4.5.4/System.Memory.csproj" />
<ProjectReference Include="../../System.Security.Cryptography.ProtectedData/9.0.1/System.Security.Cryptography.ProtectedData.csproj" />
<ProjectReference Include="../../System.Text.Json/4.7.2/System.Text.Json.csproj" />
<ProjectReference Include="../../System.Threading.Tasks.Extensions/4.5.4/System.Threading.Tasks.Extensions.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Azure.Identity/1.11.4/Azure.Identity.csproj" />
<ProjectReference Include="../../Microsoft.Bcl.Cryptography/9.0.4/Microsoft.Bcl.Cryptography.csproj" />
<ProjectReference Include="../../Microsoft.Data.SqlClient.SNI.runtime/6.0.2/Microsoft.Data.SqlClient.SNI.runtime.csproj" />
<ProjectReference Include="../../Microsoft.Extensions.Caching.Memory/9.0.4/Microsoft.Extensions.Caching.Memory.csproj" />
<ProjectReference Include="../../Microsoft.IdentityModel.JsonWebTokens/7.5.0/Microsoft.IdentityModel.JsonWebTokens.csproj" />
<ProjectReference Include="../../Microsoft.IdentityModel.Protocols.OpenIdConnect/7.5.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.csproj" />
<ProjectReference Include="../../Microsoft.SqlServer.Server/1.0.0/Microsoft.SqlServer.Server.csproj" />
<ProjectReference Include="../../System.Configuration.ConfigurationManager/9.0.4/System.Configuration.ConfigurationManager.csproj" />
<ProjectReference Include="../../System.Security.Cryptography.Pkcs/9.0.4/System.Security.Cryptography.Pkcs.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.Extensions.Primitives/9.0.4/Microsoft.Extensions.Primitives.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.Extensions.Caching.Abstractions/9.0.4/Microsoft.Extensions.Caching.Abstractions.csproj" />
<ProjectReference Include="../../Microsoft.Extensions.DependencyInjection.Abstractions/9.0.4/Microsoft.Extensions.DependencyInjection.Abstractions.csproj" />
<ProjectReference Include="../../Microsoft.Extensions.Logging.Abstractions/9.0.4/Microsoft.Extensions.Logging.Abstractions.csproj" />
<ProjectReference Include="../../Microsoft.Extensions.Options/9.0.4/Microsoft.Extensions.Options.csproj" />
<ProjectReference Include="../../Microsoft.Extensions.Primitives/9.0.4/Microsoft.Extensions.Primitives.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.Extensions.DependencyInjection.Abstractions/9.0.4/Microsoft.Extensions.DependencyInjection.Abstractions.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.Extensions.DependencyInjection.Abstractions/9.0.4/Microsoft.Extensions.DependencyInjection.Abstractions.csproj" />
<ProjectReference Include="../../Microsoft.Extensions.Primitives/9.0.4/Microsoft.Extensions.Primitives.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,103 @@
// This file contains auto-generated code.
// Generated from `Microsoft.Identity.Client.Extensions.Msal, Version=4.61.3.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae`.
namespace Microsoft
{
namespace Identity
{
namespace Client
{
namespace Extensions
{
namespace Msal
{
public class CacheChangedEventArgs : System.EventArgs
{
public readonly System.Collections.Generic.IEnumerable<string> AccountsAdded;
public readonly System.Collections.Generic.IEnumerable<string> AccountsRemoved;
public CacheChangedEventArgs(System.Collections.Generic.IEnumerable<string> added, System.Collections.Generic.IEnumerable<string> removed) => throw null;
}
public sealed class CrossPlatLock : System.IDisposable
{
public CrossPlatLock(string lockfilePath, int lockFileRetryDelay = default(int), int lockFileRetryCount = default(int)) => throw null;
public void Dispose() => throw null;
}
public class MsalCacheHelper
{
public event System.EventHandler<Microsoft.Identity.Client.Extensions.Msal.CacheChangedEventArgs> CacheChanged;
public void Clear() => throw null;
public static System.Threading.Tasks.Task<Microsoft.Identity.Client.Extensions.Msal.MsalCacheHelper> CreateAsync(Microsoft.Identity.Client.Extensions.Msal.StorageCreationProperties storageCreationProperties, System.Diagnostics.TraceSource logger = default(System.Diagnostics.TraceSource)) => throw null;
public const string LinuxKeyRingDefaultCollection = default;
public const string LinuxKeyRingSessionCollection = default;
public byte[] LoadUnencryptedTokenCache() => throw null;
public void RegisterCache(Microsoft.Identity.Client.ITokenCache tokenCache) => throw null;
public void SaveUnencryptedTokenCache(byte[] tokenCache) => throw null;
public void UnregisterCache(Microsoft.Identity.Client.ITokenCache tokenCache) => throw null;
public static string UserRootDirectory { get => throw null; }
public void VerifyPersistence() => throw null;
}
public class MsalCachePersistenceException : System.Exception
{
public MsalCachePersistenceException() => throw null;
public MsalCachePersistenceException(string message) => throw null;
public MsalCachePersistenceException(string message, System.Exception innerException) => throw null;
protected MsalCachePersistenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public static class SharedUtilities
{
public static string GetUserRootDirectory() => throw null;
public static bool IsLinuxPlatform() => throw null;
public static bool IsMacPlatform() => throw null;
public static bool IsWindowsPlatform() => throw null;
}
public class Storage
{
public void Clear(bool ignoreExceptions = default(bool)) => throw null;
public static Microsoft.Identity.Client.Extensions.Msal.Storage Create(Microsoft.Identity.Client.Extensions.Msal.StorageCreationProperties creationProperties, System.Diagnostics.TraceSource logger = default(System.Diagnostics.TraceSource)) => throw null;
public byte[] ReadData() => throw null;
public void VerifyPersistence() => throw null;
public void WriteData(byte[] data) => throw null;
}
public class StorageCreationProperties
{
public string Authority { get => throw null; }
public readonly string CacheDirectory;
public readonly string CacheFileName;
public string CacheFilePath { get => throw null; }
public string ClientId { get => throw null; }
public readonly System.Collections.Generic.KeyValuePair<string, string> KeyringAttribute1;
public readonly System.Collections.Generic.KeyValuePair<string, string> KeyringAttribute2;
public readonly string KeyringCollection;
public readonly string KeyringSchemaName;
public readonly string KeyringSecretLabel;
public readonly int LockRetryCount;
public readonly int LockRetryDelay;
public readonly string MacKeyChainAccountName;
public readonly string MacKeyChainServiceName;
public readonly bool UseLinuxUnencryptedFallback;
public readonly bool UseUnencryptedFallback;
}
public class StorageCreationPropertiesBuilder
{
public Microsoft.Identity.Client.Extensions.Msal.StorageCreationProperties Build() => throw null;
public StorageCreationPropertiesBuilder(string cacheFileName, string cacheDirectory, string clientId) => throw null;
public StorageCreationPropertiesBuilder(string cacheFileName, string cacheDirectory) => throw null;
public Microsoft.Identity.Client.Extensions.Msal.StorageCreationPropertiesBuilder CustomizeLockRetry(int lockRetryDelay, int lockRetryCount) => throw null;
public Microsoft.Identity.Client.Extensions.Msal.StorageCreationPropertiesBuilder WithCacheChangedEvent(string clientId, string authority = default(string)) => throw null;
public Microsoft.Identity.Client.Extensions.Msal.StorageCreationPropertiesBuilder WithLinuxKeyring(string schemaName, string collection, string secretLabel, System.Collections.Generic.KeyValuePair<string, string> attribute1, System.Collections.Generic.KeyValuePair<string, string> attribute2) => throw null;
public Microsoft.Identity.Client.Extensions.Msal.StorageCreationPropertiesBuilder WithLinuxUnprotectedFile() => throw null;
public Microsoft.Identity.Client.Extensions.Msal.StorageCreationPropertiesBuilder WithMacKeyChain(string serviceName, string accountName) => throw null;
public Microsoft.Identity.Client.Extensions.Msal.StorageCreationPropertiesBuilder WithUnprotectedFile() => throw null;
}
public class TraceSourceLogger
{
public TraceSourceLogger(System.Diagnostics.TraceSource traceSource) => throw null;
public void LogError(string message) => throw null;
public void LogInformation(string message) => throw null;
public void LogWarning(string message) => throw null;
public System.Diagnostics.TraceSource Source { get => throw null; }
}
}
}
}
}
}

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.Identity.Client/4.61.3/Microsoft.Identity.Client.csproj" />
<ProjectReference Include="../../System.Security.Cryptography.ProtectedData/9.0.1/System.Security.Cryptography.ProtectedData.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.IdentityModel.Abstractions/7.5.0/Microsoft.IdentityModel.Abstractions.csproj" />
<ProjectReference Include="../../System.Diagnostics.DiagnosticSource/6.0.1/System.Diagnostics.DiagnosticSource.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,77 @@
// This file contains auto-generated code.
// Generated from `Microsoft.IdentityModel.Abstractions, Version=7.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35`.
namespace Microsoft
{
namespace IdentityModel
{
namespace Abstractions
{
public enum EventLogLevel
{
LogAlways = 0,
Critical = 1,
Error = 2,
Warning = 3,
Informational = 4,
Verbose = 5,
}
public interface IIdentityLogger
{
bool IsEnabled(Microsoft.IdentityModel.Abstractions.EventLogLevel eventLogLevel);
void Log(Microsoft.IdentityModel.Abstractions.LogEntry entry);
}
public interface ITelemetryClient
{
string ClientId { get; set; }
void Initialize();
bool IsEnabled();
bool IsEnabled(string eventName);
void TrackEvent(Microsoft.IdentityModel.Abstractions.TelemetryEventDetails eventDetails);
void TrackEvent(string eventName, System.Collections.Generic.IDictionary<string, string> stringProperties = default(System.Collections.Generic.IDictionary<string, string>), System.Collections.Generic.IDictionary<string, long> longProperties = default(System.Collections.Generic.IDictionary<string, long>), System.Collections.Generic.IDictionary<string, bool> boolProperties = default(System.Collections.Generic.IDictionary<string, bool>), System.Collections.Generic.IDictionary<string, System.DateTime> dateTimeProperties = default(System.Collections.Generic.IDictionary<string, System.DateTime>), System.Collections.Generic.IDictionary<string, double> doubleProperties = default(System.Collections.Generic.IDictionary<string, double>), System.Collections.Generic.IDictionary<string, System.Guid> guidProperties = default(System.Collections.Generic.IDictionary<string, System.Guid>));
}
public class LogEntry
{
public string CorrelationId { get => throw null; set { } }
public LogEntry() => throw null;
public Microsoft.IdentityModel.Abstractions.EventLogLevel EventLogLevel { get => throw null; set { } }
public string Message { get => throw null; set { } }
}
public sealed class NullIdentityModelLogger : Microsoft.IdentityModel.Abstractions.IIdentityLogger
{
public static Microsoft.IdentityModel.Abstractions.NullIdentityModelLogger Instance { get => throw null; }
public bool IsEnabled(Microsoft.IdentityModel.Abstractions.EventLogLevel eventLogLevel) => throw null;
public void Log(Microsoft.IdentityModel.Abstractions.LogEntry entry) => throw null;
}
public class NullTelemetryClient : Microsoft.IdentityModel.Abstractions.ITelemetryClient
{
public string ClientId { get => throw null; set { } }
public void Initialize() => throw null;
public static Microsoft.IdentityModel.Abstractions.NullTelemetryClient Instance { get => throw null; }
public bool IsEnabled() => throw null;
public bool IsEnabled(string eventName) => throw null;
public void TrackEvent(Microsoft.IdentityModel.Abstractions.TelemetryEventDetails eventDetails) => throw null;
public void TrackEvent(string eventName, System.Collections.Generic.IDictionary<string, string> stringProperties = default(System.Collections.Generic.IDictionary<string, string>), System.Collections.Generic.IDictionary<string, long> longProperties = default(System.Collections.Generic.IDictionary<string, long>), System.Collections.Generic.IDictionary<string, bool> boolProperties = default(System.Collections.Generic.IDictionary<string, bool>), System.Collections.Generic.IDictionary<string, System.DateTime> dateTimeProperties = default(System.Collections.Generic.IDictionary<string, System.DateTime>), System.Collections.Generic.IDictionary<string, double> doubleProperties = default(System.Collections.Generic.IDictionary<string, double>), System.Collections.Generic.IDictionary<string, System.Guid> guidProperties = default(System.Collections.Generic.IDictionary<string, System.Guid>)) => throw null;
}
public static class ObservabilityConstants
{
public const string ActivityId = default;
public const string ClientId = default;
public const string Duration = default;
public const string Succeeded = default;
}
public abstract class TelemetryEventDetails
{
protected TelemetryEventDetails() => throw null;
public virtual string Name { get => throw null; set { } }
public virtual System.Collections.Generic.IReadOnlyDictionary<string, object> Properties { get => throw null; }
protected System.Collections.Generic.IDictionary<string, object> PropertyValues { get => throw null; }
public virtual void SetProperty(string key, string value) => throw null;
public virtual void SetProperty(string key, long value) => throw null;
public virtual void SetProperty(string key, bool value) => throw null;
public virtual void SetProperty(string key, System.DateTime value) => throw null;
public virtual void SetProperty(string key, double value) => throw null;
public virtual void SetProperty(string key, System.Guid value) => throw null;
}
}
}
}

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,174 @@
// This file contains auto-generated code.
// Generated from `Microsoft.IdentityModel.JsonWebTokens, Version=7.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35`.
namespace Microsoft
{
namespace IdentityModel
{
namespace JsonWebTokens
{
public static class JsonClaimValueTypes
{
public const string Json = default;
public const string JsonArray = default;
public const string JsonNull = default;
}
public class JsonWebToken : Microsoft.IdentityModel.Tokens.SecurityToken
{
public string Actor { get => throw null; }
public string Alg { get => throw null; }
public System.Collections.Generic.IEnumerable<string> Audiences { get => throw null; }
public string AuthenticationTag { get => throw null; }
public string Azp { get => throw null; }
public string Ciphertext { get => throw null; }
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> Claims { get => throw null; }
public JsonWebToken(string jwtEncodedString) => throw null;
public JsonWebToken(System.ReadOnlyMemory<char> encodedTokenMemory) => throw null;
public JsonWebToken(string header, string payload) => throw null;
public string Cty { get => throw null; }
public string Enc { get => throw null; }
public string EncodedHeader { get => throw null; }
public string EncodedPayload { get => throw null; }
public string EncodedSignature { get => throw null; }
public string EncodedToken { get => throw null; }
public string EncryptedKey { get => throw null; }
public System.Security.Claims.Claim GetClaim(string key) => throw null;
public T GetHeaderValue<T>(string key) => throw null;
public T GetPayloadValue<T>(string key) => throw null;
public override string Id { get => throw null; }
public string InitializationVector { get => throw null; }
public Microsoft.IdentityModel.JsonWebTokens.JsonWebToken InnerToken { get => throw null; }
public bool IsEncrypted { get => throw null; }
public bool IsSigned { get => throw null; }
public System.DateTime IssuedAt { get => throw null; }
public override string Issuer { get => throw null; }
public string Kid { get => throw null; }
public override Microsoft.IdentityModel.Tokens.SecurityKey SecurityKey { get => throw null; }
public override Microsoft.IdentityModel.Tokens.SecurityKey SigningKey { get => throw null; set { } }
public string Subject { get => throw null; }
public override string ToString() => throw null;
public bool TryGetClaim(string key, out System.Security.Claims.Claim value) => throw null;
public bool TryGetHeaderValue<T>(string key, out T value) => throw null;
public bool TryGetPayloadValue<T>(string key, out T value) => throw null;
public bool TryGetValue<T>(string key, out T value) => throw null;
public string Typ { get => throw null; }
public override string UnsafeToString() => throw null;
public override System.DateTime ValidFrom { get => throw null; }
public override System.DateTime ValidTo { get => throw null; }
public string X5t { get => throw null; }
public string Zip { get => throw null; }
}
public class JsonWebTokenHandler : Microsoft.IdentityModel.Tokens.TokenHandler
{
public const string Base64UrlEncodedUnsignedJWSHeader = default;
public virtual bool CanReadToken(string token) => throw null;
public virtual bool CanValidateToken { get => throw null; }
protected virtual System.Security.Claims.ClaimsIdentity CreateClaimsIdentity(Microsoft.IdentityModel.JsonWebTokens.JsonWebToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
protected virtual System.Security.Claims.ClaimsIdentity CreateClaimsIdentity(Microsoft.IdentityModel.JsonWebTokens.JsonWebToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, string issuer) => throw null;
public virtual string CreateToken(string payload) => throw null;
public virtual string CreateToken(string payload, System.Collections.Generic.IDictionary<string, object> additionalHeaderClaims) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, System.Collections.Generic.IDictionary<string, object> additionalHeaderClaims) => throw null;
public virtual string CreateToken(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, System.Collections.Generic.IDictionary<string, object> additionalHeaderClaims) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, System.Collections.Generic.IDictionary<string, object> additionalHeaderClaims) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, string compressionAlgorithm) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, string compressionAlgorithm) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, string compressionAlgorithm, System.Collections.Generic.IDictionary<string, object> additionalHeaderClaims, System.Collections.Generic.IDictionary<string, object> additionalInnerHeaderClaims) => throw null;
public virtual string CreateToken(string payload, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, string compressionAlgorithm, System.Collections.Generic.IDictionary<string, object> additionalHeaderClaims) => throw null;
public JsonWebTokenHandler() => throw null;
public string DecryptToken(Microsoft.IdentityModel.JsonWebTokens.JsonWebToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static System.Collections.Generic.IDictionary<string, string> DefaultInboundClaimTypeMap;
public static bool DefaultMapInboundClaims;
public string EncryptToken(string innerJwt, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials) => throw null;
public string EncryptToken(string innerJwt, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, System.Collections.Generic.IDictionary<string, object> additionalHeaderClaims) => throw null;
public string EncryptToken(string innerJwt, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, string algorithm) => throw null;
public string EncryptToken(string innerJwt, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, string algorithm, System.Collections.Generic.IDictionary<string, object> additionalHeaderClaims) => throw null;
public System.Collections.Generic.IDictionary<string, string> InboundClaimTypeMap { get => throw null; set { } }
public bool MapInboundClaims { get => throw null; set { } }
public virtual Microsoft.IdentityModel.JsonWebTokens.JsonWebToken ReadJsonWebToken(string token) => throw null;
public override Microsoft.IdentityModel.Tokens.SecurityToken ReadToken(string token) => throw null;
protected virtual Microsoft.IdentityModel.Tokens.SecurityKey ResolveTokenDecryptionKey(string token, Microsoft.IdentityModel.JsonWebTokens.JsonWebToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static string ShortClaimTypeProperty { get => throw null; set { } }
public System.Type TokenType { get => throw null; }
public virtual Microsoft.IdentityModel.Tokens.TokenValidationResult ValidateToken(string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public override System.Threading.Tasks.Task<Microsoft.IdentityModel.Tokens.TokenValidationResult> ValidateTokenAsync(string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public override System.Threading.Tasks.Task<Microsoft.IdentityModel.Tokens.TokenValidationResult> ValidateTokenAsync(Microsoft.IdentityModel.Tokens.SecurityToken token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
}
public static class JwtConstants
{
public const string DirectKeyUseAlg = default;
public const string HeaderType = default;
public const string HeaderTypeAlt = default;
public const string JsonCompactSerializationRegex = default;
public const string JweCompactSerializationRegex = default;
public const int JweSegmentCount = 5;
public const int JwsSegmentCount = 3;
public const int MaxJwtSegmentCount = 5;
public const string TokenType = default;
public const string TokenTypeAlt = default;
}
public struct JwtHeaderParameterNames
{
public const string Alg = default;
public const string Apu = default;
public const string Apv = default;
public const string Cty = default;
public const string Enc = default;
public const string Epk = default;
public const string IV = default;
public const string Jku = default;
public const string Jwk = default;
public const string Kid = default;
public const string Typ = default;
public const string X5c = default;
public const string X5t = default;
public const string X5u = default;
public const string Zip = default;
}
public struct JwtRegisteredClaimNames
{
public const string Acr = default;
public const string Actort = default;
public const string Amr = default;
public const string AtHash = default;
public const string Aud = default;
public const string AuthTime = default;
public const string Azp = default;
public const string Birthdate = default;
public const string CHash = default;
public const string Email = default;
public const string Exp = default;
public const string FamilyName = default;
public const string Gender = default;
public const string GivenName = default;
public const string Iat = default;
public const string Iss = default;
public const string Jti = default;
public const string Name = default;
public const string NameId = default;
public const string Nbf = default;
public const string Nonce = default;
public const string PhoneNumber = default;
public const string PhoneNumberVerified = default;
public const string Prn = default;
public const string Sid = default;
public const string Sub = default;
public const string Typ = default;
public const string UniqueName = default;
public const string Website = default;
}
public class JwtTokenUtilities
{
public static string CreateEncodedSignature(string input, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials) => throw null;
public static string CreateEncodedSignature(string input, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, bool cacheProvider) => throw null;
public JwtTokenUtilities() => throw null;
public static byte[] GenerateKeyBytes(int sizeInBits) => throw null;
public static System.Collections.Generic.IEnumerable<Microsoft.IdentityModel.Tokens.SecurityKey> GetAllDecryptionKeys(Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static System.Text.RegularExpressions.Regex RegexJwe;
public static System.Text.RegularExpressions.Regex RegexJws;
}
}
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.IdentityModel.Tokens/7.5.0/Microsoft.IdentityModel.Tokens.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,98 @@
// This file contains auto-generated code.
// Generated from `Microsoft.IdentityModel.Logging, Version=7.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35`.
namespace Microsoft
{
namespace IdentityModel
{
namespace Logging
{
public class IdentityModelEventSource : System.Diagnostics.Tracing.EventSource
{
public static bool HeaderWritten { get => throw null; set { } }
public static string HiddenPIIString { get => throw null; }
public static string HiddenSecurityArtifactString { get => throw null; }
public static bool LogCompleteSecurityArtifact { get => throw null; set { } }
public static Microsoft.IdentityModel.Logging.IdentityModelEventSource Logger { get => throw null; }
public System.Diagnostics.Tracing.EventLevel LogLevel { get => throw null; set { } }
public static bool ShowPII { get => throw null; set { } }
public void Write(System.Diagnostics.Tracing.EventLevel level, System.Exception innerException, string message) => throw null;
public void Write(System.Diagnostics.Tracing.EventLevel level, System.Exception innerException, string message, params object[] args) => throw null;
public void WriteAlways(string message) => throw null;
public void WriteAlways(string message, params object[] args) => throw null;
public void WriteCritical(string message) => throw null;
public void WriteCritical(string message, params object[] args) => throw null;
public void WriteError(string message) => throw null;
public void WriteError(string message, params object[] args) => throw null;
public void WriteInformation(string message) => throw null;
public void WriteInformation(string message, params object[] args) => throw null;
public void WriteVerbose(string message) => throw null;
public void WriteVerbose(string message, params object[] args) => throw null;
public void WriteWarning(string message) => throw null;
public void WriteWarning(string message, params object[] args) => throw null;
}
public static class IdentityModelTelemetryUtil
{
public static bool AddTelemetryData(string key, string value) => throw null;
public static string ClientSku { get => throw null; }
public static string ClientVer { get => throw null; }
public static bool RemoveTelemetryData(string key) => throw null;
}
public interface ISafeLogSecurityArtifact
{
string UnsafeToString();
}
public class LoggerContext
{
public System.Guid ActivityId { get => throw null; set { } }
public bool CaptureLogs { get => throw null; set { } }
public LoggerContext() => throw null;
public LoggerContext(System.Guid activityId) => throw null;
public virtual string DebugId { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> Logs { get => throw null; }
public System.Collections.Generic.IDictionary<string, object> PropertyBag { get => throw null; set { } }
}
public class LogHelper
{
public LogHelper() => throw null;
public static string FormatInvariant(string format, params object[] args) => throw null;
public static bool IsEnabled(Microsoft.IdentityModel.Abstractions.EventLogLevel level) => throw null;
public static T LogArgumentException<T>(string argumentName, string message) where T : System.ArgumentException => throw null;
public static T LogArgumentException<T>(string argumentName, string format, params object[] args) where T : System.ArgumentException => throw null;
public static T LogArgumentException<T>(string argumentName, System.Exception innerException, string message) where T : System.ArgumentException => throw null;
public static T LogArgumentException<T>(string argumentName, System.Exception innerException, string format, params object[] args) where T : System.ArgumentException => throw null;
public static T LogArgumentException<T>(System.Diagnostics.Tracing.EventLevel eventLevel, string argumentName, string message) where T : System.ArgumentException => throw null;
public static T LogArgumentException<T>(System.Diagnostics.Tracing.EventLevel eventLevel, string argumentName, string format, params object[] args) where T : System.ArgumentException => throw null;
public static T LogArgumentException<T>(System.Diagnostics.Tracing.EventLevel eventLevel, string argumentName, System.Exception innerException, string message) where T : System.ArgumentException => throw null;
public static T LogArgumentException<T>(System.Diagnostics.Tracing.EventLevel eventLevel, string argumentName, System.Exception innerException, string format, params object[] args) where T : System.ArgumentException => throw null;
public static System.ArgumentNullException LogArgumentNullException(string argument) => throw null;
public static T LogException<T>(string message) where T : System.Exception => throw null;
public static T LogException<T>(string format, params object[] args) where T : System.Exception => throw null;
public static T LogException<T>(System.Exception innerException, string message) where T : System.Exception => throw null;
public static T LogException<T>(System.Exception innerException, string format, params object[] args) where T : System.Exception => throw null;
public static T LogException<T>(System.Diagnostics.Tracing.EventLevel eventLevel, string message) where T : System.Exception => throw null;
public static T LogException<T>(System.Diagnostics.Tracing.EventLevel eventLevel, string format, params object[] args) where T : System.Exception => throw null;
public static T LogException<T>(System.Diagnostics.Tracing.EventLevel eventLevel, System.Exception innerException, string message) where T : System.Exception => throw null;
public static T LogException<T>(System.Diagnostics.Tracing.EventLevel eventLevel, System.Exception innerException, string format, params object[] args) where T : System.Exception => throw null;
public static System.Exception LogExceptionMessage(System.Exception exception) => throw null;
public static System.Exception LogExceptionMessage(System.Diagnostics.Tracing.EventLevel eventLevel, System.Exception exception) => throw null;
public static Microsoft.IdentityModel.Abstractions.IIdentityLogger Logger { get => throw null; set { } }
public static void LogInformation(string message, params object[] args) => throw null;
public static void LogVerbose(string message, params object[] args) => throw null;
public static void LogWarning(string message, params object[] args) => throw null;
public static object MarkAsNonPII(object arg) => throw null;
public static object MarkAsSecurityArtifact(object arg, System.Func<object, string> callback) => throw null;
public static object MarkAsSecurityArtifact(object arg, System.Func<object, string> callback, System.Func<object, string> callbackUnsafe) => throw null;
public static object MarkAsUnsafeSecurityArtifact(object arg, System.Func<object, string> callbackUnsafe) => throw null;
}
public class TextWriterEventListener : System.Diagnostics.Tracing.EventListener
{
public TextWriterEventListener() => throw null;
public TextWriterEventListener(string filePath) => throw null;
public TextWriterEventListener(System.IO.StreamWriter streamWriter) => throw null;
public static readonly string DefaultLogFileName;
public override void Dispose() => throw null;
protected override void OnEventWritten(System.Diagnostics.Tracing.EventWrittenEventArgs eventData) => throw null;
}
}
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.IdentityModel.Abstractions/7.5.0/Microsoft.IdentityModel.Abstractions.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,396 @@
// This file contains auto-generated code.
// Generated from `Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=7.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35`.
namespace Microsoft
{
namespace IdentityModel
{
namespace Protocols
{
namespace OpenIdConnect
{
public static class ActiveDirectoryOpenIdConnectEndpoints
{
public const string Authorize = default;
public const string Logout = default;
public const string Token = default;
}
namespace Configuration
{
public class OpenIdConnectConfigurationValidator : Microsoft.IdentityModel.Protocols.IConfigurationValidator<Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration>
{
public OpenIdConnectConfigurationValidator() => throw null;
public int MinimumNumberOfKeys { get => throw null; set { } }
public Microsoft.IdentityModel.Protocols.ConfigurationValidationResult Validate(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration openIdConnectConfiguration) => throw null;
}
}
public delegate void IdTokenValidator(System.IdentityModel.Tokens.Jwt.JwtSecurityToken idToken, Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidationContext context);
public class OpenIdConnectConfiguration : Microsoft.IdentityModel.Tokens.BaseConfiguration
{
public System.Collections.Generic.ICollection<string> AcrValuesSupported { get => throw null; }
public override string ActiveTokenEndpoint { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, object> AdditionalData { get => throw null; }
public string AuthorizationEndpoint { get => throw null; set { } }
public string CheckSessionIframe { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> ClaimsLocalesSupported { get => throw null; }
public bool ClaimsParameterSupported { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> ClaimsSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> ClaimTypesSupported { get => throw null; }
public static Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration Create(string json) => throw null;
public OpenIdConnectConfiguration() => throw null;
public OpenIdConnectConfiguration(string json) => throw null;
public System.Collections.Generic.ICollection<string> DisplayValuesSupported { get => throw null; }
public string EndSessionEndpoint { get => throw null; set { } }
public string FrontchannelLogoutSessionSupported { get => throw null; set { } }
public string FrontchannelLogoutSupported { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> GrantTypesSupported { get => throw null; }
public bool HttpLogoutSupported { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> IdTokenEncryptionAlgValuesSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> IdTokenEncryptionEncValuesSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> IdTokenSigningAlgValuesSupported { get => throw null; }
public string IntrospectionEndpoint { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> IntrospectionEndpointAuthMethodsSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> IntrospectionEndpointAuthSigningAlgValuesSupported { get => throw null; }
public override string Issuer { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.JsonWebKeySet JsonWebKeySet { get => throw null; set { } }
public string JwksUri { get => throw null; set { } }
public bool LogoutSessionSupported { get => throw null; set { } }
public string OpPolicyUri { get => throw null; set { } }
public string OpTosUri { get => throw null; set { } }
public string RegistrationEndpoint { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> RequestObjectEncryptionAlgValuesSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> RequestObjectEncryptionEncValuesSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> RequestObjectSigningAlgValuesSupported { get => throw null; }
public bool RequestParameterSupported { get => throw null; set { } }
public bool RequestUriParameterSupported { get => throw null; set { } }
public bool RequireRequestUriRegistration { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> ResponseModesSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> ResponseTypesSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> ScopesSupported { get => throw null; }
public string ServiceDocumentation { get => throw null; set { } }
public bool ShouldSerializeAcrValuesSupported() => throw null;
public bool ShouldSerializeClaimsLocalesSupported() => throw null;
public bool ShouldSerializeClaimsSupported() => throw null;
public bool ShouldSerializeClaimTypesSupported() => throw null;
public bool ShouldSerializeDisplayValuesSupported() => throw null;
public bool ShouldSerializeGrantTypesSupported() => throw null;
public bool ShouldSerializeIdTokenEncryptionAlgValuesSupported() => throw null;
public bool ShouldSerializeIdTokenEncryptionEncValuesSupported() => throw null;
public bool ShouldSerializeIdTokenSigningAlgValuesSupported() => throw null;
public bool ShouldSerializeIntrospectionEndpointAuthMethodsSupported() => throw null;
public bool ShouldSerializeIntrospectionEndpointAuthSigningAlgValuesSupported() => throw null;
public bool ShouldSerializeRequestObjectEncryptionAlgValuesSupported() => throw null;
public bool ShouldSerializeRequestObjectEncryptionEncValuesSupported() => throw null;
public bool ShouldSerializeRequestObjectSigningAlgValuesSupported() => throw null;
public bool ShouldSerializeResponseModesSupported() => throw null;
public bool ShouldSerializeResponseTypesSupported() => throw null;
public bool ShouldSerializeScopesSupported() => throw null;
public bool ShouldSerializeSigningKeys() => throw null;
public bool ShouldSerializeSubjectTypesSupported() => throw null;
public bool ShouldSerializeTokenEndpointAuthMethodsSupported() => throw null;
public bool ShouldSerializeTokenEndpointAuthSigningAlgValuesSupported() => throw null;
public bool ShouldSerializeUILocalesSupported() => throw null;
public bool ShouldSerializeUserInfoEndpointEncryptionAlgValuesSupported() => throw null;
public bool ShouldSerializeUserInfoEndpointEncryptionEncValuesSupported() => throw null;
public bool ShouldSerializeUserInfoEndpointSigningAlgValuesSupported() => throw null;
public override System.Collections.Generic.ICollection<Microsoft.IdentityModel.Tokens.SecurityKey> SigningKeys { get => throw null; }
public System.Collections.Generic.ICollection<string> SubjectTypesSupported { get => throw null; }
public override string TokenEndpoint { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> TokenEndpointAuthMethodsSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> TokenEndpointAuthSigningAlgValuesSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> UILocalesSupported { get => throw null; }
public string UserInfoEndpoint { get => throw null; set { } }
public System.Collections.Generic.ICollection<string> UserInfoEndpointEncryptionAlgValuesSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> UserInfoEndpointEncryptionEncValuesSupported { get => throw null; }
public System.Collections.Generic.ICollection<string> UserInfoEndpointSigningAlgValuesSupported { get => throw null; }
public static string Write(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration configuration) => throw null;
}
public class OpenIdConnectConfigurationRetriever : Microsoft.IdentityModel.Protocols.IConfigurationRetriever<Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration>
{
public OpenIdConnectConfigurationRetriever() => throw null;
public static System.Threading.Tasks.Task<Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration> GetAsync(string address, System.Threading.CancellationToken cancel) => throw null;
public static System.Threading.Tasks.Task<Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration> GetAsync(string address, System.Net.Http.HttpClient httpClient, System.Threading.CancellationToken cancel) => throw null;
public static System.Threading.Tasks.Task<Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration> GetAsync(string address, Microsoft.IdentityModel.Protocols.IDocumentRetriever retriever, System.Threading.CancellationToken cancel) => throw null;
System.Threading.Tasks.Task<Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration> Microsoft.IdentityModel.Protocols.IConfigurationRetriever<Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration>.GetConfigurationAsync(string address, Microsoft.IdentityModel.Protocols.IDocumentRetriever retriever, System.Threading.CancellationToken cancel) => throw null;
}
public static class OpenIdConnectGrantTypes
{
public const string AuthorizationCode = default;
public const string ClientCredentials = default;
public const string Password = default;
public const string RefreshToken = default;
}
public class OpenIdConnectMessage : Microsoft.IdentityModel.Protocols.AuthenticationProtocolMessage
{
public string AccessToken { get => throw null; set { } }
public string AcrValues { get => throw null; set { } }
public string AuthorizationEndpoint { get => throw null; set { } }
public string ClaimsLocales { get => throw null; set { } }
public string ClientAssertion { get => throw null; set { } }
public string ClientAssertionType { get => throw null; set { } }
public string ClientId { get => throw null; set { } }
public string ClientSecret { get => throw null; set { } }
public virtual Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectMessage Clone() => throw null;
public string Code { get => throw null; set { } }
public virtual string CreateAuthenticationRequestUrl() => throw null;
public virtual string CreateLogoutRequestUrl() => throw null;
public OpenIdConnectMessage() => throw null;
public OpenIdConnectMessage(string json) => throw null;
protected OpenIdConnectMessage(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectMessage other) => throw null;
public OpenIdConnectMessage(System.Collections.Specialized.NameValueCollection nameValueCollection) => throw null;
public OpenIdConnectMessage(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string[]>> parameters) => throw null;
public string Display { get => throw null; set { } }
public string DomainHint { get => throw null; set { } }
public bool EnableTelemetryParameters { get => throw null; set { } }
public static bool EnableTelemetryParametersByDefault { get => throw null; set { } }
public string Error { get => throw null; set { } }
public string ErrorDescription { get => throw null; set { } }
public string ErrorUri { get => throw null; set { } }
public string ExpiresIn { get => throw null; set { } }
public string GrantType { get => throw null; set { } }
public string IdentityProvider { get => throw null; set { } }
public string IdToken { get => throw null; set { } }
public string IdTokenHint { get => throw null; set { } }
public string Iss { get => throw null; set { } }
public string LoginHint { get => throw null; set { } }
public string MaxAge { get => throw null; set { } }
public string Nonce { get => throw null; set { } }
public string Password { get => throw null; set { } }
public string PostLogoutRedirectUri { get => throw null; set { } }
public string Prompt { get => throw null; set { } }
public string RedirectUri { get => throw null; set { } }
public string RefreshToken { get => throw null; set { } }
public Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectRequestType RequestType { get => throw null; set { } }
public string RequestUri { get => throw null; set { } }
public string Resource { get => throw null; set { } }
public string ResponseMode { get => throw null; set { } }
public string ResponseType { get => throw null; set { } }
public string Scope { get => throw null; set { } }
public string SessionState { get => throw null; set { } }
public string Sid { get => throw null; set { } }
public string SkuTelemetryValue { get => throw null; set { } }
public string State { get => throw null; set { } }
public string TargetLinkUri { get => throw null; set { } }
public string TokenEndpoint { get => throw null; set { } }
public string TokenType { get => throw null; set { } }
public string UiLocales { get => throw null; set { } }
public string UserId { get => throw null; set { } }
public string Username { get => throw null; set { } }
}
public static class OpenIdConnectParameterNames
{
public const string AccessToken = default;
public const string AcrValues = default;
public const string ClaimsLocales = default;
public const string ClientAssertion = default;
public const string ClientAssertionType = default;
public const string ClientId = default;
public const string ClientSecret = default;
public const string Code = default;
public const string Display = default;
public const string DomainHint = default;
public const string Error = default;
public const string ErrorDescription = default;
public const string ErrorUri = default;
public const string ExpiresIn = default;
public const string GrantType = default;
public const string IdentityProvider = default;
public const string IdToken = default;
public const string IdTokenHint = default;
public const string Iss = default;
public const string LoginHint = default;
public const string MaxAge = default;
public const string Nonce = default;
public const string Password = default;
public const string PostLogoutRedirectUri = default;
public const string Prompt = default;
public const string RedirectUri = default;
public const string RefreshToken = default;
public const string RequestUri = default;
public const string Resource = default;
public const string ResponseMode = default;
public const string ResponseType = default;
public const string Scope = default;
public const string SessionState = default;
public const string Sid = default;
public const string SkuTelemetry = default;
public const string State = default;
public const string TargetLinkUri = default;
public const string TokenType = default;
public const string UiLocales = default;
public const string UserId = default;
public const string Username = default;
public const string VersionTelemetry = default;
}
public static class OpenIdConnectPrompt
{
public const string Consent = default;
public const string Login = default;
public const string None = default;
public const string SelectAccount = default;
}
public class OpenIdConnectProtocolException : System.Exception
{
public OpenIdConnectProtocolException() => throw null;
public OpenIdConnectProtocolException(string message) => throw null;
public OpenIdConnectProtocolException(string message, System.Exception innerException) => throw null;
protected OpenIdConnectProtocolException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class OpenIdConnectProtocolInvalidAtHashException : Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolException
{
public OpenIdConnectProtocolInvalidAtHashException() => throw null;
public OpenIdConnectProtocolInvalidAtHashException(string message) => throw null;
public OpenIdConnectProtocolInvalidAtHashException(string message, System.Exception innerException) => throw null;
protected OpenIdConnectProtocolInvalidAtHashException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class OpenIdConnectProtocolInvalidCHashException : Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolException
{
public OpenIdConnectProtocolInvalidCHashException() => throw null;
public OpenIdConnectProtocolInvalidCHashException(string message) => throw null;
public OpenIdConnectProtocolInvalidCHashException(string message, System.Exception innerException) => throw null;
protected OpenIdConnectProtocolInvalidCHashException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class OpenIdConnectProtocolInvalidNonceException : Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolException
{
public OpenIdConnectProtocolInvalidNonceException() => throw null;
public OpenIdConnectProtocolInvalidNonceException(string message) => throw null;
public OpenIdConnectProtocolInvalidNonceException(string message, System.Exception innerException) => throw null;
protected OpenIdConnectProtocolInvalidNonceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class OpenIdConnectProtocolInvalidStateException : Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolException
{
public OpenIdConnectProtocolInvalidStateException() => throw null;
public OpenIdConnectProtocolInvalidStateException(string message) => throw null;
public OpenIdConnectProtocolInvalidStateException(string message, System.Exception innerException) => throw null;
protected OpenIdConnectProtocolInvalidStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class OpenIdConnectProtocolValidationContext
{
public string ClientId { get => throw null; set { } }
public OpenIdConnectProtocolValidationContext() => throw null;
public string Nonce { get => throw null; set { } }
public Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectMessage ProtocolMessage { get => throw null; set { } }
public string State { get => throw null; set { } }
public string UserInfoEndpointResponse { get => throw null; set { } }
public System.IdentityModel.Tokens.Jwt.JwtSecurityToken ValidatedIdToken { get => throw null; set { } }
}
public class OpenIdConnectProtocolValidator
{
public Microsoft.IdentityModel.Tokens.CryptoProviderFactory CryptoProviderFactory { get => throw null; set { } }
public OpenIdConnectProtocolValidator() => throw null;
public static readonly System.TimeSpan DefaultNonceLifetime;
public virtual string GenerateNonce() => throw null;
public virtual System.Security.Cryptography.HashAlgorithm GetHashAlgorithm(string algorithm) => throw null;
public System.Collections.Generic.IDictionary<string, string> HashAlgorithmMap { get => throw null; }
public Microsoft.IdentityModel.Protocols.OpenIdConnect.IdTokenValidator IdTokenValidator { get => throw null; set { } }
public System.TimeSpan NonceLifetime { get => throw null; set { } }
public bool RequireAcr { get => throw null; set { } }
public bool RequireAmr { get => throw null; set { } }
public bool RequireAuthTime { get => throw null; set { } }
public bool RequireAzp { get => throw null; set { } }
public bool RequireNonce { get => throw null; set { } }
public bool RequireState { get => throw null; set { } }
public bool RequireStateValidation { get => throw null; set { } }
public bool RequireSub { get => throw null; set { } }
public static bool RequireSubByDefault { get => throw null; set { } }
public bool RequireTimeStampInNonce { get => throw null; set { } }
protected virtual void ValidateAtHash(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidationContext validationContext) => throw null;
public virtual void ValidateAuthenticationResponse(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidationContext validationContext) => throw null;
protected virtual void ValidateCHash(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidationContext validationContext) => throw null;
protected virtual void ValidateIdToken(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidationContext validationContext) => throw null;
protected virtual void ValidateNonce(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidationContext validationContext) => throw null;
protected virtual void ValidateState(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidationContext validationContext) => throw null;
public virtual void ValidateTokenResponse(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidationContext validationContext) => throw null;
public virtual void ValidateUserInfoResponse(Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidationContext validationContext) => throw null;
}
public enum OpenIdConnectRequestType
{
Authentication = 0,
Logout = 1,
Token = 2,
}
public static class OpenIdConnectResponseMode
{
public const string FormPost = default;
public const string Fragment = default;
public const string Query = default;
}
public static class OpenIdConnectResponseType
{
public const string Code = default;
public const string CodeIdToken = default;
public const string CodeIdTokenToken = default;
public const string CodeToken = default;
public const string IdToken = default;
public const string IdTokenToken = default;
public const string None = default;
public const string Token = default;
}
public static class OpenIdConnectScope
{
public const string Address = default;
public const string Email = default;
public const string OfflineAccess = default;
public const string OpenId = default;
public const string OpenIdProfile = default;
public const string Phone = default;
public const string UserImpersonation = default;
}
public static class OpenIdConnectSessionProperties
{
public const string CheckSessionIFrame = default;
public const string RedirectUri = default;
public const string SessionState = default;
}
public static class OpenIdProviderMetadataNames
{
public const string AcrValuesSupported = default;
public const string AuthorizationEndpoint = default;
public const string CheckSessionIframe = default;
public const string ClaimsLocalesSupported = default;
public const string ClaimsParameterSupported = default;
public const string ClaimsSupported = default;
public const string ClaimTypesSupported = default;
public const string Discovery = default;
public const string DisplayValuesSupported = default;
public const string EndSessionEndpoint = default;
public const string FrontchannelLogoutSessionSupported = default;
public const string FrontchannelLogoutSupported = default;
public const string GrantTypesSupported = default;
public const string HttpLogoutSupported = default;
public const string IdTokenEncryptionAlgValuesSupported = default;
public const string IdTokenEncryptionEncValuesSupported = default;
public const string IdTokenSigningAlgValuesSupported = default;
public const string IntrospectionEndpoint = default;
public const string IntrospectionEndpointAuthMethodsSupported = default;
public const string IntrospectionEndpointAuthSigningAlgValuesSupported = default;
public const string Issuer = default;
public const string JwksUri = default;
public const string LogoutSessionSupported = default;
public const string MicrosoftMultiRefreshToken = default;
public const string OpPolicyUri = default;
public const string OpTosUri = default;
public const string RegistrationEndpoint = default;
public const string RequestObjectEncryptionAlgValuesSupported = default;
public const string RequestObjectEncryptionEncValuesSupported = default;
public const string RequestObjectSigningAlgValuesSupported = default;
public const string RequestParameterSupported = default;
public const string RequestUriParameterSupported = default;
public const string RequireRequestUriRegistration = default;
public const string ResponseModesSupported = default;
public const string ResponseTypesSupported = default;
public const string ScopesSupported = default;
public const string ServiceDocumentation = default;
public const string SubjectTypesSupported = default;
public const string TokenEndpoint = default;
public const string TokenEndpointAuthMethodsSupported = default;
public const string TokenEndpointAuthSigningAlgValuesSupported = default;
public const string UILocalesSupported = default;
public const string UserInfoEncryptionAlgValuesSupported = default;
public const string UserInfoEncryptionEncValuesSupported = default;
public const string UserInfoEndpoint = default;
public const string UserInfoSigningAlgValuesSupported = default;
}
}
}
}
}

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.IdentityModel.Protocols/7.5.0/Microsoft.IdentityModel.Protocols.csproj" />
<ProjectReference Include="../../System.IdentityModel.Tokens.Jwt/7.5.0/System.IdentityModel.Tokens.Jwt.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,120 @@
// This file contains auto-generated code.
// Generated from `Microsoft.IdentityModel.Protocols, Version=7.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35`.
namespace Microsoft
{
namespace IdentityModel
{
namespace Protocols
{
public abstract class AuthenticationProtocolMessage
{
public virtual string BuildFormPost() => throw null;
public virtual string BuildRedirectUrl() => throw null;
protected AuthenticationProtocolMessage() => throw null;
public virtual string GetParameter(string parameter) => throw null;
public string IssuerAddress { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> Parameters { get => throw null; }
public string PostTitle { get => throw null; set { } }
public virtual void RemoveParameter(string parameter) => throw null;
public string Script { get => throw null; set { } }
public string ScriptButtonText { get => throw null; set { } }
public string ScriptDisabledText { get => throw null; set { } }
public void SetParameter(string parameter, string value) => throw null;
public virtual void SetParameters(System.Collections.Specialized.NameValueCollection nameValueCollection) => throw null;
}
namespace Configuration
{
public class InvalidConfigurationException : System.Exception
{
public InvalidConfigurationException() => throw null;
public InvalidConfigurationException(string message) => throw null;
public InvalidConfigurationException(string message, System.Exception innerException) => throw null;
protected InvalidConfigurationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class LastKnownGoodConfigurationCacheOptions : Microsoft.IdentityModel.Tokens.Configuration.LKGConfigurationCacheOptions
{
public LastKnownGoodConfigurationCacheOptions() => throw null;
public static readonly int DefaultLastKnownGoodConfigurationSizeLimit;
}
}
public class ConfigurationManager<T> : Microsoft.IdentityModel.Tokens.BaseConfigurationManager, Microsoft.IdentityModel.Protocols.IConfigurationManager<T> where T : class
{
public ConfigurationManager(string metadataAddress, Microsoft.IdentityModel.Protocols.IConfigurationRetriever<T> configRetriever) => throw null;
public ConfigurationManager(string metadataAddress, Microsoft.IdentityModel.Protocols.IConfigurationRetriever<T> configRetriever, System.Net.Http.HttpClient httpClient) => throw null;
public ConfigurationManager(string metadataAddress, Microsoft.IdentityModel.Protocols.IConfigurationRetriever<T> configRetriever, Microsoft.IdentityModel.Protocols.IDocumentRetriever docRetriever) => throw null;
public ConfigurationManager(string metadataAddress, Microsoft.IdentityModel.Protocols.IConfigurationRetriever<T> configRetriever, Microsoft.IdentityModel.Protocols.IDocumentRetriever docRetriever, Microsoft.IdentityModel.Protocols.Configuration.LastKnownGoodConfigurationCacheOptions lkgCacheOptions) => throw null;
public ConfigurationManager(string metadataAddress, Microsoft.IdentityModel.Protocols.IConfigurationRetriever<T> configRetriever, Microsoft.IdentityModel.Protocols.IDocumentRetriever docRetriever, Microsoft.IdentityModel.Protocols.IConfigurationValidator<T> configValidator) => throw null;
public ConfigurationManager(string metadataAddress, Microsoft.IdentityModel.Protocols.IConfigurationRetriever<T> configRetriever, Microsoft.IdentityModel.Protocols.IDocumentRetriever docRetriever, Microsoft.IdentityModel.Protocols.IConfigurationValidator<T> configValidator, Microsoft.IdentityModel.Protocols.Configuration.LastKnownGoodConfigurationCacheOptions lkgCacheOptions) => throw null;
public static readonly System.TimeSpan DefaultAutomaticRefreshInterval;
public static readonly System.TimeSpan DefaultRefreshInterval;
public override System.Threading.Tasks.Task<Microsoft.IdentityModel.Tokens.BaseConfiguration> GetBaseConfigurationAsync(System.Threading.CancellationToken cancel) => throw null;
public System.Threading.Tasks.Task<T> GetConfigurationAsync() => throw null;
public System.Threading.Tasks.Task<T> GetConfigurationAsync(System.Threading.CancellationToken cancel) => throw null;
public static readonly System.TimeSpan MinimumAutomaticRefreshInterval;
public static readonly System.TimeSpan MinimumRefreshInterval;
public override void RequestRefresh() => throw null;
}
public class ConfigurationValidationResult
{
public ConfigurationValidationResult() => throw null;
public string ErrorMessage { get => throw null; set { } }
public bool Succeeded { get => throw null; set { } }
}
public class FileDocumentRetriever : Microsoft.IdentityModel.Protocols.IDocumentRetriever
{
public FileDocumentRetriever() => throw null;
public System.Threading.Tasks.Task<string> GetDocumentAsync(string address, System.Threading.CancellationToken cancel) => throw null;
}
public class HttpDocumentRetriever : Microsoft.IdentityModel.Protocols.IDocumentRetriever
{
public HttpDocumentRetriever() => throw null;
public HttpDocumentRetriever(System.Net.Http.HttpClient httpClient) => throw null;
public static bool DefaultSendAdditionalHeaderData { get => throw null; set { } }
public System.Threading.Tasks.Task<string> GetDocumentAsync(string address, System.Threading.CancellationToken cancel) => throw null;
public bool RequireHttps { get => throw null; set { } }
public const string ResponseContent = default;
public bool SendAdditionalHeaderData { get => throw null; set { } }
public const string StatusCode = default;
}
public class HttpRequestData
{
public void AppendHeaders(System.Net.Http.Headers.HttpHeaders headers) => throw null;
public byte[] Body { get => throw null; set { } }
public System.Security.Cryptography.X509Certificates.X509Certificate2Collection ClientCertificates { get => throw null; }
public HttpRequestData() => throw null;
public System.Collections.Generic.IDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get => throw null; set { } }
public string Method { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, object> PropertyBag { get => throw null; set { } }
public System.Uri Uri { get => throw null; set { } }
}
public interface IConfigurationManager<T> where T : class
{
System.Threading.Tasks.Task<T> GetConfigurationAsync(System.Threading.CancellationToken cancel);
void RequestRefresh();
}
public interface IConfigurationRetriever<T>
{
System.Threading.Tasks.Task<T> GetConfigurationAsync(string address, Microsoft.IdentityModel.Protocols.IDocumentRetriever retriever, System.Threading.CancellationToken cancel);
}
public interface IConfigurationValidator<T>
{
Microsoft.IdentityModel.Protocols.ConfigurationValidationResult Validate(T configuration);
}
public interface IDocumentRetriever
{
System.Threading.Tasks.Task<string> GetDocumentAsync(string address, System.Threading.CancellationToken cancel);
}
public class StaticConfigurationManager<T> : Microsoft.IdentityModel.Tokens.BaseConfigurationManager, Microsoft.IdentityModel.Protocols.IConfigurationManager<T> where T : class
{
public StaticConfigurationManager(T configuration) => throw null;
public override System.Threading.Tasks.Task<Microsoft.IdentityModel.Tokens.BaseConfiguration> GetBaseConfigurationAsync(System.Threading.CancellationToken cancel) => throw null;
public System.Threading.Tasks.Task<T> GetConfigurationAsync(System.Threading.CancellationToken cancel) => throw null;
public override void RequestRefresh() => throw null;
}
public class X509CertificateValidationMode
{
public X509CertificateValidationMode() => throw null;
}
}
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.IdentityModel.Tokens/7.5.0/Microsoft.IdentityModel.Tokens.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,959 @@
// This file contains auto-generated code.
// Generated from `Microsoft.IdentityModel.Tokens, Version=7.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35`.
namespace Microsoft
{
namespace IdentityModel
{
namespace Tokens
{
public delegate bool AlgorithmValidator(string algorithm, Microsoft.IdentityModel.Tokens.SecurityKey securityKey, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public abstract class AsymmetricSecurityKey : Microsoft.IdentityModel.Tokens.SecurityKey
{
public AsymmetricSecurityKey() => throw null;
public abstract bool HasPrivateKey { get; }
public abstract Microsoft.IdentityModel.Tokens.PrivateKeyStatus PrivateKeyStatus { get; }
}
public class AsymmetricSignatureProvider : Microsoft.IdentityModel.Tokens.SignatureProvider
{
public AsymmetricSignatureProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) : base(default(Microsoft.IdentityModel.Tokens.SecurityKey), default(string)) => throw null;
public AsymmetricSignatureProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, bool willCreateSignatures) : base(default(Microsoft.IdentityModel.Tokens.SecurityKey), default(string)) => throw null;
public static readonly System.Collections.Generic.Dictionary<string, int> DefaultMinimumAsymmetricKeySizeInBitsForSigningMap;
public static readonly System.Collections.Generic.Dictionary<string, int> DefaultMinimumAsymmetricKeySizeInBitsForVerifyingMap;
protected override void Dispose(bool disposing) => throw null;
protected virtual System.Security.Cryptography.HashAlgorithmName GetHashAlgorithmName(string algorithm) => throw null;
public System.Collections.Generic.IReadOnlyDictionary<string, int> MinimumAsymmetricKeySizeInBitsForSigningMap { get => throw null; }
public System.Collections.Generic.IReadOnlyDictionary<string, int> MinimumAsymmetricKeySizeInBitsForVerifyingMap { get => throw null; }
public override bool Sign(System.ReadOnlySpan<byte> input, System.Span<byte> signature, out int bytesWritten) => throw null;
public override byte[] Sign(byte[] input) => throw null;
public override byte[] Sign(byte[] input, int offset, int count) => throw null;
public virtual void ValidateAsymmetricSecurityKeySize(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, bool willCreateSignatures) => throw null;
public override bool Verify(byte[] input, byte[] signature) => throw null;
public override bool Verify(byte[] input, int inputOffset, int inputLength, byte[] signature, int signatureOffset, int signatureLength) => throw null;
}
public delegate bool AudienceValidator(System.Collections.Generic.IEnumerable<string> audiences, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public class AuthenticatedEncryptionProvider : System.IDisposable
{
public string Algorithm { get => throw null; }
public string Context { get => throw null; set { } }
public AuthenticatedEncryptionProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public virtual byte[] Decrypt(byte[] ciphertext, byte[] authenticatedData, byte[] iv, byte[] authenticationTag) => throw null;
public void Dispose() => throw null;
protected virtual void Dispose(bool disposing) => throw null;
public virtual Microsoft.IdentityModel.Tokens.AuthenticatedEncryptionResult Encrypt(byte[] plaintext, byte[] authenticatedData) => throw null;
public virtual Microsoft.IdentityModel.Tokens.AuthenticatedEncryptionResult Encrypt(byte[] plaintext, byte[] authenticatedData, byte[] iv) => throw null;
protected virtual byte[] GetKeyBytes(Microsoft.IdentityModel.Tokens.SecurityKey key) => throw null;
protected virtual bool IsSupportedAlgorithm(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public Microsoft.IdentityModel.Tokens.SecurityKey Key { get => throw null; }
protected virtual void ValidateKeySize(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
}
public class AuthenticatedEncryptionResult
{
public byte[] AuthenticationTag { get => throw null; }
public byte[] Ciphertext { get => throw null; }
public AuthenticatedEncryptionResult(Microsoft.IdentityModel.Tokens.SecurityKey key, byte[] ciphertext, byte[] iv, byte[] authenticationTag) => throw null;
public byte[] IV { get => throw null; }
public Microsoft.IdentityModel.Tokens.SecurityKey Key { get => throw null; }
}
public static class Base64UrlEncoder
{
public static string Decode(string arg) => throw null;
public static byte[] DecodeBytes(string str) => throw null;
public static string Encode(string arg) => throw null;
public static string Encode(byte[] inArray) => throw null;
public static string Encode(byte[] inArray, int offset, int length) => throw null;
public static int Encode(System.ReadOnlySpan<byte> inArray, System.Span<char> output) => throw null;
}
public abstract class BaseConfiguration
{
public virtual string ActiveTokenEndpoint { get => throw null; set { } }
protected BaseConfiguration() => throw null;
public virtual string Issuer { get => throw null; set { } }
public virtual System.Collections.Generic.ICollection<Microsoft.IdentityModel.Tokens.SecurityKey> SigningKeys { get => throw null; }
public virtual System.Collections.Generic.ICollection<Microsoft.IdentityModel.Tokens.SecurityKey> TokenDecryptionKeys { get => throw null; }
public virtual string TokenEndpoint { get => throw null; set { } }
}
public abstract class BaseConfigurationManager
{
public System.TimeSpan AutomaticRefreshInterval { get => throw null; set { } }
public BaseConfigurationManager() => throw null;
public BaseConfigurationManager(Microsoft.IdentityModel.Tokens.Configuration.LKGConfigurationCacheOptions options) => throw null;
public static readonly System.TimeSpan DefaultAutomaticRefreshInterval;
public static readonly System.TimeSpan DefaultLastKnownGoodConfigurationLifetime;
public static readonly System.TimeSpan DefaultRefreshInterval;
public virtual System.Threading.Tasks.Task<Microsoft.IdentityModel.Tokens.BaseConfiguration> GetBaseConfigurationAsync(System.Threading.CancellationToken cancel) => throw null;
public bool IsLastKnownGoodValid { get => throw null; }
public Microsoft.IdentityModel.Tokens.BaseConfiguration LastKnownGoodConfiguration { get => throw null; set { } }
public System.TimeSpan LastKnownGoodLifetime { get => throw null; set { } }
public string MetadataAddress { get => throw null; set { } }
public static readonly System.TimeSpan MinimumAutomaticRefreshInterval;
public static readonly System.TimeSpan MinimumRefreshInterval;
public System.TimeSpan RefreshInterval { get => throw null; set { } }
public abstract void RequestRefresh();
public bool UseLastKnownGoodConfiguration { get => throw null; set { } }
}
public class CallContext : Microsoft.IdentityModel.Logging.LoggerContext
{
public CallContext() => throw null;
public CallContext(System.Guid activityId) => throw null;
}
public static class CollectionUtilities
{
public static bool IsNullOrEmpty<T>(this System.Collections.Generic.IEnumerable<T> enumerable) => throw null;
}
public class CompressionAlgorithms
{
public CompressionAlgorithms() => throw null;
public const string Deflate = default;
}
public class CompressionProviderFactory
{
public Microsoft.IdentityModel.Tokens.ICompressionProvider CreateCompressionProvider(string algorithm) => throw null;
public Microsoft.IdentityModel.Tokens.ICompressionProvider CreateCompressionProvider(string algorithm, int maximumDeflateSize) => throw null;
public CompressionProviderFactory() => throw null;
public CompressionProviderFactory(Microsoft.IdentityModel.Tokens.CompressionProviderFactory other) => throw null;
public Microsoft.IdentityModel.Tokens.ICompressionProvider CustomCompressionProvider { get => throw null; set { } }
public static Microsoft.IdentityModel.Tokens.CompressionProviderFactory Default { get => throw null; set { } }
public virtual bool IsSupportedAlgorithm(string algorithm) => throw null;
}
namespace Configuration
{
public class LKGConfigurationCacheOptions
{
public System.Collections.Generic.IEqualityComparer<Microsoft.IdentityModel.Tokens.BaseConfiguration> BaseConfigurationComparer { get => throw null; set { } }
public LKGConfigurationCacheOptions() => throw null;
public static readonly int DefaultLKGConfigurationSizeLimit;
public int LastKnownGoodConfigurationSizeLimit { get => throw null; set { } }
public bool RemoveExpiredValues { get => throw null; set { } }
public System.Threading.Tasks.TaskCreationOptions TaskCreationOptions { get => throw null; set { } }
}
}
public abstract class CryptoProviderCache
{
protected CryptoProviderCache() => throw null;
protected abstract string GetCacheKey(Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider);
protected abstract string GetCacheKey(Microsoft.IdentityModel.Tokens.SecurityKey securityKey, string algorithm, string typeofProvider);
public abstract bool TryAdd(Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider);
public abstract bool TryGetSignatureProvider(Microsoft.IdentityModel.Tokens.SecurityKey securityKey, string algorithm, string typeofProvider, bool willCreateSignatures, out Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider);
public abstract bool TryRemove(Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider);
}
public class CryptoProviderCacheOptions
{
public CryptoProviderCacheOptions() => throw null;
public static readonly int DefaultSizeLimit;
public int SizeLimit { get => throw null; set { } }
}
public class CryptoProviderFactory
{
public bool CacheSignatureProviders { get => throw null; set { } }
public virtual Microsoft.IdentityModel.Tokens.AuthenticatedEncryptionProvider CreateAuthenticatedEncryptionProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public virtual Microsoft.IdentityModel.Tokens.SignatureProvider CreateForSigning(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public virtual Microsoft.IdentityModel.Tokens.SignatureProvider CreateForSigning(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, bool cacheProvider) => throw null;
public virtual Microsoft.IdentityModel.Tokens.SignatureProvider CreateForVerifying(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public virtual Microsoft.IdentityModel.Tokens.SignatureProvider CreateForVerifying(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, bool cacheProvider) => throw null;
public virtual System.Security.Cryptography.HashAlgorithm CreateHashAlgorithm(System.Security.Cryptography.HashAlgorithmName algorithm) => throw null;
public virtual System.Security.Cryptography.HashAlgorithm CreateHashAlgorithm(string algorithm) => throw null;
public virtual System.Security.Cryptography.KeyedHashAlgorithm CreateKeyedHashAlgorithm(byte[] keyBytes, string algorithm) => throw null;
public virtual Microsoft.IdentityModel.Tokens.KeyWrapProvider CreateKeyWrapProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public virtual Microsoft.IdentityModel.Tokens.KeyWrapProvider CreateKeyWrapProviderForUnwrap(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public Microsoft.IdentityModel.Tokens.CryptoProviderCache CryptoProviderCache { get => throw null; }
public CryptoProviderFactory() => throw null;
public CryptoProviderFactory(Microsoft.IdentityModel.Tokens.CryptoProviderCache cache) => throw null;
public CryptoProviderFactory(Microsoft.IdentityModel.Tokens.CryptoProviderFactory other) => throw null;
public Microsoft.IdentityModel.Tokens.ICryptoProvider CustomCryptoProvider { get => throw null; set { } }
public static Microsoft.IdentityModel.Tokens.CryptoProviderFactory Default { get => throw null; set { } }
public static bool DefaultCacheSignatureProviders { get => throw null; set { } }
public static int DefaultSignatureProviderObjectPoolCacheSize { get => throw null; set { } }
public virtual bool IsSupportedAlgorithm(string algorithm) => throw null;
public virtual bool IsSupportedAlgorithm(string algorithm, Microsoft.IdentityModel.Tokens.SecurityKey key) => throw null;
public virtual void ReleaseHashAlgorithm(System.Security.Cryptography.HashAlgorithm hashAlgorithm) => throw null;
public virtual void ReleaseKeyWrapProvider(Microsoft.IdentityModel.Tokens.KeyWrapProvider provider) => throw null;
public virtual void ReleaseRsaKeyWrapProvider(Microsoft.IdentityModel.Tokens.RsaKeyWrapProvider provider) => throw null;
public virtual void ReleaseSignatureProvider(Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider) => throw null;
public int SignatureProviderObjectPoolCacheSize { get => throw null; set { } }
}
public static class DateTimeUtil
{
public static System.DateTime Add(System.DateTime time, System.TimeSpan timespan) => throw null;
public static System.DateTime GetMaxValue(System.DateTimeKind kind) => throw null;
public static System.DateTime GetMinValue(System.DateTimeKind kind) => throw null;
public static System.DateTime? ToUniversalTime(System.DateTime? value) => throw null;
public static System.DateTime ToUniversalTime(System.DateTime value) => throw null;
}
public class DeflateCompressionProvider : Microsoft.IdentityModel.Tokens.ICompressionProvider
{
public string Algorithm { get => throw null; }
public byte[] Compress(byte[] value) => throw null;
public System.IO.Compression.CompressionLevel CompressionLevel { get => throw null; }
public DeflateCompressionProvider() => throw null;
public DeflateCompressionProvider(System.IO.Compression.CompressionLevel compressionLevel) => throw null;
public byte[] Decompress(byte[] value) => throw null;
public bool IsSupportedAlgorithm(string algorithm) => throw null;
public int MaximumDeflateSize { get => throw null; set { } }
}
public class EcdhKeyExchangeProvider
{
public EcdhKeyExchangeProvider(Microsoft.IdentityModel.Tokens.SecurityKey privateKey, Microsoft.IdentityModel.Tokens.SecurityKey publicKey, string alg, string enc) => throw null;
public Microsoft.IdentityModel.Tokens.SecurityKey GenerateKdf(string apu = default(string), string apv = default(string)) => throw null;
public int KeyDataLen { get => throw null; set { } }
}
public class ECDsaSecurityKey : Microsoft.IdentityModel.Tokens.AsymmetricSecurityKey
{
public override bool CanComputeJwkThumbprint() => throw null;
public override byte[] ComputeJwkThumbprint() => throw null;
public ECDsaSecurityKey(System.Security.Cryptography.ECDsa ecdsa) => throw null;
public System.Security.Cryptography.ECDsa ECDsa { get => throw null; }
public override bool HasPrivateKey { get => throw null; }
public override int KeySize { get => throw null; }
public override Microsoft.IdentityModel.Tokens.PrivateKeyStatus PrivateKeyStatus { get => throw null; }
}
public class EncryptingCredentials
{
public string Alg { get => throw null; }
public Microsoft.IdentityModel.Tokens.CryptoProviderFactory CryptoProviderFactory { get => throw null; set { } }
protected EncryptingCredentials(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, string alg, string enc) => throw null;
public EncryptingCredentials(Microsoft.IdentityModel.Tokens.SecurityKey key, string alg, string enc) => throw null;
public EncryptingCredentials(Microsoft.IdentityModel.Tokens.SymmetricSecurityKey key, string enc) => throw null;
public string Enc { get => throw null; }
public Microsoft.IdentityModel.Tokens.SecurityKey Key { get => throw null; }
public Microsoft.IdentityModel.Tokens.SecurityKey KeyExchangePublicKey { get => throw null; set { } }
public bool SetDefaultCtyClaim { get => throw null; set { } }
}
public static class EpochTime
{
public static System.DateTime DateTime(long secondsSinceUnixEpoch) => throw null;
public static long GetIntDate(System.DateTime datetime) => throw null;
public static readonly System.DateTime UnixEpoch;
}
public interface ICompressionProvider
{
string Algorithm { get; }
byte[] Compress(byte[] value);
byte[] Decompress(byte[] value);
bool IsSupportedAlgorithm(string algorithm);
}
public interface ICryptoProvider
{
object Create(string algorithm, params object[] args);
bool IsSupportedAlgorithm(string algorithm, params object[] args);
void Release(object cryptoInstance);
}
public class InMemoryCryptoProviderCache : Microsoft.IdentityModel.Tokens.CryptoProviderCache, System.IDisposable
{
public InMemoryCryptoProviderCache() => throw null;
public InMemoryCryptoProviderCache(Microsoft.IdentityModel.Tokens.CryptoProviderCacheOptions cryptoProviderCacheOptions) => throw null;
public void Dispose() => throw null;
protected virtual void Dispose(bool disposing) => throw null;
protected override string GetCacheKey(Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider) => throw null;
protected override string GetCacheKey(Microsoft.IdentityModel.Tokens.SecurityKey securityKey, string algorithm, string typeofProvider) => throw null;
public override bool TryAdd(Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider) => throw null;
public override bool TryGetSignatureProvider(Microsoft.IdentityModel.Tokens.SecurityKey securityKey, string algorithm, string typeofProvider, bool willCreateSignatures, out Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider) => throw null;
public override bool TryRemove(Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider) => throw null;
}
public interface ISecurityTokenValidator
{
bool CanReadToken(string securityToken);
bool CanValidateToken { get; }
int MaximumTokenSizeInBytes { get; set; }
System.Security.Claims.ClaimsPrincipal ValidateToken(string securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, out Microsoft.IdentityModel.Tokens.SecurityToken validatedToken);
}
public delegate System.Collections.Generic.IEnumerable<Microsoft.IdentityModel.Tokens.SecurityKey> IssuerSigningKeyResolver(string token, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, string kid, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public delegate System.Collections.Generic.IEnumerable<Microsoft.IdentityModel.Tokens.SecurityKey> IssuerSigningKeyResolverUsingConfiguration(string token, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, string kid, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, Microsoft.IdentityModel.Tokens.BaseConfiguration configuration);
public delegate bool IssuerSigningKeyValidator(Microsoft.IdentityModel.Tokens.SecurityKey securityKey, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public delegate bool IssuerSigningKeyValidatorUsingConfiguration(Microsoft.IdentityModel.Tokens.SecurityKey securityKey, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, Microsoft.IdentityModel.Tokens.BaseConfiguration configuration);
public delegate string IssuerValidator(string issuer, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public delegate string IssuerValidatorUsingConfiguration(string issuer, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, Microsoft.IdentityModel.Tokens.BaseConfiguration configuration);
public interface ITokenReplayCache
{
bool TryAdd(string securityToken, System.DateTime expiresOn);
bool TryFind(string securityToken);
}
public static class JsonWebAlgorithmsKeyTypes
{
public const string EllipticCurve = default;
public const string Octet = default;
public const string RSA = default;
}
public class JsonWebKey : Microsoft.IdentityModel.Tokens.SecurityKey
{
public System.Collections.Generic.IDictionary<string, object> AdditionalData { get => throw null; }
public string Alg { get => throw null; set { } }
public override bool CanComputeJwkThumbprint() => throw null;
public override byte[] ComputeJwkThumbprint() => throw null;
public static Microsoft.IdentityModel.Tokens.JsonWebKey Create(string json) => throw null;
public string Crv { get => throw null; set { } }
public JsonWebKey() => throw null;
public JsonWebKey(string json) => throw null;
public string D { get => throw null; set { } }
public string DP { get => throw null; set { } }
public string DQ { get => throw null; set { } }
public string E { get => throw null; set { } }
public bool HasPrivateKey { get => throw null; }
public string K { get => throw null; set { } }
public override string KeyId { get => throw null; set { } }
public System.Collections.Generic.IList<string> KeyOps { get => throw null; }
public override int KeySize { get => throw null; }
public string Kid { get => throw null; set { } }
public string Kty { get => throw null; set { } }
public string N { get => throw null; set { } }
public System.Collections.Generic.IList<string> Oth { get => throw null; }
public string P { get => throw null; set { } }
public string Q { get => throw null; set { } }
public string QI { get => throw null; set { } }
public override string ToString() => throw null;
public string Use { get => throw null; set { } }
public string X { get => throw null; set { } }
public System.Collections.Generic.IList<string> X5c { get => throw null; }
public string X5t { get => throw null; set { } }
public string X5tS256 { get => throw null; set { } }
public string X5u { get => throw null; set { } }
public string Y { get => throw null; set { } }
}
public class JsonWebKeyConverter
{
public static Microsoft.IdentityModel.Tokens.JsonWebKey ConvertFromECDsaSecurityKey(Microsoft.IdentityModel.Tokens.ECDsaSecurityKey key) => throw null;
public static Microsoft.IdentityModel.Tokens.JsonWebKey ConvertFromRSASecurityKey(Microsoft.IdentityModel.Tokens.RsaSecurityKey key) => throw null;
public static Microsoft.IdentityModel.Tokens.JsonWebKey ConvertFromSecurityKey(Microsoft.IdentityModel.Tokens.SecurityKey key) => throw null;
public static Microsoft.IdentityModel.Tokens.JsonWebKey ConvertFromSymmetricSecurityKey(Microsoft.IdentityModel.Tokens.SymmetricSecurityKey key) => throw null;
public static Microsoft.IdentityModel.Tokens.JsonWebKey ConvertFromX509SecurityKey(Microsoft.IdentityModel.Tokens.X509SecurityKey key) => throw null;
public static Microsoft.IdentityModel.Tokens.JsonWebKey ConvertFromX509SecurityKey(Microsoft.IdentityModel.Tokens.X509SecurityKey key, bool representAsRsaKey) => throw null;
public JsonWebKeyConverter() => throw null;
}
public static class JsonWebKeyECTypes
{
public const string P256 = default;
public const string P384 = default;
public const string P512 = default;
public const string P521 = default;
}
public static class JsonWebKeyParameterNames
{
public const string Alg = default;
public const string Crv = default;
public const string D = default;
public const string DP = default;
public const string DQ = default;
public const string E = default;
public const string K = default;
public const string KeyOps = default;
public const string Keys = default;
public const string Kid = default;
public const string Kty = default;
public const string N = default;
public const string Oth = default;
public const string P = default;
public const string Q = default;
public const string QI = default;
public const string Use = default;
public const string X = default;
public const string X5c = default;
public const string X5t = default;
public const string X5tS256 = default;
public const string X5u = default;
public const string Y = default;
}
public class JsonWebKeySet
{
public System.Collections.Generic.IDictionary<string, object> AdditionalData { get => throw null; }
public static Microsoft.IdentityModel.Tokens.JsonWebKeySet Create(string json) => throw null;
public JsonWebKeySet() => throw null;
public JsonWebKeySet(string json) => throw null;
public static bool DefaultSkipUnresolvedJsonWebKeys;
public System.Collections.Generic.IList<Microsoft.IdentityModel.Tokens.SecurityKey> GetSigningKeys() => throw null;
public System.Collections.Generic.IList<Microsoft.IdentityModel.Tokens.JsonWebKey> Keys { get => throw null; }
public bool SkipUnresolvedJsonWebKeys { get => throw null; set { } }
}
public static class JsonWebKeySetParameterNames
{
public const string Keys = default;
}
public static class JsonWebKeyUseNames
{
public const string Enc = default;
public const string Sig = default;
}
public abstract class KeyWrapProvider : System.IDisposable
{
public abstract string Algorithm { get; }
public abstract string Context { get; set; }
protected KeyWrapProvider() => throw null;
public void Dispose() => throw null;
protected abstract void Dispose(bool disposing);
public abstract Microsoft.IdentityModel.Tokens.SecurityKey Key { get; }
public abstract byte[] UnwrapKey(byte[] keyBytes);
public abstract byte[] WrapKey(byte[] keyBytes);
}
public delegate bool LifetimeValidator(System.DateTime? notBefore, System.DateTime? expires, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public enum PrivateKeyStatus
{
Exists = 0,
DoesNotExist = 1,
Unknown = 2,
}
public class RsaKeyWrapProvider : Microsoft.IdentityModel.Tokens.KeyWrapProvider
{
public override string Algorithm { get => throw null; }
public override string Context { get => throw null; set { } }
public RsaKeyWrapProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, bool willUnwrap) => throw null;
protected override void Dispose(bool disposing) => throw null;
protected virtual bool IsSupportedAlgorithm(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public override Microsoft.IdentityModel.Tokens.SecurityKey Key { get => throw null; }
public override byte[] UnwrapKey(byte[] keyBytes) => throw null;
public override byte[] WrapKey(byte[] keyBytes) => throw null;
}
public class RsaSecurityKey : Microsoft.IdentityModel.Tokens.AsymmetricSecurityKey
{
public override bool CanComputeJwkThumbprint() => throw null;
public override byte[] ComputeJwkThumbprint() => throw null;
public RsaSecurityKey(System.Security.Cryptography.RSAParameters rsaParameters) => throw null;
public RsaSecurityKey(System.Security.Cryptography.RSA rsa) => throw null;
public override bool HasPrivateKey { get => throw null; }
public override int KeySize { get => throw null; }
public System.Security.Cryptography.RSAParameters Parameters { get => throw null; }
public override Microsoft.IdentityModel.Tokens.PrivateKeyStatus PrivateKeyStatus { get => throw null; }
public System.Security.Cryptography.RSA Rsa { get => throw null; }
}
public static class SecurityAlgorithms
{
public const string Aes128CbcHmacSha256 = default;
public const string Aes128Encryption = default;
public const string Aes128Gcm = default;
public const string Aes128KeyWrap = default;
public const string Aes128KW = default;
public const string Aes192CbcHmacSha384 = default;
public const string Aes192Encryption = default;
public const string Aes192Gcm = default;
public const string Aes192KeyWrap = default;
public const string Aes192KW = default;
public const string Aes256CbcHmacSha512 = default;
public const string Aes256Encryption = default;
public const string Aes256Gcm = default;
public const string Aes256KeyWrap = default;
public const string Aes256KW = default;
public const string DesEncryption = default;
public const string EcdhEs = default;
public const string EcdhEsA128kw = default;
public const string EcdhEsA192kw = default;
public const string EcdhEsA256kw = default;
public const string EcdsaSha256 = default;
public const string EcdsaSha256Signature = default;
public const string EcdsaSha384 = default;
public const string EcdsaSha384Signature = default;
public const string EcdsaSha512 = default;
public const string EcdsaSha512Signature = default;
public const string EnvelopedSignature = default;
public const string ExclusiveC14n = default;
public const string ExclusiveC14nWithComments = default;
public const string HmacSha256 = default;
public const string HmacSha256Signature = default;
public const string HmacSha384 = default;
public const string HmacSha384Signature = default;
public const string HmacSha512 = default;
public const string HmacSha512Signature = default;
public const string None = default;
public const string Ripemd160Digest = default;
public const string RsaOAEP = default;
public const string RsaOaepKeyWrap = default;
public const string RsaPKCS1 = default;
public const string RsaSha256 = default;
public const string RsaSha256Signature = default;
public const string RsaSha384 = default;
public const string RsaSha384Signature = default;
public const string RsaSha512 = default;
public const string RsaSha512Signature = default;
public const string RsaSsaPssSha256 = default;
public const string RsaSsaPssSha256Signature = default;
public const string RsaSsaPssSha384 = default;
public const string RsaSsaPssSha384Signature = default;
public const string RsaSsaPssSha512 = default;
public const string RsaSsaPssSha512Signature = default;
public const string RsaV15KeyWrap = default;
public const string Sha256 = default;
public const string Sha256Digest = default;
public const string Sha384 = default;
public const string Sha384Digest = default;
public const string Sha512 = default;
public const string Sha512Digest = default;
}
public abstract class SecurityKey
{
public virtual bool CanComputeJwkThumbprint() => throw null;
public virtual byte[] ComputeJwkThumbprint() => throw null;
public Microsoft.IdentityModel.Tokens.CryptoProviderFactory CryptoProviderFactory { get => throw null; set { } }
public SecurityKey() => throw null;
public virtual bool IsSupportedAlgorithm(string algorithm) => throw null;
public virtual string KeyId { get => throw null; set { } }
public abstract int KeySize { get; }
public override string ToString() => throw null;
}
public class SecurityKeyIdentifierClause
{
public SecurityKeyIdentifierClause() => throw null;
}
public abstract class SecurityToken : Microsoft.IdentityModel.Logging.ISafeLogSecurityArtifact
{
protected SecurityToken() => throw null;
public abstract string Id { get; }
public abstract string Issuer { get; }
public abstract Microsoft.IdentityModel.Tokens.SecurityKey SecurityKey { get; }
public abstract Microsoft.IdentityModel.Tokens.SecurityKey SigningKey { get; set; }
public virtual string UnsafeToString() => throw null;
public abstract System.DateTime ValidFrom { get; }
public abstract System.DateTime ValidTo { get; }
}
public class SecurityTokenArgumentException : System.ArgumentException
{
public SecurityTokenArgumentException() => throw null;
public SecurityTokenArgumentException(string message) => throw null;
public SecurityTokenArgumentException(string message, System.Exception innerException) => throw null;
protected SecurityTokenArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenCompressionFailedException : Microsoft.IdentityModel.Tokens.SecurityTokenException
{
public SecurityTokenCompressionFailedException() => throw null;
public SecurityTokenCompressionFailedException(string message) => throw null;
public SecurityTokenCompressionFailedException(string message, System.Exception inner) => throw null;
protected SecurityTokenCompressionFailedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenDecompressionFailedException : Microsoft.IdentityModel.Tokens.SecurityTokenException
{
public SecurityTokenDecompressionFailedException() => throw null;
public SecurityTokenDecompressionFailedException(string message) => throw null;
public SecurityTokenDecompressionFailedException(string message, System.Exception inner) => throw null;
protected SecurityTokenDecompressionFailedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenDecryptionFailedException : Microsoft.IdentityModel.Tokens.SecurityTokenException
{
public SecurityTokenDecryptionFailedException() => throw null;
public SecurityTokenDecryptionFailedException(string message) => throw null;
public SecurityTokenDecryptionFailedException(string message, System.Exception innerException) => throw null;
protected SecurityTokenDecryptionFailedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenDescriptor
{
public System.Collections.Generic.IDictionary<string, object> AdditionalHeaderClaims { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, object> AdditionalInnerHeaderClaims { get => throw null; set { } }
public string Audience { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, object> Claims { get => throw null; set { } }
public string CompressionAlgorithm { get => throw null; set { } }
public SecurityTokenDescriptor() => throw null;
public Microsoft.IdentityModel.Tokens.EncryptingCredentials EncryptingCredentials { get => throw null; set { } }
public System.DateTime? Expires { get => throw null; set { } }
public System.DateTime? IssuedAt { get => throw null; set { } }
public string Issuer { get => throw null; set { } }
public System.DateTime? NotBefore { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.SigningCredentials SigningCredentials { get => throw null; set { } }
public System.Security.Claims.ClaimsIdentity Subject { get => throw null; set { } }
public string TokenType { get => throw null; set { } }
}
public class SecurityTokenEncryptionFailedException : Microsoft.IdentityModel.Tokens.SecurityTokenException
{
public SecurityTokenEncryptionFailedException() => throw null;
public SecurityTokenEncryptionFailedException(string message) => throw null;
public SecurityTokenEncryptionFailedException(string message, System.Exception innerException) => throw null;
protected SecurityTokenEncryptionFailedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenEncryptionKeyNotFoundException : Microsoft.IdentityModel.Tokens.SecurityTokenDecryptionFailedException
{
public SecurityTokenEncryptionKeyNotFoundException() => throw null;
public SecurityTokenEncryptionKeyNotFoundException(string message) => throw null;
public SecurityTokenEncryptionKeyNotFoundException(string message, System.Exception innerException) => throw null;
protected SecurityTokenEncryptionKeyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenException : System.Exception
{
public SecurityTokenException() => throw null;
public SecurityTokenException(string message) => throw null;
public SecurityTokenException(string message, System.Exception innerException) => throw null;
protected SecurityTokenException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenExpiredException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenExpiredException() => throw null;
public SecurityTokenExpiredException(string message) => throw null;
public SecurityTokenExpiredException(string message, System.Exception inner) => throw null;
protected SecurityTokenExpiredException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public System.DateTime Expires { get => throw null; set { } }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public abstract class SecurityTokenHandler : Microsoft.IdentityModel.Tokens.TokenHandler, Microsoft.IdentityModel.Tokens.ISecurityTokenValidator
{
public virtual bool CanReadToken(System.Xml.XmlReader reader) => throw null;
public virtual bool CanReadToken(string tokenString) => throw null;
public virtual bool CanValidateToken { get => throw null; }
public virtual bool CanWriteToken { get => throw null; }
public virtual Microsoft.IdentityModel.Tokens.SecurityKeyIdentifierClause CreateSecurityTokenReference(Microsoft.IdentityModel.Tokens.SecurityToken token, bool attached) => throw null;
public virtual Microsoft.IdentityModel.Tokens.SecurityToken CreateToken(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor) => throw null;
protected SecurityTokenHandler() => throw null;
public virtual Microsoft.IdentityModel.Tokens.SecurityToken ReadToken(System.Xml.XmlReader reader) => throw null;
public abstract Microsoft.IdentityModel.Tokens.SecurityToken ReadToken(System.Xml.XmlReader reader, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public abstract System.Type TokenType { get; }
public virtual System.Security.Claims.ClaimsPrincipal ValidateToken(string securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, out Microsoft.IdentityModel.Tokens.SecurityToken validatedToken) => throw null;
public virtual System.Security.Claims.ClaimsPrincipal ValidateToken(System.Xml.XmlReader reader, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, out Microsoft.IdentityModel.Tokens.SecurityToken validatedToken) => throw null;
public virtual string WriteToken(Microsoft.IdentityModel.Tokens.SecurityToken token) => throw null;
public abstract void WriteToken(System.Xml.XmlWriter writer, Microsoft.IdentityModel.Tokens.SecurityToken token);
}
public class SecurityTokenInvalidAlgorithmException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenInvalidAlgorithmException() => throw null;
public SecurityTokenInvalidAlgorithmException(string message) => throw null;
public SecurityTokenInvalidAlgorithmException(string message, System.Exception innerException) => throw null;
protected SecurityTokenInvalidAlgorithmException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public string InvalidAlgorithm { get => throw null; set { } }
}
public class SecurityTokenInvalidAudienceException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenInvalidAudienceException() => throw null;
public SecurityTokenInvalidAudienceException(string message) => throw null;
public SecurityTokenInvalidAudienceException(string message, System.Exception innerException) => throw null;
protected SecurityTokenInvalidAudienceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public string InvalidAudience { get => throw null; set { } }
}
public class SecurityTokenInvalidIssuerException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenInvalidIssuerException() => throw null;
public SecurityTokenInvalidIssuerException(string message) => throw null;
public SecurityTokenInvalidIssuerException(string message, System.Exception innerException) => throw null;
protected SecurityTokenInvalidIssuerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public string InvalidIssuer { get => throw null; set { } }
}
public class SecurityTokenInvalidLifetimeException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenInvalidLifetimeException() => throw null;
public SecurityTokenInvalidLifetimeException(string message) => throw null;
public SecurityTokenInvalidLifetimeException(string message, System.Exception innerException) => throw null;
protected SecurityTokenInvalidLifetimeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public System.DateTime? Expires { get => throw null; set { } }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public System.DateTime? NotBefore { get => throw null; set { } }
}
public class SecurityTokenInvalidSignatureException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenInvalidSignatureException() => throw null;
public SecurityTokenInvalidSignatureException(string message) => throw null;
public SecurityTokenInvalidSignatureException(string message, System.Exception innerException) => throw null;
protected SecurityTokenInvalidSignatureException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenInvalidSigningKeyException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenInvalidSigningKeyException() => throw null;
public SecurityTokenInvalidSigningKeyException(string message) => throw null;
public SecurityTokenInvalidSigningKeyException(string message, System.Exception inner) => throw null;
protected SecurityTokenInvalidSigningKeyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public Microsoft.IdentityModel.Tokens.SecurityKey SigningKey { get => throw null; set { } }
}
public class SecurityTokenInvalidTypeException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenInvalidTypeException() => throw null;
public SecurityTokenInvalidTypeException(string message) => throw null;
public SecurityTokenInvalidTypeException(string message, System.Exception innerException) => throw null;
protected SecurityTokenInvalidTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public string InvalidType { get => throw null; set { } }
}
public class SecurityTokenKeyWrapException : Microsoft.IdentityModel.Tokens.SecurityTokenException
{
public SecurityTokenKeyWrapException() => throw null;
public SecurityTokenKeyWrapException(string message) => throw null;
public SecurityTokenKeyWrapException(string message, System.Exception innerException) => throw null;
protected SecurityTokenKeyWrapException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenMalformedException : Microsoft.IdentityModel.Tokens.SecurityTokenArgumentException
{
public SecurityTokenMalformedException() => throw null;
public SecurityTokenMalformedException(string message) => throw null;
public SecurityTokenMalformedException(string message, System.Exception innerException) => throw null;
protected SecurityTokenMalformedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenNoExpirationException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenNoExpirationException() => throw null;
public SecurityTokenNoExpirationException(string message) => throw null;
public SecurityTokenNoExpirationException(string message, System.Exception innerException) => throw null;
protected SecurityTokenNoExpirationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenNotYetValidException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenNotYetValidException() => throw null;
public SecurityTokenNotYetValidException(string message) => throw null;
public SecurityTokenNotYetValidException(string message, System.Exception inner) => throw null;
protected SecurityTokenNotYetValidException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public System.DateTime NotBefore { get => throw null; set { } }
}
public class SecurityTokenReplayAddFailedException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenReplayAddFailedException() => throw null;
public SecurityTokenReplayAddFailedException(string message) => throw null;
public SecurityTokenReplayAddFailedException(string message, System.Exception innerException) => throw null;
protected SecurityTokenReplayAddFailedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenReplayDetectedException : Microsoft.IdentityModel.Tokens.SecurityTokenValidationException
{
public SecurityTokenReplayDetectedException() => throw null;
public SecurityTokenReplayDetectedException(string message) => throw null;
public SecurityTokenReplayDetectedException(string message, System.Exception inner) => throw null;
protected SecurityTokenReplayDetectedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenSignatureKeyNotFoundException : Microsoft.IdentityModel.Tokens.SecurityTokenInvalidSignatureException
{
public SecurityTokenSignatureKeyNotFoundException() => throw null;
public SecurityTokenSignatureKeyNotFoundException(string message) => throw null;
public SecurityTokenSignatureKeyNotFoundException(string message, System.Exception innerException) => throw null;
protected SecurityTokenSignatureKeyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public class SecurityTokenUnableToValidateException : Microsoft.IdentityModel.Tokens.SecurityTokenInvalidSignatureException
{
public SecurityTokenUnableToValidateException() => throw null;
public SecurityTokenUnableToValidateException(Microsoft.IdentityModel.Tokens.ValidationFailure validationFailure, string message) => throw null;
public SecurityTokenUnableToValidateException(string message) => throw null;
public SecurityTokenUnableToValidateException(string message, System.Exception innerException) => throw null;
protected SecurityTokenUnableToValidateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
public Microsoft.IdentityModel.Tokens.ValidationFailure ValidationFailure { get => throw null; set { } }
}
public class SecurityTokenValidationException : Microsoft.IdentityModel.Tokens.SecurityTokenException
{
public SecurityTokenValidationException() => throw null;
public SecurityTokenValidationException(string message) => throw null;
public SecurityTokenValidationException(string message, System.Exception innerException) => throw null;
protected SecurityTokenValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;
}
public abstract class SignatureProvider : System.IDisposable
{
public string Algorithm { get => throw null; }
public string Context { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.CryptoProviderCache CryptoProviderCache { get => throw null; set { } }
protected SignatureProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public void Dispose() => throw null;
protected abstract void Dispose(bool disposing);
public Microsoft.IdentityModel.Tokens.SecurityKey Key { get => throw null; }
public abstract byte[] Sign(byte[] input);
public virtual byte[] Sign(byte[] input, int offset, int count) => throw null;
public virtual bool Sign(System.ReadOnlySpan<byte> data, System.Span<byte> destination, out int bytesWritten) => throw null;
public abstract bool Verify(byte[] input, byte[] signature);
public virtual bool Verify(byte[] input, int inputOffset, int inputLength, byte[] signature, int signatureOffset, int signatureLength) => throw null;
public bool WillCreateSignatures { get => throw null; set { } }
}
public delegate Microsoft.IdentityModel.Tokens.SecurityToken SignatureValidator(string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public delegate Microsoft.IdentityModel.Tokens.SecurityToken SignatureValidatorUsingConfiguration(string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, Microsoft.IdentityModel.Tokens.BaseConfiguration configuration);
public class SigningCredentials
{
public string Algorithm { get => throw null; }
public Microsoft.IdentityModel.Tokens.CryptoProviderFactory CryptoProviderFactory { get => throw null; set { } }
protected SigningCredentials(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
protected SigningCredentials(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, string algorithm) => throw null;
public SigningCredentials(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public SigningCredentials(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, string digest) => throw null;
public string Digest { get => throw null; }
public Microsoft.IdentityModel.Tokens.SecurityKey Key { get => throw null; }
public string Kid { get => throw null; }
}
public class SymmetricKeyWrapProvider : Microsoft.IdentityModel.Tokens.KeyWrapProvider
{
public override string Algorithm { get => throw null; }
public override string Context { get => throw null; set { } }
public SymmetricKeyWrapProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
protected override void Dispose(bool disposing) => throw null;
protected virtual System.Security.Cryptography.SymmetricAlgorithm GetSymmetricAlgorithm(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
protected virtual bool IsSupportedAlgorithm(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) => throw null;
public override Microsoft.IdentityModel.Tokens.SecurityKey Key { get => throw null; }
public override byte[] UnwrapKey(byte[] keyBytes) => throw null;
public override byte[] WrapKey(byte[] keyBytes) => throw null;
}
public class SymmetricSecurityKey : Microsoft.IdentityModel.Tokens.SecurityKey
{
public override bool CanComputeJwkThumbprint() => throw null;
public override byte[] ComputeJwkThumbprint() => throw null;
public SymmetricSecurityKey(byte[] key) => throw null;
public virtual byte[] Key { get => throw null; }
public override int KeySize { get => throw null; }
}
public class SymmetricSignatureProvider : Microsoft.IdentityModel.Tokens.SignatureProvider
{
public SymmetricSignatureProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm) : base(default(Microsoft.IdentityModel.Tokens.SecurityKey), default(string)) => throw null;
public SymmetricSignatureProvider(Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, bool willCreateSignatures) : base(default(Microsoft.IdentityModel.Tokens.SecurityKey), default(string)) => throw null;
public static readonly int DefaultMinimumSymmetricKeySizeInBits;
protected override void Dispose(bool disposing) => throw null;
protected virtual byte[] GetKeyBytes(Microsoft.IdentityModel.Tokens.SecurityKey key) => throw null;
protected virtual System.Security.Cryptography.KeyedHashAlgorithm GetKeyedHashAlgorithm(byte[] keyBytes, string algorithm) => throw null;
public int MinimumSymmetricKeySizeInBits { get => throw null; set { } }
protected virtual void ReleaseKeyedHashAlgorithm(System.Security.Cryptography.KeyedHashAlgorithm keyedHashAlgorithm) => throw null;
public override byte[] Sign(byte[] input) => throw null;
public override bool Sign(System.ReadOnlySpan<byte> input, System.Span<byte> signature, out int bytesWritten) => throw null;
public override byte[] Sign(byte[] input, int offset, int count) => throw null;
public override bool Verify(byte[] input, byte[] signature) => throw null;
public bool Verify(byte[] input, byte[] signature, int length) => throw null;
public override bool Verify(byte[] input, int inputOffset, int inputLength, byte[] signature, int signatureOffset, int signatureLength) => throw null;
}
public class TokenContext : Microsoft.IdentityModel.Tokens.CallContext
{
public TokenContext() => throw null;
public TokenContext(System.Guid activityId) => throw null;
}
public delegate System.Collections.Generic.IEnumerable<Microsoft.IdentityModel.Tokens.SecurityKey> TokenDecryptionKeyResolver(string token, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, string kid, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public abstract class TokenHandler
{
protected TokenHandler() => throw null;
public static readonly int DefaultTokenLifetimeInMinutes;
public virtual int MaximumTokenSizeInBytes { get => throw null; set { } }
public virtual Microsoft.IdentityModel.Tokens.SecurityToken ReadToken(string token) => throw null;
public bool SetDefaultTimesOnTokenCreation { get => throw null; set { } }
public int TokenLifetimeInMinutes { get => throw null; set { } }
public virtual System.Threading.Tasks.Task<Microsoft.IdentityModel.Tokens.TokenValidationResult> ValidateTokenAsync(string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public virtual System.Threading.Tasks.Task<Microsoft.IdentityModel.Tokens.TokenValidationResult> ValidateTokenAsync(Microsoft.IdentityModel.Tokens.SecurityToken token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
}
public delegate Microsoft.IdentityModel.Tokens.SecurityToken TokenReader(string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public delegate bool TokenReplayValidator(System.DateTime? expirationTime, string securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public class TokenValidationParameters
{
public Microsoft.IdentityModel.Tokens.TokenValidationParameters ActorValidationParameters { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.AlgorithmValidator AlgorithmValidator { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.AudienceValidator AudienceValidator { get => throw null; set { } }
public string AuthenticationType { get => throw null; set { } }
public System.TimeSpan ClockSkew { get => throw null; set { } }
public virtual Microsoft.IdentityModel.Tokens.TokenValidationParameters Clone() => throw null;
public Microsoft.IdentityModel.Tokens.BaseConfigurationManager ConfigurationManager { get => throw null; set { } }
public virtual System.Security.Claims.ClaimsIdentity CreateClaimsIdentity(Microsoft.IdentityModel.Tokens.SecurityToken securityToken, string issuer) => throw null;
public Microsoft.IdentityModel.Tokens.CryptoProviderFactory CryptoProviderFactory { get => throw null; set { } }
protected TokenValidationParameters(Microsoft.IdentityModel.Tokens.TokenValidationParameters other) => throw null;
public TokenValidationParameters() => throw null;
public string DebugId { get => throw null; set { } }
public static readonly string DefaultAuthenticationType;
public static readonly System.TimeSpan DefaultClockSkew;
public const int DefaultMaximumTokenSizeInBytes = 256000;
public bool IgnoreTrailingSlashWhenValidatingAudience { get => throw null; set { } }
public bool IncludeTokenOnFailedValidation { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, object> InstancePropertyBag { get => throw null; }
public bool IsClone { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.SecurityKey IssuerSigningKey { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.IssuerSigningKeyResolver IssuerSigningKeyResolver { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.IssuerSigningKeyResolverUsingConfiguration IssuerSigningKeyResolverUsingConfiguration { get => throw null; set { } }
public System.Collections.Generic.IEnumerable<Microsoft.IdentityModel.Tokens.SecurityKey> IssuerSigningKeys { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.IssuerSigningKeyValidator IssuerSigningKeyValidator { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.IssuerSigningKeyValidatorUsingConfiguration IssuerSigningKeyValidatorUsingConfiguration { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.IssuerValidator IssuerValidator { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.IssuerValidatorUsingConfiguration IssuerValidatorUsingConfiguration { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.LifetimeValidator LifetimeValidator { get => throw null; set { } }
public bool LogTokenId { get => throw null; set { } }
public bool LogValidationExceptions { get => throw null; set { } }
public string NameClaimType { get => throw null; set { } }
public System.Func<Microsoft.IdentityModel.Tokens.SecurityToken, string, string> NameClaimTypeRetriever { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, object> PropertyBag { get => throw null; set { } }
public bool RefreshBeforeValidation { get => throw null; set { } }
public bool RequireAudience { get => throw null; set { } }
public bool RequireExpirationTime { get => throw null; set { } }
public bool RequireSignedTokens { get => throw null; set { } }
public string RoleClaimType { get => throw null; set { } }
public System.Func<Microsoft.IdentityModel.Tokens.SecurityToken, string, string> RoleClaimTypeRetriever { get => throw null; set { } }
public bool SaveSigninToken { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.SignatureValidator SignatureValidator { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.SignatureValidatorUsingConfiguration SignatureValidatorUsingConfiguration { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.SecurityKey TokenDecryptionKey { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.TokenDecryptionKeyResolver TokenDecryptionKeyResolver { get => throw null; set { } }
public System.Collections.Generic.IEnumerable<Microsoft.IdentityModel.Tokens.SecurityKey> TokenDecryptionKeys { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.TokenReader TokenReader { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.ITokenReplayCache TokenReplayCache { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.TokenReplayValidator TokenReplayValidator { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.TransformBeforeSignatureValidation TransformBeforeSignatureValidation { get => throw null; set { } }
public bool TryAllIssuerSigningKeys { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.TypeValidator TypeValidator { get => throw null; set { } }
public System.Collections.Generic.IEnumerable<string> ValidAlgorithms { get => throw null; set { } }
public bool ValidateActor { get => throw null; set { } }
public bool ValidateAudience { get => throw null; set { } }
public bool ValidateIssuer { get => throw null; set { } }
public bool ValidateIssuerSigningKey { get => throw null; set { } }
public bool ValidateLifetime { get => throw null; set { } }
public bool ValidateSignatureLast { get => throw null; set { } }
public bool ValidateTokenReplay { get => throw null; set { } }
public bool ValidateWithLKG { get => throw null; set { } }
public string ValidAudience { get => throw null; set { } }
public System.Collections.Generic.IEnumerable<string> ValidAudiences { get => throw null; set { } }
public string ValidIssuer { get => throw null; set { } }
public System.Collections.Generic.IEnumerable<string> ValidIssuers { get => throw null; set { } }
public System.Collections.Generic.IEnumerable<string> ValidTypes { get => throw null; set { } }
}
public class TokenValidationResult
{
public System.Collections.Generic.IDictionary<string, object> Claims { get => throw null; }
public System.Security.Claims.ClaimsIdentity ClaimsIdentity { get => throw null; set { } }
public TokenValidationResult() => throw null;
public System.Exception Exception { get => throw null; set { } }
public string Issuer { get => throw null; set { } }
public bool IsValid { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, object> PropertyBag { get => throw null; }
public Microsoft.IdentityModel.Tokens.SecurityToken SecurityToken { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.CallContext TokenContext { get => throw null; set { } }
public Microsoft.IdentityModel.Tokens.SecurityToken TokenOnFailedValidation { get => throw null; }
public string TokenType { get => throw null; set { } }
}
public delegate Microsoft.IdentityModel.Tokens.SecurityToken TransformBeforeSignatureValidation(Microsoft.IdentityModel.Tokens.SecurityToken token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public delegate string TypeValidator(string type, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
public static class UniqueId
{
public static string CreateRandomId() => throw null;
public static string CreateRandomId(string prefix) => throw null;
public static System.Uri CreateRandomUri() => throw null;
public static string CreateUniqueId() => throw null;
public static string CreateUniqueId(string prefix) => throw null;
}
public static class Utility
{
public static bool AreEqual(byte[] a, byte[] b) => throw null;
public static byte[] CloneByteArray(this byte[] src) => throw null;
public const string Empty = default;
public static bool IsHttps(string address) => throw null;
public static bool IsHttps(System.Uri uri) => throw null;
public const string Null = default;
}
public enum ValidationFailure
{
None = 0,
InvalidLifetime = 1,
InvalidIssuer = 2,
}
public static class Validators
{
public static void ValidateAlgorithm(string algorithm, Microsoft.IdentityModel.Tokens.SecurityKey securityKey, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static void ValidateAudience(System.Collections.Generic.IEnumerable<string> audiences, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static string ValidateIssuer(string issuer, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static void ValidateIssuerSecurityKey(Microsoft.IdentityModel.Tokens.SecurityKey securityKey, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static void ValidateLifetime(System.DateTime? notBefore, System.DateTime? expires, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static void ValidateTokenReplay(System.DateTime? expirationTime, string securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static void ValidateTokenReplay(string securityToken, System.DateTime? expirationTime, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static string ValidateTokenType(string type, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
}
public class X509EncryptingCredentials : Microsoft.IdentityModel.Tokens.EncryptingCredentials
{
public System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate { get => throw null; }
public X509EncryptingCredentials(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) : base(default(Microsoft.IdentityModel.Tokens.SymmetricSecurityKey), default(string)) => throw null;
public X509EncryptingCredentials(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, string keyWrapAlgorithm, string dataEncryptionAlgorithm) : base(default(Microsoft.IdentityModel.Tokens.SymmetricSecurityKey), default(string)) => throw null;
}
public class X509SecurityKey : Microsoft.IdentityModel.Tokens.AsymmetricSecurityKey
{
public override bool CanComputeJwkThumbprint() => throw null;
public System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate { get => throw null; }
public override byte[] ComputeJwkThumbprint() => throw null;
public X509SecurityKey(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
public X509SecurityKey(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, string keyId) => throw null;
public override bool Equals(object obj) => throw null;
public override int GetHashCode() => throw null;
public override bool HasPrivateKey { get => throw null; }
public override int KeySize { get => throw null; }
public System.Security.Cryptography.AsymmetricAlgorithm PrivateKey { get => throw null; }
public override Microsoft.IdentityModel.Tokens.PrivateKeyStatus PrivateKeyStatus { get => throw null; }
public System.Security.Cryptography.AsymmetricAlgorithm PublicKey { get => throw null; }
public string X5t { get => throw null; }
}
public class X509SigningCredentials : Microsoft.IdentityModel.Tokens.SigningCredentials
{
public System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate { get => throw null; }
public X509SigningCredentials(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) : base(default(System.Security.Cryptography.X509Certificates.X509Certificate2)) => throw null;
public X509SigningCredentials(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, string algorithm) : base(default(System.Security.Cryptography.X509Certificates.X509Certificate2)) => throw null;
}
}
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.IdentityModel.Logging/7.5.0/Microsoft.IdentityModel.Logging.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,91 @@
// This file contains auto-generated code.
// Generated from `Microsoft.SqlServer.Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5`.
namespace Microsoft
{
namespace SqlServer
{
namespace Server
{
public enum DataAccessKind
{
None = 0,
Read = 1,
}
public enum Format
{
Unknown = 0,
Native = 1,
UserDefined = 2,
}
public interface IBinarySerialize
{
void Read(System.IO.BinaryReader r);
void Write(System.IO.BinaryWriter w);
}
public sealed class InvalidUdtException : System.SystemException
{
public static Microsoft.SqlServer.Server.InvalidUdtException Create(System.Type udtType, string resourceReason = default(string)) => throw null;
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) => throw null;
}
[System.AttributeUsage((System.AttributeTargets)10624, AllowMultiple = false, Inherited = false)]
public class SqlFacetAttribute : System.Attribute
{
public SqlFacetAttribute() => throw null;
public bool IsFixedLength { get => throw null; set { } }
public bool IsNullable { get => throw null; set { } }
public int MaxSize { get => throw null; set { } }
public int Precision { get => throw null; set { } }
public int Scale { get => throw null; set { } }
}
[System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = false)]
public class SqlFunctionAttribute : System.Attribute
{
public SqlFunctionAttribute() => throw null;
public Microsoft.SqlServer.Server.DataAccessKind DataAccess { get => throw null; set { } }
public string FillRowMethodName { get => throw null; set { } }
public bool IsDeterministic { get => throw null; set { } }
public bool IsPrecise { get => throw null; set { } }
public string Name { get => throw null; set { } }
public Microsoft.SqlServer.Server.SystemDataAccessKind SystemDataAccess { get => throw null; set { } }
public string TableDefinition { get => throw null; set { } }
}
[System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = false)]
public sealed class SqlMethodAttribute : Microsoft.SqlServer.Server.SqlFunctionAttribute
{
public SqlMethodAttribute() => throw null;
public bool InvokeIfReceiverIsNull { get => throw null; set { } }
public bool IsMutator { get => throw null; set { } }
public bool OnNullCall { get => throw null; set { } }
}
[System.AttributeUsage((System.AttributeTargets)12, AllowMultiple = false, Inherited = false)]
public sealed class SqlUserDefinedAggregateAttribute : System.Attribute
{
public SqlUserDefinedAggregateAttribute(Microsoft.SqlServer.Server.Format format) => throw null;
public Microsoft.SqlServer.Server.Format Format { get => throw null; }
public bool IsInvariantToDuplicates { get => throw null; set { } }
public bool IsInvariantToNulls { get => throw null; set { } }
public bool IsInvariantToOrder { get => throw null; set { } }
public bool IsNullIfEmpty { get => throw null; set { } }
public int MaxByteSize { get => throw null; set { } }
public const int MaxByteSizeValue = 8000;
public string Name { get => throw null; set { } }
}
[System.AttributeUsage((System.AttributeTargets)12, AllowMultiple = false, Inherited = true)]
public sealed class SqlUserDefinedTypeAttribute : System.Attribute
{
public SqlUserDefinedTypeAttribute(Microsoft.SqlServer.Server.Format format) => throw null;
public Microsoft.SqlServer.Server.Format Format { get => throw null; }
public bool IsByteOrdered { get => throw null; set { } }
public bool IsFixedLength { get => throw null; set { } }
public int MaxByteSize { get => throw null; set { } }
public string Name { get => throw null; set { } }
public string ValidationMethodName { get => throw null; set { } }
}
public enum SystemDataAccessKind
{
None = 0,
Read = 1,
}
}
}
}

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,42 @@
// This file contains auto-generated code.
// Generated from `System.ClientModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8`.
namespace System
{
namespace ClientModel
{
namespace Primitives
{
public interface IJsonModel<T> : System.ClientModel.Primitives.IPersistableModel<T>
{
T Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options);
void Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options);
}
public interface IPersistableModel<T>
{
T Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options);
string GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options);
System.BinaryData Write(System.ClientModel.Primitives.ModelReaderWriterOptions options);
}
public static class ModelReaderWriter
{
public static T Read<T>(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options = default(System.ClientModel.Primitives.ModelReaderWriterOptions)) where T : System.ClientModel.Primitives.IPersistableModel<T> => throw null;
public static object Read(System.BinaryData data, System.Type returnType, System.ClientModel.Primitives.ModelReaderWriterOptions options = default(System.ClientModel.Primitives.ModelReaderWriterOptions)) => throw null;
public static System.BinaryData Write<T>(T model, System.ClientModel.Primitives.ModelReaderWriterOptions options = default(System.ClientModel.Primitives.ModelReaderWriterOptions)) where T : System.ClientModel.Primitives.IPersistableModel<T> => throw null;
public static System.BinaryData Write(object model, System.ClientModel.Primitives.ModelReaderWriterOptions options = default(System.ClientModel.Primitives.ModelReaderWriterOptions)) => throw null;
}
public class ModelReaderWriterOptions
{
public ModelReaderWriterOptions(string format) => throw null;
public string Format { get => throw null; }
public static System.ClientModel.Primitives.ModelReaderWriterOptions Json { get => throw null; }
public static System.ClientModel.Primitives.ModelReaderWriterOptions Xml { get => throw null; }
}
[System.AttributeUsage((System.AttributeTargets)4)]
public sealed class PersistableModelProxyAttribute : System.Attribute
{
public PersistableModelProxyAttribute(System.Type proxyType) => throw null;
public System.Type ProxyType { get => throw null; }
}
}
}
}

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../System.Memory.Data/1.0.2/System.Memory.Data.csproj" />
<ProjectReference Include="../../System.Text.Json/4.7.2/System.Text.Json.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../System.Diagnostics.EventLog/9.0.1/System.Diagnostics.EventLog.csproj" />
<ProjectReference Include="../../System.Security.Cryptography.ProtectedData/9.0.1/System.Security.Cryptography.ProtectedData.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../System.Runtime.CompilerServices.Unsafe/6.0.0/System.Runtime.CompilerServices.Unsafe.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,227 @@
// This file contains auto-generated code.
// Generated from `System.IdentityModel.Tokens.Jwt, Version=7.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35`.
namespace System
{
namespace IdentityModel
{
namespace Tokens
{
namespace Jwt
{
public static class JsonClaimValueTypes
{
public const string Json = default;
public const string JsonArray = default;
public const string JsonNull = default;
}
public static class JwtConstants
{
public const string DirectKeyUseAlg = default;
public const string HeaderType = default;
public const string HeaderTypeAlt = default;
public const string JsonCompactSerializationRegex = default;
public const string JweCompactSerializationRegex = default;
public const string TokenType = default;
public const string TokenTypeAlt = default;
}
public class JwtHeader : System.Collections.Generic.Dictionary<string, object>
{
public string Alg { get => throw null; }
public static System.IdentityModel.Tokens.Jwt.JwtHeader Base64UrlDeserialize(string base64UrlEncodedJsonString) => throw null;
public virtual string Base64UrlEncode() => throw null;
public JwtHeader() => throw null;
public JwtHeader(Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials) => throw null;
public JwtHeader(Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials) => throw null;
public JwtHeader(Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, System.Collections.Generic.IDictionary<string, string> outboundAlgorithmMap) => throw null;
public JwtHeader(Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, System.Collections.Generic.IDictionary<string, string> outboundAlgorithmMap, string tokenType) => throw null;
public JwtHeader(Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, System.Collections.Generic.IDictionary<string, string> outboundAlgorithmMap, string tokenType, System.Collections.Generic.IDictionary<string, object> additionalInnerHeaderClaims) => throw null;
public JwtHeader(Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, System.Collections.Generic.IDictionary<string, string> outboundAlgorithmMap) => throw null;
public JwtHeader(Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, System.Collections.Generic.IDictionary<string, string> outboundAlgorithmMap, string tokenType) => throw null;
public JwtHeader(Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, System.Collections.Generic.IDictionary<string, string> outboundAlgorithmMap, string tokenType, System.Collections.Generic.IDictionary<string, object> additionalHeaderClaims) => throw null;
public string Cty { get => throw null; }
public string Enc { get => throw null; }
public Microsoft.IdentityModel.Tokens.EncryptingCredentials EncryptingCredentials { get => throw null; }
public string IV { get => throw null; }
public string Kid { get => throw null; }
public virtual string SerializeToJson() => throw null;
public Microsoft.IdentityModel.Tokens.SigningCredentials SigningCredentials { get => throw null; }
public string Typ { get => throw null; }
public string X5c { get => throw null; }
public string X5t { get => throw null; }
public string Zip { get => throw null; }
}
public struct JwtHeaderParameterNames
{
public const string Alg = default;
public const string Apu = default;
public const string Apv = default;
public const string Cty = default;
public const string Enc = default;
public const string Epk = default;
public const string IV = default;
public const string Jku = default;
public const string Jwk = default;
public const string Kid = default;
public const string Typ = default;
public const string X5c = default;
public const string X5t = default;
public const string X5u = default;
public const string Zip = default;
}
public class JwtPayload : System.Collections.Generic.Dictionary<string, object>
{
public string Acr { get => throw null; }
public string Actort { get => throw null; }
public void AddClaim(System.Security.Claims.Claim claim) => throw null;
public void AddClaims(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims) => throw null;
public System.Collections.Generic.IList<string> Amr { get => throw null; }
public System.Collections.Generic.IList<string> Aud { get => throw null; }
public int? AuthTime { get => throw null; }
public string Azp { get => throw null; }
public static System.IdentityModel.Tokens.Jwt.JwtPayload Base64UrlDeserialize(string base64UrlEncodedJsonString) => throw null;
public virtual string Base64UrlEncode() => throw null;
public string CHash { get => throw null; }
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> Claims { get => throw null; }
public JwtPayload() => throw null;
public JwtPayload(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims) => throw null;
public JwtPayload(string issuer, string audience, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, System.DateTime? notBefore, System.DateTime? expires) => throw null;
public JwtPayload(string issuer, string audience, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, System.DateTime? notBefore, System.DateTime? expires, System.DateTime? issuedAt) => throw null;
public JwtPayload(string issuer, string audience, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, System.Collections.Generic.IDictionary<string, object> claimsCollection, System.DateTime? notBefore, System.DateTime? expires, System.DateTime? issuedAt) => throw null;
public static System.IdentityModel.Tokens.Jwt.JwtPayload Deserialize(string jsonString) => throw null;
public int? Exp { get => throw null; }
public long? Expiration { get => throw null; }
public int? Iat { get => throw null; }
public string Iss { get => throw null; }
public System.DateTime IssuedAt { get => throw null; }
public string Jti { get => throw null; }
public int? Nbf { get => throw null; }
public string Nonce { get => throw null; }
public long? NotBefore { get => throw null; }
public virtual string SerializeToJson() => throw null;
public string Sub { get => throw null; }
public System.DateTime ValidFrom { get => throw null; }
public System.DateTime ValidTo { get => throw null; }
}
public struct JwtRegisteredClaimNames
{
public const string Acr = default;
public const string Actort = default;
public const string Amr = default;
public const string AtHash = default;
public const string Aud = default;
public const string AuthTime = default;
public const string Azp = default;
public const string Birthdate = default;
public const string CHash = default;
public const string Email = default;
public const string Exp = default;
public const string FamilyName = default;
public const string Gender = default;
public const string GivenName = default;
public const string Iat = default;
public const string Iss = default;
public const string Jti = default;
public const string Name = default;
public const string NameId = default;
public const string Nbf = default;
public const string Nonce = default;
public const string Prn = default;
public const string Sid = default;
public const string Sub = default;
public const string Typ = default;
public const string UniqueName = default;
public const string Website = default;
}
public class JwtSecurityToken : Microsoft.IdentityModel.Tokens.SecurityToken
{
public string Actor { get => throw null; }
public System.Collections.Generic.IEnumerable<string> Audiences { get => throw null; }
public System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> Claims { get => throw null; }
public JwtSecurityToken(string jwtEncodedString) => throw null;
public JwtSecurityToken(System.IdentityModel.Tokens.Jwt.JwtHeader header, System.IdentityModel.Tokens.Jwt.JwtPayload payload, string rawHeader, string rawPayload, string rawSignature) => throw null;
public JwtSecurityToken(System.IdentityModel.Tokens.Jwt.JwtHeader header, System.IdentityModel.Tokens.Jwt.JwtSecurityToken innerToken, string rawHeader, string rawEncryptedKey, string rawInitializationVector, string rawCiphertext, string rawAuthenticationTag) => throw null;
public JwtSecurityToken(System.IdentityModel.Tokens.Jwt.JwtHeader header, System.IdentityModel.Tokens.Jwt.JwtPayload payload) => throw null;
public JwtSecurityToken(string issuer = default(string), string audience = default(string), System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims = default(System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>), System.DateTime? notBefore = default(System.DateTime?), System.DateTime? expires = default(System.DateTime?), Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials = default(Microsoft.IdentityModel.Tokens.SigningCredentials)) => throw null;
public virtual string EncodedHeader { get => throw null; }
public virtual string EncodedPayload { get => throw null; }
public Microsoft.IdentityModel.Tokens.EncryptingCredentials EncryptingCredentials { get => throw null; }
public System.IdentityModel.Tokens.Jwt.JwtHeader Header { get => throw null; }
public override string Id { get => throw null; }
public System.IdentityModel.Tokens.Jwt.JwtSecurityToken InnerToken { get => throw null; }
public virtual System.DateTime IssuedAt { get => throw null; }
public override string Issuer { get => throw null; }
public System.IdentityModel.Tokens.Jwt.JwtPayload Payload { get => throw null; }
public string RawAuthenticationTag { get => throw null; }
public string RawCiphertext { get => throw null; }
public string RawData { get => throw null; }
public string RawEncryptedKey { get => throw null; }
public string RawHeader { get => throw null; }
public string RawInitializationVector { get => throw null; }
public string RawPayload { get => throw null; }
public string RawSignature { get => throw null; }
public override Microsoft.IdentityModel.Tokens.SecurityKey SecurityKey { get => throw null; }
public string SignatureAlgorithm { get => throw null; }
public Microsoft.IdentityModel.Tokens.SigningCredentials SigningCredentials { get => throw null; }
public override Microsoft.IdentityModel.Tokens.SecurityKey SigningKey { get => throw null; set { } }
public string Subject { get => throw null; }
public override string ToString() => throw null;
public override string UnsafeToString() => throw null;
public override System.DateTime ValidFrom { get => throw null; }
public override System.DateTime ValidTo { get => throw null; }
}
public static class JwtSecurityTokenConverter
{
public static System.IdentityModel.Tokens.Jwt.JwtSecurityToken Convert(Microsoft.IdentityModel.JsonWebTokens.JsonWebToken token) => throw null;
}
public class JwtSecurityTokenHandler : Microsoft.IdentityModel.Tokens.SecurityTokenHandler
{
public override bool CanReadToken(string token) => throw null;
public override bool CanValidateToken { get => throw null; }
public override bool CanWriteToken { get => throw null; }
protected virtual string CreateActorValue(System.Security.Claims.ClaimsIdentity actor) => throw null;
protected virtual System.Security.Claims.ClaimsIdentity CreateClaimsIdentity(System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, string issuer, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public virtual string CreateEncodedJwt(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor) => throw null;
public virtual string CreateEncodedJwt(string issuer, string audience, System.Security.Claims.ClaimsIdentity subject, System.DateTime? notBefore, System.DateTime? expires, System.DateTime? issuedAt, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials) => throw null;
public virtual string CreateEncodedJwt(string issuer, string audience, System.Security.Claims.ClaimsIdentity subject, System.DateTime? notBefore, System.DateTime? expires, System.DateTime? issuedAt, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials) => throw null;
public virtual string CreateEncodedJwt(string issuer, string audience, System.Security.Claims.ClaimsIdentity subject, System.DateTime? notBefore, System.DateTime? expires, System.DateTime? issuedAt, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, System.Collections.Generic.IDictionary<string, object> claimCollection) => throw null;
public virtual System.IdentityModel.Tokens.Jwt.JwtSecurityToken CreateJwtSecurityToken(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor) => throw null;
public virtual System.IdentityModel.Tokens.Jwt.JwtSecurityToken CreateJwtSecurityToken(string issuer, string audience, System.Security.Claims.ClaimsIdentity subject, System.DateTime? notBefore, System.DateTime? expires, System.DateTime? issuedAt, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials) => throw null;
public virtual System.IdentityModel.Tokens.Jwt.JwtSecurityToken CreateJwtSecurityToken(string issuer, string audience, System.Security.Claims.ClaimsIdentity subject, System.DateTime? notBefore, System.DateTime? expires, System.DateTime? issuedAt, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, System.Collections.Generic.IDictionary<string, object> claimCollection) => throw null;
public virtual System.IdentityModel.Tokens.Jwt.JwtSecurityToken CreateJwtSecurityToken(string issuer = default(string), string audience = default(string), System.Security.Claims.ClaimsIdentity subject = default(System.Security.Claims.ClaimsIdentity), System.DateTime? notBefore = default(System.DateTime?), System.DateTime? expires = default(System.DateTime?), System.DateTime? issuedAt = default(System.DateTime?), Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials = default(Microsoft.IdentityModel.Tokens.SigningCredentials)) => throw null;
public override Microsoft.IdentityModel.Tokens.SecurityToken CreateToken(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor) => throw null;
public JwtSecurityTokenHandler() => throw null;
protected string DecryptToken(System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static System.Collections.Generic.ISet<string> DefaultInboundClaimFilter;
public static System.Collections.Generic.IDictionary<string, string> DefaultInboundClaimTypeMap;
public static bool DefaultMapInboundClaims;
public static System.Collections.Generic.IDictionary<string, string> DefaultOutboundAlgorithmMap;
public static System.Collections.Generic.IDictionary<string, string> DefaultOutboundClaimTypeMap;
public System.Collections.Generic.ISet<string> InboundClaimFilter { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> InboundClaimTypeMap { get => throw null; set { } }
public static string JsonClaimTypeProperty { get => throw null; set { } }
public bool MapInboundClaims { get => throw null; set { } }
public System.Collections.Generic.IDictionary<string, string> OutboundAlgorithmMap { get => throw null; }
public System.Collections.Generic.IDictionary<string, string> OutboundClaimTypeMap { get => throw null; set { } }
public System.IdentityModel.Tokens.Jwt.JwtSecurityToken ReadJwtToken(string token) => throw null;
public override Microsoft.IdentityModel.Tokens.SecurityToken ReadToken(string token) => throw null;
public override Microsoft.IdentityModel.Tokens.SecurityToken ReadToken(System.Xml.XmlReader reader, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
protected virtual Microsoft.IdentityModel.Tokens.SecurityKey ResolveIssuerSigningKey(string token, System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
protected virtual Microsoft.IdentityModel.Tokens.SecurityKey ResolveTokenDecryptionKey(string token, System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public static string ShortClaimTypeProperty { get => throw null; set { } }
public override System.Type TokenType { get => throw null; }
protected virtual void ValidateAudience(System.Collections.Generic.IEnumerable<string> audiences, System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
protected virtual string ValidateIssuer(string issuer, System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
protected virtual void ValidateIssuerSecurityKey(Microsoft.IdentityModel.Tokens.SecurityKey key, System.IdentityModel.Tokens.Jwt.JwtSecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
protected virtual void ValidateLifetime(System.DateTime? notBefore, System.DateTime? expires, System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
protected virtual System.IdentityModel.Tokens.Jwt.JwtSecurityToken ValidateSignature(string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public override System.Security.Claims.ClaimsPrincipal ValidateToken(string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, out Microsoft.IdentityModel.Tokens.SecurityToken validatedToken) => throw null;
public override System.Threading.Tasks.Task<Microsoft.IdentityModel.Tokens.TokenValidationResult> ValidateTokenAsync(string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
protected System.Security.Claims.ClaimsPrincipal ValidateTokenPayload(System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
protected virtual void ValidateTokenReplay(System.DateTime? expires, string securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) => throw null;
public override string WriteToken(Microsoft.IdentityModel.Tokens.SecurityToken token) => throw null;
public override void WriteToken(System.Xml.XmlWriter writer, Microsoft.IdentityModel.Tokens.SecurityToken token) => throw null;
}
}
}
}
}

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../Microsoft.IdentityModel.JsonWebTokens/7.5.0/Microsoft.IdentityModel.JsonWebTokens.csproj" />
<ProjectReference Include="../../Microsoft.IdentityModel.Tokens/7.5.0/Microsoft.IdentityModel.Tokens.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,27 @@
// This file contains auto-generated code.
// Generated from `System.Memory.Data, Version=1.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51`.
namespace System
{
public class BinaryData
{
public BinaryData(byte[] data) => throw null;
public BinaryData(object jsonSerializable, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Type type = default(System.Type)) => throw null;
public BinaryData(System.ReadOnlyMemory<byte> data) => throw null;
public BinaryData(string data) => throw null;
public override bool Equals(object obj) => throw null;
public static System.BinaryData FromBytes(System.ReadOnlyMemory<byte> data) => throw null;
public static System.BinaryData FromBytes(byte[] data) => throw null;
public static System.BinaryData FromObjectAsJson<T>(T jsonSerializable, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null;
public static System.BinaryData FromStream(System.IO.Stream stream) => throw null;
public static System.Threading.Tasks.Task<System.BinaryData> FromStreamAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;
public static System.BinaryData FromString(string data) => throw null;
public override int GetHashCode() => throw null;
public static implicit operator System.ReadOnlyMemory<byte>(System.BinaryData data) => throw null;
public static implicit operator System.ReadOnlySpan<byte>(System.BinaryData data) => throw null;
public byte[] ToArray() => throw null;
public System.ReadOnlyMemory<byte> ToMemory() => throw null;
public T ToObjectFromJson<T>(System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null;
public System.IO.Stream ToStream() => throw null;
public override string ToString() => throw null;
}
}

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../System.Text.Encodings.Web/4.7.2/System.Text.Encodings.Web.csproj" />
<ProjectReference Include="../../System.Text.Json/4.7.2/System.Text.Json.csproj" />
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,503 @@
// This file contains auto-generated code.
// Generated from `System.Security.Cryptography.Pkcs, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`.
namespace System
{
namespace Security
{
namespace Cryptography
{
public sealed class CryptographicAttributeObject
{
public CryptographicAttributeObject(System.Security.Cryptography.Oid oid) => throw null;
public CryptographicAttributeObject(System.Security.Cryptography.Oid oid, System.Security.Cryptography.AsnEncodedDataCollection values) => throw null;
public System.Security.Cryptography.Oid Oid { get => throw null; }
public System.Security.Cryptography.AsnEncodedDataCollection Values { get => throw null; }
}
public sealed class CryptographicAttributeObjectCollection : System.Collections.ICollection, System.Collections.IEnumerable
{
public int Add(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null;
public int Add(System.Security.Cryptography.CryptographicAttributeObject attribute) => throw null;
void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null;
public void CopyTo(System.Security.Cryptography.CryptographicAttributeObject[] array, int index) => throw null;
public int Count { get => throw null; }
public CryptographicAttributeObjectCollection() => throw null;
public CryptographicAttributeObjectCollection(System.Security.Cryptography.CryptographicAttributeObject attribute) => throw null;
public System.Security.Cryptography.CryptographicAttributeObjectEnumerator GetEnumerator() => throw null;
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;
public bool IsSynchronized { get => throw null; }
public void Remove(System.Security.Cryptography.CryptographicAttributeObject attribute) => throw null;
public object SyncRoot { get => throw null; }
public System.Security.Cryptography.CryptographicAttributeObject this[int index] { get => throw null; }
}
public sealed class CryptographicAttributeObjectEnumerator : System.Collections.IEnumerator
{
public System.Security.Cryptography.CryptographicAttributeObject Current { get => throw null; }
object System.Collections.IEnumerator.Current { get => throw null; }
public bool MoveNext() => throw null;
public void Reset() => throw null;
}
namespace Pkcs
{
public sealed class AlgorithmIdentifier
{
public AlgorithmIdentifier() => throw null;
public AlgorithmIdentifier(System.Security.Cryptography.Oid oid) => throw null;
public AlgorithmIdentifier(System.Security.Cryptography.Oid oid, int keyLength) => throw null;
public int KeyLength { get => throw null; set { } }
public System.Security.Cryptography.Oid Oid { get => throw null; set { } }
public byte[] Parameters { get => throw null; set { } }
}
public sealed class CmsRecipient
{
public System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate { get => throw null; }
public CmsRecipient(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
public CmsRecipient(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSAEncryptionPadding rsaEncryptionPadding) => throw null;
public CmsRecipient(System.Security.Cryptography.Pkcs.SubjectIdentifierType recipientIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSAEncryptionPadding rsaEncryptionPadding) => throw null;
public CmsRecipient(System.Security.Cryptography.Pkcs.SubjectIdentifierType recipientIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
public System.Security.Cryptography.Pkcs.SubjectIdentifierType RecipientIdentifierType { get => throw null; }
public System.Security.Cryptography.RSAEncryptionPadding RSAEncryptionPadding { get => throw null; }
}
public sealed class CmsRecipientCollection : System.Collections.ICollection, System.Collections.IEnumerable
{
public int Add(System.Security.Cryptography.Pkcs.CmsRecipient recipient) => throw null;
public void CopyTo(System.Array array, int index) => throw null;
public void CopyTo(System.Security.Cryptography.Pkcs.CmsRecipient[] array, int index) => throw null;
public int Count { get => throw null; }
public CmsRecipientCollection() => throw null;
public CmsRecipientCollection(System.Security.Cryptography.Pkcs.CmsRecipient recipient) => throw null;
public CmsRecipientCollection(System.Security.Cryptography.Pkcs.SubjectIdentifierType recipientIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates) => throw null;
public System.Security.Cryptography.Pkcs.CmsRecipientEnumerator GetEnumerator() => throw null;
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;
public bool IsSynchronized { get => throw null; }
public void Remove(System.Security.Cryptography.Pkcs.CmsRecipient recipient) => throw null;
public object SyncRoot { get => throw null; }
public System.Security.Cryptography.Pkcs.CmsRecipient this[int index] { get => throw null; }
}
public sealed class CmsRecipientEnumerator : System.Collections.IEnumerator
{
public System.Security.Cryptography.Pkcs.CmsRecipient Current { get => throw null; }
object System.Collections.IEnumerator.Current { get => throw null; }
public bool MoveNext() => throw null;
public void Reset() => throw null;
}
public sealed class CmsSigner
{
public System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate { get => throw null; set { } }
public System.Security.Cryptography.X509Certificates.X509Certificate2Collection Certificates { get => throw null; }
public CmsSigner() => throw null;
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType) => throw null;
public CmsSigner(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
public CmsSigner(System.Security.Cryptography.CspParameters parameters) => throw null;
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.AsymmetricAlgorithm privateKey) => throw null;
public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSA privateKey, System.Security.Cryptography.RSASignaturePadding signaturePadding) => throw null;
public System.Security.Cryptography.Oid DigestAlgorithm { get => throw null; set { } }
public System.Security.Cryptography.X509Certificates.X509IncludeOption IncludeOption { get => throw null; set { } }
public System.Security.Cryptography.AsymmetricAlgorithm PrivateKey { get => throw null; set { } }
public System.Security.Cryptography.RSASignaturePadding SignaturePadding { get => throw null; set { } }
public System.Security.Cryptography.CryptographicAttributeObjectCollection SignedAttributes { get => throw null; }
public System.Security.Cryptography.Pkcs.SubjectIdentifierType SignerIdentifierType { get => throw null; set { } }
public System.Security.Cryptography.CryptographicAttributeObjectCollection UnsignedAttributes { get => throw null; }
}
public sealed class ContentInfo
{
public byte[] Content { get => throw null; }
public System.Security.Cryptography.Oid ContentType { get => throw null; }
public ContentInfo(byte[] content) => throw null;
public ContentInfo(System.Security.Cryptography.Oid contentType, byte[] content) => throw null;
public static System.Security.Cryptography.Oid GetContentType(byte[] encodedMessage) => throw null;
public static System.Security.Cryptography.Oid GetContentType(System.ReadOnlySpan<byte> encodedMessage) => throw null;
}
public sealed class EnvelopedCms
{
public System.Security.Cryptography.X509Certificates.X509Certificate2Collection Certificates { get => throw null; }
public System.Security.Cryptography.Pkcs.AlgorithmIdentifier ContentEncryptionAlgorithm { get => throw null; }
public System.Security.Cryptography.Pkcs.ContentInfo ContentInfo { get => throw null; }
public EnvelopedCms() => throw null;
public EnvelopedCms(System.Security.Cryptography.Pkcs.ContentInfo contentInfo) => throw null;
public EnvelopedCms(System.Security.Cryptography.Pkcs.ContentInfo contentInfo, System.Security.Cryptography.Pkcs.AlgorithmIdentifier encryptionAlgorithm) => throw null;
public void Decode(byte[] encodedMessage) => throw null;
public void Decode(System.ReadOnlySpan<byte> encodedMessage) => throw null;
public void Decrypt() => throw null;
public void Decrypt(System.Security.Cryptography.Pkcs.RecipientInfo recipientInfo) => throw null;
public void Decrypt(System.Security.Cryptography.Pkcs.RecipientInfo recipientInfo, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraStore) => throw null;
public void Decrypt(System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraStore) => throw null;
public void Decrypt(System.Security.Cryptography.Pkcs.RecipientInfo recipientInfo, System.Security.Cryptography.AsymmetricAlgorithm privateKey) => throw null;
public byte[] Encode() => throw null;
public void Encrypt(System.Security.Cryptography.Pkcs.CmsRecipient recipient) => throw null;
public void Encrypt(System.Security.Cryptography.Pkcs.CmsRecipientCollection recipients) => throw null;
public System.Security.Cryptography.Pkcs.RecipientInfoCollection RecipientInfos { get => throw null; }
public System.Security.Cryptography.CryptographicAttributeObjectCollection UnprotectedAttributes { get => throw null; }
public int Version { get => throw null; }
}
public sealed class KeyAgreeRecipientInfo : System.Security.Cryptography.Pkcs.RecipientInfo
{
public System.DateTime Date { get => throw null; }
public override byte[] EncryptedKey { get => throw null; }
public override System.Security.Cryptography.Pkcs.AlgorithmIdentifier KeyEncryptionAlgorithm { get => throw null; }
public System.Security.Cryptography.Pkcs.SubjectIdentifierOrKey OriginatorIdentifierOrKey { get => throw null; }
public System.Security.Cryptography.CryptographicAttributeObject OtherKeyAttribute { get => throw null; }
public override System.Security.Cryptography.Pkcs.SubjectIdentifier RecipientIdentifier { get => throw null; }
public override int Version { get => throw null; }
}
public sealed class KeyTransRecipientInfo : System.Security.Cryptography.Pkcs.RecipientInfo
{
public override byte[] EncryptedKey { get => throw null; }
public override System.Security.Cryptography.Pkcs.AlgorithmIdentifier KeyEncryptionAlgorithm { get => throw null; }
public override System.Security.Cryptography.Pkcs.SubjectIdentifier RecipientIdentifier { get => throw null; }
public override int Version { get => throw null; }
}
public sealed class Pkcs12Builder
{
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, string password, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public void AddSafeContentsUnencrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) => throw null;
public Pkcs12Builder() => throw null;
public byte[] Encode() => throw null;
public bool IsSealed { get => throw null; }
public void SealWithMac(string password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) => throw null;
public void SealWithMac(System.ReadOnlySpan<char> password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) => throw null;
public void SealWithoutIntegrity() => throw null;
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) => throw null;
}
public sealed class Pkcs12CertBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12CertBag(System.Security.Cryptography.Oid certificateType, System.ReadOnlyMemory<byte> encodedCertificate) : base(default(string), default(System.ReadOnlyMemory<byte>), default(bool)) => throw null;
public System.ReadOnlyMemory<byte> EncodedCertificate { get => throw null; }
public System.Security.Cryptography.X509Certificates.X509Certificate2 GetCertificate() => throw null;
public System.Security.Cryptography.Oid GetCertificateType() => throw null;
public bool IsX509Certificate { get => throw null; }
}
public enum Pkcs12ConfidentialityMode
{
Unknown = 0,
None = 1,
Password = 2,
PublicKey = 3,
}
public sealed class Pkcs12Info
{
public System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Cryptography.Pkcs.Pkcs12SafeContents> AuthenticatedSafe { get => throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs12Info Decode(System.ReadOnlyMemory<byte> encodedBytes, out int bytesConsumed, bool skipCopy = default(bool)) => throw null;
public System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode IntegrityMode { get => throw null; }
public bool VerifyMac(string password) => throw null;
public bool VerifyMac(System.ReadOnlySpan<char> password) => throw null;
}
public enum Pkcs12IntegrityMode
{
Unknown = 0,
None = 1,
Password = 2,
PublicKey = 3,
}
public sealed class Pkcs12KeyBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12KeyBag(System.ReadOnlyMemory<byte> pkcs8PrivateKey, bool skipCopy = default(bool)) : base(default(string), default(System.ReadOnlyMemory<byte>), default(bool)) => throw null;
public System.ReadOnlyMemory<byte> Pkcs8PrivateKey { get => throw null; }
}
public abstract class Pkcs12SafeBag
{
public System.Security.Cryptography.CryptographicAttributeObjectCollection Attributes { get => throw null; }
protected Pkcs12SafeBag(string bagIdValue, System.ReadOnlyMemory<byte> encodedBagValue, bool skipCopy = default(bool)) => throw null;
public byte[] Encode() => throw null;
public System.ReadOnlyMemory<byte> EncodedBagValue { get => throw null; }
public System.Security.Cryptography.Oid GetBagId() => throw null;
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) => throw null;
}
public sealed class Pkcs12SafeContents
{
public System.Security.Cryptography.Pkcs.Pkcs12CertBag AddCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
public System.Security.Cryptography.Pkcs.Pkcs12KeyBag AddKeyUnencrypted(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null;
public System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag AddNestedContents(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) => throw null;
public void AddSafeBag(System.Security.Cryptography.Pkcs.Pkcs12SafeBag safeBag) => throw null;
public System.Security.Cryptography.Pkcs.Pkcs12SecretBag AddSecret(System.Security.Cryptography.Oid secretType, System.ReadOnlyMemory<byte> secretValue) => throw null;
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, string password, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode ConfidentialityMode { get => throw null; }
public Pkcs12SafeContents() => throw null;
public void Decrypt(byte[] passwordBytes) => throw null;
public void Decrypt(System.ReadOnlySpan<byte> passwordBytes) => throw null;
public void Decrypt(string password) => throw null;
public void Decrypt(System.ReadOnlySpan<char> password) => throw null;
public System.Collections.Generic.IEnumerable<System.Security.Cryptography.Pkcs.Pkcs12SafeBag> GetBags() => throw null;
public bool IsReadOnly { get => throw null; }
}
public sealed class Pkcs12SafeContentsBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public System.Security.Cryptography.Pkcs.Pkcs12SafeContents SafeContents { get => throw null; }
internal Pkcs12SafeContentsBag() : base(default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
}
public sealed class Pkcs12SecretBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public System.Security.Cryptography.Oid GetSecretType() => throw null;
public System.ReadOnlyMemory<byte> SecretValue { get => throw null; }
internal Pkcs12SecretBag() : base(default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
}
public sealed class Pkcs12ShroudedKeyBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12ShroudedKeyBag(System.ReadOnlyMemory<byte> encryptedPkcs8PrivateKey, bool skipCopy = default(bool)) : base(default(string), default(System.ReadOnlyMemory<byte>), default(bool)) => throw null;
public System.ReadOnlyMemory<byte> EncryptedPkcs8PrivateKey { get => throw null; }
}
public sealed class Pkcs8PrivateKeyInfo
{
public System.Security.Cryptography.Oid AlgorithmId { get => throw null; }
public System.ReadOnlyMemory<byte>? AlgorithmParameters { get => throw null; }
public System.Security.Cryptography.CryptographicAttributeObjectCollection Attributes { get => throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo Create(System.Security.Cryptography.AsymmetricAlgorithm privateKey) => throw null;
public Pkcs8PrivateKeyInfo(System.Security.Cryptography.Oid algorithmId, System.ReadOnlyMemory<byte>? algorithmParameters, System.ReadOnlyMemory<byte> privateKey, bool skipCopies = default(bool)) => throw null;
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo Decode(System.ReadOnlyMemory<byte> source, out int bytesRead, bool skipCopy = default(bool)) => throw null;
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo DecryptAndDecode(System.ReadOnlySpan<char> password, System.ReadOnlyMemory<byte> source, out int bytesRead) => throw null;
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo DecryptAndDecode(System.ReadOnlySpan<byte> passwordBytes, System.ReadOnlyMemory<byte> source, out int bytesRead) => throw null;
public byte[] Encode() => throw null;
public byte[] Encrypt(System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public byte[] Encrypt(System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) => throw null;
public System.ReadOnlyMemory<byte> PrivateKeyBytes { get => throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) => throw null;
public bool TryEncrypt(System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) => throw null;
public bool TryEncrypt(System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) => throw null;
}
public class Pkcs9AttributeObject : System.Security.Cryptography.AsnEncodedData
{
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null;
public Pkcs9AttributeObject() => throw null;
public Pkcs9AttributeObject(string oid, byte[] encodedData) => throw null;
public Pkcs9AttributeObject(System.Security.Cryptography.Oid oid, byte[] encodedData) => throw null;
public Pkcs9AttributeObject(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null;
public System.Security.Cryptography.Oid Oid { get => throw null; }
}
public sealed class Pkcs9ContentType : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public System.Security.Cryptography.Oid ContentType { get => throw null; }
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null;
public Pkcs9ContentType() => throw null;
}
public sealed class Pkcs9DocumentDescription : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null;
public Pkcs9DocumentDescription() => throw null;
public Pkcs9DocumentDescription(string documentDescription) => throw null;
public Pkcs9DocumentDescription(byte[] encodedDocumentDescription) => throw null;
public string DocumentDescription { get => throw null; }
}
public sealed class Pkcs9DocumentName : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null;
public Pkcs9DocumentName() => throw null;
public Pkcs9DocumentName(string documentName) => throw null;
public Pkcs9DocumentName(byte[] encodedDocumentName) => throw null;
public string DocumentName { get => throw null; }
}
public sealed class Pkcs9LocalKeyId : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null;
public Pkcs9LocalKeyId() => throw null;
public Pkcs9LocalKeyId(byte[] keyId) => throw null;
public Pkcs9LocalKeyId(System.ReadOnlySpan<byte> keyId) => throw null;
public System.ReadOnlyMemory<byte> KeyId { get => throw null; }
}
public sealed class Pkcs9MessageDigest : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null;
public Pkcs9MessageDigest() => throw null;
public byte[] MessageDigest { get => throw null; }
}
public sealed class Pkcs9SigningTime : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null;
public Pkcs9SigningTime() => throw null;
public Pkcs9SigningTime(System.DateTime signingTime) => throw null;
public Pkcs9SigningTime(byte[] encodedSigningTime) => throw null;
public System.DateTime SigningTime { get => throw null; }
}
public sealed class PublicKeyInfo
{
public System.Security.Cryptography.Pkcs.AlgorithmIdentifier Algorithm { get => throw null; }
public byte[] KeyValue { get => throw null; }
}
public abstract class RecipientInfo
{
public abstract byte[] EncryptedKey { get; }
public abstract System.Security.Cryptography.Pkcs.AlgorithmIdentifier KeyEncryptionAlgorithm { get; }
public abstract System.Security.Cryptography.Pkcs.SubjectIdentifier RecipientIdentifier { get; }
public System.Security.Cryptography.Pkcs.RecipientInfoType Type { get => throw null; }
public abstract int Version { get; }
}
public sealed class RecipientInfoCollection : System.Collections.ICollection, System.Collections.IEnumerable
{
public void CopyTo(System.Array array, int index) => throw null;
public void CopyTo(System.Security.Cryptography.Pkcs.RecipientInfo[] array, int index) => throw null;
public int Count { get => throw null; }
public System.Security.Cryptography.Pkcs.RecipientInfoEnumerator GetEnumerator() => throw null;
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;
public bool IsSynchronized { get => throw null; }
public object SyncRoot { get => throw null; }
public System.Security.Cryptography.Pkcs.RecipientInfo this[int index] { get => throw null; }
}
public sealed class RecipientInfoEnumerator : System.Collections.IEnumerator
{
public System.Security.Cryptography.Pkcs.RecipientInfo Current { get => throw null; }
object System.Collections.IEnumerator.Current { get => throw null; }
public bool MoveNext() => throw null;
public void Reset() => throw null;
}
public enum RecipientInfoType
{
Unknown = 0,
KeyTransport = 1,
KeyAgreement = 2,
}
public sealed class Rfc3161TimestampRequest
{
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromData(System.ReadOnlySpan<byte> data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = default(System.Security.Cryptography.Oid), System.ReadOnlyMemory<byte>? nonce = default(System.ReadOnlyMemory<byte>?), bool requestSignerCertificates = default(bool), System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = default(System.Security.Cryptography.X509Certificates.X509ExtensionCollection)) => throw null;
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = default(System.Security.Cryptography.Oid), System.ReadOnlyMemory<byte>? nonce = default(System.ReadOnlyMemory<byte>?), bool requestSignerCertificates = default(bool), System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = default(System.Security.Cryptography.X509Certificates.X509ExtensionCollection)) => throw null;
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, System.Security.Cryptography.Oid requestedPolicyId = default(System.Security.Cryptography.Oid), System.ReadOnlyMemory<byte>? nonce = default(System.ReadOnlyMemory<byte>?), bool requestSignerCertificates = default(bool), System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = default(System.Security.Cryptography.X509Certificates.X509ExtensionCollection)) => throw null;
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = default(System.Security.Cryptography.Oid), System.ReadOnlyMemory<byte>? nonce = default(System.ReadOnlyMemory<byte>?), bool requestSignerCertificates = default(bool), System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = default(System.Security.Cryptography.X509Certificates.X509ExtensionCollection)) => throw null;
public byte[] Encode() => throw null;
public System.Security.Cryptography.X509Certificates.X509ExtensionCollection GetExtensions() => throw null;
public System.ReadOnlyMemory<byte> GetMessageHash() => throw null;
public System.ReadOnlyMemory<byte>? GetNonce() => throw null;
public bool HasExtensions { get => throw null; }
public System.Security.Cryptography.Oid HashAlgorithmId { get => throw null; }
public System.Security.Cryptography.Pkcs.Rfc3161TimestampToken ProcessResponse(System.ReadOnlyMemory<byte> responseBytes, out int bytesConsumed) => throw null;
public System.Security.Cryptography.Oid RequestedPolicyId { get => throw null; }
public bool RequestSignerCertificate { get => throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest request, out int bytesConsumed) => throw null;
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) => throw null;
public int Version { get => throw null; }
}
public sealed class Rfc3161TimestampToken
{
public System.Security.Cryptography.Pkcs.SignedCms AsSignedCms() => throw null;
public System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo TokenInfo { get => throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampToken token, out int bytesConsumed) => throw null;
public bool VerifySignatureForData(System.ReadOnlySpan<byte> data, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = default(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)) => throw null;
public bool VerifySignatureForHash(System.ReadOnlySpan<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = default(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)) => throw null;
public bool VerifySignatureForHash(System.ReadOnlySpan<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = default(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)) => throw null;
public bool VerifySignatureForSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = default(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)) => throw null;
}
public sealed class Rfc3161TimestampTokenInfo
{
public long? AccuracyInMicroseconds { get => throw null; }
public Rfc3161TimestampTokenInfo(System.Security.Cryptography.Oid policyId, System.Security.Cryptography.Oid hashAlgorithmId, System.ReadOnlyMemory<byte> messageHash, System.ReadOnlyMemory<byte> serialNumber, System.DateTimeOffset timestamp, long? accuracyInMicroseconds = default(long?), bool isOrdering = default(bool), System.ReadOnlyMemory<byte>? nonce = default(System.ReadOnlyMemory<byte>?), System.ReadOnlyMemory<byte>? timestampAuthorityName = default(System.ReadOnlyMemory<byte>?), System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = default(System.Security.Cryptography.X509Certificates.X509ExtensionCollection)) => throw null;
public byte[] Encode() => throw null;
public System.Security.Cryptography.X509Certificates.X509ExtensionCollection GetExtensions() => throw null;
public System.ReadOnlyMemory<byte> GetMessageHash() => throw null;
public System.ReadOnlyMemory<byte>? GetNonce() => throw null;
public System.ReadOnlyMemory<byte> GetSerialNumber() => throw null;
public System.ReadOnlyMemory<byte>? GetTimestampAuthorityName() => throw null;
public bool HasExtensions { get => throw null; }
public System.Security.Cryptography.Oid HashAlgorithmId { get => throw null; }
public bool IsOrdering { get => throw null; }
public System.Security.Cryptography.Oid PolicyId { get => throw null; }
public System.DateTimeOffset Timestamp { get => throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo timestampTokenInfo, out int bytesConsumed) => throw null;
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) => throw null;
public int Version { get => throw null; }
}
public sealed class SignedCms
{
public void AddCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
public System.Security.Cryptography.X509Certificates.X509Certificate2Collection Certificates { get => throw null; }
public void CheckHash() => throw null;
public void CheckSignature(bool verifySignatureOnly) => throw null;
public void CheckSignature(System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraStore, bool verifySignatureOnly) => throw null;
public void ComputeSignature() => throw null;
public void ComputeSignature(System.Security.Cryptography.Pkcs.CmsSigner signer) => throw null;
public void ComputeSignature(System.Security.Cryptography.Pkcs.CmsSigner signer, bool silent) => throw null;
public System.Security.Cryptography.Pkcs.ContentInfo ContentInfo { get => throw null; }
public SignedCms(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.Pkcs.ContentInfo contentInfo, bool detached) => throw null;
public SignedCms() => throw null;
public SignedCms(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType) => throw null;
public SignedCms(System.Security.Cryptography.Pkcs.ContentInfo contentInfo) => throw null;
public SignedCms(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.Pkcs.ContentInfo contentInfo) => throw null;
public SignedCms(System.Security.Cryptography.Pkcs.ContentInfo contentInfo, bool detached) => throw null;
public void Decode(byte[] encodedMessage) => throw null;
public void Decode(System.ReadOnlySpan<byte> encodedMessage) => throw null;
public bool Detached { get => throw null; }
public byte[] Encode() => throw null;
public void RemoveCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
public void RemoveSignature(int index) => throw null;
public void RemoveSignature(System.Security.Cryptography.Pkcs.SignerInfo signerInfo) => throw null;
public System.Security.Cryptography.Pkcs.SignerInfoCollection SignerInfos { get => throw null; }
public int Version { get => throw null; }
}
public sealed class SignerInfo
{
public void AddUnsignedAttribute(System.Security.Cryptography.AsnEncodedData unsignedAttribute) => throw null;
public System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate { get => throw null; }
public void CheckHash() => throw null;
public void CheckSignature(bool verifySignatureOnly) => throw null;
public void CheckSignature(System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraStore, bool verifySignatureOnly) => throw null;
public void ComputeCounterSignature() => throw null;
public void ComputeCounterSignature(System.Security.Cryptography.Pkcs.CmsSigner signer) => throw null;
public System.Security.Cryptography.Pkcs.SignerInfoCollection CounterSignerInfos { get => throw null; }
public System.Security.Cryptography.Oid DigestAlgorithm { get => throw null; }
public byte[] GetSignature() => throw null;
public void RemoveCounterSignature(int index) => throw null;
public void RemoveCounterSignature(System.Security.Cryptography.Pkcs.SignerInfo counterSignerInfo) => throw null;
public void RemoveUnsignedAttribute(System.Security.Cryptography.AsnEncodedData unsignedAttribute) => throw null;
public System.Security.Cryptography.Oid SignatureAlgorithm { get => throw null; }
public System.Security.Cryptography.CryptographicAttributeObjectCollection SignedAttributes { get => throw null; }
public System.Security.Cryptography.Pkcs.SubjectIdentifier SignerIdentifier { get => throw null; }
public System.Security.Cryptography.CryptographicAttributeObjectCollection UnsignedAttributes { get => throw null; }
public int Version { get => throw null; }
}
public sealed class SignerInfoCollection : System.Collections.ICollection, System.Collections.IEnumerable
{
public void CopyTo(System.Array array, int index) => throw null;
public void CopyTo(System.Security.Cryptography.Pkcs.SignerInfo[] array, int index) => throw null;
public int Count { get => throw null; }
public System.Security.Cryptography.Pkcs.SignerInfoEnumerator GetEnumerator() => throw null;
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;
public bool IsSynchronized { get => throw null; }
public object SyncRoot { get => throw null; }
public System.Security.Cryptography.Pkcs.SignerInfo this[int index] { get => throw null; }
}
public sealed class SignerInfoEnumerator : System.Collections.IEnumerator
{
public System.Security.Cryptography.Pkcs.SignerInfo Current { get => throw null; }
object System.Collections.IEnumerator.Current { get => throw null; }
public bool MoveNext() => throw null;
public void Reset() => throw null;
}
public sealed class SubjectIdentifier
{
public bool MatchesCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null;
public System.Security.Cryptography.Pkcs.SubjectIdentifierType Type { get => throw null; }
public object Value { get => throw null; }
}
public sealed class SubjectIdentifierOrKey
{
public System.Security.Cryptography.Pkcs.SubjectIdentifierOrKeyType Type { get => throw null; }
public object Value { get => throw null; }
}
public enum SubjectIdentifierOrKeyType
{
Unknown = 0,
IssuerAndSerialNumber = 1,
SubjectKeyIdentifier = 2,
PublicKeyInfo = 3,
}
public enum SubjectIdentifierType
{
Unknown = 0,
IssuerAndSerialNumber = 1,
SubjectKeyIdentifier = 2,
NoSignature = 3,
}
}
namespace Xml
{
public struct X509IssuerSerial
{
public string IssuerName { get => throw null; set { } }
public string SerialNumber { get => throw null; set { } }
}
}
}
}
}

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,21 @@
// This file contains auto-generated code.
// Generated from `System.Security.Cryptography.ProtectedData, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`.
namespace System
{
namespace Security
{
namespace Cryptography
{
public enum DataProtectionScope
{
CurrentUser = 0,
LocalMachine = 1,
}
public static class ProtectedData
{
public static byte[] Protect(byte[] userData, byte[] optionalEntropy, System.Security.Cryptography.DataProtectionScope scope) => throw null;
public static byte[] Unprotect(byte[] encryptedData, byte[] optionalEntropy, System.Security.Cryptography.DataProtectionScope scope) => throw null;
}
}
}
}

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More