From 2b9f134e5f41b5b4d0526dfeef247de7e03ad5ea Mon Sep 17 00:00:00 2001
From: stevesensei
Date: Mon, 15 Jun 2026 18:18:16 +0800
Subject: [PATCH] add all
---
.../ses_13621303dffegy9HFswySN0j47.json | 4 +-
.../000_assets/material/M_SquareFrame 1.mat | 4 +-
Assets/FR2_Cache.asset | 4 +-
Assets/Scripts/Online/IchniOnline.asmdef | 4 +-
Assets/Scripts/Online/Logic/AuthService.cs | 2 +-
.../Scripts/Online/Logic/LoginCacheManager.cs | 87 +-
.../Online/Logic/ThirdPartyServiceManager.cs | 9 +
.../Scripts/Online/Models/LoginCacheData.cs | 31 +-
Assets/Scripts/Online/Network/ApiClient.cs | 2 +-
Assets/Scripts/Online/Resources.meta | 3 -
Assets/Scripts/UI/LoginPage/LoginPage.cs | 70 +-
Assets/Scripts/UI/StartPage/StartUIPage.cs | 2 +-
Packages/com.tivadar.best.http/CHANGELOG.md | 28 +
.../com.tivadar.best.http/CHANGELOG.md.meta | 7 +
Packages/com.tivadar.best.http/Editor.meta | 8 +
.../Editor/Profiler.meta | 8 +
.../Editor/Profiler/Memory.meta | 8 +
.../Memory/MemoryStatsProfilerModule.cs | 25 +
.../Memory/MemoryStatsProfilerModule.cs.meta | 11 +
.../Editor/Profiler/Network.meta | 8 +
.../Network/NetworkStatsProfilerModule.cs | 34 +
.../NetworkStatsProfilerModule.cs.meta | 11 +
...m.Tivadar.Best.HTTP.Profiler.Editor.asmdef | 25 +
...adar.Best.HTTP.Profiler.Editor.asmdef.meta | 7 +
Packages/com.tivadar.best.http/LICENSE.md | 1 +
.../com.tivadar.best.http/LICENSE.md.meta | 7 +
Packages/com.tivadar.best.http/README.md | 85 +
Packages/com.tivadar.best.http/README.md.meta | 7 +
Packages/com.tivadar.best.http/Runtime.meta | 8 +
.../Runtime/3rdParty.meta | 8 +
.../Runtime/3rdParty/BouncyCastle.meta | 8 +
.../Runtime/3rdParty/BouncyCastle/License.txt | 7 +
.../3rdParty/BouncyCastle/License.txt.meta | 7 +
.../Runtime/3rdParty/BouncyCastle/asn1.meta | 8 +
.../BouncyCastle/asn1/ASN1Generator.cs | 32 +
.../BouncyCastle/asn1/ASN1Generator.cs.meta | 11 +
.../asn1/ASN1OctetStringParser.cs | 17 +
.../asn1/ASN1OctetStringParser.cs.meta | 11 +
.../BouncyCastle/asn1/ASN1SequenceParser.cs | 12 +
.../asn1/ASN1SequenceParser.cs.meta | 11 +
.../BouncyCastle/asn1/ASN1SetParser.cs | 12 +
.../BouncyCastle/asn1/ASN1SetParser.cs.meta | 11 +
.../BouncyCastle/asn1/ASN1StreamParser.cs | 248 +
.../asn1/ASN1StreamParser.cs.meta | 11 +
.../asn1/ASN1TaggedObjectParser.cs | 39 +
.../asn1/ASN1TaggedObjectParser.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1BitStringParser.cs | 36 +
.../asn1/Asn1BitStringParser.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1Encodable.cs | 80 +
.../BouncyCastle/asn1/Asn1Encodable.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1EncodableVector.cs | 248 +
.../asn1/Asn1EncodableVector.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1Exception.cs | 35 +
.../BouncyCastle/asn1/Asn1Exception.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1GeneralizedTime.cs | 266 +
.../asn1/Asn1GeneralizedTime.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1InputStream.cs | 471 ++
.../BouncyCastle/asn1/Asn1InputStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/Asn1Null.cs | 81 +
.../BouncyCastle/asn1/Asn1Null.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/Asn1Object.cs | 95 +
.../BouncyCastle/asn1/Asn1Object.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1ObjectDescriptor.cs | 125 +
.../asn1/Asn1ObjectDescriptor.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1OctetString.cs | 136 +
.../BouncyCastle/asn1/Asn1OctetString.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1OutputStream.cs | 192 +
.../asn1/Asn1OutputStream.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1ParsingException.cs | 34 +
.../asn1/Asn1ParsingException.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1RelativeOid.cs | 320 +
.../BouncyCastle/asn1/Asn1RelativeOid.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1Sequence.cs | 284 +
.../BouncyCastle/asn1/Asn1Sequence.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/Asn1Set.cs | 331 +
.../BouncyCastle/asn1/Asn1Set.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/Asn1Tag.cs | 35 +
.../BouncyCastle/asn1/Asn1Tag.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1TaggedObject.cs | 409 ++
.../asn1/Asn1TaggedObject.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/Asn1Tags.cs | 53 +
.../BouncyCastle/asn1/Asn1Tags.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/Asn1Type.cs | 33 +
.../BouncyCastle/asn1/Asn1Type.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1UniversalType.cs | 63 +
.../asn1/Asn1UniversalType.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1UniversalTypes.cs | 78 +
.../asn1/Asn1UniversalTypes.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/Asn1UtcTime.cs | 257 +
.../BouncyCastle/asn1/Asn1UtcTime.cs.meta | 11 +
.../BouncyCastle/asn1/Asn1Utilities.cs | 333 +
.../BouncyCastle/asn1/Asn1Utilities.cs.meta | 11 +
.../BouncyCastle/asn1/BERBitString.cs | 142 +
.../BouncyCastle/asn1/BERBitString.cs.meta | 11 +
.../BouncyCastle/asn1/BERGenerator.cs | 110 +
.../BouncyCastle/asn1/BERGenerator.cs.meta | 11 +
.../asn1/BEROctetStringGenerator.cs | 162 +
.../asn1/BEROctetStringGenerator.cs.meta | 11 +
.../BouncyCastle/asn1/BEROctetStringParser.cs | 44 +
.../asn1/BEROctetStringParser.cs.meta | 11 +
.../BouncyCastle/asn1/BERSequenceGenerator.cs | 28 +
.../asn1/BERSequenceGenerator.cs.meta | 11 +
.../BouncyCastle/asn1/BERSequenceParser.cs | 34 +
.../asn1/BERSequenceParser.cs.meta | 11 +
.../BouncyCastle/asn1/BERSetGenerator.cs | 28 +
.../BouncyCastle/asn1/BERSetGenerator.cs.meta | 11 +
.../BouncyCastle/asn1/BERSetParser.cs | 34 +
.../BouncyCastle/asn1/BERSetParser.cs.meta | 11 +
.../asn1/BERTaggedObjectParser.cs | 84 +
.../asn1/BERTaggedObjectParser.cs.meta | 11 +
.../asn1/BerApplicationSpecific.cs | 3 +
.../asn1/BerApplicationSpecific.cs.meta | 11 +
.../asn1/BerApplicationSpecificParser.cs | 2 +
.../asn1/BerApplicationSpecificParser.cs.meta | 11 +
.../BouncyCastle/asn1/BerBitStringParser.cs | 60 +
.../asn1/BerBitStringParser.cs.meta | 11 +
.../BouncyCastle/asn1/BerOctetString.cs | 112 +
.../BouncyCastle/asn1/BerOctetString.cs.meta | 11 +
.../BouncyCastle/asn1/BerOutputStream.cs | 3 +
.../BouncyCastle/asn1/BerOutputStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/BerSequence.cs | 101 +
.../BouncyCastle/asn1/BerSequence.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/BerSet.cs | 73 +
.../3rdParty/BouncyCastle/asn1/BerSet.cs.meta | 11 +
.../BouncyCastle/asn1/BerTaggedObject.cs | 92 +
.../BouncyCastle/asn1/BerTaggedObject.cs.meta | 11 +
.../BouncyCastle/asn1/ConstructedBitStream.cs | 192 +
.../asn1/ConstructedBitStream.cs.meta | 11 +
.../asn1/ConstructedDLEncoding.cs | 39 +
.../asn1/ConstructedDLEncoding.cs.meta | 11 +
.../asn1/ConstructedILEncoding.cs | 39 +
.../asn1/ConstructedILEncoding.cs.meta | 11 +
.../asn1/ConstructedLazyDLEncoding.cs | 37 +
.../asn1/ConstructedLazyDLEncoding.cs.meta | 11 +
.../asn1/ConstructedOctetStream.cs | 169 +
.../asn1/ConstructedOctetStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DERExternal.cs | 274 +
.../BouncyCastle/asn1/DERExternal.cs.meta | 11 +
.../BouncyCastle/asn1/DERExternalParser.cs | 34 +
.../asn1/DERExternalParser.cs.meta | 11 +
.../BouncyCastle/asn1/DERGenerator.cs | 111 +
.../BouncyCastle/asn1/DERGenerator.cs.meta | 11 +
.../BouncyCastle/asn1/DEROctetStringParser.cs | 40 +
.../asn1/DEROctetStringParser.cs.meta | 11 +
.../BouncyCastle/asn1/DERSequenceGenerator.cs | 48 +
.../asn1/DERSequenceGenerator.cs.meta | 11 +
.../BouncyCastle/asn1/DERSequenceParser.cs | 30 +
.../asn1/DERSequenceParser.cs.meta | 11 +
.../BouncyCastle/asn1/DERSetGenerator.cs | 48 +
.../BouncyCastle/asn1/DERSetGenerator.cs.meta | 11 +
.../BouncyCastle/asn1/DERSetParser.cs | 30 +
.../BouncyCastle/asn1/DERSetParser.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DLBitString.cs | 59 +
.../BouncyCastle/asn1/DLBitString.cs.meta | 11 +
.../BouncyCastle/asn1/DLBitStringParser.cs | 69 +
.../asn1/DLBitStringParser.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DLSequence.cs | 95 +
.../BouncyCastle/asn1/DLSequence.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DLSet.cs | 71 +
.../3rdParty/BouncyCastle/asn1/DLSet.cs.meta | 11 +
.../BouncyCastle/asn1/DLTaggedObject.cs | 79 +
.../BouncyCastle/asn1/DLTaggedObject.cs.meta | 11 +
.../BouncyCastle/asn1/DLTaggedObjectParser.cs | 78 +
.../asn1/DLTaggedObjectParser.cs.meta | 11 +
.../asn1/DefiniteLengthInputStream.cs | 142 +
.../asn1/DefiniteLengthInputStream.cs.meta | 11 +
.../asn1/DerApplicationSpecific.cs | 3 +
.../asn1/DerApplicationSpecific.cs.meta | 11 +
.../BouncyCastle/asn1/DerBMPString.cs | 170 +
.../BouncyCastle/asn1/DerBMPString.cs.meta | 11 +
.../BouncyCastle/asn1/DerBitString.cs | 373 ++
.../BouncyCastle/asn1/DerBitString.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DerBoolean.cs | 161 +
.../BouncyCastle/asn1/DerBoolean.cs.meta | 11 +
.../BouncyCastle/asn1/DerEnumerated.cs | 196 +
.../BouncyCastle/asn1/DerEnumerated.cs.meta | 11 +
.../BouncyCastle/asn1/DerGeneralString.cs | 121 +
.../asn1/DerGeneralString.cs.meta | 11 +
.../BouncyCastle/asn1/DerGeneralizedTime.cs | 38 +
.../asn1/DerGeneralizedTime.cs.meta | 11 +
.../BouncyCastle/asn1/DerGraphicString.cs | 128 +
.../asn1/DerGraphicString.cs.meta | 11 +
.../BouncyCastle/asn1/DerIA5String.cs | 168 +
.../BouncyCastle/asn1/DerIA5String.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DerInteger.cs | 283 +
.../BouncyCastle/asn1/DerInteger.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DerNull.cs | 43 +
.../BouncyCastle/asn1/DerNull.cs.meta | 11 +
.../BouncyCastle/asn1/DerNumericString.cs | 197 +
.../asn1/DerNumericString.cs.meta | 11 +
.../BouncyCastle/asn1/DerObjectIdentifier.cs | 314 +
.../asn1/DerObjectIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/DerOctetString.cs | 62 +
.../BouncyCastle/asn1/DerOctetString.cs.meta | 11 +
.../BouncyCastle/asn1/DerOutputStream.cs | 23 +
.../BouncyCastle/asn1/DerOutputStream.cs.meta | 11 +
.../BouncyCastle/asn1/DerPrintableString.cs | 194 +
.../asn1/DerPrintableString.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DerSequence.cs | 94 +
.../BouncyCastle/asn1/DerSequence.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DerSet.cs | 93 +
.../3rdParty/BouncyCastle/asn1/DerSet.cs.meta | 11 +
.../BouncyCastle/asn1/DerStringBase.cs | 26 +
.../BouncyCastle/asn1/DerStringBase.cs.meta | 11 +
.../BouncyCastle/asn1/DerT61String.cs | 136 +
.../BouncyCastle/asn1/DerT61String.cs.meta | 11 +
.../BouncyCastle/asn1/DerTaggedObject.cs | 86 +
.../BouncyCastle/asn1/DerTaggedObject.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/DerUTCTime.cs | 44 +
.../BouncyCastle/asn1/DerUTCTime.cs.meta | 11 +
.../BouncyCastle/asn1/DerUTF8String.cs | 128 +
.../BouncyCastle/asn1/DerUTF8String.cs.meta | 11 +
.../BouncyCastle/asn1/DerUniversalString.cs | 177 +
.../asn1/DerUniversalString.cs.meta | 11 +
.../BouncyCastle/asn1/DerVideotexString.cs | 128 +
.../asn1/DerVideotexString.cs.meta | 11 +
.../BouncyCastle/asn1/DerVisibleString.cs | 136 +
.../asn1/DerVisibleString.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/IAsn1Choice.cs | 21 +
.../BouncyCastle/asn1/IAsn1Choice.cs.meta | 11 +
.../BouncyCastle/asn1/IAsn1Convertible.cs | 11 +
.../asn1/IAsn1Convertible.cs.meta | 11 +
.../BouncyCastle/asn1/IAsn1Encoding.cs | 15 +
.../BouncyCastle/asn1/IAsn1Encoding.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/IAsn1String.cs | 14 +
.../BouncyCastle/asn1/IAsn1String.cs.meta | 11 +
.../asn1/IndefiniteLengthInputStream.cs | 110 +
.../asn1/IndefiniteLengthInputStream.cs.meta | 11 +
.../BouncyCastle/asn1/LazyASN1InputStream.cs | 47 +
.../asn1/LazyASN1InputStream.cs.meta | 11 +
.../BouncyCastle/asn1/LazyDERSequence.cs | 3 +
.../BouncyCastle/asn1/LazyDERSequence.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/LazyDERSet.cs | 3 +
.../BouncyCastle/asn1/LazyDERSet.cs.meta | 11 +
.../BouncyCastle/asn1/LazyDLEnumerator.cs | 69 +
.../asn1/LazyDLEnumerator.cs.meta | 11 +
.../BouncyCastle/asn1/LazyDLSequence.cs | 129 +
.../BouncyCastle/asn1/LazyDLSequence.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/LazyDLSet.cs | 128 +
.../BouncyCastle/asn1/LazyDLSet.cs.meta | 11 +
.../BouncyCastle/asn1/LimitedInputStream.cs | 36 +
.../asn1/LimitedInputStream.cs.meta | 11 +
.../BouncyCastle/asn1/OidTokenizer.cs | 49 +
.../BouncyCastle/asn1/OidTokenizer.cs.meta | 11 +
.../BouncyCastle/asn1/PrimitiveEncoding.cs | 37 +
.../asn1/PrimitiveEncoding.cs.meta | 11 +
.../asn1/PrimitiveEncodingSuffixed.cs | 40 +
.../asn1/PrimitiveEncodingSuffixed.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/anssi.meta | 8 +
.../asn1/anssi/ANSSINamedCurves.cs | 146 +
.../asn1/anssi/ANSSINamedCurves.cs.meta | 11 +
.../asn1/anssi/ANSSIObjectIdentifiers.cs | 17 +
.../asn1/anssi/ANSSIObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/bc.meta | 8 +
.../asn1/bc/BCObjectIdentifiers.cs | 252 +
.../asn1/bc/BCObjectIdentifiers.cs.meta | 11 +
.../BouncyCastle/asn1/bc/LinkedCertificate.cs | 104 +
.../asn1/bc/LinkedCertificate.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/bsi.meta | 8 +
.../asn1/bsi/BsiObjectIdentifiers.cs | 106 +
.../asn1/bsi/BsiObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/cmp.meta | 8 +
.../asn1/cmp/CAKeyUpdAnnContent.cs | 57 +
.../asn1/cmp/CAKeyUpdAnnContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CertAnnContent.cs | 76 +
.../asn1/cmp/CertAnnContent.cs.meta | 11 +
.../asn1/cmp/CertConfirmContent.cs | 48 +
.../asn1/cmp/CertConfirmContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CertOrEncCert.cs | 90 +
.../asn1/cmp/CertOrEncCert.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CertRepMessage.cs | 81 +
.../asn1/cmp/CertRepMessage.cs.meta | 11 +
.../asn1/cmp/CertReqTemplateContent.cs | 71 +
.../asn1/cmp/CertReqTemplateContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CertResponse.cs | 104 +
.../asn1/cmp/CertResponse.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CertStatus.cs | 107 +
.../BouncyCastle/asn1/cmp/CertStatus.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CertifiedKeyPair.cs | 102 +
.../asn1/cmp/CertifiedKeyPair.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/Challenge.cs | 166 +
.../BouncyCastle/asn1/cmp/Challenge.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CmpCertificate.cs | 116 +
.../asn1/cmp/CmpCertificate.cs.meta | 11 +
.../asn1/cmp/CmpObjectIdentifiers.cs | 262 +
.../asn1/cmp/CmpObjectIdentifiers.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CrlAnnContent.cs | 51 +
.../asn1/cmp/CrlAnnContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CrlSource.cs | 76 +
.../BouncyCastle/asn1/cmp/CrlSource.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/CrlStatus.cs | 65 +
.../BouncyCastle/asn1/cmp/CrlStatus.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/DhbmParameter.cs | 60 +
.../asn1/cmp/DhbmParameter.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/ErrorMsgContent.cs | 99 +
.../asn1/cmp/ErrorMsgContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/GenMsgContent.cs | 57 +
.../asn1/cmp/GenMsgContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/GenRepContent.cs | 54 +
.../asn1/cmp/GenRepContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/InfoTypeAndValue.cs | 116 +
.../asn1/cmp/InfoTypeAndValue.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/KeyRecRepContent.cs | 95 +
.../asn1/cmp/KeyRecRepContent.cs.meta | 11 +
.../asn1/cmp/NestedMessageContent.cs | 39 +
.../asn1/cmp/NestedMessageContent.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/cmp/OobCert.cs | 72 +
.../BouncyCastle/asn1/cmp/OobCert.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/OobCertHash.cs | 90 +
.../BouncyCastle/asn1/cmp/OobCertHash.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/cmp/PKIBody.cs | 215 +
.../BouncyCastle/asn1/cmp/PKIBody.cs.meta | 11 +
.../asn1/cmp/PKIConfirmContent.cs | 54 +
.../asn1/cmp/PKIConfirmContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PKIFailureInfo.cs | 100 +
.../asn1/cmp/PKIFailureInfo.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PKIFreeText.cs | 89 +
.../BouncyCastle/asn1/cmp/PKIFreeText.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PKIHeader.cs | 232 +
.../BouncyCastle/asn1/cmp/PKIHeader.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PKIHeaderBuilder.cs | 227 +
.../asn1/cmp/PKIHeaderBuilder.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PKIMessage.cs | 134 +
.../BouncyCastle/asn1/cmp/PKIMessage.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PKIMessages.cs | 58 +
.../BouncyCastle/asn1/cmp/PKIMessages.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PKIStatus.cs | 67 +
.../BouncyCastle/asn1/cmp/PKIStatus.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PKIStatusInfo.cs | 160 +
.../asn1/cmp/PKIStatusInfo.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PbmParameter.cs | 102 +
.../asn1/cmp/PbmParameter.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PollRepContent.cs | 100 +
.../asn1/cmp/PollRepContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/PollReqContent.cs | 134 +
.../asn1/cmp/PollReqContent.cs.meta | 11 +
.../asn1/cmp/PopoDecKeyChallContent.cs | 46 +
.../asn1/cmp/PopoDecKeyChallContent.cs.meta | 11 +
.../asn1/cmp/PopoDecKeyRespContent.cs | 44 +
.../asn1/cmp/PopoDecKeyRespContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/ProtectedPart.cs | 54 +
.../asn1/cmp/ProtectedPart.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/RevAnnContent.cs | 89 +
.../asn1/cmp/RevAnnContent.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/RevDetails.cs | 84 +
.../BouncyCastle/asn1/cmp/RevDetails.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/RevRepContent.cs | 104 +
.../asn1/cmp/RevRepContent.cs.meta | 11 +
.../asn1/cmp/RevRepContentBuilder.cs | 59 +
.../asn1/cmp/RevRepContentBuilder.cs.meta | 11 +
.../BouncyCastle/asn1/cmp/RevReqContent.cs | 58 +
.../asn1/cmp/RevReqContent.cs.meta | 11 +
.../asn1/cmp/RootCaKeyUpdateContent.cs | 95 +
.../asn1/cmp/RootCaKeyUpdateContent.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/cms.meta | 8 +
.../BouncyCastle/asn1/cms/Attribute.cs | 74 +
.../BouncyCastle/asn1/cms/Attribute.cs.meta | 11 +
.../BouncyCastle/asn1/cms/AttributeTable.cs | 224 +
.../asn1/cms/AttributeTable.cs.meta | 11 +
.../BouncyCastle/asn1/cms/Attributes.cs | 59 +
.../BouncyCastle/asn1/cms/Attributes.cs.meta | 11 +
.../asn1/cms/AuthEnvelopedData.cs | 209 +
.../asn1/cms/AuthEnvelopedData.cs.meta | 11 +
.../asn1/cms/AuthEnvelopedDataParser.cs | 155 +
.../asn1/cms/AuthEnvelopedDataParser.cs.meta | 11 +
.../asn1/cms/AuthenticatedData.cs | 255 +
.../asn1/cms/AuthenticatedData.cs.meta | 11 +
.../asn1/cms/AuthenticatedDataParser.cs | 188 +
.../asn1/cms/AuthenticatedDataParser.cs.meta | 11 +
.../BouncyCastle/asn1/cms/CMSAttributes.cs | 18 +
.../asn1/cms/CMSAttributes.cs.meta | 11 +
.../asn1/cms/CMSObjectIdentifiers.cs | 33 +
.../asn1/cms/CMSObjectIdentifiers.cs.meta | 11 +
.../BouncyCastle/asn1/cms/CompressedData.cs | 100 +
.../asn1/cms/CompressedData.cs.meta | 11 +
.../asn1/cms/CompressedDataParser.cs | 51 +
.../asn1/cms/CompressedDataParser.cs.meta | 11 +
.../BouncyCastle/asn1/cms/ContentInfo.cs | 91 +
.../BouncyCastle/asn1/cms/ContentInfo.cs.meta | 11 +
.../asn1/cms/ContentInfoParser.cs | 44 +
.../asn1/cms/ContentInfoParser.cs.meta | 11 +
.../asn1/cms/EncryptedContentInfo.cs | 98 +
.../asn1/cms/EncryptedContentInfo.cs.meta | 11 +
.../asn1/cms/EncryptedContentInfoParser.cs | 50 +
.../cms/EncryptedContentInfoParser.cs.meta | 11 +
.../BouncyCastle/asn1/cms/EncryptedData.cs | 101 +
.../asn1/cms/EncryptedData.cs.meta | 11 +
.../BouncyCastle/asn1/cms/EnvelopedData.cs | 165 +
.../asn1/cms/EnvelopedData.cs.meta | 11 +
.../asn1/cms/EnvelopedDataParser.cs | 113 +
.../asn1/cms/EnvelopedDataParser.cs.meta | 11 +
.../BouncyCastle/asn1/cms/Evidence.cs | 77 +
.../BouncyCastle/asn1/cms/Evidence.cs.meta | 11 +
.../asn1/cms/IssuerAndSerialNumber.cs | 65 +
.../asn1/cms/IssuerAndSerialNumber.cs.meta | 11 +
.../BouncyCastle/asn1/cms/KEKIdentifier.cs | 123 +
.../asn1/cms/KEKIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/cms/KEKRecipientInfo.cs | 110 +
.../asn1/cms/KEKRecipientInfo.cs.meta | 11 +
.../asn1/cms/KeyAgreeRecipientIdentifier.cs | 98 +
.../cms/KeyAgreeRecipientIdentifier.cs.meta | 11 +
.../asn1/cms/KeyAgreeRecipientInfo.cs | 138 +
.../asn1/cms/KeyAgreeRecipientInfo.cs.meta | 11 +
.../asn1/cms/KeyTransRecipientInfo.cs | 103 +
.../asn1/cms/KeyTransRecipientInfo.cs.meta | 11 +
.../BouncyCastle/asn1/cms/MetaData.cs | 98 +
.../BouncyCastle/asn1/cms/MetaData.cs.meta | 11 +
.../asn1/cms/OriginatorIdentifierOrKey.cs | 148 +
.../cms/OriginatorIdentifierOrKey.cs.meta | 11 +
.../BouncyCastle/asn1/cms/OriginatorInfo.cs | 116 +
.../asn1/cms/OriginatorInfo.cs.meta | 11 +
.../asn1/cms/OriginatorPublicKey.cs | 90 +
.../asn1/cms/OriginatorPublicKey.cs.meta | 11 +
.../asn1/cms/OtherKeyAttribute.cs | 74 +
.../asn1/cms/OtherKeyAttribute.cs.meta | 11 +
.../asn1/cms/OtherRecipientInfo.cs | 85 +
.../asn1/cms/OtherRecipientInfo.cs.meta | 11 +
.../asn1/cms/OtherRevocationInfoFormat.cs | 79 +
.../cms/OtherRevocationInfoFormat.cs.meta | 11 +
.../asn1/cms/PasswordRecipientInfo.cs | 131 +
.../asn1/cms/PasswordRecipientInfo.cs.meta | 11 +
.../asn1/cms/RecipientEncryptedKey.cs | 94 +
.../asn1/cms/RecipientEncryptedKey.cs.meta | 11 +
.../asn1/cms/RecipientIdentifier.cs | 93 +
.../asn1/cms/RecipientIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/cms/RecipientInfo.cs | 149 +
.../asn1/cms/RecipientInfo.cs.meta | 11 +
.../asn1/cms/RecipientKeyIdentifier.cs | 141 +
.../asn1/cms/RecipientKeyIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/cms/SCVPReqRes.cs | 75 +
.../BouncyCastle/asn1/cms/SCVPReqRes.cs.meta | 11 +
.../BouncyCastle/asn1/cms/SignedData.cs | 281 +
.../BouncyCastle/asn1/cms/SignedData.cs.meta | 11 +
.../BouncyCastle/asn1/cms/SignedDataParser.cs | 122 +
.../asn1/cms/SignedDataParser.cs.meta | 11 +
.../BouncyCastle/asn1/cms/SignerIdentifier.cs | 93 +
.../asn1/cms/SignerIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/cms/SignerInfo.cs | 174 +
.../BouncyCastle/asn1/cms/SignerInfo.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/cms/Time.cs | 114 +
.../BouncyCastle/asn1/cms/Time.cs.meta | 11 +
.../BouncyCastle/asn1/cms/TimeStampAndCRL.cs | 66 +
.../asn1/cms/TimeStampAndCRL.cs.meta | 11 +
.../asn1/cms/TimeStampTokenEvidence.cs | 69 +
.../asn1/cms/TimeStampTokenEvidence.cs.meta | 11 +
.../BouncyCastle/asn1/cms/TimeStampedData.cs | 99 +
.../asn1/cms/TimeStampedData.cs.meta | 11 +
.../asn1/cms/TimeStampedDataParser.cs | 80 +
.../asn1/cms/TimeStampedDataParser.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/cms/ecc.meta | 8 +
.../asn1/cms/ecc/MQVuserKeyingMaterial.cs | 104 +
.../cms/ecc/MQVuserKeyingMaterial.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/crmf.meta | 8 +
.../asn1/crmf/AttributeTypeAndValue.cs | 72 +
.../asn1/crmf/AttributeTypeAndValue.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/crmf/CertId.cs | 63 +
.../BouncyCastle/asn1/crmf/CertId.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/CertReqMessages.cs | 58 +
.../asn1/crmf/CertReqMessages.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/CertReqMsg.cs | 116 +
.../BouncyCastle/asn1/crmf/CertReqMsg.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/CertRequest.cs | 87 +
.../asn1/crmf/CertRequest.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/CertTemplate.cs | 153 +
.../asn1/crmf/CertTemplate.cs.meta | 11 +
.../asn1/crmf/CertTemplateBuilder.cs | 129 +
.../asn1/crmf/CertTemplateBuilder.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/Controls.cs | 59 +
.../BouncyCastle/asn1/crmf/Controls.cs.meta | 11 +
.../asn1/crmf/CrmfObjectIdentifiers.cs | 27 +
.../asn1/crmf/CrmfObjectIdentifiers.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/EncKeyWithID.cs | 107 +
.../asn1/crmf/EncKeyWithID.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/EncryptedKey.cs | 66 +
.../asn1/crmf/EncryptedKey.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/EncryptedValue.cs | 121 +
.../asn1/crmf/EncryptedValue.cs.meta | 11 +
.../asn1/crmf/OptionalValidity.cs | 72 +
.../asn1/crmf/OptionalValidity.cs.meta | 11 +
.../asn1/crmf/PKIArchiveOptions.cs | 111 +
.../asn1/crmf/PKIArchiveOptions.cs.meta | 11 +
.../asn1/crmf/PKIPublicationInfo.cs | 116 +
.../asn1/crmf/PKIPublicationInfo.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/PKMacValue.cs | 94 +
.../BouncyCastle/asn1/crmf/PKMacValue.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/PopoPrivKey.cs | 88 +
.../asn1/crmf/PopoPrivKey.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/PopoSigningKey.cs | 114 +
.../asn1/crmf/PopoSigningKey.cs.meta | 11 +
.../asn1/crmf/PopoSigningKeyInput.cs | 120 +
.../asn1/crmf/PopoSigningKeyInput.cs.meta | 11 +
.../asn1/crmf/ProofOfPossession.cs | 104 +
.../asn1/crmf/ProofOfPossession.cs.meta | 11 +
.../BouncyCastle/asn1/crmf/SinglePubInfo.cs | 63 +
.../asn1/crmf/SinglePubInfo.cs.meta | 11 +
.../asn1/crmf/SubsequentMessage.cs | 31 +
.../asn1/crmf/SubsequentMessage.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/cryptlib.meta | 8 +
.../cryptlib/CryptlibObjectIdentifiers.cs | 15 +
.../CryptlibObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/cryptopro.meta | 8 +
.../cryptopro/CryptoProObjectIdentifiers.cs | 61 +
.../CryptoProObjectIdentifiers.cs.meta | 11 +
.../asn1/cryptopro/ECGOST3410NamedCurves.cs | 399 ++
.../cryptopro/ECGOST3410NamedCurves.cs.meta | 11 +
.../cryptopro/ECGOST3410ParamSetParameters.cs | 85 +
.../ECGOST3410ParamSetParameters.cs.meta | 11 +
.../asn1/cryptopro/GOST28147Parameters.cs | 58 +
.../cryptopro/GOST28147Parameters.cs.meta | 11 +
.../asn1/cryptopro/GOST3410NamedParameters.cs | 112 +
.../cryptopro/GOST3410NamedParameters.cs.meta | 11 +
.../cryptopro/GOST3410ParamSetParameters.cs | 83 +
.../GOST3410ParamSetParameters.cs.meta | 11 +
.../GOST3410PublicKeyAlgParameters.cs | 84 +
.../GOST3410PublicKeyAlgParameters.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/eac.meta | 8 +
.../asn1/eac/EACObjectIdentifiers.cs | 54 +
.../asn1/eac/EACObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/edec.meta | 8 +
.../asn1/edec/EdECObjectIdentifiers.cs | 21 +
.../asn1/edec/EdECObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/esf.meta | 8 +
.../asn1/esf/CertificateValues.cs | 87 +
.../asn1/esf/CertificateValues.cs.meta | 11 +
.../asn1/esf/CommitmentTypeIdentifier.cs | 21 +
.../asn1/esf/CommitmentTypeIdentifier.cs.meta | 11 +
.../asn1/esf/CommitmentTypeIndication.cs | 94 +
.../asn1/esf/CommitmentTypeIndication.cs.meta | 11 +
.../asn1/esf/CommitmentTypeQualifier.cs | 117 +
.../asn1/esf/CommitmentTypeQualifier.cs.meta | 11 +
.../asn1/esf/CompleteCertificateRefs.cs | 86 +
.../asn1/esf/CompleteCertificateRefs.cs.meta | 11 +
.../asn1/esf/CompleteRevocationRefs.cs | 86 +
.../asn1/esf/CompleteRevocationRefs.cs.meta | 11 +
.../BouncyCastle/asn1/esf/CrlIdentifier.cs | 121 +
.../asn1/esf/CrlIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/esf/CrlListID.cs | 91 +
.../BouncyCastle/asn1/esf/CrlListID.cs.meta | 11 +
.../BouncyCastle/asn1/esf/CrlOcspRef.cs | 117 +
.../BouncyCastle/asn1/esf/CrlOcspRef.cs.meta | 11 +
.../BouncyCastle/asn1/esf/CrlValidatedID.cs | 95 +
.../asn1/esf/CrlValidatedID.cs.meta | 11 +
.../BouncyCastle/asn1/esf/ESFAttributes.cs | 29 +
.../asn1/esf/ESFAttributes.cs.meta | 11 +
.../BouncyCastle/asn1/esf/OcspIdentifier.cs | 91 +
.../asn1/esf/OcspIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/esf/OcspListID.cs | 90 +
.../BouncyCastle/asn1/esf/OcspListID.cs.meta | 11 +
.../BouncyCastle/asn1/esf/OcspResponsesID.cs | 98 +
.../asn1/esf/OcspResponsesID.cs.meta | 11 +
.../BouncyCastle/asn1/esf/OtherCertID.cs | 98 +
.../BouncyCastle/asn1/esf/OtherCertID.cs.meta | 11 +
.../BouncyCastle/asn1/esf/OtherHash.cs | 92 +
.../BouncyCastle/asn1/esf/OtherHash.cs.meta | 11 +
.../asn1/esf/OtherHashAlgAndValue.cs | 99 +
.../asn1/esf/OtherHashAlgAndValue.cs.meta | 11 +
.../BouncyCastle/asn1/esf/OtherRevRefs.cs | 84 +
.../asn1/esf/OtherRevRefs.cs.meta | 11 +
.../BouncyCastle/asn1/esf/OtherRevVals.cs | 84 +
.../asn1/esf/OtherRevVals.cs.meta | 11 +
.../asn1/esf/OtherSigningCertificate.cs | 132 +
.../asn1/esf/OtherSigningCertificate.cs.meta | 11 +
.../BouncyCastle/asn1/esf/RevocationValues.cs | 154 +
.../asn1/esf/RevocationValues.cs.meta | 11 +
.../asn1/esf/SigPolicyQualifierInfo.cs | 77 +
.../asn1/esf/SigPolicyQualifierInfo.cs.meta | 11 +
.../asn1/esf/SignaturePolicyId.cs | 146 +
.../asn1/esf/SignaturePolicyId.cs.meta | 11 +
.../asn1/esf/SignaturePolicyIdentifier.cs | 70 +
.../esf/SignaturePolicyIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/esf/SignerAttribute.cs | 101 +
.../asn1/esf/SignerAttribute.cs.meta | 11 +
.../BouncyCastle/asn1/esf/SignerLocation.cs | 146 +
.../asn1/esf/SignerLocation.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/ess.meta | 8 +
.../BouncyCastle/asn1/ess/ContentHints.cs | 92 +
.../asn1/ess/ContentHints.cs.meta | 11 +
.../asn1/ess/ContentIdentifier.cs | 71 +
.../asn1/ess/ContentIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/ess/ESSCertID.cs | 93 +
.../BouncyCastle/asn1/ess/ESSCertID.cs.meta | 11 +
.../BouncyCastle/asn1/ess/ESSCertIDv2.cs | 145 +
.../BouncyCastle/asn1/ess/ESSCertIDv2.cs.meta | 11 +
.../asn1/ess/SigningCertificate.cs | 108 +
.../asn1/ess/SigningCertificate.cs.meta | 11 +
.../asn1/ess/SigningCertificateV2.cs | 112 +
.../asn1/ess/SigningCertificateV2.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/gm.meta | 8 +
.../BouncyCastle/asn1/gm/GMNamedCurves.cs | 177 +
.../asn1/gm/GMNamedCurves.cs.meta | 11 +
.../asn1/gm/GMObjectIdentifiers.cs | 89 +
.../asn1/gm/GMObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/gnu.meta | 8 +
.../asn1/gnu/GNUObjectIdentifiers.cs | 40 +
.../asn1/gnu/GNUObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/iana.meta | 8 +
.../asn1/iana/IANAObjectIdentifiers.cs | 22 +
.../asn1/iana/IANAObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/icao.meta | 8 +
.../BouncyCastle/asn1/icao/CscaMasterList.cs | 87 +
.../asn1/icao/CscaMasterList.cs.meta | 11 +
.../BouncyCastle/asn1/icao/DataGroupHash.cs | 85 +
.../asn1/icao/DataGroupHash.cs.meta | 11 +
.../asn1/icao/ICAOObjectIdentifiers.cs | 38 +
.../asn1/icao/ICAOObjectIdentifiers.cs.meta | 11 +
.../asn1/icao/LDSSecurityObject.cs | 140 +
.../asn1/icao/LDSSecurityObject.cs.meta | 11 +
.../BouncyCastle/asn1/icao/LDSVersionInfo.cs | 65 +
.../asn1/icao/LDSVersionInfo.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/isismtt.meta | 8 +
.../asn1/isismtt/ISISMTTObjectIdentifiers.cs | 181 +
.../isismtt/ISISMTTObjectIdentifiers.cs.meta | 11 +
.../BouncyCastle/asn1/isismtt/ocsp.meta | 8 +
.../asn1/isismtt/ocsp/CertHash.cs | 126 +
.../asn1/isismtt/ocsp/CertHash.cs.meta | 11 +
.../asn1/isismtt/ocsp/RequestedCertificate.cs | 192 +
.../isismtt/ocsp/RequestedCertificate.cs.meta | 11 +
.../BouncyCastle/asn1/isismtt/x509.meta | 8 +
.../x509/AdditionalInformationSyntax.cs | 75 +
.../x509/AdditionalInformationSyntax.cs.meta | 11 +
.../asn1/isismtt/x509/AdmissionSyntax.cs | 279 +
.../asn1/isismtt/x509/AdmissionSyntax.cs.meta | 11 +
.../asn1/isismtt/x509/Admissions.cs | 174 +
.../asn1/isismtt/x509/Admissions.cs.meta | 11 +
.../isismtt/x509/DeclarationOfMajority.cs | 176 +
.../x509/DeclarationOfMajority.cs.meta | 11 +
.../asn1/isismtt/x509/MonetaryLimit.cs | 126 +
.../asn1/isismtt/x509/MonetaryLimit.cs.meta | 11 +
.../asn1/isismtt/x509/NamingAuthority.cs | 206 +
.../asn1/isismtt/x509/NamingAuthority.cs.meta | 11 +
.../asn1/isismtt/x509/ProcurationSyntax.cs | 230 +
.../isismtt/x509/ProcurationSyntax.cs.meta | 11 +
.../asn1/isismtt/x509/ProfessionInfo.cs | 376 ++
.../asn1/isismtt/x509/ProfessionInfo.cs.meta | 11 +
.../asn1/isismtt/x509/Restriction.cs | 83 +
.../asn1/isismtt/x509/Restriction.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/kisa.meta | 8 +
.../asn1/kisa/KISAObjectIdentifiers.cs | 12 +
.../asn1/kisa/KISAObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/microsoft.meta | 8 +
.../microsoft/MicrosoftObjectIdentifiers.cs | 23 +
.../MicrosoftObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/misc.meta | 8 +
.../asn1/misc/CAST5CBCParameters.cs | 78 +
.../asn1/misc/CAST5CBCParameters.cs.meta | 11 +
.../BouncyCastle/asn1/misc/IDEACBCPar.cs | 67 +
.../BouncyCastle/asn1/misc/IDEACBCPar.cs.meta | 11 +
.../asn1/misc/MiscObjectIdentifiers.cs | 124 +
.../asn1/misc/MiscObjectIdentifiers.cs.meta | 11 +
.../asn1/misc/NetscapeCertType.cs | 58 +
.../asn1/misc/NetscapeCertType.cs.meta | 11 +
.../asn1/misc/NetscapeRevocationURL.cs | 22 +
.../asn1/misc/NetscapeRevocationURL.cs.meta | 11 +
.../asn1/misc/VerisignCzagExtension.cs | 22 +
.../asn1/misc/VerisignCzagExtension.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/mozilla.meta | 8 +
.../asn1/mozilla/PublicKeyAndChallenge.cs | 72 +
.../mozilla/PublicKeyAndChallenge.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/nist.meta | 8 +
.../asn1/nist/KMACwithSHAKE128_params.cs | 107 +
.../asn1/nist/KMACwithSHAKE128_params.cs.meta | 11 +
.../asn1/nist/KMACwithSHAKE256_params.cs | 106 +
.../asn1/nist/KMACwithSHAKE256_params.cs.meta | 11 +
.../BouncyCastle/asn1/nist/NISTNamedCurves.cs | 112 +
.../asn1/nist/NISTNamedCurves.cs.meta | 11 +
.../asn1/nist/NISTObjectIdentifiers.cs | 112 +
.../asn1/nist/NISTObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/nsri.meta | 8 +
.../asn1/nsri/NsriObjectIdentifiers.cs | 63 +
.../asn1/nsri/NsriObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/ntt.meta | 8 +
.../asn1/ntt/NTTObjectIdentifiers.cs | 18 +
.../asn1/ntt/NTTObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/ocsp.meta | 8 +
.../asn1/ocsp/BasicOCSPResponse.cs | 111 +
.../asn1/ocsp/BasicOCSPResponse.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/ocsp/CertID.cs | 103 +
.../BouncyCastle/asn1/ocsp/CertID.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/CertStatus.cs | 101 +
.../BouncyCastle/asn1/ocsp/CertStatus.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/ocsp/CrlID.cs | 71 +
.../BouncyCastle/asn1/ocsp/CrlID.cs.meta | 11 +
.../asn1/ocsp/OCSPObjectIdentifiers.cs | 27 +
.../asn1/ocsp/OCSPObjectIdentifiers.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/OCSPRequest.cs | 88 +
.../asn1/ocsp/OCSPRequest.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/OCSPResponse.cs | 89 +
.../asn1/ocsp/OCSPResponse.cs.meta | 11 +
.../asn1/ocsp/OCSPResponseStatus.cs | 45 +
.../asn1/ocsp/OCSPResponseStatus.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/Request.cs | 90 +
.../BouncyCastle/asn1/ocsp/Request.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/ResponderID.cs | 111 +
.../asn1/ocsp/ResponderID.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/ResponseBytes.cs | 86 +
.../asn1/ocsp/ResponseBytes.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/ResponseData.cs | 157 +
.../asn1/ocsp/ResponseData.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/RevokedInfo.cs | 95 +
.../asn1/ocsp/RevokedInfo.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/ServiceLocator.cs | 94 +
.../asn1/ocsp/ServiceLocator.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/Signature.cs | 113 +
.../BouncyCastle/asn1/ocsp/Signature.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/SingleResponse.cs | 131 +
.../asn1/ocsp/SingleResponse.cs.meta | 11 +
.../BouncyCastle/asn1/ocsp/TBSRequest.cs | 146 +
.../BouncyCastle/asn1/ocsp/TBSRequest.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/oiw.meta | 8 +
.../BouncyCastle/asn1/oiw/ElGamalParameter.cs | 49 +
.../asn1/oiw/ElGamalParameter.cs.meta | 11 +
.../asn1/oiw/OIWObjectIdentifiers.cs | 33 +
.../asn1/oiw/OIWObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/pkcs.meta | 8 +
.../BouncyCastle/asn1/pkcs/Attribute.cs | 83 +
.../BouncyCastle/asn1/pkcs/Attribute.cs.meta | 11 +
.../asn1/pkcs/AuthenticatedSafe.cs | 67 +
.../asn1/pkcs/AuthenticatedSafe.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/CertBag.cs | 56 +
.../BouncyCastle/asn1/pkcs/CertBag.cs.meta | 11 +
.../asn1/pkcs/CertificationRequest.cs | 87 +
.../asn1/pkcs/CertificationRequest.cs.meta | 11 +
.../asn1/pkcs/CertificationRequestInfo.cs | 135 +
.../pkcs/CertificationRequestInfo.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/ContentInfo.cs | 75 +
.../asn1/pkcs/ContentInfo.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/DHParameter.cs | 67 +
.../asn1/pkcs/DHParameter.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/EncryptedData.cs | 107 +
.../asn1/pkcs/EncryptedData.cs.meta | 11 +
.../asn1/pkcs/EncryptedPrivateKeyInfo.cs | 79 +
.../asn1/pkcs/EncryptedPrivateKeyInfo.cs.meta | 11 +
.../asn1/pkcs/EncryptionScheme.cs | 59 +
.../asn1/pkcs/EncryptionScheme.cs.meta | 11 +
.../asn1/pkcs/IssuerAndSerialNumber.cs | 76 +
.../asn1/pkcs/IssuerAndSerialNumber.cs.meta | 11 +
.../asn1/pkcs/KeyDerivationFunc.cs | 25 +
.../asn1/pkcs/KeyDerivationFunc.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/MacData.cs | 100 +
.../BouncyCastle/asn1/pkcs/MacData.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/PBEParameter.cs | 63 +
.../asn1/pkcs/PBEParameter.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/PBES2Parameters.cs | 67 +
.../asn1/pkcs/PBES2Parameters.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/PBKDF2Params.cs | 144 +
.../asn1/pkcs/PBKDF2Params.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/PKCS12PBEParams.cs | 67 +
.../asn1/pkcs/PKCS12PBEParams.cs.meta | 11 +
.../asn1/pkcs/PKCSObjectIdentifiers.cs | 306 +
.../asn1/pkcs/PKCSObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/pkcs/Pfx.cs | 67 +
.../BouncyCastle/asn1/pkcs/Pfx.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/PrivateKeyInfo.cs | 207 +
.../asn1/pkcs/PrivateKeyInfo.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/RC2CBCParameter.cs | 78 +
.../asn1/pkcs/RC2CBCParameter.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/RSAESOAEPparams.cs | 155 +
.../asn1/pkcs/RSAESOAEPparams.cs.meta | 11 +
.../asn1/pkcs/RSAPrivateKeyStructure.cs | 146 +
.../asn1/pkcs/RSAPrivateKeyStructure.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/RSASSAPSSparams.cs | 170 +
.../asn1/pkcs/RSASSAPSSparams.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/SafeBag.cs | 78 +
.../BouncyCastle/asn1/pkcs/SafeBag.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/SignedData.cs | 145 +
.../BouncyCastle/asn1/pkcs/SignedData.cs.meta | 11 +
.../BouncyCastle/asn1/pkcs/SignerInfo.cs | 146 +
.../BouncyCastle/asn1/pkcs/SignerInfo.cs.meta | 11 +
.../BouncyCastle/asn1/rosstandart.meta | 8 +
.../RosstandartObjectIdentifiers.cs | 51 +
.../RosstandartObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/sec.meta | 8 +
.../asn1/sec/ECPrivateKeyStructure.cs | 121 +
.../asn1/sec/ECPrivateKeyStructure.cs.meta | 11 +
.../BouncyCastle/asn1/sec/SECNamedCurves.cs | 1278 ++++
.../asn1/sec/SECNamedCurves.cs.meta | 11 +
.../asn1/sec/SECObjectIdentifiers.cs | 56 +
.../asn1/sec/SECObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/smime.meta | 8 +
.../asn1/smime/SMIMEAttributes.cs | 15 +
.../asn1/smime/SMIMEAttributes.cs.meta | 11 +
.../asn1/smime/SMIMECapabilities.cs | 113 +
.../asn1/smime/SMIMECapabilities.cs.meta | 11 +
.../asn1/smime/SMIMECapabilitiesAttribute.cs | 20 +
.../smime/SMIMECapabilitiesAttribute.cs.meta | 11 +
.../asn1/smime/SMIMECapability.cs | 100 +
.../asn1/smime/SMIMECapability.cs.meta | 11 +
.../asn1/smime/SMIMECapabilityVector.cs | 41 +
.../asn1/smime/SMIMECapabilityVector.cs.meta | 11 +
.../SMIMEEncryptionKeyPreferenceAttribute.cs | 48 +
...MEEncryptionKeyPreferenceAttribute.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/teletrust.meta | 8 +
.../asn1/teletrust/TeleTrusTNamedCurves.cs | 557 ++
.../teletrust/TeleTrusTNamedCurves.cs.meta | 11 +
.../teletrust/TeleTrusTObjectIdentifiers.cs | 49 +
.../TeleTrusTObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/tsp.meta | 8 +
.../BouncyCastle/asn1/tsp/Accuracy.cs | 124 +
.../BouncyCastle/asn1/tsp/Accuracy.cs.meta | 11 +
.../BouncyCastle/asn1/tsp/MessageImprint.cs | 67 +
.../asn1/tsp/MessageImprint.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/tsp/TSTInfo.cs | 211 +
.../BouncyCastle/asn1/tsp/TSTInfo.cs.meta | 11 +
.../BouncyCastle/asn1/tsp/TimeStampReq.cs | 147 +
.../asn1/tsp/TimeStampReq.cs.meta | 11 +
.../BouncyCastle/asn1/tsp/TimeStampResp.cs | 71 +
.../asn1/tsp/TimeStampResp.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/ua.meta | 8 +
.../asn1/ua/UAObjectIdentifiers.cs | 111 +
.../asn1/ua/UAObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/util.meta | 8 +
.../BouncyCastle/asn1/util/Asn1Dump.cs | 332 +
.../BouncyCastle/asn1/util/Asn1Dump.cs.meta | 11 +
.../BouncyCastle/asn1/util/FilterStream.cs | 3 +
.../asn1/util/FilterStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x500.meta | 8 +
.../asn1/x500/AttributeTypeAndValue.cs | 64 +
.../asn1/x500/AttributeTypeAndValue.cs.meta | 11 +
.../BouncyCastle/asn1/x500/DirectoryString.cs | 78 +
.../asn1/x500/DirectoryString.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x500/Rdn.cs | 108 +
.../BouncyCastle/asn1/x500/Rdn.cs.meta | 11 +
.../BouncyCastle/asn1/x500/style.meta | 8 +
.../asn1/x500/style/IetfUtilities.cs | 217 +
.../asn1/x500/style/IetfUtilities.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x509.meta | 8 +
.../asn1/x509/AccessDescription.cs | 89 +
.../asn1/x509/AccessDescription.cs.meta | 11 +
.../asn1/x509/AlgorithmIdentifier.cs | 87 +
.../asn1/x509/AlgorithmIdentifier.cs.meta | 11 +
.../BouncyCastle/asn1/x509/AttCertIssuer.cs | 90 +
.../asn1/x509/AttCertIssuer.cs.meta | 11 +
.../asn1/x509/AttCertValidityPeriod.cs | 82 +
.../asn1/x509/AttCertValidityPeriod.cs.meta | 11 +
.../BouncyCastle/asn1/x509/Attribute.cs | 86 +
.../BouncyCastle/asn1/x509/Attribute.cs.meta | 11 +
.../asn1/x509/AttributeCertificate.cs | 90 +
.../asn1/x509/AttributeCertificate.cs.meta | 11 +
.../asn1/x509/AttributeCertificateInfo.cs | 167 +
.../x509/AttributeCertificateInfo.cs.meta | 11 +
.../BouncyCastle/asn1/x509/AttributeTable.cs | 54 +
.../asn1/x509/AttributeTable.cs.meta | 11 +
.../asn1/x509/AuthorityInformationAccess.cs | 111 +
.../x509/AuthorityInformationAccess.cs.meta | 11 +
.../asn1/x509/AuthorityKeyIdentifier.cs | 187 +
.../asn1/x509/AuthorityKeyIdentifier.cs.meta | 11 +
.../asn1/x509/BasicConstraints.cs | 121 +
.../asn1/x509/BasicConstraints.cs.meta | 11 +
.../BouncyCastle/asn1/x509/CRLDistPoint.cs | 89 +
.../asn1/x509/CRLDistPoint.cs.meta | 11 +
.../BouncyCastle/asn1/x509/CRLNumber.cs | 34 +
.../BouncyCastle/asn1/x509/CRLNumber.cs.meta | 11 +
.../BouncyCastle/asn1/x509/CRLReason.cs | 64 +
.../BouncyCastle/asn1/x509/CRLReason.cs.meta | 11 +
.../BouncyCastle/asn1/x509/CertPolicyId.cs | 24 +
.../asn1/x509/CertPolicyId.cs.meta | 11 +
.../BouncyCastle/asn1/x509/CertificateList.cs | 115 +
.../asn1/x509/CertificateList.cs.meta | 11 +
.../BouncyCastle/asn1/x509/CertificatePair.cs | 157 +
.../asn1/x509/CertificatePair.cs.meta | 11 +
.../asn1/x509/CertificatePolicies.cs | 109 +
.../asn1/x509/CertificatePolicies.cs.meta | 11 +
.../BouncyCastle/asn1/x509/DSAParameter.cs | 81 +
.../asn1/x509/DSAParameter.cs.meta | 11 +
.../BouncyCastle/asn1/x509/DigestInfo.cs | 81 +
.../BouncyCastle/asn1/x509/DigestInfo.cs.meta | 11 +
.../BouncyCastle/asn1/x509/DisplayText.cs | 178 +
.../asn1/x509/DisplayText.cs.meta | 11 +
.../asn1/x509/DistributionPoint.cs | 143 +
.../asn1/x509/DistributionPoint.cs.meta | 11 +
.../asn1/x509/DistributionPointName.cs | 125 +
.../asn1/x509/DistributionPointName.cs.meta | 11 +
.../asn1/x509/ExtendedKeyUsage.cs | 110 +
.../asn1/x509/ExtendedKeyUsage.cs.meta | 11 +
.../BouncyCastle/asn1/x509/GeneralName.cs | 427 ++
.../asn1/x509/GeneralName.cs.meta | 11 +
.../BouncyCastle/asn1/x509/GeneralNames.cs | 95 +
.../asn1/x509/GeneralNames.cs.meta | 11 +
.../BouncyCastle/asn1/x509/GeneralSubtree.cs | 189 +
.../asn1/x509/GeneralSubtree.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x509/Holder.cs | 250 +
.../BouncyCastle/asn1/x509/Holder.cs.meta | 11 +
.../BouncyCastle/asn1/x509/IetfAttrSyntax.cs | 156 +
.../asn1/x509/IetfAttrSyntax.cs.meta | 11 +
.../BouncyCastle/asn1/x509/IssuerSerial.cs | 98 +
.../asn1/x509/IssuerSerial.cs.meta | 11 +
.../asn1/x509/IssuingDistributionPoint.cs | 241 +
.../x509/IssuingDistributionPoint.cs.meta | 11 +
.../BouncyCastle/asn1/x509/KeyPurposeId.cs | 100 +
.../asn1/x509/KeyPurposeId.cs.meta | 11 +
.../BouncyCastle/asn1/x509/KeyUsage.cs | 82 +
.../BouncyCastle/asn1/x509/KeyUsage.cs.meta | 11 +
.../BouncyCastle/asn1/x509/NameConstraints.cs | 105 +
.../asn1/x509/NameConstraints.cs.meta | 11 +
.../BouncyCastle/asn1/x509/NoticeReference.cs | 147 +
.../asn1/x509/NoticeReference.cs.meta | 11 +
.../asn1/x509/ObjectDigestInfo.cs | 177 +
.../asn1/x509/ObjectDigestInfo.cs.meta | 11 +
.../BouncyCastle/asn1/x509/OtherName.cs | 75 +
.../BouncyCastle/asn1/x509/OtherName.cs.meta | 11 +
.../asn1/x509/PolicyInformation.cs | 79 +
.../asn1/x509/PolicyInformation.cs.meta | 11 +
.../BouncyCastle/asn1/x509/PolicyMappings.cs | 66 +
.../asn1/x509/PolicyMappings.cs.meta | 11 +
.../asn1/x509/PolicyQualifierId.cs | 32 +
.../asn1/x509/PolicyQualifierId.cs.meta | 11 +
.../asn1/x509/PolicyQualifierInfo.cs | 99 +
.../asn1/x509/PolicyQualifierInfo.cs.meta | 11 +
.../asn1/x509/PrivateKeyUsagePeriod.cs | 79 +
.../asn1/x509/PrivateKeyUsagePeriod.cs.meta | 11 +
.../asn1/x509/RSAPublicKeyStructure.cs | 95 +
.../asn1/x509/RSAPublicKeyStructure.cs.meta | 11 +
.../BouncyCastle/asn1/x509/ReasonFlags.cs | 49 +
.../asn1/x509/ReasonFlags.cs.meta | 11 +
.../BouncyCastle/asn1/x509/RoleSyntax.cs | 228 +
.../BouncyCastle/asn1/x509/RoleSyntax.cs.meta | 11 +
.../asn1/x509/SubjectDirectoryAttributes.cs | 137 +
.../x509/SubjectDirectoryAttributes.cs.meta | 11 +
.../asn1/x509/SubjectKeyIdentifier.cs | 136 +
.../asn1/x509/SubjectKeyIdentifier.cs.meta | 11 +
.../asn1/x509/SubjectPublicKeyInfo.cs | 105 +
.../asn1/x509/SubjectPublicKeyInfo.cs.meta | 11 +
.../BouncyCastle/asn1/x509/TBSCertList.cs | 285 +
.../asn1/x509/TBSCertList.cs.meta | 11 +
.../asn1/x509/TBSCertificateStructure.cs | 260 +
.../asn1/x509/TBSCertificateStructure.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x509/Target.cs | 145 +
.../BouncyCastle/asn1/x509/Target.cs.meta | 11 +
.../asn1/x509/TargetInformation.cs | 129 +
.../asn1/x509/TargetInformation.cs.meta | 11 +
.../BouncyCastle/asn1/x509/Targets.cs | 127 +
.../BouncyCastle/asn1/x509/Targets.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x509/Time.cs | 115 +
.../BouncyCastle/asn1/x509/Time.cs.meta | 11 +
.../BouncyCastle/asn1/x509/UserNotice.cs | 113 +
.../BouncyCastle/asn1/x509/UserNotice.cs.meta | 11 +
.../asn1/x509/V1TBSCertificateGenerator.cs | 112 +
.../x509/V1TBSCertificateGenerator.cs.meta | 11 +
.../V2AttributeCertificateInfoGenerator.cs | 143 +
...2AttributeCertificateInfoGenerator.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x509/V2Form.cs | 128 +
.../BouncyCastle/asn1/x509/V2Form.cs.meta | 11 +
.../asn1/x509/V2TBSCertListGenerator.cs | 198 +
.../asn1/x509/V2TBSCertListGenerator.cs.meta | 11 +
.../asn1/x509/V3TBSCertificateGenerator.cs | 172 +
.../x509/V3TBSCertificateGenerator.cs.meta | 11 +
.../BouncyCastle/asn1/x509/X509Attributes.cs | 13 +
.../asn1/x509/X509Attributes.cs.meta | 11 +
.../asn1/x509/X509CertificateStructure.cs | 136 +
.../x509/X509CertificateStructure.cs.meta | 11 +
.../asn1/x509/X509DefaultEntryConverter.cs | 67 +
.../x509/X509DefaultEntryConverter.cs.meta | 11 +
.../BouncyCastle/asn1/x509/X509Extension.cs | 83 +
.../asn1/x509/X509Extension.cs.meta | 11 +
.../BouncyCastle/asn1/x509/X509Extensions.cs | 401 ++
.../asn1/x509/X509Extensions.cs.meta | 11 +
.../asn1/x509/X509ExtensionsGenerator.cs | 122 +
.../asn1/x509/X509ExtensionsGenerator.cs.meta | 11 +
.../BouncyCastle/asn1/x509/X509Name.cs | 1024 +++
.../BouncyCastle/asn1/x509/X509Name.cs.meta | 11 +
.../asn1/x509/X509NameEntryConverter.cs | 91 +
.../asn1/x509/X509NameEntryConverter.cs.meta | 11 +
.../asn1/x509/X509NameTokenizer.cs | 108 +
.../asn1/x509/X509NameTokenizer.cs.meta | 11 +
.../asn1/x509/X509ObjectIdentifiers.cs | 65 +
.../asn1/x509/X509ObjectIdentifiers.cs.meta | 11 +
.../BouncyCastle/asn1/x509/qualified.meta | 8 +
.../asn1/x509/qualified/BiometricData.cs | 108 +
.../asn1/x509/qualified/BiometricData.cs.meta | 11 +
.../x509/qualified/ETSIQCObjectIdentifiers.cs | 23 +
.../qualified/ETSIQCObjectIdentifiers.cs.meta | 11 +
.../x509/qualified/Iso4217CurrencyCode.cs | 88 +
.../qualified/Iso4217CurrencyCode.cs.meta | 11 +
.../asn1/x509/qualified/MonetaryValue.cs | 86 +
.../asn1/x509/qualified/MonetaryValue.cs.meta | 11 +
.../asn1/x509/qualified/QCStatement.cs | 83 +
.../asn1/x509/qualified/QCStatement.cs.meta | 11 +
.../qualified/RFC3739QCObjectIdentifiers.cs | 25 +
.../RFC3739QCObjectIdentifiers.cs.meta | 11 +
.../x509/qualified/SemanticsInformation.cs | 122 +
.../qualified/SemanticsInformation.cs.meta | 11 +
.../x509/qualified/TypeOfBiometricData.cs | 95 +
.../qualified/TypeOfBiometricData.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x509/sigi.meta | 8 +
.../asn1/x509/sigi/NameOrPseudonym.cs | 181 +
.../asn1/x509/sigi/NameOrPseudonym.cs.meta | 11 +
.../asn1/x509/sigi/PersonalData.cs | 207 +
.../asn1/x509/sigi/PersonalData.cs.meta | 11 +
.../asn1/x509/sigi/SigIObjectIdentifiers.cs | 53 +
.../x509/sigi/SigIObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x9.meta | 8 +
.../asn1/x9/DHDomainParameters.cs | 112 +
.../asn1/x9/DHDomainParameters.cs.meta | 11 +
.../BouncyCastle/asn1/x9/DHPublicKey.cs | 50 +
.../BouncyCastle/asn1/x9/DHPublicKey.cs.meta | 11 +
.../BouncyCastle/asn1/x9/DHValidationParms.cs | 68 +
.../asn1/x9/DHValidationParms.cs.meta | 11 +
.../BouncyCastle/asn1/x9/ECNamedCurveTable.cs | 237 +
.../asn1/x9/ECNamedCurveTable.cs.meta | 11 +
.../BouncyCastle/asn1/x9/KeySpecificInfo.cs | 59 +
.../asn1/x9/KeySpecificInfo.cs.meta | 11 +
.../BouncyCastle/asn1/x9/OtherInfo.cs | 83 +
.../BouncyCastle/asn1/x9/OtherInfo.cs.meta | 11 +
.../BouncyCastle/asn1/x9/X962NamedCurves.cs | 866 +++
.../asn1/x9/X962NamedCurves.cs.meta | 11 +
.../BouncyCastle/asn1/x9/X962Parameters.cs | 97 +
.../asn1/x9/X962Parameters.cs.meta | 11 +
.../3rdParty/BouncyCastle/asn1/x9/X9Curve.cs | 151 +
.../BouncyCastle/asn1/x9/X9Curve.cs.meta | 11 +
.../BouncyCastle/asn1/x9/X9ECParameters.cs | 215 +
.../asn1/x9/X9ECParameters.cs.meta | 11 +
.../asn1/x9/X9ECParametersHolder.cs | 53 +
.../asn1/x9/X9ECParametersHolder.cs.meta | 11 +
.../BouncyCastle/asn1/x9/X9ECPoint.cs | 79 +
.../BouncyCastle/asn1/x9/X9ECPoint.cs.meta | 11 +
.../BouncyCastle/asn1/x9/X9FieldElement.cs | 56 +
.../asn1/x9/X9FieldElement.cs.meta | 11 +
.../BouncyCastle/asn1/x9/X9FieldID.cs | 136 +
.../BouncyCastle/asn1/x9/X9FieldID.cs.meta | 11 +
.../asn1/x9/X9IntegerConverter.cs | 44 +
.../asn1/x9/X9IntegerConverter.cs.meta | 11 +
.../asn1/x9/X9ObjectIdentifiers.cs | 135 +
.../asn1/x9/X9ObjectIdentifiers.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/bcpg.meta | 8 +
.../BouncyCastle/bcpg/ArmoredInputStream.cs | 531 ++
.../bcpg/ArmoredInputStream.cs.meta | 11 +
.../BouncyCastle/bcpg/ArmoredOutputStream.cs | 402 ++
.../bcpg/ArmoredOutputStream.cs.meta | 11 +
.../BouncyCastle/bcpg/BcpgInputStream.cs | 402 ++
.../BouncyCastle/bcpg/BcpgInputStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/bcpg/BcpgObject.cs | 26 +
.../BouncyCastle/bcpg/BcpgObject.cs.meta | 11 +
.../BouncyCastle/bcpg/BcpgOutputStream.cs | 446 ++
.../bcpg/BcpgOutputStream.cs.meta | 11 +
.../BouncyCastle/bcpg/CompressedDataPacket.cs | 28 +
.../bcpg/CompressedDataPacket.cs.meta | 11 +
.../bcpg/CompressionAlgorithmTags.cs | 15 +
.../bcpg/CompressionAlgorithmTags.cs.meta | 11 +
.../BouncyCastle/bcpg/ContainedPacket.cs | 26 +
.../BouncyCastle/bcpg/ContainedPacket.cs.meta | 11 +
.../3rdParty/BouncyCastle/bcpg/Crc24.cs | 44 +
.../3rdParty/BouncyCastle/bcpg/Crc24.cs.meta | 11 +
.../BouncyCastle/bcpg/DsaPublicBcpgKey.cs | 84 +
.../bcpg/DsaPublicBcpgKey.cs.meta | 11 +
.../BouncyCastle/bcpg/DsaSecretBcpgKey.cs | 65 +
.../bcpg/DsaSecretBcpgKey.cs.meta | 11 +
.../BouncyCastle/bcpg/ECDHPublicBCPGKey.cs | 125 +
.../bcpg/ECDHPublicBCPGKey.cs.meta | 11 +
.../BouncyCastle/bcpg/ECDsaPublicBCPGKey.cs | 38 +
.../bcpg/ECDsaPublicBCPGKey.cs.meta | 11 +
.../BouncyCastle/bcpg/ECPublicBCPGKey.cs | 103 +
.../BouncyCastle/bcpg/ECPublicBCPGKey.cs.meta | 11 +
.../BouncyCastle/bcpg/ECSecretBCPGKey.cs | 59 +
.../BouncyCastle/bcpg/ECSecretBCPGKey.cs.meta | 11 +
.../BouncyCastle/bcpg/EdDsaPublicBcpgKey.cs | 29 +
.../bcpg/EdDsaPublicBcpgKey.cs.meta | 11 +
.../BouncyCastle/bcpg/EdSecretBcpgKey.cs | 47 +
.../BouncyCastle/bcpg/EdSecretBcpgKey.cs.meta | 11 +
.../BouncyCastle/bcpg/ElGamalPublicBcpgKey.cs | 75 +
.../bcpg/ElGamalPublicBcpgKey.cs.meta | 11 +
.../BouncyCastle/bcpg/ElGamalSecretBcpgKey.cs | 65 +
.../bcpg/ElGamalSecretBcpgKey.cs.meta | 11 +
.../BouncyCastle/bcpg/ExperimentalPacket.cs | 42 +
.../bcpg/ExperimentalPacket.cs.meta | 11 +
.../BouncyCastle/bcpg/HashAlgorithmTags.cs | 23 +
.../bcpg/HashAlgorithmTags.cs.meta | 11 +
.../3rdParty/BouncyCastle/bcpg/IBcpgKey.cs | 20 +
.../BouncyCastle/bcpg/IBcpgKey.cs.meta | 11 +
.../BouncyCastle/bcpg/InputStreamPacket.cs | 24 +
.../bcpg/InputStreamPacket.cs.meta | 11 +
.../BouncyCastle/bcpg/LiteralDataPacket.cs | 65 +
.../bcpg/LiteralDataPacket.cs.meta | 11 +
.../3rdParty/BouncyCastle/bcpg/MPInteger.cs | 70 +
.../BouncyCastle/bcpg/MPInteger.cs.meta | 11 +
.../BouncyCastle/bcpg/MarkerPacket.cs | 28 +
.../BouncyCastle/bcpg/MarkerPacket.cs.meta | 11 +
.../bcpg/ModDetectionCodePacket.cs | 46 +
.../bcpg/ModDetectionCodePacket.cs.meta | 11 +
.../bcpg/OnePassSignaturePacket.cs | 91 +
.../bcpg/OnePassSignaturePacket.cs.meta | 11 +
.../BouncyCastle/bcpg/OutputStreamPacket.cs | 28 +
.../bcpg/OutputStreamPacket.cs.meta | 11 +
.../3rdParty/BouncyCastle/bcpg/Packet.cs | 11 +
.../3rdParty/BouncyCastle/bcpg/Packet.cs.meta | 11 +
.../3rdParty/BouncyCastle/bcpg/PacketTags.cs | 34 +
.../BouncyCastle/bcpg/PacketTags.cs.meta | 11 +
.../bcpg/PublicKeyAlgorithmTags.cs | 35 +
.../bcpg/PublicKeyAlgorithmTags.cs.meta | 11 +
.../bcpg/PublicKeyEncSessionPacket.cs | 115 +
.../bcpg/PublicKeyEncSessionPacket.cs.meta | 11 +
.../BouncyCastle/bcpg/PublicKeyPacket.cs | 128 +
.../BouncyCastle/bcpg/PublicKeyPacket.cs.meta | 11 +
.../BouncyCastle/bcpg/PublicSubkeyPacket.cs | 34 +
.../bcpg/PublicSubkeyPacket.cs.meta | 11 +
.../BouncyCastle/bcpg/RsaPublicBcpgKey.cs | 70 +
.../bcpg/RsaPublicBcpgKey.cs.meta | 11 +
.../BouncyCastle/bcpg/RsaSecretBcpgKey.cs | 119 +
.../bcpg/RsaSecretBcpgKey.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/bcpg/S2k.cs | 147 +
.../3rdParty/BouncyCastle/bcpg/S2k.cs.meta | 11 +
.../BouncyCastle/bcpg/SecretKeyPacket.cs | 174 +
.../BouncyCastle/bcpg/SecretKeyPacket.cs.meta | 11 +
.../BouncyCastle/bcpg/SecretSubkeyPacket.cs | 47 +
.../bcpg/SecretSubkeyPacket.cs.meta | 11 +
.../BouncyCastle/bcpg/SignaturePacket.cs | 466 ++
.../BouncyCastle/bcpg/SignaturePacket.cs.meta | 11 +
.../BouncyCastle/bcpg/SignatureSubpacket.cs | 119 +
.../bcpg/SignatureSubpacket.cs.meta | 11 +
.../bcpg/SignatureSubpacketTags.cs | 37 +
.../bcpg/SignatureSubpacketTags.cs.meta | 11 +
.../bcpg/SignatureSubpacketsReader.cs | 139 +
.../bcpg/SignatureSubpacketsReader.cs.meta | 11 +
.../bcpg/SymmetricEncDataPacket.cs | 19 +
.../bcpg/SymmetricEncDataPacket.cs.meta | 11 +
.../bcpg/SymmetricEncIntegrityPacket.cs | 22 +
.../bcpg/SymmetricEncIntegrityPacket.cs.meta | 11 +
.../bcpg/SymmetricKeyAlgorithmTags.cs | 27 +
.../bcpg/SymmetricKeyAlgorithmTags.cs.meta | 11 +
.../bcpg/SymmetricKeyEncSessionPacket.cs | 92 +
.../bcpg/SymmetricKeyEncSessionPacket.cs.meta | 11 +
.../3rdParty/BouncyCastle/bcpg/TrustPacket.cs | 47 +
.../BouncyCastle/bcpg/TrustPacket.cs.meta | 11 +
.../bcpg/UnsupportedPacketVersionException.cs | 34 +
.../UnsupportedPacketVersionException.cs.meta | 11 +
.../BouncyCastle/bcpg/UserAttributePacket.cs | 57 +
.../bcpg/UserAttributePacket.cs.meta | 11 +
.../bcpg/UserAttributeSubpacket.cs | 94 +
.../bcpg/UserAttributeSubpacket.cs.meta | 11 +
.../bcpg/UserAttributeSubpacketTags.cs | 14 +
.../bcpg/UserAttributeSubpacketTags.cs.meta | 11 +
.../bcpg/UserAttributeSubpacketsReader.cs | 69 +
.../UserAttributeSubpacketsReader.cs.meta | 11 +
.../BouncyCastle/bcpg/UserIdPacket.cs | 41 +
.../BouncyCastle/bcpg/UserIdPacket.cs.meta | 11 +
.../3rdParty/BouncyCastle/bcpg/attr.meta | 8 +
.../BouncyCastle/bcpg/attr/ImageAttrib.cs | 76 +
.../bcpg/attr/ImageAttrib.cs.meta | 11 +
.../3rdParty/BouncyCastle/bcpg/sig.meta | 8 +
.../bcpg/sig/EmbeddedSignature.cs | 23 +
.../bcpg/sig/EmbeddedSignature.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/Exportable.cs | 40 +
.../BouncyCastle/bcpg/sig/Exportable.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/Features.cs | 63 +
.../BouncyCastle/bcpg/sig/Features.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/IssuerKeyId.cs | 37 +
.../BouncyCastle/bcpg/sig/IssuerKeyId.cs.meta | 11 +
.../bcpg/sig/KeyExpirationTime.cs | 42 +
.../bcpg/sig/KeyExpirationTime.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/KeyFlags.cs | 79 +
.../BouncyCastle/bcpg/sig/KeyFlags.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/NotationData.cs | 117 +
.../bcpg/sig/NotationData.cs.meta | 11 +
.../bcpg/sig/PreferredAlgorithms.cs | 57 +
.../bcpg/sig/PreferredAlgorithms.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/PrimaryUserId.cs | 40 +
.../bcpg/sig/PrimaryUserId.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/Revocable.cs | 40 +
.../BouncyCastle/bcpg/sig/Revocable.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/RevocationKey.cs | 67 +
.../bcpg/sig/RevocationKey.cs.meta | 11 +
.../bcpg/sig/RevocationKeyTags.cs | 13 +
.../bcpg/sig/RevocationKeyTags.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/RevocationReason.cs | 61 +
.../bcpg/sig/RevocationReason.cs.meta | 11 +
.../bcpg/sig/RevocationReasonTags.cs | 18 +
.../bcpg/sig/RevocationReasonTags.cs.meta | 11 +
.../bcpg/sig/SignatureCreationTime.cs | 40 +
.../bcpg/sig/SignatureCreationTime.cs.meta | 11 +
.../bcpg/sig/SignatureExpirationTime.cs | 35 +
.../bcpg/sig/SignatureExpirationTime.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/SignerUserId.cs | 53 +
.../bcpg/sig/SignerUserId.cs.meta | 11 +
.../BouncyCastle/bcpg/sig/TrustSignature.cs | 48 +
.../bcpg/sig/TrustSignature.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/cmp.meta | 8 +
.../cmp/CertificateConfirmationContent.cs | 46 +
.../CertificateConfirmationContent.cs.meta | 11 +
.../CertificateConfirmationContentBuilder.cs | 69 +
...tificateConfirmationContentBuilder.cs.meta | 11 +
.../BouncyCastle/cmp/CertificateStatus.cs | 46 +
.../cmp/CertificateStatus.cs.meta | 11 +
.../3rdParty/BouncyCastle/cmp/CmpException.cs | 34 +
.../BouncyCastle/cmp/CmpException.cs.meta | 11 +
.../BouncyCastle/cmp/GeneralPkiMessage.cs | 49 +
.../cmp/GeneralPkiMessage.cs.meta | 11 +
.../BouncyCastle/cmp/ProtectedPkiMessage.cs | 141 +
.../cmp/ProtectedPkiMessage.cs.meta | 11 +
.../cmp/ProtectedPkiMessageBuilder.cs | 161 +
.../cmp/ProtectedPkiMessageBuilder.cs.meta | 11 +
.../BouncyCastle/cmp/RevocationDetails.cs | 28 +
.../cmp/RevocationDetails.cs.meta | 11 +
.../cmp/RevocationDetailsBuilder.cs | 62 +
.../cmp/RevocationDetailsBuilder.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/cms.meta | 8 +
.../BouncyCastle/cms/BaseDigestCalculator.cs | 27 +
.../cms/BaseDigestCalculator.cs.meta | 11 +
.../CMSAttributeTableGenerationException.cs | 34 +
...SAttributeTableGenerationException.cs.meta | 11 +
.../cms/CMSAttributeTableGenerator.cs | 28 +
.../cms/CMSAttributeTableGenerator.cs.meta | 11 +
.../BouncyCastle/cms/CMSAuthEnvelopedData.cs | 115 +
.../cms/CMSAuthEnvelopedData.cs.meta | 11 +
.../cms/CMSAuthEnvelopedGenerator.cs | 20 +
.../cms/CMSAuthEnvelopedGenerator.cs.meta | 11 +
.../BouncyCastle/cms/CMSAuthenticatedData.cs | 140 +
.../cms/CMSAuthenticatedData.cs.meta | 11 +
.../cms/CMSAuthenticatedDataGenerator.cs | 150 +
.../cms/CMSAuthenticatedDataGenerator.cs.meta | 11 +
.../cms/CMSAuthenticatedDataParser.cs | 217 +
.../cms/CMSAuthenticatedDataParser.cs.meta | 11 +
.../CMSAuthenticatedDataStreamGenerator.cs | 278 +
...MSAuthenticatedDataStreamGenerator.cs.meta | 11 +
.../cms/CMSAuthenticatedGenerator.cs | 32 +
.../cms/CMSAuthenticatedGenerator.cs.meta | 11 +
.../BouncyCastle/cms/CMSCompressedData.cs | 110 +
.../cms/CMSCompressedData.cs.meta | 11 +
.../cms/CMSCompressedDataGenerator.cs | 71 +
.../cms/CMSCompressedDataGenerator.cs.meta | 11 +
.../cms/CMSCompressedDataParser.cs | 61 +
.../cms/CMSCompressedDataParser.cs.meta | 11 +
.../cms/CMSCompressedDataStreamGenerator.cs | 154 +
.../CMSCompressedDataStreamGenerator.cs.meta | 11 +
.../BouncyCastle/cms/CMSContentInfoParser.cs | 52 +
.../cms/CMSContentInfoParser.cs.meta | 11 +
.../BouncyCastle/cms/CMSEnvelopedData.cs | 116 +
.../BouncyCastle/cms/CMSEnvelopedData.cs.meta | 11 +
.../cms/CMSEnvelopedDataGenerator.cs | 246 +
.../cms/CMSEnvelopedDataGenerator.cs.meta | 11 +
.../cms/CMSEnvelopedDataParser.cs | 163 +
.../cms/CMSEnvelopedDataParser.cs.meta | 11 +
.../cms/CMSEnvelopedDataStreamGenerator.cs | 286 +
.../CMSEnvelopedDataStreamGenerator.cs.meta | 11 +
.../BouncyCastle/cms/CMSEnvelopedGenerator.cs | 343 +
.../cms/CMSEnvelopedGenerator.cs.meta | 11 +
.../BouncyCastle/cms/CMSEnvelopedHelper.cs | 311 +
.../cms/CMSEnvelopedHelper.cs.meta | 11 +
.../3rdParty/BouncyCastle/cms/CMSException.cs | 34 +
.../BouncyCastle/cms/CMSException.cs.meta | 11 +
.../3rdParty/BouncyCastle/cms/CMSPBEKey.cs | 84 +
.../BouncyCastle/cms/CMSPBEKey.cs.meta | 11 +
.../BouncyCastle/cms/CMSProcessable.cs | 20 +
.../BouncyCastle/cms/CMSProcessable.cs.meta | 11 +
.../cms/CMSProcessableByteArray.cs | 49 +
.../cms/CMSProcessableByteArray.cs.meta | 11 +
.../BouncyCastle/cms/CMSProcessableFile.cs | 47 +
.../cms/CMSProcessableFile.cs.meta | 11 +
.../cms/CMSProcessableInputStream.cs | 51 +
.../cms/CMSProcessableInputStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/cms/CMSReadable.cs | 14 +
.../BouncyCastle/cms/CMSReadable.cs.meta | 11 +
.../BouncyCastle/cms/CMSSecureReadable.cs | 18 +
.../cms/CMSSecureReadable.cs.meta | 11 +
.../BouncyCastle/cms/CMSSignedData.cs | 415 ++
.../BouncyCastle/cms/CMSSignedData.cs.meta | 11 +
.../cms/CMSSignedDataGenerator.cs | 581 ++
.../cms/CMSSignedDataGenerator.cs.meta | 11 +
.../BouncyCastle/cms/CMSSignedDataParser.cs | 435 ++
.../cms/CMSSignedDataParser.cs.meta | 11 +
.../cms/CMSSignedDataStreamGenerator.cs | 913 +++
.../cms/CMSSignedDataStreamGenerator.cs.meta | 11 +
.../BouncyCastle/cms/CMSSignedGenerator.cs | 664 ++
.../cms/CMSSignedGenerator.cs.meta | 11 +
.../BouncyCastle/cms/CMSSignedHelper.cs | 382 ++
.../BouncyCastle/cms/CMSSignedHelper.cs.meta | 11 +
.../BouncyCastle/cms/CMSStreamException.cs | 35 +
.../cms/CMSStreamException.cs.meta | 11 +
.../BouncyCastle/cms/CMSTypedStream.cs | 79 +
.../BouncyCastle/cms/CMSTypedStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/cms/CMSUtils.cs | 211 +
.../BouncyCastle/cms/CMSUtils.cs.meta | 11 +
.../cms/CounterSignatureDigestCalculator.cs | 32 +
.../CounterSignatureDigestCalculator.cs.meta | 11 +
...ultAuthenticatedAttributeTableGenerator.cs | 92 +
...thenticatedAttributeTableGenerator.cs.meta | 11 +
.../DefaultSignedAttributeTableGenerator.cs | 107 +
...faultSignedAttributeTableGenerator.cs.meta | 11 +
.../BouncyCastle/cms/EnvelopedDataHelper.cs | 94 +
.../cms/EnvelopedDataHelper.cs.meta | 11 +
.../BouncyCastle/cms/IDigestCalculator.cs | 13 +
.../cms/IDigestCalculator.cs.meta | 11 +
.../cms/KEKRecipientInfoGenerator.cs | 142 +
.../cms/KEKRecipientInfoGenerator.cs.meta | 11 +
.../cms/KEKRecipientInformation.cs | 66 +
.../cms/KEKRecipientInformation.cs.meta | 11 +
.../cms/KeyAgreeRecipientInfoGenerator.cs | 174 +
.../KeyAgreeRecipientInfoGenerator.cs.meta | 11 +
.../cms/KeyAgreeRecipientInformation.cs | 226 +
.../cms/KeyAgreeRecipientInformation.cs.meta | 11 +
.../cms/KeyTransRecipientInfoGenerator.cs | 72 +
.../KeyTransRecipientInfoGenerator.cs.meta | 11 +
.../cms/KeyTransRecipientInformation.cs | 136 +
.../cms/KeyTransRecipientInformation.cs.meta | 11 +
.../3rdParty/BouncyCastle/cms/OriginatorId.cs | 55 +
.../BouncyCastle/cms/OriginatorId.cs.meta | 11 +
.../cms/OriginatorInfoGenerator.cs | 77 +
.../cms/OriginatorInfoGenerator.cs.meta | 11 +
.../BouncyCastle/cms/OriginatorInformation.cs | 52 +
.../cms/OriginatorInformation.cs.meta | 11 +
.../BouncyCastle/cms/PKCS5Scheme2PBEKey.cs | 51 +
.../cms/PKCS5Scheme2PBEKey.cs.meta | 11 +
.../cms/PKCS5Scheme2UTF8PBEKey.cs | 51 +
.../cms/PKCS5Scheme2UTF8PBEKey.cs.meta | 11 +
.../cms/PasswordRecipientInfoGenerator.cs | 74 +
.../PasswordRecipientInfoGenerator.cs.meta | 11 +
.../cms/PasswordRecipientInformation.cs | 83 +
.../cms/PasswordRecipientInformation.cs.meta | 11 +
.../3rdParty/BouncyCastle/cms/RecipientId.cs | 62 +
.../BouncyCastle/cms/RecipientId.cs.meta | 11 +
.../cms/RecipientInfoGenerator.cs | 30 +
.../cms/RecipientInfoGenerator.cs.meta | 11 +
.../BouncyCastle/cms/RecipientInformation.cs | 130 +
.../cms/RecipientInformation.cs.meta | 11 +
.../cms/RecipientInformationStore.cs | 89 +
.../cms/RecipientInformationStore.cs.meta | 11 +
.../3rdParty/BouncyCastle/cms/SignerId.cs | 55 +
.../BouncyCastle/cms/SignerId.cs.meta | 11 +
.../BouncyCastle/cms/SignerInfoGenerator.cs | 181 +
.../cms/SignerInfoGenerator.cs.meta | 11 +
.../BouncyCastle/cms/SignerInformation.cs | 813 +++
.../cms/SignerInformation.cs.meta | 11 +
.../cms/SignerInformationStore.cs | 94 +
.../cms/SignerInformationStore.cs.meta | 11 +
.../cms/SimpleAttributeTableGenerator.cs | 31 +
.../cms/SimpleAttributeTableGenerator.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/crmf.meta | 8 +
.../BouncyCastle/crmf/AuthenticatorControl.cs | 56 +
.../crmf/AuthenticatorControl.cs.meta | 11 +
.../crmf/CertificateRequestMessage.cs | 233 +
.../crmf/CertificateRequestMessage.cs.meta | 11 +
.../crmf/CertificateRequestMessageBuilder.cs | 269 +
.../CertificateRequestMessageBuilder.cs.meta | 11 +
.../BouncyCastle/crmf/CrmfException.cs | 34 +
.../BouncyCastle/crmf/CrmfException.cs.meta | 11 +
.../crmf/DefaultPKMacPrimitivesProvider.cs | 26 +
.../DefaultPKMacPrimitivesProvider.cs.meta | 11 +
.../crmf/EncryptedValueBuilder.cs | 163 +
.../crmf/EncryptedValueBuilder.cs.meta | 11 +
.../3rdParty/BouncyCastle/crmf/IControl.cs | 26 +
.../BouncyCastle/crmf/IControl.cs.meta | 11 +
.../crmf/IEncryptedValuePadder.cs | 31 +
.../crmf/IEncryptedValuePadder.cs.meta | 11 +
.../crmf/IPKMacPrimitivesProvider.cs | 18 +
.../crmf/IPKMacPrimitivesProvider.cs.meta | 11 +
.../BouncyCastle/crmf/PKMacBuilder.cs | 290 +
.../BouncyCastle/crmf/PKMacBuilder.cs.meta | 11 +
.../BouncyCastle/crmf/PkiArchiveControl.cs | 98 +
.../crmf/PkiArchiveControl.cs.meta | 11 +
.../crmf/PkiArchiveControlBuilder.cs | 63 +
.../crmf/PkiArchiveControlBuilder.cs.meta | 11 +
.../ProofOfPossessionSigningKeyBuilder.cs | 94 +
...ProofOfPossessionSigningKeyBuilder.cs.meta | 11 +
.../BouncyCastle/crmf/RegTokenControl.cs | 55 +
.../BouncyCastle/crmf/RegTokenControl.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/crypto.meta | 8 +
.../BouncyCastle/crypto/AesUtilities.cs | 27 +
.../BouncyCastle/crypto/AesUtilities.cs.meta | 11 +
.../crypto/AsymmetricCipherKeyPair.cs | 56 +
.../crypto/AsymmetricCipherKeyPair.cs.meta | 11 +
.../crypto/AsymmetricKeyParameter.cs | 51 +
.../crypto/AsymmetricKeyParameter.cs.meta | 11 +
.../crypto/BufferedAeadBlockCipher.cs | 276 +
.../crypto/BufferedAeadBlockCipher.cs.meta | 11 +
.../BouncyCastle/crypto/BufferedAeadCipher.cs | 275 +
.../crypto/BufferedAeadCipher.cs.meta | 11 +
.../crypto/BufferedAsymmetricBlockCipher.cs | 201 +
.../BufferedAsymmetricBlockCipher.cs.meta | 11 +
.../crypto/BufferedBlockCipher.cs | 425 ++
.../crypto/BufferedBlockCipher.cs.meta | 11 +
.../BouncyCastle/crypto/BufferedCipherBase.cs | 136 +
.../crypto/BufferedCipherBase.cs.meta | 11 +
.../BouncyCastle/crypto/BufferedIesCipher.cs | 149 +
.../crypto/BufferedIesCipher.cs.meta | 11 +
.../crypto/BufferedStreamCipher.cs | 141 +
.../crypto/BufferedStreamCipher.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/Check.cs | 43 +
.../BouncyCastle/crypto/Check.cs.meta | 11 +
.../BouncyCastle/crypto/CipherKeyGenerator.cs | 85 +
.../crypto/CipherKeyGenerator.cs.meta | 11 +
.../BouncyCastle/crypto/CryptoException.cs | 34 +
.../crypto/CryptoException.cs.meta | 11 +
.../crypto/CryptoServicesRegistrar.cs | 21 +
.../crypto/CryptoServicesRegistrar.cs.meta | 11 +
.../crypto/DataLengthException.cs | 39 +
.../crypto/DataLengthException.cs.meta | 11 +
.../BouncyCastle/crypto/IAlphabetMapper.cs | 36 +
.../crypto/IAlphabetMapper.cs.meta | 11 +
.../crypto/IAsymmetricBlockCipher.cs | 34 +
.../crypto/IAsymmetricBlockCipher.cs.meta | 11 +
.../IAsymmetricCipherKeyPairGenerator.cs | 28 +
.../IAsymmetricCipherKeyPairGenerator.cs.meta | 11 +
.../BouncyCastle/crypto/IBasicAgreement.cs | 33 +
.../crypto/IBasicAgreement.cs.meta | 11 +
.../BouncyCastle/crypto/IBlockCipher.cs | 42 +
.../BouncyCastle/crypto/IBlockCipher.cs.meta | 11 +
.../BouncyCastle/crypto/IBlockResult.cs | 38 +
.../BouncyCastle/crypto/IBlockResult.cs.meta | 11 +
.../BouncyCastle/crypto/IBufferedCipher.cs | 61 +
.../crypto/IBufferedCipher.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/ICipher.cs | 45 +
.../BouncyCastle/crypto/ICipher.cs.meta | 11 +
.../BouncyCastle/crypto/ICipherBuilder.cs | 34 +
.../crypto/ICipherBuilder.cs.meta | 11 +
.../crypto/ICipherBuilderWithKey.cs | 20 +
.../crypto/ICipherBuilderWithKey.cs.meta | 11 +
.../BouncyCastle/crypto/ICipherParameters.cs | 15 +
.../crypto/ICipherParameters.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/IDSA.cs | 36 +
.../3rdParty/BouncyCastle/crypto/IDSA.cs.meta | 11 +
.../crypto/IDecryptorBuilderProvider.cs | 21 +
.../crypto/IDecryptorBuilderProvider.cs.meta | 11 +
.../crypto/IDerivationFunction.cs | 27 +
.../crypto/IDerivationFunction.cs.meta | 11 +
.../crypto/IDerivationParameters.cs | 15 +
.../crypto/IDerivationParameters.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/IDigest.cs | 57 +
.../BouncyCastle/crypto/IDigest.cs.meta | 11 +
.../BouncyCastle/crypto/IDigestFactory.cs | 29 +
.../crypto/IDigestFactory.cs.meta | 11 +
.../crypto/IEncapsulatedSecretExtractor.cs | 20 +
.../IEncapsulatedSecretExtractor.cs.meta | 11 +
.../crypto/IEncapsulatedSecretGenerator.cs | 16 +
.../IEncapsulatedSecretGenerator.cs.meta | 11 +
.../BouncyCastle/crypto/IEntropySource.cs | 37 +
.../crypto/IEntropySource.cs.meta | 11 +
.../crypto/IEntropySourceProvider.cs | 21 +
.../crypto/IEntropySourceProvider.cs.meta | 11 +
.../BouncyCastle/crypto/IKeyUnwrapper.cs | 28 +
.../BouncyCastle/crypto/IKeyUnwrapper.cs.meta | 11 +
.../BouncyCastle/crypto/IKeyWrapper.cs | 26 +
.../BouncyCastle/crypto/IKeyWrapper.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/IMac.cs | 57 +
.../3rdParty/BouncyCastle/crypto/IMac.cs.meta | 11 +
.../crypto/IMacDerivationFunction.cs | 12 +
.../crypto/IMacDerivationFunction.cs.meta | 11 +
.../BouncyCastle/crypto/IMacFactory.cs | 22 +
.../BouncyCastle/crypto/IMacFactory.cs.meta | 11 +
.../BouncyCastle/crypto/IRawAgreement.cs | 21 +
.../BouncyCastle/crypto/IRawAgreement.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/IRsa.cs | 20 +
.../3rdParty/BouncyCastle/crypto/IRsa.cs.meta | 11 +
.../crypto/ISecretWithEncapsulation.cs | 25 +
.../crypto/ISecretWithEncapsulation.cs.meta | 11 +
.../BouncyCastle/crypto/ISignatureFactory.cs | 23 +
.../crypto/ISignatureFactory.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/ISigner.cs | 49 +
.../BouncyCastle/crypto/ISigner.cs.meta | 11 +
.../crypto/ISignerWithRecovery.cs | 41 +
.../crypto/ISignerWithRecovery.cs.meta | 11 +
.../BouncyCastle/crypto/IStreamCalculator.cs | 26 +
.../crypto/IStreamCalculator.cs.meta | 11 +
.../BouncyCastle/crypto/IStreamCipher.cs | 60 +
.../BouncyCastle/crypto/IStreamCipher.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/IVerifier.cs | 29 +
.../BouncyCastle/crypto/IVerifier.cs.meta | 11 +
.../BouncyCastle/crypto/IVerifierFactory.cs | 23 +
.../crypto/IVerifierFactory.cs.meta | 11 +
.../crypto/IVerifierFactoryProvider.cs | 22 +
.../crypto/IVerifierFactoryProvider.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/IWrapper.cs | 18 +
.../BouncyCastle/crypto/IWrapper.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/IXof.cs | 54 +
.../3rdParty/BouncyCastle/crypto/IXof.cs.meta | 11 +
.../crypto/InvalidCipherTextException.cs | 35 +
.../crypto/InvalidCipherTextException.cs.meta | 11 +
.../crypto/KeyGenerationParameters.cs | 59 +
.../crypto/KeyGenerationParameters.cs.meta | 11 +
.../crypto/MaxBytesExceededException.cs | 37 +
.../crypto/MaxBytesExceededException.cs.meta | 11 +
.../crypto/OutputLengthException.cs | 34 +
.../crypto/OutputLengthException.cs.meta | 11 +
.../crypto/PbeParametersGenerator.cs | 145 +
.../crypto/PbeParametersGenerator.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/Security.cs | 3 +
.../BouncyCastle/crypto/Security.cs.meta | 11 +
.../BouncyCastle/crypto/SimpleBlockResult.cs | 66 +
.../crypto/SimpleBlockResult.cs.meta | 11 +
.../BouncyCastle/crypto/StreamBlockCipher.cs | 116 +
.../crypto/StreamBlockCipher.cs.meta | 11 +
.../BouncyCastle/crypto/agreement.meta | 8 +
.../crypto/agreement/DHAgreement.cs | 98 +
.../crypto/agreement/DHAgreement.cs.meta | 11 +
.../crypto/agreement/DHBasicAgreement.cs | 76 +
.../crypto/agreement/DHBasicAgreement.cs.meta | 11 +
.../crypto/agreement/DHStandardGroups.cs | 253 +
.../crypto/agreement/DHStandardGroups.cs.meta | 11 +
.../crypto/agreement/ECDHBasicAgreement.cs | 78 +
.../agreement/ECDHBasicAgreement.cs.meta | 11 +
.../crypto/agreement/ECDHCBasicAgreement.cs | 76 +
.../agreement/ECDHCBasicAgreement.cs.meta | 11 +
.../agreement/ECDHWithKdfBasicAgreement.cs | 63 +
.../ECDHWithKdfBasicAgreement.cs.meta | 11 +
.../crypto/agreement/ECMqvBasicAgreement.cs | 90 +
.../agreement/ECMqvBasicAgreement.cs.meta | 11 +
.../agreement/ECMqvWithKdfBasicAgreement.cs | 63 +
.../ECMqvWithKdfBasicAgreement.cs.meta | 11 +
.../crypto/agreement/SM2KeyExchange.cs | 278 +
.../crypto/agreement/SM2KeyExchange.cs.meta | 11 +
.../crypto/agreement/X25519Agreement.cs | 42 +
.../crypto/agreement/X25519Agreement.cs.meta | 11 +
.../crypto/agreement/X448Agreement.cs | 42 +
.../crypto/agreement/X448Agreement.cs.meta | 11 +
.../BouncyCastle/crypto/agreement/jpake.meta | 8 +
.../agreement/jpake/JPakeParticipant.cs | 459 ++
.../agreement/jpake/JPakeParticipant.cs.meta | 11 +
.../agreement/jpake/JPakePrimeOrderGroup.cs | 107 +
.../jpake/JPakePrimeOrderGroup.cs.meta | 11 +
.../agreement/jpake/JPakePrimeOrderGroups.cs | 112 +
.../jpake/JPakePrimeOrderGroups.cs.meta | 11 +
.../agreement/jpake/JPakeRound1Payload.cs | 105 +
.../jpake/JPakeRound1Payload.cs.meta | 11 +
.../agreement/jpake/JPakeRound2Payload.cs | 76 +
.../jpake/JPakeRound2Payload.cs.meta | 11 +
.../agreement/jpake/JPakeRound3Payload.cs | 55 +
.../jpake/JPakeRound3Payload.cs.meta | 11 +
.../crypto/agreement/jpake/JPakeUtilities.cs | 394 ++
.../agreement/jpake/JPakeUtilities.cs.meta | 11 +
.../BouncyCastle/crypto/agreement/kdf.meta | 8 +
.../kdf/ConcatenationKdfGenerator.cs | 118 +
.../kdf/ConcatenationKdfGenerator.cs.meta | 11 +
.../crypto/agreement/kdf/DHKdfParameters.cs | 61 +
.../agreement/kdf/DHKdfParameters.cs.meta | 11 +
.../crypto/agreement/kdf/DHKekGenerator.cs | 174 +
.../agreement/kdf/DHKekGenerator.cs.meta | 11 +
.../crypto/agreement/kdf/ECDHKekGenerator.cs | 77 +
.../agreement/kdf/ECDHKekGenerator.cs.meta | 11 +
.../BouncyCastle/crypto/agreement/srp.meta | 8 +
.../crypto/agreement/srp/SRP6Client.cs | 168 +
.../crypto/agreement/srp/SRP6Client.cs.meta | 11 +
.../crypto/agreement/srp/SRP6Server.cs | 167 +
.../crypto/agreement/srp/SRP6Server.cs.meta | 11 +
.../agreement/srp/SRP6StandardGroups.cs | 163 +
.../agreement/srp/SRP6StandardGroups.cs.meta | 11 +
.../crypto/agreement/srp/SRP6Utilities.cs | 222 +
.../agreement/srp/SRP6Utilities.cs.meta | 11 +
.../agreement/srp/SRP6VerifierGenerator.cs | 59 +
.../srp/SRP6VerifierGenerator.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/digests.meta | 8 +
.../crypto/digests/Blake2bDigest.cs | 650 ++
.../crypto/digests/Blake2bDigest.cs.meta | 11 +
.../crypto/digests/Blake2sDigest.cs | 684 ++
.../crypto/digests/Blake2sDigest.cs.meta | 11 +
.../crypto/digests/Blake2xsDigest.cs | 372 ++
.../crypto/digests/Blake2xsDigest.cs.meta | 11 +
.../crypto/digests/Blake3Digest.cs | 1051 +++
.../crypto/digests/Blake3Digest.cs.meta | 11 +
.../crypto/digests/CSHAKEDigest.cs | 131 +
.../crypto/digests/CSHAKEDigest.cs.meta | 11 +
.../crypto/digests/DSTU7564Digest.cs | 631 ++
.../crypto/digests/DSTU7564Digest.cs.meta | 11 +
.../crypto/digests/GOST3411Digest.cs | 396 ++
.../crypto/digests/GOST3411Digest.cs.meta | 11 +
.../crypto/digests/GOST3411_2012Digest.cs | 1096 ++++
.../digests/GOST3411_2012Digest.cs.meta | 11 +
.../crypto/digests/GOST3411_2012_256Digest.cs | 70 +
.../digests/GOST3411_2012_256Digest.cs.meta | 11 +
.../crypto/digests/GOST3411_2012_512Digest.cs | 47 +
.../digests/GOST3411_2012_512Digest.cs.meta | 11 +
.../crypto/digests/GeneralDigest.cs | 187 +
.../crypto/digests/GeneralDigest.cs.meta | 11 +
.../crypto/digests/Haraka256Digest.cs | 218 +
.../crypto/digests/Haraka256Digest.cs.meta | 11 +
.../crypto/digests/Haraka256_X86.cs | 148 +
.../crypto/digests/Haraka256_X86.cs.meta | 11 +
.../crypto/digests/Haraka512Digest.cs | 291 +
.../crypto/digests/Haraka512Digest.cs.meta | 11 +
.../crypto/digests/Haraka512_X86.cs | 244 +
.../crypto/digests/Haraka512_X86.cs.meta | 11 +
.../BouncyCastle/crypto/digests/HarakaBase.cs | 188 +
.../crypto/digests/HarakaBase.cs.meta | 11 +
.../crypto/digests/KeccakDigest.cs | 515 ++
.../crypto/digests/KeccakDigest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/LongDigest.cs | 416 ++
.../crypto/digests/LongDigest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/MD2Digest.cs | 330 +
.../crypto/digests/MD2Digest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/MD4Digest.cs | 297 +
.../crypto/digests/MD4Digest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/MD5Digest.cs | 343 +
.../crypto/digests/MD5Digest.cs.meta | 11 +
.../crypto/digests/NonMemoableDigest.cs | 80 +
.../crypto/digests/NonMemoableDigest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/NullDigest.cs | 90 +
.../crypto/digests/NullDigest.cs.meta | 11 +
.../crypto/digests/ParallelHash.cs | 306 +
.../crypto/digests/ParallelHash.cs.meta | 11 +
.../crypto/digests/RipeMD128Digest.cs | 499 ++
.../crypto/digests/RipeMD128Digest.cs.meta | 11 +
.../crypto/digests/RipeMD160Digest.cs | 461 ++
.../crypto/digests/RipeMD160Digest.cs.meta | 11 +
.../crypto/digests/RipeMD256Digest.cs | 452 ++
.../crypto/digests/RipeMD256Digest.cs.meta | 11 +
.../crypto/digests/RipeMD320Digest.cs | 483 ++
.../crypto/digests/RipeMD320Digest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/SHA3Digest.cs | 98 +
.../crypto/digests/SHA3Digest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/SM3Digest.cs | 344 +
.../crypto/digests/SM3Digest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/Sha1Digest.cs | 314 +
.../crypto/digests/Sha1Digest.cs.meta | 11 +
.../crypto/digests/Sha224Digest.cs | 319 +
.../crypto/digests/Sha224Digest.cs.meta | 11 +
.../crypto/digests/Sha256Digest.cs | 349 +
.../crypto/digests/Sha256Digest.cs.meta | 11 +
.../crypto/digests/Sha384Digest.cs | 122 +
.../crypto/digests/Sha384Digest.cs.meta | 11 +
.../crypto/digests/Sha512Digest.cs | 127 +
.../crypto/digests/Sha512Digest.cs.meta | 11 +
.../crypto/digests/Sha512tDigest.cs | 249 +
.../crypto/digests/Sha512tDigest.cs.meta | 11 +
.../crypto/digests/ShakeDigest.cs | 156 +
.../crypto/digests/ShakeDigest.cs.meta | 11 +
.../crypto/digests/ShortenedDigest.cs | 108 +
.../crypto/digests/ShortenedDigest.cs.meta | 11 +
.../crypto/digests/SkeinDigest.cs | 129 +
.../crypto/digests/SkeinDigest.cs.meta | 11 +
.../crypto/digests/SkeinEngine.cs | 903 +++
.../crypto/digests/SkeinEngine.cs.meta | 11 +
.../crypto/digests/TigerDigest.cs | 932 +++
.../crypto/digests/TigerDigest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/TupleHash.cs | 165 +
.../crypto/digests/TupleHash.cs.meta | 11 +
.../crypto/digests/WhirlpoolDigest.cs | 386 ++
.../crypto/digests/WhirlpoolDigest.cs.meta | 11 +
.../BouncyCastle/crypto/digests/XofUtils.cs | 121 +
.../crypto/digests/XofUtils.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/ec.meta | 8 +
.../crypto/ec/CustomNamedCurves.cs | 925 +++
.../crypto/ec/CustomNamedCurves.cs.meta | 11 +
.../BouncyCastle/crypto/encodings.meta | 8 +
.../crypto/encodings/ISO9796d1Encoding.cs | 267 +
.../encodings/ISO9796d1Encoding.cs.meta | 11 +
.../crypto/encodings/OaepEncoding.cs | 356 +
.../crypto/encodings/OaepEncoding.cs.meta | 11 +
.../crypto/encodings/Pkcs1Encoding.cs | 380 ++
.../crypto/encodings/Pkcs1Encoding.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/engines.meta | 8 +
.../BouncyCastle/crypto/engines/AesEngine.cs | 723 ++
.../crypto/engines/AesEngine.cs.meta | 11 +
.../crypto/engines/AesEngine_X86.cs | 834 +++
.../crypto/engines/AesEngine_X86.cs.meta | 11 +
.../crypto/engines/AesFastEngine.cs | 2 +
.../crypto/engines/AesFastEngine.cs.meta | 11 +
.../crypto/engines/AesLightEngine.cs | 617 ++
.../crypto/engines/AesLightEngine.cs.meta | 11 +
.../crypto/engines/AesWrapEngine.cs | 20 +
.../crypto/engines/AesWrapEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/AriaEngine.cs | 445 ++
.../crypto/engines/AriaEngine.cs.meta | 11 +
.../crypto/engines/BlowfishEngine.cs | 604 ++
.../crypto/engines/BlowfishEngine.cs.meta | 11 +
.../crypto/engines/CamelliaEngine.cs | 714 ++
.../crypto/engines/CamelliaEngine.cs.meta | 11 +
.../crypto/engines/CamelliaLightEngine.cs | 627 ++
.../engines/CamelliaLightEngine.cs.meta | 11 +
.../crypto/engines/CamelliaWrapEngine.cs | 20 +
.../crypto/engines/CamelliaWrapEngine.cs.meta | 11 +
.../crypto/engines/Cast5Engine.cs | 838 +++
.../crypto/engines/Cast5Engine.cs.meta | 11 +
.../crypto/engines/Cast6Engine.cs | 291 +
.../crypto/engines/Cast6Engine.cs.meta | 11 +
.../crypto/engines/ChaCha7539Engine.cs | 525 ++
.../crypto/engines/ChaCha7539Engine.cs.meta | 11 +
.../crypto/engines/ChaChaEngine.cs | 245 +
.../crypto/engines/ChaChaEngine.cs.meta | 11 +
.../crypto/engines/DesEdeEngine.cs | 133 +
.../crypto/engines/DesEdeEngine.cs.meta | 11 +
.../crypto/engines/DesEdeWrapEngine.cs | 325 +
.../crypto/engines/DesEdeWrapEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/DesEngine.cs | 485 ++
.../crypto/engines/DesEngine.cs.meta | 11 +
.../crypto/engines/Dstu7624Engine.cs | 1292 ++++
.../crypto/engines/Dstu7624Engine.cs.meta | 11 +
.../crypto/engines/Dstu7624WrapEngine.cs | 220 +
.../crypto/engines/Dstu7624WrapEngine.cs.meta | 11 +
.../crypto/engines/ElGamalEngine.cs | 174 +
.../crypto/engines/ElGamalEngine.cs.meta | 11 +
.../crypto/engines/GOST28147Engine.cs | 408 ++
.../crypto/engines/GOST28147Engine.cs.meta | 11 +
.../crypto/engines/Grain128AEADEngine.cs | 568 ++
.../crypto/engines/Grain128AEADEngine.cs.meta | 11 +
.../crypto/engines/HC128Engine.cs | 254 +
.../crypto/engines/HC128Engine.cs.meta | 11 +
.../crypto/engines/HC256Engine.cs | 243 +
.../crypto/engines/HC256Engine.cs.meta | 11 +
.../crypto/engines/ISAACEngine.cs | 237 +
.../crypto/engines/ISAACEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/IdeaEngine.cs | 381 ++
.../crypto/engines/IdeaEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/IesEngine.cs | 247 +
.../crypto/engines/IesEngine.cs.meta | 11 +
.../crypto/engines/NaccacheSternEngine.cs | 352 +
.../engines/NaccacheSternEngine.cs.meta | 11 +
.../crypto/engines/NoekeonEngine.cs | 414 ++
.../crypto/engines/NoekeonEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/NullEngine.cs | 2 +
.../crypto/engines/NullEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/RC2Engine.cs | 433 ++
.../crypto/engines/RC2Engine.cs.meta | 11 +
.../crypto/engines/RC2WrapEngine.cs | 371 ++
.../crypto/engines/RC2WrapEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/RC4Engine.cs | 167 +
.../crypto/engines/RC4Engine.cs.meta | 11 +
.../crypto/engines/RC532Engine.cs | 254 +
.../crypto/engines/RC532Engine.cs.meta | 11 +
.../crypto/engines/RC564Engine.cs | 247 +
.../crypto/engines/RC564Engine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/RC6Engine.cs | 399 ++
.../crypto/engines/RC6Engine.cs.meta | 11 +
.../crypto/engines/RFC3211WrapEngine.cs | 179 +
.../crypto/engines/RFC3211WrapEngine.cs.meta | 11 +
.../crypto/engines/RFC3394WrapEngine.cs | 182 +
.../crypto/engines/RFC3394WrapEngine.cs.meta | 11 +
.../crypto/engines/RSABlindedEngine.cs | 155 +
.../crypto/engines/RSABlindedEngine.cs.meta | 11 +
.../crypto/engines/RSABlindingEngine.cs | 154 +
.../crypto/engines/RSABlindingEngine.cs.meta | 11 +
.../crypto/engines/RSACoreEngine.cs | 163 +
.../crypto/engines/RSACoreEngine.cs.meta | 11 +
.../crypto/engines/RijndaelEngine.cs | 795 +++
.../crypto/engines/RijndaelEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/RsaEngine.cs | 90 +
.../crypto/engines/RsaEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/SEEDEngine.cs | 368 ++
.../crypto/engines/SEEDEngine.cs.meta | 11 +
.../crypto/engines/SEEDWrapEngine.cs | 20 +
.../crypto/engines/SEEDWrapEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/SM2Engine.cs | 456 ++
.../crypto/engines/SM2Engine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/SM4Engine.cs | 215 +
.../crypto/engines/SM4Engine.cs.meta | 11 +
.../crypto/engines/Salsa20Engine.cs | 512 ++
.../crypto/engines/Salsa20Engine.cs.meta | 11 +
.../crypto/engines/SerpentEngine.cs | 405 ++
.../crypto/engines/SerpentEngine.cs.meta | 11 +
.../crypto/engines/SerpentEngineBase.cs | 491 ++
.../crypto/engines/SerpentEngineBase.cs.meta | 11 +
.../crypto/engines/SkipjackEngine.cs | 355 +
.../crypto/engines/SkipjackEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/TEAEngine.cs | 209 +
.../crypto/engines/TEAEngine.cs.meta | 11 +
.../crypto/engines/ThreefishEngine.cs | 1430 ++++
.../crypto/engines/ThreefishEngine.cs.meta | 11 +
.../crypto/engines/TnepresEngine.cs | 412 ++
.../crypto/engines/TnepresEngine.cs.meta | 11 +
.../crypto/engines/TwofishEngine.cs | 746 +++
.../crypto/engines/TwofishEngine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/VMPCEngine.cs | 160 +
.../crypto/engines/VMPCEngine.cs.meta | 11 +
.../crypto/engines/VMPCKSA3Engine.cs | 55 +
.../crypto/engines/VMPCKSA3Engine.cs.meta | 11 +
.../crypto/engines/XSalsa20Engine.cs | 68 +
.../crypto/engines/XSalsa20Engine.cs.meta | 11 +
.../BouncyCastle/crypto/engines/XTEAEngine.cs | 207 +
.../crypto/engines/XTEAEngine.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/fpe.meta | 8 +
.../BouncyCastle/crypto/fpe/FpeEngine.cs | 77 +
.../BouncyCastle/crypto/fpe/FpeEngine.cs.meta | 11 +
.../BouncyCastle/crypto/fpe/FpeFf1Engine.cs | 86 +
.../crypto/fpe/FpeFf1Engine.cs.meta | 11 +
.../BouncyCastle/crypto/fpe/FpeFf3_1Engine.cs | 90 +
.../crypto/fpe/FpeFf3_1Engine.cs.meta | 11 +
.../BouncyCastle/crypto/fpe/SP80038G.cs | 653 ++
.../BouncyCastle/crypto/fpe/SP80038G.cs.meta | 11 +
.../BouncyCastle/crypto/generators.meta | 8 +
.../BouncyCastle/crypto/generators/BCrypt.cs | 632 ++
.../crypto/generators/BCrypt.cs.meta | 11 +
.../generators/BaseKdfBytesGenerator.cs | 194 +
.../generators/BaseKdfBytesGenerator.cs.meta | 11 +
.../generators/DHBasicKeyPairGenerator.cs | 42 +
.../DHBasicKeyPairGenerator.cs.meta | 11 +
.../crypto/generators/DHKeyGeneratorHelper.cs | 76 +
.../generators/DHKeyGeneratorHelper.cs.meta | 11 +
.../crypto/generators/DHKeyPairGenerator.cs | 42 +
.../generators/DHKeyPairGenerator.cs.meta | 11 +
.../generators/DHParametersGenerator.cs | 49 +
.../generators/DHParametersGenerator.cs.meta | 11 +
.../crypto/generators/DHParametersHelper.cs | 160 +
.../generators/DHParametersHelper.cs.meta | 11 +
.../crypto/generators/DesEdeKeyGenerator.cs | 70 +
.../generators/DesEdeKeyGenerator.cs.meta | 11 +
.../crypto/generators/DesKeyGenerator.cs | 60 +
.../crypto/generators/DesKeyGenerator.cs.meta | 11 +
.../crypto/generators/DsaKeyPairGenerator.cs | 76 +
.../generators/DsaKeyPairGenerator.cs.meta | 11 +
.../generators/DsaParametersGenerator.cs | 359 +
.../generators/DsaParametersGenerator.cs.meta | 11 +
.../crypto/generators/ECKeyPairGenerator.cs | 190 +
.../generators/ECKeyPairGenerator.cs.meta | 11 +
.../generators/Ed25519KeyPairGenerator.cs | 29 +
.../Ed25519KeyPairGenerator.cs.meta | 11 +
.../generators/Ed448KeyPairGenerator.cs | 29 +
.../generators/Ed448KeyPairGenerator.cs.meta | 11 +
.../generators/ElGamalKeyPairGenerator.cs | 44 +
.../ElGamalKeyPairGenerator.cs.meta | 11 +
.../generators/ElGamalParametersGenerator.cs | 50 +
.../ElGamalParametersGenerator.cs.meta | 11 +
.../generators/GOST3410KeyPairGenerator.cs | 86 +
.../GOST3410KeyPairGenerator.cs.meta | 11 +
.../generators/GOST3410ParametersGenerator.cs | 534 ++
.../GOST3410ParametersGenerator.cs.meta | 11 +
.../crypto/generators/HKDFBytesGenerator.cs | 180 +
.../generators/HKDFBytesGenerator.cs.meta | 11 +
.../generators/KDFCounterBytesGenerator.cs | 166 +
.../KDFCounterBytesGenerator.cs.meta | 11 +
...DFDoublePipelineIterationBytesGenerator.cs | 197 +
...blePipelineIterationBytesGenerator.cs.meta | 11 +
.../generators/KDFFeedbackBytesGenerator.cs | 193 +
.../KDFFeedbackBytesGenerator.cs.meta | 11 +
.../crypto/generators/Kdf1BytesGenerator.cs | 25 +
.../generators/Kdf1BytesGenerator.cs.meta | 11 +
.../crypto/generators/Kdf2BytesGenerator.cs | 26 +
.../generators/Kdf2BytesGenerator.cs.meta | 11 +
.../crypto/generators/Mgf1BytesGenerator.cs | 116 +
.../generators/Mgf1BytesGenerator.cs.meta | 11 +
.../NaccacheSternKeyPairGenerator.cs | 263 +
.../NaccacheSternKeyPairGenerator.cs.meta | 11 +
.../crypto/generators/OpenBsdBCrypt.cs | 305 +
.../crypto/generators/OpenBsdBCrypt.cs.meta | 11 +
.../OpenSSLPBEParametersGenerator.cs | 144 +
.../OpenSSLPBEParametersGenerator.cs.meta | 11 +
.../generators/Pkcs12ParametersGenerator.cs | 207 +
.../Pkcs12ParametersGenerator.cs.meta | 11 +
.../generators/Pkcs5S1ParametersGenerator.cs | 122 +
.../Pkcs5S1ParametersGenerator.cs.meta | 11 +
.../generators/Pkcs5S2ParametersGenerator.cs | 148 +
.../Pkcs5S2ParametersGenerator.cs.meta | 11 +
.../crypto/generators/Poly1305KeyGenerator.cs | 120 +
.../generators/Poly1305KeyGenerator.cs.meta | 11 +
.../generators/RSABlindingFactorGenerator.cs | 70 +
.../RSABlindingFactorGenerator.cs.meta | 11 +
.../crypto/generators/RsaKeyPairGenerator.cs | 167 +
.../generators/RsaKeyPairGenerator.cs.meta | 11 +
.../BouncyCastle/crypto/generators/SCrypt.cs | 276 +
.../crypto/generators/SCrypt.cs.meta | 11 +
.../generators/X25519KeyPairGenerator.cs | 29 +
.../generators/X25519KeyPairGenerator.cs.meta | 11 +
.../crypto/generators/X448KeyPairGenerator.cs | 29 +
.../generators/X448KeyPairGenerator.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/io.meta | 8 +
.../BouncyCastle/crypto/io/CipherStream.cs | 329 +
.../crypto/io/CipherStream.cs.meta | 11 +
.../BouncyCastle/crypto/io/DigestSink.cs | 48 +
.../BouncyCastle/crypto/io/DigestSink.cs.meta | 11 +
.../BouncyCastle/crypto/io/DigestStream.cs | 164 +
.../crypto/io/DigestStream.cs.meta | 11 +
.../BouncyCastle/crypto/io/MacSink.cs | 48 +
.../BouncyCastle/crypto/io/MacSink.cs.meta | 11 +
.../BouncyCastle/crypto/io/MacStream.cs | 164 +
.../BouncyCastle/crypto/io/MacStream.cs.meta | 11 +
.../BouncyCastle/crypto/io/SignerSink.cs | 48 +
.../BouncyCastle/crypto/io/SignerSink.cs.meta | 11 +
.../BouncyCastle/crypto/io/SignerStream.cs | 164 +
.../crypto/io/SignerStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/macs.meta | 8 +
.../3rdParty/BouncyCastle/crypto/macs/CMac.cs | 321 +
.../BouncyCastle/crypto/macs/CMac.cs.meta | 11 +
.../crypto/macs/CbcBlockCipherMac.cs | 276 +
.../crypto/macs/CbcBlockCipherMac.cs.meta | 11 +
.../crypto/macs/CfbBlockCipherMac.cs | 434 ++
.../crypto/macs/CfbBlockCipherMac.cs.meta | 11 +
.../BouncyCastle/crypto/macs/DSTU7564Mac.cs | 176 +
.../crypto/macs/DSTU7564Mac.cs.meta | 11 +
.../BouncyCastle/crypto/macs/DSTU7624Mac.cs | 225 +
.../crypto/macs/DSTU7624Mac.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/macs/GMac.cs | 133 +
.../BouncyCastle/crypto/macs/GMac.cs.meta | 11 +
.../BouncyCastle/crypto/macs/GOST28147Mac.cs | 377 ++
.../crypto/macs/GOST28147Mac.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/macs/HMac.cs | 203 +
.../BouncyCastle/crypto/macs/HMac.cs.meta | 11 +
.../crypto/macs/ISO9797Alg3Mac.cs | 353 +
.../crypto/macs/ISO9797Alg3Mac.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/macs/KMac.cs | 248 +
.../BouncyCastle/crypto/macs/KMac.cs.meta | 11 +
.../BouncyCastle/crypto/macs/Poly1305.cs | 387 ++
.../BouncyCastle/crypto/macs/Poly1305.cs.meta | 11 +
.../BouncyCastle/crypto/macs/SipHash.cs | 258 +
.../BouncyCastle/crypto/macs/SipHash.cs.meta | 11 +
.../BouncyCastle/crypto/macs/SkeinMac.cs | 135 +
.../BouncyCastle/crypto/macs/SkeinMac.cs.meta | 11 +
.../BouncyCastle/crypto/macs/VMPCMac.cs | 242 +
.../BouncyCastle/crypto/macs/VMPCMac.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/modes.meta | 8 +
.../crypto/modes/CbcBlockCipher.cs | 221 +
.../crypto/modes/CbcBlockCipher.cs.meta | 11 +
.../crypto/modes/CcmBlockCipher.cs | 659 ++
.../crypto/modes/CcmBlockCipher.cs.meta | 11 +
.../crypto/modes/CfbBlockCipher.cs | 230 +
.../crypto/modes/CfbBlockCipher.cs.meta | 11 +
.../crypto/modes/ChaCha20Poly1305.cs | 905 +++
.../crypto/modes/ChaCha20Poly1305.cs.meta | 11 +
.../crypto/modes/CtsBlockCipher.cs | 353 +
.../crypto/modes/CtsBlockCipher.cs.meta | 11 +
.../crypto/modes/EAXBlockCipher.cs | 506 ++
.../crypto/modes/EAXBlockCipher.cs.meta | 11 +
.../crypto/modes/EcbBlockCipher.cs | 62 +
.../crypto/modes/EcbBlockCipher.cs.meta | 11 +
.../crypto/modes/GCMBlockCipher.cs | 1505 +++++
.../crypto/modes/GCMBlockCipher.cs.meta | 11 +
.../crypto/modes/GOFBBlockCipher.cs | 234 +
.../crypto/modes/GOFBBlockCipher.cs.meta | 11 +
.../crypto/modes/GcmSivBlockCipher.cs | 1075 +++
.../crypto/modes/GcmSivBlockCipher.cs.meta | 11 +
.../crypto/modes/IAeadBlockCipher.cs | 19 +
.../crypto/modes/IAeadBlockCipher.cs.meta | 11 +
.../BouncyCastle/crypto/modes/IAeadCipher.cs | 134 +
.../crypto/modes/IAeadCipher.cs.meta | 11 +
.../crypto/modes/IBlockCipherMode.cs | 23 +
.../crypto/modes/IBlockCipherMode.cs.meta | 11 +
.../crypto/modes/KCcmBlockCipher.cs | 668 ++
.../crypto/modes/KCcmBlockCipher.cs.meta | 11 +
.../crypto/modes/KCtrBlockCipher.cs | 250 +
.../crypto/modes/KCtrBlockCipher.cs.meta | 11 +
.../crypto/modes/OCBBlockCipher.cs | 734 +++
.../crypto/modes/OCBBlockCipher.cs.meta | 11 +
.../crypto/modes/OfbBlockCipher.cs | 182 +
.../crypto/modes/OfbBlockCipher.cs.meta | 11 +
.../crypto/modes/OpenPgpCfbBlockCipher.cs | 409 ++
.../modes/OpenPgpCfbBlockCipher.cs.meta | 11 +
.../crypto/modes/SicBlockCipher.cs | 139 +
.../crypto/modes/SicBlockCipher.cs.meta | 11 +
.../BouncyCastle/crypto/modes/gcm.meta | 8 +
.../crypto/modes/gcm/BasicGcmExponentiator.cs | 42 +
.../modes/gcm/BasicGcmExponentiator.cs.meta | 11 +
.../crypto/modes/gcm/BasicGcmMultiplier.cs | 26 +
.../modes/gcm/BasicGcmMultiplier.cs.meta | 11 +
.../crypto/modes/gcm/GcmUtilities.cs | 302 +
.../crypto/modes/gcm/GcmUtilities.cs.meta | 11 +
.../crypto/modes/gcm/IGcmExponentiator.cs | 14 +
.../modes/gcm/IGcmExponentiator.cs.meta | 11 +
.../crypto/modes/gcm/IGcmMultiplier.cs | 14 +
.../crypto/modes/gcm/IGcmMultiplier.cs.meta | 11 +
.../modes/gcm/Tables1kGcmExponentiator.cs | 63 +
.../gcm/Tables1kGcmExponentiator.cs.meta | 11 +
.../crypto/modes/gcm/Tables4kGcmMultiplier.cs | 72 +
.../modes/gcm/Tables4kGcmMultiplier.cs.meta | 11 +
.../modes/gcm/Tables64kGcmMultiplier.cs | 84 +
.../modes/gcm/Tables64kGcmMultiplier.cs.meta | 11 +
.../crypto/modes/gcm/Tables8kGcmMultiplier.cs | 93 +
.../modes/gcm/Tables8kGcmMultiplier.cs.meta | 11 +
.../BouncyCastle/crypto/operators.meta | 8 +
.../crypto/operators/Asn1CipherBuilder.cs | 97 +
.../operators/Asn1CipherBuilder.cs.meta | 11 +
.../crypto/operators/Asn1DigestFactory.cs | 76 +
.../operators/Asn1DigestFactory.cs.meta | 11 +
.../crypto/operators/Asn1KeyWrapper.cs | 318 +
.../crypto/operators/Asn1KeyWrapper.cs.meta | 11 +
.../crypto/operators/Asn1Signature.cs | 421 ++
.../crypto/operators/Asn1Signature.cs.meta | 11 +
.../operators/CmsContentEncryptorBuilder.cs | 61 +
.../CmsContentEncryptorBuilder.cs.meta | 11 +
.../CmsKeyTransRecipientInfoGenerator.cs | 34 +
.../CmsKeyTransRecipientInfoGenerator.cs.meta | 11 +
.../operators/DefaultSignatureCalculator.cs | 32 +
.../DefaultSignatureCalculator.cs.meta | 11 +
.../operators/DefaultSignatureResult.cs | 40 +
.../operators/DefaultSignatureResult.cs.meta | 11 +
.../operators/DefaultVerifierCalculator.cs | 32 +
.../DefaultVerifierCalculator.cs.meta | 11 +
.../crypto/operators/DefaultVerifierResult.cs | 33 +
.../operators/DefaultVerifierResult.cs.meta | 11 +
.../crypto/operators/GenericKey.cs | 44 +
.../crypto/operators/GenericKey.cs.meta | 11 +
.../BouncyCastle/crypto/paddings.meta | 8 +
.../crypto/paddings/BlockCipherPadding.cs | 3 +
.../paddings/BlockCipherPadding.cs.meta | 11 +
.../crypto/paddings/IBlockCipherPadding.cs | 47 +
.../paddings/IBlockCipherPadding.cs.meta | 11 +
.../crypto/paddings/ISO10126d2Padding.cs | 93 +
.../crypto/paddings/ISO10126d2Padding.cs.meta | 11 +
.../crypto/paddings/ISO7816d4Padding.cs | 101 +
.../crypto/paddings/ISO7816d4Padding.cs.meta | 11 +
.../paddings/PaddedBufferedBlockCipher.cs | 388 ++
.../PaddedBufferedBlockCipher.cs.meta | 11 +
.../crypto/paddings/Pkcs7Padding.cs | 98 +
.../crypto/paddings/Pkcs7Padding.cs.meta | 11 +
.../crypto/paddings/TbcPadding.cs | 105 +
.../crypto/paddings/TbcPadding.cs.meta | 11 +
.../crypto/paddings/X923Padding.cs | 107 +
.../crypto/paddings/X923Padding.cs.meta | 11 +
.../crypto/paddings/ZeroBytePadding.cs | 86 +
.../crypto/paddings/ZeroBytePadding.cs.meta | 11 +
.../BouncyCastle/crypto/parameters.meta | 8 +
.../crypto/parameters/AEADParameters.cs | 69 +
.../crypto/parameters/AEADParameters.cs.meta | 11 +
.../crypto/parameters/Blake3Parameters.cs | 62 +
.../parameters/Blake3Parameters.cs.meta | 11 +
.../parameters/DHKeyGenerationParameters.cs | 35 +
.../DHKeyGenerationParameters.cs.meta | 11 +
.../crypto/parameters/DHKeyParameters.cs | 80 +
.../crypto/parameters/DHKeyParameters.cs.meta | 11 +
.../crypto/parameters/DHParameters.cs | 189 +
.../crypto/parameters/DHParameters.cs.meta | 11 +
.../parameters/DHPrivateKeyParameters.cs | 64 +
.../parameters/DHPrivateKeyParameters.cs.meta | 11 +
.../parameters/DHPublicKeyParameters.cs | 171 +
.../parameters/DHPublicKeyParameters.cs.meta | 11 +
.../parameters/DHValidationParameters.cs | 63 +
.../parameters/DHValidationParameters.cs.meta | 11 +
.../DSAParameterGenerationParameters.cs | 78 +
.../DSAParameterGenerationParameters.cs.meta | 11 +
.../crypto/parameters/DesEdeParameters.cs | 144 +
.../parameters/DesEdeParameters.cs.meta | 11 +
.../crypto/parameters/DesParameters.cs | 153 +
.../crypto/parameters/DesParameters.cs.meta | 11 +
.../parameters/DsaKeyGenerationParameters.cs | 30 +
.../DsaKeyGenerationParameters.cs.meta | 11 +
.../crypto/parameters/DsaKeyParameters.cs | 63 +
.../parameters/DsaKeyParameters.cs.meta | 11 +
.../crypto/parameters/DsaParameters.cs | 89 +
.../crypto/parameters/DsaParameters.cs.meta | 11 +
.../parameters/DsaPrivateKeyParameters.cs | 57 +
.../DsaPrivateKeyParameters.cs.meta | 11 +
.../parameters/DsaPublicKeyParameters.cs | 72 +
.../parameters/DsaPublicKeyParameters.cs.meta | 11 +
.../parameters/DsaValidationParameters.cs | 76 +
.../DsaValidationParameters.cs.meta | 11 +
.../crypto/parameters/ECDomainParameters.cs | 175 +
.../parameters/ECDomainParameters.cs.meta | 11 +
.../crypto/parameters/ECGOST3410Parameters.cs | 57 +
.../parameters/ECGOST3410Parameters.cs.meta | 11 +
.../parameters/ECKeyGenerationParameters.cs | 45 +
.../ECKeyGenerationParameters.cs.meta | 11 +
.../crypto/parameters/ECKeyParameters.cs | 138 +
.../crypto/parameters/ECKeyParameters.cs.meta | 11 +
.../parameters/ECNamedDomainParameters.cs | 53 +
.../ECNamedDomainParameters.cs.meta | 11 +
.../parameters/ECPrivateKeyParameters.cs | 73 +
.../parameters/ECPrivateKeyParameters.cs.meta | 11 +
.../parameters/ECPublicKeyParameters.cs | 72 +
.../parameters/ECPublicKeyParameters.cs.meta | 11 +
.../Ed25519KeyGenerationParameters.cs | 19 +
.../Ed25519KeyGenerationParameters.cs.meta | 11 +
.../parameters/Ed25519PrivateKeyParameters.cs | 144 +
.../Ed25519PrivateKeyParameters.cs.meta | 11 +
.../parameters/Ed25519PublicKeyParameters.cs | 75 +
.../Ed25519PublicKeyParameters.cs.meta | 11 +
.../Ed448KeyGenerationParameters.cs | 19 +
.../Ed448KeyGenerationParameters.cs.meta | 11 +
.../parameters/Ed448PrivateKeyParameters.cs | 136 +
.../Ed448PrivateKeyParameters.cs.meta | 11 +
.../parameters/Ed448PublicKeyParameters.cs | 75 +
.../Ed448PublicKeyParameters.cs.meta | 11 +
.../ElGamalKeyGenerationParameters.cs | 35 +
.../ElGamalKeyGenerationParameters.cs.meta | 11 +
.../crypto/parameters/ElGamalKeyParameters.cs | 63 +
.../parameters/ElGamalKeyParameters.cs.meta | 11 +
.../crypto/parameters/ElGamalParameters.cs | 85 +
.../parameters/ElGamalParameters.cs.meta | 11 +
.../parameters/ElGamalPrivateKeyParameters.cs | 57 +
.../ElGamalPrivateKeyParameters.cs.meta | 11 +
.../parameters/ElGamalPublicKeyParameters.cs | 57 +
.../ElGamalPublicKeyParameters.cs.meta | 11 +
.../crypto/parameters/FpeParameters.cs | 53 +
.../crypto/parameters/FpeParameters.cs.meta | 11 +
.../GOST3410KeyGenerationParameters.cs | 59 +
.../GOST3410KeyGenerationParameters.cs.meta | 11 +
.../parameters/GOST3410KeyParameters.cs | 62 +
.../parameters/GOST3410KeyParameters.cs.meta | 11 +
.../crypto/parameters/GOST3410Parameters.cs | 90 +
.../parameters/GOST3410Parameters.cs.meta | 11 +
.../GOST3410PrivateKeyParameters.cs | 45 +
.../GOST3410PrivateKeyParameters.cs.meta | 11 +
.../parameters/GOST3410PublicKeyParameters.cs | 44 +
.../GOST3410PublicKeyParameters.cs.meta | 11 +
.../GOST3410ValidationParameters.cs | 55 +
.../GOST3410ValidationParameters.cs.meta | 11 +
.../crypto/parameters/HKDFParameters.cs | 123 +
.../crypto/parameters/HKDFParameters.cs.meta | 11 +
.../parameters/ISO18033KDFParameters.cs | 29 +
.../parameters/ISO18033KDFParameters.cs.meta | 11 +
.../crypto/parameters/IesParameters.cs | 53 +
.../crypto/parameters/IesParameters.cs.meta | 11 +
.../parameters/IesWithCipherParameters.cs | 37 +
.../IesWithCipherParameters.cs.meta | 11 +
.../crypto/parameters/KDFCounterParameters.cs | 96 +
.../parameters/KDFCounterParameters.cs.meta | 11 +
.../KDFDoublePipelineIterationParameters.cs | 81 +
...FDoublePipelineIterationParameters.cs.meta | 11 +
.../parameters/KDFFeedbackParameters.cs | 96 +
.../parameters/KDFFeedbackParameters.cs.meta | 11 +
.../crypto/parameters/KdfParameters.cs | 35 +
.../crypto/parameters/KdfParameters.cs.meta | 11 +
.../crypto/parameters/KeyParameter.cs | 49 +
.../crypto/parameters/KeyParameter.cs.meta | 11 +
.../crypto/parameters/MgfParameters.cs | 46 +
.../crypto/parameters/MgfParameters.cs.meta | 11 +
.../crypto/parameters/MqvPrivateParameters.cs | 71 +
.../parameters/MqvPrivateParameters.cs.meta | 11 +
.../crypto/parameters/MqvPublicParameters.cs | 40 +
.../parameters/MqvPublicParameters.cs.meta | 11 +
.../NaccacheSternKeyGenerationParameters.cs | 70 +
...ccacheSternKeyGenerationParameters.cs.meta | 11 +
.../parameters/NaccacheSternKeyParameters.cs | 48 +
.../NaccacheSternKeyParameters.cs.meta | 11 +
.../NaccacheSternPrivateKeyParameters.cs | 60 +
.../NaccacheSternPrivateKeyParameters.cs.meta | 11 +
.../crypto/parameters/ParametersWithID.cs | 43 +
.../parameters/ParametersWithID.cs.meta | 11 +
.../crypto/parameters/ParametersWithIV.cs | 43 +
.../parameters/ParametersWithIV.cs.meta | 11 +
.../crypto/parameters/ParametersWithRandom.cs | 37 +
.../parameters/ParametersWithRandom.cs.meta | 11 +
.../crypto/parameters/ParametersWithSBox.cs | 28 +
.../parameters/ParametersWithSBox.cs.meta | 11 +
.../crypto/parameters/ParametersWithSalt.cs | 46 +
.../parameters/ParametersWithSalt.cs.meta | 11 +
.../crypto/parameters/RC2Parameters.cs | 51 +
.../crypto/parameters/RC2Parameters.cs.meta | 11 +
.../crypto/parameters/RC5Parameters.cs | 31 +
.../crypto/parameters/RC5Parameters.cs.meta | 11 +
.../parameters/RSABlindingParameters.cs | 38 +
.../parameters/RSABlindingParameters.cs.meta | 11 +
.../parameters/RsaKeyGenerationParameters.cs | 59 +
.../RsaKeyGenerationParameters.cs.meta | 11 +
.../crypto/parameters/RsaKeyParameters.cs | 110 +
.../parameters/RsaKeyParameters.cs.meta | 11 +
.../parameters/RsaPrivateCrtKeyParameters.cs | 122 +
.../RsaPrivateCrtKeyParameters.cs.meta | 11 +
.../SM2KeyExchangePrivateParameters.cs | 71 +
.../SM2KeyExchangePrivateParameters.cs.meta | 11 +
.../SM2KeyExchangePublicParameters.cs | 44 +
.../SM2KeyExchangePublicParameters.cs.meta | 11 +
.../crypto/parameters/SkeinParameters.cs | 282 +
.../crypto/parameters/SkeinParameters.cs.meta | 11 +
.../crypto/parameters/Srp6GroupParameters.cs | 31 +
.../parameters/Srp6GroupParameters.cs.meta | 11 +
.../TweakableBlockCipherParameters.cs | 44 +
.../TweakableBlockCipherParameters.cs.meta | 11 +
.../X25519KeyGenerationParameters.cs | 19 +
.../X25519KeyGenerationParameters.cs.meta | 11 +
.../parameters/X25519PrivateKeyParameters.cs | 118 +
.../X25519PrivateKeyParameters.cs.meta | 11 +
.../parameters/X25519PublicKeyParameters.cs | 75 +
.../X25519PublicKeyParameters.cs.meta | 11 +
.../parameters/X448KeyGenerationParameters.cs | 19 +
.../X448KeyGenerationParameters.cs.meta | 11 +
.../parameters/X448PrivateKeyParameters.cs | 118 +
.../X448PrivateKeyParameters.cs.meta | 11 +
.../parameters/X448PublicKeyParameters.cs | 75 +
.../X448PublicKeyParameters.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/prng.meta | 8 +
.../crypto/prng/BasicEntropySourceProvider.cs | 90 +
.../prng/BasicEntropySourceProvider.cs.meta | 11 +
.../prng/CryptoApiEntropySourceProvider.cs | 80 +
.../CryptoApiEntropySourceProvider.cs.meta | 11 +
.../crypto/prng/CryptoApiRandomGenerator.cs | 94 +
.../prng/CryptoApiRandomGenerator.cs.meta | 11 +
.../crypto/prng/DigestRandomGenerator.cs | 187 +
.../crypto/prng/DigestRandomGenerator.cs.meta | 11 +
.../crypto/prng/EntropyUtilities.cs | 34 +
.../crypto/prng/EntropyUtilities.cs.meta | 11 +
.../BouncyCastle/crypto/prng/IDrbgProvider.cs | 15 +
.../crypto/prng/IDrbgProvider.cs.meta | 11 +
.../crypto/prng/IRandomGenerator.cs | 38 +
.../crypto/prng/IRandomGenerator.cs.meta | 11 +
.../crypto/prng/ReversedWindowGenerator.cs | 2 +
.../prng/ReversedWindowGenerator.cs.meta | 11 +
.../crypto/prng/SP800SecureRandom.cs | 135 +
.../crypto/prng/SP800SecureRandom.cs.meta | 11 +
.../crypto/prng/SP800SecureRandomBuilder.cs | 215 +
.../prng/SP800SecureRandomBuilder.cs.meta | 11 +
.../crypto/prng/VMPCRandomGenerator.cs | 144 +
.../crypto/prng/VMPCRandomGenerator.cs.meta | 11 +
.../BouncyCastle/crypto/prng/X931Rng.cs | 206 +
.../BouncyCastle/crypto/prng/X931Rng.cs.meta | 11 +
.../crypto/prng/X931SecureRandom.cs | 104 +
.../crypto/prng/X931SecureRandom.cs.meta | 11 +
.../crypto/prng/X931SecureRandomBuilder.cs | 94 +
.../prng/X931SecureRandomBuilder.cs.meta | 11 +
.../BouncyCastle/crypto/prng/drbg.meta | 8 +
.../crypto/prng/drbg/CtrSP800Drbg.cs | 775 +++
.../crypto/prng/drbg/CtrSP800Drbg.cs.meta | 11 +
.../crypto/prng/drbg/DrbgUtilities.cs | 115 +
.../crypto/prng/drbg/DrbgUtilities.cs.meta | 11 +
.../crypto/prng/drbg/HMacSP800Drbg.cs | 351 +
.../crypto/prng/drbg/HMacSP800Drbg.cs.meta | 11 +
.../crypto/prng/drbg/HashSP800Drbg.cs | 502 ++
.../crypto/prng/drbg/HashSP800Drbg.cs.meta | 11 +
.../crypto/prng/drbg/ISP80090Drbg.cs | 49 +
.../crypto/prng/drbg/ISP80090Drbg.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/signers.meta | 8 +
.../crypto/signers/DsaDigestSigner.cs | 130 +
.../crypto/signers/DsaDigestSigner.cs.meta | 11 +
.../BouncyCastle/crypto/signers/DsaSigner.cs | 165 +
.../crypto/signers/DsaSigner.cs.meta | 11 +
.../crypto/signers/ECDsaSigner.cs | 249 +
.../crypto/signers/ECDsaSigner.cs.meta | 11 +
.../crypto/signers/ECGOST3410Signer.cs | 155 +
.../crypto/signers/ECGOST3410Signer.cs.meta | 11 +
.../BouncyCastle/crypto/signers/ECNRSigner.cs | 193 +
.../crypto/signers/ECNRSigner.cs.meta | 11 +
.../crypto/signers/Ed25519Signer.cs | 134 +
.../crypto/signers/Ed25519Signer.cs.meta | 11 +
.../crypto/signers/Ed25519ctxSigner.cs | 137 +
.../crypto/signers/Ed25519ctxSigner.cs.meta | 11 +
.../crypto/signers/Ed25519phSigner.cs | 102 +
.../crypto/signers/Ed25519phSigner.cs.meta | 11 +
.../crypto/signers/Ed448Signer.cs | 137 +
.../crypto/signers/Ed448Signer.cs.meta | 11 +
.../crypto/signers/Ed448phSigner.cs | 102 +
.../crypto/signers/Ed448phSigner.cs.meta | 11 +
.../crypto/signers/GOST3410DigestSigner.cs | 137 +
.../signers/GOST3410DigestSigner.cs.meta | 11 +
.../crypto/signers/GOST3410Signer.cs | 128 +
.../crypto/signers/GOST3410Signer.cs.meta | 11 +
.../crypto/signers/GenericSigner.cs | 127 +
.../crypto/signers/GenericSigner.cs.meta | 11 +
.../crypto/signers/HMacDsaKCalculator.cs | 169 +
.../crypto/signers/HMacDsaKCalculator.cs.meta | 11 +
.../crypto/signers/IDsaEncoding.cs | 29 +
.../crypto/signers/IDsaEncoding.cs.meta | 11 +
.../crypto/signers/IDsaKCalculator.cs | 48 +
.../crypto/signers/IDsaKCalculator.cs.meta | 11 +
.../crypto/signers/Iso9796d2PssSigner.cs | 617 ++
.../crypto/signers/Iso9796d2PssSigner.cs.meta | 11 +
.../crypto/signers/Iso9796d2Signer.cs | 554 ++
.../crypto/signers/Iso9796d2Signer.cs.meta | 11 +
.../crypto/signers/IsoTrailers.cs | 57 +
.../crypto/signers/IsoTrailers.cs.meta | 11 +
.../crypto/signers/PlainDsaEncoding.cs | 62 +
.../crypto/signers/PlainDsaEncoding.cs.meta | 11 +
.../BouncyCastle/crypto/signers/PssSigner.cs | 411 ++
.../crypto/signers/PssSigner.cs.meta | 11 +
.../crypto/signers/RandomDsaKCalculator.cs | 48 +
.../signers/RandomDsaKCalculator.cs.meta | 11 +
.../crypto/signers/RsaDigestSigner.cs | 229 +
.../crypto/signers/RsaDigestSigner.cs.meta | 11 +
.../BouncyCastle/crypto/signers/SM2Signer.cs | 268 +
.../crypto/signers/SM2Signer.cs.meta | 11 +
.../crypto/signers/StandardDsaEncoding.cs | 60 +
.../signers/StandardDsaEncoding.cs.meta | 11 +
.../BouncyCastle/crypto/signers/X931Signer.cs | 203 +
.../crypto/signers/X931Signer.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/util.meta | 8 +
.../crypto/util/AlgorithmIdentifierFactory.cs | 110 +
.../util/AlgorithmIdentifierFactory.cs.meta | 11 +
.../crypto/util/BasicAlphabetMapper.cs | 112 +
.../crypto/util/BasicAlphabetMapper.cs.meta | 11 +
.../BouncyCastle/crypto/util/CipherFactory.cs | 149 +
.../crypto/util/CipherFactory.cs.meta | 11 +
.../crypto/util/CipherKeyGeneratorFactory.cs | 95 +
.../util/CipherKeyGeneratorFactory.cs.meta | 11 +
.../3rdParty/BouncyCastle/crypto/util/Pack.cs | 760 +++
.../BouncyCastle/crypto/util/Pack.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/math.meta | 8 +
.../3rdParty/BouncyCastle/math/BigInteger.cs | 3803 +++++++++++
.../BouncyCastle/math/BigInteger.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/Primes.cs | 548 ++
.../3rdParty/BouncyCastle/math/Primes.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/ec.meta | 8 +
.../math/ec/AbstractECLookupTable.cs | 20 +
.../math/ec/AbstractECLookupTable.cs.meta | 11 +
.../BouncyCastle/math/ec/ECAlgorithms.cs | 614 ++
.../BouncyCastle/math/ec/ECAlgorithms.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/ec/ECCurve.cs | 1518 +++++
.../BouncyCastle/math/ec/ECCurve.cs.meta | 11 +
.../BouncyCastle/math/ec/ECFieldElement.cs | 945 +++
.../math/ec/ECFieldElement.cs.meta | 11 +
.../BouncyCastle/math/ec/ECLookupTable.cs | 15 +
.../math/ec/ECLookupTable.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/ec/ECPoint.cs | 2187 +++++++
.../BouncyCastle/math/ec/ECPoint.cs.meta | 11 +
.../BouncyCastle/math/ec/ECPointMap.cs | 13 +
.../BouncyCastle/math/ec/ECPointMap.cs.meta | 11 +
.../BouncyCastle/math/ec/LongArray.cs | 1295 ++++
.../BouncyCastle/math/ec/LongArray.cs.meta | 11 +
.../math/ec/ScaleXNegateYPointMap.cs | 24 +
.../math/ec/ScaleXNegateYPointMap.cs.meta | 11 +
.../BouncyCastle/math/ec/ScaleXPointMap.cs | 24 +
.../math/ec/ScaleXPointMap.cs.meta | 11 +
.../math/ec/ScaleYNegateXPointMap.cs | 24 +
.../math/ec/ScaleYNegateXPointMap.cs.meta | 11 +
.../BouncyCastle/math/ec/ScaleYPointMap.cs | 24 +
.../math/ec/ScaleYPointMap.cs.meta | 11 +
.../BouncyCastle/math/ec/SimpleLookupTable.cs | 44 +
.../math/ec/SimpleLookupTable.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/ec/abc.meta | 8 +
.../math/ec/abc/SimpleBigDecimal.cs | 245 +
.../math/ec/abc/SimpleBigDecimal.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/ec/abc/Tnaf.cs | 849 +++
.../BouncyCastle/math/ec/abc/Tnaf.cs.meta | 11 +
.../BouncyCastle/math/ec/abc/ZTauElement.cs | 40 +
.../math/ec/abc/ZTauElement.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/ec/custom.meta | 8 +
.../BouncyCastle/math/ec/custom/djb.meta | 8 +
.../math/ec/custom/djb/Curve25519.cs | 3 +
.../math/ec/custom/djb/Curve25519.cs.meta | 11 +
.../math/ec/custom/djb/Curve25519Point.cs | 3 +
.../ec/custom/djb/Curve25519Point.cs.meta | 11 +
.../BouncyCastle/math/ec/custom/gm.meta | 8 +
.../math/ec/custom/gm/SM2P256V1Curve.cs | 174 +
.../math/ec/custom/gm/SM2P256V1Curve.cs.meta | 11 +
.../math/ec/custom/gm/SM2P256V1Field.cs | 349 +
.../math/ec/custom/gm/SM2P256V1Field.cs.meta | 11 +
.../ec/custom/gm/SM2P256V1FieldElement.cs | 216 +
.../custom/gm/SM2P256V1FieldElement.cs.meta | 11 +
.../math/ec/custom/gm/SM2P256V1Point.cs | 249 +
.../math/ec/custom/gm/SM2P256V1Point.cs.meta | 11 +
.../BouncyCastle/math/ec/custom/sec.meta | 8 +
.../math/ec/custom/sec/SecP128R1Curve.cs | 175 +
.../math/ec/custom/sec/SecP128R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP128R1Field.cs | 265 +
.../math/ec/custom/sec/SecP128R1Field.cs.meta | 11 +
.../ec/custom/sec/SecP128R1FieldElement.cs | 203 +
.../custom/sec/SecP128R1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP128R1Point.cs | 249 +
.../math/ec/custom/sec/SecP128R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP160K1Curve.cs | 172 +
.../math/ec/custom/sec/SecP160K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP160K1Point.cs | 238 +
.../math/ec/custom/sec/SecP160K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP160R1Curve.cs | 175 +
.../math/ec/custom/sec/SecP160R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP160R1Field.cs | 228 +
.../math/ec/custom/sec/SecP160R1Field.cs.meta | 11 +
.../ec/custom/sec/SecP160R1FieldElement.cs | 208 +
.../custom/sec/SecP160R1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP160R1Point.cs | 249 +
.../math/ec/custom/sec/SecP160R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP160R2Curve.cs | 175 +
.../math/ec/custom/sec/SecP160R2Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP160R2Field.cs | 220 +
.../math/ec/custom/sec/SecP160R2Field.cs.meta | 11 +
.../ec/custom/sec/SecP160R2FieldElement.cs | 223 +
.../custom/sec/SecP160R2FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP160R2Point.cs | 249 +
.../math/ec/custom/sec/SecP160R2Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP192K1Curve.cs | 172 +
.../math/ec/custom/sec/SecP192K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP192K1Field.cs | 221 +
.../math/ec/custom/sec/SecP192K1Field.cs.meta | 11 +
.../ec/custom/sec/SecP192K1FieldElement.cs | 218 +
.../custom/sec/SecP192K1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP192K1Point.cs | 236 +
.../math/ec/custom/sec/SecP192K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP192R1Curve.cs | 175 +
.../math/ec/custom/sec/SecP192R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP192R1Field.cs | 326 +
.../math/ec/custom/sec/SecP192R1Field.cs.meta | 11 +
.../ec/custom/sec/SecP192R1FieldElement.cs | 193 +
.../custom/sec/SecP192R1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP192R1Point.cs | 249 +
.../math/ec/custom/sec/SecP192R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP224K1Curve.cs | 172 +
.../math/ec/custom/sec/SecP224K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP224K1Field.cs | 222 +
.../math/ec/custom/sec/SecP224K1Field.cs.meta | 11 +
.../ec/custom/sec/SecP224K1FieldElement.cs | 247 +
.../custom/sec/SecP224K1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP224K1Point.cs | 236 +
.../math/ec/custom/sec/SecP224K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP224R1Curve.cs | 175 +
.../math/ec/custom/sec/SecP224R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP224R1Field.cs | 341 +
.../math/ec/custom/sec/SecP224R1Field.cs.meta | 11 +
.../ec/custom/sec/SecP224R1FieldElement.cs | 275 +
.../custom/sec/SecP224R1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP224R1Point.cs | 249 +
.../math/ec/custom/sec/SecP224R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP256K1Curve.cs | 172 +
.../math/ec/custom/sec/SecP256K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP256K1Field.cs | 248 +
.../math/ec/custom/sec/SecP256K1Field.cs.meta | 11 +
.../ec/custom/sec/SecP256K1FieldElement.cs | 220 +
.../custom/sec/SecP256K1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP256K1Point.cs | 238 +
.../math/ec/custom/sec/SecP256K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP256R1Curve.cs | 174 +
.../math/ec/custom/sec/SecP256R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP256R1Field.cs | 380 ++
.../math/ec/custom/sec/SecP256R1Field.cs.meta | 11 +
.../ec/custom/sec/SecP256R1FieldElement.cs | 194 +
.../custom/sec/SecP256R1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP256R1Point.cs | 251 +
.../math/ec/custom/sec/SecP256R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP384R1Curve.cs | 174 +
.../math/ec/custom/sec/SecP384R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP384R1Field.cs | 364 ++
.../math/ec/custom/sec/SecP384R1Field.cs.meta | 11 +
.../ec/custom/sec/SecP384R1FieldElement.cs | 216 +
.../custom/sec/SecP384R1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP384R1Point.cs | 252 +
.../math/ec/custom/sec/SecP384R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecP521R1Curve.cs | 174 +
.../math/ec/custom/sec/SecP521R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecP521R1Field.cs | 226 +
.../math/ec/custom/sec/SecP521R1Field.cs.meta | 11 +
.../ec/custom/sec/SecP521R1FieldElement.cs | 173 +
.../custom/sec/SecP521R1FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecP521R1Point.cs | 247 +
.../math/ec/custom/sec/SecP521R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT113Field.cs | 268 +
.../math/ec/custom/sec/SecT113Field.cs.meta | 11 +
.../math/ec/custom/sec/SecT113FieldElement.cs | 237 +
.../ec/custom/sec/SecT113FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecT113R1Curve.cs | 181 +
.../math/ec/custom/sec/SecT113R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT113R1Point.cs | 272 +
.../math/ec/custom/sec/SecT113R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT113R2Curve.cs | 181 +
.../math/ec/custom/sec/SecT113R2Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT113R2Point.cs | 282 +
.../math/ec/custom/sec/SecT113R2Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT131Field.cs | 380 ++
.../math/ec/custom/sec/SecT131Field.cs.meta | 11 +
.../math/ec/custom/sec/SecT131FieldElement.cs | 237 +
.../ec/custom/sec/SecT131FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecT131R1Curve.cs | 181 +
.../math/ec/custom/sec/SecT131R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT131R1Point.cs | 278 +
.../math/ec/custom/sec/SecT131R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT131R2Curve.cs | 181 +
.../math/ec/custom/sec/SecT131R2Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT131R2Point.cs | 274 +
.../math/ec/custom/sec/SecT131R2Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT163Field.cs | 385 ++
.../math/ec/custom/sec/SecT163Field.cs.meta | 11 +
.../math/ec/custom/sec/SecT163FieldElement.cs | 237 +
.../ec/custom/sec/SecT163FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecT163K1Curve.cs | 187 +
.../math/ec/custom/sec/SecT163K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT163K1Point.cs | 272 +
.../math/ec/custom/sec/SecT163K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT163R1Curve.cs | 181 +
.../math/ec/custom/sec/SecT163R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT163R1Point.cs | 274 +
.../math/ec/custom/sec/SecT163R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT163R2Curve.cs | 181 +
.../math/ec/custom/sec/SecT163R2Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT163R2Point.cs | 277 +
.../math/ec/custom/sec/SecT163R2Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT193Field.cs | 360 +
.../math/ec/custom/sec/SecT193Field.cs.meta | 11 +
.../math/ec/custom/sec/SecT193FieldElement.cs | 237 +
.../ec/custom/sec/SecT193FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecT193R1Curve.cs | 181 +
.../math/ec/custom/sec/SecT193R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT193R1Point.cs | 274 +
.../math/ec/custom/sec/SecT193R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT193R2Curve.cs | 181 +
.../math/ec/custom/sec/SecT193R2Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT193R2Point.cs | 274 +
.../math/ec/custom/sec/SecT193R2Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT233Field.cs | 383 ++
.../math/ec/custom/sec/SecT233Field.cs.meta | 11 +
.../math/ec/custom/sec/SecT233FieldElement.cs | 237 +
.../ec/custom/sec/SecT233FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecT233K1Curve.cs | 187 +
.../math/ec/custom/sec/SecT233K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT233K1Point.cs | 286 +
.../math/ec/custom/sec/SecT233K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT233R1Curve.cs | 181 +
.../math/ec/custom/sec/SecT233R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT233R1Point.cs | 269 +
.../math/ec/custom/sec/SecT233R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT239Field.cs | 394 ++
.../math/ec/custom/sec/SecT239Field.cs.meta | 11 +
.../math/ec/custom/sec/SecT239FieldElement.cs | 237 +
.../ec/custom/sec/SecT239FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecT239K1Curve.cs | 187 +
.../math/ec/custom/sec/SecT239K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT239K1Point.cs | 281 +
.../math/ec/custom/sec/SecT239K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT283Field.cs | 471 ++
.../math/ec/custom/sec/SecT283Field.cs.meta | 11 +
.../math/ec/custom/sec/SecT283FieldElement.cs | 237 +
.../ec/custom/sec/SecT283FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecT283K1Curve.cs | 187 +
.../math/ec/custom/sec/SecT283K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT283K1Point.cs | 280 +
.../math/ec/custom/sec/SecT283K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT283R1Curve.cs | 181 +
.../math/ec/custom/sec/SecT283R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT283R1Point.cs | 269 +
.../math/ec/custom/sec/SecT283R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT409Field.cs | 404 ++
.../math/ec/custom/sec/SecT409Field.cs.meta | 11 +
.../math/ec/custom/sec/SecT409FieldElement.cs | 237 +
.../ec/custom/sec/SecT409FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecT409K1Curve.cs | 187 +
.../math/ec/custom/sec/SecT409K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT409K1Point.cs | 280 +
.../math/ec/custom/sec/SecT409K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT409R1Curve.cs | 181 +
.../math/ec/custom/sec/SecT409R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT409R1Point.cs | 269 +
.../math/ec/custom/sec/SecT409R1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT571Field.cs | 459 ++
.../math/ec/custom/sec/SecT571Field.cs.meta | 11 +
.../math/ec/custom/sec/SecT571FieldElement.cs | 237 +
.../ec/custom/sec/SecT571FieldElement.cs.meta | 11 +
.../math/ec/custom/sec/SecT571K1Curve.cs | 187 +
.../math/ec/custom/sec/SecT571K1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT571K1Point.cs | 318 +
.../math/ec/custom/sec/SecT571K1Point.cs.meta | 11 +
.../math/ec/custom/sec/SecT571R1Curve.cs | 185 +
.../math/ec/custom/sec/SecT571R1Curve.cs.meta | 11 +
.../math/ec/custom/sec/SecT571R1Point.cs | 343 +
.../math/ec/custom/sec/SecT571R1Point.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/ec/endo.meta | 8 +
.../math/ec/endo/ECEndomorphism.cs | 15 +
.../math/ec/endo/ECEndomorphism.cs.meta | 11 +
.../math/ec/endo/EndoPreCompInfo.cs | 30 +
.../math/ec/endo/EndoPreCompInfo.cs.meta | 11 +
.../math/ec/endo/EndoUtilities.cs | 83 +
.../math/ec/endo/EndoUtilities.cs.meta | 11 +
.../math/ec/endo/GlvEndomorphism.cs | 14 +
.../math/ec/endo/GlvEndomorphism.cs.meta | 11 +
.../math/ec/endo/GlvTypeAEndomorphism.cs | 42 +
.../math/ec/endo/GlvTypeAEndomorphism.cs.meta | 11 +
.../math/ec/endo/GlvTypeAParameters.cs | 36 +
.../math/ec/endo/GlvTypeAParameters.cs.meta | 11 +
.../math/ec/endo/GlvTypeBEndomorphism.cs | 42 +
.../math/ec/endo/GlvTypeBEndomorphism.cs.meta | 11 +
.../math/ec/endo/GlvTypeBParameters.cs | 36 +
.../math/ec/endo/GlvTypeBParameters.cs.meta | 11 +
.../math/ec/endo/ScalarSplitParameters.cs | 73 +
.../ec/endo/ScalarSplitParameters.cs.meta | 11 +
.../BouncyCastle/math/ec/multiplier.meta | 8 +
.../ec/multiplier/AbstractECMultiplier.cs | 33 +
.../multiplier/AbstractECMultiplier.cs.meta | 11 +
.../math/ec/multiplier/ECMultiplier.cs | 22 +
.../math/ec/multiplier/ECMultiplier.cs.meta | 11 +
.../ec/multiplier/FixedPointCombMultiplier.cs | 69 +
.../FixedPointCombMultiplier.cs.meta | 11 +
.../ec/multiplier/FixedPointPreCompInfo.cs | 47 +
.../multiplier/FixedPointPreCompInfo.cs.meta | 11 +
.../math/ec/multiplier/FixedPointUtilities.cs | 99 +
.../ec/multiplier/FixedPointUtilities.cs.meta | 11 +
.../math/ec/multiplier/GlvMultiplier.cs | 45 +
.../math/ec/multiplier/GlvMultiplier.cs.meta | 11 +
.../math/ec/multiplier/IPreCompCallback.cs | 13 +
.../ec/multiplier/IPreCompCallback.cs.meta | 11 +
.../math/ec/multiplier/PreCompInfo.cs | 15 +
.../math/ec/multiplier/PreCompInfo.cs.meta | 11 +
.../math/ec/multiplier/ValidityPreCompInfo.cs | 48 +
.../ec/multiplier/ValidityPreCompInfo.cs.meta | 11 +
.../math/ec/multiplier/WNafL2RMultiplier.cs | 93 +
.../ec/multiplier/WNafL2RMultiplier.cs.meta | 11 +
.../math/ec/multiplier/WNafPreCompInfo.cs | 89 +
.../ec/multiplier/WNafPreCompInfo.cs.meta | 11 +
.../math/ec/multiplier/WNafUtilities.cs | 759 +++
.../math/ec/multiplier/WNafUtilities.cs.meta | 11 +
.../math/ec/multiplier/WTauNafMultiplier.cs | 142 +
.../ec/multiplier/WTauNafMultiplier.cs.meta | 11 +
.../math/ec/multiplier/WTauNafPreCompInfo.cs | 28 +
.../ec/multiplier/WTauNafPreCompInfo.cs.meta | 11 +
.../BouncyCastle/math/ec/rfc7748.meta | 8 +
.../BouncyCastle/math/ec/rfc7748/X25519.cs | 309 +
.../math/ec/rfc7748/X25519.cs.meta | 11 +
.../math/ec/rfc7748/X25519Field.cs | 963 +++
.../math/ec/rfc7748/X25519Field.cs.meta | 11 +
.../BouncyCastle/math/ec/rfc7748/X448.cs | 320 +
.../BouncyCastle/math/ec/rfc7748/X448.cs.meta | 11 +
.../BouncyCastle/math/ec/rfc7748/X448Field.cs | 1375 ++++
.../math/ec/rfc7748/X448Field.cs.meta | 11 +
.../BouncyCastle/math/ec/rfc8032.meta | 8 +
.../BouncyCastle/math/ec/rfc8032/Ed25519.cs | 1807 +++++
.../math/ec/rfc8032/Ed25519.cs.meta | 11 +
.../BouncyCastle/math/ec/rfc8032/Ed448.cs | 1806 +++++
.../math/ec/rfc8032/Ed448.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/field.meta | 8 +
.../BouncyCastle/math/field/FiniteFields.cs | 58 +
.../math/field/FiniteFields.cs.meta | 11 +
.../BouncyCastle/math/field/GF2Polynomial.cs | 50 +
.../math/field/GF2Polynomial.cs.meta | 11 +
.../field/GenericPolynomialExtensionField.cs | 67 +
.../GenericPolynomialExtensionField.cs.meta | 11 +
.../math/field/IExtensionField.cs | 16 +
.../math/field/IExtensionField.cs.meta | 11 +
.../BouncyCastle/math/field/IFiniteField.cs | 15 +
.../math/field/IFiniteField.cs.meta | 11 +
.../BouncyCastle/math/field/IPolynomial.cs | 19 +
.../math/field/IPolynomial.cs.meta | 11 +
.../math/field/IPolynomialExtensionField.cs | 14 +
.../field/IPolynomialExtensionField.cs.meta | 11 +
.../BouncyCastle/math/field/PrimeField.cs | 48 +
.../math/field/PrimeField.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw.meta | 8 +
.../3rdParty/BouncyCastle/math/raw/Bits.cs | 90 +
.../BouncyCastle/math/raw/Bits.cs.meta | 11 +
.../BouncyCastle/math/raw/Interleave.cs | 250 +
.../BouncyCastle/math/raw/Interleave.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Mod.cs | 914 +++
.../BouncyCastle/math/raw/Mod.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat.cs | 2905 +++++++++
.../BouncyCastle/math/raw/Nat.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat128.cs | 846 +++
.../BouncyCastle/math/raw/Nat128.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat160.cs | 874 +++
.../BouncyCastle/math/raw/Nat160.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat192.cs | 1041 +++
.../BouncyCastle/math/raw/Nat192.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat224.cs | 1178 ++++
.../BouncyCastle/math/raw/Nat224.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat256.cs | 1454 +++++
.../BouncyCastle/math/raw/Nat256.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat320.cs | 96 +
.../BouncyCastle/math/raw/Nat320.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat384.cs | 50 +
.../BouncyCastle/math/raw/Nat384.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat448.cs | 138 +
.../BouncyCastle/math/raw/Nat448.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat512.cs | 363 ++
.../BouncyCastle/math/raw/Nat512.cs.meta | 11 +
.../3rdParty/BouncyCastle/math/raw/Nat576.cs | 104 +
.../BouncyCastle/math/raw/Nat576.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/ocsp.meta | 8 +
.../BouncyCastle/ocsp/BasicOCSPResp.cs | 192 +
.../BouncyCastle/ocsp/BasicOCSPResp.cs.meta | 11 +
.../ocsp/BasicOCSPRespGenerator.cs | 294 +
.../ocsp/BasicOCSPRespGenerator.cs.meta | 11 +
.../BouncyCastle/ocsp/CertificateID.cs | 145 +
.../BouncyCastle/ocsp/CertificateID.cs.meta | 11 +
.../BouncyCastle/ocsp/CertificateStatus.cs | 13 +
.../ocsp/CertificateStatus.cs.meta | 11 +
.../BouncyCastle/ocsp/OCSPException.cs | 34 +
.../BouncyCastle/ocsp/OCSPException.cs.meta | 11 +
.../3rdParty/BouncyCastle/ocsp/OCSPReq.cs | 250 +
.../BouncyCastle/ocsp/OCSPReq.cs.meta | 11 +
.../BouncyCastle/ocsp/OCSPReqGenerator.cs | 245 +
.../ocsp/OCSPReqGenerator.cs.meta | 11 +
.../3rdParty/BouncyCastle/ocsp/OCSPResp.cs | 104 +
.../BouncyCastle/ocsp/OCSPResp.cs.meta | 11 +
.../BouncyCastle/ocsp/OCSPRespGenerator.cs | 58 +
.../ocsp/OCSPRespGenerator.cs.meta | 11 +
.../BouncyCastle/ocsp/OCSPRespStatus.cs | 21 +
.../BouncyCastle/ocsp/OCSPRespStatus.cs.meta | 11 +
.../3rdParty/BouncyCastle/ocsp/OCSPUtil.cs | 150 +
.../BouncyCastle/ocsp/OCSPUtil.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/ocsp/Req.cs | 39 +
.../3rdParty/BouncyCastle/ocsp/Req.cs.meta | 11 +
.../3rdParty/BouncyCastle/ocsp/RespData.cs | 63 +
.../BouncyCastle/ocsp/RespData.cs.meta | 11 +
.../3rdParty/BouncyCastle/ocsp/RespID.cs | 76 +
.../3rdParty/BouncyCastle/ocsp/RespID.cs.meta | 11 +
.../BouncyCastle/ocsp/RevokedStatus.cs | 59 +
.../BouncyCastle/ocsp/RevokedStatus.cs.meta | 11 +
.../3rdParty/BouncyCastle/ocsp/SingleResp.cs | 74 +
.../BouncyCastle/ocsp/SingleResp.cs.meta | 11 +
.../BouncyCastle/ocsp/UnknownStatus.cs | 19 +
.../BouncyCastle/ocsp/UnknownStatus.cs.meta | 11 +
.../3rdParty/BouncyCastle/openssl.meta | 8 +
.../openssl/EncryptionException.cs | 35 +
.../openssl/EncryptionException.cs.meta | 11 +
.../BouncyCastle/openssl/IPasswordFinder.cs | 13 +
.../openssl/IPasswordFinder.cs.meta | 11 +
.../BouncyCastle/openssl/MiscPemGenerator.cs | 274 +
.../openssl/MiscPemGenerator.cs.meta | 11 +
.../BouncyCastle/openssl/PEMException.cs | 35 +
.../BouncyCastle/openssl/PEMException.cs.meta | 11 +
.../BouncyCastle/openssl/PEMReader.cs | 393 ++
.../BouncyCastle/openssl/PEMReader.cs.meta | 11 +
.../BouncyCastle/openssl/PEMUtilities.cs | 162 +
.../BouncyCastle/openssl/PEMUtilities.cs.meta | 11 +
.../BouncyCastle/openssl/PEMWriter.cs | 46 +
.../BouncyCastle/openssl/PEMWriter.cs.meta | 11 +
.../BouncyCastle/openssl/PasswordException.cs | 35 +
.../openssl/PasswordException.cs.meta | 11 +
.../BouncyCastle/openssl/Pkcs8Generator.cs | 106 +
.../openssl/Pkcs8Generator.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/pkcs.meta | 8 +
.../BouncyCastle/pkcs/AsymmetricKeyEntry.cs | 50 +
.../pkcs/AsymmetricKeyEntry.cs.meta | 11 +
.../pkcs/EncryptedPrivateKeyInfoFactory.cs | 106 +
.../EncryptedPrivateKeyInfoFactory.cs.meta | 11 +
.../BouncyCastle/pkcs/PKCS12StoreBuilder.cs | 53 +
.../pkcs/PKCS12StoreBuilder.cs.meta | 11 +
.../pkcs/Pkcs10CertificationRequest.cs | 538 ++
.../pkcs/Pkcs10CertificationRequest.cs.meta | 11 +
.../Pkcs10CertificationRequestDelaySigned.cs | 145 +
...s10CertificationRequestDelaySigned.cs.meta | 11 +
.../3rdParty/BouncyCastle/pkcs/Pkcs12Entry.cs | 31 +
.../BouncyCastle/pkcs/Pkcs12Entry.cs.meta | 11 +
.../3rdParty/BouncyCastle/pkcs/Pkcs12Store.cs | 994 +++
.../BouncyCastle/pkcs/Pkcs12Store.cs.meta | 11 +
.../BouncyCastle/pkcs/Pkcs12Utilities.cs | 81 +
.../BouncyCastle/pkcs/Pkcs12Utilities.cs.meta | 11 +
.../pkcs/Pkcs8EncryptedPrivateKeyInfo.cs | 112 +
.../pkcs/Pkcs8EncryptedPrivateKeyInfo.cs.meta | 11 +
.../Pkcs8EncryptedPrivateKeyInfoBuilder.cs | 57 +
...kcs8EncryptedPrivateKeyInfoBuilder.cs.meta | 11 +
.../BouncyCastle/pkcs/PkcsException.cs | 35 +
.../BouncyCastle/pkcs/PkcsException.cs.meta | 11 +
.../BouncyCastle/pkcs/PkcsIOException.cs | 36 +
.../BouncyCastle/pkcs/PkcsIOException.cs.meta | 11 +
.../pkcs/PrivateKeyInfoFactory.cs | 292 +
.../pkcs/PrivateKeyInfoFactory.cs.meta | 11 +
.../BouncyCastle/pkcs/X509CertificateEntry.cs | 49 +
.../pkcs/X509CertificateEntry.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/pkix.meta | 8 +
.../3rdParty/BouncyCastle/pkix/CertStatus.cs | 37 +
.../BouncyCastle/pkix/CertStatus.cs.meta | 11 +
.../BouncyCastle/pkix/PkixAttrCertChecker.cs | 61 +
.../pkix/PkixAttrCertChecker.cs.meta | 11 +
.../pkix/PkixAttrCertPathBuilder.cs | 228 +
.../pkix/PkixAttrCertPathBuilder.cs.meta | 11 +
.../pkix/PkixAttrCertPathValidator.cs | 77 +
.../pkix/PkixAttrCertPathValidator.cs.meta | 11 +
.../pkix/PkixBuilderParameters.cs | 150 +
.../pkix/PkixBuilderParameters.cs.meta | 11 +
.../BouncyCastle/pkix/PkixCertPath.cs | 423 ++
.../BouncyCastle/pkix/PkixCertPath.cs.meta | 11 +
.../BouncyCastle/pkix/PkixCertPathBuilder.cs | 173 +
.../pkix/PkixCertPathBuilder.cs.meta | 11 +
.../pkix/PkixCertPathBuilderException.cs | 36 +
.../pkix/PkixCertPathBuilderException.cs.meta | 11 +
.../pkix/PkixCertPathBuilderResult.cs | 49 +
.../pkix/PkixCertPathBuilderResult.cs.meta | 11 +
.../BouncyCastle/pkix/PkixCertPathChecker.cs | 104 +
.../pkix/PkixCertPathChecker.cs.meta | 11 +
.../pkix/PkixCertPathValidator.cs | 442 ++
.../pkix/PkixCertPathValidator.cs.meta | 11 +
.../pkix/PkixCertPathValidatorException.cs | 97 +
.../PkixCertPathValidatorException.cs.meta | 11 +
.../pkix/PkixCertPathValidatorResult.cs | 66 +
.../pkix/PkixCertPathValidatorResult.cs.meta | 11 +
.../pkix/PkixCertPathValidatorUtilities.cs | 1053 +++
.../PkixCertPathValidatorUtilities.cs.meta | 11 +
.../BouncyCastle/pkix/PkixCrlUtilities.cs | 109 +
.../pkix/PkixCrlUtilities.cs.meta | 11 +
.../pkix/PkixNameConstraintValidator.cs | 1860 ++++++
.../pkix/PkixNameConstraintValidator.cs.meta | 11 +
.../PkixNameConstraintValidatorException.cs | 34 +
...ixNameConstraintValidatorException.cs.meta | 11 +
.../BouncyCastle/pkix/PkixParameters.cs | 794 +++
.../BouncyCastle/pkix/PkixParameters.cs.meta | 11 +
.../BouncyCastle/pkix/PkixPolicyNode.cs | 160 +
.../BouncyCastle/pkix/PkixPolicyNode.cs.meta | 11 +
.../3rdParty/BouncyCastle/pkix/ReasonsMask.cs | 100 +
.../BouncyCastle/pkix/ReasonsMask.cs.meta | 11 +
.../pkix/Rfc3280CertPathUtilities.cs | 2323 +++++++
.../pkix/Rfc3280CertPathUtilities.cs.meta | 11 +
.../pkix/Rfc3281CertPathUtilities.cs | 578 ++
.../pkix/Rfc3281CertPathUtilities.cs.meta | 11 +
.../3rdParty/BouncyCastle/pkix/TrustAnchor.cs | 261 +
.../BouncyCastle/pkix/TrustAnchor.cs.meta | 11 +
.../3rdParty/BouncyCastle/security.meta | 8 +
.../security/AgreementUtilities.cs | 123 +
.../security/AgreementUtilities.cs.meta | 11 +
.../BouncyCastle/security/CipherUtilities.cs | 804 +++
.../security/CipherUtilities.cs.meta | 11 +
.../BouncyCastle/security/DigestUtilities.cs | 320 +
.../security/DigestUtilities.cs.meta | 11 +
.../BouncyCastle/security/DotNetUtilities.cs | 325 +
.../security/DotNetUtilities.cs.meta | 11 +
.../security/GeneralSecurityException.cs | 34 +
.../security/GeneralSecurityException.cs.meta | 11 +
.../security/GeneratorUtilities.cs | 421 ++
.../security/GeneratorUtilities.cs.meta | 11 +
.../security/InvalidKeyException.cs | 34 +
.../security/InvalidKeyException.cs.meta | 11 +
.../security/InvalidParameterException.cs | 34 +
.../InvalidParameterException.cs.meta | 11 +
.../BouncyCastle/security/JksStore.cs | 600 ++
.../BouncyCastle/security/JksStore.cs.meta | 11 +
.../BouncyCastle/security/KeyException.cs | 34 +
.../security/KeyException.cs.meta | 11 +
.../BouncyCastle/security/MacUtilities.cs | 238 +
.../security/MacUtilities.cs.meta | 11 +
.../security/ParameterUtilities.cs | 361 +
.../security/ParameterUtilities.cs.meta | 11 +
.../BouncyCastle/security/PbeUtilities.cs | 696 ++
.../security/PbeUtilities.cs.meta | 11 +
.../security/PrivateKeyFactory.cs | 412 ++
.../security/PrivateKeyFactory.cs.meta | 11 +
.../BouncyCastle/security/PublicKeyFactory.cs | 322 +
.../security/PublicKeyFactory.cs.meta | 11 +
.../BouncyCastle/security/SecureRandom.cs | 267 +
.../security/SecureRandom.cs.meta | 11 +
.../security/SecurityUtilityException.cs | 34 +
.../security/SecurityUtilityException.cs.meta | 11 +
.../security/SignatureException.cs | 34 +
.../security/SignatureException.cs.meta | 11 +
.../BouncyCastle/security/SignerUtilities.cs | 711 ++
.../security/SignerUtilities.cs.meta | 11 +
.../BouncyCastle/security/WrapperUtilities.cs | 144 +
.../security/WrapperUtilities.cs.meta | 11 +
.../3rdParty/BouncyCastle/security/cert.meta | 8 +
.../cert/CertificateEncodingException.cs | 34 +
.../cert/CertificateEncodingException.cs.meta | 11 +
.../security/cert/CertificateException.cs | 34 +
.../cert/CertificateException.cs.meta | 11 +
.../cert/CertificateExpiredException.cs | 34 +
.../cert/CertificateExpiredException.cs.meta | 11 +
.../cert/CertificateNotYetValidException.cs | 34 +
.../CertificateNotYetValidException.cs.meta | 11 +
.../cert/CertificateParsingException.cs | 34 +
.../cert/CertificateParsingException.cs.meta | 11 +
.../security/cert/CrlException.cs | 34 +
.../security/cert/CrlException.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/tls.meta | 8 +
.../BouncyCastle/tls/AbstractTlsClient.cs | 488 ++
.../tls/AbstractTlsClient.cs.meta | 11 +
.../BouncyCastle/tls/AbstractTlsContext.cs | 316 +
.../tls/AbstractTlsContext.cs.meta | 11 +
.../tls/AbstractTlsKeyExchange.cs | 94 +
.../tls/AbstractTlsKeyExchange.cs.meta | 11 +
.../tls/AbstractTlsKeyExchangeFactory.cs | 94 +
.../tls/AbstractTlsKeyExchangeFactory.cs.meta | 11 +
.../BouncyCastle/tls/AbstractTlsPeer.cs | 167 +
.../BouncyCastle/tls/AbstractTlsPeer.cs.meta | 11 +
.../BouncyCastle/tls/AbstractTlsServer.cs | 658 ++
.../tls/AbstractTlsServer.cs.meta | 11 +
.../BouncyCastle/tls/AlertDescription.cs | 327 +
.../BouncyCastle/tls/AlertDescription.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/AlertLevel.cs | 33 +
.../BouncyCastle/tls/AlertLevel.cs.meta | 11 +
.../BouncyCastle/tls/BasicTlsPskExternal.cs | 46 +
.../tls/BasicTlsPskExternal.cs.meta | 11 +
.../BouncyCastle/tls/BasicTlsPskIdentity.cs | 48 +
.../tls/BasicTlsPskIdentity.cs.meta | 11 +
.../BouncyCastle/tls/BasicTlsSrpIdentity.cs | 40 +
.../tls/BasicTlsSrpIdentity.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/ByteQueue.cs | 268 +
.../BouncyCastle/tls/ByteQueue.cs.meta | 11 +
.../BouncyCastle/tls/ByteQueueInputStream.cs | 76 +
.../tls/ByteQueueInputStream.cs.meta | 11 +
.../BouncyCastle/tls/ByteQueueOutputStream.cs | 46 +
.../tls/ByteQueueOutputStream.cs.meta | 11 +
.../BouncyCastle/tls/CachedInformationType.cs | 32 +
.../tls/CachedInformationType.cs.meta | 11 +
.../BouncyCastle/tls/CertChainType.cs | 38 +
.../BouncyCastle/tls/CertChainType.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/Certificate.cs | 300 +
.../BouncyCastle/tls/Certificate.cs.meta | 11 +
.../tls/CertificateCompressionAlgorithm.cs | 51 +
.../CertificateCompressionAlgorithm.cs.meta | 11 +
.../BouncyCastle/tls/CertificateEntry.cs | 36 +
.../BouncyCastle/tls/CertificateEntry.cs.meta | 11 +
.../BouncyCastle/tls/CertificateRequest.cs | 283 +
.../tls/CertificateRequest.cs.meta | 11 +
.../BouncyCastle/tls/CertificateStatus.cs | 215 +
.../tls/CertificateStatus.cs.meta | 11 +
.../tls/CertificateStatusRequest.cs | 95 +
.../tls/CertificateStatusRequest.cs.meta | 11 +
.../tls/CertificateStatusRequestItemV2.cs | 104 +
.../CertificateStatusRequestItemV2.cs.meta | 11 +
.../BouncyCastle/tls/CertificateStatusType.cs | 21 +
.../tls/CertificateStatusType.cs.meta | 11 +
.../BouncyCastle/tls/CertificateType.cs | 20 +
.../BouncyCastle/tls/CertificateType.cs.meta | 11 +
.../BouncyCastle/tls/CertificateUrl.cs | 120 +
.../BouncyCastle/tls/CertificateUrl.cs.meta | 11 +
.../BouncyCastle/tls/CertificateVerify.cs | 61 +
.../tls/CertificateVerify.cs.meta | 11 +
.../BouncyCastle/tls/ChangeCipherSpec.cs | 13 +
.../BouncyCastle/tls/ChangeCipherSpec.cs.meta | 11 +
.../BouncyCastle/tls/ChannelBinding.cs | 28 +
.../BouncyCastle/tls/ChannelBinding.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/CipherSuite.cs | 465 ++
.../BouncyCastle/tls/CipherSuite.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/CipherType.cs | 24 +
.../BouncyCastle/tls/CipherType.cs.meta | 11 +
.../tls/ClientAuthenticationType.cs | 18 +
.../tls/ClientAuthenticationType.cs.meta | 11 +
.../BouncyCastle/tls/ClientCertificateType.cs | 73 +
.../tls/ClientCertificateType.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/ClientHello.cs | 181 +
.../BouncyCastle/tls/ClientHello.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/CombinedHash.cs | 79 +
.../BouncyCastle/tls/CombinedHash.cs.meta | 11 +
.../BouncyCastle/tls/CompressionMethod.cs | 24 +
.../tls/CompressionMethod.cs.meta | 11 +
.../BouncyCastle/tls/ConnectionEnd.cs | 19 +
.../BouncyCastle/tls/ConnectionEnd.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/ContentType.cs | 42 +
.../BouncyCastle/tls/ContentType.cs.meta | 11 +
.../BouncyCastle/tls/DatagramReceiver.cs | 23 +
.../BouncyCastle/tls/DatagramReceiver.cs.meta | 11 +
.../BouncyCastle/tls/DatagramSender.cs | 23 +
.../BouncyCastle/tls/DatagramSender.cs.meta | 11 +
.../BouncyCastle/tls/DatagramTransport.cs | 14 +
.../tls/DatagramTransport.cs.meta | 11 +
.../BouncyCastle/tls/DefaultTlsClient.cs | 52 +
.../BouncyCastle/tls/DefaultTlsClient.cs.meta | 11 +
.../tls/DefaultTlsCredentialedSigner.cs | 70 +
.../tls/DefaultTlsCredentialedSigner.cs.meta | 11 +
.../tls/DefaultTlsDHGroupVerifier.cs | 110 +
.../tls/DefaultTlsDHGroupVerifier.cs.meta | 11 +
.../BouncyCastle/tls/DefaultTlsHeartbeat.cs | 48 +
.../tls/DefaultTlsHeartbeat.cs.meta | 11 +
.../tls/DefaultTlsKeyExchangeFactory.cs | 93 +
.../tls/DefaultTlsKeyExchangeFactory.cs.meta | 11 +
.../BouncyCastle/tls/DefaultTlsServer.cs | 108 +
.../BouncyCastle/tls/DefaultTlsServer.cs.meta | 11 +
.../tls/DefaultTlsSrpConfigVerifier.cs | 66 +
.../tls/DefaultTlsSrpConfigVerifier.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/DeferredHash.cs | 260 +
.../BouncyCastle/tls/DeferredHash.cs.meta | 11 +
.../BouncyCastle/tls/DigestInputBuffer.cs | 27 +
.../tls/DigestInputBuffer.cs.meta | 11 +
.../BouncyCastle/tls/DigitallySigned.cs | 66 +
.../BouncyCastle/tls/DigitallySigned.cs.meta | 11 +
.../BouncyCastle/tls/DtlsClientProtocol.cs | 994 +++
.../tls/DtlsClientProtocol.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/DtlsEpoch.cs | 65 +
.../BouncyCastle/tls/DtlsEpoch.cs.meta | 11 +
.../tls/DtlsHandshakeRetransmit.cs | 15 +
.../tls/DtlsHandshakeRetransmit.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/DtlsProtocol.cs | 112 +
.../BouncyCastle/tls/DtlsProtocol.cs.meta | 11 +
.../BouncyCastle/tls/DtlsReassembler.cs | 122 +
.../BouncyCastle/tls/DtlsReassembler.cs.meta | 11 +
.../BouncyCastle/tls/DtlsRecordLayer.cs | 966 +++
.../BouncyCastle/tls/DtlsRecordLayer.cs.meta | 11 +
.../BouncyCastle/tls/DtlsReliableHandshake.cs | 569 ++
.../tls/DtlsReliableHandshake.cs.meta | 11 +
.../BouncyCastle/tls/DtlsReplayWindow.cs | 88 +
.../BouncyCastle/tls/DtlsReplayWindow.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/DtlsRequest.cs | 42 +
.../BouncyCastle/tls/DtlsRequest.cs.meta | 11 +
.../BouncyCastle/tls/DtlsServerProtocol.cs | 876 +++
.../tls/DtlsServerProtocol.cs.meta | 11 +
.../BouncyCastle/tls/DtlsTransport.cs | 242 +
.../BouncyCastle/tls/DtlsTransport.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/DtlsVerifier.cs | 93 +
.../BouncyCastle/tls/DtlsVerifier.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/ECCurveType.cs | 33 +
.../BouncyCastle/tls/ECCurveType.cs.meta | 11 +
.../BouncyCastle/tls/ECPointFormat.cs | 20 +
.../BouncyCastle/tls/ECPointFormat.cs.meta | 11 +
.../BouncyCastle/tls/EncryptionAlgorithm.cs | 86 +
.../tls/EncryptionAlgorithm.cs.meta | 11 +
.../BouncyCastle/tls/ExporterLabel.cs | 46 +
.../BouncyCastle/tls/ExporterLabel.cs.meta | 11 +
.../BouncyCastle/tls/ExtensionType.cs | 291 +
.../BouncyCastle/tls/ExtensionType.cs.meta | 11 +
.../BouncyCastle/tls/HandshakeMessageInput.cs | 45 +
.../tls/HandshakeMessageInput.cs.meta | 11 +
.../tls/HandshakeMessageOutput.cs | 94 +
.../tls/HandshakeMessageOutput.cs.meta | 11 +
.../BouncyCastle/tls/HandshakeType.cs | 143 +
.../BouncyCastle/tls/HandshakeType.cs.meta | 11 +
.../BouncyCastle/tls/HashAlgorithm.cs | 98 +
.../BouncyCastle/tls/HashAlgorithm.cs.meta | 11 +
.../BouncyCastle/tls/HeartbeatExtension.cs | 48 +
.../tls/HeartbeatExtension.cs.meta | 11 +
.../BouncyCastle/tls/HeartbeatMessage.cs | 122 +
.../BouncyCastle/tls/HeartbeatMessage.cs.meta | 11 +
.../BouncyCastle/tls/HeartbeatMessageType.cs | 38 +
.../tls/HeartbeatMessageType.cs.meta | 11 +
.../BouncyCastle/tls/HeartbeatMode.cs | 40 +
.../BouncyCastle/tls/HeartbeatMode.cs.meta | 11 +
.../BouncyCastle/tls/IdentifierType.cs | 39 +
.../BouncyCastle/tls/IdentifierType.cs.meta | 11 +
.../BouncyCastle/tls/KeyExchangeAlgorithm.cs | 80 +
.../tls/KeyExchangeAlgorithm.cs.meta | 11 +
.../BouncyCastle/tls/KeyShareEntry.cs | 66 +
.../BouncyCastle/tls/KeyShareEntry.cs.meta | 11 +
.../BouncyCastle/tls/KeyUpdateRequest.cs | 38 +
.../BouncyCastle/tls/KeyUpdateRequest.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/MacAlgorithm.cs | 70 +
.../BouncyCastle/tls/MacAlgorithm.cs.meta | 11 +
.../BouncyCastle/tls/MaxFragmentLength.cs | 24 +
.../tls/MaxFragmentLength.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/NameType.cs | 42 +
.../BouncyCastle/tls/NameType.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/NamedGroup.cs | 420 ++
.../BouncyCastle/tls/NamedGroup.cs.meta | 11 +
.../BouncyCastle/tls/NamedGroupRole.cs | 19 +
.../BouncyCastle/tls/NamedGroupRole.cs.meta | 11 +
.../BouncyCastle/tls/NewSessionTicket.cs | 51 +
.../BouncyCastle/tls/NewSessionTicket.cs.meta | 11 +
.../BouncyCastle/tls/OcspStatusRequest.cs | 119 +
.../tls/OcspStatusRequest.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/OfferedPsks.cs | 228 +
.../BouncyCastle/tls/OfferedPsks.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/PrfAlgorithm.cs | 53 +
.../BouncyCastle/tls/PrfAlgorithm.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/ProtocolName.cs | 103 +
.../BouncyCastle/tls/ProtocolName.cs.meta | 11 +
.../BouncyCastle/tls/ProtocolVersion.cs | 423 ++
.../BouncyCastle/tls/ProtocolVersion.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/PskIdentity.cs | 73 +
.../BouncyCastle/tls/PskIdentity.cs.meta | 11 +
.../BouncyCastle/tls/PskKeyExchangeMode.cs | 36 +
.../tls/PskKeyExchangeMode.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/PskTlsClient.cs | 64 +
.../BouncyCastle/tls/PskTlsClient.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/PskTlsServer.cs | 80 +
.../BouncyCastle/tls/PskTlsServer.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/RecordFormat.cs | 16 +
.../BouncyCastle/tls/RecordFormat.cs.meta | 11 +
.../BouncyCastle/tls/RecordPreview.cs | 40 +
.../BouncyCastle/tls/RecordPreview.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/RecordStream.cs | 609 ++
.../BouncyCastle/tls/RecordStream.cs.meta | 11 +
.../BouncyCastle/tls/SecurityParameters.cs | 339 +
.../tls/SecurityParameters.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/ServerHello.cs | 112 +
.../BouncyCastle/tls/ServerHello.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/ServerName.cs | 67 +
.../BouncyCastle/tls/ServerName.cs.meta | 11 +
.../BouncyCastle/tls/ServerNameList.cs | 91 +
.../BouncyCastle/tls/ServerNameList.cs.meta | 11 +
.../tls/ServerOnlyTlsAuthentication.cs | 19 +
.../tls/ServerOnlyTlsAuthentication.cs.meta | 11 +
.../BouncyCastle/tls/ServerSrpParams.cs | 71 +
.../BouncyCastle/tls/ServerSrpParams.cs.meta | 11 +
.../BouncyCastle/tls/SessionParameters.cs | 199 +
.../tls/SessionParameters.cs.meta | 11 +
.../BouncyCastle/tls/SignatureAlgorithm.cs | 156 +
.../tls/SignatureAlgorithm.cs.meta | 11 +
.../tls/SignatureAndHashAlgorithm.cs | 175 +
.../tls/SignatureAndHashAlgorithm.cs.meta | 11 +
.../BouncyCastle/tls/SignatureScheme.cs | 244 +
.../BouncyCastle/tls/SignatureScheme.cs.meta | 11 +
.../tls/SimulatedTlsSrpIdentityManager.cs | 73 +
.../SimulatedTlsSrpIdentityManager.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/SrpTlsClient.cs | 87 +
.../BouncyCastle/tls/SrpTlsClient.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/SrpTlsServer.cs | 110 +
.../BouncyCastle/tls/SrpTlsServer.cs.meta | 11 +
.../BouncyCastle/tls/SrtpProtectionProfile.cs | 25 +
.../tls/SrtpProtectionProfile.cs.meta | 11 +
.../BouncyCastle/tls/Ssl3Utilities.cs | 73 +
.../BouncyCastle/tls/Ssl3Utilities.cs.meta | 11 +
.../BouncyCastle/tls/SupplementalDataEntry.cs | 30 +
.../tls/SupplementalDataEntry.cs.meta | 11 +
.../BouncyCastle/tls/SupplementalDataType.cs | 17 +
.../tls/SupplementalDataType.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/Timeout.cs | 123 +
.../3rdParty/BouncyCastle/tls/Timeout.cs.meta | 11 +
.../BouncyCastle/tls/TlsAuthentication.cs | 33 +
.../tls/TlsAuthentication.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsClient.cs | 115 +
.../BouncyCastle/tls/TlsClient.cs.meta | 11 +
.../BouncyCastle/tls/TlsClientContext.cs | 14 +
.../BouncyCastle/tls/TlsClientContext.cs.meta | 11 +
.../BouncyCastle/tls/TlsClientContextImpl.cs | 24 +
.../tls/TlsClientContextImpl.cs.meta | 11 +
.../BouncyCastle/tls/TlsClientProtocol.cs | 1909 ++++++
.../tls/TlsClientProtocol.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsCloseable.cs | 15 +
.../BouncyCastle/tls/TlsCloseable.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsContext.cs | 83 +
.../BouncyCastle/tls/TlsContext.cs.meta | 11 +
.../tls/TlsCredentialedAgreement.cs | 23 +
.../tls/TlsCredentialedAgreement.cs.meta | 11 +
.../tls/TlsCredentialedDecryptor.cs | 23 +
.../tls/TlsCredentialedDecryptor.cs.meta | 11 +
.../BouncyCastle/tls/TlsCredentialedSigner.cs | 30 +
.../tls/TlsCredentialedSigner.cs.meta | 11 +
.../BouncyCastle/tls/TlsCredentials.cs | 16 +
.../BouncyCastle/tls/TlsCredentials.cs.meta | 11 +
.../BouncyCastle/tls/TlsDHGroupVerifier.cs | 19 +
.../tls/TlsDHGroupVerifier.cs.meta | 11 +
.../BouncyCastle/tls/TlsDHKeyExchange.cs | 95 +
.../BouncyCastle/tls/TlsDHKeyExchange.cs.meta | 11 +
.../BouncyCastle/tls/TlsDHUtilities.cs | 163 +
.../BouncyCastle/tls/TlsDHUtilities.cs.meta | 11 +
.../BouncyCastle/tls/TlsDHanonKeyExchange.cs | 128 +
.../tls/TlsDHanonKeyExchange.cs.meta | 11 +
.../BouncyCastle/tls/TlsDheKeyExchange.cs | 133 +
.../tls/TlsDheKeyExchange.cs.meta | 11 +
.../BouncyCastle/tls/TlsECDHKeyExchange.cs | 99 +
.../tls/TlsECDHKeyExchange.cs.meta | 11 +
.../tls/TlsECDHanonKeyExchange.cs | 131 +
.../tls/TlsECDHanonKeyExchange.cs.meta | 11 +
.../BouncyCastle/tls/TlsECDheKeyExchange.cs | 145 +
.../tls/TlsECDheKeyExchange.cs.meta | 11 +
.../BouncyCastle/tls/TlsEccUtilities.cs | 121 +
.../BouncyCastle/tls/TlsEccUtilities.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsException.cs | 35 +
.../BouncyCastle/tls/TlsException.cs.meta | 11 +
.../tls/TlsExtensionsUtilities.cs | 1449 +++++
.../tls/TlsExtensionsUtilities.cs.meta | 11 +
.../BouncyCastle/tls/TlsFatalAlert.cs | 67 +
.../BouncyCastle/tls/TlsFatalAlert.cs.meta | 11 +
.../BouncyCastle/tls/TlsFatalAlertReceived.cs | 42 +
.../tls/TlsFatalAlertReceived.cs.meta | 11 +
.../BouncyCastle/tls/TlsHandshakeHash.cs | 33 +
.../BouncyCastle/tls/TlsHandshakeHash.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsHeartbeat.cs | 17 +
.../BouncyCastle/tls/TlsHeartbeat.cs.meta | 11 +
.../BouncyCastle/tls/TlsKeyExchange.cs | 59 +
.../BouncyCastle/tls/TlsKeyExchange.cs.meta | 11 +
.../BouncyCastle/tls/TlsKeyExchangeFactory.cs | 63 +
.../tls/TlsKeyExchangeFactory.cs.meta | 11 +
.../tls/TlsNoCloseNotifyException.cs | 32 +
.../tls/TlsNoCloseNotifyException.cs.meta | 11 +
.../BouncyCastle/tls/TlsObjectIdentifiers.cs | 18 +
.../tls/TlsObjectIdentifiers.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsPeer.cs | 134 +
.../3rdParty/BouncyCastle/tls/TlsPeer.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsProtocol.cs | 2182 +++++++
.../BouncyCastle/tls/TlsProtocol.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsPsk.cs | 19 +
.../3rdParty/BouncyCastle/tls/TlsPsk.cs.meta | 11 +
.../BouncyCastle/tls/TlsPskExternal.cs | 13 +
.../BouncyCastle/tls/TlsPskExternal.cs.meta | 11 +
.../BouncyCastle/tls/TlsPskIdentity.cs | 20 +
.../BouncyCastle/tls/TlsPskIdentity.cs.meta | 11 +
.../BouncyCastle/tls/TlsPskIdentityManager.cs | 16 +
.../tls/TlsPskIdentityManager.cs.meta | 11 +
.../BouncyCastle/tls/TlsPskKeyExchange.cs | 309 +
.../tls/TlsPskKeyExchange.cs.meta | 11 +
.../BouncyCastle/tls/TlsRsaKeyExchange.cs | 84 +
.../tls/TlsRsaKeyExchange.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsServer.cs | 134 +
.../BouncyCastle/tls/TlsServer.cs.meta | 11 +
.../BouncyCastle/tls/TlsServerCertificate.cs | 16 +
.../tls/TlsServerCertificate.cs.meta | 11 +
.../tls/TlsServerCertificateImpl.cs | 31 +
.../tls/TlsServerCertificateImpl.cs.meta | 11 +
.../BouncyCastle/tls/TlsServerContext.cs | 14 +
.../BouncyCastle/tls/TlsServerContext.cs.meta | 11 +
.../BouncyCastle/tls/TlsServerContextImpl.cs | 24 +
.../tls/TlsServerContextImpl.cs.meta | 11 +
.../BouncyCastle/tls/TlsServerProtocol.cs | 1560 +++++
.../tls/TlsServerProtocol.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsSession.cs | 20 +
.../BouncyCastle/tls/TlsSession.cs.meta | 11 +
.../BouncyCastle/tls/TlsSessionImpl.cs | 56 +
.../BouncyCastle/tls/TlsSessionImpl.cs.meta | 11 +
.../BouncyCastle/tls/TlsSrpConfigVerifier.cs | 19 +
.../tls/TlsSrpConfigVerifier.cs.meta | 11 +
.../BouncyCastle/tls/TlsSrpIdentity.cs | 16 +
.../BouncyCastle/tls/TlsSrpIdentity.cs.meta | 11 +
.../BouncyCastle/tls/TlsSrpIdentityManager.cs | 22 +
.../tls/TlsSrpIdentityManager.cs.meta | 11 +
.../BouncyCastle/tls/TlsSrpKeyExchange.cs | 191 +
.../tls/TlsSrpKeyExchange.cs.meta | 11 +
.../BouncyCastle/tls/TlsSrpLoginParameters.cs | 48 +
.../tls/TlsSrpLoginParameters.cs.meta | 11 +
.../BouncyCastle/tls/TlsSrpUtilities.cs | 73 +
.../BouncyCastle/tls/TlsSrpUtilities.cs.meta | 11 +
.../BouncyCastle/tls/TlsSrtpUtilities.cs | 67 +
.../BouncyCastle/tls/TlsSrtpUtilities.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsStream.cs | 110 +
.../BouncyCastle/tls/TlsStream.cs.meta | 11 +
.../BouncyCastle/tls/TlsTimeoutException.cs | 35 +
.../tls/TlsTimeoutException.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/TlsUtilities.cs | 5786 +++++++++++++++++
.../BouncyCastle/tls/TlsUtilities.cs.meta | 11 +
.../BouncyCastle/tls/TrustedAuthority.cs | 155 +
.../BouncyCastle/tls/TrustedAuthority.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/UrlAndHash.cs | 87 +
.../BouncyCastle/tls/UrlAndHash.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/UseSrtpData.cs | 47 +
.../BouncyCastle/tls/UseSrtpData.cs.meta | 11 +
.../BouncyCastle/tls/UserMappingType.cs | 17 +
.../BouncyCastle/tls/UserMappingType.cs.meta | 11 +
.../3rdParty/BouncyCastle/tls/crypto.meta | 8 +
.../tls/crypto/CryptoHashAlgorithm.cs | 19 +
.../tls/crypto/CryptoHashAlgorithm.cs.meta | 11 +
.../tls/crypto/CryptoSignatureAlgorithm.cs | 29 +
.../crypto/CryptoSignatureAlgorithm.cs.meta | 11 +
.../BouncyCastle/tls/crypto/DHGroup.cs | 50 +
.../BouncyCastle/tls/crypto/DHGroup.cs.meta | 11 +
.../tls/crypto/DHStandardGroups.cs | 252 +
.../tls/crypto/DHStandardGroups.cs.meta | 11 +
.../BouncyCastle/tls/crypto/Srp6Group.cs | 35 +
.../BouncyCastle/tls/crypto/Srp6Group.cs.meta | 11 +
.../tls/crypto/Srp6StandardGroups.cs | 163 +
.../tls/crypto/Srp6StandardGroups.cs.meta | 11 +
.../BouncyCastle/tls/crypto/Tls13Verifier.cs | 18 +
.../tls/crypto/Tls13Verifier.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsAgreement.cs | 28 +
.../tls/crypto/TlsAgreement.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsCertificate.cs | 61 +
.../tls/crypto/TlsCertificate.cs.meta | 11 +
.../tls/crypto/TlsCertificateRole.cs | 16 +
.../tls/crypto/TlsCertificateRole.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsCipher.cs | 70 +
.../BouncyCastle/tls/crypto/TlsCipher.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsCrypto.cs | 213 +
.../BouncyCastle/tls/crypto/TlsCrypto.cs.meta | 11 +
.../tls/crypto/TlsCryptoException.cs | 35 +
.../tls/crypto/TlsCryptoException.cs.meta | 11 +
.../tls/crypto/TlsCryptoParameters.cs | 53 +
.../tls/crypto/TlsCryptoParameters.cs.meta | 11 +
.../tls/crypto/TlsCryptoUtilities.cs | 278 +
.../tls/crypto/TlsCryptoUtilities.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsDHConfig.cs | 45 +
.../tls/crypto/TlsDHConfig.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsDHDomain.cs | 16 +
.../tls/crypto/TlsDHDomain.cs.meta | 11 +
.../tls/crypto/TlsDecodeResult.cs | 35 +
.../tls/crypto/TlsDecodeResult.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsECConfig.cs | 26 +
.../tls/crypto/TlsECConfig.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsECDomain.cs | 16 +
.../tls/crypto/TlsECDomain.cs.meta | 11 +
.../tls/crypto/TlsEncodeResult.cs | 34 +
.../tls/crypto/TlsEncodeResult.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsEncryptor.cs | 21 +
.../tls/crypto/TlsEncryptor.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsHash.cs | 33 +
.../BouncyCastle/tls/crypto/TlsHash.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsHashSink.cs | 51 +
.../tls/crypto/TlsHashSink.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsHmac.cs | 17 +
.../BouncyCastle/tls/crypto/TlsHmac.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsMac.cs | 48 +
.../BouncyCastle/tls/crypto/TlsMac.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsMacSink.cs | 51 +
.../tls/crypto/TlsMacSink.cs.meta | 11 +
.../tls/crypto/TlsNonceGenerator.cs | 16 +
.../tls/crypto/TlsNonceGenerator.cs.meta | 11 +
.../tls/crypto/TlsNullNullCipher.cs | 69 +
.../tls/crypto/TlsNullNullCipher.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsSecret.cs | 86 +
.../BouncyCastle/tls/crypto/TlsSecret.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsSigner.cs | 23 +
.../BouncyCastle/tls/crypto/TlsSigner.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsSrp6Client.cs | 28 +
.../tls/crypto/TlsSrp6Client.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsSrp6Server.cs | 26 +
.../tls/crypto/TlsSrp6Server.cs.meta | 11 +
.../tls/crypto/TlsSrp6VerifierGenerator.cs | 21 +
.../crypto/TlsSrp6VerifierGenerator.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsSrpConfig.cs | 30 +
.../tls/crypto/TlsSrpConfig.cs.meta | 11 +
.../tls/crypto/TlsStreamSigner.cs | 18 +
.../tls/crypto/TlsStreamSigner.cs.meta | 11 +
.../tls/crypto/TlsStreamVerifier.cs | 18 +
.../tls/crypto/TlsStreamVerifier.cs.meta | 11 +
.../BouncyCastle/tls/crypto/TlsVerifier.cs | 24 +
.../tls/crypto/TlsVerifier.cs.meta | 11 +
.../BouncyCastle/tls/crypto/impl.meta | 8 +
.../tls/crypto/impl/AbstractTlsCrypto.cs | 101 +
.../tls/crypto/impl/AbstractTlsCrypto.cs.meta | 11 +
.../tls/crypto/impl/AbstractTlsSecret.cs | 144 +
.../tls/crypto/impl/AbstractTlsSecret.cs.meta | 11 +
.../tls/crypto/impl/LegacyTls13Verifier.cs | 64 +
.../crypto/impl/LegacyTls13Verifier.cs.meta | 11 +
.../tls/crypto/impl/RsaUtilities.cs | 140 +
.../tls/crypto/impl/RsaUtilities.cs.meta | 11 +
.../tls/crypto/impl/TlsAeadCipher.cs | 497 ++
.../tls/crypto/impl/TlsAeadCipher.cs.meta | 11 +
.../tls/crypto/impl/TlsAeadCipherImpl.cs | 51 +
.../tls/crypto/impl/TlsAeadCipherImpl.cs.meta | 11 +
.../tls/crypto/impl/TlsBlockCipher.cs | 532 ++
.../tls/crypto/impl/TlsBlockCipher.cs.meta | 11 +
.../tls/crypto/impl/TlsBlockCipherImpl.cs | 52 +
.../crypto/impl/TlsBlockCipherImpl.cs.meta | 11 +
.../tls/crypto/impl/TlsImplUtilities.cs | 86 +
.../tls/crypto/impl/TlsImplUtilities.cs.meta | 11 +
.../tls/crypto/impl/TlsNullCipher.cs | 133 +
.../tls/crypto/impl/TlsNullCipher.cs.meta | 11 +
.../tls/crypto/impl/TlsSuiteHmac.cs | 151 +
.../tls/crypto/impl/TlsSuiteHmac.cs.meta | 11 +
.../tls/crypto/impl/TlsSuiteMac.cs | 41 +
.../tls/crypto/impl/TlsSuiteMac.cs.meta | 11 +
.../BouncyCastle/tls/crypto/impl/bc.meta | 8 +
.../tls/crypto/impl/bc/BcChaCha20Poly1305.cs | 149 +
.../crypto/impl/bc/BcChaCha20Poly1305.cs.meta | 11 +
.../bc/BcDefaultTlsCredentialedAgreement.cs | 116 +
.../BcDefaultTlsCredentialedAgreement.cs.meta | 11 +
.../bc/BcDefaultTlsCredentialedDecryptor.cs | 143 +
.../BcDefaultTlsCredentialedDecryptor.cs.meta | 11 +
.../impl/bc/BcDefaultTlsCredentialedSigner.cs | 89 +
.../bc/BcDefaultTlsCredentialedSigner.cs.meta | 11 +
.../tls/crypto/impl/bc/BcSsl3Hmac.cs | 133 +
.../tls/crypto/impl/bc/BcSsl3Hmac.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTls13Verifier.cs | 36 +
.../crypto/impl/bc/BcTls13Verifier.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsAeadCipherImpl.cs | 70 +
.../impl/bc/BcTlsAeadCipherImpl.cs.meta | 11 +
.../crypto/impl/bc/BcTlsBlockCipherImpl.cs | 67 +
.../impl/bc/BcTlsBlockCipherImpl.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsCertificate.cs | 101 +
.../crypto/impl/bc/BcTlsCertificate.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsCrypto.cs | 774 +++
.../tls/crypto/impl/bc/BcTlsCrypto.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsDH.cs | 43 +
.../tls/crypto/impl/bc/BcTlsDH.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsDHDomain.cs | 121 +
.../tls/crypto/impl/bc/BcTlsDHDomain.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsDsaSigner.cs | 33 +
.../tls/crypto/impl/bc/BcTlsDsaSigner.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsDsaVerifier.cs | 33 +
.../crypto/impl/bc/BcTlsDsaVerifier.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsDssSigner.cs | 58 +
.../tls/crypto/impl/bc/BcTlsDssSigner.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsDssVerifier.cs | 47 +
.../crypto/impl/bc/BcTlsDssVerifier.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsECDH.cs | 43 +
.../tls/crypto/impl/bc/BcTlsECDH.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsECDomain.cs | 125 +
.../tls/crypto/impl/bc/BcTlsECDomain.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsECDsa13Signer.cs | 51 +
.../crypto/impl/bc/BcTlsECDsa13Signer.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsECDsaSigner.cs | 33 +
.../crypto/impl/bc/BcTlsECDsaSigner.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsECDsaVerifier.cs | 33 +
.../crypto/impl/bc/BcTlsECDsaVerifier.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsEd25519Signer.cs | 31 +
.../crypto/impl/bc/BcTlsEd25519Signer.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsEd448Signer.cs | 31 +
.../crypto/impl/bc/BcTlsEd448Signer.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsHash.cs | 60 +
.../tls/crypto/impl/bc/BcTlsHash.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsHmac.cs | 73 +
.../tls/crypto/impl/bc/BcTlsHmac.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsNonceGenerator.cs | 28 +
.../impl/bc/BcTlsNonceGenerator.cs.meta | 11 +
.../crypto/impl/bc/BcTlsRawKeyCertificate.cs | 511 ++
.../impl/bc/BcTlsRawKeyCertificate.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsRsaEncryptor.cs | 51 +
.../crypto/impl/bc/BcTlsRsaEncryptor.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsRsaPssSigner.cs | 51 +
.../crypto/impl/bc/BcTlsRsaPssSigner.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsRsaPssVerifier.cs | 45 +
.../impl/bc/BcTlsRsaPssVerifier.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsRsaSigner.cs | 75 +
.../tls/crypto/impl/bc/BcTlsRsaSigner.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsRsaVerifier.cs | 56 +
.../crypto/impl/bc/BcTlsRsaVerifier.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsSecret.cs | 416 ++
.../tls/crypto/impl/bc/BcTlsSecret.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsSigner.cs | 40 +
.../tls/crypto/impl/bc/BcTlsSigner.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsSrp6Client.cs | 40 +
.../crypto/impl/bc/BcTlsSrp6Client.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsSrp6Server.cs | 40 +
.../crypto/impl/bc/BcTlsSrp6Server.cs.meta | 11 +
.../impl/bc/BcTlsSrp6VerifierGenerator.cs | 27 +
.../bc/BcTlsSrp6VerifierGenerator.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsStreamSigner.cs | 40 +
.../crypto/impl/bc/BcTlsStreamSigner.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsStreamVerifier.cs | 35 +
.../impl/bc/BcTlsStreamVerifier.cs.meta | 11 +
.../tls/crypto/impl/bc/BcTlsVerifier.cs | 40 +
.../tls/crypto/impl/bc/BcTlsVerifier.cs.meta | 11 +
.../crypto/impl/bc/BcVerifyingStreamSigner.cs | 52 +
.../impl/bc/BcVerifyingStreamSigner.cs.meta | 11 +
.../tls/crypto/impl/bc/BcX25519.cs | 58 +
.../tls/crypto/impl/bc/BcX25519.cs.meta | 11 +
.../tls/crypto/impl/bc/BcX25519Domain.cs | 24 +
.../tls/crypto/impl/bc/BcX25519Domain.cs.meta | 11 +
.../BouncyCastle/tls/crypto/impl/bc/BcX448.cs | 58 +
.../tls/crypto/impl/bc/BcX448.cs.meta | 11 +
.../tls/crypto/impl/bc/BcX448Domain.cs | 24 +
.../tls/crypto/impl/bc/BcX448Domain.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/tsp.meta | 8 +
.../BouncyCastle/tsp/GenTimeAccuracy.cs | 37 +
.../BouncyCastle/tsp/GenTimeAccuracy.cs.meta | 11 +
.../BouncyCastle/tsp/TSPAlgorithms.cs | 53 +
.../BouncyCastle/tsp/TSPAlgorithms.cs.meta | 11 +
.../3rdParty/BouncyCastle/tsp/TSPException.cs | 34 +
.../BouncyCastle/tsp/TSPException.cs.meta | 11 +
.../3rdParty/BouncyCastle/tsp/TSPUtil.cs | 206 +
.../3rdParty/BouncyCastle/tsp/TSPUtil.cs.meta | 11 +
.../tsp/TSPValidationException.cs | 51 +
.../tsp/TSPValidationException.cs.meta | 11 +
.../BouncyCastle/tsp/TimeStampRequest.cs | 185 +
.../BouncyCastle/tsp/TimeStampRequest.cs.meta | 11 +
.../tsp/TimeStampRequestGenerator.cs | 98 +
.../tsp/TimeStampRequestGenerator.cs.meta | 11 +
.../BouncyCastle/tsp/TimeStampResponse.cs | 188 +
.../tsp/TimeStampResponse.cs.meta | 11 +
.../tsp/TimeStampResponseGenerator.cs | 259 +
.../tsp/TimeStampResponseGenerator.cs.meta | 11 +
.../BouncyCastle/tsp/TimeStampToken.cs | 308 +
.../BouncyCastle/tsp/TimeStampToken.cs.meta | 11 +
.../tsp/TimeStampTokenGenerator.cs | 452 ++
.../tsp/TimeStampTokenGenerator.cs.meta | 11 +
.../BouncyCastle/tsp/TimeStampTokenInfo.cs | 128 +
.../tsp/TimeStampTokenInfo.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/util.meta | 8 +
.../3rdParty/BouncyCastle/util/Arrays.cs | 1015 +++
.../3rdParty/BouncyCastle/util/Arrays.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/BigIntegers.cs | 255 +
.../BouncyCastle/util/BigIntegers.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/Bytes.cs | 14 +
.../3rdParty/BouncyCastle/util/Bytes.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/Enums.cs | 50 +
.../3rdParty/BouncyCastle/util/Enums.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/IEncodable.cs | 16 +
.../BouncyCastle/util/IEncodable.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/IMemoable.cs | 33 +
.../BouncyCastle/util/IMemoable.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/Integers.cs | 162 +
.../BouncyCastle/util/Integers.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/Longs.cs | 163 +
.../3rdParty/BouncyCastle/util/Longs.cs.meta | 11 +
.../util/MemoableResetException.cs | 42 +
.../util/MemoableResetException.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/Objects.cs | 14 +
.../BouncyCastle/util/Objects.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/Platform.cs | 73 +
.../BouncyCastle/util/Platform.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/Shorts.cs | 58 +
.../3rdParty/BouncyCastle/util/Shorts.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/Spans.cs | 46 +
.../3rdParty/BouncyCastle/util/Spans.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/Strings.cs | 83 +
.../BouncyCastle/util/Strings.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/bzip2.meta | 8 +
.../BouncyCastle/util/bzip2/BZip2Constants.cs | 51 +
.../util/bzip2/BZip2Constants.cs.meta | 11 +
.../util/bzip2/CBZip2InputStream.cs | 813 +++
.../util/bzip2/CBZip2InputStream.cs.meta | 11 +
.../util/bzip2/CBZip2OutputStream.cs | 1623 +++++
.../util/bzip2/CBZip2OutputStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/bzip2/CRC.cs | 162 +
.../BouncyCastle/util/bzip2/CRC.cs.meta | 11 +
.../BouncyCastle/util/collections.meta | 8 +
.../util/collections/CollectionUtilities.cs | 108 +
.../collections/CollectionUtilities.cs.meta | 11 +
.../util/collections/EnumerableProxy.cs | 33 +
.../util/collections/EnumerableProxy.cs.meta | 11 +
.../BouncyCastle/util/collections/HashSet.cs | 3 +
.../util/collections/HashSet.cs.meta | 11 +
.../util/collections/ISelector.cs | 20 +
.../util/collections/ISelector.cs.meta | 11 +
.../BouncyCastle/util/collections/IStore.cs | 19 +
.../util/collections/IStore.cs.meta | 11 +
.../util/collections/LinkedDictionary.cs | 3 +
.../util/collections/LinkedDictionary.cs.meta | 11 +
.../util/collections/ReadOnlyCollection.cs | 48 +
.../collections/ReadOnlyCollection.cs.meta | 11 +
.../util/collections/ReadOnlyDictionary.cs | 68 +
.../collections/ReadOnlyDictionary.cs.meta | 11 +
.../util/collections/ReadOnlyList.cs | 63 +
.../util/collections/ReadOnlyList.cs.meta | 11 +
.../util/collections/ReadOnlySet.cs | 65 +
.../util/collections/ReadOnlySet.cs.meta | 11 +
.../util/collections/StoreImpl.cs | 29 +
.../util/collections/StoreImpl.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/date.meta | 8 +
.../util/date/DateTimeUtilities.cs | 87 +
.../util/date/DateTimeUtilities.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/encoders.meta | 8 +
.../BouncyCastle/util/encoders/Base64.cs | 124 +
.../BouncyCastle/util/encoders/Base64.cs.meta | 11 +
.../util/encoders/Base64Encoder.cs | 511 ++
.../util/encoders/Base64Encoder.cs.meta | 11 +
.../util/encoders/BufferedDecoder.cs | 121 +
.../util/encoders/BufferedDecoder.cs.meta | 11 +
.../util/encoders/BufferedEncoder.cs | 121 +
.../util/encoders/BufferedEncoder.cs.meta | 11 +
.../BouncyCastle/util/encoders/Hex.cs | 155 +
.../BouncyCastle/util/encoders/Hex.cs.meta | 11 +
.../BouncyCastle/util/encoders/HexEncoder.cs | 356 +
.../util/encoders/HexEncoder.cs.meta | 11 +
.../util/encoders/HexTranslator.cs | 112 +
.../util/encoders/HexTranslator.cs.meta | 11 +
.../BouncyCastle/util/encoders/IEncoder.cs | 30 +
.../util/encoders/IEncoder.cs.meta | 11 +
.../BouncyCastle/util/encoders/Translator.cs | 23 +
.../util/encoders/Translator.cs.meta | 11 +
.../BouncyCastle/util/encoders/UrlBase64.cs | 131 +
.../util/encoders/UrlBase64.cs.meta | 11 +
.../util/encoders/UrlBase64Encoder.cs | 35 +
.../util/encoders/UrlBase64Encoder.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/io.meta | 8 +
.../BouncyCastle/util/io/BaseInputStream.cs | 57 +
.../util/io/BaseInputStream.cs.meta | 11 +
.../BouncyCastle/util/io/BaseOutputStream.cs | 49 +
.../util/io/BaseOutputStream.cs.meta | 11 +
.../BouncyCastle/util/io/BinaryReaders.cs | 98 +
.../util/io/BinaryReaders.cs.meta | 11 +
.../BouncyCastle/util/io/BinaryWriters.cs | 90 +
.../util/io/BinaryWriters.cs.meta | 11 +
.../BouncyCastle/util/io/FilterStream.cs | 100 +
.../BouncyCastle/util/io/FilterStream.cs.meta | 11 +
.../util/io/LimitedInputStream.cs | 60 +
.../util/io/LimitedInputStream.cs.meta | 11 +
.../BouncyCastle/util/io/MemoryInputStream.cs | 23 +
.../util/io/MemoryInputStream.cs.meta | 11 +
.../util/io/MemoryOutputStream.cs | 18 +
.../util/io/MemoryOutputStream.cs.meta | 11 +
.../BouncyCastle/util/io/PushbackStream.cs | 87 +
.../util/io/PushbackStream.cs.meta | 11 +
.../util/io/StreamOverflowException.cs | 35 +
.../util/io/StreamOverflowException.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/io/Streams.cs | 140 +
.../BouncyCastle/util/io/Streams.cs.meta | 11 +
.../BouncyCastle/util/io/TeeInputStream.cs | 73 +
.../util/io/TeeInputStream.cs.meta | 11 +
.../BouncyCastle/util/io/TeeOutputStream.cs | 55 +
.../util/io/TeeOutputStream.cs.meta | 11 +
.../BouncyCastle/util/io/compression.meta | 8 +
.../BouncyCastle/util/io/compression/Bzip2.cs | 25 +
.../util/io/compression/Bzip2.cs.meta | 11 +
.../BouncyCastle/util/io/compression/ZLib.cs | 50 +
.../util/io/compression/ZLib.cs.meta | 11 +
.../BouncyCastle/util/io/compression/Zip.cs | 37 +
.../util/io/compression/Zip.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/io/pem.meta | 8 +
.../util/io/pem/PemGenerationException.cs | 34 +
.../io/pem/PemGenerationException.cs.meta | 11 +
.../BouncyCastle/util/io/pem/PemHeader.cs | 64 +
.../util/io/pem/PemHeader.cs.meta | 11 +
.../BouncyCastle/util/io/pem/PemObject.cs | 49 +
.../util/io/pem/PemObject.cs.meta | 11 +
.../util/io/pem/PemObjectGenerator.cs | 17 +
.../util/io/pem/PemObjectGenerator.cs.meta | 11 +
.../util/io/pem/PemObjectParser.cs | 21 +
.../util/io/pem/PemObjectParser.cs.meta | 11 +
.../BouncyCastle/util/io/pem/PemReader.cs | 377 ++
.../util/io/pem/PemReader.cs.meta | 11 +
.../BouncyCastle/util/io/pem/PemWriter.cs | 139 +
.../util/io/pem/PemWriter.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/net.meta | 8 +
.../BouncyCastle/util/net/IPAddress.cs | 201 +
.../BouncyCastle/util/net/IPAddress.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/zlib.meta | 8 +
.../BouncyCastle/util/zlib/Adler32.cs | 92 +
.../BouncyCastle/util/zlib/Adler32.cs.meta | 11 +
.../BouncyCastle/util/zlib/Deflate.cs | 1638 +++++
.../BouncyCastle/util/zlib/Deflate.cs.meta | 11 +
.../BouncyCastle/util/zlib/InfBlocks.cs | 622 ++
.../BouncyCastle/util/zlib/InfBlocks.cs.meta | 11 +
.../BouncyCastle/util/zlib/InfCodes.cs | 615 ++
.../BouncyCastle/util/zlib/InfCodes.cs.meta | 11 +
.../BouncyCastle/util/zlib/InfTree.cs | 527 ++
.../BouncyCastle/util/zlib/InfTree.cs.meta | 11 +
.../BouncyCastle/util/zlib/Inflate.cs | 391 ++
.../BouncyCastle/util/zlib/Inflate.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/zlib/JZlib.cs | 78 +
.../BouncyCastle/util/zlib/JZlib.cs.meta | 11 +
.../BouncyCastle/util/zlib/StaticTree.cs | 156 +
.../BouncyCastle/util/zlib/StaticTree.cs.meta | 11 +
.../util/zlib/ZDeflaterOutputStream.cs | 3 +
.../util/zlib/ZDeflaterOutputStream.cs.meta | 11 +
.../util/zlib/ZInflaterInputStream.cs | 3 +
.../util/zlib/ZInflaterInputStream.cs.meta | 11 +
.../BouncyCastle/util/zlib/ZInputStream.cs | 212 +
.../util/zlib/ZInputStream.cs.meta | 11 +
.../BouncyCastle/util/zlib/ZOutputStream.cs | 305 +
.../util/zlib/ZOutputStream.cs.meta | 11 +
.../BouncyCastle/util/zlib/ZStream.cs | 218 +
.../BouncyCastle/util/zlib/ZStream.cs.meta | 11 +
.../3rdParty/BouncyCastle/util/zlib/ZTree.cs | 371 ++
.../BouncyCastle/util/zlib/ZTree.cs.meta | 11 +
.../Runtime/3rdParty/BouncyCastle/x509.meta | 8 +
.../x509/AttributeCertificateHolder.cs | 427 ++
.../x509/AttributeCertificateHolder.cs.meta | 11 +
.../x509/AttributeCertificateIssuer.cs | 182 +
.../x509/AttributeCertificateIssuer.cs.meta | 11 +
.../BouncyCastle/x509/IX509Extension.cs | 28 +
.../BouncyCastle/x509/IX509Extension.cs.meta | 11 +
.../3rdParty/BouncyCastle/x509/PEMParser.cs | 99 +
.../BouncyCastle/x509/PEMParser.cs.meta | 11 +
.../BouncyCastle/x509/PrincipalUtil.cs | 74 +
.../BouncyCastle/x509/PrincipalUtil.cs.meta | 11 +
.../x509/SubjectPublicKeyInfoFactory.cs | 277 +
.../x509/SubjectPublicKeyInfoFactory.cs.meta | 11 +
.../BouncyCastle/x509/X509AttrCertParser.cs | 175 +
.../x509/X509AttrCertParser.cs.meta | 11 +
.../BouncyCastle/x509/X509Attribute.cs | 80 +
.../BouncyCastle/x509/X509Attribute.cs.meta | 11 +
.../BouncyCastle/x509/X509CertPairParser.cs | 101 +
.../x509/X509CertPairParser.cs.meta | 11 +
.../BouncyCastle/x509/X509Certificate.cs | 748 +++
.../BouncyCastle/x509/X509Certificate.cs.meta | 11 +
.../BouncyCastle/x509/X509CertificatePair.cs | 127 +
.../x509/X509CertificatePair.cs.meta | 11 +
.../x509/X509CertificateParser.cs | 171 +
.../x509/X509CertificateParser.cs.meta | 11 +
.../3rdParty/BouncyCastle/x509/X509Crl.cs | 497 ++
.../BouncyCastle/x509/X509Crl.cs.meta | 11 +
.../BouncyCastle/x509/X509CrlEntry.cs | 234 +
.../BouncyCastle/x509/X509CrlEntry.cs.meta | 11 +
.../BouncyCastle/x509/X509CrlParser.cs | 176 +
.../BouncyCastle/x509/X509CrlParser.cs.meta | 11 +
.../BouncyCastle/x509/X509ExtensionBase.cs | 59 +
.../x509/X509ExtensionBase.cs.meta | 11 +
.../BouncyCastle/x509/X509KeyUsage.cs | 63 +
.../BouncyCastle/x509/X509KeyUsage.cs.meta | 11 +
.../BouncyCastle/x509/X509SignatureUtil.cs | 139 +
.../x509/X509SignatureUtil.cs.meta | 11 +
.../BouncyCastle/x509/X509Utilities.cs | 167 +
.../BouncyCastle/x509/X509Utilities.cs.meta | 11 +
.../x509/X509V1CertificateGenerator.cs | 151 +
.../x509/X509V1CertificateGenerator.cs.meta | 11 +
.../x509/X509V2AttributeCertificate.cs | 280 +
.../x509/X509V2AttributeCertificate.cs.meta | 11 +
.../X509V2AttributeCertificateGenerator.cs | 146 +
...509V2AttributeCertificateGenerator.cs.meta | 11 +
.../BouncyCastle/x509/X509V2CRLGenerator.cs | 214 +
.../x509/X509V2CRLGenerator.cs.meta | 11 +
.../x509/X509V3CertificateGenerator.cs | 285 +
.../x509/X509V3CertificateGenerator.cs.meta | 11 +
.../3rdParty/BouncyCastle/x509/extension.meta | 8 +
.../AuthorityKeyIdentifierStructure.cs | 106 +
.../AuthorityKeyIdentifierStructure.cs.meta | 11 +
.../SubjectKeyIdentifierStructure.cs | 53 +
.../SubjectKeyIdentifierStructure.cs.meta | 11 +
.../x509/extension/X509ExtensionUtil.cs | 31 +
.../x509/extension/X509ExtensionUtil.cs.meta | 11 +
.../3rdParty/BouncyCastle/x509/store.meta | 8 +
.../x509/store/X509AttrCertStoreSelector.cs | 363 ++
.../store/X509AttrCertStoreSelector.cs.meta | 11 +
.../x509/store/X509CertPairStoreSelector.cs | 92 +
.../store/X509CertPairStoreSelector.cs.meta | 11 +
.../x509/store/X509CertStoreSelector.cs | 333 +
.../x509/store/X509CertStoreSelector.cs.meta | 11 +
.../x509/store/X509CollectionStore.cs | 3 +
.../x509/store/X509CollectionStore.cs.meta | 11 +
.../store/X509CollectionStoreParameters.cs | 3 +
.../X509CollectionStoreParameters.cs.meta | 11 +
.../x509/store/X509CrlStoreSelector.cs | 283 +
.../x509/store/X509CrlStoreSelector.cs.meta | 11 +
.../x509/store/X509StoreFactory.cs | 3 +
.../x509/store/X509StoreFactory.cs.meta | 11 +
.../Runtime/3rdParty/Compression.meta | 8 +
.../Runtime/3rdParty/Compression/CRC.meta | 8 +
.../Runtime/3rdParty/Compression/CRC/CRC32.cs | 473 ++
.../3rdParty/Compression/CRC/CRC32.cs.meta | 11 +
.../Runtime/3rdParty/Compression/Zlib.meta | 8 +
.../3rdParty/Compression/Zlib/Deflate.cs | 1883 ++++++
.../3rdParty/Compression/Zlib/Deflate.cs.meta | 11 +
.../Compression/Zlib/DeflateStream.cs | 692 ++
.../Compression/Zlib/DeflateStream.cs.meta | 11 +
.../3rdParty/Compression/Zlib/GZipStream.cs | 919 +++
.../Compression/Zlib/GZipStream.cs.meta | 11 +
.../3rdParty/Compression/Zlib/InfTree.cs | 436 ++
.../3rdParty/Compression/Zlib/InfTree.cs.meta | 11 +
.../3rdParty/Compression/Zlib/Inflate.cs | 1798 +++++
.../3rdParty/Compression/Zlib/Inflate.cs.meta | 11 +
.../3rdParty/Compression/Zlib/ZTree.cs | 423 ++
.../3rdParty/Compression/Zlib/ZTree.cs.meta | 11 +
.../Runtime/3rdParty/Compression/Zlib/Zlib.cs | 546 ++
.../3rdParty/Compression/Zlib/Zlib.cs.meta | 11 +
.../Compression/Zlib/ZlibBaseStream.cs | 595 ++
.../Compression/Zlib/ZlibBaseStream.cs.meta | 11 +
.../3rdParty/Compression/Zlib/ZlibCodec.cs | 712 ++
.../Compression/Zlib/ZlibCodec.cs.meta | 11 +
.../Compression/Zlib/ZlibConstants.cs | 128 +
.../Compression/Zlib/ZlibConstants.cs.meta | 11 +
.../Runtime/3rdParty/JSON.meta | 8 +
.../Runtime/3rdParty/JSON/JSON.cs | 492 ++
.../Runtime/3rdParty/JSON/JSON.cs.meta | 11 +
.../Runtime/3rdParty/JSON/LitJson.meta | 8 +
.../3rdParty/JSON/LitJson/IJsonWrapper.cs | 73 +
.../JSON/LitJson/IJsonWrapper.cs.meta | 11 +
.../Runtime/3rdParty/JSON/LitJson/JsonData.cs | 1069 +++
.../3rdParty/JSON/LitJson/JsonData.cs.meta | 11 +
.../3rdParty/JSON/LitJson/JsonException.cs | 60 +
.../JSON/LitJson/JsonException.cs.meta | 11 +
.../3rdParty/JSON/LitJson/JsonMapper.cs | 1352 ++++
.../3rdParty/JSON/LitJson/JsonMapper.cs.meta | 11 +
.../3rdParty/JSON/LitJson/JsonMockWrapper.cs | 105 +
.../JSON/LitJson/JsonMockWrapper.cs.meta | 11 +
.../3rdParty/JSON/LitJson/JsonReader.cs | 563 ++
.../3rdParty/JSON/LitJson/JsonReader.cs.meta | 11 +
.../3rdParty/JSON/LitJson/JsonWriter.cs | 523 ++
.../3rdParty/JSON/LitJson/JsonWriter.cs.meta | 11 +
.../Runtime/3rdParty/JSON/LitJson/Lexer.cs | 993 +++
.../3rdParty/JSON/LitJson/Lexer.cs.meta | 11 +
.../3rdParty/JSON/LitJson/ParserToken.cs | 44 +
.../3rdParty/JSON/LitJson/ParserToken.cs.meta | 11 +
.../Runtime/AssemblyInfo.cs | 10 +
.../Runtime/AssemblyInfo.cs.meta | 11 +
.../com.tivadar.best.http/Runtime/HTTP.meta | 8 +
.../Runtime/HTTP/Caching.meta | 8 +
.../Runtime/HTTP/Caching/Builders.cs | 95 +
.../Runtime/HTTP/Caching/Builders.cs.meta | 11 +
.../Runtime/HTTP/Caching/HTTPCache.cs | 1090 ++++
.../Runtime/HTTP/Caching/HTTPCache.cs.meta | 11 +
.../HTTP/Caching/HTTPCacheContentWriter.cs | 103 +
.../Caching/HTTPCacheContentWriter.cs.meta | 11 +
.../Runtime/HTTP/Caching/HTTPCacheDatabase.cs | 733 +++
.../HTTP/Caching/HTTPCacheDatabase.cs.meta | 11 +
.../Runtime/HTTP/Caching/HTTPCacheOptions.cs | 39 +
.../HTTP/Caching/HTTPCacheOptions.cs.meta | 11 +
.../Runtime/HTTP/Cookies.meta | 8 +
.../Runtime/HTTP/Cookies/Cookie.cs | 417 ++
.../Runtime/HTTP/Cookies/Cookie.cs.meta | 11 +
.../Runtime/HTTP/Cookies/CookieJar.cs | 677 ++
.../Runtime/HTTP/Cookies/CookieJar.cs.meta | 11 +
.../Runtime/HTTP/HTTPMethods.cs | 127 +
.../Runtime/HTTP/HTTPMethods.cs.meta | 11 +
.../Runtime/HTTP/HTTPRange.cs | 55 +
.../Runtime/HTTP/HTTPRange.cs.meta | 11 +
.../Runtime/HTTP/HTTPRequest.cs | 680 ++
.../Runtime/HTTP/HTTPRequest.cs.meta | 11 +
.../HTTP/HTTPRequestAsyncExtensions.cs | 409 ++
.../HTTP/HTTPRequestAsyncExtensions.cs.meta | 11 +
.../Runtime/HTTP/HTTPRequestStates.cs | 50 +
.../Runtime/HTTP/HTTPRequestStates.cs.meta | 11 +
.../Runtime/HTTP/Hosts.meta | 8 +
.../Runtime/HTTP/Hosts/Connections.meta | 8 +
.../HTTP/Hosts/Connections/ConnectionBase.cs | 145 +
.../Hosts/Connections/ConnectionBase.cs.meta | 11 +
.../Hosts/Connections/ConnectionEvents.cs | 198 +
.../Connections/ConnectionEvents.cs.meta | 11 +
.../Hosts/Connections/ConnectionHelper.cs | 310 +
.../Connections/ConnectionHelper.cs.meta | 11 +
.../Runtime/HTTP/Hosts/Connections/File.meta | 8 +
.../Hosts/Connections/File/FileConnection.cs | 274 +
.../Connections/File/FileConnection.cs.meta | 11 +
.../Runtime/HTTP/Hosts/Connections/HTTP1.meta | 8 +
.../HTTP/Hosts/Connections/HTTP1/Constants.cs | 15 +
.../Hosts/Connections/HTTP1/Constants.cs.meta | 11 +
.../Connections/HTTP1/HTTP1ContentConsumer.cs | 605 ++
.../HTTP1/HTTP1ContentConsumer.cs.meta | 11 +
.../HTTP1/PeekableHTTP1Response.cs | 540 ++
.../HTTP1/PeekableHTTP1Response.cs.meta | 11 +
.../Runtime/HTTP/Hosts/Connections/HTTP2.meta | 8 +
.../Hosts/Connections/HTTP2/BufferHelper.cs | 167 +
.../Connections/HTTP2/BufferHelper.cs.meta | 11 +
.../Connections/HTTP2/FramesAsStreamView.cs | 203 +
.../HTTP2/FramesAsStreamView.cs.meta | 11 +
.../Hosts/Connections/HTTP2/HPACKEncoder.cs | 815 +++
.../Connections/HTTP2/HPACKEncoder.cs.meta | 11 +
.../HTTP2/HTTP2ConnectionSettings.cs | 93 +
.../HTTP2/HTTP2ConnectionSettings.cs.meta | 11 +
.../Connections/HTTP2/HTTP2ContentConsumer.cs | 709 ++
.../HTTP2/HTTP2ContentConsumer.cs.meta | 11 +
.../Connections/HTTP2/HTTP2FrameHelper.cs | 430 ++
.../HTTP2/HTTP2FrameHelper.cs.meta | 11 +
.../Hosts/Connections/HTTP2/HTTP2Frames.cs | 392 ++
.../Connections/HTTP2/HTTP2Frames.cs.meta | 11 +
.../Hosts/Connections/HTTP2/HTTP2Response.cs | 160 +
.../Connections/HTTP2/HTTP2Response.cs.meta | 11 +
.../HTTP2/HTTP2SettingsRegistry.cs | 331 +
.../HTTP2/HTTP2SettingsRegistry.cs.meta | 11 +
.../Hosts/Connections/HTTP2/HTTP2Stream.cs | 663 ++
.../Connections/HTTP2/HTTP2Stream.cs.meta | 11 +
.../Hosts/Connections/HTTP2/HeaderTable.cs | 201 +
.../Connections/HTTP2/HeaderTable.cs.meta | 11 +
.../Hosts/Connections/HTTP2/HuffmanEncoder.cs | 933 +++
.../Connections/HTTP2/HuffmanEncoder.cs.meta | 11 +
.../Hosts/Connections/HTTPConnectionStates.cs | 44 +
.../Connections/HTTPConnectionStates.cs.meta | 11 +
.../Connections/HTTPOverTCPConnection.cs | 457 ++
.../Connections/HTTPOverTCPConnection.cs.meta | 11 +
.../Hosts/Connections/HTTPProtocolFactory.cs | 59 +
.../Connections/HTTPProtocolFactory.cs.meta | 11 +
.../IDownloadContentBufferAvailable.cs | 18 +
.../IDownloadContentBufferAvailable.cs.meta | 11 +
.../Hosts/Connections/IHTTPRequestHandler.cs | 43 +
.../Connections/IHTTPRequestHandler.cs.meta | 11 +
.../HTTP/Hosts/Connections/IThreadSignaler.cs | 30 +
.../Hosts/Connections/IThreadSignaler.cs.meta | 11 +
.../HTTP/Hosts/Connections/RequestEvents.cs | 654 ++
.../Hosts/Connections/RequestEvents.cs.meta | 11 +
.../Runtime/HTTP/Hosts/Connections/WebGL.meta | 8 +
.../Connections/WebGL/WebGLXHRConnection.cs | 332 +
.../WebGL/WebGLXHRConnection.cs.meta | 11 +
.../WebGL/WebGLXHRNativeConnectionLayer.cs | 153 +
.../WebGLXHRNativeConnectionLayer.cs.meta | 11 +
.../WebGL/WebGLXHRNativeInterface.cs | 54 +
.../WebGL/WebGLXHRNativeInterface.cs.meta | 11 +
.../Runtime/HTTP/Hosts/Manager.meta | 8 +
.../Runtime/HTTP/Hosts/Manager/HostKey.cs | 134 +
.../HTTP/Hosts/Manager/HostKey.cs.meta | 11 +
.../Runtime/HTTP/Hosts/Manager/HostManager.cs | 150 +
.../HTTP/Hosts/Manager/HostManager.cs.meta | 11 +
.../Runtime/HTTP/Hosts/Manager/HostVariant.cs | 357 +
.../HTTP/Hosts/Manager/HostVariant.cs.meta | 11 +
.../Runtime/HTTP/Hosts/Settings.meta | 8 +
.../Hosts/Settings/AsteriskStringComparer.cs | 36 +
.../Settings/AsteriskStringComparer.cs.meta | 11 +
.../HTTP/Hosts/Settings/HostSettings.cs | 343 +
.../HTTP/Hosts/Settings/HostSettings.cs.meta | 11 +
.../Hosts/Settings/HostSettingsManager.cs | 194 +
.../Settings/HostSettingsManager.cs.meta | 11 +
.../Runtime/HTTP/Hosts/Settings/Node.cs | 67 +
.../Runtime/HTTP/Hosts/Settings/Node.cs.meta | 11 +
.../Runtime/HTTP/Proxies.meta | 8 +
.../Runtime/HTTP/Proxies/Autodetect.meta | 8 +
.../Autodetect/AndroidProxyDetector.cs | 67 +
.../Autodetect/AndroidProxyDetector.cs.meta | 11 +
.../Autodetect/EnvironmentProxyDetector.cs | 81 +
.../EnvironmentProxyDetector.cs.meta | 11 +
.../Autodetect/FrameworkProxyDetector.cs | 69 +
.../Autodetect/FrameworkProxyDetector.cs.meta | 11 +
.../ProgrammaticallyAddedProxyDetector.cs | 16 +
...ProgrammaticallyAddedProxyDetector.cs.meta | 11 +
.../HTTP/Proxies/Autodetect/ProxyDetector.cs | 184 +
.../Proxies/Autodetect/ProxyDetector.cs.meta | 11 +
.../Runtime/HTTP/Proxies/HTTPProxy.cs | 283 +
.../Runtime/HTTP/Proxies/HTTPProxy.cs.meta | 11 +
.../Runtime/HTTP/Proxies/HTTPProxyResponse.cs | 452 ++
.../HTTP/Proxies/HTTPProxyResponse.cs.meta | 11 +
.../Runtime/HTTP/Proxies/Implementations.meta | 8 +
.../Implementations/SOCKSV5Negotiator.cs | 471 ++
.../Implementations/SOCKSV5Negotiator.cs.meta | 11 +
.../Runtime/HTTP/Proxies/Proxy.cs | 184 +
.../Runtime/HTTP/Proxies/Proxy.cs.meta | 11 +
.../Runtime/HTTP/Proxies/SOCKSProxy.cs | 29 +
.../Runtime/HTTP/Proxies/SOCKSProxy.cs.meta | 11 +
.../Runtime/HTTP/Request.meta | 8 +
.../Runtime/HTTP/Request/Authentication.meta | 8 +
.../Request/Authentication/Credentials.cs | 63 +
.../Authentication/Credentials.cs.meta | 11 +
.../HTTP/Request/Authentication/Digest.cs | 280 +
.../Request/Authentication/Digest.cs.meta | 11 +
.../Request/Authentication/DigestStore.cs | 57 +
.../Authentication/DigestStore.cs.meta | 11 +
.../WWWAuthenticateHeaderParser.cs | 49 +
.../WWWAuthenticateHeaderParser.cs.meta | 11 +
.../Runtime/HTTP/Request/Authenticators.meta | 8 +
.../BearerTokenAuthenticator.cs | 49 +
.../BearerTokenAuthenticator.cs.meta | 11 +
.../Authenticators/CredentialAuthenticator.cs | 91 +
.../CredentialAuthenticator.cs.meta | 11 +
.../Request/Authenticators/IAuthenticator.cs | 36 +
.../Authenticators/IAuthenticator.cs.meta | 11 +
.../Runtime/HTTP/Request/Settings.meta | 8 +
.../HTTP/Request/Settings/DownloadSettings.cs | 132 +
.../Request/Settings/DownloadSettings.cs.meta | 11 +
.../HTTP/Request/Settings/ProxySettings.cs | 98 +
.../Request/Settings/ProxySettings.cs.meta | 11 +
.../HTTP/Request/Settings/RedirectSettings.cs | 77 +
.../Request/Settings/RedirectSettings.cs.meta | 11 +
.../HTTP/Request/Settings/RetrySettings.cs | 26 +
.../Request/Settings/RetrySettings.cs.meta | 11 +
.../HTTP/Request/Settings/TimeoutSettings.cs | 76 +
.../Request/Settings/TimeoutSettings.cs.meta | 11 +
.../HTTP/Request/Settings/UploadSettings.cs | 157 +
.../Request/Settings/UploadSettings.cs.meta | 11 +
.../Runtime/HTTP/Request/Timings.meta | 8 +
.../HTTP/Request/Timings/TimingCollector.cs | 220 +
.../Request/Timings/TimingCollector.cs.meta | 11 +
.../HTTP/Request/Timings/TimingEvent.cs | 73 +
.../HTTP/Request/Timings/TimingEvent.cs.meta | 11 +
.../HTTP/Request/Timings/TimingEventInfo.cs | 39 +
.../Request/Timings/TimingEventInfo.cs.meta | 11 +
.../HTTP/Request/Timings/TimingEventNames.cs | 23 +
.../Request/Timings/TimingEventNames.cs.meta | 11 +
.../Runtime/HTTP/Request/Upload.meta | 8 +
.../HTTP/Request/Upload/BodyLengths.cs | 23 +
.../HTTP/Request/Upload/BodyLengths.cs.meta | 11 +
.../Request/Upload/DynamicUploadStream.cs | 178 +
.../Upload/DynamicUploadStream.cs.meta | 11 +
.../Runtime/HTTP/Request/Upload/Forms.meta | 8 +
.../Upload/Forms/MultipartFormDataStream.cs | 271 +
.../Forms/MultipartFormDataStream.cs.meta | 11 +
.../Request/Upload/Forms/UrlEncodedStream.cs | 158 +
.../Upload/Forms/UrlEncodedStream.cs.meta | 11 +
.../HTTP/Request/Upload/JSonDataStream.cs | 101 +
.../Request/Upload/JSonDataStream.cs.meta | 11 +
.../HTTP/Request/Upload/UploadStreamBase.cs | 84 +
.../Request/Upload/UploadStreamBase.cs.meta | 11 +
.../Runtime/HTTP/Response.meta | 8 +
.../Response/BlockingDownloadContentStream.cs | 226 +
.../BlockingDownloadContentStream.cs.meta | 11 +
.../Runtime/HTTP/Response/Decompression.meta | 8 +
.../Decompression/BrotliDecompressor.cs | 98 +
.../Decompression/BrotliDecompressor.cs.meta | 11 +
.../Decompression/DecompressorFactory.cs | 72 +
.../Decompression/DecompressorFactory.cs.meta | 11 +
.../Decompression/DeflateDecompressor.cs | 109 +
.../Decompression/DeflateDecompressor.cs.meta | 11 +
.../Decompression/GZipDecompressor.cs | 104 +
.../Decompression/GZipDecompressor.cs.meta | 11 +
.../Response/Decompression/IDecompressor.cs | 12 +
.../Decompression/IDecompressor.cs.meta | 11 +
.../HTTP/Response/DownloadContentStream.cs | 292 +
.../Response/DownloadContentStream.cs.meta | 11 +
.../Runtime/HTTP/Response/HTTPResponse.cs | 528 ++
.../HTTP/Response/HTTPResponse.cs.meta | 11 +
.../Runtime/HTTP/Response/HTTPStatusCodes.cs | 75 +
.../HTTP/Response/HTTPStatusCodes.cs.meta | 11 +
.../Runtime/Plugins.meta | 8 +
.../Runtime/Plugins/Android.meta | 8 +
.../Runtime/Plugins/Android/ProxyFinder.java | 35 +
.../Plugins/Android/ProxyFinder.java.meta | 32 +
.../Runtime/Plugins/WebGL.meta | 8 +
.../Plugins/WebGL/BestHTTP_WebRequest.jslib | 315 +
.../WebGL/BestHTTP_WebRequest.jslib.meta | 32 +
.../Runtime/Profiler.meta | 8 +
.../Runtime/Profiler/Memory.meta | 8 +
.../Runtime/Profiler/Memory/MemoryStats.cs | 25 +
.../Profiler/Memory/MemoryStats.cs.meta | 11 +
.../Runtime/Profiler/Network.meta | 8 +
.../Runtime/Profiler/Network/NetworkStats.cs | 51 +
.../Profiler/Network/NetworkStats.cs.meta | 11 +
.../Profiler/Network/NetworkStatsCollector.cs | 53 +
.../Network/NetworkStatsCollector.cs.meta | 11 +
.../com.tivadar.best.http/Runtime/Shared.meta | 8 +
.../Runtime/Shared/Database.meta | 8 +
.../Runtime/Shared/Database/Database.cs | 260 +
.../Runtime/Shared/Database/Database.cs.meta | 11 +
.../Shared/Database/DatabaseOptions.cs | 15 +
.../Shared/Database/DatabaseOptions.cs.meta | 11 +
.../Runtime/Shared/Database/DiskManager.cs | 295 +
.../Shared/Database/DiskManager.cs.meta | 11 +
.../Shared/Database/FreeListManager.cs | 181 +
.../Shared/Database/FreeListManager.cs.meta | 11 +
.../Runtime/Shared/Database/Indexing.meta | 8 +
.../Shared/Database/Indexing/AVLTree.cs | 941 +++
.../Shared/Database/Indexing/AVLTree.cs.meta | 11 +
.../Shared/Database/Indexing/Comparers.meta | 8 +
.../Indexing/Comparers/ByteArrayComparer.cs | 24 +
.../Comparers/ByteArrayComparer.cs.meta | 11 +
.../Indexing/Comparers/DateTimeComparer.cs | 13 +
.../Comparers/DateTimeComparer.cs.meta | 11 +
.../Indexing/Comparers/Hash128Comparer.cs | 13 +
.../Comparers/Hash128Comparer.cs.meta | 11 +
.../Indexing/Comparers/StringComparer.cs | 12 +
.../Indexing/Comparers/StringComparer.cs.meta | 11 +
.../Indexing/Comparers/UInt16Comparer.cs | 13 +
.../Indexing/Comparers/UInt16Comparer.cs.meta | 11 +
.../Indexing/Comparers/UInt32Comparer.cs | 13 +
.../Indexing/Comparers/UInt32Comparer.cs.meta | 11 +
.../Shared/Database/IndexingService.cs | 28 +
.../Shared/Database/IndexingService.cs.meta | 11 +
.../Runtime/Shared/Database/Metadata.cs | 42 +
.../Runtime/Shared/Database/Metadata.cs.meta | 11 +
.../Shared/Database/MetadataIndexFinders.meta | 8 +
.../DefaultEmptyMetadataIndexFinder.cs | 13 +
.../DefaultEmptyMetadataIndexFinder.cs.meta | 11 +
.../FindDeletedMetadataIndexFinder.cs | 17 +
.../FindDeletedMetadataIndexFinder.cs.meta | 11 +
.../IEmptyMetadataIndexFinder.cs | 10 +
.../IEmptyMetadataIndexFinder.cs.meta | 11 +
.../Shared/Database/MetadataService.cs | 152 +
.../Shared/Database/MetadataService.cs.meta | 11 +
.../Runtime/Shared/Database/Utils.meta | 8 +
.../Shared/Database/Utils/StreamUtil.cs | 133 +
.../Shared/Database/Utils/StreamUtil.cs.meta | 11 +
.../Runtime/Shared/Extensions.meta | 8 +
.../Shared/Extensions/CircularBuffer.cs | 76 +
.../Shared/Extensions/CircularBuffer.cs.meta | 11 +
.../Runtime/Shared/Extensions/Extensions.cs | 593 ++
.../Shared/Extensions/Extensions.cs.meta | 11 +
.../Runtime/Shared/Extensions/Future.cs | 399 ++
.../Runtime/Shared/Extensions/Future.cs.meta | 11 +
.../Runtime/Shared/Extensions/HeaderParser.cs | 40 +
.../Shared/Extensions/HeaderParser.cs.meta | 11 +
.../Runtime/Shared/Extensions/HeaderValue.cs | 133 +
.../Shared/Extensions/HeaderValue.cs.meta | 11 +
.../Shared/Extensions/HeartbeatManager.cs | 124 +
.../Extensions/HeartbeatManager.cs.meta | 11 +
.../Shared/Extensions/KeyValuePairList.cs | 27 +
.../Extensions/KeyValuePairList.cs.meta | 11 +
.../Runtime/Shared/Extensions/Timer.cs | 116 +
.../Runtime/Shared/Extensions/Timer.cs.meta | 11 +
.../Runtime/Shared/HTTPManager.cs | 394 ++
.../Runtime/Shared/HTTPManager.cs.meta | 11 +
.../Runtime/Shared/HTTPUpdateDelegator.cs | 367 ++
.../Shared/HTTPUpdateDelegator.cs.meta | 11 +
.../Runtime/Shared/Logger.meta | 8 +
.../Runtime/Shared/Logger/FileOutput.cs | 77 +
.../Runtime/Shared/Logger/FileOutput.cs.meta | 11 +
.../Runtime/Shared/Logger/ILogger.cs | 172 +
.../Runtime/Shared/Logger/ILogger.cs.meta | 11 +
.../Runtime/Shared/Logger/LoggingContext.cs | 205 +
.../Shared/Logger/LoggingContext.cs.meta | 11 +
.../Runtime/Shared/Logger/ThreadedLogger.cs | 409 ++
.../Shared/Logger/ThreadedLogger.cs.meta | 11 +
.../Runtime/Shared/Logger/UnityOutput.cs | 50 +
.../Runtime/Shared/Logger/UnityOutput.cs.meta | 11 +
.../Runtime/Shared/PlatformSupport.meta | 8 +
.../Shared/PlatformSupport/Collections.meta | 8 +
.../Collections/ObjectModel.meta | 8 +
.../ObjectModel/ObservableDictionary.cs | 259 +
.../ObjectModel/ObservableDictionary.cs.meta | 11 +
.../Collections/Specialized.meta | 8 +
.../NotifyCollectionChangedEventArgs.cs | 464 ++
.../NotifyCollectionChangedEventArgs.cs.meta | 11 +
.../Shared/PlatformSupport/FileSystem.meta | 8 +
.../FileSystem/DefaultIOService.cs | 87 +
.../FileSystem/DefaultIOService.cs.meta | 11 +
.../PlatformSupport/FileSystem/IIOService.cs | 74 +
.../FileSystem/IIOService.cs.meta | 11 +
.../Shared/PlatformSupport/IL2CPP.meta | 8 +
...ppEagerStaticClassConstructionAttribute.cs | 9 +
...erStaticClassConstructionAttribute.cs.meta | 11 +
.../IL2CPP/Il2CppSetOptionAttribute.cs | 75 +
.../IL2CPP/Il2CppSetOptionAttribute.cs.meta | 11 +
.../IL2CPP/PreserveAttribute.cs | 21 +
.../IL2CPP/PreserveAttribute.cs.meta | 11 +
.../Shared/PlatformSupport/Memory.meta | 8 +
.../Memory/AutoReleaseBuffer.cs | 103 +
.../Memory/AutoReleaseBuffer.cs.meta | 11 +
.../Shared/PlatformSupport/Memory/Bucket.cs | 80 +
.../PlatformSupport/Memory/Bucket.cs.meta | 11 +
.../PlatformSupport/Memory/BufferPool.cs | 542 ++
.../PlatformSupport/Memory/BufferPool.cs.meta | 11 +
.../PlatformSupport/Memory/BufferPoolStats.cs | 31 +
.../Memory/BufferPoolStats.cs.meta | 11 +
.../PlatformSupport/Memory/BufferSegment.cs | 130 +
.../Memory/BufferSegment.cs.meta | 11 +
.../PlatformSupport/Memory/BufferStore.cs | 3 +
.../Memory/BufferStore.cs.meta | 11 +
.../Shared/PlatformSupport/Memory/Tracker.cs | 37 +
.../PlatformSupport/Memory/Tracker.cs.meta | 11 +
.../Shared/PlatformSupport/Network.meta | 8 +
.../Shared/PlatformSupport/Network/DNS.meta | 8 +
.../PlatformSupport/Network/DNS/Cache.meta | 8 +
.../Network/DNS/Cache/DNSCache.cs | 519 ++
.../Network/DNS/Cache/DNSCache.cs.meta | 11 +
.../Network/DNS/Cache/DNSCacheEntry.cs | 192 +
.../Network/DNS/Cache/DNSCacheEntry.cs.meta | 11 +
.../Shared/PlatformSupport/Network/Tcp.meta | 8 +
.../PlatformSupport/Network/Tcp/Interfaces.cs | 114 +
.../Network/Tcp/Interfaces.cs.meta | 11 +
.../PlatformSupport/Network/Tcp/Negotiator.cs | 542 ++
.../Network/Tcp/Negotiator.cs.meta | 11 +
.../PlatformSupport/Network/Tcp/Streams.meta | 8 +
.../Tcp/Streams/FrameworkTLSByteForwarder.cs | 182 +
.../Streams/FrameworkTLSByteForwarder.cs.meta | 11 +
.../Network/Tcp/Streams/FrameworkTLSStream.cs | 297 +
.../Tcp/Streams/FrameworkTLSStream.cs.meta | 11 +
.../Tcp/Streams/NonblockingBCTLSStream.cs | 300 +
.../Streams/NonblockingBCTLSStream.cs.meta | 11 +
.../Tcp/Streams/NonblockingTCPStream.cs | 153 +
.../Tcp/Streams/NonblockingTCPStream.cs.meta | 11 +
.../Streams/NonblockingUnderlyingStream.cs | 163 +
.../NonblockingUnderlyingStream.cs.meta | 11 +
.../Network/Tcp/TCPRingmaster.cs | 451 ++
.../Network/Tcp/TCPRingmaster.cs.meta | 11 +
.../Network/Tcp/TCPStreamer.cs | 637 ++
.../Network/Tcp/TCPStreamer.cs.meta | 11 +
.../Runtime/Shared/PlatformSupport/Text.meta | 8 +
.../PlatformSupport/Text/StringBuilderPool.cs | 147 +
.../Text/StringBuilderPool.cs.meta | 11 +
.../Shared/PlatformSupport/Threading.meta | 8 +
.../Threading/CustomThreadPool.cs | 85 +
.../Threading/CustomThreadPool.cs.meta | 3 +
.../PlatformSupport/Threading/LockHelpers.cs | 46 +
.../Threading/LockHelpers.cs.meta | 11 +
.../Threading/ThreadedRunner.cs | 165 +
.../Threading/ThreadedRunner.cs.meta | 11 +
.../Runtime/Shared/Streams.meta | 8 +
.../Shared/Streams/BufferPoolMemoryStream.cs | 488 ++
.../Streams/BufferPoolMemoryStream.cs.meta | 11 +
.../Shared/Streams/BufferSegmentStream.cs | 95 +
.../Streams/BufferSegmentStream.cs.meta | 11 +
.../Streams/PeekableContentProviderStream.cs | 50 +
.../PeekableContentProviderStream.cs.meta | 11 +
.../Streams/PeekableIncomingSegmentStream.cs | 32 +
.../PeekableIncomingSegmentStream.cs.meta | 11 +
.../Runtime/Shared/Streams/PeekableStream.cs | 9 +
.../Shared/Streams/PeekableStream.cs.meta | 11 +
.../Shared/Streams/ReadOnlyBufferedStream.cs | 144 +
.../Streams/ReadOnlyBufferedStream.cs.meta | 11 +
.../Runtime/Shared/Streams/StreamList.cs | 165 +
.../Runtime/Shared/Streams/StreamList.cs.meta | 11 +
.../Shared/Streams/WriteOnlyBufferedStream.cs | 110 +
.../Streams/WriteOnlyBufferedStream.cs.meta | 11 +
.../Runtime/Shared/TLS.meta | 8 +
.../Runtime/Shared/TLS/AbstractTls13Client.cs | 170 +
.../Shared/TLS/AbstractTls13Client.cs.meta | 11 +
.../Runtime/Shared/TLS/Crypto.meta | 8 +
.../Shared/TLS/Crypto/FastTlsCrypto.cs | 153 +
.../Shared/TLS/Crypto/FastTlsCrypto.cs.meta | 11 +
.../Runtime/Shared/TLS/Crypto/Impl.meta | 8 +
.../Crypto/Impl/BurstTables8kGcmMultiplier.cs | 150 +
.../Impl/BurstTables8kGcmMultiplier.cs.meta | 11 +
.../Shared/TLS/Crypto/Impl/FastAesEngine.cs | 938 +++
.../TLS/Crypto/Impl/FastAesEngine.cs.meta | 11 +
.../TLS/Crypto/Impl/FastAesEngineHelper.cs | 195 +
.../Crypto/Impl/FastAesEngineHelper.cs.meta | 11 +
.../TLS/Crypto/Impl/FastBcChaCha20Poly1305.cs | 189 +
.../Impl/FastBcChaCha20Poly1305.cs.meta | 11 +
.../TLS/Crypto/Impl/FastCbcBlockCipher.cs | 229 +
.../Crypto/Impl/FastCbcBlockCipher.cs.meta | 11 +
.../TLS/Crypto/Impl/FastCcmBlockCipher.cs | 661 ++
.../Crypto/Impl/FastCcmBlockCipher.cs.meta | 11 +
.../TLS/Crypto/Impl/FastChaCha7539Engine.cs | 531 ++
.../Crypto/Impl/FastChaCha7539Engine.cs.meta | 11 +
.../Crypto/Impl/FastChaCha7539EngineHelper.cs | 514 ++
.../Impl/FastChaCha7539EngineHelper.cs.meta | 11 +
.../TLS/Crypto/Impl/FastChaChaEngine.cs | 249 +
.../TLS/Crypto/Impl/FastChaChaEngine.cs.meta | 11 +
.../TLS/Crypto/Impl/FastChaChaEngineHelper.cs | 166 +
.../Impl/FastChaChaEngineHelper.cs.meta | 11 +
.../TLS/Crypto/Impl/FastGcmBlockCipher.cs | 1577 +++++
.../Crypto/Impl/FastGcmBlockCipher.cs.meta | 11 +
.../Crypto/Impl/FastGcmBlockCipherHelper.cs | 81 +
.../Impl/FastGcmBlockCipherHelper.cs.meta | 11 +
.../Shared/TLS/Crypto/Impl/FastPoly1305.cs | 438 ++
.../TLS/Crypto/Impl/FastPoly1305.cs.meta | 11 +
.../TLS/Crypto/Impl/FastSalsa20Engine.cs | 560 ++
.../TLS/Crypto/Impl/FastSalsa20Engine.cs.meta | 11 +
.../Crypto/Impl/FastSalsa20EngineHelper.cs | 68 +
.../Impl/FastSalsa20EngineHelper.cs.meta | 11 +
.../TLS/Crypto/Impl/FastSicBlockCipher.cs | 141 +
.../Crypto/Impl/FastSicBlockCipher.cs.meta | 11 +
.../TLS/Crypto/Impl/FastTlsAeadCipher.cs | 499 ++
.../TLS/Crypto/Impl/FastTlsAeadCipher.cs.meta | 11 +
.../TLS/Crypto/Impl/FastTlsAeadCipherImpl.cs | 205 +
.../Crypto/Impl/FastTlsAeadCipherImpl.cs.meta | 11 +
.../TLS/Crypto/Impl/FastTlsBlockCipher.cs | 535 ++
.../Crypto/Impl/FastTlsBlockCipher.cs.meta | 11 +
.../TLS/Crypto/Impl/FastTlsBlockCipherImpl.cs | 68 +
.../Impl/FastTlsBlockCipherImpl.cs.meta | 11 +
.../Runtime/Shared/TLS/DefaultTls13Client.cs | 20 +
.../Shared/TLS/DefaultTls13Client.cs.meta | 11 +
.../Runtime/Shared/TLS/KeyLogFileWriter.cs | 75 +
.../Shared/TLS/KeyLogFileWriter.cs.meta | 11 +
.../Runtime/com.Tivadar.Best.HTTP.asmdef | 34 +
.../Runtime/com.Tivadar.Best.HTTP.asmdef.meta | 7 +
.../com.tivadar.best.http/Runtime/csc.rsp | 5 +
.../Runtime/csc.rsp.meta | 7 +
.../Samples~/With UI.meta | 8 +
.../Samples~/With UI/DownStreamSample.cs | 136 +
.../Samples~/With UI/DownStreamSample.cs.meta | 11 +
.../Samples~/With UI/DownStreamSample.prefab | 808 +++
.../With UI/DownStreamSample.prefab.meta | 7 +
.../With UI/DownStreamWithThreadSample.cs | 182 +
.../DownStreamWithThreadSample.cs.meta | 11 +
.../With UI/DownStreamWithThreadSample.prefab | 809 +++
.../DownStreamWithThreadSample.prefab.meta | 7 +
.../Samples~/With UI/HTTP Samples.unity | 1523 +++++
.../Samples~/With UI/HTTP Samples.unity.meta | 7 +
.../Samples~/With UI/PerHostManagerSample.cs | 116 +
.../With UI/PerHostManagerSample.cs.meta | 11 +
.../With UI/PerHostManagerSample.prefab | 836 +++
.../With UI/PerHostManagerSample.prefab.meta | 7 +
.../With UI/PopulateCacheManuallySample.cs | 184 +
.../PopulateCacheManuallySample.cs.meta | 11 +
.../PopulateCacheManuallySample.prefab | 834 +++
.../PopulateCacheManuallySample.prefab.meta | 7 +
.../Samples~/With UI/SmallSamples.cs | 582 ++
.../Samples~/With UI/SmallSamples.cs.meta | 11 +
.../Samples~/With UI/SmallSamples.prefab | 808 +++
.../Samples~/With UI/SmallSamples.prefab.meta | 7 +
.../With UI/StraightFromCacheSample.cs | 149 +
.../With UI/StraightFromCacheSample.cs.meta | 11 +
.../With UI/StraightFromCacheSample.prefab | 835 +++
.../StraightFromCacheSample.prefab.meta | 7 +
.../Samples~/With UI/UI Helpers.meta | 7 +
.../Samples~/With UI/UI Helpers/GUIHelper.cs | 60 +
.../With UI/UI Helpers/GUIHelper.cs.meta | 10 +
.../With UI/UI Helpers/MultiTextListItem.cs | 25 +
.../UI Helpers/MultiTextListItem.cs.meta | 11 +
.../UI Helpers/MultiTextListItem.prefab | 360 +
.../UI Helpers/MultiTextListItem.prefab.meta | 7 +
.../Samples~/With UI/UI Helpers/SampleBase.cs | 31 +
.../With UI/UI Helpers/SampleBase.cs.meta | 11 +
.../With UI/UI Helpers/SelectorUI.meta | 8 +
.../With UI/UI Helpers/SelectorUI/Category.cs | 22 +
.../UI Helpers/SelectorUI/Category.cs.meta | 11 +
.../UI Helpers/SelectorUI/Category.prefab | 171 +
.../SelectorUI/Category.prefab.meta | 10 +
.../UI Helpers/SelectorUI/ExampleInfo.cs | 37 +
.../UI Helpers/SelectorUI/ExampleInfo.cs.meta | 11 +
.../UI Helpers/SelectorUI/ExampleInfo.prefab | 507 ++
.../SelectorUI/ExampleInfo.prefab.meta | 10 +
.../UI Helpers/SelectorUI/ExampleListItem.cs | 32 +
.../SelectorUI/ExampleListItem.cs.meta | 11 +
.../SelectorUI/ExampleListItem.prefab | 222 +
.../SelectorUI/ExampleListItem.prefab.meta | 10 +
.../UI Helpers/SelectorUI/SampleSelectorUI.cs | 106 +
.../SelectorUI/SampleSelectorUI.cs.meta | 11 +
.../With UI/UI Helpers/TextListItem.cs | 25 +
.../With UI/UI Helpers/TextListItem.cs.meta | 11 +
.../With UI/UI Helpers/TextListItem.prefab | 206 +
.../UI Helpers/TextListItem.prefab.meta | 10 +
.../UI Helpers/TextWithImageListItem.cs | 27 +
.../UI Helpers/TextWithImageListItem.cs.meta | 11 +
.../UI Helpers/TextWithImageListItem.prefab | 455 ++
.../TextWithImageListItem.prefab.meta | 7 +
.../Samples~/With UI/UploadOnDemandSample.cs | 121 +
.../With UI/UploadOnDemandSample.cs.meta | 11 +
.../With UI/UploadOnDemandSample.prefab | 834 +++
.../With UI/UploadOnDemandSample.prefab.meta | 7 +
...om.Tivadar.Best.HTTP.Samples.WithUI.asmdef | 17 +
...vadar.Best.HTTP.Samples.WithUI.asmdef.meta | 7 +
.../Samples~/With UI/csc.rsp | 5 +
.../Samples~/With UI/csc.rsp.meta | 7 +
.../Third Party Notices.md | 88 +
.../Third Party Notices.md.meta | 7 +
Packages/com.tivadar.best.http/package.json | 27 +
.../com.tivadar.best.http/package.json.meta | 7 +
Packages/manifest.json | 10 +-
Packages/packages-lock.json | 24 +-
UserSettings/EditorUserSettings.asset | 2 +-
UserSettings/Layouts/default-6000.dwlt | 4 +-
...chni Official_WwiseProject.wxtal.wsettings | 13 +-
4164 files changed, 386922 insertions(+), 79 deletions(-)
delete mode 100644 Assets/Scripts/Online/Resources.meta
create mode 100644 Packages/com.tivadar.best.http/CHANGELOG.md
create mode 100644 Packages/com.tivadar.best.http/CHANGELOG.md.meta
create mode 100644 Packages/com.tivadar.best.http/Editor.meta
create mode 100644 Packages/com.tivadar.best.http/Editor/Profiler.meta
create mode 100644 Packages/com.tivadar.best.http/Editor/Profiler/Memory.meta
create mode 100644 Packages/com.tivadar.best.http/Editor/Profiler/Memory/MemoryStatsProfilerModule.cs
create mode 100644 Packages/com.tivadar.best.http/Editor/Profiler/Memory/MemoryStatsProfilerModule.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Editor/Profiler/Network.meta
create mode 100644 Packages/com.tivadar.best.http/Editor/Profiler/Network/NetworkStatsProfilerModule.cs
create mode 100644 Packages/com.tivadar.best.http/Editor/Profiler/Network/NetworkStatsProfilerModule.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Editor/Profiler/com.Tivadar.Best.HTTP.Profiler.Editor.asmdef
create mode 100644 Packages/com.tivadar.best.http/Editor/Profiler/com.Tivadar.Best.HTTP.Profiler.Editor.asmdef.meta
create mode 100644 Packages/com.tivadar.best.http/LICENSE.md
create mode 100644 Packages/com.tivadar.best.http/LICENSE.md.meta
create mode 100644 Packages/com.tivadar.best.http/README.md
create mode 100644 Packages/com.tivadar.best.http/README.md.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/License.txt
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/License.txt.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1Generator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1Generator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1OctetStringParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1OctetStringParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SequenceParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SequenceParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SetParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SetParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1StreamParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1StreamParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1TaggedObjectParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1TaggedObjectParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1BitStringParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1BitStringParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Encodable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Encodable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1EncodableVector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1EncodableVector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Exception.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Exception.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1GeneralizedTime.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1GeneralizedTime.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1InputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1InputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Null.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Null.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Object.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Object.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ObjectDescriptor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ObjectDescriptor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OctetString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OctetString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ParsingException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ParsingException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1RelativeOid.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1RelativeOid.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Sequence.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Sequence.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Set.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Set.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tag.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tag.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1TaggedObject.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1TaggedObject.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Type.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Type.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalTypes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalTypes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UtcTime.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UtcTime.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Utilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Utilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERBitString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERBitString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERTaggedObjectParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERTaggedObjectParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecific.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecific.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecificParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecificParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerBitStringParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerBitStringParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOctetString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOctetString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSequence.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSequence.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSet.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSet.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerTaggedObject.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerTaggedObject.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedBitStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedBitStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedDLEncoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedDLEncoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedILEncoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedILEncoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedLazyDLEncoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedLazyDLEncoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedOctetStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedOctetStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternal.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternal.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternalParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternalParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DEROctetStringParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DEROctetStringParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitStringParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitStringParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSequence.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSequence.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSet.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSet.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObject.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObject.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObjectParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObjectParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DefiniteLengthInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DefiniteLengthInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerApplicationSpecific.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerApplicationSpecific.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBMPString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBMPString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBitString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBitString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBoolean.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBoolean.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerEnumerated.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerEnumerated.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralizedTime.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralizedTime.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGraphicString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGraphicString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerIA5String.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerIA5String.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerInteger.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerInteger.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNull.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNull.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNumericString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNumericString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerObjectIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerObjectIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOctetString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOctetString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerPrintableString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerPrintableString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSequence.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSequence.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSet.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSet.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerStringBase.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerStringBase.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerT61String.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerT61String.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerTaggedObject.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerTaggedObject.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTCTime.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTCTime.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTF8String.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTF8String.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUniversalString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUniversalString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVideotexString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVideotexString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVisibleString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVisibleString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Choice.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Choice.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Convertible.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Convertible.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Encoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Encoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1String.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1String.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IndefiniteLengthInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IndefiniteLengthInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyASN1InputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyASN1InputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSequence.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSequence.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSet.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSet.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLEnumerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLEnumerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSequence.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSequence.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSet.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSet.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LimitedInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LimitedInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/OidTokenizer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/OidTokenizer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncodingSuffixed.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncodingSuffixed.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSINamedCurves.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSINamedCurves.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSIObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSIObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/BCObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/BCObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/LinkedCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/LinkedCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi/BsiObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi/BsiObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CAKeyUpdAnnContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CAKeyUpdAnnContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertAnnContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertAnnContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertConfirmContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertConfirmContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertOrEncCert.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertOrEncCert.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertRepMessage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertRepMessage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertReqTemplateContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertReqTemplateContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertResponse.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertResponse.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertifiedKeyPair.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertifiedKeyPair.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/Challenge.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/Challenge.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlAnnContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlAnnContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlSource.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlSource.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/DhbmParameter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/DhbmParameter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ErrorMsgContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ErrorMsgContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenRepContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenRepContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/InfoTypeAndValue.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/InfoTypeAndValue.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/KeyRecRepContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/KeyRecRepContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/NestedMessageContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/NestedMessageContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCert.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCert.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCertHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCertHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIBody.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIBody.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIConfirmContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIConfirmContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFailureInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFailureInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFreeText.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFreeText.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeader.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeader.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeaderBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeaderBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessages.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessages.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatusInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatusInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PbmParameter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PbmParameter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollRepContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollRepContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollReqContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollReqContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyChallContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyChallContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyRespContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyRespContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ProtectedPart.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ProtectedPart.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevAnnContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevAnnContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevDetails.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevDetails.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContentBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContentBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevReqContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevReqContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RootCaKeyUpdateContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RootCaKeyUpdateContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AttributeTable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AttributeTable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attributes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attributes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSAttributes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSAttributes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfoParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfoParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfoParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfoParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Evidence.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Evidence.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/IssuerAndSerialNumber.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/IssuerAndSerialNumber.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKRecipientInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKRecipientInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyTransRecipientInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyTransRecipientInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/MetaData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/MetaData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorIdentifierOrKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorIdentifierOrKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorPublicKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorPublicKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherKeyAttribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherKeyAttribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRecipientInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRecipientInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRevocationInfoFormat.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRevocationInfoFormat.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/PasswordRecipientInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/PasswordRecipientInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientEncryptedKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientEncryptedKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientKeyIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientKeyIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SCVPReqRes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SCVPReqRes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Time.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Time.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampAndCRL.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampAndCRL.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampTokenEvidence.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampTokenEvidence.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc/MQVuserKeyingMaterial.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc/MQVuserKeyingMaterial.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/AttributeTypeAndValue.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/AttributeTypeAndValue.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMessages.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMessages.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMsg.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMsg.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplateBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplateBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/Controls.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/Controls.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CrmfObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CrmfObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncKeyWithID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncKeyWithID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedValue.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedValue.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/OptionalValidity.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/OptionalValidity.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIArchiveOptions.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIArchiveOptions.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIPublicationInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIPublicationInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKMacValue.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKMacValue.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoPrivKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoPrivKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKeyInput.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKeyInput.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/ProofOfPossession.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/ProofOfPossession.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SinglePubInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SinglePubInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SubsequentMessage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SubsequentMessage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib/CryptlibObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib/CryptlibObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/CryptoProObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/CryptoProObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410NamedCurves.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410NamedCurves.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410ParamSetParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410ParamSetParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST28147Parameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST28147Parameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410NamedParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410NamedParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410ParamSetParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410ParamSetParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410PublicKeyAlgParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410PublicKeyAlgParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac/EACObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac/EACObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec/EdECObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec/EdECObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CertificateValues.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CertificateValues.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIndication.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIndication.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeQualifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeQualifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteCertificateRefs.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteCertificateRefs.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteRevocationRefs.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteRevocationRefs.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlListID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlListID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlOcspRef.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlOcspRef.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlValidatedID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlValidatedID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/ESFAttributes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/ESFAttributes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspListID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspListID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspResponsesID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspResponsesID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherCertID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherCertID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHashAlgAndValue.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHashAlgAndValue.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevRefs.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevRefs.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevVals.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevVals.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherSigningCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherSigningCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/RevocationValues.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/RevocationValues.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SigPolicyQualifierInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SigPolicyQualifierInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerAttribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerAttribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerLocation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerLocation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentHints.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentHints.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertIDv2.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertIDv2.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificateV2.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificateV2.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMNamedCurves.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMNamedCurves.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu/GNUObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu/GNUObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana/IANAObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana/IANAObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/CscaMasterList.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/CscaMasterList.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/DataGroupHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/DataGroupHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/ICAOObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/ICAOObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSSecurityObject.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSSecurityObject.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSVersionInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSVersionInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ISISMTTObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ISISMTTObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/CertHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/CertHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/RequestedCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/RequestedCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdditionalInformationSyntax.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdditionalInformationSyntax.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Admissions.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Admissions.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/DeclarationOfMajority.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/DeclarationOfMajority.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/MonetaryLimit.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/MonetaryLimit.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/NamingAuthority.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/NamingAuthority.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProcurationSyntax.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProcurationSyntax.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProfessionInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProfessionInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Restriction.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Restriction.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa/KISAObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa/KISAObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft/MicrosoftObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft/MicrosoftObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla/PublicKeyAndChallenge.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla/PublicKeyAndChallenge.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE128_params.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE128_params.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE256_params.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE256_params.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTNamedCurves.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTNamedCurves.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri/NsriObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri/NsriObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt/NTTObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt/NTTObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/BasicOCSPResponse.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/BasicOCSPResponse.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CrlID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CrlID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponse.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponse.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponseStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponseStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Request.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Request.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponderID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponderID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseBytes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseBytes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/RevokedInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/RevokedInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ServiceLocator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ServiceLocator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Signature.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Signature.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/SingleResponse.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/SingleResponse.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/TBSRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/TBSRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/ElGamalParameter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/ElGamalParameter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/OIWObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/OIWObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Attribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Attribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/AuthenticatedSafe.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/AuthenticatedSafe.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertBag.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertBag.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequestInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequestInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/ContentInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/ContentInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/DHParameter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/DHParameter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedPrivateKeyInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedPrivateKeyInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptionScheme.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptionScheme.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/IssuerAndSerialNumber.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/IssuerAndSerialNumber.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/KeyDerivationFunc.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/KeyDerivationFunc.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/MacData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/MacData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBEParameter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBEParameter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBES2Parameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBES2Parameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBKDF2Params.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBKDF2Params.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCS12PBEParams.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCS12PBEParams.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCSObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCSObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Pfx.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Pfx.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PrivateKeyInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PrivateKeyInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RC2CBCParameter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RC2CBCParameter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAESOAEPparams.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAESOAEPparams.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAPrivateKeyStructure.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAPrivateKeyStructure.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSASSAPSSparams.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSASSAPSSparams.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SafeBag.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SafeBag.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignerInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignerInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart/RosstandartObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart/RosstandartObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/ECPrivateKeyStructure.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/ECPrivateKeyStructure.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECNamedCurves.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECNamedCurves.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEAttributes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEAttributes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilitiesAttribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilitiesAttribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapability.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapability.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilityVector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilityVector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEEncryptionKeyPreferenceAttribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEEncryptionKeyPreferenceAttribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTNamedCurves.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTNamedCurves.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/Accuracy.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/Accuracy.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/MessageImprint.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/MessageImprint.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TSTInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TSTInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampReq.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampReq.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampResp.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampResp.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua/UAObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua/UAObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/Asn1Dump.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/Asn1Dump.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/FilterStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/FilterStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/AttributeTypeAndValue.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/AttributeTypeAndValue.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/DirectoryString.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/DirectoryString.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/Rdn.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/Rdn.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style/IetfUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style/IetfUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AccessDescription.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AccessDescription.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AlgorithmIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AlgorithmIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertIssuer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertIssuer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertValidityPeriod.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertValidityPeriod.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Attribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Attribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificateInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificateInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeTable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeTable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityInformationAccess.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityInformationAccess.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityKeyIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityKeyIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/BasicConstraints.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/BasicConstraints.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLDistPoint.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLDistPoint.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLNumber.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLNumber.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLReason.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLReason.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertPolicyId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertPolicyId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificateList.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificateList.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePair.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePair.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePolicies.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePolicies.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DSAParameter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DSAParameter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DigestInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DigestInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DisplayText.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DisplayText.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPoint.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPoint.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPointName.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPointName.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ExtendedKeyUsage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ExtendedKeyUsage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralName.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralName.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralNames.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralNames.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralSubtree.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralSubtree.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Holder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Holder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IetfAttrSyntax.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IetfAttrSyntax.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuerSerial.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuerSerial.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuingDistributionPoint.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuingDistributionPoint.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyPurposeId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyPurposeId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyUsage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyUsage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NameConstraints.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NameConstraints.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NoticeReference.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NoticeReference.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ObjectDigestInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ObjectDigestInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/OtherName.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/OtherName.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyMappings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyMappings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PrivateKeyUsagePeriod.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PrivateKeyUsagePeriod.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RSAPublicKeyStructure.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RSAPublicKeyStructure.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ReasonFlags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ReasonFlags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RoleSyntax.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RoleSyntax.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectDirectoryAttributes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectDirectoryAttributes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectKeyIdentifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectKeyIdentifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectPublicKeyInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectPublicKeyInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertList.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertList.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertificateStructure.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertificateStructure.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Target.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Target.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TargetInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TargetInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Targets.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Targets.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Time.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Time.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/UserNotice.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/UserNotice.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V1TBSCertificateGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V1TBSCertificateGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2AttributeCertificateInfoGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2AttributeCertificateInfoGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2Form.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2Form.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2TBSCertListGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2TBSCertListGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V3TBSCertificateGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V3TBSCertificateGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Attributes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Attributes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509CertificateStructure.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509CertificateStructure.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509DefaultEntryConverter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509DefaultEntryConverter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extension.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extension.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extensions.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extensions.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ExtensionsGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ExtensionsGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Name.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Name.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameEntryConverter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameEntryConverter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameTokenizer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameTokenizer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/BiometricData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/BiometricData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/Iso4217CurrencyCode.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/Iso4217CurrencyCode.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/MonetaryValue.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/MonetaryValue.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/QCStatement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/QCStatement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/SemanticsInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/SemanticsInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/TypeOfBiometricData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/TypeOfBiometricData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/NameOrPseudonym.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/NameOrPseudonym.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/PersonalData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/PersonalData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/SigIObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/SigIObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHDomainParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHDomainParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHPublicKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHPublicKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHValidationParms.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHValidationParms.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/ECNamedCurveTable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/ECNamedCurveTable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/KeySpecificInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/KeySpecificInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/OtherInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/OtherInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962NamedCurves.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962NamedCurves.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962Parameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962Parameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParametersHolder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParametersHolder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECPoint.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECPoint.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9IntegerConverter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9IntegerConverter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgObject.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgObject.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressedDataPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressedDataPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressionAlgorithmTags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressionAlgorithmTags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ContainedPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ContainedPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Crc24.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Crc24.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaPublicBcpgKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaPublicBcpgKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaSecretBcpgKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaSecretBcpgKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDHPublicBCPGKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDHPublicBCPGKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDsaPublicBCPGKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDsaPublicBCPGKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECPublicBCPGKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECPublicBCPGKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECSecretBCPGKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECSecretBCPGKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdDsaPublicBcpgKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdDsaPublicBcpgKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdSecretBcpgKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdSecretBcpgKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalPublicBcpgKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalPublicBcpgKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalSecretBcpgKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalSecretBcpgKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/HashAlgorithmTags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/HashAlgorithmTags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/IBcpgKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/IBcpgKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/InputStreamPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/InputStreamPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/LiteralDataPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/LiteralDataPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MPInteger.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MPInteger.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MarkerPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MarkerPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ModDetectionCodePacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ModDetectionCodePacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OnePassSignaturePacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OnePassSignaturePacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OutputStreamPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OutputStreamPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Packet.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Packet.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PacketTags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PacketTags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyAlgorithmTags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyAlgorithmTags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyEncSessionPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyEncSessionPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicSubkeyPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicSubkeyPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaPublicBcpgKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaPublicBcpgKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaSecretBcpgKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaSecretBcpgKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/S2k.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/S2k.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretKeyPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretKeyPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretSubkeyPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretSubkeyPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignaturePacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignaturePacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketTags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketTags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketsReader.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketsReader.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncDataPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncDataPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncIntegrityPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncIntegrityPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyAlgorithmTags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyAlgorithmTags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyEncSessionPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyEncSessionPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/TrustPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/TrustPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UnsupportedPacketVersionException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UnsupportedPacketVersionException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributePacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributePacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketTags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketTags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketsReader.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketsReader.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserIdPacket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserIdPacket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr/ImageAttrib.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr/ImageAttrib.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/EmbeddedSignature.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/EmbeddedSignature.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Exportable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Exportable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Features.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Features.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/IssuerKeyId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/IssuerKeyId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyExpirationTime.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyExpirationTime.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyFlags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyFlags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/NotationData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/NotationData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PreferredAlgorithms.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PreferredAlgorithms.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PrimaryUserId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PrimaryUserId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Revocable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Revocable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKeyTags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKeyTags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReason.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReason.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReasonTags.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReasonTags.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureCreationTime.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureCreationTime.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureExpirationTime.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureExpirationTime.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignerUserId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignerUserId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/TrustSignature.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/TrustSignature.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContentBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContentBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CmpException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CmpException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/GeneralPkiMessage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/GeneralPkiMessage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessageBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessageBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetails.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetails.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetailsBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetailsBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/BaseDigestCalculator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/BaseDigestCalculator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerationException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerationException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataStreamGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataStreamGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataStreamGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataStreamGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSContentInfoParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSContentInfoParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataStreamGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataStreamGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSPBEKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSPBEKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableByteArray.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableByteArray.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableFile.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableFile.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSReadable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSReadable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSecureReadable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSecureReadable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataStreamGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataStreamGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSStreamException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSStreamException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSTypedStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSTypedStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSUtils.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSUtils.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CounterSignatureDigestCalculator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CounterSignatureDigestCalculator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/DefaultAuthenticatedAttributeTableGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/DefaultAuthenticatedAttributeTableGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/DefaultSignedAttributeTableGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/DefaultSignedAttributeTableGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/EnvelopedDataHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/EnvelopedDataHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/IDigestCalculator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/IDigestCalculator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KEKRecipientInfoGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KEKRecipientInfoGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KEKRecipientInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KEKRecipientInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KeyAgreeRecipientInfoGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KeyAgreeRecipientInfoGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KeyAgreeRecipientInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KeyAgreeRecipientInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KeyTransRecipientInfoGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KeyTransRecipientInfoGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KeyTransRecipientInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/KeyTransRecipientInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/OriginatorId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/OriginatorId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/OriginatorInfoGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/OriginatorInfoGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/OriginatorInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/OriginatorInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/PKCS5Scheme2PBEKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/PKCS5Scheme2PBEKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/PKCS5Scheme2UTF8PBEKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/PKCS5Scheme2UTF8PBEKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/PasswordRecipientInfoGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/PasswordRecipientInfoGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/PasswordRecipientInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/PasswordRecipientInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/RecipientId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/RecipientId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/RecipientInfoGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/RecipientInfoGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/RecipientInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/RecipientInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/RecipientInformationStore.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/RecipientInformationStore.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SignerId.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SignerId.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SignerInfoGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SignerInfoGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SignerInformation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SignerInformation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SignerInformationStore.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SignerInformationStore.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SimpleAttributeTableGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/SimpleAttributeTableGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/AuthenticatorControl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/AuthenticatorControl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/CertificateRequestMessage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/CertificateRequestMessage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/CertificateRequestMessageBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/CertificateRequestMessageBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/CrmfException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/CrmfException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/DefaultPKMacPrimitivesProvider.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/DefaultPKMacPrimitivesProvider.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/EncryptedValueBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/EncryptedValueBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/IControl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/IControl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/IEncryptedValuePadder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/IEncryptedValuePadder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/IPKMacPrimitivesProvider.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/IPKMacPrimitivesProvider.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/PKMacBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/PKMacBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/PkiArchiveControl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/PkiArchiveControl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/PkiArchiveControlBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/PkiArchiveControlBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/ProofOfPossessionSigningKeyBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/ProofOfPossessionSigningKeyBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/RegTokenControl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crmf/RegTokenControl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/AesUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/AesUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/AsymmetricCipherKeyPair.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/AsymmetricCipherKeyPair.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/AsymmetricKeyParameter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/AsymmetricKeyParameter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedAeadBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedAeadBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedAeadCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedAeadCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedAsymmetricBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedAsymmetricBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedCipherBase.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedCipherBase.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedIesCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedIesCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedStreamCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/BufferedStreamCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/Check.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/Check.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/CipherKeyGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/CipherKeyGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/CryptoException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/CryptoException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/CryptoServicesRegistrar.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/CryptoServicesRegistrar.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/DataLengthException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/DataLengthException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IAlphabetMapper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IAlphabetMapper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IAsymmetricBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IAsymmetricBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IAsymmetricCipherKeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IAsymmetricCipherKeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IBasicAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IBasicAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IBlockResult.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IBlockResult.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IBufferedCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IBufferedCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ICipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ICipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ICipherBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ICipherBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ICipherBuilderWithKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ICipherBuilderWithKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ICipherParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ICipherParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDSA.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDSA.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDecryptorBuilderProvider.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDecryptorBuilderProvider.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDerivationFunction.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDerivationFunction.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDerivationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDerivationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDigestFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IDigestFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IEncapsulatedSecretExtractor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IEncapsulatedSecretExtractor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IEncapsulatedSecretGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IEncapsulatedSecretGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IEntropySource.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IEntropySource.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IEntropySourceProvider.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IEntropySourceProvider.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IKeyUnwrapper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IKeyUnwrapper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IKeyWrapper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IKeyWrapper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IMacDerivationFunction.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IMacDerivationFunction.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IMacFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IMacFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IRawAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IRawAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IRsa.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IRsa.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ISecretWithEncapsulation.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ISecretWithEncapsulation.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ISignatureFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ISignatureFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ISigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ISigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ISignerWithRecovery.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ISignerWithRecovery.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IStreamCalculator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IStreamCalculator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IStreamCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IStreamCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IVerifierFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IVerifierFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IVerifierFactoryProvider.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IVerifierFactoryProvider.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IWrapper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IWrapper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IXof.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/IXof.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/InvalidCipherTextException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/InvalidCipherTextException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/KeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/KeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/MaxBytesExceededException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/MaxBytesExceededException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/OutputLengthException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/OutputLengthException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/PbeParametersGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/PbeParametersGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/Security.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/Security.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/SimpleBlockResult.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/SimpleBlockResult.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/StreamBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/StreamBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/DHAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/DHAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/DHBasicAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/DHBasicAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/DHStandardGroups.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/DHStandardGroups.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECDHBasicAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECDHBasicAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECDHCBasicAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECDHCBasicAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECDHWithKdfBasicAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECDHWithKdfBasicAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECMqvBasicAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECMqvBasicAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECMqvWithKdfBasicAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/ECMqvWithKdfBasicAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/SM2KeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/SM2KeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/X25519Agreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/X25519Agreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/X448Agreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/X448Agreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeParticipant.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeParticipant.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakePrimeOrderGroup.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakePrimeOrderGroup.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakePrimeOrderGroups.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakePrimeOrderGroups.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeRound1Payload.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeRound1Payload.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeRound2Payload.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeRound2Payload.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeRound3Payload.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeRound3Payload.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/jpake/JPakeUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/kdf.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/kdf/ConcatenationKdfGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/kdf/ConcatenationKdfGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/kdf/DHKdfParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/kdf/DHKdfParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/kdf/DHKekGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/kdf/DHKekGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/kdf/ECDHKekGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/kdf/ECDHKekGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6Client.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6Client.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6Server.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6Server.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6StandardGroups.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6StandardGroups.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6Utilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6Utilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6VerifierGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/agreement/srp/SRP6VerifierGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Blake2bDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Blake2bDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Blake2sDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Blake2sDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Blake2xsDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Blake2xsDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Blake3Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Blake3Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/CSHAKEDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/CSHAKEDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/DSTU7564Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/DSTU7564Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GOST3411Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GOST3411Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GOST3411_2012Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GOST3411_2012Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GOST3411_2012_256Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GOST3411_2012_256Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GOST3411_2012_512Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GOST3411_2012_512Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GeneralDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/GeneralDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Haraka256Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Haraka256Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Haraka256_X86.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Haraka256_X86.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Haraka512Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Haraka512Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Haraka512_X86.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Haraka512_X86.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/HarakaBase.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/HarakaBase.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/KeccakDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/KeccakDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/LongDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/LongDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/MD2Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/MD2Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/MD4Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/MD4Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/MD5Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/MD5Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/NonMemoableDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/NonMemoableDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/NullDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/NullDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/ParallelHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/ParallelHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/RipeMD128Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/RipeMD128Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/RipeMD160Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/RipeMD160Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/RipeMD256Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/RipeMD256Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/RipeMD320Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/RipeMD320Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/SHA3Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/SHA3Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/SM3Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/SM3Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha1Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha1Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha224Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha224Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha256Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha256Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha384Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha384Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha512Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha512Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha512tDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/Sha512tDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/ShakeDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/ShakeDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/ShortenedDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/ShortenedDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/SkeinDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/SkeinDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/SkeinEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/SkeinEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/TigerDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/TigerDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/TupleHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/TupleHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/WhirlpoolDigest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/WhirlpoolDigest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/XofUtils.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/digests/XofUtils.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ec.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ec/CustomNamedCurves.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/ec/CustomNamedCurves.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/encodings.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/encodings/ISO9796d1Encoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/encodings/ISO9796d1Encoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/encodings/OaepEncoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/encodings/OaepEncoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/encodings/Pkcs1Encoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/encodings/Pkcs1Encoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesEngine_X86.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesEngine_X86.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesFastEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesFastEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesLightEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesLightEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesWrapEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AesWrapEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AriaEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/AriaEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/BlowfishEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/BlowfishEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/CamelliaEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/CamelliaEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/CamelliaLightEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/CamelliaLightEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/CamelliaWrapEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/CamelliaWrapEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Cast5Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Cast5Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Cast6Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Cast6Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ChaCha7539Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ChaCha7539Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ChaChaEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ChaChaEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/DesEdeEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/DesEdeEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/DesEdeWrapEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/DesEdeWrapEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/DesEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/DesEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Dstu7624Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Dstu7624Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Dstu7624WrapEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Dstu7624WrapEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ElGamalEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ElGamalEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/GOST28147Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/GOST28147Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Grain128AEADEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Grain128AEADEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/HC128Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/HC128Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/HC256Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/HC256Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ISAACEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ISAACEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/IdeaEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/IdeaEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/IesEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/IesEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/NaccacheSternEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/NaccacheSternEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/NoekeonEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/NoekeonEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/NullEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/NullEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC2Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC2Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC2WrapEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC2WrapEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC4Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC4Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC532Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC532Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC564Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC564Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC6Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RC6Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RFC3211WrapEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RFC3211WrapEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RFC3394WrapEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RFC3394WrapEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RSABlindedEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RSABlindedEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RSABlindingEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RSABlindingEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RSACoreEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RSACoreEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RijndaelEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RijndaelEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RsaEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/RsaEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SEEDEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SEEDEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SEEDWrapEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SEEDWrapEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SM2Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SM2Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SM4Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SM4Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Salsa20Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/Salsa20Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SerpentEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SerpentEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SerpentEngineBase.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SerpentEngineBase.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SkipjackEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/SkipjackEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/TEAEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/TEAEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ThreefishEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/ThreefishEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/TnepresEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/TnepresEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/TwofishEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/TwofishEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/VMPCEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/VMPCEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/VMPCKSA3Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/VMPCKSA3Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/XSalsa20Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/XSalsa20Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/XTEAEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/engines/XTEAEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/fpe.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/fpe/FpeEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/fpe/FpeEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/fpe/FpeFf1Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/fpe/FpeFf1Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/fpe/FpeFf3_1Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/fpe/FpeFf3_1Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/fpe/SP80038G.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/fpe/SP80038G.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/BCrypt.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/BCrypt.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/BaseKdfBytesGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/BaseKdfBytesGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHBasicKeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHBasicKeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHKeyGeneratorHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHKeyGeneratorHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHKeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHKeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHParametersGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHParametersGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHParametersHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DHParametersHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DesEdeKeyGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DesEdeKeyGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DesKeyGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DesKeyGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DsaKeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DsaKeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DsaParametersGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/DsaParametersGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/ECKeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/ECKeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Ed25519KeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Ed25519KeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Ed448KeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Ed448KeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/ElGamalKeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/ElGamalKeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/ElGamalParametersGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/ElGamalParametersGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/GOST3410KeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/GOST3410KeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/GOST3410ParametersGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/GOST3410ParametersGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/HKDFBytesGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/HKDFBytesGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/KDFCounterBytesGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/KDFCounterBytesGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/KDFDoublePipelineIterationBytesGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/KDFDoublePipelineIterationBytesGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/KDFFeedbackBytesGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/KDFFeedbackBytesGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Kdf1BytesGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Kdf1BytesGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Kdf2BytesGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Kdf2BytesGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Mgf1BytesGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Mgf1BytesGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/NaccacheSternKeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/NaccacheSternKeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/OpenBsdBCrypt.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/OpenBsdBCrypt.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/OpenSSLPBEParametersGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/OpenSSLPBEParametersGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Pkcs12ParametersGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Pkcs12ParametersGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Pkcs5S1ParametersGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Pkcs5S1ParametersGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Pkcs5S2ParametersGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Pkcs5S2ParametersGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Poly1305KeyGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/Poly1305KeyGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/RSABlindingFactorGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/RSABlindingFactorGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/RsaKeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/RsaKeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/SCrypt.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/SCrypt.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/X25519KeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/X25519KeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/X448KeyPairGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/generators/X448KeyPairGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/CipherStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/CipherStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/DigestSink.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/DigestSink.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/DigestStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/DigestStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/MacSink.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/MacSink.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/MacStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/MacStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/SignerSink.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/SignerSink.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/SignerStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/io/SignerStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/CMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/CMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/CbcBlockCipherMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/CbcBlockCipherMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/CfbBlockCipherMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/CfbBlockCipherMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/DSTU7564Mac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/DSTU7564Mac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/DSTU7624Mac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/DSTU7624Mac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/GMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/GMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/GOST28147Mac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/GOST28147Mac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/HMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/HMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/ISO9797Alg3Mac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/ISO9797Alg3Mac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/KMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/KMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/Poly1305.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/Poly1305.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/SipHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/SipHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/SkeinMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/SkeinMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/VMPCMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/macs/VMPCMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/CbcBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/CbcBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/CcmBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/CcmBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/CfbBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/CfbBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/ChaCha20Poly1305.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/ChaCha20Poly1305.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/CtsBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/CtsBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/EAXBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/EAXBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/EcbBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/EcbBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/GCMBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/GCMBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/GOFBBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/GOFBBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/GcmSivBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/GcmSivBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/IAeadBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/IAeadBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/IAeadCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/IAeadCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/IBlockCipherMode.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/IBlockCipherMode.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/KCcmBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/KCcmBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/KCtrBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/KCtrBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/OCBBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/OCBBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/OfbBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/OfbBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/OpenPgpCfbBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/OpenPgpCfbBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/SicBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/SicBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/BasicGcmExponentiator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/BasicGcmExponentiator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/BasicGcmMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/BasicGcmMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/GcmUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/GcmUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/IGcmExponentiator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/IGcmExponentiator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/IGcmMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/IGcmMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/Tables1kGcmExponentiator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/Tables1kGcmExponentiator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/Tables4kGcmMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/Tables4kGcmMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/Tables64kGcmMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/Tables64kGcmMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/Tables8kGcmMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/modes/gcm/Tables8kGcmMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/Asn1CipherBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/Asn1CipherBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/Asn1DigestFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/Asn1DigestFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/Asn1KeyWrapper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/Asn1KeyWrapper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/Asn1Signature.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/Asn1Signature.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/CmsContentEncryptorBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/CmsContentEncryptorBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/CmsKeyTransRecipientInfoGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/CmsKeyTransRecipientInfoGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/DefaultSignatureCalculator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/DefaultSignatureCalculator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/DefaultSignatureResult.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/DefaultSignatureResult.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/DefaultVerifierCalculator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/DefaultVerifierCalculator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/DefaultVerifierResult.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/DefaultVerifierResult.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/GenericKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/operators/GenericKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/BlockCipherPadding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/BlockCipherPadding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/IBlockCipherPadding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/IBlockCipherPadding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/ISO10126d2Padding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/ISO10126d2Padding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/ISO7816d4Padding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/ISO7816d4Padding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/PaddedBufferedBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/PaddedBufferedBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/Pkcs7Padding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/Pkcs7Padding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/TbcPadding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/TbcPadding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/X923Padding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/X923Padding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/ZeroBytePadding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/paddings/ZeroBytePadding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/AEADParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/AEADParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Blake3Parameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Blake3Parameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHKeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHKeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHPrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHPrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHPublicKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHPublicKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHValidationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DHValidationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DSAParameterGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DSAParameterGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DesEdeParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DesEdeParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DesParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DesParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaKeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaKeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaPrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaPrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaPublicKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaPublicKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaValidationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/DsaValidationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECDomainParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECDomainParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECGOST3410Parameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECGOST3410Parameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECKeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECKeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECNamedDomainParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECNamedDomainParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECPrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECPrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECPublicKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ECPublicKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed25519KeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed25519KeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed25519PrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed25519PrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed25519PublicKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed25519PublicKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed448KeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed448KeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed448PrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed448PrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed448PublicKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Ed448PublicKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalKeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalKeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalPrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalPrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalPublicKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ElGamalPublicKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/FpeParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/FpeParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410KeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410KeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410KeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410KeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410Parameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410Parameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410PrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410PrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410PublicKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410PublicKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410ValidationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/GOST3410ValidationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/HKDFParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/HKDFParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ISO18033KDFParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ISO18033KDFParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/IesParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/IesParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/IesWithCipherParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/IesWithCipherParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KDFCounterParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KDFCounterParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KDFDoublePipelineIterationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KDFDoublePipelineIterationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KDFFeedbackParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KDFFeedbackParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KdfParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KdfParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KeyParameter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/KeyParameter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/MgfParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/MgfParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/MqvPrivateParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/MqvPrivateParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/MqvPublicParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/MqvPublicParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/NaccacheSternKeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/NaccacheSternKeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/NaccacheSternKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/NaccacheSternKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/NaccacheSternPrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/NaccacheSternPrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithIV.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithIV.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithRandom.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithRandom.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithSBox.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithSBox.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithSalt.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/ParametersWithSalt.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RC2Parameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RC2Parameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RC5Parameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RC5Parameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RSABlindingParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RSABlindingParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RsaKeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RsaKeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RsaKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RsaKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RsaPrivateCrtKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/RsaPrivateCrtKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/SM2KeyExchangePrivateParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/SM2KeyExchangePrivateParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/SM2KeyExchangePublicParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/SM2KeyExchangePublicParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/SkeinParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/SkeinParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Srp6GroupParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/Srp6GroupParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/TweakableBlockCipherParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/TweakableBlockCipherParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X25519KeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X25519KeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X25519PrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X25519PrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X25519PublicKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X25519PublicKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X448KeyGenerationParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X448KeyGenerationParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X448PrivateKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X448PrivateKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X448PublicKeyParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/parameters/X448PublicKeyParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/BasicEntropySourceProvider.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/BasicEntropySourceProvider.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/CryptoApiEntropySourceProvider.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/CryptoApiEntropySourceProvider.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/CryptoApiRandomGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/CryptoApiRandomGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/DigestRandomGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/DigestRandomGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/EntropyUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/EntropyUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/IDrbgProvider.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/IDrbgProvider.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/IRandomGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/IRandomGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/ReversedWindowGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/ReversedWindowGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/SP800SecureRandom.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/SP800SecureRandom.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/SP800SecureRandomBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/SP800SecureRandomBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/VMPCRandomGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/VMPCRandomGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/X931Rng.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/X931Rng.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/X931SecureRandom.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/X931SecureRandom.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/X931SecureRandomBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/X931SecureRandomBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/CtrSP800Drbg.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/CtrSP800Drbg.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/DrbgUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/DrbgUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/HMacSP800Drbg.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/HMacSP800Drbg.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/HashSP800Drbg.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/HashSP800Drbg.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/ISP80090Drbg.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/prng/drbg/ISP80090Drbg.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/DsaDigestSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/DsaDigestSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/DsaSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/DsaSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/ECDsaSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/ECDsaSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/ECGOST3410Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/ECGOST3410Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/ECNRSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/ECNRSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed25519Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed25519Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed25519ctxSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed25519ctxSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed25519phSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed25519phSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed448Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed448Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed448phSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Ed448phSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/GOST3410DigestSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/GOST3410DigestSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/GOST3410Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/GOST3410Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/GenericSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/GenericSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/HMacDsaKCalculator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/HMacDsaKCalculator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/IDsaEncoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/IDsaEncoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/IDsaKCalculator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/IDsaKCalculator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Iso9796d2PssSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Iso9796d2PssSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Iso9796d2Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/Iso9796d2Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/IsoTrailers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/IsoTrailers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/PlainDsaEncoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/PlainDsaEncoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/PssSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/PssSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/RandomDsaKCalculator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/RandomDsaKCalculator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/RsaDigestSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/RsaDigestSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/SM2Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/SM2Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/StandardDsaEncoding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/StandardDsaEncoding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/X931Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/signers/X931Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/AlgorithmIdentifierFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/AlgorithmIdentifierFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/BasicAlphabetMapper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/BasicAlphabetMapper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/CipherFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/CipherFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/CipherKeyGeneratorFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/CipherKeyGeneratorFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/Pack.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/crypto/util/Pack.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/BigInteger.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/BigInteger.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/Primes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/Primes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/AbstractECLookupTable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/AbstractECLookupTable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECAlgorithms.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECAlgorithms.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECCurve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECCurve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECFieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECFieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECLookupTable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECLookupTable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECPoint.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECPoint.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECPointMap.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ECPointMap.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/LongArray.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/LongArray.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ScaleXNegateYPointMap.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ScaleXNegateYPointMap.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ScaleXPointMap.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ScaleXPointMap.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ScaleYNegateXPointMap.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ScaleYNegateXPointMap.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ScaleYPointMap.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/ScaleYPointMap.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/SimpleLookupTable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/SimpleLookupTable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/abc.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/abc/SimpleBigDecimal.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/abc/SimpleBigDecimal.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/abc/Tnaf.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/abc/Tnaf.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/abc/ZTauElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/abc/ZTauElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/djb.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/djb/Curve25519.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/djb/Curve25519.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/djb/Curve25519Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/djb/Curve25519Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/gm.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/gm/SM2P256V1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/gm/SM2P256V1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/gm/SM2P256V1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/gm/SM2P256V1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/gm/SM2P256V1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/gm/SM2P256V1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/gm/SM2P256V1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/gm/SM2P256V1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP128R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP128R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP128R1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP128R1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP128R1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP128R1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP128R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP128R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R2Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R2Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R2Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R2Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R2FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R2FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R2Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP160R2Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192K1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192K1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192K1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192K1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192R1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192R1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192R1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192R1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP192R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224K1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224K1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224K1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224K1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224R1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224R1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224R1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224R1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP224R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256K1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256K1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256K1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256K1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256R1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256R1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256R1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256R1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP256R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP384R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP384R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP384R1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP384R1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP384R1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP384R1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP384R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP384R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP521R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP521R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP521R1Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP521R1Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP521R1FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP521R1FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP521R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecP521R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113R2Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113R2Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113R2Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT113R2Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131R2Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131R2Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131R2Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT131R2Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163R2Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163R2Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163R2Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT163R2Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193R2Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193R2Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193R2Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT193R2Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT233R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT239Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT239Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT239FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT239FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT239K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT239K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT239K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT239K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT283R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT409R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571FieldElement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571FieldElement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571K1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571K1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571K1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571K1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571R1Curve.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571R1Curve.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571R1Point.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/custom/sec/SecT571R1Point.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/ECEndomorphism.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/ECEndomorphism.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/EndoPreCompInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/EndoPreCompInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/EndoUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/EndoUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvEndomorphism.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvEndomorphism.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvTypeAEndomorphism.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvTypeAEndomorphism.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvTypeAParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvTypeAParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvTypeBEndomorphism.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvTypeBEndomorphism.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvTypeBParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/GlvTypeBParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/ScalarSplitParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/endo/ScalarSplitParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/AbstractECMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/AbstractECMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/ECMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/ECMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/FixedPointCombMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/FixedPointCombMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/FixedPointPreCompInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/FixedPointPreCompInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/FixedPointUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/FixedPointUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/GlvMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/GlvMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/IPreCompCallback.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/IPreCompCallback.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/PreCompInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/PreCompInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/ValidityPreCompInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/ValidityPreCompInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WNafL2RMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WNafL2RMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WNafPreCompInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WNafPreCompInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WNafUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WNafUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WTauNafMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WTauNafMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WTauNafPreCompInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/multiplier/WTauNafPreCompInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc7748.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc7748/X25519.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc7748/X25519.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc7748/X25519Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc7748/X25519Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc7748/X448.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc7748/X448.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc7748/X448Field.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc7748/X448Field.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc8032.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc8032/Ed25519.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc8032/Ed25519.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc8032/Ed448.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/ec/rfc8032/Ed448.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/FiniteFields.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/FiniteFields.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/GF2Polynomial.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/GF2Polynomial.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/GenericPolynomialExtensionField.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/GenericPolynomialExtensionField.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/IExtensionField.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/IExtensionField.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/IFiniteField.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/IFiniteField.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/IPolynomial.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/IPolynomial.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/IPolynomialExtensionField.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/IPolynomialExtensionField.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/PrimeField.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/field/PrimeField.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Bits.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Bits.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Interleave.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Interleave.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Mod.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Mod.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat128.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat128.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat160.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat160.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat192.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat192.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat224.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat224.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat256.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat256.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat320.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat320.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat384.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat384.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat448.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat448.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat512.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat512.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat576.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/math/raw/Nat576.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/BasicOCSPResp.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/BasicOCSPResp.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/BasicOCSPRespGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/BasicOCSPRespGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/CertificateID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/CertificateID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/CertificateStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/CertificateStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPReq.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPReq.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPReqGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPReqGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPResp.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPResp.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPRespGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPRespGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPRespStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPRespStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPUtil.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/OCSPUtil.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/Req.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/Req.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/RespData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/RespData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/RespID.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/RespID.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/RevokedStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/RevokedStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/SingleResp.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/SingleResp.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/UnknownStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/ocsp/UnknownStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/EncryptionException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/EncryptionException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/IPasswordFinder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/IPasswordFinder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/MiscPemGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/MiscPemGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PEMException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PEMException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PEMReader.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PEMReader.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PEMUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PEMUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PEMWriter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PEMWriter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PasswordException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/PasswordException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/Pkcs8Generator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/openssl/Pkcs8Generator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/AsymmetricKeyEntry.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/AsymmetricKeyEntry.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/EncryptedPrivateKeyInfoFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/EncryptedPrivateKeyInfoFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/PKCS12StoreBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/PKCS12StoreBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs10CertificationRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs10CertificationRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs10CertificationRequestDelaySigned.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs10CertificationRequestDelaySigned.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs12Entry.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs12Entry.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs12Store.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs12Store.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs12Utilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs12Utilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs8EncryptedPrivateKeyInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs8EncryptedPrivateKeyInfoBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/Pkcs8EncryptedPrivateKeyInfoBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/PkcsException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/PkcsException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/PkcsIOException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/PkcsIOException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/PrivateKeyInfoFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/PrivateKeyInfoFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/X509CertificateEntry.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkcs/X509CertificateEntry.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/CertStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/CertStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixAttrCertChecker.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixAttrCertChecker.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixAttrCertPathBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixAttrCertPathBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixAttrCertPathValidator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixAttrCertPathValidator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixBuilderParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixBuilderParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPath.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPath.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathBuilder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathBuilder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathBuilderException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathBuilderException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathBuilderResult.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathBuilderResult.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathChecker.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathChecker.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidatorException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidatorException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidatorResult.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidatorResult.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidatorUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidatorUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCrlUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCrlUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixNameConstraintValidator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixNameConstraintValidator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixNameConstraintValidatorException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixNameConstraintValidatorException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixPolicyNode.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixPolicyNode.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/ReasonsMask.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/ReasonsMask.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/Rfc3280CertPathUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/Rfc3280CertPathUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/Rfc3281CertPathUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/Rfc3281CertPathUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/TrustAnchor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/TrustAnchor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/AgreementUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/AgreementUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/CipherUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/CipherUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/DigestUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/DigestUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/DotNetUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/DotNetUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/GeneralSecurityException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/GeneralSecurityException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/GeneratorUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/GeneratorUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/InvalidKeyException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/InvalidKeyException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/InvalidParameterException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/InvalidParameterException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/JksStore.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/JksStore.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/KeyException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/KeyException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/MacUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/MacUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/ParameterUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/ParameterUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/PbeUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/PbeUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/PrivateKeyFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/PrivateKeyFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/PublicKeyFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/PublicKeyFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/SecureRandom.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/SecureRandom.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/SecurityUtilityException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/SecurityUtilityException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/SignatureException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/SignatureException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/SignerUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/SignerUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/WrapperUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/WrapperUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateEncodingException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateEncodingException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateExpiredException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateExpiredException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateNotYetValidException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateNotYetValidException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateParsingException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CertificateParsingException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CrlException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/security/cert/CrlException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsClient.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsClient.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsContext.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsContext.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsKeyExchangeFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsKeyExchangeFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsPeer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsPeer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsServer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AbstractTlsServer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AlertDescription.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AlertDescription.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AlertLevel.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/AlertLevel.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/BasicTlsPskExternal.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/BasicTlsPskExternal.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/BasicTlsPskIdentity.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/BasicTlsPskIdentity.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/BasicTlsSrpIdentity.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/BasicTlsSrpIdentity.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ByteQueue.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ByteQueue.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ByteQueueInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ByteQueueInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ByteQueueOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ByteQueueOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CachedInformationType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CachedInformationType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertChainType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertChainType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/Certificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/Certificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateCompressionAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateCompressionAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateEntry.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateEntry.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateStatus.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateStatus.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateStatusRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateStatusRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateStatusRequestItemV2.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateStatusRequestItemV2.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateStatusType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateStatusType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateUrl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateUrl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateVerify.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CertificateVerify.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ChangeCipherSpec.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ChangeCipherSpec.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ChannelBinding.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ChannelBinding.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CipherSuite.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CipherSuite.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CipherType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CipherType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ClientAuthenticationType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ClientAuthenticationType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ClientCertificateType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ClientCertificateType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ClientHello.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ClientHello.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CombinedHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CombinedHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CompressionMethod.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/CompressionMethod.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ConnectionEnd.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ConnectionEnd.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ContentType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ContentType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DatagramReceiver.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DatagramReceiver.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DatagramSender.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DatagramSender.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DatagramTransport.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DatagramTransport.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsClient.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsClient.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsCredentialedSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsCredentialedSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsDHGroupVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsDHGroupVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsHeartbeat.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsHeartbeat.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsKeyExchangeFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsKeyExchangeFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsServer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsServer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsSrpConfigVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DefaultTlsSrpConfigVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DeferredHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DeferredHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DigestInputBuffer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DigestInputBuffer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DigitallySigned.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DigitallySigned.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsClientProtocol.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsClientProtocol.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsEpoch.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsEpoch.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsHandshakeRetransmit.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsHandshakeRetransmit.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsProtocol.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsProtocol.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsReassembler.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsReassembler.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsRecordLayer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsRecordLayer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsReliableHandshake.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsReliableHandshake.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsReplayWindow.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsReplayWindow.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsServerProtocol.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsServerProtocol.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsTransport.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsTransport.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/DtlsVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ECCurveType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ECCurveType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ECPointFormat.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ECPointFormat.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/EncryptionAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/EncryptionAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ExporterLabel.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ExporterLabel.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ExtensionType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ExtensionType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HandshakeMessageInput.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HandshakeMessageInput.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HandshakeMessageOutput.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HandshakeMessageOutput.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HandshakeType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HandshakeType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HashAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HashAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HeartbeatExtension.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HeartbeatExtension.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HeartbeatMessage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HeartbeatMessage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HeartbeatMessageType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HeartbeatMessageType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HeartbeatMode.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/HeartbeatMode.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/IdentifierType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/IdentifierType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/KeyExchangeAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/KeyExchangeAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/KeyShareEntry.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/KeyShareEntry.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/KeyUpdateRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/KeyUpdateRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/MacAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/MacAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/MaxFragmentLength.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/MaxFragmentLength.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/NameType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/NameType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/NamedGroup.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/NamedGroup.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/NamedGroupRole.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/NamedGroupRole.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/NewSessionTicket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/NewSessionTicket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/OcspStatusRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/OcspStatusRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/OfferedPsks.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/OfferedPsks.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PrfAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PrfAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ProtocolName.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ProtocolName.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ProtocolVersion.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ProtocolVersion.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PskIdentity.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PskIdentity.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PskKeyExchangeMode.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PskKeyExchangeMode.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PskTlsClient.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PskTlsClient.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PskTlsServer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/PskTlsServer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/RecordFormat.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/RecordFormat.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/RecordPreview.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/RecordPreview.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/RecordStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/RecordStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SecurityParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SecurityParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerHello.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerHello.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerName.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerName.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerNameList.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerNameList.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerOnlyTlsAuthentication.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerOnlyTlsAuthentication.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerSrpParams.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/ServerSrpParams.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SessionParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SessionParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SignatureAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SignatureAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SignatureAndHashAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SignatureAndHashAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SignatureScheme.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SignatureScheme.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SimulatedTlsSrpIdentityManager.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SimulatedTlsSrpIdentityManager.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SrpTlsClient.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SrpTlsClient.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SrpTlsServer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SrpTlsServer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SrtpProtectionProfile.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SrtpProtectionProfile.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/Ssl3Utilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/Ssl3Utilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SupplementalDataEntry.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SupplementalDataEntry.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SupplementalDataType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/SupplementalDataType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/Timeout.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/Timeout.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsAuthentication.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsAuthentication.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsClient.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsClient.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsClientContext.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsClientContext.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsClientContextImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsClientContextImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsClientProtocol.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsClientProtocol.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCloseable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCloseable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsContext.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsContext.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCredentialedAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCredentialedAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCredentialedDecryptor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCredentialedDecryptor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCredentialedSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCredentialedSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCredentials.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsCredentials.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDHGroupVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDHGroupVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDHKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDHKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDHUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDHUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDHanonKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDHanonKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDheKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsDheKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsECDHKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsECDHKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsECDHanonKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsECDHanonKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsECDheKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsECDheKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsEccUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsEccUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsExtensionsUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsExtensionsUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsFatalAlert.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsFatalAlert.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsFatalAlertReceived.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsFatalAlertReceived.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsHandshakeHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsHandshakeHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsHeartbeat.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsHeartbeat.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsKeyExchangeFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsKeyExchangeFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsNoCloseNotifyException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsNoCloseNotifyException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsObjectIdentifiers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsObjectIdentifiers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPeer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPeer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsProtocol.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsProtocol.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPsk.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPsk.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPskExternal.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPskExternal.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPskIdentity.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPskIdentity.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPskIdentityManager.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPskIdentityManager.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPskKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsPskKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsRsaKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsRsaKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerCertificateImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerCertificateImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerContext.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerContext.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerContextImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerContextImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerProtocol.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsServerProtocol.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSession.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSession.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSessionImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSessionImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpConfigVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpConfigVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpIdentity.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpIdentity.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpIdentityManager.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpIdentityManager.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpKeyExchange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpKeyExchange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpLoginParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpLoginParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrpUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrtpUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsSrtpUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsTimeoutException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsTimeoutException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TrustedAuthority.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TrustedAuthority.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/UrlAndHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/UrlAndHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/UseSrtpData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/UseSrtpData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/UserMappingType.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/UserMappingType.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/CryptoHashAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/CryptoHashAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/CryptoSignatureAlgorithm.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/CryptoSignatureAlgorithm.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/DHGroup.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/DHGroup.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/DHStandardGroups.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/DHStandardGroups.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/Srp6Group.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/Srp6Group.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/Srp6StandardGroups.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/Srp6StandardGroups.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/Tls13Verifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/Tls13Verifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCertificateRole.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCertificateRole.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCrypto.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCrypto.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCryptoException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCryptoException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCryptoParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCryptoParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCryptoUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsCryptoUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsDHConfig.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsDHConfig.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsDHDomain.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsDHDomain.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsDecodeResult.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsDecodeResult.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsECConfig.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsECConfig.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsECDomain.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsECDomain.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsEncodeResult.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsEncodeResult.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsEncryptor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsEncryptor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsHashSink.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsHashSink.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsHmac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsHmac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsMacSink.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsMacSink.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsNonceGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsNonceGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsNullNullCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsNullNullCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSecret.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSecret.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSrp6Client.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSrp6Client.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSrp6Server.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSrp6Server.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSrp6VerifierGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSrp6VerifierGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSrpConfig.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsSrpConfig.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsStreamSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsStreamSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsStreamVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsStreamVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/TlsVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/AbstractTlsCrypto.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/AbstractTlsCrypto.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/AbstractTlsSecret.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/AbstractTlsSecret.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/LegacyTls13Verifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/LegacyTls13Verifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/RsaUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/RsaUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsAeadCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsAeadCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsAeadCipherImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsAeadCipherImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsBlockCipherImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsBlockCipherImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsImplUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsImplUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsNullCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsNullCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsSuiteHmac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsSuiteHmac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsSuiteMac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/TlsSuiteMac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcChaCha20Poly1305.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcChaCha20Poly1305.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcDefaultTlsCredentialedAgreement.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcDefaultTlsCredentialedAgreement.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcDefaultTlsCredentialedDecryptor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcDefaultTlsCredentialedDecryptor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcDefaultTlsCredentialedSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcDefaultTlsCredentialedSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcSsl3Hmac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcSsl3Hmac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTls13Verifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTls13Verifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsAeadCipherImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsAeadCipherImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsBlockCipherImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsBlockCipherImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsCrypto.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsCrypto.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDH.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDH.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDHDomain.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDHDomain.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDsaSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDsaSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDsaVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDsaVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDssSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDssSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDssVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsDssVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDH.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDH.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDomain.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDomain.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDsa13Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDsa13Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDsaSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDsaSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDsaVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsECDsaVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsEd25519Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsEd25519Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsEd448Signer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsEd448Signer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsHash.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsHash.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsHmac.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsHmac.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsNonceGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsNonceGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRawKeyCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRawKeyCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaEncryptor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaEncryptor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaPssSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaPssSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaPssVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaPssVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsRsaVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSecret.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSecret.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSrp6Client.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSrp6Client.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSrp6Server.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSrp6Server.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSrp6VerifierGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsSrp6VerifierGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsStreamSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsStreamSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsStreamVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsStreamVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsVerifier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcTlsVerifier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcVerifyingStreamSigner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcVerifyingStreamSigner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcX25519.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcX25519.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcX25519Domain.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcX25519Domain.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcX448.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcX448.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcX448Domain.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/crypto/impl/bc/BcX448Domain.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/GenTimeAccuracy.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/GenTimeAccuracy.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TSPAlgorithms.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TSPAlgorithms.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TSPException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TSPException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TSPUtil.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TSPUtil.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TSPValidationException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TSPValidationException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampRequestGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampRequestGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampResponse.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampResponse.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampResponseGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampResponseGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampToken.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampToken.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampTokenGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampTokenGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampTokenInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tsp/TimeStampTokenInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Arrays.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Arrays.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/BigIntegers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/BigIntegers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Bytes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Bytes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Enums.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Enums.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/IEncodable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/IEncodable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/IMemoable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/IMemoable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Integers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Integers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Longs.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Longs.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/MemoableResetException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/MemoableResetException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Objects.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Objects.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Platform.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Platform.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Shorts.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Shorts.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Spans.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Spans.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Strings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/Strings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/bzip2.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/bzip2/BZip2Constants.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/bzip2/BZip2Constants.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/bzip2/CBZip2InputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/bzip2/CBZip2InputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/bzip2/CBZip2OutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/bzip2/CBZip2OutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/bzip2/CRC.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/bzip2/CRC.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/CollectionUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/CollectionUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/EnumerableProxy.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/EnumerableProxy.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/HashSet.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/HashSet.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ISelector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ISelector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/IStore.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/IStore.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/LinkedDictionary.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/LinkedDictionary.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlyCollection.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlyCollection.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlyDictionary.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlyDictionary.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlyList.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlyList.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlySet.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/ReadOnlySet.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/StoreImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/collections/StoreImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/date.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/date/DateTimeUtilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/date/DateTimeUtilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/Base64.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/Base64.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/Base64Encoder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/Base64Encoder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/BufferedDecoder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/BufferedDecoder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/BufferedEncoder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/BufferedEncoder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/Hex.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/Hex.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/HexEncoder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/HexEncoder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/HexTranslator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/HexTranslator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/IEncoder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/IEncoder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/Translator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/Translator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/UrlBase64.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/UrlBase64.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/UrlBase64Encoder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/encoders/UrlBase64Encoder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/BaseInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/BaseInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/BaseOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/BaseOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/BinaryReaders.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/BinaryReaders.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/BinaryWriters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/BinaryWriters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/FilterStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/FilterStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/LimitedInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/LimitedInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/MemoryInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/MemoryInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/MemoryOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/MemoryOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/PushbackStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/PushbackStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/StreamOverflowException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/StreamOverflowException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/Streams.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/Streams.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/TeeInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/TeeInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/TeeOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/TeeOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/compression.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/compression/Bzip2.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/compression/Bzip2.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/compression/ZLib.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/compression/ZLib.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/compression/Zip.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/compression/Zip.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemGenerationException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemGenerationException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemHeader.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemHeader.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemObject.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemObject.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemObjectGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemObjectGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemObjectParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemObjectParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemReader.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemReader.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemWriter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/io/pem/PemWriter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/net.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/net/IPAddress.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/net/IPAddress.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/Adler32.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/Adler32.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/Deflate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/Deflate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/InfBlocks.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/InfBlocks.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/InfCodes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/InfCodes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/InfTree.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/InfTree.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/Inflate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/Inflate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/JZlib.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/JZlib.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/StaticTree.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/StaticTree.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZDeflaterOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZDeflaterOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZInflaterInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZInflaterInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZInputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZInputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZOutputStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZOutputStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZTree.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/util/zlib/ZTree.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/AttributeCertificateHolder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/AttributeCertificateHolder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/AttributeCertificateIssuer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/AttributeCertificateIssuer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/IX509Extension.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/IX509Extension.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/PEMParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/PEMParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/PrincipalUtil.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/PrincipalUtil.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/SubjectPublicKeyInfoFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/SubjectPublicKeyInfoFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509AttrCertParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509AttrCertParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509Attribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509Attribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CertPairParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CertPairParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509Certificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509Certificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CertificatePair.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CertificatePair.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CertificateParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CertificateParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509Crl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509Crl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CrlEntry.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CrlEntry.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CrlParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509CrlParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509ExtensionBase.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509ExtensionBase.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509KeyUsage.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509KeyUsage.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509SignatureUtil.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509SignatureUtil.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509Utilities.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509Utilities.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V1CertificateGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V1CertificateGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V2AttributeCertificate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V2AttributeCertificate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V2AttributeCertificateGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V2AttributeCertificateGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V2CRLGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V2CRLGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V3CertificateGenerator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/X509V3CertificateGenerator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/extension.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/extension/AuthorityKeyIdentifierStructure.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/extension/AuthorityKeyIdentifierStructure.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/extension/SubjectKeyIdentifierStructure.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/extension/SubjectKeyIdentifierStructure.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/extension/X509ExtensionUtil.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/extension/X509ExtensionUtil.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509AttrCertStoreSelector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509AttrCertStoreSelector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CertPairStoreSelector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CertPairStoreSelector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CertStoreSelector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CertStoreSelector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CollectionStore.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CollectionStore.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CollectionStoreParameters.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CollectionStoreParameters.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CrlStoreSelector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509CrlStoreSelector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509StoreFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/x509/store/X509StoreFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/CRC.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/CRC/CRC32.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/CRC/CRC32.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/Deflate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/Deflate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/DeflateStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/DeflateStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/GZipStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/GZipStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/InfTree.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/InfTree.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/Inflate.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/Inflate.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/ZTree.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/ZTree.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/Zlib.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/Zlib.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/ZlibBaseStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/ZlibBaseStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/ZlibCodec.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/ZlibCodec.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/ZlibConstants.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/Compression/Zlib/ZlibConstants.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/JSON.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/JSON.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/IJsonWrapper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/IJsonWrapper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonData.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonData.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonException.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonException.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonMapper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonMapper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonMockWrapper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonMockWrapper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonReader.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonReader.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonWriter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/JsonWriter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/Lexer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/Lexer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/ParserToken.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/3rdParty/JSON/LitJson/ParserToken.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/AssemblyInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/AssemblyInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/Builders.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/Builders.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/HTTPCache.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/HTTPCache.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/HTTPCacheContentWriter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/HTTPCacheContentWriter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/HTTPCacheDatabase.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/HTTPCacheDatabase.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/HTTPCacheOptions.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Caching/HTTPCacheOptions.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Cookies.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Cookies/Cookie.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Cookies/Cookie.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Cookies/CookieJar.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Cookies/CookieJar.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPMethods.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPMethods.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPRange.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPRange.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPRequest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPRequest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPRequestAsyncExtensions.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPRequestAsyncExtensions.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPRequestStates.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/HTTPRequestStates.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/ConnectionBase.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/ConnectionBase.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/ConnectionEvents.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/ConnectionEvents.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/ConnectionHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/ConnectionHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/File.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/File/FileConnection.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/File/FileConnection.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP1.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP1/Constants.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP1/Constants.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP1/HTTP1ContentConsumer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP1/HTTP1ContentConsumer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP1/PeekableHTTP1Response.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP1/PeekableHTTP1Response.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/BufferHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/BufferHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/FramesAsStreamView.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/FramesAsStreamView.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HPACKEncoder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HPACKEncoder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2ConnectionSettings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2ConnectionSettings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2ContentConsumer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2ContentConsumer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2FrameHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2FrameHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2Frames.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2Frames.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2Response.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2Response.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2SettingsRegistry.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2SettingsRegistry.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2Stream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HTTP2Stream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HeaderTable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HeaderTable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HuffmanEncoder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTP2/HuffmanEncoder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTPConnectionStates.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTPConnectionStates.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTPOverTCPConnection.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTPOverTCPConnection.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTPProtocolFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/HTTPProtocolFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/IDownloadContentBufferAvailable.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/IDownloadContentBufferAvailable.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/IHTTPRequestHandler.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/IHTTPRequestHandler.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/IThreadSignaler.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/IThreadSignaler.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/RequestEvents.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/RequestEvents.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/WebGL.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/WebGL/WebGLXHRConnection.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/WebGL/WebGLXHRConnection.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/WebGL/WebGLXHRNativeConnectionLayer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/WebGL/WebGLXHRNativeConnectionLayer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/WebGL/WebGLXHRNativeInterface.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/WebGL/WebGLXHRNativeInterface.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Manager.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Manager/HostKey.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Manager/HostKey.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Manager/HostManager.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Manager/HostManager.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Manager/HostVariant.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Manager/HostVariant.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Settings.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Settings/AsteriskStringComparer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Settings/AsteriskStringComparer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Settings/HostSettings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Settings/HostSettings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Settings/HostSettingsManager.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Settings/HostSettingsManager.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Settings/Node.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Settings/Node.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/AndroidProxyDetector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/AndroidProxyDetector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/EnvironmentProxyDetector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/EnvironmentProxyDetector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/FrameworkProxyDetector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/FrameworkProxyDetector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/ProgrammaticallyAddedProxyDetector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/ProgrammaticallyAddedProxyDetector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/ProxyDetector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Autodetect/ProxyDetector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/HTTPProxy.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/HTTPProxy.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/HTTPProxyResponse.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/HTTPProxyResponse.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Implementations.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Implementations/SOCKSV5Negotiator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Implementations/SOCKSV5Negotiator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Proxy.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/Proxy.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/SOCKSProxy.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Proxies/SOCKSProxy.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authentication.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authentication/Credentials.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authentication/Credentials.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authentication/Digest.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authentication/Digest.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authentication/DigestStore.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authentication/DigestStore.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authentication/WWWAuthenticateHeaderParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authentication/WWWAuthenticateHeaderParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authenticators.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authenticators/BearerTokenAuthenticator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authenticators/BearerTokenAuthenticator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authenticators/CredentialAuthenticator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authenticators/CredentialAuthenticator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authenticators/IAuthenticator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Authenticators/IAuthenticator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/DownloadSettings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/DownloadSettings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/ProxySettings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/ProxySettings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/RedirectSettings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/RedirectSettings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/RetrySettings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/RetrySettings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/TimeoutSettings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/TimeoutSettings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/UploadSettings.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Settings/UploadSettings.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Timings.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Timings/TimingCollector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Timings/TimingCollector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Timings/TimingEvent.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Timings/TimingEvent.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Timings/TimingEventInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Timings/TimingEventInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Timings/TimingEventNames.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Timings/TimingEventNames.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/BodyLengths.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/BodyLengths.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/DynamicUploadStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/DynamicUploadStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/Forms.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/Forms/MultipartFormDataStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/Forms/MultipartFormDataStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/Forms/UrlEncodedStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/Forms/UrlEncodedStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/JSonDataStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/JSonDataStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/UploadStreamBase.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Request/Upload/UploadStreamBase.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/BlockingDownloadContentStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/BlockingDownloadContentStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/BrotliDecompressor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/BrotliDecompressor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/DecompressorFactory.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/DecompressorFactory.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/DeflateDecompressor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/DeflateDecompressor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/GZipDecompressor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/GZipDecompressor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/IDecompressor.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/Decompression/IDecompressor.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/DownloadContentStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/DownloadContentStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/HTTPResponse.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/HTTPResponse.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/HTTPStatusCodes.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/HTTP/Response/HTTPStatusCodes.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Plugins.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Plugins/Android.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Plugins/Android/ProxyFinder.java
create mode 100644 Packages/com.tivadar.best.http/Runtime/Plugins/Android/ProxyFinder.java.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Plugins/WebGL.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Plugins/WebGL/BestHTTP_WebRequest.jslib
create mode 100644 Packages/com.tivadar.best.http/Runtime/Plugins/WebGL/BestHTTP_WebRequest.jslib.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Profiler.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Profiler/Memory.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Profiler/Memory/MemoryStats.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Profiler/Memory/MemoryStats.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Profiler/Network.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Profiler/Network/NetworkStats.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Profiler/Network/NetworkStats.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Profiler/Network/NetworkStatsCollector.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Profiler/Network/NetworkStatsCollector.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Database.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Database.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/DatabaseOptions.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/DatabaseOptions.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/DiskManager.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/DiskManager.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/FreeListManager.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/FreeListManager.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/AVLTree.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/AVLTree.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/ByteArrayComparer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/ByteArrayComparer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/DateTimeComparer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/DateTimeComparer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/Hash128Comparer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/Hash128Comparer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/StringComparer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/StringComparer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/UInt16Comparer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/UInt16Comparer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/UInt32Comparer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Indexing/Comparers/UInt32Comparer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/IndexingService.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/IndexingService.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Metadata.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Metadata.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/MetadataIndexFinders.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/MetadataIndexFinders/DefaultEmptyMetadataIndexFinder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/MetadataIndexFinders/DefaultEmptyMetadataIndexFinder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/MetadataIndexFinders/FindDeletedMetadataIndexFinder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/MetadataIndexFinders/FindDeletedMetadataIndexFinder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/MetadataIndexFinders/IEmptyMetadataIndexFinder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/MetadataIndexFinders/IEmptyMetadataIndexFinder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/MetadataService.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/MetadataService.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Utils.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Utils/StreamUtil.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Database/Utils/StreamUtil.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/CircularBuffer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/CircularBuffer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/Extensions.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/Extensions.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/Future.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/Future.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/HeaderParser.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/HeaderParser.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/HeaderValue.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/HeaderValue.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/HeartbeatManager.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/HeartbeatManager.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/KeyValuePairList.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/KeyValuePairList.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/Timer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Extensions/Timer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/HTTPManager.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/HTTPManager.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/HTTPUpdateDelegator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/HTTPUpdateDelegator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/FileOutput.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/FileOutput.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/ILogger.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/ILogger.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/LoggingContext.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/LoggingContext.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/ThreadedLogger.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/ThreadedLogger.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/UnityOutput.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Logger/UnityOutput.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Collections.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Collections/ObjectModel.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Collections/ObjectModel/ObservableDictionary.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Collections/ObjectModel/ObservableDictionary.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Collections/Specialized.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Collections/Specialized/NotifyCollectionChangedEventArgs.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Collections/Specialized/NotifyCollectionChangedEventArgs.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/FileSystem.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/FileSystem/DefaultIOService.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/FileSystem/DefaultIOService.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/FileSystem/IIOService.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/FileSystem/IIOService.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/IL2CPP.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/IL2CPP/Il2CppEagerStaticClassConstructionAttribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/IL2CPP/Il2CppEagerStaticClassConstructionAttribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/IL2CPP/Il2CppSetOptionAttribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/IL2CPP/Il2CppSetOptionAttribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/IL2CPP/PreserveAttribute.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/IL2CPP/PreserveAttribute.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/AutoReleaseBuffer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/AutoReleaseBuffer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/Bucket.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/Bucket.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/BufferPool.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/BufferPool.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/BufferPoolStats.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/BufferPoolStats.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/BufferSegment.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/BufferSegment.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/BufferStore.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/BufferStore.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/Tracker.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Memory/Tracker.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/DNS.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/DNS/Cache.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/DNS/Cache/DNSCache.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/DNS/Cache/DNSCache.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/DNS/Cache/DNSCacheEntry.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/DNS/Cache/DNSCacheEntry.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Interfaces.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Interfaces.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Negotiator.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Negotiator.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/FrameworkTLSByteForwarder.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/FrameworkTLSByteForwarder.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/FrameworkTLSStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/FrameworkTLSStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/NonblockingBCTLSStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/NonblockingBCTLSStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/NonblockingTCPStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/NonblockingTCPStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/NonblockingUnderlyingStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/Streams/NonblockingUnderlyingStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/TCPRingmaster.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/TCPRingmaster.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/TCPStreamer.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Network/Tcp/TCPStreamer.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Text.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Text/StringBuilderPool.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Text/StringBuilderPool.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Threading.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Threading/CustomThreadPool.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Threading/CustomThreadPool.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Threading/LockHelpers.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Threading/LockHelpers.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Threading/ThreadedRunner.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/PlatformSupport/Threading/ThreadedRunner.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/BufferPoolMemoryStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/BufferPoolMemoryStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/BufferSegmentStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/BufferSegmentStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/PeekableContentProviderStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/PeekableContentProviderStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/PeekableIncomingSegmentStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/PeekableIncomingSegmentStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/PeekableStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/PeekableStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/ReadOnlyBufferedStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/ReadOnlyBufferedStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/StreamList.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/StreamList.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/WriteOnlyBufferedStream.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/Streams/WriteOnlyBufferedStream.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/AbstractTls13Client.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/AbstractTls13Client.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/FastTlsCrypto.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/FastTlsCrypto.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/BurstTables8kGcmMultiplier.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/BurstTables8kGcmMultiplier.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastAesEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastAesEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastAesEngineHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastAesEngineHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastBcChaCha20Poly1305.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastBcChaCha20Poly1305.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastCbcBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastCbcBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastCcmBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastCcmBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastChaCha7539Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastChaCha7539Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastChaCha7539EngineHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastChaCha7539EngineHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastChaChaEngine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastChaChaEngine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastChaChaEngineHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastChaChaEngineHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastGcmBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastGcmBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastGcmBlockCipherHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastGcmBlockCipherHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastPoly1305.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastPoly1305.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastSalsa20Engine.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastSalsa20Engine.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastSalsa20EngineHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastSalsa20EngineHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastSicBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastSicBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastTlsAeadCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastTlsAeadCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastTlsAeadCipherImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastTlsAeadCipherImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastTlsBlockCipher.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastTlsBlockCipher.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastTlsBlockCipherImpl.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/Crypto/Impl/FastTlsBlockCipherImpl.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/DefaultTls13Client.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/DefaultTls13Client.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/KeyLogFileWriter.cs
create mode 100644 Packages/com.tivadar.best.http/Runtime/Shared/TLS/KeyLogFileWriter.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/com.Tivadar.Best.HTTP.asmdef
create mode 100644 Packages/com.tivadar.best.http/Runtime/com.Tivadar.Best.HTTP.asmdef.meta
create mode 100644 Packages/com.tivadar.best.http/Runtime/csc.rsp
create mode 100644 Packages/com.tivadar.best.http/Runtime/csc.rsp.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/DownStreamSample.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/DownStreamSample.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/DownStreamSample.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/DownStreamSample.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/DownStreamWithThreadSample.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/DownStreamWithThreadSample.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/DownStreamWithThreadSample.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/DownStreamWithThreadSample.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/HTTP Samples.unity
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/HTTP Samples.unity.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/PerHostManagerSample.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/PerHostManagerSample.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/PerHostManagerSample.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/PerHostManagerSample.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/PopulateCacheManuallySample.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/PopulateCacheManuallySample.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/PopulateCacheManuallySample.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/PopulateCacheManuallySample.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/SmallSamples.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/SmallSamples.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/SmallSamples.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/SmallSamples.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/StraightFromCacheSample.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/StraightFromCacheSample.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/StraightFromCacheSample.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/StraightFromCacheSample.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/GUIHelper.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/GUIHelper.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/MultiTextListItem.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/MultiTextListItem.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/MultiTextListItem.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/MultiTextListItem.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SampleBase.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SampleBase.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/Category.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/Category.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/Category.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/Category.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/ExampleInfo.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/ExampleInfo.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/ExampleInfo.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/ExampleInfo.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/ExampleListItem.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/ExampleListItem.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/ExampleListItem.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/ExampleListItem.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/SampleSelectorUI.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/SelectorUI/SampleSelectorUI.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/TextListItem.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/TextListItem.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/TextListItem.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/TextListItem.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/TextWithImageListItem.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/TextWithImageListItem.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/TextWithImageListItem.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UI Helpers/TextWithImageListItem.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UploadOnDemandSample.cs
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UploadOnDemandSample.cs.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UploadOnDemandSample.prefab
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/UploadOnDemandSample.prefab.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/com.Tivadar.Best.HTTP.Samples.WithUI.asmdef
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/com.Tivadar.Best.HTTP.Samples.WithUI.asmdef.meta
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/csc.rsp
create mode 100644 Packages/com.tivadar.best.http/Samples~/With UI/csc.rsp.meta
create mode 100644 Packages/com.tivadar.best.http/Third Party Notices.md
create mode 100644 Packages/com.tivadar.best.http/Third Party Notices.md.meta
create mode 100644 Packages/com.tivadar.best.http/package.json
create mode 100644 Packages/com.tivadar.best.http/package.json.meta
diff --git a/.omo/run-continuation/ses_13621303dffegy9HFswySN0j47.json b/.omo/run-continuation/ses_13621303dffegy9HFswySN0j47.json
index 055858a1..0a0c1b94 100644
--- a/.omo/run-continuation/ses_13621303dffegy9HFswySN0j47.json
+++ b/.omo/run-continuation/ses_13621303dffegy9HFswySN0j47.json
@@ -1,10 +1,10 @@
{
"sessionID": "ses_13621303dffegy9HFswySN0j47",
- "updatedAt": "2026-06-15T06:43:21.045Z",
+ "updatedAt": "2026-06-15T08:51:32.107Z",
"sources": {
"background-task": {
"state": "idle",
- "updatedAt": "2026-06-15T06:43:21.045Z"
+ "updatedAt": "2026-06-15T08:51:32.107Z"
}
}
}
\ No newline at end of file
diff --git a/Assets/000_assets/material/M_SquareFrame 1.mat b/Assets/000_assets/material/M_SquareFrame 1.mat
index 79893bfb..5c6a0695 100644
--- a/Assets/000_assets/material/M_SquareFrame 1.mat
+++ b/Assets/000_assets/material/M_SquareFrame 1.mat
@@ -213,7 +213,7 @@ Material:
- _Dst: 10
- _DstBlend: 0
- _DstBlendAlpha: 0
- - _EdgeValue: 0.99915254
+ - _EdgeValue: 0.7824126
- _EnvironmentReflections: 1
- _FNLfanxiangkaiguan: 0
- _Face: 1
@@ -258,7 +258,7 @@ Material:
- _Mask_scale: 1
- _Metallic: 0
- _OcclusionStrength: 1
- - _Opacity: 0.00084745884
+ - _Opacity: 0.21758741
- _Parallax: 0.005
- _Pass: 0
- _QueueOffset: 0
diff --git a/Assets/FR2_Cache.asset b/Assets/FR2_Cache.asset
index b2ee9b25..8862b1cb 100644
--- a/Assets/FR2_Cache.asset
+++ b/Assets/FR2_Cache.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:894f376470646329810274ef54b129ac379db3f2697dd6cc8e6e0dc234585719
-size 7488597
+oid sha256:a04389d8b82ea2c8ef6a4744b46560e981ea9f75cd36b3a282711a478b170606
+size 7525221
diff --git a/Assets/Scripts/Online/IchniOnline.asmdef b/Assets/Scripts/Online/IchniOnline.asmdef
index 8827b6bc..faf3cb8e 100644
--- a/Assets/Scripts/Online/IchniOnline.asmdef
+++ b/Assets/Scripts/Online/IchniOnline.asmdef
@@ -14,7 +14,9 @@
"GUID:ff2731b992f0b4736afeff3719a96ad4",
"GUID:7a400ff9720ed4ff3ab2d2ef3c6b8a86",
"GUID:d9925423e828d479c9063ea882f31e06",
- "GUID:cfcd2ce455f8d1944942cdd919ecaa60"
+ "GUID:cfcd2ce455f8d1944942cdd919ecaa60",
+ "GUID:9069ac25d95ca17448b247f3bb1c769f",
+ "GUID:9069ac25d95ca17448a247f3bb1c769f"
],
"includePlatforms": [],
"excludePlatforms": [],
diff --git a/Assets/Scripts/Online/Logic/AuthService.cs b/Assets/Scripts/Online/Logic/AuthService.cs
index f28543cf..b4d77cad 100644
--- a/Assets/Scripts/Online/Logic/AuthService.cs
+++ b/Assets/Scripts/Online/Logic/AuthService.cs
@@ -87,7 +87,7 @@ namespace IchniOnline.Online.Logic
try
{
var result = await IchniOnlineApiClient.Instance.PostAsync("/api/auth/third-party/login", dto);
-
+ Debug.Log(JsonUtility.ToJson(result.Data));
IsLoggingIn = false;
if (result.IsSuccess)
diff --git a/Assets/Scripts/Online/Logic/LoginCacheManager.cs b/Assets/Scripts/Online/Logic/LoginCacheManager.cs
index 8b2bb054..f0a8f517 100644
--- a/Assets/Scripts/Online/Logic/LoginCacheManager.cs
+++ b/Assets/Scripts/Online/Logic/LoginCacheManager.cs
@@ -1,4 +1,5 @@
using IchniOnline.Online.Models;
+using IchniOnline.Online.Network.Models;
using TapSDK.Login;
using UnityEngine;
@@ -15,15 +16,7 @@ namespace IchniOnline.Online.Logic
///
/// 本地是否存在有效的登录缓存
///
- public static bool HasCachedLogin
- {
- get
- {
- if (!ES3.KeyExists(ES3_KEY)) return false;
- var data = ES3.Load(ES3_KEY);
- return data != null && data.IsValid;
- }
- }
+ public static bool HasCachedLogin => HasValidSession;
///
/// 获取缓存的登录数据,无缓存返回 null
@@ -38,7 +31,17 @@ namespace IchniOnline.Online.Logic
}
///
- /// 将 TapTap 登录结果写入本地缓存
+ /// 缓存的 JWT 令牌,无缓存或无会话返回 null
+ ///
+ public static string CachedJwtToken => CachedData?.jwtToken;
+
+ ///
+ /// 是否存在有效的服务端会话(JWT 令牌存在且 hasServerSession 为 true)
+ ///
+ public static bool HasValidSession => CachedData?.IsValid ?? false;
+
+ ///
+ /// 将 TapTap 登录结果写入本地缓存,保留已有的服务端会话数据
///
public static void SaveFromTapTapAccount(TapTapAccount account)
{
@@ -48,18 +51,68 @@ namespace IchniOnline.Online.Logic
return;
}
- var data = new LoginCacheData(
- account.openId,
- account.unionId,
- account.name,
- account.avatar,
- account.email
- );
+ LoginCacheData data;
+ if (ES3.KeyExists(ES3_KEY))
+ {
+ data = ES3.Load(ES3_KEY) ?? new LoginCacheData();
+ }
+ else
+ {
+ data = new LoginCacheData();
+ }
+
+ data.openId = account.openId;
+ data.unionId = account.unionId;
+ data.name = account.name;
+ data.avatar = account.avatar;
+ data.email = account.email;
ES3.Save(ES3_KEY, data);
Debug.Log($"[LoginCacheManager] 已缓存登录数据,openId={data.openId}");
}
+ ///
+ /// 保存服务端认证会话(JWT + 用户信息),保留已有的 TapTap 数据
+ ///
+ public static void SaveAuthSession(string jwtToken, LoginResponseDto response)
+ {
+ if (string.IsNullOrEmpty(jwtToken) || response == null)
+ {
+ Debug.LogWarning("[LoginCacheManager] jwtToken 或 response 为 null,跳过缓存");
+ return;
+ }
+
+ LoginCacheData data;
+ if (ES3.KeyExists(ES3_KEY))
+ {
+ data = ES3.Load(ES3_KEY) ?? new LoginCacheData();
+ }
+ else
+ {
+ data = new LoginCacheData();
+ }
+
+ data.UpdateFromServerResponse(response);
+
+ ES3.Save(ES3_KEY, data);
+ Debug.Log($"[LoginCacheManager] 已缓存服务端会话,userId={data.userId}");
+ }
+
+ ///
+ /// 清除服务端会话数据,保留 TapTap 原始数据
+ ///
+ public static void ClearSession()
+ {
+ if (!ES3.KeyExists(ES3_KEY)) return;
+
+ var data = ES3.Load(ES3_KEY);
+ if (data == null) return;
+
+ data.ClearServerSession();
+ ES3.Save(ES3_KEY, data);
+ Debug.Log("[LoginCacheManager] 已清除服务端会话,保留 TapTap 数据");
+ }
+
///
/// 写入模拟数据(供编辑器工具使用)
///
diff --git a/Assets/Scripts/Online/Logic/ThirdPartyServiceManager.cs b/Assets/Scripts/Online/Logic/ThirdPartyServiceManager.cs
index 79865a69..381b06d5 100644
--- a/Assets/Scripts/Online/Logic/ThirdPartyServiceManager.cs
+++ b/Assets/Scripts/Online/Logic/ThirdPartyServiceManager.cs
@@ -27,6 +27,12 @@ namespace IchniOnline.Online.Logic
///
public event Action OnLoginFailed;
+ ///
+ /// TapTap 登录成功并获取 AccessToken 后触发,参数为 TapTapAccount 和 AccessToken。
+ /// AuthService 可订阅此事件在通用成功流程之前拦截 token 进行 API 调用。
+ ///
+ public event Action OnLoginWithToken;
+
private bool _initialized;
private void Awake()
@@ -60,8 +66,10 @@ namespace IchniOnline.Online.Logic
enableLog = true
};
// TapSDK 初始化
+
TapTapSDK.Init(coreOptions);
_initialized = true;
+
}
///
@@ -87,6 +95,7 @@ namespace IchniOnline.Online.Logic
// 发起 Tap 登录
var account = await TapTapLogin.Instance.LoginWithScopes(scopes.ToArray());
Debug.Log($"TapTap 登录成功,用户 ID:{account.openId},name:{account.name}");
+ OnLoginWithToken?.Invoke(account, account.accessToken);
LoginCacheManager.SaveFromTapTapAccount(account);
OnLoginSuccess?.Invoke(account);
}
diff --git a/Assets/Scripts/Online/Models/LoginCacheData.cs b/Assets/Scripts/Online/Models/LoginCacheData.cs
index 22c705aa..016b957a 100644
--- a/Assets/Scripts/Online/Models/LoginCacheData.cs
+++ b/Assets/Scripts/Online/Models/LoginCacheData.cs
@@ -1,5 +1,6 @@
using System;
using UnityEngine;
+using IchniOnline.Online.Network.Models;
namespace IchniOnline.Online.Models
{
@@ -16,6 +17,14 @@ namespace IchniOnline.Online.Models
public string email;
public long cacheTimestamp;
+ // Server session fields
+ public string jwtToken;
+ public string userId;
+ public string displayName;
+ public string avatarUrl;
+ public int permission;
+ public bool hasServerSession;
+
public LoginCacheData() { }
public LoginCacheData(string openId, string unionId, string name, string avatar, string email)
@@ -28,6 +37,26 @@ namespace IchniOnline.Online.Models
this.cacheTimestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
}
- public bool IsValid => !string.IsNullOrEmpty(openId);
+ public bool IsValid => hasServerSession && !string.IsNullOrEmpty(jwtToken);
+
+ public void UpdateFromServerResponse(LoginResponseDto response)
+ {
+ this.jwtToken = response.Token;
+ this.userId = response.User.UserId;
+ this.displayName = response.User.DisplayName;
+ this.avatarUrl = response.User.AvatarUrl;
+ this.permission = response.User.Permission;
+ this.hasServerSession = true;
+ }
+
+ public void ClearServerSession()
+ {
+ this.jwtToken = null;
+ this.userId = null;
+ this.displayName = null;
+ this.avatarUrl = null;
+ this.permission = 0;
+ this.hasServerSession = false;
+ }
}
}
diff --git a/Assets/Scripts/Online/Network/ApiClient.cs b/Assets/Scripts/Online/Network/ApiClient.cs
index 7dfac99f..a4da4a6e 100644
--- a/Assets/Scripts/Online/Network/ApiClient.cs
+++ b/Assets/Scripts/Online/Network/ApiClient.cs
@@ -17,7 +17,7 @@ namespace IchniOnline.Online.Network
private static IchniOnlineApiClient _instance;
public static IchniOnlineApiClient Instance => _instance ??= new IchniOnlineApiClient();
- public string BaseUrl { get; set; } = "http://localhost:5433";
+ public string BaseUrl { get; set; } = "http://localhost:53734";
public string JwtToken { get; set; }
private IchniOnlineApiClient() { }
diff --git a/Assets/Scripts/Online/Resources.meta b/Assets/Scripts/Online/Resources.meta
deleted file mode 100644
index 2e39673e..00000000
--- a/Assets/Scripts/Online/Resources.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 907170849dc345b29c0f7d072e1ca5db
-timeCreated: 1781501503
\ No newline at end of file
diff --git a/Assets/Scripts/UI/LoginPage/LoginPage.cs b/Assets/Scripts/UI/LoginPage/LoginPage.cs
index f5c7c7d9..1a8a91a5 100644
--- a/Assets/Scripts/UI/LoginPage/LoginPage.cs
+++ b/Assets/Scripts/UI/LoginPage/LoginPage.cs
@@ -1,6 +1,6 @@
using System;
using IchniOnline.Online.Logic;
-using TapSDK.Login;
+using IchniOnline.Online.Network.Models;
using UnityEngine;
using UnityEngine.UI;
@@ -58,46 +58,43 @@ namespace Ichni.UI
Debug.LogWarning("[LoginPage] tapTapButton 未赋值");
}
- // 在 Start 中订阅事件(确保 ThirdPartyServiceManager.Instance 已初始化)
- SubscribeThirdPartyEvents();
+ // 在 Start 中订阅 AuthService 事件
+ SubscribeAuthEvents();
}
private void OnDestroy()
{
- UnsubscribeThirdPartyEvents();
+ UnsubscribeAuthEvents();
}
private void OnEnable()
{
- // 每次启用时重新订阅(处理 DontDestroyOnLoad 场景切换等情况)
- SubscribeThirdPartyEvents();
+ SubscribeAuthEvents();
}
private void OnDisable()
{
- UnsubscribeThirdPartyEvents();
+ UnsubscribeAuthEvents();
}
- #region ThirdPartyServiceManager Event Subscription
+ #region IchniOnlineAuthService Event Subscription
- private void SubscribeThirdPartyEvents()
+ private void SubscribeAuthEvents()
{
- if (ThirdPartyServiceManager.Instance == null) return;
- ThirdPartyServiceManager.Instance.OnLoginSuccess -= OnTapTapLoginSuccess;
- ThirdPartyServiceManager.Instance.OnLoginCanceled -= OnTapTapLoginCanceled;
- ThirdPartyServiceManager.Instance.OnLoginFailed -= OnTapTapLoginFailed;
+ IchniOnlineAuthService.OnLoginSuccess -= OnAuthLoginSuccess;
+ IchniOnlineAuthService.OnLoginFailed -= OnAuthLoginFailed;
+ IchniOnlineAuthService.OnLoginCanceled -= OnAuthLoginCanceled;
- ThirdPartyServiceManager.Instance.OnLoginSuccess += OnTapTapLoginSuccess;
- ThirdPartyServiceManager.Instance.OnLoginCanceled += OnTapTapLoginCanceled;
- ThirdPartyServiceManager.Instance.OnLoginFailed += OnTapTapLoginFailed;
+ IchniOnlineAuthService.OnLoginSuccess += OnAuthLoginSuccess;
+ IchniOnlineAuthService.OnLoginFailed += OnAuthLoginFailed;
+ IchniOnlineAuthService.OnLoginCanceled += OnAuthLoginCanceled;
}
- private void UnsubscribeThirdPartyEvents()
+ private void UnsubscribeAuthEvents()
{
- if (ThirdPartyServiceManager.Instance == null) return;
- ThirdPartyServiceManager.Instance.OnLoginSuccess -= OnTapTapLoginSuccess;
- ThirdPartyServiceManager.Instance.OnLoginCanceled -= OnTapTapLoginCanceled;
- ThirdPartyServiceManager.Instance.OnLoginFailed -= OnTapTapLoginFailed;
+ IchniOnlineAuthService.OnLoginSuccess -= OnAuthLoginSuccess;
+ IchniOnlineAuthService.OnLoginFailed -= OnAuthLoginFailed;
+ IchniOnlineAuthService.OnLoginCanceled -= OnAuthLoginCanceled;
}
#endregion
@@ -111,7 +108,7 @@ namespace Ichni.UI
}
///
- /// 点击 TapTap 按钮:发起 TapTap 登录
+ /// 点击 TapTap 按钮:通过 AuthService 发起 TapTap 登录
///
private void OnTapTapClicked()
{
@@ -121,39 +118,48 @@ namespace Ichni.UI
tapTapButton.interactable = false;
if (closeButton != null) closeButton.interactable = false;
- ThirdPartyServiceManager.Instance?.StartTapTapLogin();
+ Debug.Log("[LoginPage] 正在登录...");
+ IchniOnlineAuthService.LoginWithTapTap();
}
///
- /// TapTap 登录成功回调
+ /// AuthService 登录成功回调
///
- private void OnTapTapLoginSuccess(TapTapAccount account)
+ private void OnAuthLoginSuccess(LoginResponseDto response)
{
_isLoggingIn = false;
- Debug.Log($"[LoginPage] TapTap 登录成功,用户:{account.name}");
+
+ if (response == null || response.User == null)
+ {
+ Debug.Log("[LoginPage] 登录成功(无用户详情)");
+ FadeOut(0.5f, false, RestoreStartPage);
+ return;
+ }
+
+ Debug.Log($"[LoginPage] 登录成功,用户:{response.User.DisplayName}(ID: {response.User.UserId})");
// 登录成功后淡出登录页
FadeOut(0.5f, false, RestoreStartPage);
}
///
- /// TapTap 登录取消回调
+ /// AuthService 登录失败回调
///
- private void OnTapTapLoginCanceled()
+ private void OnAuthLoginFailed(string error)
{
_isLoggingIn = false;
RestoreButtons();
- Debug.Log("[LoginPage] 用户取消了 TapTap 登录");
+ Debug.LogError($"[LoginPage] 登录失败:{error}");
}
///
- /// TapTap 登录失败回调
+ /// AuthService 登录取消回调
///
- private void OnTapTapLoginFailed(string error)
+ private void OnAuthLoginCanceled()
{
_isLoggingIn = false;
RestoreButtons();
- Debug.LogError($"[LoginPage] TapTap 登录失败:{error}");
+ Debug.Log("[LoginPage] 用户取消了登录");
}
private void RestoreButtons()
diff --git a/Assets/Scripts/UI/StartPage/StartUIPage.cs b/Assets/Scripts/UI/StartPage/StartUIPage.cs
index 9a9df187..b101c745 100644
--- a/Assets/Scripts/UI/StartPage/StartUIPage.cs
+++ b/Assets/Scripts/UI/StartPage/StartUIPage.cs
@@ -44,7 +44,7 @@ namespace Ichni.UI
AudioManager.Post(AK.EVENTS.TOUCHTOSTART);
// 已有登录缓存 → 跳过 LoginPage,直接进入章节选择
- if (LoginCacheManager.HasCachedLogin)
+ if (LoginCacheManager.HasValidSession)
{
FadeOut();
floatingParticles.GetComponent().material.DOColor(Color.clear, "_BaseColor", 0.5f).Play();
diff --git a/Packages/com.tivadar.best.http/CHANGELOG.md b/Packages/com.tivadar.best.http/CHANGELOG.md
new file mode 100644
index 00000000..057e74f2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/CHANGELOG.md
@@ -0,0 +1,28 @@
+# Changelog
+
+## 3.0.0 (2023-01-01)
+
+__Additions and improvements__
+
+- New namespace hierarchy.
+- Added [DNSCache](https://bestdocshub.pages.dev/Shared/DNS/dns-cache.md) implementation to speed up consecutive connection processes.
+- Added support for [DNSCache](https://bestdocshub.pages.dev/HTTP/api-reference/Cache/DNSCache.md) to manually store and retrieve entries.
+- Added new [Negotiator](https://bestdocshub.pages.dev/HTTP/api-reference/Tcp/Negotiator.md) class help building new plugins that doesn't use HTTP, but require the same lower-level infrastructure.
+- Added new [TCPRingmaster](https://bestdocshub.pages.dev/HTTP/api-reference/Tcp/TCPRingmaster.md) class to speed up TCP connection process by sending out multiple tcp connection requests and use the first connected one.
+- Reimplemented connection logic to use the new DNS cache, negotiator and tcp-ringmaster.
+- Reimplemented network read and write operations. Instead of blocking Reads&Writes, now the plugin uses non-blocking functions. This enabled implementing new ways for downloads and uploads. There's forward and backward feedback between the low level tcp layer and higher level connection layers. If the [download-stream](https://bestdocshub.pages.dev/HTTP/api-reference/Response/DownloadContentStream.md)'s buffer is full, it can notify the tcp layer that it can resume receiving from the server.
+- Reimplemented [HTTPCache](https://bestdocshub.pages.dev/HTTP/api-reference/Caching/HTTPCache.md), it's got more robust and future proof.
+- (#69) Now it's possible and easy to populate the local HTTP cache.
+- Added new, cleaner samples for both old and new features.
+- Halved active threads per connections.
+- Added [Memory](https://bestdocshub.pages.dev/Shared/Profiler/memory.md) and [Network](https://bestdocshub.pages.dev/Shared/Profiler/memory.md) profilers.
+
+__Removals__
+
+- Removed old, cluttered samples.
+
+__Fixes__
+
+- Fixed chaos around different upload sources (RawData, Forms, UploadStream) and unified them in one [UploadStream](https://bestdocshub.pages.dev/HTTP/getting-started/uploads.md).
+
+For API changes and upgrade guides see the [Upgrade Guide topic](https://bestdocshub.pages.dev/HTTP/upgrade-guide.md).
\ No newline at end of file
diff --git a/Packages/com.tivadar.best.http/CHANGELOG.md.meta b/Packages/com.tivadar.best.http/CHANGELOG.md.meta
new file mode 100644
index 00000000..45d3bd55
--- /dev/null
+++ b/Packages/com.tivadar.best.http/CHANGELOG.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: a17df9b0515742b44b02487fd902a50a
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Editor.meta b/Packages/com.tivadar.best.http/Editor.meta
new file mode 100644
index 00000000..3ac8603b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: de19425b9f4e6b244a8fce52c1b74253
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Editor/Profiler.meta b/Packages/com.tivadar.best.http/Editor/Profiler.meta
new file mode 100644
index 00000000..175b870b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor/Profiler.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a1b9757b08647fd429fb2d3a504d3788
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Editor/Profiler/Memory.meta b/Packages/com.tivadar.best.http/Editor/Profiler/Memory.meta
new file mode 100644
index 00000000..4dcf2359
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor/Profiler/Memory.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ee6898caa8b437445b91ccde35286fae
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Editor/Profiler/Memory/MemoryStatsProfilerModule.cs b/Packages/com.tivadar.best.http/Editor/Profiler/Memory/MemoryStatsProfilerModule.cs
new file mode 100644
index 00000000..ffffec5f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor/Profiler/Memory/MemoryStatsProfilerModule.cs
@@ -0,0 +1,25 @@
+#if BESTHTTP_PROFILE && UNITY_2021_2_OR_NEWER
+using Best.HTTP.Profiler.Memory;
+
+using Unity.Profiling.Editor;
+
+namespace Best.HTTP.Editor.Profiler.Memory
+{
+ [System.Serializable]
+ [ProfilerModuleMetadata(MemoryStats.CategoryName)]
+ public sealed class MemoryStatsProfilerModule : ProfilerModule
+ {
+ static readonly ProfilerCounterDescriptor[] k_Counters =
+ {
+ new ProfilerCounterDescriptor(MemoryStats.BorrowedName, MemoryStats.Category),
+ new ProfilerCounterDescriptor(MemoryStats.PooledName, MemoryStats.Category),
+ new ProfilerCounterDescriptor(MemoryStats.CacheHitsName, MemoryStats.Category),
+ new ProfilerCounterDescriptor(MemoryStats.ArrayAllocationsName, MemoryStats.Category)
+ };
+
+ public MemoryStatsProfilerModule() : base(k_Counters)
+ {
+ }
+ }
+}
+#endif
diff --git a/Packages/com.tivadar.best.http/Editor/Profiler/Memory/MemoryStatsProfilerModule.cs.meta b/Packages/com.tivadar.best.http/Editor/Profiler/Memory/MemoryStatsProfilerModule.cs.meta
new file mode 100644
index 00000000..22e6c966
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor/Profiler/Memory/MemoryStatsProfilerModule.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a27483e3bb01d5546bd803c92f53c77f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Editor/Profiler/Network.meta b/Packages/com.tivadar.best.http/Editor/Profiler/Network.meta
new file mode 100644
index 00000000..5e07dbeb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor/Profiler/Network.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1e4f967529f18d5439bc00808ed1f326
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Editor/Profiler/Network/NetworkStatsProfilerModule.cs b/Packages/com.tivadar.best.http/Editor/Profiler/Network/NetworkStatsProfilerModule.cs
new file mode 100644
index 00000000..e4549fe7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor/Profiler/Network/NetworkStatsProfilerModule.cs
@@ -0,0 +1,34 @@
+#if BESTHTTP_PROFILE && UNITY_2021_2_OR_NEWER
+using Unity.Profiling.Editor;
+
+using Best.HTTP.Profiler.Network;
+
+namespace Best.HTTP.Editor.Profiler.Network
+{
+ [System.Serializable]
+ [ProfilerModuleMetadata(NetworkStats.CategoryName)]
+ public sealed class NetworkStatsProfilerModule : ProfilerModule
+ {
+ static readonly ProfilerCounterDescriptor[] k_Counters =
+ {
+ new ProfilerCounterDescriptor(NetworkStats.BufferedToSendName, NetworkStats.Category),
+ new ProfilerCounterDescriptor(NetworkStats.SentSinceLastFrameName, NetworkStats.Category),
+ new ProfilerCounterDescriptor(NetworkStats.SentTotalName, NetworkStats.Category),
+
+ new ProfilerCounterDescriptor(NetworkStats.ReceivedAndUnprocessedName, NetworkStats.Category),
+ new ProfilerCounterDescriptor(NetworkStats.ReceivedSinceLastFrameName, NetworkStats.Category),
+ new ProfilerCounterDescriptor(NetworkStats.ReceivedTotalName, NetworkStats.Category),
+
+ new ProfilerCounterDescriptor(NetworkStats.OpenConnectionsName, NetworkStats.Category),
+ new ProfilerCounterDescriptor(NetworkStats.TotalConnectionsName, NetworkStats.Category),
+
+ new ProfilerCounterDescriptor(NetworkStats.TotalDNSCacheHits, NetworkStats.Category),
+ new ProfilerCounterDescriptor(NetworkStats.TotalDNSCacheMiss, NetworkStats.Category),
+ };
+
+ public NetworkStatsProfilerModule() : base(k_Counters)
+ {
+ }
+ }
+}
+#endif
diff --git a/Packages/com.tivadar.best.http/Editor/Profiler/Network/NetworkStatsProfilerModule.cs.meta b/Packages/com.tivadar.best.http/Editor/Profiler/Network/NetworkStatsProfilerModule.cs.meta
new file mode 100644
index 00000000..e3b1433f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor/Profiler/Network/NetworkStatsProfilerModule.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 997070aa1f569c44ab6386e5a3b8c075
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Editor/Profiler/com.Tivadar.Best.HTTP.Profiler.Editor.asmdef b/Packages/com.tivadar.best.http/Editor/Profiler/com.Tivadar.Best.HTTP.Profiler.Editor.asmdef
new file mode 100644
index 00000000..f50cad58
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor/Profiler/com.Tivadar.Best.HTTP.Profiler.Editor.asmdef
@@ -0,0 +1,25 @@
+{
+ "name": "com.Tivadar.Best.HTTP.Profiler.Editor",
+ "rootNamespace": "",
+ "references": [
+ "GUID:b46779583a009f04ba9f5f31d0e7e6ac",
+ "GUID:9069ac25d95ca17448a247f3bb1c769f"
+ ],
+ "includePlatforms": [
+ "Editor"
+ ],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": false,
+ "defineConstraints": [],
+ "versionDefines": [
+ {
+ "name": "com.unity.profiling.core",
+ "expression": "1.0.0",
+ "define": "BESTHTTP_PROFILE"
+ }
+ ],
+ "noEngineReferences": false
+}
\ No newline at end of file
diff --git a/Packages/com.tivadar.best.http/Editor/Profiler/com.Tivadar.Best.HTTP.Profiler.Editor.asmdef.meta b/Packages/com.tivadar.best.http/Editor/Profiler/com.Tivadar.Best.HTTP.Profiler.Editor.asmdef.meta
new file mode 100644
index 00000000..2350cd4c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Editor/Profiler/com.Tivadar.Best.HTTP.Profiler.Editor.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: f5172b08096bc564e960c6b5e420e790
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/LICENSE.md b/Packages/com.tivadar.best.http/LICENSE.md
new file mode 100644
index 00000000..58d2a045
--- /dev/null
+++ b/Packages/com.tivadar.best.http/LICENSE.md
@@ -0,0 +1 @@
+The plugin's license falls under the Unity Asset Store EULA that can be found here under Appendix 1: https://unity3d.com/legal/as_terms
\ No newline at end of file
diff --git a/Packages/com.tivadar.best.http/LICENSE.md.meta b/Packages/com.tivadar.best.http/LICENSE.md.meta
new file mode 100644
index 00000000..8627e130
--- /dev/null
+++ b/Packages/com.tivadar.best.http/LICENSE.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: a2e6e996ec793e84fa9174fa8769cc7f
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/README.md b/Packages/com.tivadar.best.http/README.md
new file mode 100644
index 00000000..5cd2c7ac
--- /dev/null
+++ b/Packages/com.tivadar.best.http/README.md
@@ -0,0 +1,85 @@
+Best HTTP is a comprehensive networking library for Unity that empowers developers to make HTTP and HTTPS requests with ease.
+Whether you're building web applications, multiplayer games, or real-time communication solutions, Best HTTP has got you covered.
+
+## Overview
+In today's digital era, efficient and reliable web communication forms the backbone of many applications.
+Whether you're fetching data from remote servers, sending game scores, or updating user profiles, HTTP requests are indispensable.
+Recognizing the multifaceted needs of Unity developers, Best HTTP is designed to simplify these interactions, providing a streamlined and efficient means to handle web-based communication.
+
+## Key Features
+- **Supported Unity Versions**: Best HTTP is compatible with Unity versions starting from :fontawesome-brands-unity: **2021.1 onwards**.
+- **Cross-Platform:** Best HTTP is designed to work seamlessly across a diverse range of Unity platforms, ensuring versatility for all your development needs. Specifically, it supports:
+ - :fontawesome-solid-desktop: **Desktop**: Windows, Linux, MacOS
+ - :fontawesome-solid-mobile: **Mobile**: iOS, Android
+ - :material-microsoft-windows: **Universal Windows Platform** (UWP)
+ - :material-web: **Web Browsers**: WebGL
+
+ This broad platform support means you can confidently use Best HTTP, regardless of your target audience or deployment strategy.
+
+- **Versatile Request Outcome Handling**: Best HTTP ensures flexibility in managing network request outcomes to seamlessly fit within your development style and the varied structures of different applications:
+ - **Traditional Callbacks:** Adopt the classic approach with regular C# callbacks. Ideal for those who prefer traditional programming patterns, allowing for simple and straightforward handling of responses.
+ - **Unity Coroutines:** For those who are deeply integrated with Unity's workflow, Best HTTP provides native support for Unity's coroutines. This facilitates non-blocking operations while keeping the code structure clean and readable, particularly when sequencing multiple network requests.
+ - **Async-Await Pattern:** Embrace the modern C# asynchronous programming paradigm with the async-await pattern. Best HTTP's support for this ensures that developers can write non-blocking code in a linear fashion, greatly simplifying error handling and state management for asynchronous operations.
+
+ With these diverse options for request outcome handling, developers can choose the best approach that aligns with their project requirements and personal coding preferences.
+
+- **HTTP/HTTPS Support**: Best HTTP supports both HTTP and HTTPS protocols, ensuring secure communication for your applications.
+- **HTTP/2 Support**: Benefit from the advantages of HTTP/2, including faster loading times, reduced latency and **trailing headers** for advanced scenarios like **GRPC**.
+- **Caching**: Implement efficient caching mechanisms to reduce redundant network requests, optimizing your application's performance and data usage.
+- **Authentication**: Easily handle various authentication methods, such as Basic, Digest, and Bearer token authentication.
+- **Cookie Management**: Manage cookies effortlessly, ensuring smooth user experiences in web applications.
+- **Compression**: Compress and decompress data using gzip and deflate algorithms to save bandwidth and improve loading times.
+- **Streaming**: Best HTTP supports streaming for both downloads and uploads. This enables you to stream large files and responses directly to storage when downloading, and stream data from storage when uploading, effectively avoiding memory bottlenecks.
+- **Customization**: Tailor your HTTP requests with customizable headers, timeouts, and other parameters to meet your specific needs.
+- **Built-In Profiler Support**: Best HTTP now comes with a built-in profiler, ensuring developers have direct access to critical insights without the need for external tools.
+This enhancement is instrumental in understanding the performance and network behavior of your application, thereby facilitating optimization and debugging. Key features of the built-in profiler include:
+ - **Memory Profiler:** Dive into the library's internal memory usage. This tool is invaluable for ensuring optimal memory management and for identifying potential bottlenecks or leaks.
+ - **Network Profiler:** This profiler allows for a granular analysis of your network operations. Notable features include:
+ - **Byte Tracking:** Monitor the bytes sent and received between two frames, providing a clear overview of data transfers and insight into traffic patterns.
+ - **Connection Analysis:** Stay informed on the total number of open and closed connections. This data gives a transparent view of your app's network activity.
+ - **DNS Cache Profiling:** With this feature, you can track DNS cache hits and misses, aiding in the fine-tuning of DNS cache strategies and understanding potential network resolution delays.
+
+ With the integration of this built-in profiler support, developers can not only ensure that their application's network activities are optimized but also make data-driven decisions that enhance both performance and user experience.
+
+## Installation Guide
+
+Getting started with Best HTTP is straightforward.
+Depending on your preference, you can either install the package via the Unity Asset Store or use a .unitypackage.
+Below are step-by-step guides for both methods:
+
+### Installing from the Unity Asset Store using the Package Manager Window
+
+1. **Purchase:** If you haven't previously purchased the package, proceed to do so. Once purchased, Unity will recognize your purchase, and you can install the package directly from within the Unity Editor. If you already own the package, you can skip these steps.
+ 1. **Visit the Unity Asset Store:** Using your preferred web browser, navigate to the [Unity Asset Store](https://assetstore.unity.com/publishers/4137?aid=1101lfX8E).
+ 2. **Search for Best HTTP:** Locate and choose the official Best HTTP package.
+ 3. **Buy Best HTTP:** By clicking on the `Buy Now` button go though the purchase process.
+2. **Open Unity & Access the Package Manager:** Launch Unity and open your desired project. Navigate to [Window > Package Manager](https://docs.unity3d.com/Manual/upm-ui.html).
+3. **Select 'My Assets':** In the Package Manager window, switch to the [My Assets](https://docs.unity3d.com/Manual/upm-ui-import.html) tab. This will show all assets you have access to, including ones you've purchased or added to your Asset Store account.
+4. **Find Best HTTP and Download:** Locate "Best HTTP" in the list. Once found, click on it to view the details. If the package isn't already downloaded, you'll see a Download button. Click this button and wait for the package to download. Once downloaded, the button will change to Import.
+5. **Import the Package:** After downloading, click the Import button. Unity will then show you a list of all the assets associated with the Best HTTP package. Ensure all assets are checked and click Import.
+6. **Confirmation:** Upon importing, Best HTTP will be added to your project, indicating a successful installation.
+
+### Installing from a .unitypackage file
+
+In some cases you might have a .unitypackage file containing the plugin.
+
+1. **Download the .unitypackage:** Ensure you have the Best HTTP.unitypackage file saved on your computer. This might be from a direct download link or an email attachment, depending on how it was distributed.
+2. **Import into Unity:** Launch Unity and open your project. Go to Assets > Import Package > Custom Package.
+3. **Locate and Select the .unitypackage:** Navigate to the location where you saved the Best HTTP.unitypackage file. Select it and click Open.
+4. **Review and Import:** Unity will show you a list of all the assets contained in the package. Make sure all assets are selected and click Import.
+5. **Confirmation:** After importing, you should see all the Best HTTP assets added to your project's Asset folder, confirming a successful installation.
+
+!!! Note
+ Best HTTP also supports other installation methods as documented in Unity's manual for packages.
+ For more advanced installation options, refer to the Unity Manual on [Sharing Packages](https://docs.unity3d.com/Manual/cus-share.html).
+
+### Assembly Definitions and Runtime References
+For developers familiar with Unity's development patterns, it's essential to understand how Best HTTP incorporates Unity's systems:
+
+- **Assembly Definition Files:** Best HTTP incorporates [Unity's Assembly Definition files](https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html). It aids in organizing and managing the codebase efficiently.
+- **Auto-Referencing of Runtime DLLs:** The runtime DLLs produced by Best HTTP are [Auto Referenced](https://docs.unity3d.com/Manual/class-AssemblyDefinitionImporter.html), allowing Unity to automatically recognize and utilize them without manual intervention.
+- **Manual Package Referencing:** Should you need to reference Best HTTP manually in your project (for advanced setups or specific use cases), you can do so. Simply [reference the package](https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html#reference-another-assembly) by searching for `com.Tivadar.Best.HTTP`.
+
+That's it! You've now successfully installed Best HTTP in your Unity project. Dive into the [Getting Started guide](getting-started/index.md) to begin your journey with Best HTTP.
+
+If you encounter any issues or need further assistance, please visit our [Community and Support page](../Shared/support.md).
\ No newline at end of file
diff --git a/Packages/com.tivadar.best.http/README.md.meta b/Packages/com.tivadar.best.http/README.md.meta
new file mode 100644
index 00000000..abe30877
--- /dev/null
+++ b/Packages/com.tivadar.best.http/README.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d945ceaee22ec124ea21e8924d1780f9
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime.meta b/Packages/com.tivadar.best.http/Runtime.meta
new file mode 100644
index 00000000..c7bfd574
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 547ae4cc6dd99314dab4bd761faa6802
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty.meta
new file mode 100644
index 00000000..39b72f8c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2720467a1ae4cdb4c949d469c1827cc2
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle.meta
new file mode 100644
index 00000000..28fdb9c2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 262d190881d534841b89c75741207e22
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/License.txt b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/License.txt
new file mode 100644
index 00000000..96e67d58
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/License.txt
@@ -0,0 +1,7 @@
+Copyright (c) 2000 - 2017 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/License.txt.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/License.txt.meta
new file mode 100644
index 00000000..74f1c3fb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/License.txt.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: deffb42883fe27b4c833e8617deec47f
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1.meta
new file mode 100644
index 00000000..74859783
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 95944b65ba7736c42b16376b8a546a47
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1Generator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1Generator.cs
new file mode 100644
index 00000000..d6486cfb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1Generator.cs
@@ -0,0 +1,32 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class Asn1Generator
+ {
+ private Stream _out;
+
+ protected Asn1Generator(
+ Stream outStream)
+ {
+ _out = outStream;
+ }
+
+ protected Stream Out
+ {
+ get { return _out; }
+ }
+
+ public abstract void AddObject(Asn1Encodable obj);
+
+ public abstract void AddObject(Asn1Object obj);
+
+ public abstract Stream GetRawOutputStream();
+
+ public abstract void Close();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1Generator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1Generator.cs.meta
new file mode 100644
index 00000000..400fedcc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1Generator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7773fea4f16e26d4480e20f8df896c7f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1OctetStringParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1OctetStringParser.cs
new file mode 100644
index 00000000..758ba1f9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1OctetStringParser.cs
@@ -0,0 +1,17 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public interface Asn1OctetStringParser
+ : IAsn1Convertible
+ {
+ /// Return the content of the OCTET STRING as a .
+ /// A represnting the OCTET STRING's content.
+ Stream GetOctetStream();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1OctetStringParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1OctetStringParser.cs.meta
new file mode 100644
index 00000000..3459b430
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1OctetStringParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 106a99bb8c6b6c046b7a5d3f6dc106a2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SequenceParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SequenceParser.cs
new file mode 100644
index 00000000..01bcc539
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SequenceParser.cs
@@ -0,0 +1,12 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public interface Asn1SequenceParser
+ : IAsn1Convertible
+ {
+ IAsn1Convertible ReadObject();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SequenceParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SequenceParser.cs.meta
new file mode 100644
index 00000000..c2489180
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SequenceParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a5d90107b1bb70649bd933287abb52a6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SetParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SetParser.cs
new file mode 100644
index 00000000..42e184fe
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SetParser.cs
@@ -0,0 +1,12 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public interface Asn1SetParser
+ : IAsn1Convertible
+ {
+ IAsn1Convertible ReadObject();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SetParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SetParser.cs.meta
new file mode 100644
index 00000000..b896c0c6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1SetParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2d056b261f918f64b8a91a610ceb8702
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1StreamParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1StreamParser.cs
new file mode 100644
index 00000000..988c2586
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1StreamParser.cs
@@ -0,0 +1,248 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class Asn1StreamParser
+ {
+ private readonly Stream _in;
+ private readonly int _limit;
+
+ private readonly byte[][] tmpBuffers;
+
+ public Asn1StreamParser(Stream input)
+ : this(input, Asn1InputStream.FindLimit(input))
+ {
+ }
+
+ public Asn1StreamParser(byte[] encoding)
+ : this(new MemoryStream(encoding, false), encoding.Length)
+ {
+ }
+
+ public Asn1StreamParser(Stream input, int limit)
+ : this(input, limit, new byte[16][])
+ {
+ }
+
+ internal Asn1StreamParser(Stream input, int limit, byte[][] tmpBuffers)
+ {
+ if (!input.CanRead)
+ throw new ArgumentException("Expected stream to be readable", "input");
+
+ this._in = input;
+ this._limit = limit;
+ this.tmpBuffers = tmpBuffers;
+ }
+
+ public virtual IAsn1Convertible ReadObject()
+ {
+ int tagHdr = _in.ReadByte();
+ if (tagHdr < 0)
+ return null;
+
+ return ImplParseObject(tagHdr);
+ }
+
+ internal IAsn1Convertible ImplParseObject(int tagHdr)
+ {
+ // turn off looking for "00" while we resolve the tag
+ Set00Check(false);
+
+ //
+ // calculate tag number
+ //
+ int tagNo = Asn1InputStream.ReadTagNumber(_in, tagHdr);
+
+ //
+ // calculate length
+ //
+ int length = Asn1InputStream.ReadLength(_in, _limit,
+ tagNo == Asn1Tags.BitString || tagNo == Asn1Tags.OctetString || tagNo == Asn1Tags.Sequence ||
+ tagNo == Asn1Tags.Set || tagNo == Asn1Tags.External);
+
+ if (length < 0) // indefinite-length method
+ {
+ if (0 == (tagHdr & Asn1Tags.Constructed))
+ throw new IOException("indefinite-length primitive encoding encountered");
+
+ IndefiniteLengthInputStream indIn = new IndefiniteLengthInputStream(_in, _limit);
+ Asn1StreamParser sp = new Asn1StreamParser(indIn, _limit, tmpBuffers);
+
+ int tagClass = tagHdr & Asn1Tags.Private;
+ if (0 != tagClass)
+ return new BerTaggedObjectParser(tagClass, tagNo, sp);
+
+ return sp.ParseImplicitConstructedIL(tagNo);
+ }
+ else
+ {
+ DefiniteLengthInputStream defIn = new DefiniteLengthInputStream(_in, length, _limit);
+
+ if (0 == (tagHdr & Asn1Tags.Flags))
+ return ParseImplicitPrimitive(tagNo, defIn);
+
+ Asn1StreamParser sp = new Asn1StreamParser(defIn, defIn.Remaining, tmpBuffers);
+
+ int tagClass = tagHdr & Asn1Tags.Private;
+ if (0 != tagClass)
+ {
+ bool isConstructed = (tagHdr & Asn1Tags.Constructed) != 0;
+
+ return new DLTaggedObjectParser(tagClass, tagNo, isConstructed, sp);
+ }
+
+ return sp.ParseImplicitConstructedDL(tagNo);
+ }
+ }
+
+ internal Asn1Object LoadTaggedDL(int tagClass, int tagNo, bool constructed)
+ {
+ if (!constructed)
+ {
+ byte[] contentsOctets = ((DefiniteLengthInputStream)_in).ToArray();
+ return Asn1TaggedObject.CreatePrimitive(tagClass, tagNo, contentsOctets);
+ }
+
+ Asn1EncodableVector contentsElements = ReadVector();
+ return Asn1TaggedObject.CreateConstructedDL(tagClass, tagNo, contentsElements);
+ }
+
+ internal Asn1Object LoadTaggedIL(int tagClass, int tagNo)
+ {
+ Asn1EncodableVector contentsElements = ReadVector();
+ return Asn1TaggedObject.CreateConstructedIL(tagClass, tagNo, contentsElements);
+ }
+
+ internal IAsn1Convertible ParseImplicitConstructedDL(int univTagNo)
+ {
+ switch (univTagNo)
+ {
+ case Asn1Tags.BitString:
+ // TODO[asn1] DLConstructedBitStringParser
+ return new BerBitStringParser(this);
+ case Asn1Tags.External:
+ return new DerExternalParser(this);
+ case Asn1Tags.OctetString:
+ // TODO[asn1] DLConstructedOctetStringParser
+ return new BerOctetStringParser(this);
+ case Asn1Tags.Set:
+ return new DerSetParser(this);
+ case Asn1Tags.Sequence:
+ return new DerSequenceParser(this);
+ default:
+ throw new Asn1Exception("unknown DL object encountered: 0x" + univTagNo.ToString("X"));
+ }
+ }
+
+ internal IAsn1Convertible ParseImplicitConstructedIL(int univTagNo)
+ {
+ switch (univTagNo)
+ {
+ case Asn1Tags.BitString:
+ return new BerBitStringParser(this);
+ case Asn1Tags.External:
+ // TODO[asn1] BERExternalParser
+ return new DerExternalParser(this);
+ case Asn1Tags.OctetString:
+ return new BerOctetStringParser(this);
+ case Asn1Tags.Sequence:
+ return new BerSequenceParser(this);
+ case Asn1Tags.Set:
+ return new BerSetParser(this);
+ default:
+ throw new Asn1Exception("unknown BER object encountered: 0x" + univTagNo.ToString("X"));
+ }
+ }
+
+ internal IAsn1Convertible ParseImplicitPrimitive(int univTagNo)
+ {
+ return ParseImplicitPrimitive(univTagNo, (DefiniteLengthInputStream)_in);
+ }
+
+ internal IAsn1Convertible ParseImplicitPrimitive(int univTagNo, DefiniteLengthInputStream defIn)
+ {
+ // Some primitive encodings can be handled by parsers too...
+ switch (univTagNo)
+ {
+ case Asn1Tags.BitString:
+ return new DLBitStringParser(defIn);
+ case Asn1Tags.External:
+ throw new Asn1Exception("externals must use constructed encoding (see X.690 8.18)");
+ case Asn1Tags.OctetString:
+ return new DerOctetStringParser(defIn);
+ case Asn1Tags.Set:
+ throw new Asn1Exception("sequences must use constructed encoding (see X.690 8.9.1/8.10.1)");
+ case Asn1Tags.Sequence:
+ throw new Asn1Exception("sets must use constructed encoding (see X.690 8.11.1/8.12.1)");
+ }
+
+ try
+ {
+ return Asn1InputStream.CreatePrimitiveDerObject(univTagNo, defIn, tmpBuffers);
+ }
+ catch (ArgumentException e)
+ {
+ throw new Asn1Exception("corrupted stream detected", e);
+ }
+ }
+
+ internal IAsn1Convertible ParseObject(int univTagNo)
+ {
+ if (univTagNo < 0 || univTagNo > 30)
+ throw new ArgumentException("invalid universal tag number: " + univTagNo, "univTagNo");
+
+ int tagHdr = _in.ReadByte();
+ if (tagHdr < 0)
+ return null;
+
+ if ((tagHdr & ~Asn1Tags.Constructed) != univTagNo)
+ throw new IOException("unexpected identifier encountered: " + tagHdr);
+
+ return ImplParseObject(tagHdr);
+ }
+
+ internal Asn1TaggedObjectParser ParseTaggedObject()
+ {
+ int tagHdr = _in.ReadByte();
+ if (tagHdr< 0)
+ return null;
+
+ int tagClass = tagHdr & Asn1Tags.Private;
+ if (0 == tagClass)
+ throw new Asn1Exception("no tagged object found");
+
+ return (Asn1TaggedObjectParser)ImplParseObject(tagHdr);
+ }
+
+ // TODO[asn1] Prefer 'LoadVector'
+ internal Asn1EncodableVector ReadVector()
+ {
+ int tagHdr = _in.ReadByte();
+ if (tagHdr < 0)
+ return new Asn1EncodableVector(0);
+
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ do
+ {
+ IAsn1Convertible obj = ImplParseObject(tagHdr);
+
+ v.Add(obj.ToAsn1Object());
+ }
+ while ((tagHdr = _in.ReadByte()) >= 0);
+ return v;
+ }
+
+ private void Set00Check(bool enabled)
+ {
+ if (_in is IndefiniteLengthInputStream indef)
+ {
+ indef.SetEofOn00(enabled);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1StreamParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1StreamParser.cs.meta
new file mode 100644
index 00000000..8cecf430
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1StreamParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2ba3873ab071c0c4cb935177f746056d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1TaggedObjectParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1TaggedObjectParser.cs
new file mode 100644
index 00000000..9980b489
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1TaggedObjectParser.cs
@@ -0,0 +1,39 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public interface Asn1TaggedObjectParser
+ : IAsn1Convertible
+ {
+ int TagClass { get; }
+
+ int TagNo { get; }
+
+ bool HasContextTag(int tagNo);
+
+ bool HasTag(int tagClass, int tagNo);
+
+ ///
+ IAsn1Convertible ParseBaseUniversal(bool declaredExplicit, int baseTagNo);
+
+ /// Needed for open types, until we have better type-guided parsing support.
+ ///
+ /// Use sparingly for other purposes, and prefer or
+ /// where possible. Before using, check for matching tag
+ /// class and number .
+ ///
+ ///
+ IAsn1Convertible ParseExplicitBaseObject();
+
+ ///
+ Asn1TaggedObjectParser ParseExplicitBaseTagged();
+
+ ///
+ Asn1TaggedObjectParser ParseImplicitBaseTagged(int baseTagClass, int baseTagNo);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1TaggedObjectParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1TaggedObjectParser.cs.meta
new file mode 100644
index 00000000..e12ce022
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ASN1TaggedObjectParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ea10709a890a7a246bd1f3dd49c4a30f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1BitStringParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1BitStringParser.cs
new file mode 100644
index 00000000..8b7e4317
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1BitStringParser.cs
@@ -0,0 +1,36 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public interface Asn1BitStringParser
+ : IAsn1Convertible
+ {
+ /// Return a representing the contents of the BIT STRING. The final byte, if any,
+ /// may include pad bits. See .
+ /// A with its source as the BIT STRING content.
+ ///
+ Stream GetBitStream();
+
+ /// Return a representing the contents of the BIT STRING, where the content is
+ /// expected to be octet-aligned (this will be automatically checked during parsing).
+ /// A with its source as the BIT STRING content.
+ ///
+ Stream GetOctetStream();
+
+ /// Return the number of pad bits, if any, in the final byte, if any, read from
+ /// .
+ ///
+ /// This number is in the range zero to seven. That number of the least significant bits of the final byte, if
+ /// any, are not part of the contents and should be ignored. NOTE: Must be called AFTER the stream has been
+ /// fully processed. (Does not need to be called if was used instead of
+ /// .
+ ///
+ /// The number of pad bits. In the range zero to seven.
+ int PadBits { get; }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1BitStringParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1BitStringParser.cs.meta
new file mode 100644
index 00000000..701503cd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1BitStringParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8af37adf1ddd05d40a2f5b914eb19ca0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Encodable.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Encodable.cs
new file mode 100644
index 00000000..368176a1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Encodable.cs
@@ -0,0 +1,80 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class Asn1Encodable
+ : IAsn1Convertible
+ {
+ public const string Der = "DER";
+ public const string Ber = "BER";
+
+ public virtual void EncodeTo(Stream output)
+ {
+ ToAsn1Object().EncodeTo(output);
+ }
+
+ public virtual void EncodeTo(Stream output, string encoding)
+ {
+ ToAsn1Object().EncodeTo(output, encoding);
+ }
+
+ public byte[] GetEncoded()
+ {
+ MemoryStream bOut = new MemoryStream();
+ ToAsn1Object().EncodeTo(bOut);
+ return bOut.ToArray();
+ }
+
+ public byte[] GetEncoded(string encoding)
+ {
+ MemoryStream bOut = new MemoryStream();
+ ToAsn1Object().EncodeTo(bOut, encoding);
+ return bOut.ToArray();
+ }
+
+ /**
+ * Return the DER encoding of the object, null if the DER encoding can not be made.
+ *
+ * @return a DER byte array, null otherwise.
+ */
+ public byte[] GetDerEncoded()
+ {
+ try
+ {
+ return GetEncoded(Der);
+ }
+ catch (IOException)
+ {
+ return null;
+ }
+ }
+
+ public sealed override int GetHashCode()
+ {
+ return ToAsn1Object().CallAsn1GetHashCode();
+ }
+
+ public sealed override bool Equals(
+ object obj)
+ {
+ if (obj == this)
+ return true;
+
+ IAsn1Convertible other = obj as IAsn1Convertible;
+
+ if (other == null)
+ return false;
+
+ Asn1Object o1 = ToAsn1Object();
+ Asn1Object o2 = other.ToAsn1Object();
+
+ return o1 == o2 || (null != o2 && o1.CallAsn1Equals(o2));
+ }
+
+ public abstract Asn1Object ToAsn1Object();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Encodable.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Encodable.cs.meta
new file mode 100644
index 00000000..2900e87c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Encodable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c60cf771c6932a640bfc69beb96b1752
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1EncodableVector.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1EncodableVector.cs
new file mode 100644
index 00000000..b9756d02
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1EncodableVector.cs
@@ -0,0 +1,248 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * Mutable class for building ASN.1 constructed objects such as SETs or SEQUENCEs.
+ */
+ public class Asn1EncodableVector
+ : IEnumerable
+ {
+ internal static readonly Asn1Encodable[] EmptyElements = new Asn1Encodable[0];
+
+ private const int DefaultCapacity = 10;
+
+ private Asn1Encodable[] elements;
+ private int elementCount;
+ private bool copyOnWrite;
+
+ public static Asn1EncodableVector FromEnumerable(IEnumerable e)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ foreach (Asn1Encodable obj in e)
+ {
+ v.Add(obj);
+ }
+ return v;
+ }
+
+ public Asn1EncodableVector()
+ : this(DefaultCapacity)
+ {
+ }
+
+ public Asn1EncodableVector(int initialCapacity)
+ {
+ if (initialCapacity < 0)
+ throw new ArgumentException("must not be negative", "initialCapacity");
+
+ this.elements = (initialCapacity == 0) ? EmptyElements : new Asn1Encodable[initialCapacity];
+ this.elementCount = 0;
+ this.copyOnWrite = false;
+ }
+
+ public Asn1EncodableVector(Asn1Encodable element)
+ : this()
+ {
+ Add(element);
+ }
+
+ public Asn1EncodableVector(Asn1Encodable element1, Asn1Encodable element2)
+ : this()
+ {
+ Add(element1);
+ Add(element2);
+ }
+
+ public Asn1EncodableVector(params Asn1Encodable[] v)
+ : this()
+ {
+ Add(v);
+ }
+
+ public void Add(Asn1Encodable element)
+ {
+ if (null == element)
+ throw new ArgumentNullException("element");
+
+ int capacity = elements.Length;
+ int minCapacity = elementCount + 1;
+ if ((minCapacity > capacity) | copyOnWrite)
+ {
+ Reallocate(minCapacity);
+ }
+
+ this.elements[elementCount] = element;
+ this.elementCount = minCapacity;
+ }
+
+ public void Add(Asn1Encodable element1, Asn1Encodable element2)
+ {
+ Add(element1);
+ Add(element2);
+ }
+
+ public void Add(params Asn1Encodable[] objs)
+ {
+ foreach (Asn1Encodable obj in objs)
+ {
+ Add(obj);
+ }
+ }
+
+ public void AddOptional(Asn1Encodable element)
+ {
+ if (element != null)
+ {
+ Add(element);
+ }
+ }
+
+ public void AddOptional(Asn1Encodable element1, Asn1Encodable element2)
+ {
+ if (element1 != null)
+ {
+ Add(element1);
+ }
+ if (element2 != null)
+ {
+ Add(element2);
+ }
+ }
+
+ public void AddOptional(params Asn1Encodable[] elements)
+ {
+ if (elements != null)
+ {
+ foreach (var element in elements)
+ {
+ if (element != null)
+ {
+ Add(element);
+ }
+ }
+ }
+ }
+
+ public void AddOptionalTagged(bool isExplicit, int tagNo, Asn1Encodable obj)
+ {
+ if (null != obj)
+ {
+ Add(new DerTaggedObject(isExplicit, tagNo, obj));
+ }
+ }
+
+ public void AddOptionalTagged(bool isExplicit, int tagClass, int tagNo, Asn1Encodable obj)
+ {
+ if (null != obj)
+ {
+ Add(new DerTaggedObject(isExplicit, tagClass, tagNo, obj));
+ }
+ }
+
+ public void AddAll(Asn1EncodableVector other)
+ {
+ if (null == other)
+ throw new ArgumentNullException("other");
+
+ int otherElementCount = other.Count;
+ if (otherElementCount < 1)
+ return;
+
+ int capacity = elements.Length;
+ int minCapacity = elementCount + otherElementCount;
+ if ((minCapacity > capacity) | copyOnWrite)
+ {
+ Reallocate(minCapacity);
+ }
+
+ int i = 0;
+ do
+ {
+ Asn1Encodable otherElement = other[i];
+ if (null == otherElement)
+ throw new NullReferenceException("'other' elements cannot be null");
+
+ this.elements[elementCount + i] = otherElement;
+ }
+ while (++i < otherElementCount);
+
+ this.elementCount = minCapacity;
+ }
+
+ public Asn1Encodable this[int index]
+ {
+ get
+ {
+ if (index >= elementCount)
+ throw new IndexOutOfRangeException(index + " >= " + elementCount);
+
+ return elements[index];
+ }
+ }
+
+ public int Count
+ {
+ get { return elementCount; }
+ }
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ IEnumerable e = CopyElements();
+ return e.GetEnumerator();
+ }
+
+ internal Asn1Encodable[] CopyElements()
+ {
+ if (0 == elementCount)
+ return EmptyElements;
+
+ Asn1Encodable[] copy = new Asn1Encodable[elementCount];
+ Array.Copy(elements, 0, copy, 0, elementCount);
+ return copy;
+ }
+
+ internal Asn1Encodable[] TakeElements()
+ {
+ if (0 == elementCount)
+ return EmptyElements;
+
+ if (elements.Length == elementCount)
+ {
+ this.copyOnWrite = true;
+ return elements;
+ }
+
+ Asn1Encodable[] copy = new Asn1Encodable[elementCount];
+ Array.Copy(elements, 0, copy, 0, elementCount);
+ return copy;
+ }
+
+ private void Reallocate(int minCapacity)
+ {
+ int oldCapacity = elements.Length;
+ int newCapacity = System.Math.Max(oldCapacity, minCapacity + (minCapacity >> 1));
+
+ Asn1Encodable[] copy = new Asn1Encodable[newCapacity];
+ Array.Copy(elements, 0, copy, 0, elementCount);
+
+ this.elements = copy;
+ this.copyOnWrite = false;
+ }
+
+ internal static Asn1Encodable[] CloneElements(Asn1Encodable[] elements)
+ {
+ return elements.Length < 1 ? EmptyElements : (Asn1Encodable[])elements.Clone();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1EncodableVector.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1EncodableVector.cs.meta
new file mode 100644
index 00000000..56b16f76
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1EncodableVector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c5ecb82d71ebb494b879cd2f66a4e8b9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Exception.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Exception.cs
new file mode 100644
index 00000000..8dfc21c6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Exception.cs
@@ -0,0 +1,35 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+using System.Runtime.Serialization;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ [Serializable]
+ public class Asn1Exception
+ : IOException
+ {
+ public Asn1Exception()
+ : base()
+ {
+ }
+
+ public Asn1Exception(string message)
+ : base(message)
+ {
+ }
+
+ public Asn1Exception(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ }
+
+ protected Asn1Exception(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Exception.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Exception.cs.meta
new file mode 100644
index 00000000..5fc2e7b7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Exception.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c5b82b2e9c2a14f4aa25260784d5f222
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1GeneralizedTime.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1GeneralizedTime.cs
new file mode 100644
index 00000000..610bd1a1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1GeneralizedTime.cs
@@ -0,0 +1,266 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Globalization;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /// GeneralizedTime ASN.1 type
+ public class Asn1GeneralizedTime
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(Asn1GeneralizedTime), Asn1Tags.GeneralizedTime) { }
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ public static Asn1GeneralizedTime GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is Asn1GeneralizedTime asn1GeneralizedTime)
+ return asn1GeneralizedTime;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is Asn1GeneralizedTime converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (Asn1GeneralizedTime)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct generalized time from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ public static Asn1GeneralizedTime GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (Asn1GeneralizedTime)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly string m_timeString;
+ private readonly bool m_timeStringCanonical;
+ private readonly DateTime m_dateTime;
+
+ public Asn1GeneralizedTime(string timeString)
+ {
+ m_timeString = timeString ?? throw new ArgumentNullException(nameof(timeString));
+ m_timeStringCanonical = false; // TODO Dynamic check?
+
+ try
+ {
+ m_dateTime = FromString(timeString);
+ }
+ catch (FormatException e)
+ {
+ throw new ArgumentException("invalid date string: " + e.Message);
+ }
+ }
+
+ public Asn1GeneralizedTime(DateTime dateTime)
+ {
+ dateTime = dateTime.ToUniversalTime();
+
+ m_dateTime = dateTime;
+ m_timeString = ToStringCanonical(dateTime);
+ m_timeStringCanonical = true;
+ }
+
+ // TODO TimeZoneInfo or other locale-specific constructors?
+
+ internal Asn1GeneralizedTime(byte[] contents)
+ : this(Encoding.ASCII.GetString(contents))
+ {
+ }
+
+ public string TimeString => m_timeString;
+
+ public DateTime ToDateTime()
+ {
+ return m_dateTime;
+ }
+
+ internal byte[] GetContents(int encoding)
+ {
+ if (encoding == Asn1OutputStream.EncodingDer && !m_timeStringCanonical)
+ return Encoding.ASCII.GetBytes(ToStringCanonical(m_dateTime));
+
+ return Encoding.ASCII.GetBytes(m_timeString);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.GeneralizedTime, GetContents(encoding));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, GetContents(encoding));
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ if (!(asn1Object is Asn1GeneralizedTime that))
+ return false;
+
+ // TODO Performance
+ return Arrays.AreEqual(
+ this.GetContents(Asn1OutputStream.EncodingDer),
+ that.GetContents(Asn1OutputStream.EncodingDer));
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ // TODO Performance
+ return Arrays.GetHashCode(
+ this.GetContents(Asn1OutputStream.EncodingDer));
+ }
+
+ internal static Asn1GeneralizedTime CreatePrimitive(byte[] contents)
+ {
+ return new Asn1GeneralizedTime(contents);
+ }
+
+ private static DateTime FromString(string s)
+ {
+ if (s.Length < 10)
+ throw new FormatException();
+
+ s = s.Replace(',', '.');
+
+ if (Org.BouncyCastle.Utilities.Platform.EndsWith(s, "Z"))
+ {
+ switch (s.Length)
+ {
+ case 11: return ParseUtc(s, @"yyyyMMddHH\Z");
+ case 13: return ParseUtc(s, @"yyyyMMddHHmm\Z");
+ case 15: return ParseUtc(s, @"yyyyMMddHHmmss\Z");
+ case 17: return ParseUtc(s, @"yyyyMMddHHmmss.f\Z");
+ case 18: return ParseUtc(s, @"yyyyMMddHHmmss.ff\Z");
+ case 19: return ParseUtc(s, @"yyyyMMddHHmmss.fff\Z");
+ case 20: return ParseUtc(s, @"yyyyMMddHHmmss.ffff\Z");
+ case 21: return ParseUtc(s, @"yyyyMMddHHmmss.fffff\Z");
+ case 22: return ParseUtc(s, @"yyyyMMddHHmmss.ffffff\Z");
+ case 23: return ParseUtc(s, @"yyyyMMddHHmmss.fffffff\Z");
+ default:
+ throw new FormatException();
+ }
+ }
+
+ int signIndex = IndexOfSign(s, System.Math.Max(10, s.Length - 5));
+
+ if (signIndex < 0)
+ {
+ switch (s.Length)
+ {
+ case 10: return ParseLocal(s, @"yyyyMMddHH");
+ case 12: return ParseLocal(s, @"yyyyMMddHHmm");
+ case 14: return ParseLocal(s, @"yyyyMMddHHmmss");
+ case 16: return ParseLocal(s, @"yyyyMMddHHmmss.f");
+ case 17: return ParseLocal(s, @"yyyyMMddHHmmss.ff");
+ case 18: return ParseLocal(s, @"yyyyMMddHHmmss.fff");
+ case 19: return ParseLocal(s, @"yyyyMMddHHmmss.ffff");
+ case 20: return ParseLocal(s, @"yyyyMMddHHmmss.fffff");
+ case 21: return ParseLocal(s, @"yyyyMMddHHmmss.ffffff");
+ case 22: return ParseLocal(s, @"yyyyMMddHHmmss.fffffff");
+ default:
+ throw new FormatException();
+ }
+ }
+
+ if (signIndex == s.Length - 5)
+ {
+ switch (s.Length)
+ {
+ case 15: return ParseTimeZone(s, @"yyyyMMddHHzzz");
+ case 17: return ParseTimeZone(s, @"yyyyMMddHHmmzzz");
+ case 19: return ParseTimeZone(s, @"yyyyMMddHHmmsszzz");
+ case 21: return ParseTimeZone(s, @"yyyyMMddHHmmss.fzzz");
+ case 22: return ParseTimeZone(s, @"yyyyMMddHHmmss.ffzzz");
+ case 23: return ParseTimeZone(s, @"yyyyMMddHHmmss.fffzzz");
+ case 24: return ParseTimeZone(s, @"yyyyMMddHHmmss.ffffzzz");
+ case 25: return ParseTimeZone(s, @"yyyyMMddHHmmss.fffffzzz");
+ case 26: return ParseTimeZone(s, @"yyyyMMddHHmmss.ffffffzzz");
+ case 27: return ParseTimeZone(s, @"yyyyMMddHHmmss.fffffffzzz");
+ default:
+ throw new FormatException();
+ }
+ }
+
+ if (signIndex == s.Length - 3)
+ {
+ switch (s.Length)
+ {
+ case 13: return ParseTimeZone(s, @"yyyyMMddHHzz");
+ case 15: return ParseTimeZone(s, @"yyyyMMddHHmmzz");
+ case 17: return ParseTimeZone(s, @"yyyyMMddHHmmsszz");
+ case 19: return ParseTimeZone(s, @"yyyyMMddHHmmss.fzz");
+ case 20: return ParseTimeZone(s, @"yyyyMMddHHmmss.ffzz");
+ case 21: return ParseTimeZone(s, @"yyyyMMddHHmmss.fffzz");
+ case 22: return ParseTimeZone(s, @"yyyyMMddHHmmss.ffffzz");
+ case 23: return ParseTimeZone(s, @"yyyyMMddHHmmss.fffffzz");
+ case 24: return ParseTimeZone(s, @"yyyyMMddHHmmss.ffffffzz");
+ case 25: return ParseTimeZone(s, @"yyyyMMddHHmmss.fffffffzz");
+ default:
+ throw new FormatException();
+ }
+ }
+
+ throw new FormatException();
+ }
+
+ private static int IndexOfSign(string s, int startIndex)
+ {
+ int index = Org.BouncyCastle.Utilities.Platform.IndexOf(s, '+', startIndex);
+ if (index < 0)
+ {
+ index = Org.BouncyCastle.Utilities.Platform.IndexOf(s, '-', startIndex);
+ }
+ return index;
+ }
+
+ private static DateTime ParseLocal(string s, string format)
+ {
+ return DateTime.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeLocal);
+ }
+
+ private static DateTime ParseTimeZone(string s, string format)
+ {
+ return DateTime.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AdjustToUniversal);
+ }
+
+ private static DateTime ParseUtc(string s, string format)
+ {
+ return DateTime.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo,
+ DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal);
+ }
+
+ private static string ToStringCanonical(DateTime dateTime)
+ {
+ return dateTime.ToUniversalTime().ToString(@"yyyyMMddHHmmss.FFFFFFFK", DateTimeFormatInfo.InvariantInfo);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1GeneralizedTime.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1GeneralizedTime.cs.meta
new file mode 100644
index 00000000..587d2784
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1GeneralizedTime.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 62e5a274f71306c469aecc7ff2a8569b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1InputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1InputStream.cs
new file mode 100644
index 00000000..4487564a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1InputStream.cs
@@ -0,0 +1,471 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * a general purpose ASN.1 decoder - note: this class differs from the
+ * others in that it returns null after it has read the last object in
+ * the stream. If an ASN.1 Null is encountered a Der/BER Null object is
+ * returned.
+ */
+ public class Asn1InputStream
+ : FilterStream
+ {
+ private readonly int limit;
+
+ internal byte[][] tmpBuffers;
+
+ internal static int FindLimit(Stream input)
+ {
+ if (input is LimitedInputStream limited)
+ return limited.Limit;
+
+ if (input is Asn1InputStream asn1)
+ return asn1.Limit;
+
+ if (input is MemoryStream memory)
+ return Convert.ToInt32(memory.Length - memory.Position);
+
+ return int.MaxValue;
+ }
+
+ public Asn1InputStream(Stream input)
+ : this(input, FindLimit(input))
+ {
+ }
+
+ /**
+ * Create an ASN1InputStream based on the input byte array. The length of DER objects in
+ * the stream is automatically limited to the length of the input array.
+ *
+ * @param input array containing ASN.1 encoded data.
+ */
+ public Asn1InputStream(byte[] input)
+ : this(new MemoryStream(input, false), input.Length)
+ {
+ }
+
+ /**
+ * Create an ASN1InputStream where no DER object will be longer than limit.
+ *
+ * @param input stream containing ASN.1 encoded data.
+ * @param limit maximum size of a DER encoded object.
+ */
+ public Asn1InputStream(Stream input, int limit)
+ : this(input, limit, new byte[16][])
+ {
+ }
+
+ internal Asn1InputStream(Stream input, int limit, byte[][] tmpBuffers)
+ : base(input)
+ {
+ this.limit = limit;
+ this.tmpBuffers = tmpBuffers;
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ tmpBuffers = null;
+
+ base.Dispose(disposing);
+ }
+
+ /**
+ * build an object given its tag and the number of bytes to construct it from.
+ */
+ private Asn1Object BuildObject(int tagHdr, int tagNo, int length)
+ {
+ // TODO[asn1] Special-case zero length first?
+
+ DefiniteLengthInputStream defIn = new DefiniteLengthInputStream(s, length, limit);
+
+ if (0 == (tagHdr & Asn1Tags.Flags))
+ return CreatePrimitiveDerObject(tagNo, defIn, tmpBuffers);
+
+ int tagClass = tagHdr & Asn1Tags.Private;
+ if (0 != tagClass)
+ {
+ bool isConstructed = (tagHdr & Asn1Tags.Constructed) != 0;
+ return ReadTaggedObjectDL(tagClass, tagNo, isConstructed, defIn);
+ }
+
+ switch (tagNo)
+ {
+ case Asn1Tags.BitString:
+ return BuildConstructedBitString(ReadVector(defIn));
+ case Asn1Tags.OctetString:
+ return BuildConstructedOctetString(ReadVector(defIn));
+ case Asn1Tags.Sequence:
+ return CreateDLSequence(defIn);
+ case Asn1Tags.Set:
+ return CreateDLSet(defIn);
+ case Asn1Tags.External:
+ return DLSequence.FromVector(ReadVector(defIn)).ToAsn1External();
+ default:
+ throw new IOException("unknown tag " + tagNo + " encountered");
+ }
+ }
+
+ internal Asn1Object ReadTaggedObjectDL(int tagClass, int tagNo, bool constructed, DefiniteLengthInputStream defIn)
+ {
+ if (!constructed)
+ {
+ byte[] contentsOctets = defIn.ToArray();
+ return Asn1TaggedObject.CreatePrimitive(tagClass, tagNo, contentsOctets);
+ }
+
+ Asn1EncodableVector contentsElements = ReadVector(defIn);
+ return Asn1TaggedObject.CreateConstructedDL(tagClass, tagNo, contentsElements);
+ }
+
+ internal virtual Asn1EncodableVector ReadVector()
+ {
+ Asn1Object o = ReadObject();
+ if (null == o)
+ return new Asn1EncodableVector(0);
+
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ do
+ {
+ v.Add(o);
+ }
+ while ((o = ReadObject()) != null);
+ return v;
+ }
+
+ internal virtual Asn1EncodableVector ReadVector(DefiniteLengthInputStream defIn)
+ {
+ int remaining = defIn.Remaining;
+ if (remaining < 1)
+ return new Asn1EncodableVector(0);
+
+ return new Asn1InputStream(defIn, remaining, tmpBuffers).ReadVector();
+ }
+
+ internal virtual Asn1Sequence CreateDLSequence(DefiniteLengthInputStream defIn)
+ {
+ return DLSequence.FromVector(ReadVector(defIn));
+ }
+
+ internal virtual Asn1Set CreateDLSet(DefiniteLengthInputStream defIn)
+ {
+ return DLSet.FromVector(ReadVector(defIn));
+ }
+
+ public Asn1Object ReadObject()
+ {
+ int tagHdr = s.ReadByte();
+ if (tagHdr <= 0)
+ {
+ if (tagHdr == 0)
+ throw new IOException("unexpected end-of-contents marker");
+
+ return null;
+ }
+
+ int tagNo = ReadTagNumber(s, tagHdr);
+ int length = ReadLength(s, limit, false);
+
+ if (length >= 0)
+ {
+ // definite-length
+ try
+ {
+ return BuildObject(tagHdr, tagNo, length);
+ }
+ catch (ArgumentException e)
+ {
+ throw new Asn1Exception("corrupted stream detected", e);
+ }
+ }
+
+ // indefinite-length
+
+ if (0 == (tagHdr & Asn1Tags.Constructed))
+ throw new IOException("indefinite-length primitive encoding encountered");
+
+ IndefiniteLengthInputStream indIn = new IndefiniteLengthInputStream(s, limit);
+ Asn1StreamParser sp = new Asn1StreamParser(indIn, limit, tmpBuffers);
+
+ int tagClass = tagHdr & Asn1Tags.Private;
+ if (0 != tagClass)
+ return sp.LoadTaggedIL(tagClass, tagNo);
+
+ switch (tagNo)
+ {
+ case Asn1Tags.BitString:
+ return BerBitStringParser.Parse(sp);
+ case Asn1Tags.OctetString:
+ return BerOctetStringParser.Parse(sp);
+ case Asn1Tags.Sequence:
+ return BerSequenceParser.Parse(sp);
+ case Asn1Tags.Set:
+ return BerSetParser.Parse(sp);
+ case Asn1Tags.External:
+ // TODO[asn1] BerExternalParser
+ return DerExternalParser.Parse(sp);
+ default:
+ throw new IOException("unknown BER object encountered");
+ }
+ }
+
+ internal virtual DerBitString BuildConstructedBitString(Asn1EncodableVector contentsElements)
+ {
+ DerBitString[] bitStrings = new DerBitString[contentsElements.Count];
+
+ for (int i = 0; i != bitStrings.Length; i++)
+ {
+ DerBitString bitString = contentsElements[i] as DerBitString;
+ if (null == bitString)
+ throw new Asn1Exception("unknown object encountered in constructed BIT STRING: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(contentsElements[i]));
+
+ bitStrings[i] = bitString;
+ }
+
+ return new DLBitString(BerBitString.FlattenBitStrings(bitStrings), false);
+ }
+
+ internal virtual Asn1OctetString BuildConstructedOctetString(Asn1EncodableVector contentsElements)
+ {
+ Asn1OctetString[] octetStrings = new Asn1OctetString[contentsElements.Count];
+
+ for (int i = 0; i != octetStrings.Length; i++)
+ {
+ Asn1OctetString octetString = contentsElements[i] as Asn1OctetString;
+ if (null == octetString)
+ throw new Asn1Exception("unknown object encountered in constructed OCTET STRING: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(contentsElements[i]));
+
+ octetStrings[i] = octetString;
+ }
+
+ // Note: No DLOctetString available
+ return new DerOctetString(BerOctetString.FlattenOctetStrings(octetStrings));
+ }
+
+ internal virtual int Limit
+ {
+ get { return limit; }
+ }
+
+ internal static int ReadTagNumber(Stream s, int tagHdr)
+ {
+ int tagNo = tagHdr & 0x1f;
+
+ //
+ // with tagged object tag number is bottom 5 bits, or stored at the start of the content
+ //
+ if (tagNo == 0x1f)
+ {
+ int b = s.ReadByte();
+ if (b < 31)
+ {
+ if (b < 0)
+ throw new EndOfStreamException("EOF found inside tag value.");
+
+ throw new IOException("corrupted stream - high tag number < 31 found");
+ }
+
+ tagNo = b & 0x7f;
+
+ // X.690-0207 8.1.2.4.2
+ // "c) bits 7 to 1 of the first subsequent octet shall not all be zero."
+ if (0 == tagNo)
+ throw new IOException("corrupted stream - invalid high tag number found");
+
+ while ((b & 0x80) != 0)
+ {
+ if (((uint)tagNo >> 24) != 0U)
+ throw new IOException("Tag number more than 31 bits");
+
+ tagNo <<= 7;
+
+ b = s.ReadByte();
+ if (b < 0)
+ throw new EndOfStreamException("EOF found inside tag value.");
+
+ tagNo |= b & 0x7f;
+ }
+ }
+
+ return tagNo;
+ }
+
+ internal static int ReadLength(Stream s, int limit, bool isParsing)
+ {
+ int length = s.ReadByte();
+ if (0U == ((uint)length >> 7))
+ {
+ // definite-length short form
+ return length;
+ }
+ if (0x80 == length)
+ {
+ // indefinite-length
+ return -1;
+ }
+ if (length < 0)
+ {
+ throw new EndOfStreamException("EOF found when length expected");
+ }
+ if (0xFF == length)
+ {
+ throw new IOException("invalid long form definite-length 0xFF");
+ }
+
+ int octetsCount = length & 0x7F, octetsPos = 0;
+
+ length = 0;
+ do
+ {
+ int octet = s.ReadByte();
+ if (octet < 0)
+ throw new EndOfStreamException("EOF found reading length");
+
+ if (((uint)length >> 23) != 0U)
+ throw new IOException("long form definite-length more than 31 bits");
+
+ length = (length << 8) + octet;
+ }
+ while (++octetsPos < octetsCount);
+
+ if (length >= limit && !isParsing) // after all we must have read at least 1 byte
+ throw new IOException("corrupted stream - out of bounds length found: " + length + " >= " + limit);
+
+ return length;
+ }
+
+ private static byte[] GetBuffer(DefiniteLengthInputStream defIn, byte[][] tmpBuffers)
+ {
+ int len = defIn.Remaining;
+ if (len >= tmpBuffers.Length)
+ {
+ return defIn.ToArray();
+ }
+
+ byte[] buf = tmpBuffers[len];
+ if (buf == null)
+ {
+ buf = tmpBuffers[len] = new byte[len];
+ }
+
+ defIn.ReadAllIntoByteArray(buf);
+
+ return buf;
+ }
+
+ private static char[] GetBmpCharBuffer(DefiniteLengthInputStream defIn)
+ {
+ int remainingBytes = defIn.Remaining;
+ if (0 != (remainingBytes & 1))
+ throw new IOException("malformed BMPString encoding encountered");
+
+ char[] str = new char[remainingBytes / 2];
+ int stringPos = 0;
+
+ byte[] buf = new byte[8];
+ while (remainingBytes >= 8)
+ {
+ if (Streams.ReadFully(defIn, buf, 0, 8) != 8)
+ throw new EndOfStreamException("EOF encountered in middle of BMPString");
+
+ str[stringPos ] = (char)((buf[0] << 8) | (buf[1] & 0xFF));
+ str[stringPos + 1] = (char)((buf[2] << 8) | (buf[3] & 0xFF));
+ str[stringPos + 2] = (char)((buf[4] << 8) | (buf[5] & 0xFF));
+ str[stringPos + 3] = (char)((buf[6] << 8) | (buf[7] & 0xFF));
+ stringPos += 4;
+ remainingBytes -= 8;
+ }
+ if (remainingBytes > 0)
+ {
+ if (Streams.ReadFully(defIn, buf, 0, remainingBytes) != remainingBytes)
+ throw new EndOfStreamException("EOF encountered in middle of BMPString");
+
+ int bufPos = 0;
+ do
+ {
+ int b1 = buf[bufPos++] << 8;
+ int b2 = buf[bufPos++] & 0xFF;
+ str[stringPos++] = (char)(b1 | b2);
+ }
+ while (bufPos < remainingBytes);
+ }
+
+ if (0 != defIn.Remaining || str.Length != stringPos)
+ throw new InvalidOperationException();
+
+ return str;
+ }
+
+ internal static Asn1Object CreatePrimitiveDerObject(int tagNo, DefiniteLengthInputStream defIn,
+ byte[][] tmpBuffers)
+ {
+ switch (tagNo)
+ {
+ case Asn1Tags.BmpString:
+ return DerBmpString.CreatePrimitive(GetBmpCharBuffer(defIn));
+ case Asn1Tags.Boolean:
+ return DerBoolean.CreatePrimitive(GetBuffer(defIn, tmpBuffers));
+ case Asn1Tags.Enumerated:
+ // TODO Ideally only clone if we used a buffer
+ return DerEnumerated.CreatePrimitive(GetBuffer(defIn, tmpBuffers), true);
+ case Asn1Tags.ObjectIdentifier:
+ // TODO Ideally only clone if we used a buffer
+ return DerObjectIdentifier.CreatePrimitive(GetBuffer(defIn, tmpBuffers), true);
+ }
+
+ byte[] bytes = defIn.ToArray();
+
+ switch (tagNo)
+ {
+ case Asn1Tags.BitString:
+ return DerBitString.CreatePrimitive(bytes);
+ case Asn1Tags.GeneralizedTime:
+ return Asn1GeneralizedTime.CreatePrimitive(bytes);
+ case Asn1Tags.GeneralString:
+ return DerGeneralString.CreatePrimitive(bytes);
+ case Asn1Tags.GraphicString:
+ return DerGraphicString.CreatePrimitive(bytes);
+ case Asn1Tags.IA5String:
+ return DerIA5String.CreatePrimitive(bytes);
+ case Asn1Tags.Integer:
+ return DerInteger.CreatePrimitive(bytes);
+ case Asn1Tags.Null:
+ return Asn1Null.CreatePrimitive(bytes);
+ case Asn1Tags.NumericString:
+ return DerNumericString.CreatePrimitive(bytes);
+ case Asn1Tags.ObjectDescriptor:
+ return Asn1ObjectDescriptor.CreatePrimitive(bytes);
+ case Asn1Tags.OctetString:
+ return Asn1OctetString.CreatePrimitive(bytes);
+ case Asn1Tags.PrintableString:
+ return DerPrintableString.CreatePrimitive(bytes);
+ case Asn1Tags.RelativeOid:
+ return Asn1RelativeOid.CreatePrimitive(bytes, false);
+ case Asn1Tags.T61String:
+ return DerT61String.CreatePrimitive(bytes);
+ case Asn1Tags.UniversalString:
+ return DerUniversalString.CreatePrimitive(bytes);
+ case Asn1Tags.UtcTime:
+ return Asn1UtcTime.CreatePrimitive(bytes);
+ case Asn1Tags.Utf8String:
+ return DerUtf8String.CreatePrimitive(bytes);
+ case Asn1Tags.VideotexString:
+ return DerVideotexString.CreatePrimitive(bytes);
+ case Asn1Tags.VisibleString:
+ return DerVisibleString.CreatePrimitive(bytes);
+ default:
+ throw new IOException("unknown tag " + tagNo + " encountered");
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1InputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1InputStream.cs.meta
new file mode 100644
index 00000000..7705fff8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1InputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b95c96ff5d2c7f94ab6207dae0d3fd05
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Null.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Null.cs
new file mode 100644
index 00000000..6719869d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Null.cs
@@ -0,0 +1,81 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * A Null object.
+ */
+ public abstract class Asn1Null
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(Asn1Null), Asn1Tags.Null) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ public static Asn1Null GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is Asn1Null asn1Null)
+ return asn1Null;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is Asn1Null converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (Asn1Null)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct NULL from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public static Asn1Null GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (Asn1Null)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ internal Asn1Null()
+ {
+ }
+
+ public override string ToString()
+ {
+ return "NULL";
+ }
+
+ internal static Asn1Null CreatePrimitive(byte[] contents)
+ {
+ if (0 != contents.Length)
+ throw new InvalidOperationException("malformed NULL encoding encountered");
+
+ return DerNull.Instance;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Null.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Null.cs.meta
new file mode 100644
index 00000000..8690146f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Null.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4a876da42eab2c748afb267168fb5dc6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Object.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Object.cs
new file mode 100644
index 00000000..5ae24403
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Object.cs
@@ -0,0 +1,95 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class Asn1Object
+ : Asn1Encodable
+ {
+ public override void EncodeTo(Stream output)
+ {
+ Asn1OutputStream asn1Out = Asn1OutputStream.Create(output);
+ GetEncoding(asn1Out.Encoding).Encode(asn1Out);
+ asn1Out.FlushInternal();
+ }
+
+ public override void EncodeTo(Stream output, string encoding)
+ {
+ Asn1OutputStream asn1Out = Asn1OutputStream.Create(output, encoding);
+ GetEncoding(asn1Out.Encoding).Encode(asn1Out);
+ asn1Out.FlushInternal();
+ }
+
+ public bool Equals(Asn1Object other)
+ {
+ return this == other || Asn1Equals(other);
+ }
+
+ /// Create a base ASN.1 object from a byte array.
+ /// The byte array to parse.
+ /// The base ASN.1 object represented by the byte array.
+ ///
+ /// If there is a problem parsing the data, or parsing an object did not exhaust the available data.
+ ///
+ public static Asn1Object FromByteArray(
+ byte[] data)
+ {
+ try
+ {
+ MemoryStream input = new MemoryStream(data, false);
+ Asn1InputStream asn1 = new Asn1InputStream(input, data.Length);
+ Asn1Object result = asn1.ReadObject();
+ if (input.Position != input.Length)
+ throw new IOException("extra data found after object");
+ return result;
+ }
+ catch (InvalidCastException)
+ {
+ throw new IOException("cannot recognise object in byte array");
+ }
+ }
+
+ /// Read a base ASN.1 object from a stream.
+ /// The stream to parse.
+ /// The base ASN.1 object represented by the byte array.
+ /// If there is a problem parsing the data.
+ public static Asn1Object FromStream(
+ Stream inStr)
+ {
+ try
+ {
+ return new Asn1InputStream(inStr).ReadObject();
+ }
+ catch (InvalidCastException)
+ {
+ throw new IOException("cannot recognise object in stream");
+ }
+ }
+
+ public sealed override Asn1Object ToAsn1Object()
+ {
+ return this;
+ }
+
+ internal abstract IAsn1Encoding GetEncoding(int encoding);
+
+ internal abstract IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo);
+
+ protected abstract bool Asn1Equals(Asn1Object asn1Object);
+ protected abstract int Asn1GetHashCode();
+
+ internal bool CallAsn1Equals(Asn1Object obj)
+ {
+ return Asn1Equals(obj);
+ }
+
+ internal int CallAsn1GetHashCode()
+ {
+ return Asn1GetHashCode();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Object.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Object.cs.meta
new file mode 100644
index 00000000..2e681509
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Object.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 15f5e5389eb7ade49904deb4cb013b90
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ObjectDescriptor.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ObjectDescriptor.cs
new file mode 100644
index 00000000..024132ff
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ObjectDescriptor.cs
@@ -0,0 +1,125 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public sealed class Asn1ObjectDescriptor
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(Asn1ObjectDescriptor), Asn1Tags.ObjectDescriptor) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return new Asn1ObjectDescriptor(
+ (DerGraphicString)DerGraphicString.Meta.Instance.FromImplicitPrimitive(octetString));
+ }
+
+ internal override Asn1Object FromImplicitConstructed(Asn1Sequence sequence)
+ {
+ return new Asn1ObjectDescriptor(
+ (DerGraphicString)DerGraphicString.Meta.Instance.FromImplicitConstructed(sequence));
+ }
+ }
+
+ /**
+ * Return an ObjectDescriptor from the passed in object.
+ *
+ * @param obj an ASN1ObjectDescriptor or an object that can be converted into one.
+ * @exception IllegalArgumentException if the object cannot be converted.
+ * @return an ASN1ObjectDescriptor instance, or null.
+ */
+ public static Asn1ObjectDescriptor GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is Asn1ObjectDescriptor asn1ObjectDescriptor)
+ return asn1ObjectDescriptor;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is Asn1ObjectDescriptor converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (Asn1ObjectDescriptor)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct object descriptor from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Return an ObjectDescriptor from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want.
+ * @param declaredExplicit true if the object is meant to be explicitly tagged, false otherwise.
+ * @exception IllegalArgumentException if the tagged object cannot be converted.
+ * @return an ASN1ObjectDescriptor instance, or null.
+ */
+ public static Asn1ObjectDescriptor GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (Asn1ObjectDescriptor)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly DerGraphicString m_baseGraphicString;
+
+ public Asn1ObjectDescriptor(DerGraphicString baseGraphicString)
+ {
+ if (null == baseGraphicString)
+ throw new ArgumentNullException("baseGraphicString");
+
+ this.m_baseGraphicString = baseGraphicString;
+ }
+
+ public DerGraphicString BaseGraphicString
+ {
+ get { return m_baseGraphicString; }
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return m_baseGraphicString.GetEncodingImplicit(encoding, Asn1Tags.Universal, Asn1Tags.ObjectDescriptor);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return m_baseGraphicString.GetEncodingImplicit(encoding, tagClass, tagNo);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return ~m_baseGraphicString.CallAsn1GetHashCode();
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ Asn1ObjectDescriptor that = asn1Object as Asn1ObjectDescriptor;
+ return null != that
+ && this.m_baseGraphicString.Equals(that.m_baseGraphicString);
+ }
+
+ internal static Asn1ObjectDescriptor CreatePrimitive(byte[] contents)
+ {
+ return new Asn1ObjectDescriptor(DerGraphicString.CreatePrimitive(contents));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ObjectDescriptor.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ObjectDescriptor.cs.meta
new file mode 100644
index 00000000..c536e98e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ObjectDescriptor.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c060c54a712364249874ff2de41a9cc4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OctetString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OctetString.cs
new file mode 100644
index 00000000..2a829342
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OctetString.cs
@@ -0,0 +1,136 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class Asn1OctetString
+ : Asn1Object, Asn1OctetStringParser
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(Asn1OctetString), Asn1Tags.OctetString) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return octetString;
+ }
+
+ internal override Asn1Object FromImplicitConstructed(Asn1Sequence sequence)
+ {
+ return sequence.ToAsn1OctetString();
+ }
+ }
+
+ internal static readonly byte[] EmptyOctets = new byte[0];
+
+ /**
+ * return an Octet string from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static Asn1OctetString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is Asn1OctetString asn1OctetString)
+ return asn1OctetString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is Asn1OctetString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (Asn1OctetString)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct OCTET STRING from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * return an octet string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want.
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static Asn1OctetString GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (Asn1OctetString)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ internal readonly byte[] contents;
+
+ /**
+ * @param string the octets making up the octet string.
+ */
+ internal Asn1OctetString(byte[] contents)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ this.contents = contents;
+ }
+
+ public Stream GetOctetStream()
+ {
+ return new MemoryStream(contents, false);
+ }
+
+ public Asn1OctetStringParser Parser
+ {
+ get { return this; }
+ }
+
+ public virtual byte[] GetOctets()
+ {
+ return contents;
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(GetOctets());
+ }
+
+ protected override bool Asn1Equals(
+ Asn1Object asn1Object)
+ {
+ DerOctetString other = asn1Object as DerOctetString;
+
+ if (other == null)
+ return false;
+
+ return Arrays.AreEqual(GetOctets(), other.GetOctets());
+ }
+
+ public override string ToString()
+ {
+ return "#" + Hex.ToHexString(contents);
+ }
+
+ internal static Asn1OctetString CreatePrimitive(byte[] contents)
+ {
+ return new DerOctetString(contents);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OctetString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OctetString.cs.meta
new file mode 100644
index 00000000..22ec30c9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OctetString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6bcdb5a8710e085408bcf9979de57789
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OutputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OutputStream.cs
new file mode 100644
index 00000000..73fcd8dd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OutputStream.cs
@@ -0,0 +1,192 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+using System.Diagnostics;
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+using System.Buffers.Binary;
+using System.Numerics;
+#endif
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class Asn1OutputStream
+ : FilterStream
+ {
+ internal const int EncodingBer = 1;
+ internal const int EncodingDer = 2;
+
+ public static Asn1OutputStream Create(Stream output)
+ {
+ return new Asn1OutputStream(output);
+ }
+
+ public static Asn1OutputStream Create(Stream output, string encoding)
+ {
+ if (Asn1Encodable.Der.Equals(encoding))
+ {
+ return new DerOutputStream(output);
+ }
+ else
+ {
+ return new Asn1OutputStream(output);
+ }
+ }
+
+ internal Asn1OutputStream(Stream os)
+ : base(os)
+ {
+ }
+
+ public virtual void WriteObject(Asn1Encodable asn1Encodable)
+ {
+ if (null == asn1Encodable)
+ throw new ArgumentNullException("asn1Encodable");
+
+ asn1Encodable.ToAsn1Object().GetEncoding(this.Encoding).Encode(this);
+ FlushInternal();
+ }
+
+ public virtual void WriteObject(Asn1Object asn1Object)
+ {
+ if (null == asn1Object)
+ throw new ArgumentNullException("asn1Object");
+
+ asn1Object.GetEncoding(this.Encoding).Encode(this);
+ FlushInternal();
+ }
+
+ internal void EncodeContents(IAsn1Encoding[] contentsEncodings)
+ {
+ for (int i = 0, count = contentsEncodings.Length; i < count; ++i)
+ {
+ contentsEncodings[i].Encode(this);
+ }
+ }
+
+ internal virtual int Encoding
+ {
+ get { return EncodingBer; }
+ }
+
+ internal void FlushInternal()
+ {
+ // Placeholder to support future internal buffering
+ }
+
+ internal void WriteDL(int dl)
+ {
+ if (dl < 128)
+ {
+ Debug.Assert(dl >= 0);
+ WriteByte((byte)dl);
+ return;
+ }
+
+#if false && (NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER)
+ Span encoding = stackalloc byte[5];
+ BinaryPrimitives.WriteUInt32BigEndian(encoding[1..], (uint)dl);
+ int leadingZeroBytes = BitOperations.LeadingZeroCount((uint)dl) / 8;
+ encoding[leadingZeroBytes] = (byte)(0x84 - leadingZeroBytes);
+ Write(encoding[leadingZeroBytes..]);
+#else
+ byte[] stack = new byte[5];
+ int pos = stack.Length;
+
+ do
+ {
+ stack[--pos] = (byte)dl;
+ dl >>= 8;
+ }
+ while (dl > 0);
+
+ int count = stack.Length - pos;
+ stack[--pos] = (byte)(0x80 | count);
+
+ Write(stack, pos, count + 1);
+#endif
+ }
+
+ internal void WriteIdentifier(int tagClass, int tagNo)
+ {
+ if (tagNo < 31)
+ {
+ WriteByte((byte)(tagClass | tagNo));
+ return;
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ Span stack = stackalloc byte[6];
+#else
+ byte[] stack = new byte[6];
+#endif
+ int pos = stack.Length;
+
+ stack[--pos] = (byte)(tagNo & 0x7F);
+ while (tagNo > 127)
+ {
+ tagNo >>= 7;
+ stack[--pos] = (byte)(tagNo & 0x7F | 0x80);
+ }
+
+ stack[--pos] = (byte)(tagClass | 0x1F);
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ Write(stack[pos..]);
+#else
+ Write(stack, pos, stack.Length - pos);
+#endif
+ }
+
+ internal static IAsn1Encoding[] GetContentsEncodings(int encoding, Asn1Encodable[] elements)
+ {
+ int count = elements.Length;
+ IAsn1Encoding[] contentsEncodings = new IAsn1Encoding[count];
+ for (int i = 0; i < count; ++i)
+ {
+ contentsEncodings[i] = elements[i].ToAsn1Object().GetEncoding(encoding);
+ }
+ return contentsEncodings;
+ }
+
+ internal static int GetLengthOfContents(IAsn1Encoding[] contentsEncodings)
+ {
+ int contentsLength = 0;
+ for (int i = 0, count = contentsEncodings.Length; i < count; ++i)
+ {
+ contentsLength += contentsEncodings[i].GetLength();
+ }
+ return contentsLength;
+ }
+
+ internal static int GetLengthOfDL(int dl)
+ {
+ if (dl < 128)
+ return 1;
+
+ int length = 2;
+ while ((dl >>= 8) > 0)
+ {
+ ++length;
+ }
+ return length;
+ }
+
+ internal static int GetLengthOfIdentifier(int tagNo)
+ {
+ if (tagNo < 31)
+ return 1;
+
+ int length = 2;
+ while ((tagNo >>= 7) > 0)
+ {
+ ++length;
+ }
+ return length;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OutputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OutputStream.cs.meta
new file mode 100644
index 00000000..c350f392
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1OutputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 93f27584bff53394399766c65f08a579
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ParsingException.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ParsingException.cs
new file mode 100644
index 00000000..538db97b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ParsingException.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Runtime.Serialization;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ [Serializable]
+ public class Asn1ParsingException
+ : InvalidOperationException
+ {
+ public Asn1ParsingException()
+ : base()
+ {
+ }
+
+ public Asn1ParsingException(string message)
+ : base(message)
+ {
+ }
+
+ public Asn1ParsingException(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ }
+
+ protected Asn1ParsingException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ParsingException.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ParsingException.cs.meta
new file mode 100644
index 00000000..5190d88b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1ParsingException.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c635f62a712c34f4ca1a6f28571653ad
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1RelativeOid.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1RelativeOid.cs
new file mode 100644
index 00000000..99484b03
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1RelativeOid.cs
@@ -0,0 +1,320 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class Asn1RelativeOid
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(Asn1RelativeOid), Asn1Tags.RelativeOid) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets(), false);
+ }
+ }
+
+ public static Asn1RelativeOid FromContents(byte[] contents)
+ {
+ return CreatePrimitive(contents, true);
+ }
+
+ public static Asn1RelativeOid GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is Asn1RelativeOid asn1RelativeOid)
+ return asn1RelativeOid;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is Asn1RelativeOid converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (Asn1RelativeOid)FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct relative OID from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static Asn1RelativeOid GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (Asn1RelativeOid)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private const long LongLimit = (long.MaxValue >> 7) - 0x7F;
+
+ private readonly string identifier;
+ private byte[] contents;
+
+ public Asn1RelativeOid(string identifier)
+ {
+ if (identifier == null)
+ throw new ArgumentNullException("identifier");
+ if (!IsValidIdentifier(identifier, 0))
+ throw new FormatException("string " + identifier + " not a relative OID");
+
+ this.identifier = identifier;
+ }
+
+ private Asn1RelativeOid(Asn1RelativeOid oid, string branchID)
+ {
+ if (!IsValidIdentifier(branchID, 0))
+ throw new FormatException("string " + branchID + " not a valid relative OID branch");
+
+ this.identifier = oid.Id + "." + branchID;
+ }
+
+ private Asn1RelativeOid(byte[] contents, bool clone)
+ {
+ this.identifier = ParseContents(contents);
+ this.contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public virtual Asn1RelativeOid Branch(string branchID)
+ {
+ return new Asn1RelativeOid(this, branchID);
+ }
+
+ public string Id
+ {
+ get { return identifier; }
+ }
+
+ public override string ToString()
+ {
+ return identifier;
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ Asn1RelativeOid that = asn1Object as Asn1RelativeOid;
+ return null != that
+ && this.identifier == that.identifier;
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return identifier.GetHashCode();
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.RelativeOid, GetContents());
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, GetContents());
+ }
+
+ private void DoOutput(MemoryStream bOut)
+ {
+ OidTokenizer tok = new OidTokenizer(identifier);
+ while (tok.HasMoreTokens)
+ {
+ string token = tok.NextToken();
+ if (token.Length <= 18)
+ {
+ WriteField(bOut, long.Parse(token));
+ }
+ else
+ {
+ WriteField(bOut, new BigInteger(token));
+ }
+ }
+ }
+
+ private byte[] GetContents()
+ {
+ lock (this)
+ {
+ if (contents == null)
+ {
+ MemoryStream bOut = new MemoryStream();
+ DoOutput(bOut);
+ contents = bOut.ToArray();
+ }
+
+ return contents;
+ }
+ }
+
+ internal static Asn1RelativeOid CreatePrimitive(byte[] contents, bool clone)
+ {
+ return new Asn1RelativeOid(contents, clone);
+ }
+
+ internal static bool IsValidIdentifier(string identifier, int from)
+ {
+ int digitCount = 0;
+
+ int pos = identifier.Length;
+ while (--pos >= from)
+ {
+ char ch = identifier[pos];
+
+ if (ch == '.')
+ {
+ if (0 == digitCount || (digitCount > 1 && identifier[pos + 1] == '0'))
+ return false;
+
+ digitCount = 0;
+ }
+ else if ('0' <= ch && ch <= '9')
+ {
+ ++digitCount;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ if (0 == digitCount || (digitCount > 1 && identifier[pos + 1] == '0'))
+ return false;
+
+ return true;
+ }
+
+ internal static void WriteField(Stream outputStream, long fieldValue)
+ {
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ Span result = stackalloc byte[9];
+#else
+ byte[] result = new byte[9];
+#endif
+ int pos = 8;
+ result[pos] = (byte)((int)fieldValue & 0x7F);
+ while (fieldValue >= (1L << 7))
+ {
+ fieldValue >>= 7;
+ result[--pos] = (byte)((int)fieldValue | 0x80);
+ }
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ outputStream.Write(result[pos..]);
+#else
+ outputStream.Write(result, pos, 9 - pos);
+#endif
+ }
+
+ internal static void WriteField(Stream outputStream, BigInteger fieldValue)
+ {
+ int byteCount = (fieldValue.BitLength + 6) / 7;
+ if (byteCount == 0)
+ {
+ outputStream.WriteByte(0);
+ }
+ else
+ {
+ BigInteger tmpValue = fieldValue;
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ Span tmp = byteCount <= 16
+ ? stackalloc byte[byteCount]
+ : new byte[byteCount];
+#else
+ byte[] tmp = new byte[byteCount];
+#endif
+ for (int i = byteCount - 1; i >= 0; i--)
+ {
+ tmp[i] = (byte)(tmpValue.IntValue | 0x80);
+ tmpValue = tmpValue.ShiftRight(7);
+ }
+ tmp[byteCount - 1] &= 0x7F;
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ outputStream.Write(tmp);
+#else
+ outputStream.Write(tmp, 0, tmp.Length);
+#endif
+ }
+ }
+
+ private static string ParseContents(byte[] contents)
+ {
+ StringBuilder objId = new StringBuilder();
+ long value = 0;
+ BigInteger bigValue = null;
+ bool first = true;
+
+ for (int i = 0; i != contents.Length; i++)
+ {
+ int b = contents[i];
+
+ if (value <= LongLimit)
+ {
+ value += b & 0x7F;
+ if ((b & 0x80) == 0)
+ {
+ if (first)
+ {
+ first = false;
+ }
+ else
+ {
+ objId.Append('.');
+ }
+
+ objId.Append(value);
+ value = 0;
+ }
+ else
+ {
+ value <<= 7;
+ }
+ }
+ else
+ {
+ if (bigValue == null)
+ {
+ bigValue = BigInteger.ValueOf(value);
+ }
+ bigValue = bigValue.Or(BigInteger.ValueOf(b & 0x7F));
+ if ((b & 0x80) == 0)
+ {
+ if (first)
+ {
+ first = false;
+ }
+ else
+ {
+ objId.Append('.');
+ }
+
+ objId.Append(bigValue);
+ bigValue = null;
+ value = 0;
+ }
+ else
+ {
+ bigValue = bigValue.ShiftLeft(7);
+ }
+ }
+ }
+
+ return objId.ToString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1RelativeOid.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1RelativeOid.cs.meta
new file mode 100644
index 00000000..1fd930d8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1RelativeOid.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 91715840bb32d704cb27b905f3b08e35
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Sequence.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Sequence.cs
new file mode 100644
index 00000000..d93f3c03
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Sequence.cs
@@ -0,0 +1,284 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class Asn1Sequence
+ : Asn1Object, IEnumerable
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(Asn1Sequence), Asn1Tags.Sequence) {}
+
+ internal override Asn1Object FromImplicitConstructed(Asn1Sequence sequence)
+ {
+ return sequence;
+ }
+ }
+
+ /**
+ * return an Asn1Sequence from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static Asn1Sequence GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is Asn1Sequence asn1Sequence)
+ return asn1Sequence;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is Asn1Sequence converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (Asn1Sequence)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct sequence from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Return an ASN1 sequence from a tagged object. There is a special
+ * case here, if an object appears to have been explicitly tagged on
+ * reading but we were expecting it to be implicitly tagged in the
+ * normal course of events it indicates that we lost the surrounding
+ * sequence - so we need to add it back (this will happen if the tagged
+ * object is a sequence that contains other sequences). If you are
+ * dealing with implicitly tagged sequences you really should
+ * be using this method.
+ *
+ * @param taggedObject the tagged object.
+ * @param declaredExplicit true if the object is meant to be explicitly tagged, false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static Asn1Sequence GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (Asn1Sequence)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ // NOTE: Only non-readonly to support LazyDLSequence
+ internal Asn1Encodable[] elements;
+
+ protected internal Asn1Sequence()
+ {
+ this.elements = Asn1EncodableVector.EmptyElements;
+ }
+
+ protected internal Asn1Sequence(Asn1Encodable element)
+ {
+ if (null == element)
+ throw new ArgumentNullException(nameof(element));
+
+ this.elements = new Asn1Encodable[]{ element };
+ }
+
+ protected internal Asn1Sequence(Asn1Encodable element1, Asn1Encodable element2)
+ {
+ if (null == element1)
+ throw new ArgumentNullException(nameof(element1));
+ if (null == element2)
+ throw new ArgumentNullException(nameof(element2));
+
+ this.elements = new Asn1Encodable[]{ element1, element2 };
+ }
+
+ protected internal Asn1Sequence(params Asn1Encodable[] elements)
+ {
+ if (Arrays.IsNullOrContainsNull(elements))
+ throw new NullReferenceException("'elements' cannot be null, or contain null");
+
+ this.elements = Asn1EncodableVector.CloneElements(elements);
+ }
+
+ internal Asn1Sequence(Asn1Encodable[] elements, bool clone)
+ {
+ this.elements = clone ? Asn1EncodableVector.CloneElements(elements) : elements;
+ }
+
+ protected internal Asn1Sequence(Asn1EncodableVector elementVector)
+ {
+ if (null == elementVector)
+ throw new ArgumentNullException("elementVector");
+
+ this.elements = elementVector.TakeElements();
+ }
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public virtual IEnumerator GetEnumerator()
+ {
+ IEnumerable e = elements;
+ return e.GetEnumerator();
+ }
+
+ private class Asn1SequenceParserImpl
+ : Asn1SequenceParser
+ {
+ private readonly Asn1Sequence outer;
+ private readonly int max;
+ private int index;
+
+ public Asn1SequenceParserImpl(
+ Asn1Sequence outer)
+ {
+ this.outer = outer;
+ // NOTE: Call Count here to 'force' a LazyDerSequence
+ this.max = outer.Count;
+ }
+
+ public IAsn1Convertible ReadObject()
+ {
+ if (index == max)
+ return null;
+
+ Asn1Encodable obj = outer[index++];
+
+ if (obj is Asn1Sequence)
+ return ((Asn1Sequence)obj).Parser;
+
+ if (obj is Asn1Set)
+ return ((Asn1Set)obj).Parser;
+
+ // NB: Asn1OctetString implements Asn1OctetStringParser directly
+// if (obj is Asn1OctetString)
+// return ((Asn1OctetString)obj).Parser;
+
+ return obj;
+ }
+
+ public Asn1Object ToAsn1Object()
+ {
+ return outer;
+ }
+ }
+
+ public virtual Asn1SequenceParser Parser
+ {
+ get { return new Asn1SequenceParserImpl(this); }
+ }
+
+ /**
+ * return the object at the sequence position indicated by index.
+ *
+ * @param index the sequence number (starting at zero) of the object
+ * @return the object at the sequence position indicated by index.
+ */
+ public virtual Asn1Encodable this[int index]
+ {
+ get { return elements[index]; }
+ }
+
+ public virtual int Count
+ {
+ get { return elements.Length; }
+ }
+
+ public virtual T[] MapElements(Func func)
+ {
+ // NOTE: Call Count here to 'force' a LazyDerSequence
+ int count = Count;
+ T[] result = new T[count];
+ for (int i = 0; i < count; ++i)
+ {
+ result[i] = func(elements[i]);
+ }
+ return result;
+ }
+
+ public virtual Asn1Encodable[] ToArray()
+ {
+ return Asn1EncodableVector.CloneElements(elements);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ // NOTE: Call Count here to 'force' a LazyDerSequence
+ int i = Count;
+ int hc = i + 1;
+
+ while (--i >= 0)
+ {
+ hc *= 257;
+ hc ^= elements[i].ToAsn1Object().CallAsn1GetHashCode();
+ }
+
+ return hc;
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ Asn1Sequence that = asn1Object as Asn1Sequence;
+ if (null == that)
+ return false;
+
+ // NOTE: Call Count here (on both) to 'force' a LazyDerSequence
+ int count = this.Count;
+ if (that.Count != count)
+ return false;
+
+ for (int i = 0; i < count; ++i)
+ {
+ Asn1Object o1 = this.elements[i].ToAsn1Object();
+ Asn1Object o2 = that.elements[i].ToAsn1Object();
+
+ if (!o1.Equals(o2))
+ return false;
+ }
+
+ return true;
+ }
+
+ public override string ToString()
+ {
+ return CollectionUtilities.ToString(elements);
+ }
+
+ // TODO[asn1] Preferably return an Asn1BitString[] (doesn't exist yet)
+ internal DerBitString[] GetConstructedBitStrings()
+ {
+ return MapElements(DerBitString.GetInstance);
+ }
+
+ internal Asn1OctetString[] GetConstructedOctetStrings()
+ {
+ return MapElements(Asn1OctetString.GetInstance);
+ }
+
+ // TODO[asn1] Preferably return an Asn1BitString (doesn't exist yet)
+ internal abstract DerBitString ToAsn1BitString();
+
+ // TODO[asn1] Preferably return an Asn1External (doesn't exist yet)
+ internal abstract DerExternal ToAsn1External();
+
+ internal abstract Asn1OctetString ToAsn1OctetString();
+
+ internal abstract Asn1Set ToAsn1Set();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Sequence.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Sequence.cs.meta
new file mode 100644
index 00000000..d9e73949
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Sequence.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f6142db4c291df94f9783fc3a2ab531c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Set.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Set.cs
new file mode 100644
index 00000000..b24c4c46
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Set.cs
@@ -0,0 +1,331 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class Asn1Set
+ : Asn1Object, IEnumerable
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(Asn1Set), Asn1Tags.Set) {}
+
+ internal override Asn1Object FromImplicitConstructed(Asn1Sequence sequence)
+ {
+ return sequence.ToAsn1Set();
+ }
+ }
+
+ /**
+ * return an ASN1Set from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static Asn1Set GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is Asn1Set asn1Set)
+ return asn1Set;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is Asn1Set converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (Asn1Set)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct set from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Return an ASN1 set from a tagged object. There is a special
+ * case here, if an object appears to have been explicitly tagged on
+ * reading but we were expecting it to be implicitly tagged in the
+ * normal course of events it indicates that we lost the surrounding
+ * set - so we need to add it back (this will happen if the tagged
+ * object is a sequence that contains other sequences). If you are
+ * dealing with implicitly tagged sets you really should
+ * be using this method.
+ *
+ * @param taggedObject the tagged object.
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static Asn1Set GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (Asn1Set)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ // NOTE: Only non-readonly to support LazyDLSet
+ internal Asn1Encodable[] elements;
+ internal bool isSorted;
+
+ protected internal Asn1Set()
+ {
+ this.elements = Asn1EncodableVector.EmptyElements;
+ this.isSorted = true;
+ }
+
+ protected internal Asn1Set(Asn1Encodable element)
+ {
+ if (null == element)
+ throw new ArgumentNullException("element");
+
+ this.elements = new Asn1Encodable[]{ element };
+ this.isSorted = true;
+ }
+
+ protected internal Asn1Set(Asn1Encodable[] elements, bool doSort)
+ {
+ if (Arrays.IsNullOrContainsNull(elements))
+ throw new NullReferenceException("'elements' cannot be null, or contain null");
+
+ Asn1Encodable[] tmp = Asn1EncodableVector.CloneElements(elements);
+ if (doSort && tmp.Length >= 2)
+ {
+ tmp = Sort(tmp);
+ }
+
+ this.elements = tmp;
+ this.isSorted = doSort || tmp.Length < 2;
+ }
+
+ protected internal Asn1Set(Asn1EncodableVector elementVector, bool doSort)
+ {
+ if (null == elementVector)
+ throw new ArgumentNullException("elementVector");
+
+ Asn1Encodable[] tmp;
+ if (doSort && elementVector.Count >= 2)
+ {
+ tmp = Sort(elementVector.CopyElements());
+ }
+ else
+ {
+ tmp = elementVector.TakeElements();
+ }
+
+ this.elements = tmp;
+ this.isSorted = doSort || tmp.Length < 2;
+ }
+
+ protected internal Asn1Set(bool isSorted, Asn1Encodable[] elements)
+ {
+ this.elements = elements;
+ this.isSorted = isSorted || elements.Length < 2;
+ }
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public virtual IEnumerator GetEnumerator()
+ {
+ IEnumerable e = elements;
+ return e.GetEnumerator();
+ }
+
+ /**
+ * return the object at the set position indicated by index.
+ *
+ * @param index the set number (starting at zero) of the object
+ * @return the object at the set position indicated by index.
+ */
+ public virtual Asn1Encodable this[int index]
+ {
+ get { return elements[index]; }
+ }
+
+ public virtual int Count
+ {
+ get { return elements.Length; }
+ }
+
+ public virtual T[] MapElements(Func func)
+ {
+ // NOTE: Call Count here to 'force' a LazyDerSet
+ int count = Count;
+ T[] result = new T[count];
+ for (int i = 0; i < count; ++i)
+ {
+ result[i] = func(elements[i]);
+ }
+ return result;
+ }
+
+ public virtual Asn1Encodable[] ToArray()
+ {
+ return Asn1EncodableVector.CloneElements(elements);
+ }
+
+ private class Asn1SetParserImpl
+ : Asn1SetParser
+ {
+ private readonly Asn1Set outer;
+ private readonly int max;
+ private int index;
+
+ public Asn1SetParserImpl(
+ Asn1Set outer)
+ {
+ this.outer = outer;
+ // NOTE: Call Count here to 'force' a LazyDerSet
+ this.max = outer.Count;
+ }
+
+ public IAsn1Convertible ReadObject()
+ {
+ if (index == max)
+ return null;
+
+ Asn1Encodable obj = outer[index++];
+ if (obj is Asn1Sequence)
+ return ((Asn1Sequence)obj).Parser;
+
+ if (obj is Asn1Set)
+ return ((Asn1Set)obj).Parser;
+
+ // NB: Asn1OctetString implements Asn1OctetStringParser directly
+// if (obj is Asn1OctetString)
+// return ((Asn1OctetString)obj).Parser;
+
+ return obj;
+ }
+
+ public virtual Asn1Object ToAsn1Object()
+ {
+ return outer;
+ }
+ }
+
+ public Asn1SetParser Parser
+ {
+ get { return new Asn1SetParserImpl(this); }
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ // NOTE: Call Count here to 'force' a LazyDerSet
+ int i = Count;
+ int hc = i + 1;
+
+ while (--i >= 0)
+ {
+ hc *= 257;
+ hc ^= elements[i].ToAsn1Object().CallAsn1GetHashCode();
+ }
+
+ return hc;
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ Asn1Set that = asn1Object as Asn1Set;
+ if (null == that)
+ return false;
+
+ // NOTE: Call Count here (on both) to 'force' a LazyDerSet
+ int count = this.Count;
+ if (that.Count != count)
+ return false;
+
+ for (int i = 0; i < count; ++i)
+ {
+ Asn1Object o1 = this.elements[i].ToAsn1Object();
+ Asn1Object o2 = that.elements[i].ToAsn1Object();
+
+ if (!o1.Equals(o2))
+ return false;
+ }
+
+ return true;
+ }
+
+ public override string ToString()
+ {
+ return CollectionUtilities.ToString(elements);
+ }
+
+ internal static Asn1Encodable[] Sort(Asn1Encodable[] elements)
+ {
+ int count = elements.Length;
+ if (count < 2)
+ return elements;
+
+ byte[][] keys = new byte[count][];
+ for (int i = 0; i < count; ++i)
+ {
+ keys[i] = elements[i].GetEncoded(Der);
+ }
+ Array.Sort(keys, elements, new DerComparer());
+ return elements;
+ }
+
+ private class DerComparer
+ : IComparer
+ {
+ public int Compare(byte[] a, byte[] b)
+ {
+ Debug.Assert(a.Length >= 2 && b.Length >= 2);
+
+ /*
+ * NOTE: Set elements in DER encodings are ordered first according to their tags (class and
+ * number); the CONSTRUCTED bit is not part of the tag.
+ *
+ * For SET-OF, this is unimportant. All elements have the same tag and DER requires them to
+ * either all be in constructed form or all in primitive form, according to that tag. The
+ * elements are effectively ordered according to their content octets.
+ *
+ * For SET, the elements will have distinct tags, and each will be in constructed or
+ * primitive form accordingly. Failing to ignore the CONSTRUCTED bit could therefore lead to
+ * ordering inversions.
+ */
+ int a0 = a[0] & ~Asn1Tags.Constructed;
+ int b0 = b[0] & ~Asn1Tags.Constructed;
+ if (a0 != b0)
+ return a0 < b0 ? -1 : 1;
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ int compareLength = System.Math.Min(a.Length, b.Length) - 1;
+ return a.AsSpan(1, compareLength).SequenceCompareTo(b.AsSpan(1, compareLength));
+#else
+ int len = System.Math.Min(a.Length, b.Length);
+ for (int i = 1; i < len; ++i)
+ {
+ byte ai = a[i], bi = b[i];
+ if (ai != bi)
+ return ai < bi ? -1 : 1;
+ }
+ Debug.Assert(a.Length == b.Length);
+ return 0;
+#endif
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Set.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Set.cs.meta
new file mode 100644
index 00000000..82cc8243
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Set.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 19cbe864b3e49ea4ba93776bdcc68b1e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tag.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tag.cs
new file mode 100644
index 00000000..5a64230a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tag.cs
@@ -0,0 +1,35 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal sealed class Asn1Tag
+ {
+ internal static Asn1Tag Create(int tagClass, int tagNo)
+ {
+ return new Asn1Tag(tagClass, tagNo);
+ }
+
+ private readonly int m_tagClass;
+ private readonly int m_tagNo;
+
+ private Asn1Tag(int tagClass, int tagNo)
+ {
+ m_tagClass = tagClass;
+ m_tagNo = tagNo;
+ }
+
+ internal int TagClass
+ {
+ get { return m_tagClass; }
+ }
+
+ internal int TagNo
+ {
+ get { return m_tagNo; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tag.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tag.cs.meta
new file mode 100644
index 00000000..a10b4c3d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tag.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3365721bf28b1da45a5cd228c0b0bc75
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1TaggedObject.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1TaggedObject.cs
new file mode 100644
index 00000000..fcfa3eba
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1TaggedObject.cs
@@ -0,0 +1,409 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * ASN.1 TaggedObject - in ASN.1 notation this is any object preceded by
+ * a [n] where n is some number - these are assumed to follow the construction
+ * rules (as with sequences).
+ */
+ public abstract class Asn1TaggedObject
+ : Asn1Object, Asn1TaggedObjectParser
+ {
+ private const int DeclaredExplicit = 1;
+ private const int DeclaredImplicit = 2;
+ // TODO It will probably be better to track parsing constructed vs primitive instead
+ private const int ParsedExplicit = 3;
+ private const int ParsedImplicit = 4;
+
+ public static Asn1TaggedObject GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is Asn1TaggedObject asn1TaggedObject)
+ return asn1TaggedObject;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is Asn1TaggedObject converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return CheckedCast(FromByteArray(bytes));
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct tagged object from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static Asn1TaggedObject GetInstance(object obj, int tagClass)
+ {
+ if (obj == null)
+ throw new ArgumentNullException(nameof(obj));
+
+ Asn1TaggedObject taggedObject = GetInstance(obj);
+ if (tagClass != taggedObject.TagClass)
+ throw new ArgumentException("unexpected tag in GetInstance: " + Asn1Utilities.GetTagText(taggedObject));
+
+ return taggedObject;
+ }
+
+ public static Asn1TaggedObject GetInstance(object obj, int tagClass, int tagNo)
+ {
+ if (obj == null)
+ throw new ArgumentNullException(nameof(obj));
+
+ Asn1TaggedObject taggedObject = GetInstance(obj);
+ if (!taggedObject.HasTag(tagClass, tagNo))
+ throw new ArgumentException("unexpected tag in GetInstance: " + Asn1Utilities.GetTagText(taggedObject));
+
+ return taggedObject;
+ }
+
+ public static Asn1TaggedObject GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ if (Asn1Tags.ContextSpecific != taggedObject.TagClass)
+ throw new InvalidOperationException("this method only valid for CONTEXT_SPECIFIC tags");
+
+ if (declaredExplicit)
+ return taggedObject.GetExplicitBaseTagged();
+
+ throw new ArgumentException("this method not valid for implicitly tagged tagged objects");
+ }
+
+ internal readonly int explicitness;
+ internal readonly int tagClass;
+ internal readonly int tagNo;
+ internal readonly Asn1Encodable obj;
+
+ /**
+ * @param explicitly true if the object is explicitly tagged.
+ * @param tagNo the tag number for this object.
+ * @param obj the tagged object.
+ */
+ protected Asn1TaggedObject(bool isExplicit, int tagNo, Asn1Encodable obj)
+ : this(isExplicit, Asn1Tags.ContextSpecific, tagNo, obj)
+ {
+ }
+
+ protected Asn1TaggedObject(bool isExplicit, int tagClass, int tagNo, Asn1Encodable obj)
+ : this(isExplicit ? DeclaredExplicit : DeclaredImplicit, tagClass, tagNo, obj)
+ {
+ }
+
+ internal Asn1TaggedObject(int explicitness, int tagClass, int tagNo, Asn1Encodable obj)
+ {
+ if (null == obj)
+ throw new ArgumentNullException("obj");
+ if (Asn1Tags.Universal == tagClass || (tagClass & Asn1Tags.Private) != tagClass)
+ throw new ArgumentException("invalid tag class: " + tagClass, "tagClass");
+
+ this.explicitness = (obj is IAsn1Choice) ? DeclaredExplicit : explicitness;
+ this.tagClass = tagClass;
+ this.tagNo = tagNo;
+ this.obj = obj;
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ Asn1TaggedObject that = asn1Object as Asn1TaggedObject;
+ if (null == that || this.tagNo != that.tagNo || this.tagClass != that.tagClass)
+ return false;
+
+ if (this.explicitness != that.explicitness)
+ {
+ /*
+ * TODO This seems incorrect for some cases of implicit tags e.g. if one is a
+ * declared-implicit SET and the other a parsed object.
+ */
+ if (this.IsExplicit() != that.IsExplicit())
+ return false;
+ }
+
+ Asn1Object p1 = this.obj.ToAsn1Object();
+ Asn1Object p2 = that.obj.ToAsn1Object();
+
+ if (p1 == p2)
+ return true;
+
+ if (!this.IsExplicit())
+ {
+ try
+ {
+ byte[] d1 = this.GetEncoded();
+ byte[] d2 = that.GetEncoded();
+
+ return Arrays.AreEqual(d1, d2);
+ }
+ catch (IOException)
+ {
+ return false;
+ }
+ }
+
+ return p1.CallAsn1Equals(p2);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return (tagClass * 7919) ^ tagNo ^ (IsExplicit() ? 0x0F : 0xF0) ^ obj.ToAsn1Object().CallAsn1GetHashCode();
+ }
+
+ public int TagClass
+ {
+ get { return tagClass; }
+ }
+
+ public int TagNo
+ {
+ get { return tagNo; }
+ }
+
+ public bool HasContextTag(int tagNo)
+ {
+ return this.tagClass == Asn1Tags.ContextSpecific && this.tagNo == tagNo;
+ }
+
+ public bool HasTag(int tagClass, int tagNo)
+ {
+ return this.tagClass == tagClass && this.tagNo == tagNo;
+ }
+
+ /**
+ * return whether or not the object may be explicitly tagged.
+ *
+ * Note: if the object has been read from an input stream, the only
+ * time you can be sure if isExplicit is returning the true state of
+ * affairs is if it returns false. An implicitly tagged object may appear
+ * to be explicitly tagged, so you need to understand the context under
+ * which the reading was done as well, see GetObject below.
+ */
+ public bool IsExplicit()
+ {
+ // TODO New methods like 'IsKnownExplicit' etc. to distinguish uncertain cases?
+ switch (explicitness)
+ {
+ case DeclaredExplicit:
+ case ParsedExplicit:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ internal bool IsParsed()
+ {
+ switch (explicitness)
+ {
+ case ParsedExplicit:
+ case ParsedImplicit:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ /**
+ * return whatever was following the tag.
+ *
+ * Note: tagged objects are generally context dependent if you're
+ * trying to extract a tagged object you should be going via the
+ * appropriate GetInstance method.
+ */
+ public Asn1Object GetObject()
+ {
+ if (Asn1Tags.ContextSpecific != TagClass)
+ throw new InvalidOperationException("this method only valid for CONTEXT_SPECIFIC tags");
+
+ return obj.ToAsn1Object();
+ }
+
+ /**
+ * Needed for open types, until we have better type-guided parsing support. Use sparingly for other
+ * purposes, and prefer {@link #getExplicitBaseTagged()}, {@link #getImplicitBaseTagged(int, int)} or
+ * {@link #getBaseUniversal(boolean, int)} where possible. Before using, check for matching tag
+ * {@link #getTagClass() class} and {@link #getTagNo() number}.
+ */
+ public Asn1Encodable GetBaseObject()
+ {
+ return obj;
+ }
+
+ /**
+ * Needed for open types, until we have better type-guided parsing support. Use
+ * sparingly for other purposes, and prefer {@link #getExplicitBaseTagged()} or
+ * {@link #getBaseUniversal(boolean, int)} where possible. Before using, check
+ * for matching tag {@link #getTagClass() class} and {@link #getTagNo() number}.
+ */
+ public Asn1Encodable GetExplicitBaseObject()
+ {
+ if (!IsExplicit())
+ throw new InvalidOperationException("object implicit - explicit expected.");
+
+ return obj;
+ }
+
+ public Asn1TaggedObject GetExplicitBaseTagged()
+ {
+ if (!IsExplicit())
+ throw new InvalidOperationException("object implicit - explicit expected.");
+
+ return CheckedCast(obj.ToAsn1Object());
+ }
+
+ public Asn1TaggedObject GetImplicitBaseTagged(int baseTagClass, int baseTagNo)
+ {
+ if (Asn1Tags.Universal == baseTagClass || (baseTagClass & Asn1Tags.Private) != baseTagClass)
+ throw new ArgumentException("invalid base tag class: " + baseTagClass, "baseTagClass");
+
+ switch (explicitness)
+ {
+ case DeclaredExplicit:
+ throw new InvalidOperationException("object explicit - implicit expected.");
+
+ case DeclaredImplicit:
+ {
+ Asn1TaggedObject declared = CheckedCast(obj.ToAsn1Object());
+ return Asn1Utilities.CheckTag(declared, baseTagClass, baseTagNo);
+ }
+
+ // Parsed; return a virtual tag (i.e. that couldn't have been present in the encoding)
+ default:
+ return ReplaceTag(baseTagClass, baseTagNo);
+ }
+ }
+
+ public Asn1Object GetBaseUniversal(bool declaredExplicit, int tagNo)
+ {
+ Asn1UniversalType universalType = Asn1UniversalTypes.Get(tagNo);
+ if (null == universalType)
+ throw new ArgumentException("unsupported UNIVERSAL tag number: " + tagNo, "tagNo");
+
+ return GetBaseUniversal(declaredExplicit, universalType);
+ }
+
+ internal Asn1Object GetBaseUniversal(bool declaredExplicit, Asn1UniversalType universalType)
+ {
+ if (declaredExplicit)
+ {
+ if (!IsExplicit())
+ throw new InvalidOperationException("object explicit - implicit expected.");
+
+ return universalType.CheckedCast(obj.ToAsn1Object());
+ }
+
+ if (DeclaredExplicit == explicitness)
+ throw new InvalidOperationException("object explicit - implicit expected.");
+
+ Asn1Object baseObject = obj.ToAsn1Object();
+ switch (explicitness)
+ {
+ case ParsedExplicit:
+ return universalType.FromImplicitConstructed(RebuildConstructed(baseObject));
+ case ParsedImplicit:
+ {
+ if (baseObject is Asn1Sequence asn1Sequence)
+ return universalType.FromImplicitConstructed(asn1Sequence);
+
+ return universalType.FromImplicitPrimitive((DerOctetString)baseObject);
+ }
+ default:
+ return universalType.CheckedCast(baseObject);
+ }
+ }
+
+ public IAsn1Convertible ParseBaseUniversal(bool declaredExplicit, int baseTagNo)
+ {
+ Asn1Object asn1Object = GetBaseUniversal(declaredExplicit, baseTagNo);
+
+ switch (baseTagNo)
+ {
+ case Asn1Tags.BitString:
+ return ((DerBitString)asn1Object).Parser;
+ case Asn1Tags.OctetString:
+ return ((Asn1OctetString)asn1Object).Parser;
+ case Asn1Tags.Sequence:
+ return ((Asn1Sequence)asn1Object).Parser;
+ case Asn1Tags.Set:
+ return ((Asn1Set)asn1Object).Parser;
+ }
+
+ return asn1Object;
+ }
+
+ public IAsn1Convertible ParseExplicitBaseObject()
+ {
+ return GetExplicitBaseObject();
+ }
+
+ public Asn1TaggedObjectParser ParseExplicitBaseTagged()
+ {
+ return GetExplicitBaseTagged();
+ }
+
+ public Asn1TaggedObjectParser ParseImplicitBaseTagged(int baseTagClass, int baseTagNo)
+ {
+ return GetImplicitBaseTagged(baseTagClass, baseTagNo);
+ }
+
+ public override string ToString()
+ {
+ return Asn1Utilities.GetTagText(tagClass, tagNo) + obj;
+ }
+
+ internal abstract string Asn1Encoding { get; }
+
+ internal abstract Asn1Sequence RebuildConstructed(Asn1Object asn1Object);
+
+ internal abstract Asn1TaggedObject ReplaceTag(int tagClass, int tagNo);
+
+ internal static Asn1Object CreateConstructedDL(int tagClass, int tagNo, Asn1EncodableVector contentsElements)
+ {
+ bool maybeExplicit = (contentsElements.Count == 1);
+
+ return maybeExplicit
+ ? new DLTaggedObject(ParsedExplicit, tagClass, tagNo, contentsElements[0])
+ : new DLTaggedObject(ParsedImplicit, tagClass, tagNo, DLSequence.FromVector(contentsElements));
+ }
+
+ internal static Asn1Object CreateConstructedIL(int tagClass, int tagNo, Asn1EncodableVector contentsElements)
+ {
+ bool maybeExplicit = (contentsElements.Count == 1);
+
+ return maybeExplicit
+ ? new BerTaggedObject(ParsedExplicit, tagClass, tagNo, contentsElements[0])
+ : new BerTaggedObject(ParsedImplicit, tagClass, tagNo, BerSequence.FromVector(contentsElements));
+ }
+
+ internal static Asn1Object CreatePrimitive(int tagClass, int tagNo, byte[] contentsOctets)
+ {
+ // Note: !CONSTRUCTED => IMPLICIT
+ return new DLTaggedObject(ParsedImplicit, tagClass, tagNo, new DerOctetString(contentsOctets));
+ }
+
+ private static Asn1TaggedObject CheckedCast(Asn1Object asn1Object)
+ {
+ Asn1TaggedObject taggedObject = asn1Object as Asn1TaggedObject;
+ if (null != taggedObject)
+ return taggedObject;
+
+ throw new InvalidOperationException("unexpected object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(asn1Object));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1TaggedObject.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1TaggedObject.cs.meta
new file mode 100644
index 00000000..fc66532d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1TaggedObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f0f0c13fb231eed4e855220942c52d6e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tags.cs
new file mode 100644
index 00000000..1206d2e7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tags.cs
@@ -0,0 +1,53 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class Asn1Tags
+ {
+ public const int Boolean = 0x01;
+ public const int Integer = 0x02;
+ public const int BitString = 0x03;
+ public const int OctetString = 0x04;
+ public const int Null = 0x05;
+ public const int ObjectIdentifier = 0x06;
+ public const int ObjectDescriptor = 0x07;
+ public const int External = 0x08;
+ public const int Real = 0x09;
+ public const int Enumerated = 0x0a;
+ public const int EmbeddedPdv = 0x0b;
+ public const int Utf8String = 0x0c;
+ public const int RelativeOid = 0x0d;
+ // NOTE: 14-15 are reserved.
+ public const int Sequence = 0x10;
+ public const int SequenceOf = 0x10; // for completeness
+ public const int Set = 0x11;
+ public const int SetOf = 0x11; // for completeness
+
+ public const int NumericString = 0x12;
+ public const int PrintableString = 0x13;
+ public const int T61String = 0x14;
+ public const int VideotexString = 0x15;
+ public const int IA5String = 0x16;
+ public const int UtcTime = 0x17;
+ public const int GeneralizedTime = 0x18;
+ public const int GraphicString = 0x19;
+ public const int VisibleString = 0x1a;
+ public const int GeneralString = 0x1b;
+ public const int UniversalString = 0x1c;
+ public const int UnrestrictedString = 0x1d;
+ public const int BmpString = 0x1e;
+
+ public const int Constructed = 0x20;
+
+ public const int Universal = 0x00;
+ public const int Application = 0x40;
+ public const int ContextSpecific = 0x80;
+ public const int Private = 0xC0;
+
+ public const int Flags = 0xE0;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tags.cs.meta
new file mode 100644
index 00000000..1c796dde
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Tags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ab7dd4c87b823e7419783ae09616970a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Type.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Type.cs
new file mode 100644
index 00000000..cc7cdfb7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Type.cs
@@ -0,0 +1,33 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal abstract class Asn1Type
+ {
+ internal readonly Type m_platformType;
+
+ internal Asn1Type(Type platformType)
+ {
+ m_platformType = platformType;
+ }
+
+ internal Type PlatformType
+ {
+ get { return m_platformType; }
+ }
+
+ public sealed override bool Equals(object that)
+ {
+ return this == that;
+ }
+
+ public sealed override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Type.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Type.cs.meta
new file mode 100644
index 00000000..2092b97b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Type.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 05aba7ee1ff30564eafbd48bf7a419d4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalType.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalType.cs
new file mode 100644
index 00000000..b89507b3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalType.cs
@@ -0,0 +1,63 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+#if UNITY_WSA && !UNITY_EDITOR && !ENABLE_IL2CPP
+using System.TypeFix;
+#endif
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal abstract class Asn1UniversalType
+ : Asn1Type
+ {
+ internal readonly Asn1Tag m_tag;
+
+ internal Asn1UniversalType(Type platformType, int tagNo)
+ : base(platformType)
+ {
+ m_tag = Asn1Tag.Create(Asn1Tags.Universal, tagNo);
+ }
+
+ internal Asn1Object CheckedCast(Asn1Object asn1Object)
+ {
+ if (PlatformType.IsInstanceOfType(asn1Object))
+ return asn1Object;
+
+ throw new InvalidOperationException("unexpected object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(asn1Object));
+ }
+
+ internal virtual Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ throw new InvalidOperationException("unexpected implicit primitive encoding");
+ }
+
+ internal virtual Asn1Object FromImplicitConstructed(Asn1Sequence sequence)
+ {
+ throw new InvalidOperationException("unexpected implicit constructed encoding");
+ }
+
+ ///
+ internal Asn1Object FromByteArray(byte[] bytes)
+ {
+ return CheckedCast(Asn1Object.FromByteArray(bytes));
+ }
+
+ internal Asn1Object GetContextInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ if (Asn1Tags.ContextSpecific != taggedObject.TagClass)
+ throw new InvalidOperationException("this method only valid for CONTEXT_SPECIFIC tags");
+
+ return CheckedCast(taggedObject.GetBaseUniversal(declaredExplicit, this));
+ }
+
+ internal Asn1Tag Tag
+ {
+ get { return m_tag; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalType.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalType.cs.meta
new file mode 100644
index 00000000..a97d675c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalType.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5402b2db701c12744a8d53907cda870e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalTypes.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalTypes.cs
new file mode 100644
index 00000000..7edd8adf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalTypes.cs
@@ -0,0 +1,78 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal sealed class Asn1UniversalTypes
+ {
+ private Asn1UniversalTypes()
+ {
+ }
+
+ internal static Asn1UniversalType Get(int tagNo)
+ {
+ switch (tagNo)
+ {
+ case Asn1Tags.Boolean:
+ return DerBoolean.Meta.Instance;
+ case Asn1Tags.Integer:
+ return DerInteger.Meta.Instance;
+ case Asn1Tags.BitString:
+ return DerBitString.Meta.Instance;
+ case Asn1Tags.OctetString:
+ return Asn1OctetString.Meta.Instance;
+ case Asn1Tags.Null:
+ return Asn1Null.Meta.Instance;
+ case Asn1Tags.ObjectIdentifier:
+ return DerObjectIdentifier.Meta.Instance;
+ case Asn1Tags.ObjectDescriptor: // [UNIVERSAL 7] IMPLICIT GraphicString
+ return Asn1ObjectDescriptor.Meta.Instance;
+ case Asn1Tags.External:
+ return DerExternal.Meta.Instance;
+ case Asn1Tags.Enumerated:
+ return DerEnumerated.Meta.Instance;
+ case Asn1Tags.Utf8String: // [UNIVERSAL 12] IMPLICIT OCTET STRING (encode as if)
+ return DerUtf8String.Meta.Instance;
+ case Asn1Tags.RelativeOid:
+ return Asn1RelativeOid.Meta.Instance;
+ case Asn1Tags.Sequence:
+ return Asn1Sequence.Meta.Instance;
+ case Asn1Tags.Set:
+ return Asn1Set.Meta.Instance;
+ case Asn1Tags.NumericString: // [UNIVERSAL 18] IMPLICIT OCTET STRING (encode as if)
+ return DerNumericString.Meta.Instance;
+ case Asn1Tags.PrintableString: // [UNIVERSAL 19] IMPLICIT OCTET STRING (encode as if)
+ return DerPrintableString.Meta.Instance;
+ case Asn1Tags.T61String: // [UNIVERSAL 20] IMPLICIT OCTET STRING (encode as if)
+ return DerT61String.Meta.Instance;
+ case Asn1Tags.VideotexString: // [UNIVERSAL 21] IMPLICIT OCTET STRING (encode as if)
+ return DerVideotexString.Meta.Instance;
+ case Asn1Tags.IA5String: // [UNIVERSAL 22] IMPLICIT OCTET STRING (encode as if)
+ return DerIA5String.Meta.Instance;
+ case Asn1Tags.UtcTime: // [UNIVERSAL 23] IMPLICIT VisibleString (restricted values)
+ return Asn1UtcTime.Meta.Instance;
+ case Asn1Tags.GeneralizedTime: // [UNIVERSAL 24] IMPLICIT VisibleString (restricted values)
+ return Asn1GeneralizedTime.Meta.Instance;
+ case Asn1Tags.GraphicString: // [UNIVERSAL 25] IMPLICIT OCTET STRING (encode as if)
+ return DerGraphicString.Meta.Instance;
+ case Asn1Tags.VisibleString: // [UNIVERSAL 26] IMPLICIT OCTET STRING (encode as if)
+ return DerVisibleString.Meta.Instance;
+ case Asn1Tags.GeneralString: // [UNIVERSAL 27] IMPLICIT OCTET STRING (encode as if)
+ return DerGeneralString.Meta.Instance;
+ case Asn1Tags.UniversalString: // [UNIVERSAL 28] IMPLICIT OCTET STRING (encode as if)
+ return DerUniversalString.Meta.Instance;
+ case Asn1Tags.BmpString: // [UNIVERSAL 30] IMPLICIT OCTET STRING (encode as if)
+ return DerBmpString.Meta.Instance;
+
+ case Asn1Tags.Real:
+ case Asn1Tags.EmbeddedPdv:
+ case Asn1Tags.UnrestrictedString:
+ default:
+ return null;
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalTypes.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalTypes.cs.meta
new file mode 100644
index 00000000..de8134bc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UniversalTypes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fbcae4ac01ba20647a8a3924a283ad45
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UtcTime.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UtcTime.cs
new file mode 100644
index 00000000..02afcfa4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UtcTime.cs
@@ -0,0 +1,257 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Globalization;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /// UTCTime ASN.1 type
+ public class Asn1UtcTime
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(Asn1UtcTime), Asn1Tags.UtcTime) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return a UTC Time from the passed in object.
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static Asn1UtcTime GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is Asn1UtcTime asn1UtcTime)
+ return asn1UtcTime;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is Asn1UtcTime converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (Asn1UtcTime)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct UTC time from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ public static Asn1UtcTime GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (Asn1UtcTime)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly string m_timeString;
+ private readonly DateTime m_dateTime;
+ private readonly bool m_dateTimeLocked;
+ private readonly int m_twoDigitYearMax;
+
+ public Asn1UtcTime(string timeString)
+ {
+ m_timeString = timeString ?? throw new ArgumentNullException(nameof(timeString));
+
+ try
+ {
+ m_dateTime = FromString(timeString, out m_twoDigitYearMax);
+ m_dateTimeLocked = false;
+ }
+ catch (FormatException e)
+ {
+ throw new ArgumentException("invalid date string: " + e.Message);
+ }
+ }
+
+
+ public Asn1UtcTime(DateTime dateTime)
+ {
+ dateTime = DateTimeUtilities.WithPrecisionSecond(dateTime.ToUniversalTime());
+
+ m_dateTime = dateTime;
+ m_dateTimeLocked = true;
+ m_timeString = ToStringCanonical(dateTime, out m_twoDigitYearMax);
+ }
+
+ public Asn1UtcTime(DateTime dateTime, int twoDigitYearMax)
+ {
+ dateTime = DateTimeUtilities.WithPrecisionSecond(dateTime.ToUniversalTime());
+
+ Validate(dateTime, twoDigitYearMax);
+
+ m_dateTime = dateTime;
+ m_dateTimeLocked = true;
+ m_timeString = ToStringCanonical(dateTime);
+ m_twoDigitYearMax = twoDigitYearMax;
+ }
+
+ internal Asn1UtcTime(byte[] contents)
+ // NOTE: Non-ASCII characters will produce '?' characters, which will fail DateTime parsing
+ : this(Encoding.ASCII.GetString(contents))
+ {
+ }
+
+ public string TimeString => m_timeString;
+
+ public DateTime ToDateTime()
+ {
+ return m_dateTime;
+ }
+
+ public DateTime ToDateTime(int twoDigitYearMax)
+ {
+ if (InRange(m_dateTime, twoDigitYearMax))
+ return m_dateTime;
+
+ if (m_dateTimeLocked)
+ throw new InvalidOperationException();
+
+ int twoDigitYear = m_dateTime.Year % 100;
+ int twoDigitYearCutoff = twoDigitYearMax % 100;
+
+ int diff = twoDigitYear - twoDigitYearCutoff;
+ int newYear = twoDigitYearMax + diff;
+ if (diff > 0)
+ {
+ newYear -= 100;
+ }
+
+ return m_dateTime.AddYears(newYear - m_dateTime.Year);
+ }
+
+ public DateTime ToDateTime(Calendar calendar)
+ {
+ return ToDateTime(calendar.TwoDigitYearMax);
+ }
+
+ /// Return an adjusted date in the range of 1950 - 2049.
+
+ public DateTime ToAdjustedDateTime()
+ {
+ return ToDateTime(2049);
+ }
+
+ public int TwoDigitYearMax => m_twoDigitYearMax;
+
+ internal byte[] GetContents(int encoding)
+ {
+ if (encoding == Asn1OutputStream.EncodingDer && m_timeString.Length != 13)
+ {
+ string canonical = ToStringCanonical(m_dateTime);
+ return Encoding.ASCII.GetBytes(canonical);
+ }
+
+ return Encoding.ASCII.GetBytes(m_timeString);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.UtcTime, GetContents(encoding));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, GetContents(encoding));
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ if (!(asn1Object is Asn1UtcTime that))
+ return false;
+
+ // TODO Performance
+ return Arrays.AreEqual(
+ this.GetContents(Asn1OutputStream.EncodingDer),
+ that.GetContents(Asn1OutputStream.EncodingDer));
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ // TODO Performance
+ return Arrays.GetHashCode(
+ this.GetContents(Asn1OutputStream.EncodingDer));
+ }
+
+ public override string ToString()
+ {
+ return m_timeString;
+ }
+
+ internal static Asn1UtcTime CreatePrimitive(byte[] contents)
+ {
+ return new Asn1UtcTime(contents);
+ }
+
+ private static DateTime FromString(string s, out int twoDigitYearMax)
+ {
+ var provider = DateTimeFormatInfo.InvariantInfo;
+ twoDigitYearMax = provider.Calendar.TwoDigitYearMax;
+
+ switch (s.Length)
+ {
+ case 11:
+ return DateTime.ParseExact(s, @"yyMMddHHmm\Z", provider,
+ DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal);
+ case 13:
+ return DateTime.ParseExact(s, @"yyMMddHHmmss\Z", provider,
+ DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal);
+ case 15:
+ return DateTime.ParseExact(s, @"yyMMddHHmmzzz", provider, DateTimeStyles.AdjustToUniversal);
+ case 17:
+ return DateTime.ParseExact(s, @"yyMMddHHmmsszzz", provider, DateTimeStyles.AdjustToUniversal);
+ default:
+ throw new FormatException();
+ }
+ }
+
+ private static bool InRange(DateTime dateTime, int twoDigitYearMax)
+ {
+ return (uint)(twoDigitYearMax - dateTime.Year) < 100;
+ }
+
+ private static string ToStringCanonical(DateTime dateTime, out int twoDigitYearMax)
+ {
+ var provider = DateTimeFormatInfo.InvariantInfo;
+ twoDigitYearMax = provider.Calendar.TwoDigitYearMax;
+
+ Validate(dateTime, twoDigitYearMax);
+
+ return dateTime.ToString(@"yyMMddHHmmss\Z", provider);
+ }
+
+ private static string ToStringCanonical(DateTime dateTime)
+ {
+ return dateTime.ToString(@"yyMMddHHmmss\Z", DateTimeFormatInfo.InvariantInfo);
+ }
+
+ private static void Validate(DateTime dateTime, int twoDigitYearMax)
+ {
+ if (!InRange(dateTime, twoDigitYearMax))
+ throw new ArgumentOutOfRangeException(nameof(dateTime));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UtcTime.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UtcTime.cs.meta
new file mode 100644
index 00000000..1f4c5615
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1UtcTime.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 98e5527f6530d2644a265dfb642a8c44
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Utilities.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Utilities.cs
new file mode 100644
index 00000000..e0063fc1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Utilities.cs
@@ -0,0 +1,333 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class Asn1Utilities
+ {
+ internal static Asn1TaggedObject CheckTag(Asn1TaggedObject taggedObject, int tagClass, int tagNo)
+ {
+ if (!taggedObject.HasTag(tagClass, tagNo))
+ {
+ string expected = GetTagText(tagClass, tagNo);
+ string found = GetTagText(taggedObject);
+ throw new InvalidOperationException("Expected " + expected + " tag but found " + found);
+ }
+ return taggedObject;
+ }
+
+ internal static Asn1TaggedObjectParser CheckTag(Asn1TaggedObjectParser taggedObjectParser, int tagClass,
+ int tagNo)
+ {
+ if (!taggedObjectParser.HasTag(tagClass, tagNo))
+ {
+ string expected = GetTagText(tagClass, tagNo);
+ string found = GetTagText(taggedObjectParser);
+ throw new InvalidOperationException("Expected " + expected + " tag but found " + found);
+ }
+ return taggedObjectParser;
+ }
+
+
+ internal static string GetTagText(Asn1Tag tag)
+ {
+ return GetTagText(tag.TagClass, tag.TagNo);
+ }
+
+ public static string GetTagText(Asn1TaggedObject taggedObject)
+ {
+ return GetTagText(taggedObject.TagClass, taggedObject.TagNo);
+ }
+
+ public static string GetTagText(Asn1TaggedObjectParser taggedObjectParser)
+ {
+ return GetTagText(taggedObjectParser.TagClass, taggedObjectParser.TagNo);
+ }
+
+ public static string GetTagText(int tagClass, int tagNo)
+ {
+ switch (tagClass)
+ {
+ case Asn1Tags.Application:
+ return "[APPLICATION " + tagNo + "]";
+ case Asn1Tags.ContextSpecific:
+ return "[CONTEXT " + tagNo + "]";
+ case Asn1Tags.Private:
+ return "[PRIVATE " + tagNo + "]";
+ default:
+ return "[UNIVERSAL " + tagNo + "]";
+ }
+ }
+
+
+ /*
+ * Wrappers for Asn1TaggedObject.GetExplicitBaseObject
+ */
+
+ public static Asn1Encodable GetExplicitBaseObject(Asn1TaggedObject taggedObject, int tagClass, int tagNo)
+ {
+ return CheckTag(taggedObject, tagClass, tagNo).GetExplicitBaseObject();
+ }
+
+ public static Asn1Encodable GetExplicitContextBaseObject(Asn1TaggedObject taggedObject, int tagNo)
+ {
+ return GetExplicitBaseObject(taggedObject, Asn1Tags.ContextSpecific, tagNo);
+ }
+
+ public static Asn1Encodable TryGetExplicitBaseObject(Asn1TaggedObject taggedObject, int tagClass, int tagNo)
+ {
+ if (!taggedObject.HasTag(tagClass, tagNo))
+ return null;
+
+ return taggedObject.GetExplicitBaseObject();
+ }
+
+ public static Asn1Encodable TryGetExplicitContextBaseObject(Asn1TaggedObject taggedObject, int tagNo)
+ {
+ return TryGetExplicitBaseObject(taggedObject, Asn1Tags.ContextSpecific, tagNo);
+ }
+
+
+ /*
+ * Wrappers for Asn1TaggedObject.GetExplicitBaseTagged
+ */
+
+ public static Asn1TaggedObject GetExplicitBaseTagged(Asn1TaggedObject taggedObject, int tagClass, int tagNo)
+ {
+ return CheckTag(taggedObject, tagClass, tagNo).GetExplicitBaseTagged();
+ }
+
+ public static Asn1TaggedObject GetExplicitContextBaseTagged(Asn1TaggedObject taggedObject, int tagNo)
+ {
+ return GetExplicitBaseTagged(taggedObject, Asn1Tags.ContextSpecific, tagNo);
+ }
+
+ public static Asn1TaggedObject TryGetExplicitBaseTagged(Asn1TaggedObject taggedObject, int tagClass, int tagNo)
+ {
+ if (!taggedObject.HasTag(tagClass, tagNo))
+ return null;
+
+ return taggedObject.GetExplicitBaseTagged();
+ }
+
+ public static Asn1TaggedObject TryGetExplicitContextBaseTagged(Asn1TaggedObject taggedObject, int tagNo)
+ {
+ return TryGetExplicitBaseTagged(taggedObject, Asn1Tags.ContextSpecific, tagNo);
+ }
+
+
+ /*
+ * Wrappers for Asn1TaggedObject.GetImplicitBaseTagged
+ */
+
+ public static Asn1TaggedObject GetImplicitBaseTagged(Asn1TaggedObject taggedObject, int tagClass, int tagNo,
+ int baseTagClass, int baseTagNo)
+ {
+ return CheckTag(taggedObject, tagClass, tagNo).GetImplicitBaseTagged(baseTagClass, baseTagNo);
+ }
+
+ public static Asn1TaggedObject GetImplicitContextBaseTagged(Asn1TaggedObject taggedObject, int tagNo,
+ int baseTagClass, int baseTagNo)
+ {
+ return GetImplicitBaseTagged(taggedObject, Asn1Tags.ContextSpecific, tagNo, baseTagClass, baseTagNo);
+ }
+
+ public static Asn1TaggedObject TryGetImplicitBaseTagged(Asn1TaggedObject taggedObject, int tagClass, int tagNo,
+ int baseTagClass, int baseTagNo)
+ {
+ if (!taggedObject.HasTag(tagClass, tagNo))
+ return null;
+
+ return taggedObject.GetImplicitBaseTagged(baseTagClass, baseTagNo);
+ }
+
+ public static Asn1TaggedObject TryGetImplicitContextBaseTagged(Asn1TaggedObject taggedObject, int tagNo,
+ int baseTagClass, int baseTagNo)
+ {
+ return TryGetImplicitBaseTagged(taggedObject, Asn1Tags.ContextSpecific, tagNo, baseTagClass, baseTagNo);
+ }
+
+
+ /*
+ * Wrappers for Asn1TaggedObject.GetBaseUniversal
+ */
+
+ public static Asn1Object GetBaseUniversal(Asn1TaggedObject taggedObject, int tagClass, int tagNo,
+ bool declaredExplicit, int baseTagNo)
+ {
+ return CheckTag(taggedObject, tagClass, tagNo).GetBaseUniversal(declaredExplicit, baseTagNo);
+ }
+
+ public static Asn1Object GetContextBaseUniversal(Asn1TaggedObject taggedObject, int tagNo,
+ bool declaredExplicit, int baseTagNo)
+ {
+ return GetBaseUniversal(taggedObject, Asn1Tags.ContextSpecific, tagNo, declaredExplicit, baseTagNo);
+ }
+
+ public static Asn1Object TryGetBaseUniversal(Asn1TaggedObject taggedObject, int tagClass, int tagNo,
+ bool declaredExplicit, int baseTagNo)
+ {
+ if (!taggedObject.HasTag(tagClass, tagNo))
+ return null;
+
+ return taggedObject.GetBaseUniversal(declaredExplicit, baseTagNo);
+ }
+
+ public static Asn1Object TryGetContextBaseUniversal(Asn1TaggedObject taggedObject, int tagNo,
+ bool declaredExplicit, int baseTagNo)
+ {
+ return TryGetBaseUniversal(taggedObject, Asn1Tags.ContextSpecific, tagNo, declaredExplicit, baseTagNo);
+ }
+
+
+ /*
+ * Wrappers for Asn1TaggedObjectParser.ParseExplicitBaseTagged
+ */
+
+ ///
+ public static Asn1TaggedObjectParser ParseExplicitBaseTagged(Asn1TaggedObjectParser taggedObjectParser,
+ int tagClass, int tagNo)
+ {
+ return CheckTag(taggedObjectParser, tagClass, tagNo).ParseExplicitBaseTagged();
+ }
+
+ ///
+ public static Asn1TaggedObjectParser ParseExplicitContextBaseTagged(Asn1TaggedObjectParser taggedObjectParser,
+ int tagNo)
+ {
+ return ParseExplicitBaseTagged(taggedObjectParser, Asn1Tags.ContextSpecific, tagNo);
+ }
+
+ ///
+ public static Asn1TaggedObjectParser TryParseExplicitBaseTagged(Asn1TaggedObjectParser taggedObjectParser,
+ int tagClass, int tagNo)
+ {
+ if (!taggedObjectParser.HasTag(tagClass, tagNo))
+ return null;
+
+ return taggedObjectParser.ParseExplicitBaseTagged();
+ }
+
+ ///
+ public static Asn1TaggedObjectParser TryParseExplicitContextBaseTagged(
+ Asn1TaggedObjectParser taggedObjectParser, int tagNo)
+ {
+ return TryParseExplicitBaseTagged(taggedObjectParser, Asn1Tags.ContextSpecific, tagNo);
+ }
+
+
+ /*
+ * Wrappers for Asn1TaggedObjectParser.ParseImplicitBaseTagged
+ */
+
+ ///
+ public static Asn1TaggedObjectParser ParseImplicitBaseTagged(Asn1TaggedObjectParser taggedObjectParser,
+ int tagClass, int tagNo, int baseTagClass, int baseTagNo)
+ {
+ return CheckTag(taggedObjectParser, tagClass, tagNo).ParseImplicitBaseTagged(baseTagClass, baseTagNo);
+ }
+
+ ///
+ public static Asn1TaggedObjectParser ParseImplicitContextBaseTagged(Asn1TaggedObjectParser taggedObjectParser,
+ int tagNo, int baseTagClass, int baseTagNo)
+ {
+ return ParseImplicitBaseTagged(taggedObjectParser, Asn1Tags.ContextSpecific, tagNo, baseTagClass,
+ baseTagNo);
+ }
+
+ ///
+ public static Asn1TaggedObjectParser TryParseImplicitBaseTagged(Asn1TaggedObjectParser taggedObjectParser,
+ int tagClass, int tagNo, int baseTagClass, int baseTagNo)
+ {
+ if (!taggedObjectParser.HasTag(tagClass, tagNo))
+ return null;
+
+ return taggedObjectParser.ParseImplicitBaseTagged(baseTagClass, baseTagNo);
+ }
+
+ ///
+ public static Asn1TaggedObjectParser TryParseImplicitContextBaseTagged(
+ Asn1TaggedObjectParser taggedObjectParser, int tagNo, int baseTagClass, int baseTagNo)
+ {
+ return TryParseImplicitBaseTagged(taggedObjectParser, Asn1Tags.ContextSpecific, tagNo, baseTagClass,
+ baseTagNo);
+ }
+
+
+ /*
+ * Wrappers for Asn1TaggedObjectParser.ParseBaseUniversal
+ */
+
+ ///
+ public static IAsn1Convertible ParseBaseUniversal(Asn1TaggedObjectParser taggedObjectParser, int tagClass,
+ int tagNo, bool declaredExplicit, int baseTagNo)
+ {
+ return CheckTag(taggedObjectParser, tagClass, tagNo).ParseBaseUniversal(declaredExplicit, baseTagNo);
+ }
+
+ ///
+ public static IAsn1Convertible ParseContextBaseUniversal(Asn1TaggedObjectParser taggedObjectParser, int tagNo,
+ bool declaredExplicit, int baseTagNo)
+ {
+ return ParseBaseUniversal(taggedObjectParser, Asn1Tags.ContextSpecific, tagNo, declaredExplicit, baseTagNo);
+ }
+
+ ///
+ public static IAsn1Convertible TryParseBaseUniversal(Asn1TaggedObjectParser taggedObjectParser, int tagClass,
+ int tagNo, bool declaredExplicit, int baseTagNo)
+ {
+ if (!taggedObjectParser.HasTag(tagClass, tagNo))
+ return null;
+
+ return taggedObjectParser.ParseBaseUniversal(declaredExplicit, baseTagNo);
+ }
+
+ ///
+ public static IAsn1Convertible TryParseContextBaseUniversal(Asn1TaggedObjectParser taggedObjectParser,
+ int tagNo, bool declaredExplicit, int baseTagNo)
+ {
+ return TryParseBaseUniversal(taggedObjectParser, Asn1Tags.ContextSpecific, tagNo, declaredExplicit,
+ baseTagNo);
+ }
+
+
+ /*
+ * Wrappers for Asn1TaggedObjectParser.ParseExplicitBaseObject
+ */
+
+ ///
+ public static IAsn1Convertible ParseExplicitBaseObject(Asn1TaggedObjectParser taggedObjectParser, int tagClass,
+ int tagNo)
+ {
+ return CheckTag(taggedObjectParser, tagClass, tagNo).ParseExplicitBaseObject();
+ }
+
+ ///
+ public static IAsn1Convertible ParseExplicitContextBaseObject(Asn1TaggedObjectParser taggedObjectParser,
+ int tagNo)
+ {
+ return ParseExplicitBaseObject(taggedObjectParser, Asn1Tags.ContextSpecific, tagNo);
+ }
+
+ ///
+ public static IAsn1Convertible TryParseExplicitBaseObject(Asn1TaggedObjectParser taggedObjectParser,
+ int tagClass, int tagNo)
+ {
+ if (!taggedObjectParser.HasTag(tagClass, tagNo))
+ return null;
+
+ return taggedObjectParser.ParseExplicitBaseObject();
+ }
+
+ ///
+ public static IAsn1Convertible TryParseExplicitContextBaseObject(Asn1TaggedObjectParser taggedObjectParser,
+ int tagNo)
+ {
+ return TryParseExplicitBaseObject(taggedObjectParser, Asn1Tags.ContextSpecific, tagNo);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Utilities.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Utilities.cs.meta
new file mode 100644
index 00000000..8c6075f4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/Asn1Utilities.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 223a5a612cd390246a8f027e1cbf61f7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERBitString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERBitString.cs
new file mode 100644
index 00000000..ff9324bb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERBitString.cs
@@ -0,0 +1,142 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Diagnostics;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerBitString
+ : DerBitString
+ {
+ private const int DefaultSegmentLimit = 1000;
+
+ internal static byte[] FlattenBitStrings(DerBitString[] bitStrings)
+ {
+ int count = bitStrings.Length;
+ switch (count)
+ {
+ case 0:
+ // No bits
+ return new byte[]{ 0 };
+ case 1:
+ return bitStrings[0].contents;
+ default:
+ {
+ int last = count - 1, totalLength = 0;
+ for (int i = 0; i < last; ++i)
+ {
+ byte[] elementContents = bitStrings[i].contents;
+ if (elementContents[0] != 0)
+ throw new ArgumentException("only the last nested bitstring can have padding", "bitStrings");
+
+ totalLength += elementContents.Length - 1;
+ }
+
+ // Last one can have padding
+ byte[] lastElementContents = bitStrings[last].contents;
+ byte padBits = lastElementContents[0];
+ totalLength += lastElementContents.Length;
+
+ byte[] contents = new byte[totalLength];
+ contents[0] = padBits;
+
+ int pos = 1;
+ for (int i = 0; i < count; ++i)
+ {
+ byte[] elementContents = bitStrings[i].contents;
+ int length = elementContents.Length - 1;
+ Array.Copy(elementContents, 1, contents, pos, length);
+ pos += length;
+ }
+
+ Debug.Assert(pos == totalLength);
+ return contents;
+ }
+ }
+ }
+
+ private readonly int segmentLimit;
+ private readonly DerBitString[] elements;
+
+ public BerBitString(byte data, int padBits)
+ : base(data, padBits)
+ {
+ this.elements = null;
+ this.segmentLimit = DefaultSegmentLimit;
+ }
+
+ public BerBitString(byte[] data)
+ : this(data, 0)
+ {
+ }
+
+ public BerBitString(byte[] data, int padBits)
+ : this(data, padBits, DefaultSegmentLimit)
+ {
+ }
+
+ public BerBitString(byte[] data, int padBits, int segmentLimit)
+ : base(data, padBits)
+ {
+ this.elements = null;
+ this.segmentLimit = segmentLimit;
+ }
+
+ public BerBitString(int namedBits)
+ : base(namedBits)
+ {
+ this.elements = null;
+ this.segmentLimit = DefaultSegmentLimit;
+ }
+
+ public BerBitString(Asn1Encodable obj)
+ : this(obj.GetDerEncoded(), 0)
+ {
+ }
+
+ public BerBitString(DerBitString[] elements)
+ : this(elements, DefaultSegmentLimit)
+ {
+ }
+
+ public BerBitString(DerBitString[] elements, int segmentLimit)
+ : base(FlattenBitStrings(elements), false)
+ {
+ this.elements = elements;
+ this.segmentLimit = segmentLimit;
+ }
+
+ internal BerBitString(byte[] contents, bool check)
+ : base(contents, check)
+ {
+ this.elements = null;
+ this.segmentLimit = DefaultSegmentLimit;
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncoding(encoding);
+
+ if (null == elements)
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.BitString, contents);
+
+ return new ConstructedILEncoding(Asn1Tags.Universal, Asn1Tags.BitString,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ if (null == elements)
+ return new PrimitiveEncoding(tagClass, tagNo, contents);
+
+ return new ConstructedILEncoding(tagClass, tagNo,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERBitString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERBitString.cs.meta
new file mode 100644
index 00000000..611bfa98
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERBitString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4381f60712bf2ca4ea06427a034e76be
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERGenerator.cs
new file mode 100644
index 00000000..b3f02fdd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERGenerator.cs
@@ -0,0 +1,110 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class BerGenerator
+ : Asn1Generator
+ {
+ private bool _tagged = false;
+ private bool _isExplicit;
+ private int _tagNo;
+
+ protected BerGenerator(
+ Stream outStream)
+ : base(outStream)
+ {
+ }
+
+ protected BerGenerator(
+ Stream outStream,
+ int tagNo,
+ bool isExplicit)
+ : base(outStream)
+ {
+ _tagged = true;
+ _isExplicit = isExplicit;
+ _tagNo = tagNo;
+ }
+
+ public override void AddObject(Asn1Encodable obj)
+ {
+ obj.EncodeTo(Out);
+ }
+
+ public override void AddObject(Asn1Object obj)
+ {
+ obj.EncodeTo(Out);
+ }
+
+ public override Stream GetRawOutputStream()
+ {
+ return Out;
+ }
+
+ public override void Close()
+ {
+ WriteBerEnd();
+ }
+
+ private void WriteHdr(
+ int tag)
+ {
+ Out.WriteByte((byte) tag);
+ Out.WriteByte(0x80);
+ }
+
+ protected void WriteBerHeader(
+ int tag)
+ {
+ if (_tagged)
+ {
+ int tagNum = _tagNo | Asn1Tags.ContextSpecific;
+
+ if (_isExplicit)
+ {
+ WriteHdr(tagNum | Asn1Tags.Constructed);
+ WriteHdr(tag);
+ }
+ else
+ {
+ if ((tag & Asn1Tags.Constructed) != 0)
+ {
+ WriteHdr(tagNum | Asn1Tags.Constructed);
+ }
+ else
+ {
+ WriteHdr(tagNum);
+ }
+ }
+ }
+ else
+ {
+ WriteHdr(tag);
+ }
+ }
+
+ protected void WriteBerBody(
+ Stream contentStream)
+ {
+ Streams.PipeAll(contentStream, Out);
+ }
+
+ protected void WriteBerEnd()
+ {
+ Out.WriteByte(0x00);
+ Out.WriteByte(0x00);
+
+ if (_tagged && _isExplicit) // write extra end for tag header
+ {
+ Out.WriteByte(0x00);
+ Out.WriteByte(0x00);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERGenerator.cs.meta
new file mode 100644
index 00000000..3ac4dc67
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d9e21f7c787b7354c896a05ab17862f0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringGenerator.cs
new file mode 100644
index 00000000..5a8e3a02
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringGenerator.cs
@@ -0,0 +1,162 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerOctetStringGenerator
+ : BerGenerator
+ {
+ public BerOctetStringGenerator(Stream outStream)
+ : base(outStream)
+ {
+ WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.OctetString);
+ }
+
+ public BerOctetStringGenerator(
+ Stream outStream,
+ int tagNo,
+ bool isExplicit)
+ : base(outStream, tagNo, isExplicit)
+ {
+ WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.OctetString);
+ }
+
+ public Stream GetOctetOutputStream()
+ {
+ return GetOctetOutputStream(new byte[1000]); // limit for CER encoding.
+ }
+
+ public Stream GetOctetOutputStream(
+ int bufSize)
+ {
+ return bufSize < 1
+ ? GetOctetOutputStream()
+ : GetOctetOutputStream(new byte[bufSize]);
+ }
+
+ public Stream GetOctetOutputStream(
+ byte[] buf)
+ {
+ return new BufferedBerOctetStream(this, buf);
+ }
+
+ private class BufferedBerOctetStream
+ : BaseOutputStream
+ {
+ private byte[] _buf;
+ private int _off;
+ private readonly BerOctetStringGenerator _gen;
+ private readonly Asn1OutputStream _derOut;
+
+ internal BufferedBerOctetStream(
+ BerOctetStringGenerator gen,
+ byte[] buf)
+ {
+ _gen = gen;
+ _buf = buf;
+ _off = 0;
+ _derOut = Asn1OutputStream.Create(_gen.Out, Asn1Encodable.Der);
+ }
+
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ Streams.ValidateBufferArguments(buffer, offset, count);
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ Write(buffer.AsSpan(offset, count));
+#else
+ int bufLen = _buf.Length;
+ int available = bufLen - _off;
+ if (count < available)
+ {
+ Array.Copy(buffer, offset, _buf, _off, count);
+ _off += count;
+ return;
+ }
+
+ int pos = 0;
+ if (_off > 0)
+ {
+ Array.Copy(buffer, offset, _buf, _off, available);
+ pos = available;
+ DerOctetString.Encode(_derOut, _buf, 0, bufLen);
+ //_off = 0;
+ }
+
+ int remaining;
+ while ((remaining = count - pos) >= bufLen)
+ {
+ DerOctetString.Encode(_derOut, buffer, offset + pos, bufLen);
+ pos += bufLen;
+ }
+
+ Array.Copy(buffer, offset + pos, _buf, 0, remaining);
+ this._off = remaining;
+#endif
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override void Write(ReadOnlySpan buffer)
+ {
+ int bufLen = _buf.Length;
+ int available = bufLen - _off;
+ if (buffer.Length < available)
+ {
+ buffer.CopyTo(_buf.AsSpan(_off));
+ _off += buffer.Length;
+ return;
+ }
+
+ if (_off > 0)
+ {
+ DerOctetString.Encode(_derOut, _buf.AsSpan(0, _off), buffer[..available]);
+ buffer = buffer[available..];
+ //_off = 0;
+ }
+
+ while (buffer.Length >= bufLen)
+ {
+ DerOctetString.Encode(_derOut, buffer[..bufLen]);
+ buffer = buffer[bufLen..];
+ }
+
+ buffer.CopyTo(_buf.AsSpan());
+ _off = buffer.Length;
+ }
+#endif
+
+ public override void WriteByte(byte value)
+ {
+ _buf[_off++] = value;
+
+ if (_off == _buf.Length)
+ {
+ DerOctetString.Encode(_derOut, _buf, 0, _off);
+ _off = 0;
+ }
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ if (_off != 0)
+ {
+ DerOctetString.Encode(_derOut, _buf, 0, _off);
+ }
+
+ _derOut.FlushInternal();
+
+ _gen.WriteBerEnd();
+ }
+ base.Dispose(disposing);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringGenerator.cs.meta
new file mode 100644
index 00000000..f2f13131
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e73e600154c4fa5488bfcfa4d5ea8cd8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringParser.cs
new file mode 100644
index 00000000..73a3eb38
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringParser.cs
@@ -0,0 +1,44 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerOctetStringParser
+ : Asn1OctetStringParser
+ {
+ private readonly Asn1StreamParser _parser;
+
+ internal BerOctetStringParser(Asn1StreamParser parser)
+ {
+ _parser = parser;
+ }
+
+ public Stream GetOctetStream()
+ {
+ return new ConstructedOctetStream(_parser);
+ }
+
+ public Asn1Object ToAsn1Object()
+ {
+ try
+ {
+ return Parse(_parser);
+ }
+ catch (IOException e)
+ {
+ throw new Asn1ParsingException("IOException converting stream to byte array: " + e.Message, e);
+ }
+ }
+
+ internal static BerOctetString Parse(Asn1StreamParser sp)
+ {
+ return new BerOctetString(Streams.ReadAll(new ConstructedOctetStream(sp)));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringParser.cs.meta
new file mode 100644
index 00000000..e721d478
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BEROctetStringParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6737d031bdbf98b4db3df28da1cba304
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceGenerator.cs
new file mode 100644
index 00000000..69fadd15
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceGenerator.cs
@@ -0,0 +1,28 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerSequenceGenerator
+ : BerGenerator
+ {
+ public BerSequenceGenerator(
+ Stream outStream)
+ : base(outStream)
+ {
+ WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.Sequence);
+ }
+
+ public BerSequenceGenerator(
+ Stream outStream,
+ int tagNo,
+ bool isExplicit)
+ : base(outStream, tagNo, isExplicit)
+ {
+ WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.Sequence);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceGenerator.cs.meta
new file mode 100644
index 00000000..91bdb4ab
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c6a71387db1b1b948a093875fe1d03e8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceParser.cs
new file mode 100644
index 00000000..e43b944b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceParser.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerSequenceParser
+ : Asn1SequenceParser
+ {
+ private readonly Asn1StreamParser _parser;
+
+ internal BerSequenceParser(Asn1StreamParser parser)
+ {
+ this._parser = parser;
+ }
+
+ public IAsn1Convertible ReadObject()
+ {
+ return _parser.ReadObject();
+ }
+
+ public Asn1Object ToAsn1Object()
+ {
+ return Parse(_parser);
+ }
+
+ internal static BerSequence Parse(Asn1StreamParser sp)
+ {
+ return new BerSequence(sp.ReadVector());
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceParser.cs.meta
new file mode 100644
index 00000000..f9c40a1a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSequenceParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2b17d41b04fc32d4a89fc9acbdee6374
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetGenerator.cs
new file mode 100644
index 00000000..b4357eb4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetGenerator.cs
@@ -0,0 +1,28 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerSetGenerator
+ : BerGenerator
+ {
+ public BerSetGenerator(
+ Stream outStream)
+ : base(outStream)
+ {
+ WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.Set);
+ }
+
+ public BerSetGenerator(
+ Stream outStream,
+ int tagNo,
+ bool isExplicit)
+ : base(outStream, tagNo, isExplicit)
+ {
+ WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.Set);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetGenerator.cs.meta
new file mode 100644
index 00000000..315a7d5d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8f0bb6c2b266fbb42b99bbc63bd87437
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetParser.cs
new file mode 100644
index 00000000..572627c5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetParser.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerSetParser
+ : Asn1SetParser
+ {
+ private readonly Asn1StreamParser _parser;
+
+ internal BerSetParser(Asn1StreamParser parser)
+ {
+ this._parser = parser;
+ }
+
+ public IAsn1Convertible ReadObject()
+ {
+ return _parser.ReadObject();
+ }
+
+ public Asn1Object ToAsn1Object()
+ {
+ return Parse(_parser);
+ }
+
+ internal static BerSet Parse(Asn1StreamParser sp)
+ {
+ return new BerSet(sp.ReadVector());
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetParser.cs.meta
new file mode 100644
index 00000000..fbbcdf3e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERSetParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cd5c6d29971f67847b798d77cf460c7b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERTaggedObjectParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERTaggedObjectParser.cs
new file mode 100644
index 00000000..b761501d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERTaggedObjectParser.cs
@@ -0,0 +1,84 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class BerTaggedObjectParser
+ : Asn1TaggedObjectParser
+ {
+ internal readonly int m_tagClass;
+ internal readonly int m_tagNo;
+ internal readonly Asn1StreamParser m_parser;
+
+ internal BerTaggedObjectParser(int tagClass, int tagNo, Asn1StreamParser parser)
+ {
+ m_tagClass = tagClass;
+ m_tagNo = tagNo;
+ m_parser = parser;
+ }
+
+ public virtual bool IsConstructed
+ {
+ get { return true; }
+ }
+
+ public int TagClass
+ {
+ get { return m_tagClass; }
+ }
+
+ public int TagNo
+ {
+ get { return m_tagNo; }
+ }
+
+ public bool HasContextTag(int tagNo)
+ {
+ return m_tagClass == Asn1Tags.ContextSpecific && m_tagNo == tagNo;
+ }
+
+ public bool HasTag(int tagClass, int tagNo)
+ {
+ return m_tagClass == tagClass && m_tagNo == tagNo;
+ }
+
+ public virtual IAsn1Convertible ParseBaseUniversal(bool declaredExplicit, int baseTagNo)
+ {
+ if (declaredExplicit)
+ return m_parser.ParseObject(baseTagNo);
+
+ return m_parser.ParseImplicitConstructedIL(baseTagNo);
+ }
+
+ public virtual IAsn1Convertible ParseExplicitBaseObject()
+ {
+ return m_parser.ReadObject();
+ }
+
+ public virtual Asn1TaggedObjectParser ParseExplicitBaseTagged()
+ {
+ return m_parser.ParseTaggedObject();
+ }
+
+ public virtual Asn1TaggedObjectParser ParseImplicitBaseTagged(int baseTagClass, int baseTagNo)
+ {
+ return new BerTaggedObjectParser(baseTagClass, baseTagNo, m_parser);
+ }
+
+ public virtual Asn1Object ToAsn1Object()
+ {
+ try
+ {
+ return m_parser.LoadTaggedIL(TagClass, TagNo);
+ }
+ catch (IOException e)
+ {
+ throw new Asn1ParsingException(e.Message);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERTaggedObjectParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERTaggedObjectParser.cs.meta
new file mode 100644
index 00000000..4ac9447a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BERTaggedObjectParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a686da308c11dfb47939b504fe6dd185
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecific.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecific.cs
new file mode 100644
index 00000000..0454b349
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecific.cs
@@ -0,0 +1,3 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecific.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecific.cs.meta
new file mode 100644
index 00000000..c133a454
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecific.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 200244db58e60814db5ecd517a42d8fa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecificParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecificParser.cs
new file mode 100644
index 00000000..3b1d777f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecificParser.cs
@@ -0,0 +1,2 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecificParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecificParser.cs.meta
new file mode 100644
index 00000000..f57ec123
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerApplicationSpecificParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 268b457089193154383ac52b05919a4b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerBitStringParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerBitStringParser.cs
new file mode 100644
index 00000000..cfd6a808
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerBitStringParser.cs
@@ -0,0 +1,60 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /// A parser for indefinite-length BIT STRINGs.
+ internal class BerBitStringParser
+ : Asn1BitStringParser
+ {
+ private readonly Asn1StreamParser m_parser;
+
+ private ConstructedBitStream m_bitStream;
+
+ internal BerBitStringParser(Asn1StreamParser parser)
+ {
+ m_parser = parser;
+ }
+
+ public Stream GetOctetStream()
+ {
+ return m_bitStream = new ConstructedBitStream(m_parser, true);
+ }
+
+ public Stream GetBitStream()
+ {
+ return m_bitStream = new ConstructedBitStream(m_parser, false);
+ }
+
+ public int PadBits
+ {
+ get { return m_bitStream.PadBits; }
+ }
+
+ public Asn1Object ToAsn1Object()
+ {
+ try
+ {
+ return Parse(m_parser);
+ }
+ catch (IOException e)
+ {
+ throw new Asn1ParsingException("IOException converting stream to byte array: " + e.Message, e);
+ }
+ }
+
+ internal static BerBitString Parse(Asn1StreamParser sp)
+ {
+ ConstructedBitStream bitStream = new ConstructedBitStream(sp, false);
+ byte[] data = Streams.ReadAll(bitStream);
+ int padBits = bitStream.PadBits;
+ return new BerBitString(data, padBits);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerBitStringParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerBitStringParser.cs.meta
new file mode 100644
index 00000000..a5a86530
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerBitStringParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8a9e7aaac66278d48b27f19d3fc18ab3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOctetString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOctetString.cs
new file mode 100644
index 00000000..dd710260
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOctetString.cs
@@ -0,0 +1,112 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Diagnostics;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerOctetString
+ : DerOctetString
+ {
+ private const int DefaultSegmentLimit = 1000;
+
+ public static BerOctetString FromSequence(Asn1Sequence seq)
+ {
+ int count = seq.Count;
+ Asn1OctetString[] v = new Asn1OctetString[count];
+ for (int i = 0; i < count; ++i)
+ {
+ v[i] = GetInstance(seq[i]);
+ }
+ return new BerOctetString(v);
+ }
+
+ internal static byte[] FlattenOctetStrings(Asn1OctetString[] octetStrings)
+ {
+ int count = octetStrings.Length;
+ switch (count)
+ {
+ case 0:
+ return EmptyOctets;
+ case 1:
+ return octetStrings[0].contents;
+ default:
+ {
+ int totalOctets = 0;
+ for (int i = 0; i < count; ++i)
+ {
+ totalOctets += octetStrings[i].contents.Length;
+ }
+
+ byte[] str = new byte[totalOctets];
+ int pos = 0;
+ for (int i = 0; i < count; ++i)
+ {
+ byte[] octets = octetStrings[i].contents;
+ Array.Copy(octets, 0, str, pos, octets.Length);
+ pos += octets.Length;
+ }
+
+ Debug.Assert(pos == totalOctets);
+ return str;
+ }
+ }
+ }
+
+ private readonly int segmentLimit;
+ private readonly Asn1OctetString[] elements;
+
+ public BerOctetString(byte[] contents)
+ : this(contents, DefaultSegmentLimit)
+ {
+ }
+
+ public BerOctetString(Asn1OctetString[] elements)
+ : this(elements, DefaultSegmentLimit)
+ {
+ }
+
+ public BerOctetString(byte[] contents, int segmentLimit)
+ : this(contents, null, segmentLimit)
+ {
+ }
+
+ public BerOctetString(Asn1OctetString[] elements, int segmentLimit)
+ : this(FlattenOctetStrings(elements), elements, segmentLimit)
+ {
+ }
+
+ private BerOctetString(byte[] contents, Asn1OctetString[] elements, int segmentLimit)
+ : base(contents)
+ {
+ this.elements = elements;
+ this.segmentLimit = segmentLimit;
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncoding(encoding);
+
+ if (null == elements)
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.OctetString, contents);
+
+ return new ConstructedILEncoding(Asn1Tags.Universal, Asn1Tags.OctetString,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ if (null == elements)
+ return new PrimitiveEncoding(tagClass, tagNo, contents);
+
+ return new ConstructedILEncoding(tagClass, tagNo,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOctetString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOctetString.cs.meta
new file mode 100644
index 00000000..4f940e74
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOctetString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1f27e07decbed4b469250704cc20a1f6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOutputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOutputStream.cs
new file mode 100644
index 00000000..0454b349
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOutputStream.cs
@@ -0,0 +1,3 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOutputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOutputStream.cs.meta
new file mode 100644
index 00000000..bbd14d7c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerOutputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e83770e78aa440c43b0ba64c3daf5a35
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSequence.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSequence.cs
new file mode 100644
index 00000000..d220ea83
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSequence.cs
@@ -0,0 +1,101 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerSequence
+ : DerSequence
+ {
+ public static new readonly BerSequence Empty = new BerSequence();
+
+ public static new BerSequence FromVector(Asn1EncodableVector elementVector)
+ {
+ return elementVector.Count < 1 ? Empty : new BerSequence(elementVector);
+ }
+
+ /**
+ * create an empty sequence
+ */
+ public BerSequence()
+ : base()
+ {
+ }
+
+ /**
+ * create a sequence containing one object
+ */
+ public BerSequence(Asn1Encodable element)
+ : base(element)
+ {
+ }
+
+ /**
+ * create a sequence containing two objects
+ */
+ public BerSequence(Asn1Encodable element1, Asn1Encodable element2)
+ : base(element1, element2)
+ {
+ }
+
+ public BerSequence(params Asn1Encodable[] elements)
+ : base(elements)
+ {
+ }
+
+ /**
+ * create a sequence containing a vector of objects.
+ */
+ public BerSequence(Asn1EncodableVector elementVector)
+ : base(elementVector)
+ {
+ }
+
+ internal BerSequence(Asn1Encodable[] elements, bool clone)
+ : base(elements, clone)
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncoding(encoding);
+
+ return new ConstructedILEncoding(Asn1Tags.Universal, Asn1Tags.Sequence,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ return new ConstructedILEncoding(tagClass, tagNo,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+
+ internal override DerBitString ToAsn1BitString()
+ {
+ return new BerBitString(GetConstructedBitStrings());
+ }
+
+ internal override DerExternal ToAsn1External()
+ {
+ // TODO There is currently no BerExternal class (or ToDLObject/ToDerObject)
+ //return ((Asn1Sequence)ToDLObject()).ToAsn1External();
+ return new DLSequence(elements).ToAsn1External();
+ }
+
+ internal override Asn1OctetString ToAsn1OctetString()
+ {
+ return new BerOctetString(GetConstructedOctetStrings());
+ }
+
+ internal override Asn1Set ToAsn1Set()
+ {
+ return new BerSet(false, elements);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSequence.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSequence.cs.meta
new file mode 100644
index 00000000..b35e17a9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSequence.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6f133f22b4b78d34a9f680f5cb023125
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSet.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSet.cs
new file mode 100644
index 00000000..f1fc9546
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSet.cs
@@ -0,0 +1,73 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class BerSet
+ : DerSet
+ {
+ public static new readonly BerSet Empty = new BerSet();
+
+ public static new BerSet FromVector(Asn1EncodableVector elementVector)
+ {
+ return elementVector.Count < 1 ? Empty : new BerSet(elementVector);
+ }
+
+ /**
+ * create an empty set
+ */
+ public BerSet()
+ : base()
+ {
+ }
+
+ /**
+ * create a set containing one object
+ */
+ public BerSet(Asn1Encodable element)
+ : base(element)
+ {
+ }
+
+ public BerSet(params Asn1Encodable[] elements)
+ : base(elements, false)
+ {
+ }
+
+ /**
+ * create a set containing a vector of objects.
+ */
+ public BerSet(Asn1EncodableVector elementVector)
+ : base(elementVector, false)
+ {
+ }
+
+ internal BerSet(bool isSorted, Asn1Encodable[] elements)
+ : base(isSorted, elements)
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncoding(encoding);
+
+ return new ConstructedILEncoding(Asn1Tags.Universal, Asn1Tags.Set,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ return new ConstructedILEncoding(tagClass, tagNo,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSet.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSet.cs.meta
new file mode 100644
index 00000000..dbf91482
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerSet.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3cbc1af8008d12d46a0e1c5746de6176
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerTaggedObject.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerTaggedObject.cs
new file mode 100644
index 00000000..5ddced2e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerTaggedObject.cs
@@ -0,0 +1,92 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * BER TaggedObject - in ASN.1 notation this is any object preceded by
+ * a [n] where n is some number - these are assumed to follow the construction
+ * rules (as with sequences).
+ */
+ public class BerTaggedObject
+ : DerTaggedObject
+ {
+ /**
+ * @param tagNo the tag number for this object.
+ * @param obj the tagged object.
+ */
+ public BerTaggedObject(int tagNo, Asn1Encodable obj)
+ : base(true, tagNo, obj)
+ {
+ }
+
+ public BerTaggedObject(int tagClass, int tagNo, Asn1Encodable obj)
+ : base(true, tagClass, tagNo, obj)
+ {
+ }
+
+ /**
+ * @param isExplicit true if an explicitly tagged object.
+ * @param tagNo the tag number for this object.
+ * @param obj the tagged object.
+ */
+ public BerTaggedObject(bool isExplicit, int tagNo, Asn1Encodable obj)
+ : base(isExplicit, tagNo, obj)
+ {
+ }
+
+ public BerTaggedObject(bool isExplicit, int tagClass, int tagNo, Asn1Encodable obj)
+ : base(isExplicit, tagClass, tagNo, obj)
+ {
+ }
+
+ internal BerTaggedObject(int explicitness, int tagClass, int tagNo, Asn1Encodable obj)
+ : base(explicitness, tagClass, tagNo, obj)
+ {
+ }
+
+ internal override string Asn1Encoding
+ {
+ get { return Ber; }
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncoding(encoding);
+
+ Asn1Object baseObject = GetBaseObject().ToAsn1Object();
+
+ if (!IsExplicit())
+ return baseObject.GetEncodingImplicit(encoding, TagClass, TagNo);
+
+ return new ConstructedILEncoding(TagClass, TagNo, new IAsn1Encoding[]{ baseObject.GetEncoding(encoding) });
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingBer != encoding)
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ Asn1Object baseObject = GetBaseObject().ToAsn1Object();
+
+ if (!IsExplicit())
+ return baseObject.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ return new ConstructedILEncoding(tagClass, tagNo, new IAsn1Encoding[]{ baseObject.GetEncoding(encoding) });
+ }
+
+ internal override Asn1Sequence RebuildConstructed(Asn1Object asn1Object)
+ {
+ return new BerSequence(asn1Object);
+ }
+
+ internal override Asn1TaggedObject ReplaceTag(int tagClass, int tagNo)
+ {
+ return new BerTaggedObject(explicitness, tagClass, tagNo, obj);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerTaggedObject.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerTaggedObject.cs.meta
new file mode 100644
index 00000000..545f247c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/BerTaggedObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 04b1d2e25d7260149bb1bc3d59182839
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedBitStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedBitStream.cs
new file mode 100644
index 00000000..eb170980
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedBitStream.cs
@@ -0,0 +1,192 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class ConstructedBitStream
+ : BaseInputStream
+ {
+ private readonly Asn1StreamParser m_parser;
+ private readonly bool m_octetAligned;
+
+ private bool m_first = true;
+ private int m_padBits = 0;
+
+ private Asn1BitStringParser m_currentParser;
+ private Stream m_currentStream;
+
+ internal ConstructedBitStream(Asn1StreamParser parser, bool octetAligned)
+ {
+ m_parser = parser;
+ m_octetAligned = octetAligned;
+ }
+
+ internal int PadBits
+ {
+ get { return m_padBits; }
+ }
+
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ Streams.ValidateBufferArguments(buffer, offset, count);
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ return Read(buffer.AsSpan(offset, count));
+#else
+ if (count < 1)
+ return 0;
+
+ if (m_currentStream == null)
+ {
+ if (!m_first)
+ return 0;
+
+ m_currentParser = GetNextParser();
+ if (m_currentParser == null)
+ return 0;
+
+ m_first = false;
+ m_currentStream = m_currentParser.GetBitStream();
+ }
+
+ int totalRead = 0;
+
+ for (;;)
+ {
+ int numRead = m_currentStream.Read(buffer, offset + totalRead, count - totalRead);
+
+ if (numRead > 0)
+ {
+ totalRead += numRead;
+
+ if (totalRead == count)
+ return totalRead;
+ }
+ else
+ {
+ m_padBits = m_currentParser.PadBits;
+ m_currentParser = GetNextParser();
+ if (m_currentParser == null)
+ {
+ m_currentStream = null;
+ return totalRead;
+ }
+
+ m_currentStream = m_currentParser.GetBitStream();
+ }
+ }
+#endif
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override int Read(Span buffer)
+ {
+ if (buffer.IsEmpty)
+ return 0;
+
+ if (m_currentStream == null)
+ {
+ if (!m_first)
+ return 0;
+
+ m_currentParser = GetNextParser();
+ if (m_currentParser == null)
+ return 0;
+
+ m_first = false;
+ m_currentStream = m_currentParser.GetBitStream();
+ }
+
+ int totalRead = 0;
+
+ for (;;)
+ {
+ int numRead = m_currentStream.Read(buffer[totalRead..]);
+
+ if (numRead > 0)
+ {
+ totalRead += numRead;
+
+ if (totalRead == buffer.Length)
+ return totalRead;
+ }
+ else
+ {
+ m_padBits = m_currentParser.PadBits;
+ m_currentParser = GetNextParser();
+ if (m_currentParser == null)
+ {
+ m_currentStream = null;
+ return totalRead;
+ }
+
+ m_currentStream = m_currentParser.GetBitStream();
+ }
+ }
+ }
+#endif
+
+ public override int ReadByte()
+ {
+ if (m_currentStream == null)
+ {
+ if (!m_first)
+ return -1;
+
+ m_currentParser = GetNextParser();
+ if (m_currentParser == null)
+ return -1;
+
+ m_first = false;
+ m_currentStream = m_currentParser.GetBitStream();
+ }
+
+ for (;;)
+ {
+ int b = m_currentStream.ReadByte();
+
+ if (b >= 0)
+ return b;
+
+ m_padBits = m_currentParser.PadBits;
+ m_currentParser = GetNextParser();
+ if (m_currentParser == null)
+ {
+ m_currentStream = null;
+ return -1;
+ }
+
+ m_currentStream = m_currentParser.GetBitStream();
+ }
+ }
+
+ private Asn1BitStringParser GetNextParser()
+ {
+ IAsn1Convertible asn1Obj = m_parser.ReadObject();
+ if (asn1Obj == null)
+ {
+ if (m_octetAligned && m_padBits != 0)
+ throw new IOException("expected octet-aligned bitstring, but found padBits: " + m_padBits);
+
+ return null;
+ }
+
+ if (asn1Obj is Asn1BitStringParser)
+ {
+ if (m_padBits != 0)
+ throw new IOException("only the last nested bitstring can have padding");
+
+ return (Asn1BitStringParser)asn1Obj;
+ }
+
+ throw new IOException("unknown object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(asn1Obj));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedBitStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedBitStream.cs.meta
new file mode 100644
index 00000000..d5cdc63e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedBitStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4df5e9cc473b1fb4fbbaf4d414676a85
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedDLEncoding.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedDLEncoding.cs
new file mode 100644
index 00000000..0abbc2f6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedDLEncoding.cs
@@ -0,0 +1,39 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class ConstructedDLEncoding
+ : IAsn1Encoding
+ {
+ private readonly int m_tagClass;
+ private readonly int m_tagNo;
+ private readonly IAsn1Encoding[] m_contentsElements;
+ private readonly int m_contentsLength;
+
+ internal ConstructedDLEncoding(int tagClass, int tagNo, IAsn1Encoding[] contentsElements)
+ {
+ m_tagClass = tagClass;
+ m_tagNo = tagNo;
+ m_contentsElements = contentsElements;
+ m_contentsLength = Asn1OutputStream.GetLengthOfContents(contentsElements);
+ }
+
+ void IAsn1Encoding.Encode(Asn1OutputStream asn1Out)
+ {
+ asn1Out.WriteIdentifier(Asn1Tags.Constructed | m_tagClass, m_tagNo);
+ asn1Out.WriteDL(m_contentsLength);
+ asn1Out.EncodeContents(m_contentsElements);
+ }
+
+ int IAsn1Encoding.GetLength()
+ {
+ return Asn1OutputStream.GetLengthOfIdentifier(m_tagNo)
+ + Asn1OutputStream.GetLengthOfDL(m_contentsLength)
+ + m_contentsLength;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedDLEncoding.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedDLEncoding.cs.meta
new file mode 100644
index 00000000..9cf7ad70
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedDLEncoding.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ed1df0acabdf49e43b42cc028f4e86de
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedILEncoding.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedILEncoding.cs
new file mode 100644
index 00000000..12fdc55a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedILEncoding.cs
@@ -0,0 +1,39 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class ConstructedILEncoding
+ : IAsn1Encoding
+ {
+ private readonly int m_tagClass;
+ private readonly int m_tagNo;
+ private readonly IAsn1Encoding[] m_contentsElements;
+
+ internal ConstructedILEncoding(int tagClass, int tagNo, IAsn1Encoding[] contentsElements)
+ {
+ m_tagClass = tagClass;
+ m_tagNo = tagNo;
+ m_contentsElements = contentsElements;
+ }
+
+ void IAsn1Encoding.Encode(Asn1OutputStream asn1Out)
+ {
+ asn1Out.WriteIdentifier(Asn1Tags.Constructed | m_tagClass, m_tagNo);
+ asn1Out.WriteByte(0x80);
+ asn1Out.EncodeContents(m_contentsElements);
+ asn1Out.WriteByte(0x00);
+ asn1Out.WriteByte(0x00);
+ }
+
+ int IAsn1Encoding.GetLength()
+ {
+ return Asn1OutputStream.GetLengthOfIdentifier(m_tagNo)
+ + 3
+ + Asn1OutputStream.GetLengthOfContents(m_contentsElements);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedILEncoding.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedILEncoding.cs.meta
new file mode 100644
index 00000000..90b18bd1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedILEncoding.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a7bdce731feef0945aebd0ddc41e7aa0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedLazyDLEncoding.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedLazyDLEncoding.cs
new file mode 100644
index 00000000..2df54782
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedLazyDLEncoding.cs
@@ -0,0 +1,37 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class ConstructedLazyDLEncoding
+ : IAsn1Encoding
+ {
+ private readonly int m_tagClass;
+ private readonly int m_tagNo;
+ private readonly byte[] m_contentsOctets;
+
+ internal ConstructedLazyDLEncoding(int tagClass, int tagNo, byte[] contentsOctets)
+ {
+ m_tagClass = tagClass;
+ m_tagNo = tagNo;
+ m_contentsOctets = contentsOctets;
+ }
+
+ void IAsn1Encoding.Encode(Asn1OutputStream asn1Out)
+ {
+ asn1Out.WriteIdentifier(Asn1Tags.Constructed | m_tagClass, m_tagNo);
+ asn1Out.WriteDL(m_contentsOctets.Length);
+ asn1Out.Write(m_contentsOctets, 0, m_contentsOctets.Length);
+ }
+
+ int IAsn1Encoding.GetLength()
+ {
+ return Asn1OutputStream.GetLengthOfIdentifier(m_tagNo)
+ + Asn1OutputStream.GetLengthOfDL(m_contentsOctets.Length)
+ + m_contentsOctets.Length;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedLazyDLEncoding.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedLazyDLEncoding.cs.meta
new file mode 100644
index 00000000..ff0f59f9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedLazyDLEncoding.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e14f4a01de2f81845acdb071cf305c38
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedOctetStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedOctetStream.cs
new file mode 100644
index 00000000..aa06c121
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedOctetStream.cs
@@ -0,0 +1,169 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class ConstructedOctetStream
+ : BaseInputStream
+ {
+ private readonly Asn1StreamParser m_parser;
+
+ private bool m_first = true;
+ private Stream m_currentStream;
+
+ internal ConstructedOctetStream(Asn1StreamParser parser)
+ {
+ m_parser = parser;
+ }
+
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ Streams.ValidateBufferArguments(buffer, offset, count);
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ return Read(buffer.AsSpan(offset, count));
+#else
+ if (count < 1)
+ return 0;
+
+ if (m_currentStream == null)
+ {
+ if (!m_first)
+ return 0;
+
+ Asn1OctetStringParser next = GetNextParser();
+ if (next == null)
+ return 0;
+
+ m_first = false;
+ m_currentStream = next.GetOctetStream();
+ }
+
+ int totalRead = 0;
+
+ for (;;)
+ {
+ int numRead = m_currentStream.Read(buffer, offset + totalRead, count - totalRead);
+
+ if (numRead > 0)
+ {
+ totalRead += numRead;
+
+ if (totalRead == count)
+ return totalRead;
+ }
+ else
+ {
+ Asn1OctetStringParser next = GetNextParser();
+ if (next == null)
+ {
+ m_currentStream = null;
+ return totalRead;
+ }
+
+ m_currentStream = next.GetOctetStream();
+ }
+ }
+#endif
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override int Read(Span buffer)
+ {
+ if (buffer.IsEmpty)
+ return 0;
+
+ if (m_currentStream == null)
+ {
+ if (!m_first)
+ return 0;
+
+ Asn1OctetStringParser next = GetNextParser();
+ if (next == null)
+ return 0;
+
+ m_first = false;
+ m_currentStream = next.GetOctetStream();
+ }
+
+ int totalRead = 0;
+
+ for (;;)
+ {
+ int numRead = m_currentStream.Read(buffer[totalRead..]);
+
+ if (numRead > 0)
+ {
+ totalRead += numRead;
+
+ if (totalRead == buffer.Length)
+ return totalRead;
+ }
+ else
+ {
+ Asn1OctetStringParser next = GetNextParser();
+ if (next == null)
+ {
+ m_currentStream = null;
+ return totalRead;
+ }
+
+ m_currentStream = next.GetOctetStream();
+ }
+ }
+ }
+#endif
+
+ public override int ReadByte()
+ {
+ if (m_currentStream == null)
+ {
+ if (!m_first)
+ return -1;
+
+ Asn1OctetStringParser next = GetNextParser();
+ if (next == null)
+ return -1;
+
+ m_first = false;
+ m_currentStream = next.GetOctetStream();
+ }
+
+ for (;;)
+ {
+ int b = m_currentStream.ReadByte();
+
+ if (b >= 0)
+ return b;
+
+ Asn1OctetStringParser next = GetNextParser();
+ if (next == null)
+ {
+ m_currentStream = null;
+ return -1;
+ }
+
+ m_currentStream = next.GetOctetStream();
+ }
+ }
+
+ private Asn1OctetStringParser GetNextParser()
+ {
+ IAsn1Convertible asn1Obj = m_parser.ReadObject();
+ if (asn1Obj == null)
+ return null;
+
+ if (asn1Obj is Asn1OctetStringParser)
+ return (Asn1OctetStringParser)asn1Obj;
+
+ throw new IOException("unknown object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(asn1Obj));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedOctetStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedOctetStream.cs.meta
new file mode 100644
index 00000000..c2cda509
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ConstructedOctetStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8b6ad31b621c691449423ae0beea4950
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternal.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternal.cs
new file mode 100644
index 00000000..63e10453
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternal.cs
@@ -0,0 +1,274 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * Class representing the DER-type External
+ */
+ public class DerExternal
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerExternal), Asn1Tags.External) {}
+
+ internal override Asn1Object FromImplicitConstructed(Asn1Sequence sequence)
+ {
+ return sequence.ToAsn1External();
+ }
+ }
+
+ public static DerExternal GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerExternal derExternal)
+ return derExternal;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerExternal converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerExternal)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct external from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static DerExternal GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerExternal)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly DerObjectIdentifier directReference;
+ private readonly DerInteger indirectReference;
+ private readonly Asn1ObjectDescriptor dataValueDescriptor;
+ private readonly int encoding;
+ private readonly Asn1Object externalContent;
+
+ public DerExternal(Asn1EncodableVector vector)
+ : this(new DerSequence(vector))
+ {
+ }
+
+ public DerExternal(Asn1Sequence sequence)
+ {
+ int offset = 0;
+
+ Asn1Object asn1 = GetObjFromSequence(sequence, offset);
+ if (asn1 is DerObjectIdentifier)
+ {
+ directReference = (DerObjectIdentifier)asn1;
+ asn1 = GetObjFromSequence(sequence, ++offset);
+ }
+ if (asn1 is DerInteger)
+ {
+ indirectReference = (DerInteger)asn1;
+ asn1 = GetObjFromSequence(sequence, ++offset);
+ }
+ if (!(asn1 is Asn1TaggedObject))
+ {
+ dataValueDescriptor = (Asn1ObjectDescriptor)asn1;
+ asn1 = GetObjFromSequence(sequence, ++offset);
+ }
+
+ if (sequence.Count != offset + 1)
+ throw new ArgumentException("input sequence too large", "sequence");
+
+ if (!(asn1 is Asn1TaggedObject))
+ throw new ArgumentException(
+ "No tagged object found in sequence. Structure doesn't seem to be of type External", "sequence");
+
+ Asn1TaggedObject obj = (Asn1TaggedObject)asn1;
+ this.encoding = CheckEncoding(obj.TagNo);
+ this.externalContent = GetExternalContent(obj);
+ }
+
+ /**
+ * Creates a new instance of DerExternal
+ * See X.690 for more informations about the meaning of these parameters
+ * @param directReference The direct reference or null if not set.
+ * @param indirectReference The indirect reference or null if not set.
+ * @param dataValueDescriptor The data value descriptor or null if not set.
+ * @param externalData The external data in its encoded form.
+ */
+ public DerExternal(DerObjectIdentifier directReference, DerInteger indirectReference,
+ Asn1ObjectDescriptor dataValueDescriptor, DerTaggedObject externalData)
+ {
+ this.directReference = directReference;
+ this.indirectReference = indirectReference;
+ this.dataValueDescriptor = dataValueDescriptor;
+ this.encoding = CheckEncoding(externalData.TagNo);
+ this.externalContent = GetExternalContent(externalData);
+ }
+
+ /**
+ * Creates a new instance of DerExternal.
+ * See X.690 for more informations about the meaning of these parameters
+ * @param directReference The direct reference or null if not set.
+ * @param indirectReference The indirect reference or null if not set.
+ * @param dataValueDescriptor The data value descriptor or null if not set.
+ * @param encoding The encoding to be used for the external data
+ * @param externalData The external data
+ */
+ public DerExternal(DerObjectIdentifier directReference, DerInteger indirectReference,
+ Asn1ObjectDescriptor dataValueDescriptor, int encoding, Asn1Object externalData)
+ {
+ this.directReference = directReference;
+ this.indirectReference = indirectReference;
+ this.dataValueDescriptor = dataValueDescriptor;
+ this.encoding = CheckEncoding(encoding);
+ this.externalContent = CheckExternalContent(encoding, externalData);
+ }
+
+ internal Asn1Sequence BuildSequence()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(4);
+ v.AddOptional(directReference, indirectReference, dataValueDescriptor);
+ v.Add(new DerTaggedObject(0 == encoding, encoding, externalContent));
+ return new DerSequence(v);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return BuildSequence().GetEncodingImplicit(encoding, Asn1Tags.Universal, Asn1Tags.External);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return BuildSequence().GetEncodingImplicit(encoding, tagClass, tagNo);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Objects.GetHashCode(this.directReference)
+ ^ Objects.GetHashCode(this.indirectReference)
+ ^ Objects.GetHashCode(this.dataValueDescriptor)
+ ^ this.encoding
+ ^ this.externalContent.GetHashCode();
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerExternal that = asn1Object as DerExternal;
+ return null != that
+ && Equals(this.directReference, that.directReference)
+ && Equals(this.indirectReference, that.indirectReference)
+ && Equals(this.dataValueDescriptor, that.dataValueDescriptor)
+ && this.encoding == that.encoding
+ && this.externalContent.Equals(that.externalContent);
+ }
+
+ public Asn1ObjectDescriptor DataValueDescriptor
+ {
+ get { return dataValueDescriptor; }
+ }
+
+ public DerObjectIdentifier DirectReference
+ {
+ get { return directReference; }
+ }
+
+ /**
+ * The encoding of the content. Valid values are
+ *
+ * 0 single-ASN1-type
+ * 1 OCTET STRING
+ * 2 BIT STRING
+ *
+ */
+ public int Encoding
+ {
+ get { return encoding; }
+ }
+
+ public Asn1Object ExternalContent
+ {
+ get { return externalContent; }
+ }
+
+ public DerInteger IndirectReference
+ {
+ get { return indirectReference; }
+ }
+
+ private static Asn1ObjectDescriptor CheckDataValueDescriptor(Asn1Object dataValueDescriptor)
+ {
+ if (dataValueDescriptor is Asn1ObjectDescriptor)
+ return (Asn1ObjectDescriptor)dataValueDescriptor;
+ if (dataValueDescriptor is DerGraphicString)
+ return new Asn1ObjectDescriptor((DerGraphicString)dataValueDescriptor);
+
+ throw new ArgumentException("incompatible type for data-value-descriptor", "dataValueDescriptor");
+ }
+
+ private static int CheckEncoding(int encoding)
+ {
+ if (encoding < 0 || encoding > 2)
+ throw new InvalidOperationException("invalid encoding value: " + encoding);
+
+ return encoding;
+ }
+
+ private static Asn1Object CheckExternalContent(int tagNo, Asn1Object externalContent)
+ {
+ switch (tagNo)
+ {
+ case 1:
+ return Asn1OctetString.Meta.Instance.CheckedCast(externalContent);
+ case 2:
+ return DerBitString.Meta.Instance.CheckedCast(externalContent);
+ default:
+ return externalContent;
+ }
+ }
+
+ private static Asn1Object GetExternalContent(Asn1TaggedObject encoding)
+ {
+ int tagClass = encoding.TagClass, tagNo = encoding.TagNo;
+ if (Asn1Tags.ContextSpecific != tagClass)
+ throw new ArgumentException("invalid tag: " + Asn1Utilities.GetTagText(tagClass, tagNo), "encoding");
+
+ switch (tagNo)
+ {
+ case 0:
+ return encoding.GetExplicitBaseObject().ToAsn1Object();
+ case 1:
+ return Asn1OctetString.GetInstance(encoding, false);
+ case 2:
+ return DerBitString.GetInstance(encoding, false);
+ default:
+ throw new ArgumentException("invalid tag: " + Asn1Utilities.GetTagText(tagClass, tagNo), "encoding");
+ }
+ }
+
+ private static Asn1Object GetObjFromSequence(Asn1Sequence sequence, int index)
+ {
+ if (sequence.Count <= index)
+ throw new ArgumentException("too few objects in input sequence", "sequence");
+
+ return sequence[index].ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternal.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternal.cs.meta
new file mode 100644
index 00000000..9d4e7c78
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternal.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7de6b1643459902439cc419ed2c23a5d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternalParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternalParser.cs
new file mode 100644
index 00000000..0a0b11a3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternalParser.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerExternalParser
+ : Asn1Encodable
+ {
+ private readonly Asn1StreamParser m_parser;
+
+ internal DerExternalParser(Asn1StreamParser parser)
+ {
+ m_parser = parser;
+ }
+
+ public IAsn1Convertible ReadObject()
+ {
+ return m_parser.ReadObject();
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return Parse(m_parser);
+ }
+
+ internal static DerExternal Parse(Asn1StreamParser sp)
+ {
+ return new DerExternal(sp.ReadVector());
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternalParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternalParser.cs.meta
new file mode 100644
index 00000000..1f79168f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERExternalParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 76d5229ffcd5a6d4aa7a0503ec69839c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERGenerator.cs
new file mode 100644
index 00000000..ea4a34d1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERGenerator.cs
@@ -0,0 +1,111 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class DerGenerator
+ : Asn1Generator
+ {
+ private bool _tagged = false;
+ private bool _isExplicit;
+ private int _tagNo;
+
+ protected DerGenerator(
+ Stream outStream)
+ : base(outStream)
+ {
+ }
+
+ protected DerGenerator(
+ Stream outStream,
+ int tagNo,
+ bool isExplicit)
+ : base(outStream)
+ {
+ _tagged = true;
+ _isExplicit = isExplicit;
+ _tagNo = tagNo;
+ }
+
+ private static void WriteLength(
+ Stream outStr,
+ int length)
+ {
+ if (length > 127)
+ {
+ int size = 1;
+ int val = length;
+
+ while ((val >>= 8) != 0)
+ {
+ size++;
+ }
+
+ outStr.WriteByte((byte)(size | 0x80));
+
+ for (int i = (size - 1) * 8; i >= 0; i -= 8)
+ {
+ outStr.WriteByte((byte)(length >> i));
+ }
+ }
+ else
+ {
+ outStr.WriteByte((byte)length);
+ }
+ }
+
+ internal static void WriteDerEncoded(
+ Stream outStream,
+ int tag,
+ byte[] bytes)
+ {
+ outStream.WriteByte((byte) tag);
+ WriteLength(outStream, bytes.Length);
+ outStream.Write(bytes, 0, bytes.Length);
+ }
+
+ internal void WriteDerEncoded(
+ int tag,
+ byte[] bytes)
+ {
+ if (_tagged)
+ {
+ int tagNum = _tagNo | Asn1Tags.ContextSpecific;
+
+ if (_isExplicit)
+ {
+ int newTag = _tagNo | Asn1Tags.Constructed | Asn1Tags.ContextSpecific;
+ MemoryStream bOut = new MemoryStream();
+ WriteDerEncoded(bOut, tag, bytes);
+ WriteDerEncoded(Out, newTag, bOut.ToArray());
+ }
+ else
+ {
+ if ((tag & Asn1Tags.Constructed) != 0)
+ {
+ tagNum |= Asn1Tags.Constructed;
+ }
+
+ WriteDerEncoded(Out, tagNum, bytes);
+ }
+ }
+ else
+ {
+ WriteDerEncoded(Out, tag, bytes);
+ }
+ }
+
+ internal static void WriteDerEncoded(
+ Stream outStr,
+ int tag,
+ Stream inStr)
+ {
+ WriteDerEncoded(outStr, tag, Streams.ReadAll(inStr));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERGenerator.cs.meta
new file mode 100644
index 00000000..5a21bfdb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7bab1741429e308439076f0d9a4f0169
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DEROctetStringParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DEROctetStringParser.cs
new file mode 100644
index 00000000..9ddffc1b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DEROctetStringParser.cs
@@ -0,0 +1,40 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerOctetStringParser
+ : Asn1OctetStringParser
+ {
+ private readonly DefiniteLengthInputStream stream;
+
+ internal DerOctetStringParser(
+ DefiniteLengthInputStream stream)
+ {
+ this.stream = stream;
+ }
+
+ public Stream GetOctetStream()
+ {
+ return stream;
+ }
+
+ public Asn1Object ToAsn1Object()
+ {
+ try
+ {
+ return new DerOctetString(stream.ToArray());
+ }
+ catch (IOException e)
+ {
+ throw new InvalidOperationException("IOException converting stream to byte array: " + e.Message, e);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DEROctetStringParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DEROctetStringParser.cs.meta
new file mode 100644
index 00000000..5a0b2435
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DEROctetStringParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 055d489d9e7b2744bb099acf15ba6b8a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceGenerator.cs
new file mode 100644
index 00000000..0f40bab3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceGenerator.cs
@@ -0,0 +1,48 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerSequenceGenerator
+ : DerGenerator
+ {
+ private readonly MemoryStream _bOut = new MemoryStream();
+
+ public DerSequenceGenerator(
+ Stream outStream)
+ : base(outStream)
+ {
+ }
+
+ public DerSequenceGenerator(
+ Stream outStream,
+ int tagNo,
+ bool isExplicit)
+ : base(outStream, tagNo, isExplicit)
+ {
+ }
+
+ public override void AddObject(Asn1Encodable obj)
+ {
+ obj.EncodeTo(_bOut, Asn1Encodable.Der);
+ }
+
+ public override void AddObject(Asn1Object obj)
+ {
+ obj.EncodeTo(_bOut, Asn1Encodable.Der);
+ }
+
+ public override Stream GetRawOutputStream()
+ {
+ return _bOut;
+ }
+
+ public override void Close()
+ {
+ WriteDerEncoded(Asn1Tags.Constructed | Asn1Tags.Sequence, _bOut.ToArray());
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceGenerator.cs.meta
new file mode 100644
index 00000000..f3f7aaaa
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a8636daaeaa4ce64d93c0319e865d18b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceParser.cs
new file mode 100644
index 00000000..abedf0c4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceParser.cs
@@ -0,0 +1,30 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ // TODO[asn1] Should be renamed/replaced with DLSequenceParser
+ public class DerSequenceParser
+ : Asn1SequenceParser
+ {
+ private readonly Asn1StreamParser m_parser;
+
+ internal DerSequenceParser(Asn1StreamParser parser)
+ {
+ this.m_parser = parser;
+ }
+
+ public IAsn1Convertible ReadObject()
+ {
+ return m_parser.ReadObject();
+ }
+
+ public Asn1Object ToAsn1Object()
+ {
+ return DLSequence.FromVector(m_parser.ReadVector());
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceParser.cs.meta
new file mode 100644
index 00000000..9bfab91e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSequenceParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2e70d55d6d960ae43942e648ae0c950c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetGenerator.cs
new file mode 100644
index 00000000..3f46e4cf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetGenerator.cs
@@ -0,0 +1,48 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerSetGenerator
+ : DerGenerator
+ {
+ private readonly MemoryStream _bOut = new MemoryStream();
+
+ public DerSetGenerator(
+ Stream outStream)
+ : base(outStream)
+ {
+ }
+
+ public DerSetGenerator(
+ Stream outStream,
+ int tagNo,
+ bool isExplicit)
+ : base(outStream, tagNo, isExplicit)
+ {
+ }
+
+ public override void AddObject(Asn1Encodable obj)
+ {
+ obj.EncodeTo(_bOut, Asn1Encodable.Der);
+ }
+
+ public override void AddObject(Asn1Object obj)
+ {
+ obj.EncodeTo(_bOut, Asn1Encodable.Der);
+ }
+
+ public override Stream GetRawOutputStream()
+ {
+ return _bOut;
+ }
+
+ public override void Close()
+ {
+ WriteDerEncoded(Asn1Tags.Constructed | Asn1Tags.Set, _bOut.ToArray());
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetGenerator.cs.meta
new file mode 100644
index 00000000..2e0f701a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 723e20a2a5ffa9a45848aa5b6555e2cf
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetParser.cs
new file mode 100644
index 00000000..9e3d92c0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetParser.cs
@@ -0,0 +1,30 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ // TODO[asn1] Should be renamed/replaced with DLSetParser
+ public class DerSetParser
+ : Asn1SetParser
+ {
+ private readonly Asn1StreamParser m_parser;
+
+ internal DerSetParser(Asn1StreamParser parser)
+ {
+ this.m_parser = parser;
+ }
+
+ public IAsn1Convertible ReadObject()
+ {
+ return m_parser.ReadObject();
+ }
+
+ public Asn1Object ToAsn1Object()
+ {
+ return DLSet.FromVector(m_parser.ReadVector());
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetParser.cs.meta
new file mode 100644
index 00000000..0ba53dc9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DERSetParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ddfaf818a55b89b4eac2feeaa19932a6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitString.cs
new file mode 100644
index 00000000..d4b73443
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitString.cs
@@ -0,0 +1,59 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /// A Definite length BIT STRING
+ public class DLBitString
+ : DerBitString
+ {
+ public DLBitString(byte data, int padBits)
+ : base(data, padBits)
+ {
+ }
+
+ public DLBitString(byte[] data)
+ : this(data, 0)
+ {
+ }
+
+ public DLBitString(byte[] data, int padBits)
+ : base(data, padBits)
+ {
+ }
+
+ public DLBitString(int namedBits)
+ : base(namedBits)
+ {
+ }
+
+ public DLBitString(Asn1Encodable obj)
+ : this(obj.GetDerEncoded(), 0)
+ {
+ }
+
+ internal DLBitString(byte[] contents, bool check)
+ : base(contents, check)
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingDer == encoding)
+ return base.GetEncoding(encoding);
+
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.BitString, contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingDer == encoding)
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ return new PrimitiveEncoding(tagClass, tagNo, contents);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitString.cs.meta
new file mode 100644
index 00000000..826d1a85
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d43c59de09d754f41974414f74d28683
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitStringParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitStringParser.cs
new file mode 100644
index 00000000..2523e745
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitStringParser.cs
@@ -0,0 +1,69 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /// Parser for a DL encoded BIT STRING.
+ internal class DLBitStringParser
+ : Asn1BitStringParser
+ {
+ private readonly DefiniteLengthInputStream m_stream;
+ private int m_padBits = 0;
+
+ internal DLBitStringParser(DefiniteLengthInputStream stream)
+ {
+ m_stream = stream;
+ }
+
+ public Stream GetBitStream()
+ {
+ return GetBitStream(false);
+ }
+
+ public Stream GetOctetStream()
+ {
+ return GetBitStream(true);
+ }
+
+ public int PadBits
+ {
+ get { return m_padBits; }
+ }
+
+ public Asn1Object ToAsn1Object()
+ {
+ try
+ {
+ return DerBitString.CreatePrimitive(m_stream.ToArray());
+ }
+ catch (IOException e)
+ {
+ throw new Asn1ParsingException("IOException converting stream to byte array: " + e.Message, e);
+ }
+ }
+
+ private Stream GetBitStream(bool octetAligned)
+ {
+ int length = m_stream.Remaining;
+ if (length < 1)
+ throw new InvalidOperationException("content octets cannot be empty");
+
+ m_padBits = m_stream.ReadByte();
+ if (m_padBits > 0)
+ {
+ if (length < 2)
+ throw new InvalidOperationException("zero length data with non-zero pad bits");
+ if (m_padBits > 7)
+ throw new InvalidOperationException("pad bits cannot be greater than 7 or less than 0");
+ if (octetAligned)
+ throw new IOException("expected octet-aligned bitstring, but found padBits: " + m_padBits);
+ }
+
+ return m_stream;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitStringParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitStringParser.cs.meta
new file mode 100644
index 00000000..79be1b57
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLBitStringParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b3508871b97d4024189aff5c89274477
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSequence.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSequence.cs
new file mode 100644
index 00000000..9cfe890f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSequence.cs
@@ -0,0 +1,95 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class DLSequence
+ : DerSequence
+ {
+ internal static new readonly DLSequence Empty = new DLSequence();
+
+ internal static new DLSequence FromVector(Asn1EncodableVector elementVector)
+ {
+ return elementVector.Count < 1 ? Empty : new DLSequence(elementVector);
+ }
+
+ /**
+ * create an empty sequence
+ */
+ internal DLSequence()
+ : base()
+ {
+ }
+
+ /**
+ * create a sequence containing one object
+ */
+ internal DLSequence(Asn1Encodable element)
+ : base(element)
+ {
+ }
+
+ /**
+ * create a sequence containing two objects
+ */
+ public DLSequence(Asn1Encodable element1, Asn1Encodable element2)
+ : base(element1, element2)
+ {
+ }
+
+ internal DLSequence(params Asn1Encodable[] elements)
+ : base(elements)
+ {
+ }
+
+ /**
+ * create a sequence containing a vector of objects.
+ */
+ internal DLSequence(Asn1EncodableVector elementVector)
+ : base(elementVector)
+ {
+ }
+
+ internal DLSequence(Asn1Encodable[] elements, bool clone)
+ : base(elements, clone)
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingDer == encoding)
+ return base.GetEncoding(encoding);
+
+ return new ConstructedDLEncoding(Asn1Tags.Universal, Asn1Tags.Sequence,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingDer == encoding)
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ return new ConstructedDLEncoding(tagClass, tagNo,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+
+ internal override DerBitString ToAsn1BitString()
+ {
+ return new DLBitString(BerBitString.FlattenBitStrings(GetConstructedBitStrings()), false);
+ }
+
+ // TODO[asn1] DLExternal
+ //internal override DerExternal ToAsn1External()
+ //{
+ // return new DLExternal(this);
+ //}
+
+ internal override Asn1Set ToAsn1Set()
+ {
+ return new DLSet(false, elements);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSequence.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSequence.cs.meta
new file mode 100644
index 00000000..00b40eef
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSequence.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: aee60a4e5f1092c4dba31d041a11410a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSet.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSet.cs
new file mode 100644
index 00000000..fbca39a9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSet.cs
@@ -0,0 +1,71 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class DLSet
+ : DerSet
+ {
+ internal static new readonly DLSet Empty = new DLSet();
+
+ internal static new DLSet FromVector(Asn1EncodableVector elementVector)
+ {
+ return elementVector.Count < 1 ? Empty : new DLSet(elementVector);
+ }
+
+ /**
+ * create an empty set
+ */
+ internal DLSet()
+ : base()
+ {
+ }
+
+ /**
+ * create a set containing one object
+ */
+ internal DLSet(Asn1Encodable element)
+ : base(element)
+ {
+ }
+
+ internal DLSet(params Asn1Encodable[] elements)
+ : base(elements, false)
+ {
+ }
+
+ /**
+ * create a set containing a vector of objects.
+ */
+ internal DLSet(Asn1EncodableVector elementVector)
+ : base(elementVector, false)
+ {
+ }
+
+ internal DLSet(bool isSorted, Asn1Encodable[] elements)
+ : base(isSorted, elements)
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingDer == encoding)
+ return base.GetEncoding(encoding);
+
+ return new ConstructedDLEncoding(Asn1Tags.Universal, Asn1Tags.Set,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingDer == encoding)
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ return new ConstructedDLEncoding(tagClass, tagNo,
+ Asn1OutputStream.GetContentsEncodings(encoding, elements));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSet.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSet.cs.meta
new file mode 100644
index 00000000..ac882fe1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLSet.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 97a0f52e9e1410946a128fba4cd0b9aa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObject.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObject.cs
new file mode 100644
index 00000000..f563e4d7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObject.cs
@@ -0,0 +1,79 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class DLTaggedObject
+ : DerTaggedObject
+ {
+ internal DLTaggedObject(int tagNo, Asn1Encodable obj)
+ : base(tagNo, obj)
+ {
+ }
+
+ internal DLTaggedObject(int tagClass, int tagNo, Asn1Encodable obj)
+ : base(tagClass, tagNo, obj)
+ {
+ }
+
+ internal DLTaggedObject(bool isExplicit, int tagNo, Asn1Encodable obj)
+ : base(isExplicit, tagNo, obj)
+ {
+ }
+
+ internal DLTaggedObject(bool isExplicit, int tagClass, int tagNo, Asn1Encodable obj)
+ : base(isExplicit, tagClass, tagNo, obj)
+ {
+ }
+
+ internal DLTaggedObject(int explicitness, int tagClass, int tagNo, Asn1Encodable obj)
+ : base(explicitness, tagClass, tagNo, obj)
+ {
+ }
+
+ internal override string Asn1Encoding
+ {
+ // TODO[asn1] Use DL encoding when supported
+ get { return Ber; }
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingDer == encoding)
+ return base.GetEncoding(encoding);
+
+ Asn1Object baseObject = GetBaseObject().ToAsn1Object();
+
+ if (!IsExplicit())
+ return baseObject.GetEncodingImplicit(encoding, TagClass, TagNo);
+
+ return new ConstructedDLEncoding(TagClass, TagNo, new IAsn1Encoding[]{ baseObject.GetEncoding(encoding) });
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingDer == encoding)
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ Asn1Object baseObject = GetBaseObject().ToAsn1Object();
+
+ if (!IsExplicit())
+ return baseObject.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ return new ConstructedDLEncoding(tagClass, tagNo, new IAsn1Encoding[]{ baseObject.GetEncoding(encoding) });
+ }
+
+ internal override Asn1Sequence RebuildConstructed(Asn1Object asn1Object)
+ {
+ return new DLSequence(asn1Object);
+ }
+
+ internal override Asn1TaggedObject ReplaceTag(int tagClass, int tagNo)
+ {
+ return new DLTaggedObject(explicitness, tagClass, tagNo, obj);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObject.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObject.cs.meta
new file mode 100644
index 00000000..a398d681
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6339bcf433150e742a5fc43ebbe249fe
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObjectParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObjectParser.cs
new file mode 100644
index 00000000..a8681555
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObjectParser.cs
@@ -0,0 +1,78 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * Parser for definite-length tagged objects.
+ */
+ internal class DLTaggedObjectParser
+ : BerTaggedObjectParser
+ {
+ private readonly bool m_constructed;
+
+ internal DLTaggedObjectParser(int tagClass, int tagNo, bool constructed, Asn1StreamParser parser)
+ : base(tagClass, tagNo, parser)
+ {
+ m_constructed = constructed;
+ }
+
+ public override bool IsConstructed
+ {
+ get { return m_constructed; }
+ }
+
+ public override IAsn1Convertible ParseBaseUniversal(bool declaredExplicit, int baseTagNo)
+ {
+ if (declaredExplicit)
+ {
+ if (!m_constructed)
+ throw new IOException("Explicit tags must be constructed (see X.690 8.14.2)");
+
+ return m_parser.ParseObject(baseTagNo);
+ }
+
+ return m_constructed
+ ? m_parser.ParseImplicitConstructedDL(baseTagNo)
+ : m_parser.ParseImplicitPrimitive(baseTagNo);
+ }
+
+ public override IAsn1Convertible ParseExplicitBaseObject()
+ {
+ if (!m_constructed)
+ throw new IOException("Explicit tags must be constructed (see X.690 8.14.2)");
+
+ return m_parser.ReadObject();
+ }
+
+ public override Asn1TaggedObjectParser ParseExplicitBaseTagged()
+ {
+ if (!m_constructed)
+ throw new IOException("Explicit tags must be constructed (see X.690 8.14.2)");
+
+ return m_parser.ParseTaggedObject();
+ }
+
+ public override Asn1TaggedObjectParser ParseImplicitBaseTagged(int baseTagClass, int baseTagNo)
+ {
+ return new DLTaggedObjectParser(baseTagClass, baseTagNo, m_constructed, m_parser);
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ try
+ {
+ return m_parser.LoadTaggedDL(TagClass, TagNo, m_constructed);
+ }
+ catch (IOException e)
+ {
+ throw new Asn1ParsingException(e.Message);
+ }
+ }
+ }
+}
+
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObjectParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObjectParser.cs.meta
new file mode 100644
index 00000000..a10c6cb3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DLTaggedObjectParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b129bd8a066d10243a74987fcd9214e8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DefiniteLengthInputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DefiniteLengthInputStream.cs
new file mode 100644
index 00000000..06aeccb9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DefiniteLengthInputStream.cs
@@ -0,0 +1,142 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ class DefiniteLengthInputStream
+ : LimitedInputStream
+ {
+ private static readonly byte[] EmptyBytes = new byte[0];
+
+ private readonly int _originalLength;
+ private int _remaining;
+
+ internal DefiniteLengthInputStream(Stream inStream, int length, int limit)
+ : base(inStream, limit)
+ {
+ if (length <= 0)
+ {
+ if (length < 0)
+ throw new ArgumentException("negative lengths not allowed", "length");
+
+ SetParentEofDetect();
+ }
+
+ this._originalLength = length;
+ this._remaining = length;
+ }
+
+ internal int Remaining
+ {
+ get { return _remaining; }
+ }
+
+ public override int ReadByte()
+ {
+ if (_remaining < 2)
+ {
+ if (_remaining == 0)
+ return -1;
+
+ int b = _in.ReadByte();
+ if (b < 0)
+ throw new EndOfStreamException("DEF length " + _originalLength + " object truncated by " + _remaining);
+
+ _remaining = 0;
+ SetParentEofDetect();
+
+ return b;
+ }
+ else
+ {
+ int b = _in.ReadByte();
+ if (b < 0)
+ throw new EndOfStreamException("DEF length " + _originalLength + " object truncated by " + _remaining);
+
+ --_remaining;
+ return b;
+ }
+ }
+
+ public override int Read(byte[] buf, int off, int len)
+ {
+ if (_remaining == 0)
+ return 0;
+
+ int toRead = System.Math.Min(len, _remaining);
+ int numRead = _in.Read(buf, off, toRead);
+
+ if (numRead < 1)
+ throw new EndOfStreamException("DEF length " + _originalLength + " object truncated by " + _remaining);
+
+ if ((_remaining -= numRead) == 0)
+ {
+ SetParentEofDetect();
+ }
+
+ return numRead;
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override int Read(Span buffer)
+ {
+ if (_remaining == 0)
+ return 0;
+
+ int toRead = System.Math.Min(buffer.Length, _remaining);
+ int numRead = _in.Read(buffer[..toRead]);
+
+ if (numRead < 1)
+ throw new EndOfStreamException("DEF length " + _originalLength + " object truncated by " + _remaining);
+
+ if ((_remaining -= numRead) == 0)
+ {
+ SetParentEofDetect();
+ }
+
+ return numRead;
+ }
+#endif
+
+ internal void ReadAllIntoByteArray(byte[] buf)
+ {
+ if (_remaining != buf.Length)
+ throw new ArgumentException("buffer length not right for data");
+
+ if (_remaining == 0)
+ return;
+
+ // make sure it's safe to do this!
+ int limit = Limit;
+ if (_remaining >= limit)
+ throw new IOException("corrupted stream - out of bounds length found: " + _remaining + " >= " + limit);
+
+ if ((_remaining -= Streams.ReadFully(_in, buf, 0, buf.Length)) != 0)
+ throw new EndOfStreamException("DEF length " + _originalLength + " object truncated by " + _remaining);
+ SetParentEofDetect();
+ }
+
+ internal byte[] ToArray()
+ {
+ if (_remaining == 0)
+ return EmptyBytes;
+
+ // make sure it's safe to do this!
+ int limit = Limit;
+ if (_remaining >= limit)
+ throw new IOException("corrupted stream - out of bounds length found: " + _remaining + " >= " + limit);
+
+ byte[] bytes = new byte[_remaining];
+ if ((_remaining -= Streams.ReadFully(_in, bytes, 0, bytes.Length)) != 0)
+ throw new EndOfStreamException("DEF length " + _originalLength + " object truncated by " + _remaining);
+ SetParentEofDetect();
+ return bytes;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DefiniteLengthInputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DefiniteLengthInputStream.cs.meta
new file mode 100644
index 00000000..34d7e80a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DefiniteLengthInputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5a06b938d8d7bef4a9969af62aa3b989
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerApplicationSpecific.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerApplicationSpecific.cs
new file mode 100644
index 00000000..0454b349
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerApplicationSpecific.cs
@@ -0,0 +1,3 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerApplicationSpecific.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerApplicationSpecific.cs.meta
new file mode 100644
index 00000000..bf5368e8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerApplicationSpecific.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ae4fdc6ab80d7324c9fc8f7674ab0f4b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBMPString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBMPString.cs
new file mode 100644
index 00000000..2f0d6538
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBMPString.cs
@@ -0,0 +1,170 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * Der BMPString object.
+ */
+ public class DerBmpString
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerBmpString), Asn1Tags.BmpString) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return a BMP string from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerBmpString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerBmpString derBmpString)
+ return derBmpString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerBmpString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerBmpString)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct BMP string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return a BMP string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerBmpString GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerBmpString)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly string m_str;
+
+ internal DerBmpString(byte[] contents)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ int byteLen = contents.Length;
+ if (0 != (byteLen & 1))
+ throw new ArgumentException("malformed BMPString encoding encountered", "contents");
+
+ int charLen = byteLen / 2;
+ char[] cs = new char[charLen];
+
+ for (int i = 0; i != charLen; i++)
+ {
+ cs[i] = (char)((contents[2 * i] << 8) | (contents[2 * i + 1] & 0xff));
+ }
+
+ m_str = new string(cs);
+ }
+
+ internal DerBmpString(char[] str)
+ {
+ if (str == null)
+ throw new ArgumentNullException("str");
+
+ m_str = new string(str);
+ }
+
+ /**
+ * basic constructor
+ */
+ public DerBmpString(string str)
+ {
+ if (str == null)
+ throw new ArgumentNullException("str");
+
+ m_str = str;
+ }
+
+ public override string GetString()
+ {
+ return m_str;
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerBmpString that = asn1Object as DerBmpString;
+ return null != that
+ && this.m_str.Equals(that.m_str);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return m_str.GetHashCode();
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.BmpString, GetContents());
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, GetContents());
+ }
+
+ private byte[] GetContents()
+ {
+ char[] c = m_str.ToCharArray();
+ byte[] b = new byte[c.Length * 2];
+
+ for (int i = 0; i != c.Length; i++)
+ {
+ b[2 * i] = (byte)(c[i] >> 8);
+ b[2 * i + 1] = (byte)c[i];
+ }
+
+ return b;
+ }
+
+ internal static DerBmpString CreatePrimitive(byte[] contents)
+ {
+ return new DerBmpString(contents);
+ }
+
+ internal static DerBmpString CreatePrimitive(char[] str)
+ {
+ // TODO[asn1] Asn1InputStream has a validator/converter that should be unified in this class somehow
+ return new DerBmpString(str);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBMPString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBMPString.cs.meta
new file mode 100644
index 00000000..907da9d9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBMPString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d1cfd94322d7199449fe2fe04f974ce9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBitString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBitString.cs
new file mode 100644
index 00000000..fb199692
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBitString.cs
@@ -0,0 +1,373 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerBitString
+ : DerStringBase, Asn1BitStringParser
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerBitString), Asn1Tags.BitString) { }
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+
+ internal override Asn1Object FromImplicitConstructed(Asn1Sequence sequence)
+ {
+ return sequence.ToAsn1BitString();
+ }
+ }
+
+ private static readonly char[] table
+ = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+
+ /**
+ * return a Bit string from the passed in object
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerBitString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerBitString derBitString)
+ return derBitString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerBitString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return GetInstance(FromByteArray(bytes));
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct BIT STRING from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return a Bit string from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot
+ * be converted.
+ */
+ public static DerBitString GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ Asn1Object o = obj.GetObject();
+
+ if (isExplicit || o is DerBitString)
+ {
+ return GetInstance(o);
+ }
+
+ // Not copied because assumed to be a tagged implicit primitive from the parser
+ return CreatePrimitive(((Asn1OctetString)o).GetOctets());
+ }
+
+ internal readonly byte[] contents;
+
+ public DerBitString(byte data, int padBits)
+ {
+ if (padBits > 7 || padBits < 0)
+ throw new ArgumentException("pad bits cannot be greater than 7 or less than 0", "padBits");
+
+ this.contents = new byte[] { (byte)padBits, data };
+ }
+
+ public DerBitString(byte[] data)
+ : this(data, 0)
+ {
+ }
+
+ /**
+ * @param data the octets making up the bit string.
+ * @param padBits the number of extra bits at the end of the string.
+ */
+ public DerBitString(byte[] data, int padBits)
+ {
+ if (data == null)
+ throw new ArgumentNullException("data");
+ if (padBits < 0 || padBits > 7)
+ throw new ArgumentException("must be in the range 0 to 7", "padBits");
+ if (data.Length == 0 && padBits != 0)
+ throw new ArgumentException("if 'data' is empty, 'padBits' must be 0");
+
+ this.contents = Arrays.Prepend(data, (byte)padBits);
+ }
+
+ public DerBitString(int namedBits)
+ {
+ if (namedBits == 0)
+ {
+ this.contents = new byte[]{ 0 };
+ return;
+ }
+
+ int bits = 32 - Integers.NumberOfLeadingZeros(namedBits);
+ int bytes = (bits + 7) / 8;
+ Debug.Assert(0 < bytes && bytes <= 4);
+
+ byte[] data = new byte[1 + bytes];
+
+ for (int i = 1; i < bytes; i++)
+ {
+ data[i] = (byte)namedBits;
+ namedBits >>= 8;
+ }
+
+ Debug.Assert((namedBits & 0xFF) != 0);
+ data[bytes] = (byte)namedBits;
+
+ int padBits = 0;
+ while ((namedBits & (1 << padBits)) == 0)
+ {
+ ++padBits;
+ }
+
+ Debug.Assert(padBits < 8);
+ data[0] = (byte)padBits;
+
+ this.contents = data;
+ }
+
+ public DerBitString(Asn1Encodable obj)
+ : this(obj.GetDerEncoded())
+ {
+ }
+
+ internal DerBitString(byte[] contents, bool check)
+ {
+ if (check)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+ if (contents.Length < 1)
+ throw new ArgumentException("cannot be empty", "contents");
+
+ int padBits = contents[0];
+ if (padBits > 0)
+ {
+ if (contents.Length < 2)
+ throw new ArgumentException("zero length data with non-zero pad bits", "contents");
+ if (padBits > 7)
+ throw new ArgumentException("pad bits cannot be greater than 7 or less than 0", "contents");
+ }
+ }
+
+ this.contents = contents;
+ }
+
+ /**
+ * Return the octets contained in this BIT STRING, checking that this BIT STRING really
+ * does represent an octet aligned string. Only use this method when the standard you are
+ * following dictates that the BIT STRING will be octet aligned.
+ *
+ * @return a copy of the octet aligned data.
+ */
+ public virtual byte[] GetOctets()
+ {
+ if (contents[0] != 0)
+ throw new InvalidOperationException("attempt to get non-octet aligned data from BIT STRING");
+
+ return Arrays.CopyOfRange(contents, 1, contents.Length);
+ }
+
+ public virtual byte[] GetBytes()
+ {
+ if (contents.Length == 1)
+ return Asn1OctetString.EmptyOctets;
+
+ int padBits = contents[0];
+ byte[] rv = Arrays.CopyOfRange(contents, 1, contents.Length);
+ // DER requires pad bits be zero
+ rv[rv.Length - 1] &= (byte)(0xFF << padBits);
+ return rv;
+ }
+
+ public virtual int PadBits
+ {
+ get { return contents[0]; }
+ }
+
+ /**
+ * @return the value of the bit string as an int (truncating if necessary)
+ */
+ public virtual int IntValue
+ {
+ get
+ {
+ int value = 0, end = System.Math.Min(5, contents.Length - 1);
+ for (int i = 1; i < end; ++i)
+ {
+ value |= (int)contents[i] << (8 * (i - 1));
+ }
+ if (1 <= end && end < 5)
+ {
+ int padBits = contents[0];
+ byte der = (byte)(contents[end] & (0xFF << padBits));
+ value |= (int)der << (8 * (end - 1));
+ }
+ return value;
+ }
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ int padBits = contents[0];
+ if (padBits != 0)
+ {
+ int last = contents.Length - 1;
+ byte lastBer = contents[last];
+ byte lastDer = (byte)(lastBer & (0xFF << padBits));
+
+ if (lastBer != lastDer)
+ return new PrimitiveEncodingSuffixed(Asn1Tags.Universal, Asn1Tags.BitString, contents, lastDer);
+ }
+
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.BitString, contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ int padBits = contents[0];
+ if (padBits != 0)
+ {
+ int last = contents.Length - 1;
+ byte lastBer = contents[last];
+ byte lastDer = (byte)(lastBer & (0xFF << padBits));
+
+ if (lastBer != lastDer)
+ return new PrimitiveEncodingSuffixed(tagClass, tagNo, contents, lastDer);
+ }
+
+ return new PrimitiveEncoding(tagClass, tagNo, contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ if (contents.Length < 2)
+ return 1;
+
+ int padBits = contents[0];
+ int last = contents.Length - 1;
+
+ byte lastDer = (byte)(contents[last] & (0xFF << padBits));
+
+ int hc = Arrays.GetHashCode(contents, 0, last);
+ hc *= 257;
+ hc ^= lastDer;
+ return hc;
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerBitString that = asn1Object as DerBitString;
+ if (null == that)
+ return false;
+
+ byte[] thisContents = this.contents, thatContents = that.contents;
+
+ int length = thisContents.Length;
+ if (thatContents.Length != length)
+ return false;
+ if (length == 1)
+ return true;
+
+ int last = length - 1;
+ for (int i = 0; i < last; ++i)
+ {
+ if (thisContents[i] != thatContents[i])
+ return false;
+ }
+
+ int padBits = thisContents[0];
+ byte thisLastDer = (byte)(thisContents[last] & (0xFF << padBits));
+ byte thatLastDer = (byte)(thatContents[last] & (0xFF << padBits));
+
+ return thisLastDer == thatLastDer;
+ }
+
+ public Stream GetBitStream()
+ {
+ return new MemoryStream(contents, 1, contents.Length - 1, false);
+ }
+
+ public Stream GetOctetStream()
+ {
+ int padBits = contents[0] & 0xFF;
+ if (0 != padBits)
+ throw new IOException("expected octet-aligned bitstring, but found padBits: " + padBits);
+
+ return GetBitStream();
+ }
+
+ public Asn1BitStringParser Parser
+ {
+ get { return this; }
+ }
+
+ public override string GetString()
+ {
+ byte[] str = GetDerEncoded();
+
+ StringBuilder buffer = Shared.PlatformSupport.Text.StringBuilderPool.Get(1 + str.Length * 2); //new StringBuilder(1 + str.Length * 2);
+ buffer.Append('#');
+
+ for (int i = 0; i != str.Length; i++)
+ {
+ uint u8 = str[i];
+ buffer.Append(table[u8 >> 4]);
+ buffer.Append(table[u8 & 0xF]);
+ }
+
+ return Shared.PlatformSupport.Text.StringBuilderPool.ReleaseAndGrab(buffer);
+ }
+
+ internal static DerBitString CreatePrimitive(byte[] contents)
+ {
+ int length = contents.Length;
+ if (length < 1)
+ throw new ArgumentException("truncated BIT STRING detected", "contents");
+
+ int padBits = contents[0];
+ if (padBits > 0)
+ {
+ if (padBits > 7 || length < 2)
+ throw new ArgumentException("invalid pad bits detected", "contents");
+
+ byte finalOctet = contents[length - 1];
+ if (finalOctet != (byte)(finalOctet & (0xFF << padBits)))
+ return new DLBitString(contents, false);
+ }
+
+ return new DerBitString(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBitString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBitString.cs.meta
new file mode 100644
index 00000000..5dcef7d6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBitString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: afe4a168436e143438c7233820e235ab
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBoolean.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBoolean.cs
new file mode 100644
index 00000000..fa9213a0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBoolean.cs
@@ -0,0 +1,161 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerBoolean
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerBoolean), Asn1Tags.Boolean) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ public static readonly DerBoolean False = new DerBoolean(false);
+ public static readonly DerBoolean True = new DerBoolean(true);
+
+ /**
+ * return a bool from the passed in object.
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerBoolean GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerBoolean derBoolean)
+ return derBoolean;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerBoolean converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerBoolean)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct boolean from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public static DerBoolean GetInstance(bool value)
+ {
+ return value ? True : False;
+ }
+
+ public static DerBoolean GetInstance(int value)
+ {
+ return value != 0 ? True : False;
+ }
+
+ /**
+ * return a Boolean from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerBoolean GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerBoolean)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte value;
+
+ public DerBoolean(
+ byte[] val)
+ {
+ if (val.Length != 1)
+ throw new ArgumentException("byte value should have 1 byte in it", "val");
+
+ // TODO Are there any constraints on the possible byte values?
+ this.value = val[0];
+ }
+
+ private DerBoolean(
+ bool value)
+ {
+ this.value = value ? (byte)0xff : (byte)0;
+ }
+
+ public bool IsTrue
+ {
+ get { return value != 0; }
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.Boolean, GetContents(encoding));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, GetContents(encoding));
+ }
+
+ protected override bool Asn1Equals(
+ Asn1Object asn1Object)
+ {
+ DerBoolean other = asn1Object as DerBoolean;
+
+ if (other == null)
+ return false;
+
+ return IsTrue == other.IsTrue;
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return IsTrue.GetHashCode();
+ }
+
+ public override string ToString()
+ {
+ return IsTrue ? "TRUE" : "FALSE";
+ }
+
+ internal static DerBoolean CreatePrimitive(byte[] contents)
+ {
+ if (contents.Length != 1)
+ throw new ArgumentException("BOOLEAN value should have 1 byte in it", "contents");
+
+ byte b = contents[0];
+
+ return b == 0 ? False : b == 0xFF ? True : new DerBoolean(contents);
+ }
+
+ private byte[] GetContents(int encoding)
+ {
+ byte contents = value;
+ if (Asn1OutputStream.EncodingDer == encoding && IsTrue)
+ {
+ contents = 0xFF;
+ }
+
+ return new byte[]{ contents };
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBoolean.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBoolean.cs.meta
new file mode 100644
index 00000000..e4b0bc50
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerBoolean.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c3ae8606957a24d4f834357fba92926a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerEnumerated.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerEnumerated.cs
new file mode 100644
index 00000000..ebd6ada7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerEnumerated.cs
@@ -0,0 +1,196 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerEnumerated
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerEnumerated), Asn1Tags.Enumerated) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets(), false);
+ }
+ }
+
+ /**
+ * return an integer from the passed in object
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerEnumerated GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerEnumerated derEnumerated)
+ return derEnumerated;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerEnumerated converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerEnumerated)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct enumerated from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return an Enumerated from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerEnumerated GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerEnumerated)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] contents;
+ private readonly int start;
+
+ public DerEnumerated(int val)
+ {
+ if (val < 0)
+ throw new ArgumentException("enumerated must be non-negative", "val");
+
+ this.contents = BigInteger.ValueOf(val).ToByteArray();
+ this.start = 0;
+ }
+
+ public DerEnumerated(long val)
+ {
+ if (val < 0L)
+ throw new ArgumentException("enumerated must be non-negative", "val");
+
+ this.contents = BigInteger.ValueOf(val).ToByteArray();
+ this.start = 0;
+ }
+
+ public DerEnumerated(BigInteger val)
+ {
+ if (val.SignValue < 0)
+ throw new ArgumentException("enumerated must be non-negative", "val");
+
+ this.contents = val.ToByteArray();
+ this.start = 0;
+ }
+
+ public DerEnumerated(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerEnumerated(byte[] contents, bool clone)
+ {
+ if (DerInteger.IsMalformed(contents))
+ throw new ArgumentException("malformed enumerated", "contents");
+ if (0 != (contents[0] & 0x80))
+ throw new ArgumentException("enumerated must be non-negative", "contents");
+
+ this.contents = clone ? Arrays.Clone(contents) : contents;
+ this.start = DerInteger.SignBytesToSkip(this.contents);
+ }
+
+ public BigInteger Value
+ {
+ get { return new BigInteger(contents); }
+ }
+
+ public bool HasValue(int x)
+ {
+ return (contents.Length - start) <= 4
+ && DerInteger.IntValue(contents, start, DerInteger.SignExtSigned) == x;
+ }
+
+ public bool HasValue(BigInteger x)
+ {
+ return null != x
+ // Fast check to avoid allocation
+ && DerInteger.IntValue(contents, start, DerInteger.SignExtSigned) == x.IntValue
+ && Value.Equals(x);
+ }
+
+ public int IntValueExact
+ {
+ get
+ {
+ int count = contents.Length - start;
+ if (count > 4)
+ throw new ArithmeticException("ASN.1 Enumerated out of int range");
+
+ return DerInteger.IntValue(contents, start, DerInteger.SignExtSigned);
+ }
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.Enumerated, contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerEnumerated other = asn1Object as DerEnumerated;
+ if (other == null)
+ return false;
+
+ return Arrays.AreEqual(this.contents, other.contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(contents);
+ }
+
+ private static readonly DerEnumerated[] cache = new DerEnumerated[12];
+
+ internal static DerEnumerated CreatePrimitive(byte[] contents, bool clone)
+ {
+ if (contents.Length > 1)
+ return new DerEnumerated(contents, clone);
+ if (contents.Length == 0)
+ throw new ArgumentException("ENUMERATED has zero length", "contents");
+
+ int value = contents[0];
+ if (value >= cache.Length)
+ return new DerEnumerated(contents, clone);
+
+ DerEnumerated possibleMatch = cache[value];
+ if (possibleMatch == null)
+ {
+ cache[value] = possibleMatch = new DerEnumerated(contents, clone);
+ }
+ return possibleMatch;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerEnumerated.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerEnumerated.cs.meta
new file mode 100644
index 00000000..ec3c9210
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerEnumerated.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c38944825bb299c48bbb1fd4953fca56
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralString.cs
new file mode 100644
index 00000000..51211050
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralString.cs
@@ -0,0 +1,121 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerGeneralString
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerGeneralString), Asn1Tags.GeneralString) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ public static DerGeneralString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerGeneralString derGeneralString)
+ return derGeneralString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerGeneralString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerGeneralString)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct general string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public static DerGeneralString GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerGeneralString)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerGeneralString(string str)
+ {
+ if (str == null)
+ throw new ArgumentNullException("str");
+
+ m_contents = Strings.ToAsciiByteArray(str);
+ }
+
+ public DerGeneralString(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerGeneralString(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ return Strings.FromAsciiByteArray(m_contents);
+ }
+
+ public byte[] GetOctets()
+ {
+ return Arrays.Clone(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.GeneralString, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerGeneralString that = asn1Object as DerGeneralString;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ internal static DerGeneralString CreatePrimitive(byte[] contents)
+ {
+ return new DerGeneralString(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralString.cs.meta
new file mode 100644
index 00000000..d410f9f3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6f2953ef1a29c4145a7caa92482546b7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralizedTime.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralizedTime.cs
new file mode 100644
index 00000000..bf410b6c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralizedTime.cs
@@ -0,0 +1,38 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerGeneralizedTime
+ : Asn1GeneralizedTime
+ {
+ public DerGeneralizedTime(string timeString)
+ : base(timeString)
+ {
+ }
+
+ public DerGeneralizedTime(DateTime dateTime)
+ : base(dateTime)
+ {
+ }
+
+ internal DerGeneralizedTime(byte[] contents)
+ : base(contents)
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.GeneralizedTime,
+ GetContents(Asn1OutputStream.EncodingDer));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, GetContents(Asn1OutputStream.EncodingDer));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralizedTime.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralizedTime.cs.meta
new file mode 100644
index 00000000..7294273c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGeneralizedTime.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cbdbd0fdc2cac9e4b904480e09ae7b9a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGraphicString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGraphicString.cs
new file mode 100644
index 00000000..aa7e17ee
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGraphicString.cs
@@ -0,0 +1,128 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerGraphicString
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerGraphicString), Asn1Tags.GraphicString) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return a Graphic String from the passed in object
+ *
+ * @param obj a DerGraphicString or an object that can be converted into one.
+ * @exception IllegalArgumentException if the object cannot be converted.
+ * @return a DerGraphicString instance, or null.
+ */
+ public static DerGraphicString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerGraphicString derGraphicString)
+ return derGraphicString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerGraphicString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerGraphicString)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct graphic string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * return a Graphic String from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception IllegalArgumentException if the tagged object cannot be converted.
+ * @return a DerGraphicString instance, or null.
+ */
+ public static DerGraphicString GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerGraphicString)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerGraphicString(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerGraphicString(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ this.m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ return Strings.FromByteArray(m_contents);
+ }
+
+ public byte[] GetOctets()
+ {
+ return Arrays.Clone(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.GraphicString, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerGraphicString that = asn1Object as DerGraphicString;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ internal static DerGraphicString CreatePrimitive(byte[] contents)
+ {
+ return new DerGraphicString(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGraphicString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGraphicString.cs.meta
new file mode 100644
index 00000000..d11c49fd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerGraphicString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 940e3e1a96b330c43ab6ed65d0c681a5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerIA5String.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerIA5String.cs
new file mode 100644
index 00000000..68c2bcd7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerIA5String.cs
@@ -0,0 +1,168 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * IA5String object - this is an Ascii string.
+ */
+ public class DerIA5String
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerIA5String), Asn1Tags.IA5String) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return an IA5 string from the passed in object
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerIA5String GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerIA5String derIA5String)
+ return derIA5String;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerIA5String converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerIA5String)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct IA5 string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return an IA5 string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerIA5String GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerIA5String)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerIA5String(string str)
+ : this(str, false)
+ {
+ }
+
+ /**
+ * Constructor with optional validation.
+ *
+ * @param string the base string to wrap.
+ * @param validate whether or not to check the string.
+ * @throws ArgumentException if validate is true and the string
+ * contains characters that should not be in an IA5String.
+ */
+ public DerIA5String(string str, bool validate)
+ {
+ if (str == null)
+ throw new ArgumentNullException("str");
+ if (validate && !IsIA5String(str))
+ throw new ArgumentException("string contains illegal characters", "str");
+
+ m_contents = Strings.ToAsciiByteArray(str);
+ }
+
+ public DerIA5String(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerIA5String(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ return Strings.FromAsciiByteArray(m_contents);
+ }
+
+ public byte[] GetOctets()
+ {
+ return Arrays.Clone(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.IA5String, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerIA5String that = asn1Object as DerIA5String;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ /**
+ * return true if the passed in String can be represented without
+ * loss as an IA5String, false otherwise.
+ *
+ * @return true if in printable set, false otherwise.
+ */
+ public static bool IsIA5String(string str)
+ {
+ foreach (char ch in str)
+ {
+ if (ch > 0x007f)
+ return false;
+ }
+
+ return true;
+ }
+
+ internal static DerIA5String CreatePrimitive(byte[] contents)
+ {
+ return new DerIA5String(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerIA5String.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerIA5String.cs.meta
new file mode 100644
index 00000000..59e182d2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerIA5String.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f149b931f494537459126bb9eb037c09
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerInteger.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerInteger.cs
new file mode 100644
index 00000000..3c7b65d3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerInteger.cs
@@ -0,0 +1,283 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerInteger
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerInteger), Asn1Tags.Integer) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ public const string AllowUnsafeProperty = "Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.AllowUnsafeInteger";
+
+ internal static bool AllowUnsafe()
+ {
+ string allowUnsafeValue = Org.BouncyCastle.Utilities.Platform.GetEnvironmentVariable(AllowUnsafeProperty);
+ return allowUnsafeValue != null && Org.BouncyCastle.Utilities.Platform.EqualsIgnoreCase("true", allowUnsafeValue);
+ }
+
+ internal const int SignExtSigned = -1;
+ internal const int SignExtUnsigned = 0xFF;
+
+ private readonly byte[] bytes;
+ private readonly int start;
+
+ /**
+ * return an integer from the passed in object
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerInteger GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerInteger derInteger)
+ return derInteger;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerInteger converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerInteger)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct integer from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return an Integer from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerInteger GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerInteger)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ public DerInteger(int value)
+ {
+ this.bytes = BigInteger.ValueOf(value).ToByteArray();
+ this.start = 0;
+ }
+
+ public DerInteger(long value)
+ {
+ this.bytes = BigInteger.ValueOf(value).ToByteArray();
+ this.start = 0;
+ }
+
+ public DerInteger(BigInteger value)
+ {
+ if (value == null)
+ throw new ArgumentNullException("value");
+
+ this.bytes = value.ToByteArray();
+ this.start = 0;
+ }
+
+ public DerInteger(byte[] bytes)
+ : this(bytes, true)
+ {
+ }
+
+ internal DerInteger(byte[] bytes, bool clone)
+ {
+ if (IsMalformed(bytes))
+ throw new ArgumentException("malformed integer", "bytes");
+
+ this.bytes = clone ? Arrays.Clone(bytes) : bytes;
+ this.start = SignBytesToSkip(bytes);
+ }
+
+ /**
+ * in some cases positive values Get crammed into a space,
+ * that's not quite big enough...
+ */
+ public BigInteger PositiveValue
+ {
+ get { return new BigInteger(1, bytes); }
+ }
+
+ public BigInteger Value
+ {
+ get { return new BigInteger(bytes); }
+ }
+
+ public bool HasValue(int x)
+ {
+ return (bytes.Length - start) <= 4
+ && IntValue(bytes, start, SignExtSigned) == x;
+ }
+
+ public bool HasValue(long x)
+ {
+ return (bytes.Length - start) <= 8
+ && LongValue(bytes, start, SignExtSigned) == x;
+ }
+
+ public bool HasValue(BigInteger x)
+ {
+ return null != x
+ // Fast check to avoid allocation
+ && IntValue(bytes, start, SignExtSigned) == x.IntValue
+ && Value.Equals(x);
+ }
+
+ public int IntPositiveValueExact
+ {
+ get
+ {
+ int count = bytes.Length - start;
+ if (count > 4 || (count == 4 && 0 != (bytes[start] & 0x80)))
+ throw new ArithmeticException("ASN.1 Integer out of positive int range");
+
+ return IntValue(bytes, start, SignExtUnsigned);
+ }
+ }
+
+ public int IntValueExact
+ {
+ get
+ {
+ int count = bytes.Length - start;
+ if (count > 4)
+ throw new ArithmeticException("ASN.1 Integer out of int range");
+
+ return IntValue(bytes, start, SignExtSigned);
+ }
+ }
+
+ public long LongValueExact
+ {
+ get
+ {
+ int count = bytes.Length - start;
+ if (count > 8)
+ throw new ArithmeticException("ASN.1 Integer out of long range");
+
+ return LongValue(bytes, start, SignExtSigned);
+ }
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.Integer, bytes);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, bytes);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(bytes);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerInteger other = asn1Object as DerInteger;
+ if (other == null)
+ return false;
+
+ return Arrays.AreEqual(this.bytes, other.bytes);
+ }
+
+ public override string ToString()
+ {
+ return Value.ToString();
+ }
+
+ internal static DerInteger CreatePrimitive(byte[] contents)
+ {
+ return new DerInteger(contents, false);
+ }
+
+ internal static int IntValue(byte[] bytes, int start, int signExt)
+ {
+ int length = bytes.Length;
+ int pos = System.Math.Max(start, length - 4);
+
+ int val = (sbyte)bytes[pos] & signExt;
+ while (++pos < length)
+ {
+ val = (val << 8) | bytes[pos];
+ }
+ return val;
+ }
+
+ internal static long LongValue(byte[] bytes, int start, int signExt)
+ {
+ int length = bytes.Length;
+ int pos = System.Math.Max(start, length - 8);
+
+ long val = (sbyte)bytes[pos] & signExt;
+ while (++pos < length)
+ {
+ val = (val << 8) | bytes[pos];
+ }
+ return val;
+ }
+
+ /**
+ * Apply the correct validation for an INTEGER primitive following the BER rules.
+ *
+ * @param bytes The raw encoding of the integer.
+ * @return true if the (in)put fails this validation.
+ */
+ internal static bool IsMalformed(byte[] bytes)
+ {
+ switch (bytes.Length)
+ {
+ case 0:
+ return true;
+ case 1:
+ return false;
+ default:
+ return (sbyte)bytes[0] == ((sbyte)bytes[1] >> 7) && !AllowUnsafe();
+ }
+ }
+
+ internal static int SignBytesToSkip(byte[] bytes)
+ {
+ int pos = 0, last = bytes.Length - 1;
+ while (pos < last
+ && (sbyte)bytes[pos] == ((sbyte)bytes[pos + 1] >> 7))
+ {
+ ++pos;
+ }
+ return pos;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerInteger.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerInteger.cs.meta
new file mode 100644
index 00000000..b6cc8515
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerInteger.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f568af57a81ac874a801136ef816ceaa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNull.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNull.cs
new file mode 100644
index 00000000..6f95a3ea
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNull.cs
@@ -0,0 +1,43 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * A Null object.
+ */
+ public class DerNull
+ : Asn1Null
+ {
+ public static readonly DerNull Instance = new DerNull();
+
+ private static readonly byte[] ZeroBytes = new byte[0];
+
+ protected internal DerNull()
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.Null, ZeroBytes);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, ZeroBytes);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ return asn1Object is DerNull;
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return -1;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNull.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNull.cs.meta
new file mode 100644
index 00000000..cec17540
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNull.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: aefa4e6aee5c3004fa79f32aaf8b4187
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNumericString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNumericString.cs
new file mode 100644
index 00000000..8a382ed9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNumericString.cs
@@ -0,0 +1,197 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * Der NumericString object - this is an ascii string of characters {0,1,2,3,4,5,6,7,8,9, }.
+ */
+ public class DerNumericString
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerNumericString), Asn1Tags.NumericString) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return a numeric string from the passed in object
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerNumericString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerNumericString derNumericString)
+ return derNumericString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerNumericString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerNumericString)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct numeric string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return a numeric string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerNumericString GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerNumericString)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerNumericString(string str)
+ : this(str, false)
+ {
+ }
+
+ /**
+ * Constructor with optional validation.
+ *
+ * @param string the base string to wrap.
+ * @param validate whether or not to check the string.
+ * @throws ArgumentException if validate is true and the string
+ * contains characters that should not be in a NumericString.
+ */
+ public DerNumericString(string str, bool validate)
+ {
+ if (str == null)
+ throw new ArgumentNullException("str");
+ if (validate && !IsNumericString(str))
+ throw new ArgumentException("string contains illegal characters", "str");
+
+ m_contents = Strings.ToAsciiByteArray(str);
+ }
+
+ public DerNumericString(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerNumericString(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ return Strings.FromAsciiByteArray(m_contents);
+ }
+
+ public byte[] GetOctets()
+ {
+ return Arrays.Clone(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.NumericString, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerNumericString that = asn1Object as DerNumericString;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ /**
+ * Return true if the string can be represented as a NumericString ('0'..'9', ' ')
+ *
+ * @param str string to validate.
+ * @return true if numeric, fale otherwise.
+ */
+ public static bool IsNumericString(string str)
+ {
+ foreach (char ch in str)
+ {
+ if (ch > 0x007f || (ch != ' ' && !char.IsDigit(ch)))
+ return false;
+ }
+
+ return true;
+ }
+
+ internal static bool IsNumericString(byte[] contents)
+ {
+ for (int i = 0; i < contents.Length; ++i)
+ {
+ switch (contents[i])
+ {
+ case 0x20:
+ case 0x30:
+ case 0x31:
+ case 0x32:
+ case 0x33:
+ case 0x34:
+ case 0x35:
+ case 0x36:
+ case 0x37:
+ case 0x38:
+ case 0x39:
+ break;
+ default:
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ internal static DerNumericString CreatePrimitive(byte[] contents)
+ {
+ // TODO Validation - sort out exception types
+ //if (!IsNumericString(contents))
+
+ return new DerNumericString(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNumericString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNumericString.cs.meta
new file mode 100644
index 00000000..f3daf775
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerNumericString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 170c68d391661cc4ca852725e47f02e7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerObjectIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerObjectIdentifier.cs
new file mode 100644
index 00000000..580a160d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerObjectIdentifier.cs
@@ -0,0 +1,314 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerObjectIdentifier
+ : Asn1Object
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerObjectIdentifier), Asn1Tags.ObjectIdentifier) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets(), false);
+ }
+ }
+
+ public static DerObjectIdentifier FromContents(byte[] contents)
+ {
+ return CreatePrimitive(contents, true);
+ }
+
+ /**
+ * return an OID from the passed in object
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerObjectIdentifier GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerObjectIdentifier derObjectIdentifier)
+ return derObjectIdentifier;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerObjectIdentifier converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerObjectIdentifier)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct object identifier from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static DerObjectIdentifier GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ /*
+ * TODO[asn1] This block here is for backward compatibility, but should eventually be removed.
+ *
+ * - see https://github.com/bcgit/bc-java/issues/1015
+ */
+ if (!declaredExplicit && !taggedObject.IsParsed())
+ {
+ Asn1Object baseObject = taggedObject.GetObject();
+ if (!(baseObject is DerObjectIdentifier))
+ return FromContents(Asn1OctetString.GetInstance(baseObject).GetOctets());
+ }
+
+ return (DerObjectIdentifier)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private const long LongLimit = (long.MaxValue >> 7) - 0x7F;
+
+ private static readonly DerObjectIdentifier[] cache = new DerObjectIdentifier[1024];
+
+ private readonly string identifier;
+ private byte[] contents;
+
+ public DerObjectIdentifier(string identifier)
+ {
+ if (identifier == null)
+ throw new ArgumentNullException("identifier");
+ if (!IsValidIdentifier(identifier))
+ throw new FormatException("string " + identifier + " not an OID");
+
+ this.identifier = identifier;
+ }
+
+ private DerObjectIdentifier(DerObjectIdentifier oid, string branchID)
+ {
+ if (!Asn1RelativeOid.IsValidIdentifier(branchID, 0))
+ throw new ArgumentException("string " + branchID + " not a valid OID branch", "branchID");
+
+ this.identifier = oid.Id + "." + branchID;
+ }
+
+ private DerObjectIdentifier(byte[] contents, bool clone)
+ {
+ this.identifier = ParseContents(contents);
+ this.contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public virtual DerObjectIdentifier Branch(string branchID)
+ {
+ return new DerObjectIdentifier(this, branchID);
+ }
+
+ public string Id
+ {
+ get { return identifier; }
+ }
+
+ /**
+ * Return true if this oid is an extension of the passed in branch, stem.
+ * @param stem the arc or branch that is a possible parent.
+ * @return true if the branch is on the passed in stem, false otherwise.
+ */
+ public virtual bool On(DerObjectIdentifier stem)
+ {
+ string id = Id, stemId = stem.Id;
+ return id.Length > stemId.Length && id[stemId.Length] == '.' && Org.BouncyCastle.Utilities.Platform.StartsWith(id, stemId);
+ }
+
+ public override string ToString()
+ {
+ return identifier;
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerObjectIdentifier that = asn1Object as DerObjectIdentifier;
+ return null != that
+ && this.identifier == that.identifier;
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return identifier.GetHashCode();
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.ObjectIdentifier, GetContents());
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, GetContents());
+ }
+
+ private void DoOutput(MemoryStream bOut)
+ {
+ OidTokenizer tok = new OidTokenizer(identifier);
+
+ string token = tok.NextToken();
+ int first = int.Parse(token) * 40;
+
+ token = tok.NextToken();
+ if (token.Length <= 18)
+ {
+ Asn1RelativeOid.WriteField(bOut, first + long.Parse(token));
+ }
+ else
+ {
+ Asn1RelativeOid.WriteField(bOut, new BigInteger(token).Add(BigInteger.ValueOf(first)));
+ }
+
+ while (tok.HasMoreTokens)
+ {
+ token = tok.NextToken();
+ if (token.Length <= 18)
+ {
+ Asn1RelativeOid.WriteField(bOut, long.Parse(token));
+ }
+ else
+ {
+ Asn1RelativeOid.WriteField(bOut, new BigInteger(token));
+ }
+ }
+ }
+
+ private byte[] GetContents()
+ {
+ lock (this)
+ {
+ if (contents == null)
+ {
+ MemoryStream bOut = new MemoryStream();
+ DoOutput(bOut);
+ contents = bOut.ToArray();
+ }
+
+ return contents;
+ }
+ }
+
+ internal static DerObjectIdentifier CreatePrimitive(byte[] contents, bool clone)
+ {
+ int hashCode = Arrays.GetHashCode(contents);
+ int first = hashCode & 1023;
+
+ lock (cache)
+ {
+ DerObjectIdentifier entry = cache[first];
+ if (entry != null && Arrays.AreEqual(contents, entry.GetContents()))
+ {
+ return entry;
+ }
+
+ return cache[first] = new DerObjectIdentifier(contents, clone);
+ }
+ }
+
+ private static bool IsValidIdentifier(string identifier)
+ {
+ if (identifier.Length < 3 || identifier[1] != '.')
+ return false;
+
+ char first = identifier[0];
+ if (first < '0' || first > '2')
+ return false;
+
+ return Asn1RelativeOid.IsValidIdentifier(identifier, 2);
+ }
+
+ private static string ParseContents(byte[] contents)
+ {
+ StringBuilder objId = new StringBuilder();
+ long value = 0;
+ BigInteger bigValue = null;
+ bool first = true;
+
+ for (int i = 0; i != contents.Length; i++)
+ {
+ int b = contents[i];
+
+ if (value <= LongLimit)
+ {
+ value += b & 0x7F;
+ if ((b & 0x80) == 0)
+ {
+ if (first)
+ {
+ if (value < 40)
+ {
+ objId.Append('0');
+ }
+ else if (value < 80)
+ {
+ objId.Append('1');
+ value -= 40;
+ }
+ else
+ {
+ objId.Append('2');
+ value -= 80;
+ }
+ first = false;
+ }
+
+ objId.Append('.');
+ objId.Append(value);
+ value = 0;
+ }
+ else
+ {
+ value <<= 7;
+ }
+ }
+ else
+ {
+ if (bigValue == null)
+ {
+ bigValue = BigInteger.ValueOf(value);
+ }
+ bigValue = bigValue.Or(BigInteger.ValueOf(b & 0x7F));
+ if ((b & 0x80) == 0)
+ {
+ if (first)
+ {
+ objId.Append('2');
+ bigValue = bigValue.Subtract(BigInteger.ValueOf(80));
+ first = false;
+ }
+
+ objId.Append('.');
+ objId.Append(bigValue);
+ bigValue = null;
+ value = 0;
+ }
+ else
+ {
+ bigValue = bigValue.ShiftLeft(7);
+ }
+ }
+ }
+
+ return objId.ToString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerObjectIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerObjectIdentifier.cs.meta
new file mode 100644
index 00000000..1157418f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerObjectIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fff7b0e023f3d8a4c873a20a6d22ef3b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOctetString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOctetString.cs
new file mode 100644
index 00000000..6a41c71b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOctetString.cs
@@ -0,0 +1,62 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerOctetString
+ : Asn1OctetString
+ {
+ /// The octets making up the octet string.
+ public DerOctetString(byte[] contents)
+ : base(contents)
+ {
+ }
+
+ public DerOctetString(IAsn1Convertible obj)
+ : this(obj.ToAsn1Object())
+ {
+ }
+
+ public DerOctetString(Asn1Encodable obj)
+ : base(obj.GetEncoded(Der))
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.OctetString, contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, contents);
+ }
+
+ internal static void Encode(Asn1OutputStream asn1Out, byte[] buf, int off, int len)
+ {
+ asn1Out.WriteIdentifier(Asn1Tags.Universal, Asn1Tags.OctetString);
+ asn1Out.WriteDL(len);
+ asn1Out.Write(buf, off, len);
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ internal static void Encode(Asn1OutputStream asn1Out, ReadOnlySpan buf)
+ {
+ asn1Out.WriteIdentifier(Asn1Tags.Universal, Asn1Tags.OctetString);
+ asn1Out.WriteDL(buf.Length);
+ asn1Out.Write(buf);
+ }
+
+ internal static void Encode(Asn1OutputStream asn1Out, ReadOnlySpan buf1, ReadOnlySpan buf2)
+ {
+ asn1Out.WriteIdentifier(Asn1Tags.Universal, Asn1Tags.OctetString);
+ asn1Out.WriteDL(buf1.Length + buf2.Length);
+ asn1Out.Write(buf1);
+ asn1Out.Write(buf2);
+ }
+#endif
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOctetString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOctetString.cs.meta
new file mode 100644
index 00000000..2cb0e7dd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOctetString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9a2fbc398075faf49836a3464175d32f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOutputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOutputStream.cs
new file mode 100644
index 00000000..13717b95
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOutputStream.cs
@@ -0,0 +1,23 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class DerOutputStream
+ : Asn1OutputStream
+ {
+ internal DerOutputStream(Stream os)
+ : base(os)
+ {
+ }
+
+ internal override int Encoding
+ {
+ get { return EncodingDer; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOutputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOutputStream.cs.meta
new file mode 100644
index 00000000..9ff7d7dc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerOutputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5622672ae97bc604bb6bfde0cb52e7a5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerPrintableString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerPrintableString.cs
new file mode 100644
index 00000000..c23d6c3b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerPrintableString.cs
@@ -0,0 +1,194 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * Der PrintableString object.
+ */
+ public class DerPrintableString
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerPrintableString), Asn1Tags.PrintableString) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return a printable string from the passed in object.
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerPrintableString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerPrintableString derPrintableString)
+ return derPrintableString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerPrintableString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerPrintableString)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct printable string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return a printable string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerPrintableString GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerPrintableString)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerPrintableString(string str)
+ : this(str, false)
+ {
+ }
+
+ /**
+ * Constructor with optional validation.
+ *
+ * @param string the base string to wrap.
+ * @param validate whether or not to check the string.
+ * @throws ArgumentException if validate is true and the string
+ * contains characters that should not be in a PrintableString.
+ */
+ public DerPrintableString(string str, bool validate)
+ {
+ if (str == null)
+ throw new ArgumentNullException("str");
+ if (validate && !IsPrintableString(str))
+ throw new ArgumentException("string contains illegal characters", "str");
+
+ m_contents = Strings.ToAsciiByteArray(str);
+ }
+
+ public DerPrintableString(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerPrintableString(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ return Strings.FromAsciiByteArray(m_contents);
+ }
+
+ public byte[] GetOctets()
+ {
+ return Arrays.Clone(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.PrintableString, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ protected override bool Asn1Equals(
+ Asn1Object asn1Object)
+ {
+ DerPrintableString that = asn1Object as DerPrintableString;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ /**
+ * return true if the passed in String can be represented without
+ * loss as a PrintableString, false otherwise.
+ *
+ * @return true if in printable set, false otherwise.
+ */
+ public static bool IsPrintableString(string str)
+ {
+ foreach (char ch in str)
+ {
+ if (ch > 0x007f)
+ return false;
+
+ if (char.IsLetterOrDigit(ch))
+ continue;
+
+// if (char.IsPunctuation(ch))
+// continue;
+
+ switch (ch)
+ {
+ case ' ':
+ case '\'':
+ case '(':
+ case ')':
+ case '+':
+ case '-':
+ case '.':
+ case ':':
+ case '=':
+ case '?':
+ case '/':
+ case ',':
+ continue;
+ }
+
+ return false;
+ }
+
+ return true;
+ }
+
+ internal static DerPrintableString CreatePrimitive(byte[] contents)
+ {
+ return new DerPrintableString(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerPrintableString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerPrintableString.cs.meta
new file mode 100644
index 00000000..6489db3e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerPrintableString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: de8a5689c754c164eb355e5536e6f8a7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSequence.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSequence.cs
new file mode 100644
index 00000000..f25931be
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSequence.cs
@@ -0,0 +1,94 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerSequence
+ : Asn1Sequence
+ {
+ public static readonly DerSequence Empty = new DerSequence();
+
+ public static DerSequence FromVector(Asn1EncodableVector elementVector)
+ {
+ return elementVector.Count < 1 ? Empty : new DerSequence(elementVector);
+ }
+
+ /**
+ * create an empty sequence
+ */
+ public DerSequence()
+ : base()
+ {
+ }
+
+ /**
+ * create a sequence containing one object
+ */
+ public DerSequence(Asn1Encodable element)
+ : base(element)
+ {
+ }
+
+ /**
+ * create a sequence containing two objects
+ */
+ public DerSequence(Asn1Encodable element1, Asn1Encodable element2)
+ : base(element1, element2)
+ {
+ }
+
+ public DerSequence(params Asn1Encodable[] elements)
+ : base(elements)
+ {
+ }
+
+ /**
+ * create a sequence containing a vector of objects.
+ */
+ public DerSequence(Asn1EncodableVector elementVector)
+ : base(elementVector)
+ {
+ }
+
+ internal DerSequence(Asn1Encodable[] elements, bool clone)
+ : base(elements, clone)
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new ConstructedDLEncoding(Asn1Tags.Universal, Asn1Tags.Sequence,
+ Asn1OutputStream.GetContentsEncodings(Asn1OutputStream.EncodingDer, elements));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new ConstructedDLEncoding(tagClass, tagNo,
+ Asn1OutputStream.GetContentsEncodings(Asn1OutputStream.EncodingDer, elements));
+ }
+
+ internal override DerBitString ToAsn1BitString()
+ {
+ return new DerBitString(BerBitString.FlattenBitStrings(GetConstructedBitStrings()), false);
+ }
+
+ internal override DerExternal ToAsn1External()
+ {
+ return new DerExternal(this);
+ }
+
+ internal override Asn1OctetString ToAsn1OctetString()
+ {
+ return new DerOctetString(BerOctetString.FlattenOctetStrings(GetConstructedOctetStrings()));
+ }
+
+ internal override Asn1Set ToAsn1Set()
+ {
+ // NOTE: DLSet is intentional, we don't want sorting
+ return new DLSet(false, elements);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSequence.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSequence.cs.meta
new file mode 100644
index 00000000..e47f4b30
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSequence.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 18cfbc9c97ef55445b926ddeb1992930
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSet.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSet.cs
new file mode 100644
index 00000000..d6b61f44
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSet.cs
@@ -0,0 +1,93 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * A Der encoded set object
+ */
+ public class DerSet
+ : Asn1Set
+ {
+ public static readonly DerSet Empty = new DerSet();
+
+ public static DerSet FromVector(Asn1EncodableVector elementVector)
+ {
+ return elementVector.Count < 1 ? Empty : new DerSet(elementVector);
+ }
+
+ /**
+ * create an empty set
+ */
+ public DerSet()
+ : base()
+ {
+ }
+
+ /**
+ * @param obj - a single object that makes up the set.
+ */
+ public DerSet(Asn1Encodable element)
+ : base(element)
+ {
+ }
+
+ public DerSet(params Asn1Encodable[] elements)
+ : base(elements, true)
+ {
+ }
+
+ internal DerSet(Asn1Encodable[] elements, bool doSort)
+ : base(elements, doSort)
+ {
+ }
+
+ /**
+ * @param v - a vector of objects making up the set.
+ */
+ public DerSet(Asn1EncodableVector elementVector)
+ : base(elementVector, true)
+ {
+ }
+
+ internal DerSet(Asn1EncodableVector elementVector, bool doSort)
+ : base(elementVector, doSort)
+ {
+ }
+
+ internal DerSet(bool isSorted, Asn1Encodable[] elements)
+ : base(isSorted, elements)
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new ConstructedDLEncoding(Asn1Tags.Universal, Asn1Tags.Set,
+ Asn1OutputStream.GetContentsEncodings(Asn1OutputStream.EncodingDer, GetSortedElements()));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new ConstructedDLEncoding(tagClass, tagNo,
+ Asn1OutputStream.GetContentsEncodings(Asn1OutputStream.EncodingDer, GetSortedElements()));
+ }
+
+ private Asn1Encodable[] GetSortedElements()
+ {
+ if (isSorted)
+ return elements;
+
+ int count = elements.Length;
+ Asn1Object[] asn1Objects = new Asn1Object[count];
+ for (int i = 0; i < count; ++i)
+ {
+ asn1Objects[i] = elements[i].ToAsn1Object();
+ }
+
+ return Sort(asn1Objects);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSet.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSet.cs.meta
new file mode 100644
index 00000000..1058b563
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerSet.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e7b6f98de535c404d9620013bafc762b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerStringBase.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerStringBase.cs
new file mode 100644
index 00000000..20747417
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerStringBase.cs
@@ -0,0 +1,26 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public abstract class DerStringBase
+ : Asn1Object, IAsn1String
+ {
+ protected DerStringBase()
+ {
+ }
+
+ public abstract string GetString();
+
+ public override string ToString()
+ {
+ return GetString();
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return GetString().GetHashCode();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerStringBase.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerStringBase.cs.meta
new file mode 100644
index 00000000..2d4114ab
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerStringBase.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 66c767e5b8bde5b4aaee4e729c60e790
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerT61String.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerT61String.cs
new file mode 100644
index 00000000..b46550ad
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerT61String.cs
@@ -0,0 +1,136 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * Der T61String (also the teletex string) - 8-bit characters
+ */
+ public class DerT61String
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerT61String), Asn1Tags.T61String) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return a T61 string from the passed in object.
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerT61String GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerT61String derT61String)
+ return derT61String;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerT61String converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerT61String)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct T61 string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return a T61 string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerT61String GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerT61String)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerT61String(string str)
+ {
+ if (str == null)
+ throw new ArgumentNullException("str");
+
+ m_contents = Strings.ToByteArray(str);
+ }
+
+ public DerT61String(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerT61String(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ return Strings.FromByteArray(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.T61String, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ public byte[] GetOctets()
+ {
+ return Arrays.Clone(m_contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerT61String that = asn1Object as DerT61String;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ internal static DerT61String CreatePrimitive(byte[] contents)
+ {
+ return new DerT61String(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerT61String.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerT61String.cs.meta
new file mode 100644
index 00000000..1841353a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerT61String.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8f768a3ce90b3ce4c90195eb914767aa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerTaggedObject.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerTaggedObject.cs
new file mode 100644
index 00000000..687f2436
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerTaggedObject.cs
@@ -0,0 +1,86 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * DER TaggedObject - in ASN.1 notation this is any object preceded by
+ * a [n] where n is some number - these are assumed to follow the construction
+ * rules (as with sequences).
+ */
+ public class DerTaggedObject
+ : Asn1TaggedObject
+ {
+ public DerTaggedObject(int tagNo, Asn1Encodable obj)
+ : base(true, tagNo, obj)
+ {
+ }
+
+ public DerTaggedObject(int tagClass, int tagNo, Asn1Encodable obj)
+ : base(true, tagClass, tagNo, obj)
+ {
+ }
+
+ /**
+ * @param isExplicit true if an explicitly tagged object.
+ * @param tagNo the tag number for this object.
+ * @param obj the tagged object.
+ */
+ public DerTaggedObject(bool isExplicit, int tagNo, Asn1Encodable obj)
+ : base(isExplicit, tagNo, obj)
+ {
+ }
+
+ public DerTaggedObject(bool isExplicit, int tagClass, int tagNo, Asn1Encodable obj)
+ : base(isExplicit, tagClass, tagNo, obj)
+ {
+ }
+
+ internal DerTaggedObject(int explicitness, int tagClass, int tagNo, Asn1Encodable obj)
+ : base(explicitness, tagClass, tagNo, obj)
+ {
+ }
+
+ internal override string Asn1Encoding
+ {
+ get { return Der; }
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ encoding = Asn1OutputStream.EncodingDer;
+
+ Asn1Object baseObject = GetBaseObject().ToAsn1Object();
+
+ if (!IsExplicit())
+ return baseObject.GetEncodingImplicit(encoding, TagClass, TagNo);
+
+ return new ConstructedDLEncoding(TagClass, TagNo, new IAsn1Encoding[]{ baseObject.GetEncoding(encoding) });
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ encoding = Asn1OutputStream.EncodingDer;
+
+ Asn1Object baseObject = GetBaseObject().ToAsn1Object();
+
+ if (!IsExplicit())
+ return baseObject.GetEncodingImplicit(encoding, tagClass, tagNo);
+
+ return new ConstructedDLEncoding(tagClass, tagNo, new IAsn1Encoding[]{ baseObject.GetEncoding(encoding) });
+ }
+
+ internal override Asn1Sequence RebuildConstructed(Asn1Object asn1Object)
+ {
+ return new DerSequence(asn1Object);
+ }
+
+ internal override Asn1TaggedObject ReplaceTag(int tagClass, int tagNo)
+ {
+ return new DerTaggedObject(explicitness, tagClass, tagNo, obj);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerTaggedObject.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerTaggedObject.cs.meta
new file mode 100644
index 00000000..4bb494a2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerTaggedObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9ed40b8b6a420f842ab356de13fde3be
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTCTime.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTCTime.cs
new file mode 100644
index 00000000..6e0299ab
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTCTime.cs
@@ -0,0 +1,44 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerUtcTime
+ : Asn1UtcTime
+ {
+ public DerUtcTime(string timeString)
+ : base(timeString)
+ {
+ }
+
+
+ public DerUtcTime(DateTime dateTime)
+ : base(dateTime)
+ {
+ }
+
+ public DerUtcTime(DateTime dateTime, int twoDigitYearMax)
+ : base(dateTime, twoDigitYearMax)
+ {
+ }
+
+ internal DerUtcTime(byte[] contents)
+ : base(contents)
+ {
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.UtcTime,
+ GetContents(Asn1OutputStream.EncodingDer));
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, GetContents(Asn1OutputStream.EncodingDer));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTCTime.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTCTime.cs.meta
new file mode 100644
index 00000000..6b02e3d6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTCTime.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 491472b8ab436e4468b5f1e8e6e6b452
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTF8String.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTF8String.cs
new file mode 100644
index 00000000..2203c7c4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTF8String.cs
@@ -0,0 +1,128 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * Der UTF8String object.
+ */
+ public class DerUtf8String
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerUtf8String), Asn1Tags.Utf8String) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return an UTF8 string from the passed in object.
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerUtf8String GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerUtf8String derUtf8String)
+ return derUtf8String;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerUtf8String converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerUtf8String)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct UTF8 string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return a UTF8 string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerUtf8String GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerUtf8String)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerUtf8String(string str)
+ : this(Strings.ToUtf8ByteArray(str), false)
+ {
+ }
+
+ public DerUtf8String(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerUtf8String(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ return Strings.FromUtf8ByteArray(m_contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerUtf8String that = asn1Object as DerUtf8String;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.Utf8String, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ internal static DerUtf8String CreatePrimitive(byte[] contents)
+ {
+ return new DerUtf8String(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTF8String.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTF8String.cs.meta
new file mode 100644
index 00000000..95b51c87
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUTF8String.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 43e5b2a9158cb7747a4f679e741160fa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUniversalString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUniversalString.cs
new file mode 100644
index 00000000..9db82fa1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUniversalString.cs
@@ -0,0 +1,177 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * UniversalString object.
+ */
+ public class DerUniversalString
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerUniversalString), Asn1Tags.UniversalString) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ private static readonly char[] table = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+
+ /**
+ * return a universal string from the passed in object.
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerUniversalString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerUniversalString derUniversalString)
+ return derUniversalString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerUniversalString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerUniversalString)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct universal string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return a universal string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerUniversalString GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerUniversalString)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerUniversalString(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerUniversalString(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ int dl = m_contents.Length;
+ int capacity = 3 + 2 * (Asn1OutputStream.GetLengthOfDL(dl) + dl);
+ StringBuilder buf = new StringBuilder("#1C", capacity);
+ EncodeHexDL(buf, dl);
+
+ for (int i = 0; i < dl; ++i)
+ {
+ EncodeHexByte(buf, m_contents[i]);
+ }
+
+ Debug.Assert(buf.Length == capacity);
+ return buf.ToString();
+ }
+
+ public byte[] GetOctets()
+ {
+ return Arrays.Clone(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.UniversalString, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerUniversalString that = asn1Object as DerUniversalString;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ internal static DerUniversalString CreatePrimitive(byte[] contents)
+ {
+ return new DerUniversalString(contents, false);
+ }
+
+ private static void EncodeHexByte(StringBuilder buf, int i)
+ {
+ buf.Append(table[(i >> 4) & 0xF]);
+ buf.Append(table[i & 0xF]);
+ }
+
+ private static void EncodeHexDL(StringBuilder buf, int dl)
+ {
+ if (dl < 128)
+ {
+ EncodeHexByte(buf, dl);
+ return;
+ }
+
+ byte[] stack = new byte[5];
+ int pos = 5;
+
+ do
+ {
+ stack[--pos] = (byte)dl;
+ dl >>= 8;
+ }
+ while (dl != 0);
+
+ int count = stack.Length - pos;
+ stack[--pos] = (byte)(0x80 | count);
+
+ do
+ {
+ EncodeHexByte(buf, stack[pos++]);
+ }
+ while (pos < stack.Length);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUniversalString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUniversalString.cs.meta
new file mode 100644
index 00000000..593adcfd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerUniversalString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a4aa1a46fb2453a4596d0052a3f66a9a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVideotexString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVideotexString.cs
new file mode 100644
index 00000000..003a706b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVideotexString.cs
@@ -0,0 +1,128 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class DerVideotexString
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerVideotexString), Asn1Tags.VideotexString) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return a videotex string from the passed in object
+ *
+ * @param obj a DERVideotexString or an object that can be converted into one.
+ * @exception IllegalArgumentException if the object cannot be converted.
+ * @return a DERVideotexString instance, or null.
+ */
+ public static DerVideotexString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerVideotexString derVideotexString)
+ return derVideotexString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerVideotexString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerVideotexString)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct videotex string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * return a videotex string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception IllegalArgumentException if the tagged object cannot be converted.
+ * @return a DERVideotexString instance, or null.
+ */
+ public static DerVideotexString GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerVideotexString)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerVideotexString(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerVideotexString(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ return Strings.FromByteArray(m_contents);
+ }
+
+ public byte[] GetOctets()
+ {
+ return Arrays.Clone(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.VideotexString, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerVideotexString that = asn1Object as DerVideotexString;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ internal static DerVideotexString CreatePrimitive(byte[] contents)
+ {
+ return new DerVideotexString(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVideotexString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVideotexString.cs.meta
new file mode 100644
index 00000000..6de56298
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVideotexString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1dedfb92e90e8fa4288c9409aa1f56db
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVisibleString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVisibleString.cs
new file mode 100644
index 00000000..13b0110d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVisibleString.cs
@@ -0,0 +1,136 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * VisibleString object.
+ */
+ public class DerVisibleString
+ : DerStringBase
+ {
+ internal class Meta : Asn1UniversalType
+ {
+ internal static readonly Asn1UniversalType Instance = new Meta();
+
+ private Meta() : base(typeof(DerVisibleString), Asn1Tags.VisibleString) {}
+
+ internal override Asn1Object FromImplicitPrimitive(DerOctetString octetString)
+ {
+ return CreatePrimitive(octetString.GetOctets());
+ }
+ }
+
+ /**
+ * return a visible string from the passed in object.
+ *
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static DerVisibleString GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is DerVisibleString derVisibleString)
+ return derVisibleString;
+
+ if (obj is IAsn1Convertible asn1Convertible)
+ {
+ Asn1Object asn1Object = asn1Convertible.ToAsn1Object();
+ if (asn1Object is DerVisibleString converted)
+ return converted;
+ }
+ else if (obj is byte[] bytes)
+ {
+ try
+ {
+ return (DerVisibleString)Meta.Instance.FromByteArray(bytes);
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("failed to construct visible string from byte[]: " + e.Message);
+ }
+ }
+
+ throw new ArgumentException("illegal object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ /**
+ * return a visible string from a tagged object.
+ *
+ * @param taggedObject the tagged object holding the object we want
+ * @param declaredExplicit true if the object is meant to be explicitly tagged false otherwise.
+ * @exception ArgumentException if the tagged object cannot be converted.
+ */
+ public static DerVisibleString GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return (DerVisibleString)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
+ }
+
+ private readonly byte[] m_contents;
+
+ public DerVisibleString(string str)
+ {
+ if (str == null)
+ throw new ArgumentNullException("str");
+
+ m_contents = Strings.ToAsciiByteArray(str);
+ }
+
+ public DerVisibleString(byte[] contents)
+ : this(contents, true)
+ {
+ }
+
+ internal DerVisibleString(byte[] contents, bool clone)
+ {
+ if (null == contents)
+ throw new ArgumentNullException("contents");
+
+ m_contents = clone ? Arrays.Clone(contents) : contents;
+ }
+
+ public override string GetString()
+ {
+ return Strings.FromAsciiByteArray(m_contents);
+ }
+
+ public byte[] GetOctets()
+ {
+ return Arrays.Clone(m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ return new PrimitiveEncoding(Asn1Tags.Universal, Asn1Tags.VisibleString, m_contents);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ return new PrimitiveEncoding(tagClass, tagNo, m_contents);
+ }
+
+ protected override bool Asn1Equals(Asn1Object asn1Object)
+ {
+ DerVisibleString that = asn1Object as DerVisibleString;
+ return null != that
+ && Arrays.AreEqual(this.m_contents, that.m_contents);
+ }
+
+ protected override int Asn1GetHashCode()
+ {
+ return Arrays.GetHashCode(m_contents);
+ }
+
+ internal static DerVisibleString CreatePrimitive(byte[] contents)
+ {
+ return new DerVisibleString(contents, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVisibleString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVisibleString.cs.meta
new file mode 100644
index 00000000..51b067b1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/DerVisibleString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c26a4d8aa1c97ad4fba7e2b082779c8a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Choice.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Choice.cs
new file mode 100644
index 00000000..4dfdc448
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Choice.cs
@@ -0,0 +1,21 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * Marker interface for CHOICE objects - if you implement this in a roll-your-own
+ * object, any attempt to tag the object implicitly will convert the tag to an
+ * explicit one as the encoding rules require.
+ *
+ * If you use this interface your class should also implement the getInstance
+ * pattern which takes a tag object and the tagging mode used.
+ *
+ */
+ public interface IAsn1Choice
+ {
+ // marker interface
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Choice.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Choice.cs.meta
new file mode 100644
index 00000000..4d1c0e80
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Choice.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: de56f751268603f4888ddf77279fcf49
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Convertible.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Convertible.cs
new file mode 100644
index 00000000..360aad32
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Convertible.cs
@@ -0,0 +1,11 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public interface IAsn1Convertible
+ {
+ Asn1Object ToAsn1Object();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Convertible.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Convertible.cs.meta
new file mode 100644
index 00000000..fe85b02b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Convertible.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bf97a78f07eb4014aa45263238e8a398
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Encoding.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Encoding.cs
new file mode 100644
index 00000000..7dafc324
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Encoding.cs
@@ -0,0 +1,15 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal interface IAsn1Encoding
+ {
+ void Encode(Asn1OutputStream asn1Out);
+
+ int GetLength();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Encoding.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Encoding.cs.meta
new file mode 100644
index 00000000..7a0cd096
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1Encoding.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d851edf86d395494aa24a1f97c349e3e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1String.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1String.cs
new file mode 100644
index 00000000..e76a8d07
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1String.cs
@@ -0,0 +1,14 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * basic interface for Der string objects.
+ */
+ public interface IAsn1String
+ {
+ string GetString();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1String.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1String.cs.meta
new file mode 100644
index 00000000..445f5550
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IAsn1String.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b93f5e1d6fccd954386bdec9ea1f25a1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IndefiniteLengthInputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IndefiniteLengthInputStream.cs
new file mode 100644
index 00000000..777cdbae
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IndefiniteLengthInputStream.cs
@@ -0,0 +1,110 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ class IndefiniteLengthInputStream
+ : LimitedInputStream
+ {
+ private int _lookAhead;
+ private bool _eofOn00 = true;
+
+ internal IndefiniteLengthInputStream(Stream inStream, int limit)
+ : base(inStream, limit)
+ {
+ _lookAhead = RequireByte();
+
+ if (0 == _lookAhead)
+ {
+ CheckEndOfContents();
+ }
+ }
+
+ internal void SetEofOn00(bool eofOn00)
+ {
+ _eofOn00 = eofOn00;
+ if (_eofOn00 && 0 == _lookAhead)
+ {
+ CheckEndOfContents();
+ }
+ }
+
+ private void CheckEndOfContents()
+ {
+ if (0 != RequireByte())
+ throw new IOException("malformed end-of-contents marker");
+
+ _lookAhead = -1;
+ SetParentEofDetect();
+ }
+
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ // Only use this optimisation if we aren't checking for 00
+ if (_eofOn00 || count <= 1)
+ return base.Read(buffer, offset, count);
+
+ if (_lookAhead < 0)
+ return 0;
+
+ int numRead = _in.Read(buffer, offset + 1, count - 1);
+ if (numRead <= 0)
+ throw new EndOfStreamException();
+
+ buffer[offset] = (byte)_lookAhead;
+ _lookAhead = RequireByte();
+
+ return numRead + 1;
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override int Read(Span buffer)
+ {
+ // Only use this optimisation if we aren't checking for 00
+ if (_eofOn00 || buffer.Length <= 1)
+ return base.Read(buffer);
+
+ if (_lookAhead < 0)
+ return 0;
+
+ int numRead = _in.Read(buffer[1..]);
+ if (numRead <= 0)
+ throw new EndOfStreamException();
+
+ buffer[0] = (byte)_lookAhead;
+ _lookAhead = RequireByte();
+
+ return numRead + 1;
+ }
+#endif
+
+ public override int ReadByte()
+ {
+ if (_eofOn00 && _lookAhead <= 0)
+ {
+ if (0 == _lookAhead)
+ {
+ CheckEndOfContents();
+ }
+ return -1;
+ }
+
+ int result = _lookAhead;
+ _lookAhead = RequireByte();
+ return result;
+ }
+
+ private int RequireByte()
+ {
+ int b = _in.ReadByte();
+ if (b < 0)
+ throw new EndOfStreamException();
+
+ return b;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IndefiniteLengthInputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IndefiniteLengthInputStream.cs.meta
new file mode 100644
index 00000000..ee514b0b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/IndefiniteLengthInputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: aff1a961cdd1a1646b1d3e70630d9efb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyASN1InputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyASN1InputStream.cs
new file mode 100644
index 00000000..907f26c4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyASN1InputStream.cs
@@ -0,0 +1,47 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ public class LazyAsn1InputStream
+ : Asn1InputStream
+ {
+ public LazyAsn1InputStream(byte[] input)
+ : base(input)
+ {
+ }
+
+ public LazyAsn1InputStream(Stream inputStream)
+ : base(inputStream)
+ {
+ }
+
+ internal LazyAsn1InputStream(Stream input, int limit, byte[][] tmpBuffers)
+ : base(input, limit, tmpBuffers)
+ {
+ }
+
+ internal override Asn1Sequence CreateDLSequence(DefiniteLengthInputStream defIn)
+ {
+ return new LazyDLSequence(defIn.ToArray());
+ }
+
+ internal override Asn1Set CreateDLSet(DefiniteLengthInputStream defIn)
+ {
+ return new LazyDLSet(defIn.ToArray());
+ }
+
+ internal override Asn1EncodableVector ReadVector(DefiniteLengthInputStream defIn)
+ {
+ int remaining = defIn.Remaining;
+ if (remaining < 1)
+ return new Asn1EncodableVector(0);
+
+ return new LazyAsn1InputStream(defIn, remaining, tmpBuffers).ReadVector();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyASN1InputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyASN1InputStream.cs.meta
new file mode 100644
index 00000000..b7a9899a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyASN1InputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 738018e7fe54f6c4f8d66774e8cfc724
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSequence.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSequence.cs
new file mode 100644
index 00000000..0454b349
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSequence.cs
@@ -0,0 +1,3 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSequence.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSequence.cs.meta
new file mode 100644
index 00000000..e00d0886
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSequence.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 56ed6e24dde98cd418f75e8e758f9a05
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSet.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSet.cs
new file mode 100644
index 00000000..0454b349
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSet.cs
@@ -0,0 +1,3 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSet.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSet.cs.meta
new file mode 100644
index 00000000..87591c70
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDERSet.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 92f9ab26b85e3c04cb36692097569df6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLEnumerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLEnumerator.cs
new file mode 100644
index 00000000..48a36bc8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLEnumerator.cs
@@ -0,0 +1,69 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class LazyDLEnumerator
+ : IEnumerator
+ {
+ private readonly byte[] m_contents;
+
+ private Asn1InputStream m_input;
+ private Asn1Object m_current;
+
+ internal LazyDLEnumerator(byte[] contents)
+ {
+ this.m_contents = contents;
+
+ Reset();
+ }
+
+ object System.Collections.IEnumerator.Current
+ {
+ get { return Current; }
+ }
+
+ public Asn1Encodable Current
+ {
+ get
+ {
+ if (null == m_current)
+ throw new InvalidOperationException();
+
+ return m_current;
+ }
+ }
+
+ public virtual void Dispose()
+ {
+ }
+
+ public bool MoveNext()
+ {
+ return null != (this.m_current = ReadObject());
+ }
+
+ public void Reset()
+ {
+ this.m_input = new LazyAsn1InputStream(m_contents);
+ this.m_current = null;
+ }
+
+ private Asn1Object ReadObject()
+ {
+ try
+ {
+ return m_input.ReadObject();
+ }
+ catch (IOException e)
+ {
+ throw new Asn1ParsingException("malformed ASN.1: " + e.Message, e);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLEnumerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLEnumerator.cs.meta
new file mode 100644
index 00000000..bbf7f53d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLEnumerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ff80a9d865f46f34d9c6744eff28fba1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSequence.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSequence.cs
new file mode 100644
index 00000000..1c0302ac
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSequence.cs
@@ -0,0 +1,129 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class LazyDLSequence
+ : DLSequence
+ {
+ private byte[] encoded;
+
+ internal LazyDLSequence(byte[] encoded)
+ : base()
+ {
+ if (null == encoded)
+ throw new ArgumentNullException("encoded");
+
+ this.encoded = encoded;
+ }
+
+ public override Asn1Encodable this[int index]
+ {
+ get
+ {
+ Force();
+
+ return base[index];
+ }
+ }
+
+ public override IEnumerator GetEnumerator()
+ {
+ byte[] encoded = GetContents();
+ if (null != encoded)
+ {
+ return new LazyDLEnumerator(encoded);
+ }
+
+ return base.GetEnumerator();
+ }
+
+ public override int Count
+ {
+ get
+ {
+ Force();
+
+ return base.Count;
+ }
+ }
+
+ public override Asn1Encodable[] ToArray()
+ {
+ Force();
+
+ return base.ToArray();
+ }
+
+ public override string ToString()
+ {
+ Force();
+
+ return base.ToString();
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingBer == encoding)
+ {
+ byte[] encoded = GetContents();
+ if (encoded != null)
+ return new ConstructedLazyDLEncoding(Asn1Tags.Universal, Asn1Tags.Sequence, encoded);
+ }
+ else
+ {
+ Force();
+ }
+
+ return base.GetEncoding(encoding);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingBer == encoding)
+ {
+ byte[] encoded = GetContents();
+ if (encoded != null)
+ return new ConstructedLazyDLEncoding(tagClass, tagNo, encoded);
+ }
+ else
+ {
+ Force();
+ }
+
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+ }
+
+ private void Force()
+ {
+ lock (this)
+ {
+ if (null != encoded)
+ {
+ Asn1InputStream input = new LazyAsn1InputStream(encoded);
+ try
+ {
+ Asn1EncodableVector v = input.ReadVector();
+
+ this.elements = v.TakeElements();
+ this.encoded = null;
+ }
+ catch (IOException e)
+ {
+ throw new Asn1ParsingException("malformed ASN.1: " + e.Message, e);
+ }
+ }
+ }
+ }
+
+ private byte[] GetContents()
+ {
+ lock (this) return encoded;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSequence.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSequence.cs.meta
new file mode 100644
index 00000000..99957603
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSequence.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4494807fd9696b841ab30a90e1c62a1c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSet.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSet.cs
new file mode 100644
index 00000000..25d5ae4b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSet.cs
@@ -0,0 +1,128 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class LazyDLSet
+ : DLSet
+ {
+ private byte[] encoded;
+
+ internal LazyDLSet(byte[] encoded)
+ : base()
+ {
+ if (null == encoded)
+ throw new ArgumentNullException("encoded");
+
+ this.encoded = encoded;
+ }
+
+ public override Asn1Encodable this[int index]
+ {
+ get
+ {
+ Force();
+
+ return base[index];
+ }
+ }
+
+ public override IEnumerator GetEnumerator()
+ {
+ byte[] encoded = GetContents();
+ if (null != encoded)
+ return new LazyDLEnumerator(encoded);
+
+ return base.GetEnumerator();
+ }
+
+ public override int Count
+ {
+ get
+ {
+ Force();
+
+ return base.Count;
+ }
+ }
+
+ public override Asn1Encodable[] ToArray()
+ {
+ Force();
+
+ return base.ToArray();
+ }
+
+ public override string ToString()
+ {
+ Force();
+
+ return base.ToString();
+ }
+
+ internal override IAsn1Encoding GetEncoding(int encoding)
+ {
+ if (Asn1OutputStream.EncodingBer == encoding)
+ {
+ byte[] encoded = GetContents();
+ if (null != encoded)
+ return new ConstructedLazyDLEncoding(Asn1Tags.Universal, Asn1Tags.Set, encoded);
+ }
+ else
+ {
+ Force();
+ }
+
+ return base.GetEncoding(encoding);
+ }
+
+ internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
+ {
+ if (Asn1OutputStream.EncodingBer == encoding)
+ {
+ byte[] encoded = GetContents();
+ if (null != encoded)
+ return new ConstructedLazyDLEncoding(tagClass, tagNo, encoded);
+ }
+ else
+ {
+ Force();
+ }
+
+ return base.GetEncodingImplicit(encoding, tagClass, tagNo);
+ }
+
+ private void Force()
+ {
+ lock (this)
+ {
+ if (null != encoded)
+ {
+ Asn1InputStream input = new LazyAsn1InputStream(encoded);
+ try
+ {
+ Asn1EncodableVector v = input.ReadVector();
+
+ this.elements = v.TakeElements();
+ this.isSorted = elements.Length < 2;
+ this.encoded = null;
+ }
+ catch (IOException e)
+ {
+ throw new Asn1ParsingException("malformed ASN.1: " + e.Message, e);
+ }
+ }
+ }
+ }
+
+ private byte[] GetContents()
+ {
+ lock (this) return encoded;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSet.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSet.cs.meta
new file mode 100644
index 00000000..80f85d39
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LazyDLSet.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1b81af7b123dc024ba1b0bff6f852c89
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LimitedInputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LimitedInputStream.cs
new file mode 100644
index 00000000..2c1d4876
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LimitedInputStream.cs
@@ -0,0 +1,36 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal abstract class LimitedInputStream
+ : BaseInputStream
+ {
+ protected readonly Stream _in;
+ private int _limit;
+
+ internal LimitedInputStream(Stream inStream, int limit)
+ {
+ this._in = inStream;
+ this._limit = limit;
+ }
+
+ internal virtual int Limit
+ {
+ get { return _limit; }
+ }
+
+ protected void SetParentEofDetect()
+ {
+ if (_in is IndefiniteLengthInputStream)
+ {
+ ((IndefiniteLengthInputStream)_in).SetEofOn00(true);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LimitedInputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LimitedInputStream.cs.meta
new file mode 100644
index 00000000..8807ec29
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/LimitedInputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e7b112b2819289440aee03e1ef154f0f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/OidTokenizer.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/OidTokenizer.cs
new file mode 100644
index 00000000..04716058
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/OidTokenizer.cs
@@ -0,0 +1,49 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ /**
+ * class for breaking up an Oid into it's component tokens, ala
+ * java.util.StringTokenizer. We need this class as some of the
+ * lightweight Java environment don't support classes like
+ * StringTokenizer.
+ */
+ public class OidTokenizer
+ {
+ private string oid;
+ private int index;
+
+ public OidTokenizer(
+ string oid)
+ {
+ this.oid = oid;
+ }
+
+ public bool HasMoreTokens
+ {
+ get { return index != -1; }
+ }
+
+ public string NextToken()
+ {
+ if (index == -1)
+ {
+ return null;
+ }
+
+ int end = oid.IndexOf('.', index);
+ if (end == -1)
+ {
+ string lastToken = oid.Substring(index);
+ index = -1;
+ return lastToken;
+ }
+
+ string nextToken = oid.Substring(index, end - index);
+ index = end + 1;
+ return nextToken;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/OidTokenizer.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/OidTokenizer.cs.meta
new file mode 100644
index 00000000..70a1fe39
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/OidTokenizer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 12f21243aaf83f24784fe8e9eb3d5125
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncoding.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncoding.cs
new file mode 100644
index 00000000..155ba1c7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncoding.cs
@@ -0,0 +1,37 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class PrimitiveEncoding
+ : IAsn1Encoding
+ {
+ private readonly int m_tagClass;
+ private readonly int m_tagNo;
+ private readonly byte[] m_contentsOctets;
+
+ internal PrimitiveEncoding(int tagClass, int tagNo, byte[] contentsOctets)
+ {
+ m_tagClass = tagClass;
+ m_tagNo = tagNo;
+ m_contentsOctets = contentsOctets;
+ }
+
+ void IAsn1Encoding.Encode(Asn1OutputStream asn1Out)
+ {
+ asn1Out.WriteIdentifier(m_tagClass, m_tagNo);
+ asn1Out.WriteDL(m_contentsOctets.Length);
+ asn1Out.Write(m_contentsOctets, 0, m_contentsOctets.Length);
+ }
+
+ int IAsn1Encoding.GetLength()
+ {
+ return Asn1OutputStream.GetLengthOfIdentifier(m_tagNo)
+ + Asn1OutputStream.GetLengthOfDL(m_contentsOctets.Length)
+ + m_contentsOctets.Length;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncoding.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncoding.cs.meta
new file mode 100644
index 00000000..f03792cc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncoding.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d4a820e2a7f32e2419201f78cd333979
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncodingSuffixed.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncodingSuffixed.cs
new file mode 100644
index 00000000..fb1a6e07
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncodingSuffixed.cs
@@ -0,0 +1,40 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
+{
+ internal class PrimitiveEncodingSuffixed
+ : IAsn1Encoding
+ {
+ private readonly int m_tagClass;
+ private readonly int m_tagNo;
+ private readonly byte[] m_contentsOctets;
+ private readonly byte m_contentsSuffix;
+
+ internal PrimitiveEncodingSuffixed(int tagClass, int tagNo, byte[] contentsOctets, byte contentsSuffix)
+ {
+ m_tagClass = tagClass;
+ m_tagNo = tagNo;
+ m_contentsOctets = contentsOctets;
+ m_contentsSuffix = contentsSuffix;
+ }
+
+ void IAsn1Encoding.Encode(Asn1OutputStream asn1Out)
+ {
+ asn1Out.WriteIdentifier(m_tagClass, m_tagNo);
+ asn1Out.WriteDL(m_contentsOctets.Length);
+ asn1Out.Write(m_contentsOctets, 0, m_contentsOctets.Length - 1);
+ asn1Out.WriteByte(m_contentsSuffix);
+ }
+
+ int IAsn1Encoding.GetLength()
+ {
+ return Asn1OutputStream.GetLengthOfIdentifier(m_tagNo)
+ + Asn1OutputStream.GetLengthOfDL(m_contentsOctets.Length)
+ + m_contentsOctets.Length;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncodingSuffixed.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncodingSuffixed.cs.meta
new file mode 100644
index 00000000..a98c7a3f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/PrimitiveEncodingSuffixed.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b60c7413ea350154ab11ed4abed746f9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi.meta
new file mode 100644
index 00000000..2d6fd749
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0b6b319a68e38624fa2dd44348593df9
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSINamedCurves.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSINamedCurves.cs
new file mode 100644
index 00000000..426dbbf3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSINamedCurves.cs
@@ -0,0 +1,146 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Multiplier;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Anssi
+{
+ /// Elliptic curve registry for ANSSI.
+ public static class AnssiNamedCurves
+ {
+ private static X9ECPoint ConfigureBasepoint(ECCurve curve, string encoding)
+ {
+ X9ECPoint G = new X9ECPoint(curve, Hex.DecodeStrict(encoding));
+ WNafUtilities.ConfigureBasepoint(G.Point);
+ return G;
+ }
+
+ private static ECCurve ConfigureCurve(ECCurve curve)
+ {
+ return curve;
+ }
+
+ private static BigInteger FromHex(string hex)
+ {
+ return new BigInteger(1, Hex.DecodeStrict(hex));
+ }
+
+ internal class Frp256v1Holder
+ : X9ECParametersHolder
+ {
+ private Frp256v1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Frp256v1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger p = FromHex("F1FD178C0B3AD58F10126DE8CE42435B3961ADBCABC8CA6DE8FCF353D86E9C03");
+ BigInteger a = FromHex("F1FD178C0B3AD58F10126DE8CE42435B3961ADBCABC8CA6DE8FCF353D86E9C00");
+ BigInteger b = FromHex("EE353FCA5428A9300D4ABA754A44C00FDFEC0C9AE4B1A1803075ED967B7BB73F");
+ BigInteger n = FromHex("F1FD178C0B3AD58F10126DE8CE42435B53DC67E140D2BF941FFDD459C6D655E1");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04B6B3D4C356C139EB31183D4749D423958C27D2DCAF98B70164C97A2DD98F5CFF6142E0F7C8B204911F9271F0F3ECEF8C2701C307E8E4C9E183115A1554062CFB");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ private static readonly Dictionary objIds =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly Dictionary curves =
+ new Dictionary();
+ private static readonly Dictionary names =
+ new Dictionary();
+
+ private static void DefineCurve(string name, DerObjectIdentifier oid, X9ECParametersHolder holder)
+ {
+ objIds.Add(name, oid);
+ names.Add(oid, name);
+ curves.Add(oid, holder);
+ }
+
+ static AnssiNamedCurves()
+ {
+ DefineCurve("FRP256v1", AnssiObjectIdentifiers.FRP256v1, Frp256v1Holder.Instance);
+ }
+
+ /// Look up the for the curve with the given name.
+ /// The name of the curve.
+ public static X9ECParameters GetByName(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOid(oid);
+ }
+
+ /// Look up an for the curve with the given name.
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The name of the curve.
+ public static X9ECParametersHolder GetByNameLazy(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOidLazy(oid);
+ }
+
+ /// Look up the for the curve with the given
+ /// OID .
+ /// The OID for the curve.
+ public static X9ECParameters GetByOid(DerObjectIdentifier oid)
+ {
+ return GetByOidLazy(oid)?.Parameters;
+ }
+
+ /// Look up an for the curve with the given
+ /// OID .
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The OID for the curve.
+ public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(curves, oid);
+ }
+
+ /// Look up the name of the curve with the given OID .
+ /// The OID for the curve.
+ public static string GetName(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(names, oid);
+ }
+
+ /// Look up the OID of the curve with the given name.
+ /// The name of the curve.
+ public static DerObjectIdentifier GetOid(string name)
+ {
+ return CollectionUtilities.GetValueOrNull(objIds, name);
+ }
+
+ /// Enumerate the available curve names in this registry.
+ public static IEnumerable Names
+ {
+ get { return CollectionUtilities.Proxy(objIds.Keys); }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSINamedCurves.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSINamedCurves.cs.meta
new file mode 100644
index 00000000..8b4ec537
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSINamedCurves.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d9371a6795776fc4b862f472af16f312
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSIObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSIObjectIdentifiers.cs
new file mode 100644
index 00000000..d75a8de3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSIObjectIdentifiers.cs
@@ -0,0 +1,17 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Anssi
+{
+ public sealed class AnssiObjectIdentifiers
+ {
+ private AnssiObjectIdentifiers()
+ {
+ }
+
+ public static readonly DerObjectIdentifier FRP256v1 = new DerObjectIdentifier("1.2.250.1.223.101.256.1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSIObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSIObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..5b188784
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/anssi/ANSSIObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 09497abd67eab674d9ec3d9f98ca94b8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc.meta
new file mode 100644
index 00000000..d3e9d6e0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 215244200306e0943968033f7dbe9a4a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/BCObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/BCObjectIdentifiers.cs
new file mode 100644
index 00000000..9d582ea2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/BCObjectIdentifiers.cs
@@ -0,0 +1,252 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.BC
+{
+ public abstract class BCObjectIdentifiers
+ {
+ /**
+ * iso.org.dod.internet.private.enterprise.legion-of-the-bouncy-castle
+ * 1.3.6.1.4.1.22554
+ */
+ public static readonly DerObjectIdentifier bc = new DerObjectIdentifier("1.3.6.1.4.1.22554");
+
+ /**
+ * pbe(1) algorithms
+ * 1.3.6.1.4.1.22554.1
+ */
+ public static readonly DerObjectIdentifier bc_pbe = bc.Branch("1");
+
+ /**
+ * SHA-1(1)
+ * 1.3.6.1.4.1.22554.1.1
+ */
+ public static readonly DerObjectIdentifier bc_pbe_sha1 = bc_pbe.Branch("1");
+
+ /** SHA-2.SHA-256; 1.3.6.1.4.1.22554.1.2.1 */
+ public static readonly DerObjectIdentifier bc_pbe_sha256 = bc_pbe.Branch("2.1");
+ /** SHA-2.SHA-384; 1.3.6.1.4.1.22554.1.2.2 */
+ public static readonly DerObjectIdentifier bc_pbe_sha384 = bc_pbe.Branch("2.2");
+ /** SHA-2.SHA-512; 1.3.6.1.4.1.22554.1.2.3 */
+ public static readonly DerObjectIdentifier bc_pbe_sha512 = bc_pbe.Branch("2.3");
+ /** SHA-2.SHA-224; 1.3.6.1.4.1.22554.1.2.4 */
+ public static readonly DerObjectIdentifier bc_pbe_sha224 = bc_pbe.Branch("2.4");
+
+ /**
+ * PKCS-5(1)|PKCS-12(2)
+ */
+ /** SHA-1.PKCS5; 1.3.6.1.4.1.22554.1.1.1 */
+ public static readonly DerObjectIdentifier bc_pbe_sha1_pkcs5 = bc_pbe_sha1.Branch("1");
+ /** SHA-1.PKCS12; 1.3.6.1.4.1.22554.1.1.2 */
+ public static readonly DerObjectIdentifier bc_pbe_sha1_pkcs12 = bc_pbe_sha1.Branch("2");
+
+ /** SHA-256.PKCS12; 1.3.6.1.4.1.22554.1.2.1.1 */
+ public static readonly DerObjectIdentifier bc_pbe_sha256_pkcs5 = bc_pbe_sha256.Branch("1");
+ /** SHA-256.PKCS12; 1.3.6.1.4.1.22554.1.2.1.2 */
+ public static readonly DerObjectIdentifier bc_pbe_sha256_pkcs12 = bc_pbe_sha256.Branch("2");
+
+ /**
+ * AES(1) . (CBC-128(2)|CBC-192(22)|CBC-256(42))
+ */
+ /** 1.3.6.1.4.1.22554.1.1.2.1.2 */
+ public static readonly DerObjectIdentifier bc_pbe_sha1_pkcs12_aes128_cbc = bc_pbe_sha1_pkcs12.Branch("1.2");
+ /** 1.3.6.1.4.1.22554.1.1.2.1.22 */
+ public static readonly DerObjectIdentifier bc_pbe_sha1_pkcs12_aes192_cbc = bc_pbe_sha1_pkcs12.Branch("1.22");
+ /** 1.3.6.1.4.1.22554.1.1.2.1.42 */
+ public static readonly DerObjectIdentifier bc_pbe_sha1_pkcs12_aes256_cbc = bc_pbe_sha1_pkcs12.Branch("1.42");
+
+ /** 1.3.6.1.4.1.22554.1.1.2.2.2 */
+ public static readonly DerObjectIdentifier bc_pbe_sha256_pkcs12_aes128_cbc = bc_pbe_sha256_pkcs12.Branch("1.2");
+ /** 1.3.6.1.4.1.22554.1.1.2.2.22 */
+ public static readonly DerObjectIdentifier bc_pbe_sha256_pkcs12_aes192_cbc = bc_pbe_sha256_pkcs12.Branch("1.22");
+ /** 1.3.6.1.4.1.22554.1.1.2.2.42 */
+ public static readonly DerObjectIdentifier bc_pbe_sha256_pkcs12_aes256_cbc = bc_pbe_sha256_pkcs12.Branch("1.42");
+
+ /**
+ * signature(2) algorithms
+ */
+ public static readonly DerObjectIdentifier bc_sig = bc.Branch("2");
+
+ /**
+ * Sphincs-256
+ */
+ public static readonly DerObjectIdentifier sphincs256 = bc_sig.Branch("1");
+ public static readonly DerObjectIdentifier sphincs256_with_BLAKE512 = sphincs256.Branch("1");
+ public static readonly DerObjectIdentifier sphincs256_with_SHA512 = sphincs256.Branch("2");
+ public static readonly DerObjectIdentifier sphincs256_with_SHA3_512 = sphincs256.Branch("3");
+
+ /**
+ * XMSS
+ */
+ public static readonly DerObjectIdentifier xmss = bc_sig.Branch("2");
+ public static readonly DerObjectIdentifier xmss_with_SHA256 = xmss.Branch("1");
+ public static readonly DerObjectIdentifier xmss_with_SHA512 = xmss.Branch("2");
+ public static readonly DerObjectIdentifier xmss_with_SHAKE128 = xmss.Branch("3");
+ public static readonly DerObjectIdentifier xmss_with_SHAKE256 = xmss.Branch("4");
+
+ /**
+ * XMSS^MT
+ */
+ public static readonly DerObjectIdentifier xmss_mt = bc_sig.Branch("3");
+ public static readonly DerObjectIdentifier xmss_mt_with_SHA256 = xmss_mt.Branch("1");
+ public static readonly DerObjectIdentifier xmss_mt_with_SHA512 = xmss_mt.Branch("2");
+ public static readonly DerObjectIdentifier xmss_mt_with_SHAKE128 = xmss_mt.Branch("3");
+ public static readonly DerObjectIdentifier xmss_mt_with_SHAKE256 = xmss_mt.Branch("4");
+
+ /**
+ * SPHINCS+
+ */
+ public static readonly DerObjectIdentifier sphincsPlus = bc_sig.Branch("5");
+ public static readonly DerObjectIdentifier sphincsPlus_shake_256 = sphincsPlus.Branch("1");
+ public static readonly DerObjectIdentifier sphincsPlus_sha_256 = sphincsPlus.Branch("2");
+ public static readonly DerObjectIdentifier sphincsPlus_sha_512 = sphincsPlus.Branch("3");
+
+ /**
+ * Picnic
+ */
+ public static readonly DerObjectIdentifier picnic = bc_sig.Branch("6");
+ public static readonly DerObjectIdentifier picnicl1fs = picnic.Branch("1");
+ public static readonly DerObjectIdentifier picnicl1ur = picnic.Branch("2");
+ public static readonly DerObjectIdentifier picnicl3fs = picnic.Branch("3");
+ public static readonly DerObjectIdentifier picnicl3ur = picnic.Branch("4");
+ public static readonly DerObjectIdentifier picnicl5fs = picnic.Branch("5");
+ public static readonly DerObjectIdentifier picnicl5ur = picnic.Branch("6");
+ public static readonly DerObjectIdentifier picnic3l1 = picnic.Branch("7");
+ public static readonly DerObjectIdentifier picnic3l3 = picnic.Branch("8");
+ public static readonly DerObjectIdentifier picnic3l5 = picnic.Branch("9");
+ public static readonly DerObjectIdentifier picnicl1full = picnic.Branch("10");
+ public static readonly DerObjectIdentifier picnicl3full = picnic.Branch("11");
+ public static readonly DerObjectIdentifier picnicl5full = picnic.Branch("12");
+
+ /*
+ * Falcon
+ */
+ public static readonly DerObjectIdentifier falcon = bc_sig.Branch("7");
+
+ public static readonly DerObjectIdentifier falcon_512 = new DerObjectIdentifier("1.3.9999.3.1"); // falcon.branch("1");
+ public static readonly DerObjectIdentifier falcon_1024 = new DerObjectIdentifier("1.3.9999.3.4"); // falcon.branch("2");
+
+ /*
+ * Dilithium
+ */
+ public static readonly DerObjectIdentifier dilithium = bc_sig.Branch("8");
+
+ // OpenSSL OIDs
+ public static readonly DerObjectIdentifier dilithium2 = new DerObjectIdentifier("1.3.6.1.4.1.2.267.7.4.4"); // dilithium.branch("1");
+ public static readonly DerObjectIdentifier dilithium3 = new DerObjectIdentifier("1.3.6.1.4.1.2.267.7.6.5"); // dilithium.branch("2");
+ public static readonly DerObjectIdentifier dilithium5 = new DerObjectIdentifier("1.3.6.1.4.1.2.267.7.8.7"); // dilithium.branch("3");
+ public static readonly DerObjectIdentifier dilithium2_aes = new DerObjectIdentifier("1.3.6.1.4.1.2.267.11.4.4"); // dilithium.branch("4");
+ public static readonly DerObjectIdentifier dilithium3_aes = new DerObjectIdentifier("1.3.6.1.4.1.2.267.11.6.5"); // dilithium.branch("5");
+ public static readonly DerObjectIdentifier dilithium5_aes = new DerObjectIdentifier("1.3.6.1.4.1.2.267.11.8.7"); // dilithium.branch("6");
+
+
+ /**
+ * key_exchange(3) algorithms
+ */
+ public static readonly DerObjectIdentifier bc_exch = bc.Branch("3");
+
+ /**
+ * NewHope
+ */
+ public static readonly DerObjectIdentifier newHope = bc_exch.Branch("1");
+
+ /**
+ * X.509 extension(4) values
+ *
+ * 1.3.6.1.4.1.22554.4
+ */
+ public static readonly DerObjectIdentifier bc_ext = bc.Branch("4");
+
+ public static readonly DerObjectIdentifier linkedCertificate = bc_ext.Branch("1");
+
+ /**
+ * KEM(4) algorithms
+ */
+ public static readonly DerObjectIdentifier bc_kem = bc.Branch("5");
+
+ /**
+ * Classic McEliece
+ */
+ public static readonly DerObjectIdentifier pqc_kem_mceliece = bc_kem.Branch("1");
+
+ public static readonly DerObjectIdentifier mceliece348864_r3 = pqc_kem_mceliece.Branch("1");
+ public static readonly DerObjectIdentifier mceliece348864f_r3 = pqc_kem_mceliece.Branch("2");
+ public static readonly DerObjectIdentifier mceliece460896_r3 = pqc_kem_mceliece.Branch("3");
+ public static readonly DerObjectIdentifier mceliece460896f_r3 = pqc_kem_mceliece.Branch("4");
+ public static readonly DerObjectIdentifier mceliece6688128_r3 = pqc_kem_mceliece.Branch("5");
+ public static readonly DerObjectIdentifier mceliece6688128f_r3 = pqc_kem_mceliece.Branch("6");
+ public static readonly DerObjectIdentifier mceliece6960119_r3 = pqc_kem_mceliece.Branch("7");
+ public static readonly DerObjectIdentifier mceliece6960119f_r3 = pqc_kem_mceliece.Branch("8");
+ public static readonly DerObjectIdentifier mceliece8192128_r3 = pqc_kem_mceliece.Branch("9");
+ public static readonly DerObjectIdentifier mceliece8192128f_r3 = pqc_kem_mceliece.Branch("10");
+
+ /**
+ * SABER
+ */
+ public static readonly DerObjectIdentifier pqc_kem_saber = bc_kem.Branch("3");
+ public static readonly DerObjectIdentifier lightsaberkem128r3 = pqc_kem_saber.Branch("1");
+ public static readonly DerObjectIdentifier saberkem128r3 = pqc_kem_saber.Branch("2");
+ public static readonly DerObjectIdentifier firesaberkem128r3 = pqc_kem_saber.Branch("3");
+ public static readonly DerObjectIdentifier lightsaberkem192r3 = pqc_kem_saber.Branch("4");
+ public static readonly DerObjectIdentifier saberkem192r3 = pqc_kem_saber.Branch("5");
+ public static readonly DerObjectIdentifier firesaberkem192r3 = pqc_kem_saber.Branch("6");
+ public static readonly DerObjectIdentifier lightsaberkem256r3 = pqc_kem_saber.Branch("7");
+ public static readonly DerObjectIdentifier saberkem256r3 = pqc_kem_saber.Branch("8");
+ public static readonly DerObjectIdentifier firesaberkem256r3 = pqc_kem_saber.Branch("9");
+ public static readonly DerObjectIdentifier ulightsaberkemr3 = pqc_kem_saber.Branch("10");
+ public static readonly DerObjectIdentifier usaberkemr3 = pqc_kem_saber.Branch("11");
+ public static readonly DerObjectIdentifier ufiresaberkemr3 = pqc_kem_saber.Branch("12");
+ public static readonly DerObjectIdentifier lightsaberkem90sr3 = pqc_kem_saber.Branch("13");
+ public static readonly DerObjectIdentifier saberkem90sr3 = pqc_kem_saber.Branch("14");
+ public static readonly DerObjectIdentifier firesaberkem90sr3 = pqc_kem_saber.Branch("15");
+ public static readonly DerObjectIdentifier ulightsaberkem90sr3 = pqc_kem_saber.Branch("16");
+ public static readonly DerObjectIdentifier usaberkem90sr3 = pqc_kem_saber.Branch("17");
+ public static readonly DerObjectIdentifier ufiresaberkem90sr3 = pqc_kem_saber.Branch("18");
+
+ /**
+ * SIKE
+ */
+ public static readonly DerObjectIdentifier pqc_kem_sike = bc_kem.Branch("4");
+ public static readonly DerObjectIdentifier sikep434 = pqc_kem_sike.Branch("1");
+ public static readonly DerObjectIdentifier sikep503 = pqc_kem_sike.Branch("2");
+ public static readonly DerObjectIdentifier sikep610 = pqc_kem_sike.Branch("3");
+ public static readonly DerObjectIdentifier sikep751 = pqc_kem_sike.Branch("4");
+ public static readonly DerObjectIdentifier sikep434_compressed = pqc_kem_sike.Branch("5");
+ public static readonly DerObjectIdentifier sikep503_compressed = pqc_kem_sike.Branch("6");
+ public static readonly DerObjectIdentifier sikep610_compressed = pqc_kem_sike.Branch("7");
+ public static readonly DerObjectIdentifier sikep751_compressed = pqc_kem_sike.Branch("8");
+
+ /**
+ * Kyber
+ */
+ public static readonly DerObjectIdentifier pqc_kem_kyber = bc_kem.Branch("6");
+
+ public static readonly DerObjectIdentifier kyber512 = new DerObjectIdentifier("1.3.6.1.4.1.2.267.8.2.2"); // pqc_kem_kyber.Branch("1");
+ public static readonly DerObjectIdentifier kyber768 = new DerObjectIdentifier("1.3.6.1.4.1.2.267.8.3.3"); // pqc_kem_kyber.Branch("2");
+ public static readonly DerObjectIdentifier kyber1024 = new DerObjectIdentifier("1.3.6.1.4.1.2.267.8.4.4"); // pqc_kem_kyber.Branch("3");
+ public static readonly DerObjectIdentifier kyber512_aes = new DerObjectIdentifier("1.3.6.1.4.1.2.267.10.2.2"); // pqc_kem_kyber.Branch("4");
+ public static readonly DerObjectIdentifier kyber768_aes = new DerObjectIdentifier("1.3.6.1.4.1.2.267.10.3.3"); // pqc_kem_kyber.Branch("5");
+ public static readonly DerObjectIdentifier kyber1024_aes = new DerObjectIdentifier("1.3.6.1.4.1.2.267.10.4.4"); // pqc_kem_kyber.Branch("6");
+
+ /**
+ * BIKE
+ */
+ public static readonly DerObjectIdentifier pqc_kem_bike = bc_kem.Branch("8");
+
+ public static readonly DerObjectIdentifier bike128 = pqc_kem_bike.Branch("1");
+ public static readonly DerObjectIdentifier bike192 = pqc_kem_bike.Branch("2");
+ public static readonly DerObjectIdentifier bike256 = pqc_kem_bike.Branch("3");
+
+ /**
+ * HQC
+ */
+ public static readonly DerObjectIdentifier pqc_kem_hqc = bc_kem.Branch("9");
+
+ public static readonly DerObjectIdentifier hqc128 = pqc_kem_hqc.Branch("1");
+ public static readonly DerObjectIdentifier hqc192 = pqc_kem_hqc.Branch("2");
+ public static readonly DerObjectIdentifier hqc256 = pqc_kem_hqc.Branch("3");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/BCObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/BCObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..3abf0a6e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/BCObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 84d050018d48c5142a254b8d048bd9b2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/LinkedCertificate.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/LinkedCertificate.cs
new file mode 100644
index 00000000..6b5c298a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/LinkedCertificate.cs
@@ -0,0 +1,104 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.BC
+{
+ /**
+ * Extension to tie an alternate certificate to the containing certificate.
+ *
+ * LinkedCertificate := SEQUENCE {
+ * digest DigestInfo, -- digest of PQC certificate
+ * certLocation GeneralName, -- location of PQC certificate
+ * certIssuer [0] Name OPTIONAL, -- issuer of PQC cert (if different from current certificate)
+ * cACerts [1] GeneralNames OPTIONAL, -- CA certificates for PQC cert (one of more locations)
+ * }
+ *
+ */
+ public class LinkedCertificate
+ : Asn1Encodable
+ {
+ private readonly DigestInfo mDigest;
+ private readonly GeneralName mCertLocation;
+
+ private X509Name mCertIssuer;
+ private GeneralNames mCACerts;
+
+ public LinkedCertificate(DigestInfo digest, GeneralName certLocation)
+ : this(digest, certLocation, null, null)
+ {
+ }
+
+ public LinkedCertificate(DigestInfo digest, GeneralName certLocation, X509Name certIssuer, GeneralNames caCerts)
+ {
+ this.mDigest = digest;
+ this.mCertLocation = certLocation;
+ this.mCertIssuer = certIssuer;
+ this.mCACerts = caCerts;
+ }
+
+ private LinkedCertificate(Asn1Sequence seq)
+ {
+ this.mDigest = DigestInfo.GetInstance(seq[0]);
+ this.mCertLocation = GeneralName.GetInstance(seq[1]);
+
+ for (int i = 2; i < seq.Count; ++i)
+ {
+ Asn1TaggedObject tagged = Asn1TaggedObject.GetInstance(seq[i]);
+
+ switch (tagged.TagNo)
+ {
+ case 0:
+ this.mCertIssuer = X509Name.GetInstance(tagged, false);
+ break;
+ case 1:
+ this.mCACerts = GeneralNames.GetInstance(tagged, false);
+ break;
+ default:
+ throw new ArgumentException("unknown tag in tagged field");
+ }
+ }
+ }
+
+ public static LinkedCertificate GetInstance(object obj)
+ {
+ if (obj is LinkedCertificate)
+ return (LinkedCertificate)obj;
+ if (obj != null)
+ return new LinkedCertificate(Asn1Sequence.GetInstance(obj));
+ return null;
+ }
+
+ public virtual DigestInfo Digest
+ {
+ get { return mDigest; }
+ }
+
+ public virtual GeneralName CertLocation
+ {
+ get { return mCertLocation; }
+ }
+
+ public virtual X509Name CertIssuer
+ {
+ get { return mCertIssuer; }
+ }
+
+ public virtual GeneralNames CACerts
+ {
+ get { return mCACerts; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(mDigest, mCertLocation);
+ v.AddOptionalTagged(false, 0, mCertIssuer);
+ v.AddOptionalTagged(false, 1, mCACerts);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/LinkedCertificate.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/LinkedCertificate.cs.meta
new file mode 100644
index 00000000..31931bd7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bc/LinkedCertificate.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3e370f5bf43973e4592dc199e6edb38f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi.meta
new file mode 100644
index 00000000..7c3c43a6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 794149a9b99e3cf42829d6238b14579d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi/BsiObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi/BsiObjectIdentifiers.cs
new file mode 100644
index 00000000..c138365b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi/BsiObjectIdentifiers.cs
@@ -0,0 +1,106 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Bsi
+{
+ /// See https://www.bsi.bund.de/cae/servlet/contentblob/471398/publicationFile/30615/BSI-TR-03111_pdf.pdf
+ public abstract class BsiObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier bsi_de = new DerObjectIdentifier("0.4.0.127.0.7");
+
+ /* 0.4.0.127.0.7.1.1 */
+ public static readonly DerObjectIdentifier id_ecc = bsi_de.Branch("1.1");
+
+ /* 0.4.0.127.0.7.1.1.4.1 */
+ public static readonly DerObjectIdentifier ecdsa_plain_signatures = id_ecc.Branch("4.1");
+
+ /* 0.4.0.127.0.7.1.1.4.1.1 */
+ public static readonly DerObjectIdentifier ecdsa_plain_SHA1 = ecdsa_plain_signatures.Branch("1");
+
+ /* 0.4.0.127.0.7.1.1.4.1.2 */
+ public static readonly DerObjectIdentifier ecdsa_plain_SHA224 = ecdsa_plain_signatures.Branch("2");
+
+ /* 0.4.0.127.0.7.1.1.4.1.3 */
+ public static readonly DerObjectIdentifier ecdsa_plain_SHA256 = ecdsa_plain_signatures.Branch("3");
+
+ /* 0.4.0.127.0.7.1.1.4.1.4 */
+ public static readonly DerObjectIdentifier ecdsa_plain_SHA384 = ecdsa_plain_signatures.Branch("4");
+
+ /* 0.4.0.127.0.7.1.1.4.1.5 */
+ public static readonly DerObjectIdentifier ecdsa_plain_SHA512 = ecdsa_plain_signatures.Branch("5");
+
+ /* 0.4.0.127.0.7.1.1.4.1.6 */
+ public static readonly DerObjectIdentifier ecdsa_plain_RIPEMD160 = ecdsa_plain_signatures.Branch("6");
+
+ /** 0.4.0.127.0.7.1 */
+ public static readonly DerObjectIdentifier algorithm = bsi_de.Branch("1");
+
+ public static readonly DerObjectIdentifier ecka_eg = id_ecc.Branch("5.1");
+
+ /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963 OID: 0.4.0.127.0.7.1.1.5.1.1 */
+ public static readonly DerObjectIdentifier ecka_eg_X963kdf = ecka_eg.Branch("1");
+
+ /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
+ * with hash function SHA-1
+ * OID: 0.4.0.127.0.7.1.1.5.1.1.1 */
+ public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA1 = ecka_eg_X963kdf.Branch("1");
+
+ /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
+ * with hash function SHA224
+ * OID: 0.4.0.127.0.7.1.1.5.1.1.2 */
+ public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA224 = ecka_eg_X963kdf.Branch("2");
+
+ /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
+ * with hash function SHA256
+ * OID: 0.4.0.127.0.7.1.1.5.1.1.3 */
+ public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA256 = ecka_eg_X963kdf.Branch("3");
+
+ /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
+ * with hash function SHA384
+ * OID: 0.4.0.127.0.7.1.1.5.1.1.4 */
+ public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA384 = ecka_eg_X963kdf.Branch("4");
+
+ /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
+ * with hash function SHA512
+ * OID: 0.4.0.127.0.7.1.1.5.1.1.5 */
+ public static readonly DerObjectIdentifier ecka_eg_X963kdf_SHA512 = ecka_eg_X963kdf.Branch("5");
+
+ /** ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963
+ * with hash function RIPEMD160
+ * OID: 0.4.0.127.0.7.1.1.5.1.1.6 */
+ public static readonly DerObjectIdentifier ecka_eg_X963kdf_RIPEMD160 = ecka_eg_X963kdf.Branch("6");
+
+ /**
+ * Key Derivation Function for Session Keys
+ */
+ public static readonly DerObjectIdentifier ecka_eg_SessionKDF = ecka_eg.Branch("2");
+
+ public static readonly DerObjectIdentifier ecka_eg_SessionKDF_3DES = ecka_eg_SessionKDF.Branch("1");
+ public static readonly DerObjectIdentifier ecka_eg_SessionKDF_AES128 = ecka_eg_SessionKDF.Branch("2");
+ public static readonly DerObjectIdentifier ecka_eg_SessionKDF_AES192 = ecka_eg_SessionKDF.Branch("3");
+ public static readonly DerObjectIdentifier ecka_eg_SessionKDF_AES256 = ecka_eg_SessionKDF.Branch("4");
+
+ /* AES encryption (CBC) and authentication (CMAC)
+ * OID: 0.4.0.127.0.7.1.x */
+ //TODO: replace "1" with correct OID
+ //public static readonly DerObjectIdentifier aes_cbc_cmac = algorithm.Branch("1");
+
+ /* AES encryption (CBC) and authentication (CMAC) with 128 bit
+ * OID: 0.4.0.127.0.7.1.x.y1 */
+ //TODO: replace "1" with correct OID
+ //public static readonly DerObjectIdentifier id_aes128_CBC_CMAC = aes_cbc_cmac.Branch("1");
+
+ /* AES encryption (CBC) and authentication (CMAC) with 192 bit
+ * OID: 0.4.0.127.0.7.1.x.y2 */
+ //TODO: replace "1" with correct OID
+ //public static readonly DerObjectIdentifier id_aes192_CBC_CMAC = aes_cbc_cmac.Branch("1");
+
+ /* AES encryption (CBC) and authentication (CMAC) with 256 bit
+ * OID: 0.4.0.127.0.7.1.x.y3 */
+ //TODO: replace "1" with correct OID
+ //public static readonly DerObjectIdentifier id_aes256_CBC_CMAC = aes_cbc_cmac.Branch("1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi/BsiObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi/BsiObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..5be2fa88
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/bsi/BsiObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c9ae4b1a1eb02554091aa25ad48ca7d7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp.meta
new file mode 100644
index 00000000..6c5f1e37
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0adb45ec3ca28424b8d3f7f5f3dcbff4
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CAKeyUpdAnnContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CAKeyUpdAnnContent.cs
new file mode 100644
index 00000000..6f390a74
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CAKeyUpdAnnContent.cs
@@ -0,0 +1,57 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class CAKeyUpdAnnContent
+ : Asn1Encodable
+ {
+ public static CAKeyUpdAnnContent GetInstance(object obj)
+ {
+ if (obj is CAKeyUpdAnnContent content)
+ return content;
+
+ if (obj is Asn1Sequence seq)
+ return new CAKeyUpdAnnContent(seq);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ private readonly CmpCertificate m_oldWithNew;
+ private readonly CmpCertificate m_newWithOld;
+ private readonly CmpCertificate m_newWithNew;
+
+ private CAKeyUpdAnnContent(Asn1Sequence seq)
+ {
+ m_oldWithNew = CmpCertificate.GetInstance(seq[0]);
+ m_newWithOld = CmpCertificate.GetInstance(seq[1]);
+ m_newWithNew = CmpCertificate.GetInstance(seq[2]);
+ }
+
+ public virtual CmpCertificate OldWithNew => m_oldWithNew;
+
+ public virtual CmpCertificate NewWithOld => m_newWithOld;
+
+ public virtual CmpCertificate NewWithNew => m_newWithNew;
+
+ /**
+ *
+ * CAKeyUpdAnnContent ::= SEQUENCE {
+ * oldWithNew CmpCertificate, -- old pub signed with new priv
+ * newWithOld CmpCertificate, -- new pub signed with old priv
+ * newWithNew CmpCertificate -- new pub signed with new priv
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(m_oldWithNew, m_newWithOld, m_newWithNew);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CAKeyUpdAnnContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CAKeyUpdAnnContent.cs.meta
new file mode 100644
index 00000000..c369e87c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CAKeyUpdAnnContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 57d4f662ef9f4e94c8f85ae891f3b22c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertAnnContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertAnnContent.cs
new file mode 100644
index 00000000..9d4229aa
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertAnnContent.cs
@@ -0,0 +1,76 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * CertAnnContent ::= CMPCertificate
+ */
+ public class CertAnnContent
+ : CmpCertificate
+ {
+ public static new CertAnnContent GetInstance(object obj)
+ {
+ // TODO[cmp]
+ if (obj == null)
+ return null;
+
+ if (obj is CertAnnContent content)
+ return content;
+
+ if (obj is CmpCertificate cmpCertificate)
+ return GetInstance(cmpCertificate.GetEncoded());
+
+ if (obj is byte[] bs)
+ {
+ try
+ {
+ obj = Asn1Object.FromByteArray(bs);
+ }
+ catch (IOException)
+ {
+ throw new ArgumentException("Invalid encoding in CertAnnContent");
+ }
+ }
+
+ if (obj is Asn1Sequence)
+ return new CertAnnContent(X509CertificateStructure.GetInstance(obj));
+
+ // TODO[cmp]
+ if (obj is Asn1TaggedObject taggedObject)
+ return new CertAnnContent(taggedObject.TagNo, taggedObject.GetObject());
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ public static new CertAnnContent GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ // TODO[cmp]
+ if (taggedObject == null)
+ return null;
+
+ if (!declaredExplicit)
+ throw new ArgumentException("tag must be explicit");
+
+ // TODO[cmp]
+ return GetInstance(taggedObject.GetObject());
+ }
+
+ public CertAnnContent(int type, Asn1Object otherCert)
+ : base(type, otherCert)
+ {
+ }
+
+ public CertAnnContent(X509CertificateStructure x509v3PKCert)
+ : base(x509v3PKCert)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertAnnContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertAnnContent.cs.meta
new file mode 100644
index 00000000..25166365
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertAnnContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5528beb2cf14d3f4b8fe42441aa9eed6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertConfirmContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertConfirmContent.cs
new file mode 100644
index 00000000..95bee7ed
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertConfirmContent.cs
@@ -0,0 +1,48 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class CertConfirmContent
+ : Asn1Encodable
+ {
+ public static CertConfirmContent GetInstance(object obj)
+ {
+ if (obj is CertConfirmContent content)
+ return content;
+
+ if (obj is Asn1Sequence seq)
+ return new CertConfirmContent(seq);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ private readonly Asn1Sequence m_content;
+
+ private CertConfirmContent(Asn1Sequence seq)
+ {
+ m_content = seq;
+ }
+
+ public virtual CertStatus[] ToCertStatusArray()
+ {
+ return m_content.MapElements(CertStatus.GetInstance);
+ }
+
+ /**
+ *
+ * CertConfirmContent ::= SEQUENCE OF CertStatus
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertConfirmContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertConfirmContent.cs.meta
new file mode 100644
index 00000000..5984b63d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertConfirmContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 806651b6f8cc9794e89ef40e3281c494
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertOrEncCert.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertOrEncCert.cs
new file mode 100644
index 00000000..f2938900
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertOrEncCert.cs
@@ -0,0 +1,90 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class CertOrEncCert
+ : Asn1Encodable, IAsn1Choice
+ {
+ public static CertOrEncCert GetInstance(object obj)
+ {
+ if (obj is CertOrEncCert certOrEncCert)
+ return certOrEncCert;
+
+ if (obj is Asn1TaggedObject taggedObject)
+ return new CertOrEncCert(taggedObject);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ private readonly CmpCertificate m_certificate;
+ private readonly EncryptedKey m_encryptedCert;
+
+ private CertOrEncCert(Asn1TaggedObject taggedObject)
+ {
+ if (taggedObject.TagNo == 0)
+ {
+ m_certificate = CmpCertificate.GetInstance(taggedObject.GetObject());
+ }
+ else if (taggedObject.TagNo == 1)
+ {
+ m_encryptedCert = EncryptedKey.GetInstance(taggedObject.GetObject());
+ }
+ else
+ {
+ throw new ArgumentException("unknown tag: " + taggedObject.TagNo, nameof(taggedObject));
+ }
+ }
+
+ public CertOrEncCert(CmpCertificate certificate)
+ {
+ if (certificate == null)
+ throw new ArgumentNullException(nameof(certificate));
+
+ m_certificate = certificate;
+ }
+
+ public CertOrEncCert(EncryptedValue encryptedValue)
+ {
+ if (encryptedValue == null)
+ throw new ArgumentNullException(nameof(encryptedValue));
+
+ m_encryptedCert = new EncryptedKey(encryptedValue);
+ }
+
+ public CertOrEncCert(EncryptedKey encryptedKey)
+ {
+ if (encryptedKey == null)
+ throw new ArgumentNullException(nameof(encryptedKey));
+
+ m_encryptedCert = encryptedKey;
+ }
+
+ public virtual CmpCertificate Certificate => m_certificate;
+
+ public virtual EncryptedKey EncryptedCert => m_encryptedCert;
+
+ /**
+ *
+ * CertOrEncCert ::= CHOICE {
+ * certificate [0] CMPCertificate,
+ * encryptedCert [1] EncryptedKey
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (m_certificate != null)
+ return new DerTaggedObject(true, 0, m_certificate);
+
+ return new DerTaggedObject(true, 1, m_encryptedCert);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertOrEncCert.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertOrEncCert.cs.meta
new file mode 100644
index 00000000..e9a5a314
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertOrEncCert.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a143c3b2ffb42f94c841a934c47faa04
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertRepMessage.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertRepMessage.cs
new file mode 100644
index 00000000..a3498829
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertRepMessage.cs
@@ -0,0 +1,81 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class CertRepMessage
+ : Asn1Encodable
+ {
+ public static CertRepMessage GetInstance(object obj)
+ {
+ if (obj is CertRepMessage certRepMessage)
+ return certRepMessage;
+
+ if (obj != null)
+ return new CertRepMessage(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1Sequence m_caPubs;
+ private readonly Asn1Sequence m_response;
+
+ private CertRepMessage(Asn1Sequence seq)
+ {
+ int index = 0;
+
+ if (seq.Count > 1)
+ {
+ m_caPubs = Asn1Sequence.GetInstance((Asn1TaggedObject)seq[index++], true);
+ }
+
+ m_response = Asn1Sequence.GetInstance(seq[index]);
+ }
+
+ public CertRepMessage(CmpCertificate[] caPubs, CertResponse[] response)
+ {
+ if (response == null)
+ throw new ArgumentNullException(nameof(response));
+
+ if (caPubs != null)
+ {
+ m_caPubs = new DerSequence(caPubs);
+ }
+
+ m_response = new DerSequence(response);
+ }
+
+ public virtual CmpCertificate[] GetCAPubs()
+ {
+ return m_caPubs == null ? null : m_caPubs.MapElements(CmpCertificate.GetInstance);
+ }
+
+ public virtual CertResponse[] GetResponse()
+ {
+ return m_response.MapElements(CertResponse.GetInstance);
+ }
+
+ /**
+ *
+ * CertRepMessage ::= SEQUENCE {
+ * caPubs [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ * OPTIONAL,
+ * response SEQUENCE OF CertResponse
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(2);
+ v.AddOptionalTagged(true, 1, m_caPubs);
+ v.Add(m_response);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertRepMessage.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertRepMessage.cs.meta
new file mode 100644
index 00000000..f7ec4bcb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertRepMessage.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1d20678a246c7e94a812b42475ff5992
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertReqTemplateContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertReqTemplateContent.cs
new file mode 100644
index 00000000..fcbe3c26
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertReqTemplateContent.cs
@@ -0,0 +1,71 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * GenMsg: {id-it 19}, < absent >
+ * GenRep: {id-it 19}, CertReqTemplateContent | < absent >
+ *
+ * CertReqTemplateValue ::= CertReqTemplateContent
+ *
+ * CertReqTemplateContent ::= SEQUENCE {
+ * certTemplate CertTemplate,
+ * keySpec Controls OPTIONAL }
+ *
+ * Controls ::= SEQUENCE SIZE (1..MAX) OF AttributeTypeAndValue
+ *
+ */
+ public class CertReqTemplateContent
+ : Asn1Encodable
+ {
+ public static CertReqTemplateContent GetInstance(object obj)
+ {
+ if (obj is CertReqTemplateContent certReqTemplateContent)
+ return certReqTemplateContent;
+
+ if (obj != null)
+ return new CertReqTemplateContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly CertTemplate m_certTemplate;
+ private readonly Asn1Sequence m_keySpec;
+
+ private CertReqTemplateContent(Asn1Sequence seq)
+ {
+ if (seq.Count != 1 && seq.Count != 2)
+ throw new ArgumentException("expected sequence size of 1 or 2");
+
+ m_certTemplate = CertTemplate.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ m_keySpec = Asn1Sequence.GetInstance(seq[1]);
+ }
+ }
+
+ public CertReqTemplateContent(CertTemplate certTemplate, Asn1Sequence keySpec)
+ {
+ m_certTemplate = certTemplate;
+ m_keySpec = keySpec;
+ }
+
+ public virtual CertTemplate CertTemplate => m_certTemplate;
+
+ public virtual Asn1Sequence KeySpec => m_keySpec;
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_certTemplate);
+ v.AddOptional(m_keySpec);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertReqTemplateContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertReqTemplateContent.cs.meta
new file mode 100644
index 00000000..eaf52e73
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertReqTemplateContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 07b23d09e986bb142a18b0598079970f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertResponse.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertResponse.cs
new file mode 100644
index 00000000..d15534c6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertResponse.cs
@@ -0,0 +1,104 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class CertResponse
+ : Asn1Encodable
+ {
+ public static CertResponse GetInstance(object obj)
+ {
+ if (obj is CertResponse certResponse)
+ return certResponse;
+
+ if (obj != null)
+ return new CertResponse(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly DerInteger m_certReqId;
+ private readonly PkiStatusInfo m_status;
+ private readonly CertifiedKeyPair m_certifiedKeyPair;
+ private readonly Asn1OctetString m_rspInfo;
+
+ private CertResponse(Asn1Sequence seq)
+ {
+ m_certReqId = DerInteger.GetInstance(seq[0]);
+ m_status = PkiStatusInfo.GetInstance(seq[1]);
+
+ if (seq.Count >= 3)
+ {
+ if (seq.Count == 3)
+ {
+ Asn1Encodable o = seq[2];
+ if (o is Asn1OctetString)
+ {
+ m_rspInfo = Asn1OctetString.GetInstance(o);
+ }
+ else
+ {
+ m_certifiedKeyPair = CertifiedKeyPair.GetInstance(o);
+ }
+ }
+ else
+ {
+ m_certifiedKeyPair = CertifiedKeyPair.GetInstance(seq[2]);
+ m_rspInfo = Asn1OctetString.GetInstance(seq[3]);
+ }
+ }
+ }
+
+ public CertResponse(DerInteger certReqId, PkiStatusInfo status)
+ : this(certReqId, status, null, null)
+ {
+ }
+
+ public CertResponse(DerInteger certReqId, PkiStatusInfo status, CertifiedKeyPair certifiedKeyPair,
+ Asn1OctetString rspInfo)
+ {
+ if (certReqId == null)
+ throw new ArgumentNullException(nameof(certReqId));
+
+ if (status == null)
+ throw new ArgumentNullException(nameof(status));
+
+ m_certReqId = certReqId;
+ m_status = status;
+ m_certifiedKeyPair = certifiedKeyPair;
+ m_rspInfo = rspInfo;
+ }
+
+ public virtual DerInteger CertReqID => m_certReqId;
+
+ public virtual PkiStatusInfo Status => m_status;
+
+ public virtual CertifiedKeyPair CertifiedKeyPair => m_certifiedKeyPair;
+
+ /**
+ *
+ * CertResponse ::= SEQUENCE {
+ * certReqId INTEGER,
+ * -- to match this response with corresponding request (a value
+ * -- of -1 is to be used if certReqId is not specified in the
+ * -- corresponding request)
+ * status PKIStatusInfo,
+ * certifiedKeyPair CertifiedKeyPair OPTIONAL,
+ * rspInfo OCTET STRING OPTIONAL
+ * -- analogous to the id-regInfo-utf8Pairs string defined
+ * -- for regInfo in CertReqMsg [CRMF]
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_certReqId, m_status);
+ v.AddOptional(m_certifiedKeyPair, m_rspInfo);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertResponse.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertResponse.cs.meta
new file mode 100644
index 00000000..42035bdc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertResponse.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 01689c05e132a6548ac537485333564a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertStatus.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertStatus.cs
new file mode 100644
index 00000000..9b9e11cf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertStatus.cs
@@ -0,0 +1,107 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class CertStatus
+ : Asn1Encodable
+ {
+ public static CertStatus GetInstance(object obj)
+ {
+ if (obj is CertStatus certStatus)
+ return certStatus;
+
+ if (obj != null)
+ return new CertStatus(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1OctetString m_certHash;
+ private readonly DerInteger m_certReqID;
+ private readonly PkiStatusInfo m_statusInfo;
+ private readonly AlgorithmIdentifier m_hashAlg;
+
+ private CertStatus(Asn1Sequence seq)
+ {
+ m_certHash = Asn1OctetString.GetInstance(seq[0]);
+ m_certReqID = DerInteger.GetInstance(seq[1]);
+
+ if (seq.Count > 2)
+ {
+ for (int t = 2; t < seq.Count; t++)
+ {
+ Asn1Object p = seq[t].ToAsn1Object();
+ if (p is Asn1Sequence s)
+ {
+ m_statusInfo = PkiStatusInfo.GetInstance(s);
+ }
+ if (p is Asn1TaggedObject dto)
+ {
+ if (dto.TagNo != 0)
+ throw new ArgumentException("unknown tag " + dto.TagNo);
+
+ m_hashAlg = AlgorithmIdentifier.GetInstance(dto, true);
+ }
+ }
+ }
+ }
+
+ public CertStatus(byte[] certHash, BigInteger certReqID)
+ {
+ m_certHash = new DerOctetString(certHash);
+ m_certReqID = new DerInteger(certReqID);
+ }
+
+ public CertStatus(byte[] certHash, BigInteger certReqID, PkiStatusInfo statusInfo)
+ {
+ m_certHash = new DerOctetString(certHash);
+ m_certReqID = new DerInteger(certReqID);
+ m_statusInfo = statusInfo;
+ }
+
+ public CertStatus(byte[] certHash, BigInteger certReqID, PkiStatusInfo statusInfo, AlgorithmIdentifier hashAlg)
+ {
+ m_certHash = new DerOctetString(certHash);
+ m_certReqID = new DerInteger(certReqID);
+ m_statusInfo = statusInfo;
+ m_hashAlg = hashAlg;
+ }
+
+ public virtual Asn1OctetString CertHash => m_certHash;
+
+ public virtual DerInteger CertReqID => m_certReqID;
+
+ public virtual PkiStatusInfo StatusInfo => m_statusInfo;
+
+ public virtual AlgorithmIdentifier HashAlg => m_hashAlg;
+
+ /**
+ *
+ *
+ * CertStatus ::= SEQUENCE {
+ * certHash OCTET STRING,
+ * certReqId INTEGER,
+ * statusInfo PKIStatusInfo OPTIONAL,
+ * hashAlg [0] AlgorithmIdentifier{DIGEST-ALGORITHM, {...}} OPTIONAL
+ * }
+ *
+ *
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_certHash, m_certReqID);
+ v.AddOptional(m_statusInfo);
+ v.AddOptionalTagged(true, 0, m_hashAlg);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertStatus.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertStatus.cs.meta
new file mode 100644
index 00000000..548b3a11
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertStatus.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0efe7846acc4774418d88c81a9f46a55
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertifiedKeyPair.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertifiedKeyPair.cs
new file mode 100644
index 00000000..0677d9e2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertifiedKeyPair.cs
@@ -0,0 +1,102 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class CertifiedKeyPair
+ : Asn1Encodable
+ {
+ public static CertifiedKeyPair GetInstance(object obj)
+ {
+ if (obj is CertifiedKeyPair certifiedKeyPair)
+ return certifiedKeyPair;
+
+ if (obj != null)
+ return new CertifiedKeyPair(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly CertOrEncCert m_certOrEncCert;
+ private readonly EncryptedKey m_privateKey;
+ private readonly PkiPublicationInfo m_publicationInfo;
+
+ private CertifiedKeyPair(Asn1Sequence seq)
+ {
+ m_certOrEncCert = CertOrEncCert.GetInstance(seq[0]);
+
+ if (seq.Count >= 2)
+ {
+ if (seq.Count == 2)
+ {
+ Asn1TaggedObject tagged = Asn1TaggedObject.GetInstance(seq[1]);
+ if (tagged.TagNo == 0)
+ {
+ m_privateKey = EncryptedKey.GetInstance(tagged.GetObject());
+ }
+ else
+ {
+ m_publicationInfo = PkiPublicationInfo.GetInstance(tagged.GetObject());
+ }
+ }
+ else
+ {
+ m_privateKey = EncryptedKey.GetInstance(Asn1TaggedObject.GetInstance(seq[1]).GetObject());
+ m_publicationInfo = PkiPublicationInfo.GetInstance(Asn1TaggedObject.GetInstance(seq[2]).GetObject());
+ }
+ }
+ }
+
+ public CertifiedKeyPair(CertOrEncCert certOrEncCert)
+ : this(certOrEncCert, (EncryptedKey)null, null)
+ {
+ }
+
+ public CertifiedKeyPair(CertOrEncCert certOrEncCert, EncryptedValue privateKey,
+ PkiPublicationInfo publicationInfo)
+ : this(certOrEncCert, privateKey == null ? null : new EncryptedKey(privateKey), publicationInfo)
+ {
+ }
+
+ public CertifiedKeyPair(CertOrEncCert certOrEncCert, EncryptedKey privateKey,
+ PkiPublicationInfo publicationInfo)
+ {
+ if (certOrEncCert == null)
+ throw new ArgumentNullException(nameof(certOrEncCert));
+
+ m_certOrEncCert = certOrEncCert;
+ m_privateKey = privateKey;
+ m_publicationInfo = publicationInfo;
+ }
+
+ public virtual CertOrEncCert CertOrEncCert => m_certOrEncCert;
+
+ public virtual EncryptedKey PrivateKey => m_privateKey;
+
+ public virtual PkiPublicationInfo PublicationInfo => m_publicationInfo;
+
+ /**
+ *
+ * CertifiedKeyPair ::= SEQUENCE {
+ * certOrEncCert CertOrEncCert,
+ * privateKey [0] EncryptedValue OPTIONAL,
+ * -- see [CRMF] for comment on encoding
+ * publicationInfo [1] PKIPublicationInfo OPTIONAL
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_certOrEncCert);
+ v.AddOptionalTagged(true, 0, m_privateKey);
+ v.AddOptionalTagged(true, 1, m_publicationInfo);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertifiedKeyPair.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertifiedKeyPair.cs.meta
new file mode 100644
index 00000000..01e6367b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CertifiedKeyPair.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 679079ba357f9f54780c4f094af9d15a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/Challenge.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/Challenge.cs
new file mode 100644
index 00000000..bed8f8a2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/Challenge.cs
@@ -0,0 +1,166 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ *
+ * Challenge ::= SEQUENCE {
+ * owf AlgorithmIdentifier OPTIONAL,
+ *
+ * -- MUST be present in the first Challenge; MAY be omitted in
+ * -- any subsequent Challenge in POPODecKeyChallContent (if
+ * -- omitted, then the owf used in the immediately preceding
+ * -- Challenge is to be used).
+ *
+ * witness OCTET STRING,
+ * -- the result of applying the one-way function (owf) to a
+ * -- randomly-generated INTEGER, A. [Note that a different
+ * -- INTEGER MUST be used for each Challenge.]
+ * challenge OCTET STRING
+ * -- the encryption (under the public key for which the cert.
+ * -- request is being made) of Rand, where Rand is specified as
+ * -- Rand ::= SEQUENCE {
+ * -- int INTEGER,
+ * -- - the randomly-generated INTEGER A (above)
+ * -- sender GeneralName
+ * -- - the sender's name (as included in PKIHeader)
+ * -- }
+ * }
+ *
+ */
+ public class Challenge
+ : Asn1Encodable
+ {
+ public static Challenge GetInstance(object obj)
+ {
+ if (obj is Challenge challenge)
+ return challenge;
+
+ if (obj != null)
+ return new Challenge(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly AlgorithmIdentifier m_owf;
+ private readonly Asn1OctetString m_witness;
+ private readonly Asn1OctetString m_challenge;
+
+ private Challenge(Asn1Sequence seq)
+ {
+ int index = 0;
+
+ if (seq.Count == 3)
+ {
+ m_owf = AlgorithmIdentifier.GetInstance(seq[index++]);
+ }
+
+ m_witness = Asn1OctetString.GetInstance(seq[index++]);
+ m_challenge = Asn1OctetString.GetInstance(seq[index]);
+ }
+
+ public Challenge(byte[] witness, byte[] challenge)
+ : this(null, witness, challenge)
+ {
+ }
+
+ public Challenge(AlgorithmIdentifier owf, byte[] witness, byte[] challenge)
+ {
+ m_owf = owf;
+ m_witness = new DerOctetString(witness);
+ m_challenge = new DerOctetString(challenge);
+ }
+
+ public virtual AlgorithmIdentifier Owf => m_owf;
+
+ public virtual Asn1OctetString Witness => m_witness;
+
+ public virtual Asn1OctetString ChallengeValue => m_challenge;
+
+ /**
+ *
+ * Challenge ::= SEQUENCE {
+ * owf AlgorithmIdentifier OPTIONAL,
+ *
+ * -- MUST be present in the first Challenge; MAY be omitted in
+ * -- any subsequent Challenge in POPODecKeyChallContent (if
+ * -- omitted, then the owf used in the immediately preceding
+ * -- Challenge is to be used).
+ *
+ * witness OCTET STRING,
+ * -- the result of applying the one-way function (owf) to a
+ * -- randomly-generated INTEGER, A. [Note that a different
+ * -- INTEGER MUST be used for each Challenge.]
+ * challenge OCTET STRING
+ * -- the encryption (under the public key for which the cert.
+ * -- request is being made) of Rand, where Rand is specified as
+ * -- Rand ::= SEQUENCE {
+ * -- int INTEGER,
+ * -- - the randomly-generated INTEGER A (above)
+ * -- sender GeneralName
+ * -- - the sender's name (as included in PKIHeader)
+ * -- }
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(m_owf);
+ v.Add(m_witness, m_challenge);
+ return new DerSequence(v);
+ }
+
+ /**
+ * Rand is the inner type
+ */
+ public class Rand
+ : Asn1Encodable
+ {
+ public static Rand GetInstance(object obj)
+ {
+ if (obj is Rand rand)
+ return rand;
+
+ if (obj != null)
+ return new Rand(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly DerInteger m_intVal;
+ private readonly GeneralName m_sender;
+
+ public Rand(DerInteger intVal, GeneralName sender)
+ {
+ m_intVal = intVal;
+ m_sender = sender;
+ }
+
+ public Rand(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("expected sequence size of 2");
+
+ m_intVal = DerInteger.GetInstance(seq[0]);
+ m_sender = GeneralName.GetInstance(seq[1]);
+ }
+
+ public virtual DerInteger IntVal => m_intVal;
+
+ public virtual GeneralName Sender => m_sender;
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(m_intVal, m_sender);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/Challenge.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/Challenge.cs.meta
new file mode 100644
index 00000000..f72562fb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/Challenge.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fcf21e414c8b368428aeda9d6a20b398
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpCertificate.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpCertificate.cs
new file mode 100644
index 00000000..16266707
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpCertificate.cs
@@ -0,0 +1,116 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class CmpCertificate
+ : Asn1Encodable, IAsn1Choice
+ {
+ public static CmpCertificate GetInstance(object obj)
+ {
+ // TODO[cmp] Review this whole metho
+
+ if (obj == null)
+ return null;
+
+ if (obj is CmpCertificate cmpCertificate)
+ return cmpCertificate;
+
+ if (obj is byte[] bs)
+ {
+ try
+ {
+ obj = Asn1Object.FromByteArray(bs);
+ }
+ catch (IOException)
+ {
+ throw new ArgumentException("Invalid encoding in CmpCertificate");
+ }
+ }
+
+ if (obj is Asn1Sequence)
+ return new CmpCertificate(X509CertificateStructure.GetInstance(obj));
+
+ if (obj is Asn1TaggedObject taggedObject)
+ return new CmpCertificate(taggedObject.TagNo, taggedObject.GetObject());
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ public static CmpCertificate GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ // TODO[cmp]
+ if (taggedObject == null)
+ return null;
+
+ if (!declaredExplicit)
+ throw new ArgumentException("tag must be explicit");
+
+ // TODO[cmp]
+ return GetInstance(taggedObject.GetObject());
+ }
+
+ private readonly X509CertificateStructure m_x509v3PKCert;
+
+ private readonly int m_otherTagValue;
+ private readonly Asn1Encodable m_otherCert;
+
+ /**
+ * Note: the addition of other certificates is a BC extension. If you use this constructor they
+ * will be added with an explicit tag value of type.
+ *
+ * @param type the type of the certificate (used as a tag value).
+ * @param otherCert the object representing the certificate
+ */
+ public CmpCertificate(int type, Asn1Encodable otherCert)
+ {
+ m_otherTagValue = type;
+ m_otherCert = otherCert;
+ }
+
+ public CmpCertificate(X509CertificateStructure x509v3PKCert)
+ {
+ if (x509v3PKCert.Version != 3)
+ throw new ArgumentException("only version 3 certificates allowed", nameof(x509v3PKCert));
+
+ m_x509v3PKCert = x509v3PKCert;
+ }
+
+ public virtual bool IsX509v3PKCert => m_x509v3PKCert != null;
+
+ public virtual X509CertificateStructure X509v3PKCert => m_x509v3PKCert;
+
+ public virtual int OtherCertTag => m_otherTagValue;
+
+ public virtual Asn1Encodable OtherCert => m_otherCert;
+
+ /**
+ *
+ * CMPCertificate ::= CHOICE {
+ * x509v3PKCert Certificate
+ * x509v2AttrCert [1] AttributeCertificate
+ * }
+ *
+ * Note: the addition of attribute certificates is a BC extension.
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (m_otherCert != null)
+ {
+ // explicit following CMP conventions
+ return new DerTaggedObject(true, m_otherTagValue, m_otherCert);
+ }
+
+ return m_x509v3PKCert.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpCertificate.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpCertificate.cs.meta
new file mode 100644
index 00000000..6e5607b4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpCertificate.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a09d19b54d9fad14daf62903f6c98a70
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpObjectIdentifiers.cs
new file mode 100644
index 00000000..ada256b8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpObjectIdentifiers.cs
@@ -0,0 +1,262 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public static class CmpObjectIdentifiers
+ {
+ // RFC 4210
+
+ /**
+ * id-PasswordBasedMac OBJECT IDENTIFIER ::= {1 2 840 113533 7 66 13}
+ */
+ public static readonly DerObjectIdentifier passwordBasedMac = new DerObjectIdentifier("1.2.840.113533.7.66.13");
+
+ /**
+ * id-DHBasedMac OBJECT IDENTIFIER ::= {1 2 840 113533 7 66 30}
+ */
+ public static readonly DerObjectIdentifier dhBasedMac = new DerObjectIdentifier("1.2.840.113533.7.66.30");
+
+ // Example InfoTypeAndValue contents include, but are not limited
+ // to, the following (un-comment in this ASN.1 module and use as
+ // appropriate for a given environment):
+ //
+ // id-it-caProtEncCert OBJECT IDENTIFIER ::= {id-it 1}
+ // CAProtEncCertValue ::= CMPCertificate
+ // id-it-signKeyPairTypes OBJECT IDENTIFIER ::= {id-it 2}
+ // SignKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ // id-it-encKeyPairTypes OBJECT IDENTIFIER ::= {id-it 3}
+ // EncKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ // id-it-preferredSymmAlg OBJECT IDENTIFIER ::= {id-it 4}
+ // PreferredSymmAlgValue ::= AlgorithmIdentifier
+ // id-it-caKeyUpdateInfo OBJECT IDENTIFIER ::= {id-it 5}
+ // CAKeyUpdateInfoValue ::= CAKeyUpdAnnContent
+ // id-it-currentCRL OBJECT IDENTIFIER ::= {id-it 6}
+ // CurrentCRLValue ::= CertificateList
+ // id-it-unsupportedOIDs OBJECT IDENTIFIER ::= {id-it 7}
+ // UnsupportedOIDsValue ::= SEQUENCE OF OBJECT IDENTIFIER
+ // id-it-keyPairParamReq OBJECT IDENTIFIER ::= {id-it 10}
+ // KeyPairParamReqValue ::= OBJECT IDENTIFIER
+ // id-it-keyPairParamRep OBJECT IDENTIFIER ::= {id-it 11}
+ // KeyPairParamRepValue ::= AlgorithmIdentifer
+ // id-it-revPassphrase OBJECT IDENTIFIER ::= {id-it 12}
+ // RevPassphraseValue ::= EncryptedValue
+ // id-it-implicitConfirm OBJECT IDENTIFIER ::= {id-it 13}
+ // ImplicitConfirmValue ::= NULL
+ // id-it-confirmWaitTime OBJECT IDENTIFIER ::= {id-it 14}
+ // ConfirmWaitTimeValue ::= GeneralizedTime
+ // id-it-origPKIMessage OBJECT IDENTIFIER ::= {id-it 15}
+ // OrigPKIMessageValue ::= PKIMessages
+ // id-it-suppLangTags OBJECT IDENTIFIER ::= {id-it 16}
+ // SuppLangTagsValue ::= SEQUENCE OF UTF8String
+ // id-it-certProfile OBJECT IDENTIFIER ::= {id-it 21}
+ // CertProfileValue ::= SEQUENCE SIZE (1..MAX) OF UTF8String
+ // where
+ //
+ // id-pkix OBJECT IDENTIFIER ::= {
+ // iso(1) identified-organization(3)
+ // dod(6) internet(1) security(5) mechanisms(5) pkix(7)}
+ // and
+ // id-it OBJECT IDENTIFIER ::= {id-pkix 4}
+
+ /** RFC 4120: it-id: PKIX.4 = 1.3.6.1.5.5.7.4 */
+
+
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.1
+ */
+ public static readonly DerObjectIdentifier it_caProtEncCert = new DerObjectIdentifier("1.3.6.1.5.5.7.4.1");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.2
+ */
+ public static readonly DerObjectIdentifier it_signKeyPairTypes = new DerObjectIdentifier("1.3.6.1.5.5.7.4.2");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.3
+ */
+ public static readonly DerObjectIdentifier it_encKeyPairTypes = new DerObjectIdentifier("1.3.6.1.5.5.7.4.3");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.4
+ */
+ public static readonly DerObjectIdentifier it_preferredSymAlg = new DerObjectIdentifier("1.3.6.1.5.5.7.4.4");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.5
+ */
+ public static readonly DerObjectIdentifier it_caKeyUpdateInfo = new DerObjectIdentifier("1.3.6.1.5.5.7.4.5");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.6
+ */
+ public static readonly DerObjectIdentifier it_currentCRL = new DerObjectIdentifier("1.3.6.1.5.5.7.4.6");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.7
+ */
+ public static readonly DerObjectIdentifier it_unsupportedOIDs = new DerObjectIdentifier("1.3.6.1.5.5.7.4.7");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.10
+ */
+ public static readonly DerObjectIdentifier it_keyPairParamReq = new DerObjectIdentifier("1.3.6.1.5.5.7.4.10");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.11
+ */
+ public static readonly DerObjectIdentifier it_keyPairParamRep = new DerObjectIdentifier("1.3.6.1.5.5.7.4.11");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.12
+ */
+ public static readonly DerObjectIdentifier it_revPassphrase = new DerObjectIdentifier("1.3.6.1.5.5.7.4.12");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.13
+ */
+ public static readonly DerObjectIdentifier it_implicitConfirm = new DerObjectIdentifier("1.3.6.1.5.5.7.4.13");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.14
+ */
+ public static readonly DerObjectIdentifier it_confirmWaitTime = new DerObjectIdentifier("1.3.6.1.5.5.7.4.14");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.15
+ */
+ public static readonly DerObjectIdentifier it_origPKIMessage = new DerObjectIdentifier("1.3.6.1.5.5.7.4.15");
+ /**
+ * RFC 4120: 1.3.6.1.5.5.7.4.16
+ */
+ public static readonly DerObjectIdentifier it_suppLangTags = new DerObjectIdentifier("1.3.6.1.5.5.7.4.16");
+
+ /**
+ * Update 16, RFC 4210
+ * {id-it 17}
+ */
+ public static readonly DerObjectIdentifier id_it_caCerts = new DerObjectIdentifier("1.3.6.1.5.5.7.4.17");
+
+
+ /**
+ * Update 16, RFC 4210
+ * GenRep: {id-it 18}, RootCaKeyUpdateContent
+ */
+ public static readonly DerObjectIdentifier id_it_rootCaKeyUpdate = new DerObjectIdentifier("1.3.6.1.5.5.7.4.18");
+
+
+ /**
+ * Update 16, RFC 4210
+ * {id-it 19}
+ */
+ public static readonly DerObjectIdentifier id_it_certReqTemplate = new DerObjectIdentifier("1.3.6.1.5.5.7.4.19");
+
+
+ /**
+ * Update 16, RFC 4210
+ * GenMsg: {id-it 20}, RootCaCertValue
+ */
+ public static readonly DerObjectIdentifier id_it_rootCaCert = new DerObjectIdentifier("1.3.6.1.5.5.7.4.20");
+
+ /**
+ * Update-16 to RFC 4210
+ * id-it-certProfile OBJECT IDENTIFIER ::= {id-it 21}
+ */
+ public static readonly DerObjectIdentifier id_it_certProfile = new DerObjectIdentifier("1.3.6.1.5.5.7.4.21");
+
+ public static readonly DerObjectIdentifier id_it_crlStatusList = new DerObjectIdentifier("1.3.6.1.5.5.7.4.22");
+
+ public static readonly DerObjectIdentifier id_it_crls = new DerObjectIdentifier("1.3.6.1.5.5.7.4.23");
+
+ // Not yet formally defined.
+
+ //public static readonly DerObjectIdentifier id_it_crlStatusList = null;
+ //public static readonly DerObjectIdentifier id_it_crls = null;
+
+
+ // RFC 4211
+
+ // id-pkix OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
+ // dod(6) internet(1) security(5) mechanisms(5) pkix(7) }
+ //
+ // arc for Internet X.509 PKI protocols and their components
+ // id-pkip OBJECT IDENTIFIER :: { id-pkix pkip(5) }
+ //
+ // arc for Registration Controls in CRMF
+ // id-regCtrl OBJECT IDENTIFIER ::= { id-pkip regCtrl(1) }
+ //
+ // arc for Registration Info in CRMF
+ // id-regInfo OBJECT IDENTIFIER ::= { id-pkip id-regInfo(2) }
+
+ /**
+ * RFC 4211: it-pkip: PKIX.5 = 1.3.6.1.5.5.7.5
+ */
+ public static readonly DerObjectIdentifier id_pkip = new DerObjectIdentifier("1.3.6.1.5.5.7.5");
+
+ /**
+ * RFC 4211: it-regCtrl: 1.3.6.1.5.5.7.5.1
+ */
+ public static readonly DerObjectIdentifier id_regCtrl = new DerObjectIdentifier("1.3.6.1.5.5.7.5.1");
+ /**
+ * RFC 4211: it-regInfo: 1.3.6.1.5.5.7.5.2
+ */
+ public static readonly DerObjectIdentifier id_regInfo = new DerObjectIdentifier("1.3.6.1.5.5.7.5.2");
+
+
+ /**
+ * 1.3.6.1.5.5.7.5.1.1
+ */
+ public static readonly DerObjectIdentifier regCtrl_regToken = new DerObjectIdentifier("1.3.6.1.5.5.7.5.1.1");
+ /**
+ * 1.3.6.1.5.5.7.5.1.2
+ */
+ public static readonly DerObjectIdentifier regCtrl_authenticator = new DerObjectIdentifier("1.3.6.1.5.5.7.5.1.2");
+ /**
+ * 1.3.6.1.5.5.7.5.1.3
+ */
+ public static readonly DerObjectIdentifier regCtrl_pkiPublicationInfo = new DerObjectIdentifier("1.3.6.1.5.5.7.5.1.3");
+ /**
+ * 1.3.6.1.5.5.7.5.1.4
+ */
+ public static readonly DerObjectIdentifier regCtrl_pkiArchiveOptions = new DerObjectIdentifier("1.3.6.1.5.5.7.5.1.4");
+ /**
+ * 1.3.6.1.5.5.7.5.1.5
+ */
+ public static readonly DerObjectIdentifier regCtrl_oldCertID = new DerObjectIdentifier("1.3.6.1.5.5.7.5.1.5");
+ /**
+ * 1.3.6.1.5.5.7.5.1.6
+ */
+ public static readonly DerObjectIdentifier regCtrl_protocolEncrKey = new DerObjectIdentifier("1.3.6.1.5.5.7.5.1.6");
+
+ /**
+ * From RFC4210:
+ * id-regCtrl-altCertTemplate OBJECT IDENTIFIER ::= {id-regCtrl 7}; 1.3.6.1.5.5.7.1.7
+ */
+ public static readonly DerObjectIdentifier regCtrl_altCertTemplate = new DerObjectIdentifier("1.3.6.1.5.5.7.5.1.7");
+
+ /**
+ * RFC 4211: it-regInfo-utf8Pairs: 1.3.6.1.5.5.7.5.2.1
+ */
+ public static readonly DerObjectIdentifier regInfo_utf8Pairs = new DerObjectIdentifier("1.3.6.1.5.5.7.5.2.1");
+ /**
+ * RFC 4211: it-regInfo-certReq: 1.3.6.1.5.5.7.5.2.1
+ */
+ public static readonly DerObjectIdentifier regInfo_certReq = new DerObjectIdentifier("1.3.6.1.5.5.7.5.2.2");
+
+ /**
+ * 1.2.840.113549.1.9.16.1.21
+ *
+ * id-ct OBJECT IDENTIFIER ::= { id-smime 1 } -- content types
+ *
+ * id-ct-encKeyWithID OBJECT IDENTIFIER ::= {id-ct 21}
+ *
+ */
+ public static readonly DerObjectIdentifier ct_encKeyWithID = new DerObjectIdentifier("1.2.840.113549.1.9.16.1.21");
+
+
+ /**
+ * id-regCtrl-algId OBJECT IDENTIFIER ::= { iso(1)
+ * identified-organization(3) dod(6) internet(1) security(5)
+ * mechanisms(5) pkix(7) pkip(5) regCtrl(1) 11 }
+ */
+ public static readonly DerObjectIdentifier id_regCtrl_algId = id_pkip.Branch("1.11");
+
+ /**
+ * id-regCtrl-rsaKeyLen OBJECT IDENTIFIER ::= { iso(1)
+ * identified-organization(3) dod(6) internet(1) security(5)
+ * mechanisms(5) pkix(7) pkip(5) regCtrl(1) 12 }
+ */
+ public static readonly DerObjectIdentifier id_regCtrl_rsaKeyLen = id_pkip.Branch("1.12");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..20f1e202
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CmpObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 67d51d1e662ef944b9ecf34bebe6a4cc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlAnnContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlAnnContent.cs
new file mode 100644
index 00000000..7d6da241
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlAnnContent.cs
@@ -0,0 +1,51 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class CrlAnnContent
+ : Asn1Encodable
+ {
+ public static CrlAnnContent GetInstance(object obj)
+ {
+ if (obj is CrlAnnContent crlAnnContent)
+ return crlAnnContent;
+
+ if (obj != null)
+ return new CrlAnnContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1Sequence m_content;
+
+ private CrlAnnContent(Asn1Sequence seq)
+ {
+ m_content = seq;
+ }
+
+ public CrlAnnContent(CertificateList crl)
+ {
+ m_content = new DerSequence(crl);
+ }
+
+ public virtual CertificateList[] ToCertificateListArray()
+ {
+ return m_content.MapElements(CertificateList.GetInstance);
+ }
+
+ /**
+ *
+ * CrlAnnContent ::= SEQUENCE OF CertificateList
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlAnnContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlAnnContent.cs.meta
new file mode 100644
index 00000000..e47daef4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlAnnContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6b3ceb87b6ac3e444b5ce59b0dcc8aee
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlSource.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlSource.cs
new file mode 100644
index 00000000..bf3dc8d5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlSource.cs
@@ -0,0 +1,76 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * GenMsg: {id-it TBD1}, SEQUENCE SIZE (1..MAX) OF CRLStatus
+ * GenRep: {id-it TBD2}, SEQUENCE SIZE (1..MAX) OF
+ * CertificateList | < absent >
+ *
+ * CRLSource ::= CHOICE {
+ * dpn [0] DistributionPointName,
+ * issuer [1] GeneralNames }
+ *
+ */
+ public class CrlSource
+ : Asn1Encodable, IAsn1Choice
+ {
+ public static CrlSource GetInstance(object obj)
+ {
+ if (obj is CrlSource crlSource)
+ return crlSource;
+
+ if (obj != null)
+ return new CrlSource(Asn1TaggedObject.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly DistributionPointName m_dpn;
+ private readonly GeneralNames m_issuer;
+
+ private CrlSource(Asn1TaggedObject taggedObject)
+ {
+ switch (taggedObject.TagNo)
+ {
+ case 0:
+ m_dpn = DistributionPointName.GetInstance(taggedObject, true);
+ m_issuer = null;
+ break;
+ case 1:
+ m_dpn = null;
+ m_issuer = GeneralNames.GetInstance(taggedObject, true);
+ break;
+ default:
+ throw new ArgumentException("unknown tag: " + Asn1Utilities.GetTagText(taggedObject));
+ }
+ }
+
+ public CrlSource(DistributionPointName dpn, GeneralNames issuer)
+ {
+ if ((dpn == null) == (issuer == null))
+ throw new ArgumentException("either dpn or issuer must be set");
+
+ m_dpn = dpn;
+ m_issuer = issuer;
+ }
+
+ public virtual DistributionPointName Dpn => m_dpn;
+
+ public virtual GeneralNames Issuer => m_issuer;
+
+ public override Asn1Object ToAsn1Object()
+ {
+ if (m_dpn != null)
+ return new DerTaggedObject(true, 0, m_dpn);
+
+ return new DerTaggedObject(true, 1, m_issuer);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlSource.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlSource.cs.meta
new file mode 100644
index 00000000..f67fd4f5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlSource.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d78b1f2c335bedc4da114a48080d16dd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlStatus.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlStatus.cs
new file mode 100644
index 00000000..4bcb2d6c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlStatus.cs
@@ -0,0 +1,65 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * CRLStatus ::= SEQUENCE {
+ * source CRLSource,
+ * thisUpdate Time OPTIONAL }
+ */
+ public class CrlStatus
+ : Asn1Encodable
+ {
+ public static CrlStatus GetInstance(object obj)
+ {
+ if (obj is CrlStatus crlStatus)
+ return crlStatus;
+
+ if (obj != null)
+ return new CrlStatus(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly CrlSource m_source;
+ private readonly Time m_thisUpdate;
+
+ private CrlStatus(Asn1Sequence sequence)
+ {
+ int count = sequence.Count;
+ if (count < 1 || count > 2)
+ throw new ArgumentException("expected sequence size of 1 or 2, got " + count);
+
+ m_source = CrlSource.GetInstance(sequence[0]);
+
+ if (sequence.Count == 2)
+ {
+ m_thisUpdate = Time.GetInstance(sequence[1]);
+ }
+ }
+
+ public CrlStatus(CrlSource source, Time thisUpdate)
+ {
+ m_source = source;
+ m_thisUpdate = thisUpdate;
+ }
+
+ public virtual CrlSource Source => m_source;
+
+ public virtual Time ThisUpdate => m_thisUpdate;
+
+ public override Asn1Object ToAsn1Object()
+ {
+ if (m_thisUpdate == null)
+ return new DerSequence(m_source);
+
+ return new DerSequence(m_source, m_thisUpdate);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlStatus.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlStatus.cs.meta
new file mode 100644
index 00000000..d770aa45
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/CrlStatus.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 52cb7b06f5c4825439f29b0bd117df7a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/DhbmParameter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/DhbmParameter.cs
new file mode 100644
index 00000000..7d8bc238
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/DhbmParameter.cs
@@ -0,0 +1,60 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * DHBMParameter ::= SEQUENCE {
+ * owf AlgorithmIdentifier,
+ * -- AlgId for a One-Way Function (SHA-1 recommended)
+ * mac AlgorithmIdentifier
+ * -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
+ * } -- or HMAC [RFC2104, RFC2202])
+ */
+ public class DhbmParameter
+ : Asn1Encodable
+ {
+ public static DhbmParameter GetInstance(object obj)
+ {
+ if (obj is DhbmParameter dhbmParameter)
+ return dhbmParameter;
+
+ if (obj != null)
+ return new DhbmParameter(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly AlgorithmIdentifier m_owf;
+ private readonly AlgorithmIdentifier m_mac;
+
+ private DhbmParameter(Asn1Sequence sequence)
+ {
+ if (sequence.Count != 2)
+ throw new ArgumentException("expecting sequence size of 2");
+
+ m_owf = AlgorithmIdentifier.GetInstance(sequence[0]);
+ m_mac = AlgorithmIdentifier.GetInstance(sequence[1]);
+ }
+
+ public DhbmParameter(AlgorithmIdentifier owf, AlgorithmIdentifier mac)
+ {
+ m_owf = owf;
+ m_mac = mac;
+ }
+
+ public virtual AlgorithmIdentifier Owf => m_owf;
+
+ public virtual AlgorithmIdentifier Mac => m_mac;
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(m_owf, m_mac);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/DhbmParameter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/DhbmParameter.cs.meta
new file mode 100644
index 00000000..fa0c6ac2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/DhbmParameter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 300d96581f173764084a386a2ac53f7d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ErrorMsgContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ErrorMsgContent.cs
new file mode 100644
index 00000000..2864bbe9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ErrorMsgContent.cs
@@ -0,0 +1,99 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ *
+ * ErrorMsgContent ::= SEQUENCE {
+ * pKIStatusInfo PKIStatusInfo,
+ * errorCode INTEGER OPTIONAL,
+ * -- implementation-specific error codes
+ * errorDetails PKIFreeText OPTIONAL
+ * -- implementation-specific error details
+ * }
+ *
+ */
+ public class ErrorMsgContent
+ : Asn1Encodable
+ {
+ public static ErrorMsgContent GetInstance(object obj)
+ {
+ if (obj is ErrorMsgContent errorMsgContent)
+ return errorMsgContent;
+
+ if (obj != null)
+ return new ErrorMsgContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly PkiStatusInfo m_pkiStatusInfo;
+ private readonly DerInteger m_errorCode;
+ private readonly PkiFreeText m_errorDetails;
+
+ private ErrorMsgContent(Asn1Sequence seq)
+ {
+ m_pkiStatusInfo = PkiStatusInfo.GetInstance(seq[0]);
+
+ for (int pos = 1; pos < seq.Count; ++pos)
+ {
+ Asn1Encodable ae = seq[pos];
+ if (ae is DerInteger)
+ {
+ m_errorCode = DerInteger.GetInstance(ae);
+ }
+ else
+ {
+ m_errorDetails = PkiFreeText.GetInstance(ae);
+ }
+ }
+ }
+
+ public ErrorMsgContent(PkiStatusInfo pkiStatusInfo)
+ : this(pkiStatusInfo, null, null)
+ {
+ }
+
+ public ErrorMsgContent(
+ PkiStatusInfo pkiStatusInfo,
+ DerInteger errorCode,
+ PkiFreeText errorDetails)
+ {
+ if (pkiStatusInfo == null)
+ throw new ArgumentNullException(nameof(pkiStatusInfo));
+
+ m_pkiStatusInfo = pkiStatusInfo;
+ m_errorCode = errorCode;
+ m_errorDetails = errorDetails;
+ }
+
+ public virtual PkiStatusInfo PkiStatusInfo => m_pkiStatusInfo;
+
+ public virtual DerInteger ErrorCode => m_errorCode;
+
+ public virtual PkiFreeText ErrorDetails => m_errorDetails;
+
+ /**
+ *
+ * ErrorMsgContent ::= SEQUENCE {
+ * pKIStatusInfo PKIStatusInfo,
+ * errorCode INTEGER OPTIONAL,
+ * -- implementation-specific error codes
+ * errorDetails PKIFreeText OPTIONAL
+ * -- implementation-specific error details
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_pkiStatusInfo);
+ v.AddOptional(m_errorCode, m_errorDetails);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ErrorMsgContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ErrorMsgContent.cs.meta
new file mode 100644
index 00000000..2853c55d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ErrorMsgContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 223c8b85c7e2f3f42b4a5de603d5f19a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs
new file mode 100644
index 00000000..44c034d4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs
@@ -0,0 +1,57 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
+ */
+ public class GenMsgContent
+ : Asn1Encodable
+ {
+ public static GenMsgContent GetInstance(object obj)
+ {
+ if (obj is GenMsgContent genMsgContent)
+ return genMsgContent;
+
+ if (obj != null)
+ return new GenMsgContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1Sequence m_content;
+
+ private GenMsgContent(Asn1Sequence seq)
+ {
+ m_content = seq;
+ }
+
+ public GenMsgContent(InfoTypeAndValue itv)
+ {
+ m_content = new DerSequence(itv);
+ }
+
+ public GenMsgContent(params InfoTypeAndValue[] itvs)
+ {
+ m_content = new DerSequence(itvs);
+ }
+
+ public virtual InfoTypeAndValue[] ToInfoTypeAndValueArray()
+ {
+ return m_content.MapElements(InfoTypeAndValue.GetInstance);
+ }
+
+ /**
+ *
+ * GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs.meta
new file mode 100644
index 00000000..fbe29e11
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenMsgContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: adf9aeef68859ff43965340be1c9a07f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenRepContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenRepContent.cs
new file mode 100644
index 00000000..2aa454f9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenRepContent.cs
@@ -0,0 +1,54 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class GenRepContent
+ : Asn1Encodable
+ {
+ public static GenRepContent GetInstance(object obj)
+ {
+ if (obj is GenRepContent genRepContent)
+ return genRepContent;
+
+ if (obj != null)
+ return new GenRepContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1Sequence m_content;
+
+ private GenRepContent(Asn1Sequence seq)
+ {
+ m_content = seq;
+ }
+
+ public GenRepContent(InfoTypeAndValue itv)
+ {
+ m_content = new DerSequence(itv);
+ }
+
+ public GenRepContent(params InfoTypeAndValue[] itvs)
+ {
+ m_content = new DerSequence(itvs);
+ }
+
+ public virtual InfoTypeAndValue[] ToInfoTypeAndValueArray()
+ {
+ return m_content.MapElements(InfoTypeAndValue.GetInstance);
+ }
+
+ /**
+ *
+ * GenRepContent ::= SEQUENCE OF InfoTypeAndValue
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenRepContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenRepContent.cs.meta
new file mode 100644
index 00000000..9cf854b3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/GenRepContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 35b01055823536940ad781d6f35b3c82
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/InfoTypeAndValue.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/InfoTypeAndValue.cs
new file mode 100644
index 00000000..d724bcd3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/InfoTypeAndValue.cs
@@ -0,0 +1,116 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * Example InfoTypeAndValue contents include, but are not limited
+ * to, the following (un-comment in this ASN.1 module and use as
+ * appropriate for a given environment):
+ *
+ * id-it-caProtEncCert OBJECT IDENTIFIER ::= {id-it 1}
+ * CAProtEncCertValue ::= CMPCertificate
+ * id-it-signKeyPairTypes OBJECT IDENTIFIER ::= {id-it 2}
+ * SignKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ * id-it-encKeyPairTypes OBJECT IDENTIFIER ::= {id-it 3}
+ * EncKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ * id-it-preferredSymmAlg OBJECT IDENTIFIER ::= {id-it 4}
+ * PreferredSymmAlgValue ::= AlgorithmIdentifier
+ * id-it-caKeyUpdateInfo OBJECT IDENTIFIER ::= {id-it 5}
+ * CAKeyUpdateInfoValue ::= CAKeyUpdAnnContent
+ * id-it-currentCRL OBJECT IDENTIFIER ::= {id-it 6}
+ * CurrentCRLValue ::= CertificateList
+ * id-it-unsupportedOIDs OBJECT IDENTIFIER ::= {id-it 7}
+ * UnsupportedOIDsValue ::= SEQUENCE OF OBJECT IDENTIFIER
+ * id-it-keyPairParamReq OBJECT IDENTIFIER ::= {id-it 10}
+ * KeyPairParamReqValue ::= OBJECT IDENTIFIER
+ * id-it-keyPairParamRep OBJECT IDENTIFIER ::= {id-it 11}
+ * KeyPairParamRepValue ::= AlgorithmIdentifer
+ * id-it-revPassphrase OBJECT IDENTIFIER ::= {id-it 12}
+ * RevPassphraseValue ::= EncryptedValue
+ * id-it-implicitConfirm OBJECT IDENTIFIER ::= {id-it 13}
+ * ImplicitConfirmValue ::= NULL
+ * id-it-confirmWaitTime OBJECT IDENTIFIER ::= {id-it 14}
+ * ConfirmWaitTimeValue ::= GeneralizedTime
+ * id-it-origPKIMessage OBJECT IDENTIFIER ::= {id-it 15}
+ * OrigPKIMessageValue ::= PKIMessages
+ * id-it-suppLangTags OBJECT IDENTIFIER ::= {id-it 16}
+ * SuppLangTagsValue ::= SEQUENCE OF UTF8String
+ *
+ * where
+ *
+ * id-pkix OBJECT IDENTIFIER ::= {
+ * iso(1) identified-organization(3)
+ * dod(6) internet(1) security(5) mechanisms(5) pkix(7)}
+ * and
+ * id-it OBJECT IDENTIFIER ::= {id-pkix 4}
+ *
+ */
+ public class InfoTypeAndValue
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier m_infoType;
+ private readonly Asn1Encodable m_infoValue;
+
+ private InfoTypeAndValue(Asn1Sequence seq)
+ {
+ m_infoType = DerObjectIdentifier.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ m_infoValue = seq[1];
+ }
+ }
+
+ public static InfoTypeAndValue GetInstance(object obj)
+ {
+ if (obj is InfoTypeAndValue infoTypeAndValue)
+ return infoTypeAndValue;
+
+ if (obj != null)
+ return new InfoTypeAndValue(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public InfoTypeAndValue(DerObjectIdentifier infoType)
+ : this(infoType, null)
+ {
+ }
+
+ public InfoTypeAndValue(DerObjectIdentifier infoType, Asn1Encodable infoValue)
+ {
+ if (infoType == null)
+ throw new ArgumentNullException(nameof(infoType));
+
+ m_infoType = infoType;
+ m_infoValue = infoValue;
+ }
+
+ public virtual DerObjectIdentifier InfoType => m_infoType;
+
+ public virtual Asn1Encodable InfoValue => m_infoValue;
+
+ /**
+ *
+ * InfoTypeAndValue ::= SEQUENCE {
+ * infoType OBJECT IDENTIFIER,
+ * infoValue ANY DEFINED BY infoType OPTIONAL
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (m_infoValue == null)
+ return new DerSequence(m_infoType);
+
+ return new DerSequence(m_infoType, m_infoValue);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/InfoTypeAndValue.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/InfoTypeAndValue.cs.meta
new file mode 100644
index 00000000..dc92f841
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/InfoTypeAndValue.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8f080219935a78543b30e20caf3e76cf
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/KeyRecRepContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/KeyRecRepContent.cs
new file mode 100644
index 00000000..2475da22
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/KeyRecRepContent.cs
@@ -0,0 +1,95 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class KeyRecRepContent
+ : Asn1Encodable
+ {
+ public static KeyRecRepContent GetInstance(object obj)
+ {
+ if (obj is KeyRecRepContent keyRecRepContent)
+ return keyRecRepContent;
+
+ if (obj != null)
+ return new KeyRecRepContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly PkiStatusInfo m_status;
+ private readonly CmpCertificate m_newSigCert;
+ private readonly Asn1Sequence m_caCerts;
+ private readonly Asn1Sequence m_keyPairHist;
+
+ private KeyRecRepContent(Asn1Sequence seq)
+ {
+ m_status = PkiStatusInfo.GetInstance(seq[0]);
+
+ for (int pos = 1; pos < seq.Count; ++pos)
+ {
+ Asn1TaggedObject tObj = Asn1TaggedObject.GetInstance(seq[pos]);
+
+ switch (tObj.TagNo)
+ {
+ case 0:
+ m_newSigCert = CmpCertificate.GetInstance(tObj.GetObject());
+ break;
+ case 1:
+ m_caCerts = Asn1Sequence.GetInstance(tObj.GetObject());
+ break;
+ case 2:
+ m_keyPairHist = Asn1Sequence.GetInstance(tObj.GetObject());
+ break;
+ default:
+ throw new ArgumentException("unknown tag number: " + tObj.TagNo, "seq");
+ }
+ }
+ }
+
+ public virtual PkiStatusInfo Status => m_status;
+
+ public virtual CmpCertificate NewSigCert => m_newSigCert;
+
+ public virtual CmpCertificate[] GetCACerts()
+ {
+ if (m_caCerts == null)
+ return null;
+
+ return m_caCerts.MapElements(CmpCertificate.GetInstance);
+ }
+
+ public virtual CertifiedKeyPair[] GetKeyPairHist()
+ {
+ if (m_keyPairHist == null)
+ return null;
+
+ return m_keyPairHist.MapElements(CertifiedKeyPair.GetInstance);
+ }
+
+ /**
+ *
+ * KeyRecRepContent ::= SEQUENCE {
+ * status PKIStatusInfo,
+ * newSigCert [0] CMPCertificate OPTIONAL,
+ * caCerts [1] SEQUENCE SIZE (1..MAX) OF
+ * CMPCertificate OPTIONAL,
+ * keyPairHist [2] SEQUENCE SIZE (1..MAX) OF
+ * CertifiedKeyPair OPTIONAL
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_status);
+ v.AddOptionalTagged(true, 0, m_newSigCert);
+ v.AddOptionalTagged(true, 1, m_caCerts);
+ v.AddOptionalTagged(true, 2, m_keyPairHist);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/KeyRecRepContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/KeyRecRepContent.cs.meta
new file mode 100644
index 00000000..3858d042
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/KeyRecRepContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 25d6550531e2d484dabf2a4845730218
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/NestedMessageContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/NestedMessageContent.cs
new file mode 100644
index 00000000..e47ffda0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/NestedMessageContent.cs
@@ -0,0 +1,39 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * NestedMessageContent ::= PKIMessages
+ */
+ public class NestedMessageContent
+ : PkiMessages
+ {
+ public static new NestedMessageContent GetInstance(object obj)
+ {
+ if (obj is NestedMessageContent nestedMessageContent)
+ return nestedMessageContent;
+
+ if (obj != null)
+ return new NestedMessageContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public NestedMessageContent(PkiMessage msg)
+ : base(msg)
+ {
+ }
+
+ public NestedMessageContent(PkiMessage[] msgs)
+ : base(msgs)
+ {
+ }
+
+ public NestedMessageContent(Asn1Sequence seq)
+ : base(seq)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/NestedMessageContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/NestedMessageContent.cs.meta
new file mode 100644
index 00000000..036461fa
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/NestedMessageContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 836d63ef9195b904787d4f0125ddbcea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCert.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCert.cs
new file mode 100644
index 00000000..91f7c743
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCert.cs
@@ -0,0 +1,72 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * OOBCert ::= CMPCertificate
+ */
+ public class OobCert
+ : CmpCertificate
+ {
+ public static new OobCert GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is OobCert oobCert)
+ return oobCert;
+
+ if (obj is CmpCertificate cmpCertificate)
+ return GetInstance(cmpCertificate.GetEncoded());
+
+ if (obj is byte[] bs)
+ {
+ try
+ {
+ obj = Asn1Object.FromByteArray(bs);
+ }
+ catch (IOException)
+ {
+ throw new ArgumentException("Invalid encoding in OobCert");
+ }
+ }
+
+ if (obj is Asn1Sequence seq)
+ return new OobCert(X509CertificateStructure.GetInstance(obj));
+
+ if (obj is Asn1TaggedObject taggedObject)
+ return new OobCert(taggedObject.TagNo, taggedObject.GetObject());
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ public static new OobCert GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ if (taggedObject == null)
+ return null;
+
+ if (!declaredExplicit)
+ throw new ArgumentException("tag must be explicit");
+
+ return GetInstance(taggedObject.GetObject());
+ }
+
+ public OobCert(int type, Asn1Encodable otherCert)
+ : base(type, otherCert)
+ {
+ }
+
+ public OobCert(X509CertificateStructure x509v3PKCert)
+ : base(x509v3PKCert)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCert.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCert.cs.meta
new file mode 100644
index 00000000..53f4a5a0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCert.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: eb775e2d7757c7c47b194f7d6fcd200d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCertHash.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCertHash.cs
new file mode 100644
index 00000000..63c4246d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCertHash.cs
@@ -0,0 +1,90 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ *
+ * OOBCertHash ::= SEQUENCE {
+ * hashAlg [0] AlgorithmIdentifier OPTIONAL,
+ * certId [1] CertId OPTIONAL,
+ * hashVal BIT STRING
+ * -- hashVal is calculated over the DER encoding of the
+ * -- self-signed certificate with the identifier certID.
+ * }
+ *
+ */
+ public class OobCertHash
+ : Asn1Encodable
+ {
+ public static OobCertHash GetInstance(object obj)
+ {
+ if (obj is OobCertHash oobCertHash)
+ return oobCertHash;
+
+ if (obj != null)
+ return new OobCertHash(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly AlgorithmIdentifier m_hashAlg;
+ private readonly CertId m_certId;
+ private readonly DerBitString m_hashVal;
+
+ private OobCertHash(Asn1Sequence seq)
+ {
+ int index = seq.Count - 1;
+
+ m_hashVal = DerBitString.GetInstance(seq[index--]);
+
+ for (int i = index; i >= 0; i--)
+ {
+ Asn1TaggedObject tObj = (Asn1TaggedObject)seq[i];
+
+ if (tObj.TagNo == 0)
+ {
+ m_hashAlg = AlgorithmIdentifier.GetInstance(tObj, true);
+ }
+ else
+ {
+ m_certId = CertId.GetInstance(tObj, true);
+ }
+ }
+ }
+
+ public virtual CertId CertID => m_certId;
+
+ public virtual AlgorithmIdentifier HashAlg => m_hashAlg;
+
+ public virtual DerBitString HashVal => m_hashVal;
+
+ /**
+ *
+ * OobCertHash ::= SEQUENCE {
+ * hashAlg [0] AlgorithmIdentifier OPTIONAL,
+ * certId [1] CertId OPTIONAL,
+ * hashVal BIT STRING
+ * -- hashVal is calculated over the Der encoding of the
+ * -- self-signed certificate with the identifier certID.
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, m_hashAlg);
+ v.AddOptionalTagged(true, 1, m_certId);
+ v.Add(m_hashVal);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCertHash.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCertHash.cs.meta
new file mode 100644
index 00000000..5b7cc829
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/OobCertHash.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0f791678c53a2bf49a7b8095bd8739d4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIBody.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIBody.cs
new file mode 100644
index 00000000..34e366c0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIBody.cs
@@ -0,0 +1,215 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * PKIBody ::= CHOICE { -- message-specific body elements
+ * ir [0] CertReqMessages, --Initialization Request
+ * ip [1] CertRepMessage, --Initialization Response
+ * cr [2] CertReqMessages, --Certification Request
+ * cp [3] CertRepMessage, --Certification Response
+ * p10cr [4] CertificationRequest, --imported from [PKCS10]
+ * popdecc [5] POPODecKeyChallContent, --pop Challenge
+ * popdecr [6] POPODecKeyRespContent, --pop Response
+ * kur [7] CertReqMessages, --Key Update Request
+ * kup [8] CertRepMessage, --Key Update Response
+ * krr [9] CertReqMessages, --Key Recovery Request
+ * krp [10] KeyRecRepContent, --Key Recovery Response
+ * rr [11] RevReqContent, --Revocation Request
+ * rp [12] RevRepContent, --Revocation Response
+ * ccr [13] CertReqMessages, --Cross-Cert. Request
+ * ccp [14] CertRepMessage, --Cross-Cert. Response
+ * ckuann [15] CAKeyUpdAnnContent, --CA Key Update Ann.
+ * cann [16] CertAnnContent, --Certificate Ann.
+ * rann [17] RevAnnContent, --Revocation Ann.
+ * crlann [18] CRLAnnContent, --CRL Announcement
+ * pkiconf [19] PKIConfirmContent, --Confirmation
+ * nested [20] NestedMessageContent, --Nested Message
+ * genm [21] GenMsgContent, --General Message
+ * genp [22] GenRepContent, --General Response
+ * error [23] ErrorMsgContent, --Error Message
+ * certConf [24] CertConfirmContent, --Certificate confirm
+ * pollReq [25] PollReqContent, --Polling request
+ * pollRep [26] PollRepContent --Polling response
+ * }
+ */
+ public class PkiBody
+ : Asn1Encodable, IAsn1Choice
+ {
+ public const int TYPE_INIT_REQ = 0;
+ public const int TYPE_INIT_REP = 1;
+ public const int TYPE_CERT_REQ = 2;
+ public const int TYPE_CERT_REP = 3;
+ public const int TYPE_P10_CERT_REQ = 4;
+ public const int TYPE_POPO_CHALL = 5;
+ public const int TYPE_POPO_REP = 6;
+ public const int TYPE_KEY_UPDATE_REQ = 7;
+ public const int TYPE_KEY_UPDATE_REP = 8;
+ public const int TYPE_KEY_RECOVERY_REQ = 9;
+ public const int TYPE_KEY_RECOVERY_REP = 10;
+ public const int TYPE_REVOCATION_REQ = 11;
+ public const int TYPE_REVOCATION_REP = 12;
+ public const int TYPE_CROSS_CERT_REQ = 13;
+ public const int TYPE_CROSS_CERT_REP = 14;
+ public const int TYPE_CA_KEY_UPDATE_ANN = 15;
+ public const int TYPE_CERT_ANN = 16;
+ public const int TYPE_REVOCATION_ANN = 17;
+ public const int TYPE_CRL_ANN = 18;
+ public const int TYPE_CONFIRM = 19;
+ public const int TYPE_NESTED = 20;
+ public const int TYPE_GEN_MSG = 21;
+ public const int TYPE_GEN_REP = 22;
+ public const int TYPE_ERROR = 23;
+ public const int TYPE_CERT_CONFIRM = 24;
+ public const int TYPE_POLL_REQ = 25;
+ public const int TYPE_POLL_REP = 26;
+
+ public static PkiBody GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is PkiBody pkiBody)
+ return pkiBody;
+
+ if (obj is Asn1TaggedObject taggedObject)
+ return new PkiBody(taggedObject);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ private readonly int m_tagNo;
+ private readonly Asn1Encodable m_body;
+
+ private PkiBody(Asn1TaggedObject taggedObject)
+ {
+ m_tagNo = taggedObject.TagNo;
+ m_body = GetBodyForType(m_tagNo, taggedObject.GetObject());
+ }
+
+ /**
+ * Creates a new PkiBody.
+ * @param type one of the TYPE_* constants
+ * @param content message content
+ */
+ public PkiBody(int type, Asn1Encodable content)
+ {
+ m_tagNo = type;
+ m_body = GetBodyForType(type, content);
+ }
+
+ private static Asn1Encodable GetBodyForType(int type, Asn1Encodable o)
+ {
+ switch (type)
+ {
+ case TYPE_INIT_REQ:
+ return CertReqMessages.GetInstance(o);
+ case TYPE_INIT_REP:
+ return CertRepMessage.GetInstance(o);
+ case TYPE_CERT_REQ:
+ return CertReqMessages.GetInstance(o);
+ case TYPE_CERT_REP:
+ return CertRepMessage.GetInstance(o);
+ case TYPE_P10_CERT_REQ:
+ return CertificationRequest.GetInstance(o);
+ case TYPE_POPO_CHALL:
+ return PopoDecKeyChallContent.GetInstance(o);
+ case TYPE_POPO_REP:
+ return PopoDecKeyRespContent.GetInstance(o);
+ case TYPE_KEY_UPDATE_REQ:
+ return CertReqMessages.GetInstance(o);
+ case TYPE_KEY_UPDATE_REP:
+ return CertRepMessage.GetInstance(o);
+ case TYPE_KEY_RECOVERY_REQ:
+ return CertReqMessages.GetInstance(o);
+ case TYPE_KEY_RECOVERY_REP:
+ return KeyRecRepContent.GetInstance(o);
+ case TYPE_REVOCATION_REQ:
+ return RevReqContent.GetInstance(o);
+ case TYPE_REVOCATION_REP:
+ return RevRepContent.GetInstance(o);
+ case TYPE_CROSS_CERT_REQ:
+ return CertReqMessages.GetInstance(o);
+ case TYPE_CROSS_CERT_REP:
+ return CertRepMessage.GetInstance(o);
+ case TYPE_CA_KEY_UPDATE_ANN:
+ return CAKeyUpdAnnContent.GetInstance(o);
+ case TYPE_CERT_ANN:
+ return CmpCertificate.GetInstance(o);
+ case TYPE_REVOCATION_ANN:
+ return RevAnnContent.GetInstance(o);
+ case TYPE_CRL_ANN:
+ return CrlAnnContent.GetInstance(o);
+ case TYPE_CONFIRM:
+ return PkiConfirmContent.GetInstance(o);
+ case TYPE_NESTED:
+ return PkiMessages.GetInstance(o);
+ case TYPE_GEN_MSG:
+ return GenMsgContent.GetInstance(o);
+ case TYPE_GEN_REP:
+ return GenRepContent.GetInstance(o);
+ case TYPE_ERROR:
+ return ErrorMsgContent.GetInstance(o);
+ case TYPE_CERT_CONFIRM:
+ return CertConfirmContent.GetInstance(o);
+ case TYPE_POLL_REQ:
+ return PollReqContent.GetInstance(o);
+ case TYPE_POLL_REP:
+ return PollRepContent.GetInstance(o);
+ default:
+ throw new ArgumentException("unknown tag number: " + type, nameof(type));
+ }
+ }
+
+ public virtual Asn1Encodable Content => m_body;
+
+ public virtual int Type => m_tagNo;
+
+ /**
+ *
+ * PkiBody ::= CHOICE { -- message-specific body elements
+ * ir [0] CertReqMessages, --Initialization Request
+ * ip [1] CertRepMessage, --Initialization Response
+ * cr [2] CertReqMessages, --Certification Request
+ * cp [3] CertRepMessage, --Certification Response
+ * p10cr [4] CertificationRequest, --imported from [PKCS10]
+ * popdecc [5] POPODecKeyChallContent, --pop Challenge
+ * popdecr [6] POPODecKeyRespContent, --pop Response
+ * kur [7] CertReqMessages, --Key Update Request
+ * kup [8] CertRepMessage, --Key Update Response
+ * krr [9] CertReqMessages, --Key Recovery Request
+ * krp [10] KeyRecRepContent, --Key Recovery Response
+ * rr [11] RevReqContent, --Revocation Request
+ * rp [12] RevRepContent, --Revocation Response
+ * ccr [13] CertReqMessages, --Cross-Cert. Request
+ * ccp [14] CertRepMessage, --Cross-Cert. Response
+ * ckuann [15] CAKeyUpdAnnContent, --CA Key Update Ann.
+ * cann [16] CertAnnContent, --Certificate Ann.
+ * rann [17] RevAnnContent, --Revocation Ann.
+ * crlann [18] CRLAnnContent, --CRL Announcement
+ * pkiconf [19] PKIConfirmContent, --Confirmation
+ * nested [20] NestedMessageContent, --Nested Message
+ * genm [21] GenMsgContent, --General Message
+ * genp [22] GenRepContent, --General Response
+ * error [23] ErrorMsgContent, --Error Message
+ * certConf [24] CertConfirmContent, --Certificate confirm
+ * pollReq [25] PollReqContent, --Polling request
+ * pollRep [26] PollRepContent --Polling response
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerTaggedObject(true, m_tagNo, m_body);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIBody.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIBody.cs.meta
new file mode 100644
index 00000000..29ed36f5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIBody.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 100678a52df8fee4aa9e190c3548f1e6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIConfirmContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIConfirmContent.cs
new file mode 100644
index 00000000..50b835d2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIConfirmContent.cs
@@ -0,0 +1,54 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * PKIConfirmContent ::= NULL
+ */
+ public class PkiConfirmContent
+ : Asn1Encodable
+ {
+ public static PkiConfirmContent GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is PkiConfirmContent pkiConfirmContent)
+ return pkiConfirmContent;
+
+ if (obj is Asn1Null asn1Null)
+ return new PkiConfirmContent(asn1Null);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ private readonly Asn1Null m_val;
+
+ public PkiConfirmContent()
+ : this(DerNull.Instance)
+ {
+ }
+
+ private PkiConfirmContent(Asn1Null val)
+ {
+ m_val = val;
+ }
+
+ /**
+ *
+ * PkiConfirmContent ::= NULL
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_val;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIConfirmContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIConfirmContent.cs.meta
new file mode 100644
index 00000000..56754aeb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIConfirmContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ba8173b7bd86d5f4c85e84ad002431b7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFailureInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFailureInfo.cs
new file mode 100644
index 00000000..af8051e2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFailureInfo.cs
@@ -0,0 +1,100 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ *
+ * PKIFailureInfo ::= BIT STRING {
+ * badAlg (0),
+ * -- unrecognized or unsupported Algorithm Identifier
+ * badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ * badRequest (2),
+ * -- transaction not permitted or supported
+ * badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ * badCertId (4), -- no certificate could be found matching the provided criteria
+ * badDataFormat (5),
+ * -- the data submitted has the wrong format
+ * wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ * incorrectData (7), -- the requester's data is incorrect (for notary services)
+ * missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ * badPOP (9) -- the proof-of-possession failed
+ * certRevoked (10),
+ * certConfirmed (11),
+ * wrongIntegrity (12),
+ * badRecipientNonce (13),
+ * timeNotAvailable (14),
+ * -- the TSA's time source is not available
+ * unacceptedPolicy (15),
+ * -- the requested TSA policy is not supported by the TSA
+ * unacceptedExtension (16),
+ * -- the requested extension is not supported by the TSA
+ * addInfoNotAvailable (17)
+ * -- the additional information requested could not be understood
+ * -- or is not available
+ * badSenderNonce (18),
+ * badCertTemplate (19),
+ * signerNotTrusted (20),
+ * transactionIdInUse (21),
+ * unsupportedVersion (22),
+ * notAuthorized (23),
+ * systemUnavail (24),
+ * systemFailure (25),
+ * -- the request cannot be handled due to system failure
+ * duplicateCertReq (26)
+ *
+ */
+ public class PkiFailureInfo
+ : DerBitString
+ {
+ public const int BadAlg = (1 << 7); // unrecognized or unsupported Algorithm Identifier
+ public const int BadMessageCheck = (1 << 6); // integrity check failed (e.g., signature did not verify)
+ public const int BadRequest = (1 << 5);
+ public const int BadTime = (1 << 4); // -- messageTime was not sufficiently close to the system time, as defined by local policy
+ public const int BadCertId = (1 << 3); // no certificate could be found matching the provided criteria
+ public const int BadDataFormat = (1 << 2);
+ public const int WrongAuthority = (1 << 1); // the authority indicated in the request is different from the one creating the response token
+ public const int IncorrectData = 1; // the requester's data is incorrect (for notary services)
+ public const int MissingTimeStamp = (1 << 15); // when the timestamp is missing but should be there (by policy)
+ public const int BadPop = (1 << 14); // the proof-of-possession failed
+ public const int CertRevoked = (1 << 13);
+ public const int CertConfirmed = (1 << 12);
+ public const int WrongIntegrity = (1 << 11);
+ public const int BadRecipientNonce = (1 << 10);
+ public const int TimeNotAvailable = (1 << 9); // the TSA's time source is not available
+ public const int UnacceptedPolicy = (1 << 8); // the requested TSA policy is not supported by the TSA
+ public const int UnacceptedExtension = (1 << 23); //the requested extension is not supported by the TSA
+ public const int AddInfoNotAvailable = (1 << 22); //the additional information requested could not be understood or is not available
+ public const int BadSenderNonce = (1 << 21);
+ public const int BadCertTemplate = (1 << 20);
+ public const int SignerNotTrusted = (1 << 19);
+ public const int TransactionIdInUse = (1 << 18);
+ public const int UnsupportedVersion = (1 << 17);
+ public const int NotAuthorized = (1 << 16);
+ public const int SystemUnavail = (1 << 31);
+ public const int SystemFailure = (1 << 30); //the request cannot be handled due to system failure
+ public const int DuplicateCertReq = (1 << 29);
+
+ /**
+ * Basic constructor.
+ */
+ public PkiFailureInfo(int info)
+ : base(info)
+ {
+ }
+
+ public PkiFailureInfo(
+ DerBitString info)
+ : base(info.GetBytes(), info.PadBits)
+ {
+ }
+
+ public override string ToString()
+ {
+ return "PkiFailureInfo: 0x" + this.IntValue.ToString("X");
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFailureInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFailureInfo.cs.meta
new file mode 100644
index 00000000..3dda69bc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFailureInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ad154923d7ccf2747bc9b2de360c755e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFreeText.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFreeText.cs
new file mode 100644
index 00000000..cfffd592
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFreeText.cs
@@ -0,0 +1,89 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class PkiFreeText
+ : Asn1Encodable
+ {
+ public static PkiFreeText GetInstance(object obj)
+ {
+ if (obj is PkiFreeText pkiFreeText)
+ return pkiFreeText;
+
+ if (obj != null)
+ return new PkiFreeText(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public static PkiFreeText GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
+ }
+
+ internal Asn1Sequence m_strings;
+
+ internal PkiFreeText(Asn1Sequence seq)
+ {
+ foreach (var element in seq)
+ {
+ if (!(element is DerUtf8String))
+ throw new ArgumentException("attempt to insert non UTF8 STRING into PkiFreeText");
+ }
+
+ m_strings = seq;
+ }
+
+ public PkiFreeText(DerUtf8String p)
+ {
+ m_strings = new DerSequence(p);
+ }
+
+ public PkiFreeText(string p)
+ : this(new DerUtf8String(p))
+ {
+ }
+
+ public PkiFreeText(DerUtf8String[] strs)
+ {
+ m_strings = new DerSequence(strs);
+ }
+
+ public PkiFreeText(string[] strs)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(strs.Length);
+ for (int i = 0; i < strs.Length; i++)
+ {
+ v.Add(new DerUtf8String(strs[i]));
+ }
+ m_strings = new DerSequence(v);
+ }
+
+ public virtual int Count => m_strings.Count;
+
+ /**
+ * Return the UTF8STRING at index.
+ *
+ * @param index index of the string of interest
+ * @return the string at index.
+ */
+ public DerUtf8String this[int index]
+ {
+ get { return (DerUtf8String)m_strings[index]; }
+ }
+
+ /**
+ *
+ * PkiFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_strings;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFreeText.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFreeText.cs.meta
new file mode 100644
index 00000000..4a7d52b5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIFreeText.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e77f847664938404cbf3fd462c2af358
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeader.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeader.cs
new file mode 100644
index 00000000..9765032a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeader.cs
@@ -0,0 +1,232 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class PkiHeader
+ : Asn1Encodable
+ {
+ /**
+ * Value for a "null" recipient or sender.
+ */
+ public static readonly GeneralName NULL_NAME = new GeneralName(X509Name.GetInstance(new DerSequence()));
+
+ public static readonly int CMP_1999 = 1;
+ public static readonly int CMP_2000 = 2;
+
+ private readonly DerInteger pvno;
+ private readonly GeneralName sender;
+ private readonly GeneralName recipient;
+ private readonly Asn1GeneralizedTime messageTime;
+ private readonly AlgorithmIdentifier protectionAlg;
+ private readonly Asn1OctetString senderKID; // KeyIdentifier
+ private readonly Asn1OctetString recipKID; // KeyIdentifier
+ private readonly Asn1OctetString transactionID;
+ private readonly Asn1OctetString senderNonce;
+ private readonly Asn1OctetString recipNonce;
+ private readonly PkiFreeText freeText;
+ private readonly Asn1Sequence generalInfo;
+
+ private PkiHeader(Asn1Sequence seq)
+ {
+ pvno = DerInteger.GetInstance(seq[0]);
+ sender = GeneralName.GetInstance(seq[1]);
+ recipient = GeneralName.GetInstance(seq[2]);
+
+ for (int pos = 3; pos < seq.Count; ++pos)
+ {
+ Asn1TaggedObject tObj = (Asn1TaggedObject)seq[pos];
+
+ switch (tObj.TagNo)
+ {
+ case 0:
+ messageTime = Asn1GeneralizedTime.GetInstance(tObj, true);
+ break;
+ case 1:
+ protectionAlg = AlgorithmIdentifier.GetInstance(tObj, true);
+ break;
+ case 2:
+ senderKID = Asn1OctetString.GetInstance(tObj, true);
+ break;
+ case 3:
+ recipKID = Asn1OctetString.GetInstance(tObj, true);
+ break;
+ case 4:
+ transactionID = Asn1OctetString.GetInstance(tObj, true);
+ break;
+ case 5:
+ senderNonce = Asn1OctetString.GetInstance(tObj, true);
+ break;
+ case 6:
+ recipNonce = Asn1OctetString.GetInstance(tObj, true);
+ break;
+ case 7:
+ freeText = PkiFreeText.GetInstance(tObj, true);
+ break;
+ case 8:
+ generalInfo = Asn1Sequence.GetInstance(tObj, true);
+ break;
+ default:
+ throw new ArgumentException("unknown tag number: " + tObj.TagNo, nameof(seq));
+ }
+ }
+ }
+
+ public static PkiHeader GetInstance(object obj)
+ {
+ if (obj is PkiHeader)
+ return (PkiHeader)obj;
+
+ if (obj is Asn1Sequence)
+ return new PkiHeader((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public PkiHeader(
+ int pvno,
+ GeneralName sender,
+ GeneralName recipient)
+ : this(new DerInteger(pvno), sender, recipient)
+ {
+ }
+
+ private PkiHeader(
+ DerInteger pvno,
+ GeneralName sender,
+ GeneralName recipient)
+ {
+ this.pvno = pvno;
+ this.sender = sender;
+ this.recipient = recipient;
+ }
+
+ public virtual DerInteger Pvno
+ {
+ get { return pvno; }
+ }
+
+ public virtual GeneralName Sender
+ {
+ get { return sender; }
+ }
+
+ public virtual GeneralName Recipient
+ {
+ get { return recipient; }
+ }
+
+ public virtual Asn1GeneralizedTime MessageTime
+ {
+ get { return messageTime; }
+ }
+
+ public virtual AlgorithmIdentifier ProtectionAlg
+ {
+ get { return protectionAlg; }
+ }
+
+ public virtual Asn1OctetString SenderKID
+ {
+ get { return senderKID; }
+ }
+
+ public virtual Asn1OctetString RecipKID
+ {
+ get { return recipKID; }
+ }
+
+ public virtual Asn1OctetString TransactionID
+ {
+ get { return transactionID; }
+ }
+
+ public virtual Asn1OctetString SenderNonce
+ {
+ get { return senderNonce; }
+ }
+
+ public virtual Asn1OctetString RecipNonce
+ {
+ get { return recipNonce; }
+ }
+
+ public virtual PkiFreeText FreeText
+ {
+ get { return freeText; }
+ }
+
+ public virtual InfoTypeAndValue[] GetGeneralInfo()
+ {
+ if (generalInfo == null)
+ {
+ return null;
+ }
+ InfoTypeAndValue[] results = new InfoTypeAndValue[generalInfo.Count];
+ for (int i = 0; i < results.Length; i++)
+ {
+ results[i] = InfoTypeAndValue.GetInstance(generalInfo[i]);
+ }
+ return results;
+ }
+
+ /**
+ *
+ * PkiHeader ::= SEQUENCE {
+ * pvno INTEGER { cmp1999(1), cmp2000(2) },
+ * sender GeneralName,
+ * -- identifies the sender
+ * recipient GeneralName,
+ * -- identifies the intended recipient
+ * messageTime [0] GeneralizedTime OPTIONAL,
+ * -- time of production of this message (used when sender
+ * -- believes that the transport will be "suitable"; i.e.,
+ * -- that the time will still be meaningful upon receipt)
+ * protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ * -- algorithm used for calculation of protection bits
+ * senderKID [2] KeyIdentifier OPTIONAL,
+ * recipKID [3] KeyIdentifier OPTIONAL,
+ * -- to identify specific keys used for protection
+ * transactionID [4] OCTET STRING OPTIONAL,
+ * -- identifies the transaction; i.e., this will be the same in
+ * -- corresponding request, response, certConf, and PKIConf
+ * -- messages
+ * senderNonce [5] OCTET STRING OPTIONAL,
+ * recipNonce [6] OCTET STRING OPTIONAL,
+ * -- nonces used to provide replay protection, senderNonce
+ * -- is inserted by the creator of this message; recipNonce
+ * -- is a nonce previously inserted in a related message by
+ * -- the intended recipient of this message
+ * freeText [7] PKIFreeText OPTIONAL,
+ * -- this may be used to indicate context-specific instructions
+ * -- (this field is intended for human consumption)
+ * generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ * InfoTypeAndValue OPTIONAL
+ * -- this may be used to convey context-specific information
+ * -- (this field not primarily intended for human consumption)
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(pvno, sender, recipient);
+ v.AddOptionalTagged(true, 0, messageTime);
+ v.AddOptionalTagged(true, 1, protectionAlg);
+ v.AddOptionalTagged(true, 2, senderKID);
+ v.AddOptionalTagged(true, 3, recipKID);
+ v.AddOptionalTagged(true, 4, transactionID);
+ v.AddOptionalTagged(true, 5, senderNonce);
+ v.AddOptionalTagged(true, 6, recipNonce);
+ v.AddOptionalTagged(true, 7, freeText);
+ v.AddOptionalTagged(true, 8, generalInfo);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeader.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeader.cs.meta
new file mode 100644
index 00000000..9b19fac0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeader.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9077f3c98ec2b1a49b9754bd175a9c4d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeaderBuilder.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeaderBuilder.cs
new file mode 100644
index 00000000..c54b3e67
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeaderBuilder.cs
@@ -0,0 +1,227 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class PkiHeaderBuilder
+ {
+ private DerInteger pvno;
+ private GeneralName sender;
+ private GeneralName recipient;
+ private Asn1GeneralizedTime messageTime;
+ private AlgorithmIdentifier protectionAlg;
+ private Asn1OctetString senderKID; // KeyIdentifier
+ private Asn1OctetString recipKID; // KeyIdentifier
+ private Asn1OctetString transactionID;
+ private Asn1OctetString senderNonce;
+ private Asn1OctetString recipNonce;
+ private PkiFreeText freeText;
+ private Asn1Sequence generalInfo;
+
+ public PkiHeaderBuilder(
+ int pvno,
+ GeneralName sender,
+ GeneralName recipient)
+ : this(new DerInteger(pvno), sender, recipient)
+ {
+ }
+
+ private PkiHeaderBuilder(
+ DerInteger pvno,
+ GeneralName sender,
+ GeneralName recipient)
+ {
+ this.pvno = pvno;
+ this.sender = sender;
+ this.recipient = recipient;
+ }
+
+ public virtual PkiHeaderBuilder SetMessageTime(Asn1GeneralizedTime time)
+ {
+ messageTime = time;
+ return this;
+ }
+
+ public virtual PkiHeaderBuilder SetProtectionAlg(AlgorithmIdentifier aid)
+ {
+ protectionAlg = aid;
+ return this;
+ }
+
+ public virtual PkiHeaderBuilder SetSenderKID(byte[] kid)
+ {
+ return SetSenderKID(kid == null ? null : new DerOctetString(kid));
+ }
+
+ public virtual PkiHeaderBuilder SetSenderKID(Asn1OctetString kid)
+ {
+ senderKID = kid;
+ return this;
+ }
+
+ public virtual PkiHeaderBuilder SetRecipKID(byte[] kid)
+ {
+ return SetRecipKID(kid == null ? null : new DerOctetString(kid));
+ }
+
+ public virtual PkiHeaderBuilder SetRecipKID(Asn1OctetString kid)
+ {
+ recipKID = kid;
+ return this;
+ }
+
+ public virtual PkiHeaderBuilder SetTransactionID(byte[] tid)
+ {
+ return SetTransactionID(tid == null ? null : new DerOctetString(tid));
+ }
+
+ public virtual PkiHeaderBuilder SetTransactionID(Asn1OctetString tid)
+ {
+ transactionID = tid;
+ return this;
+ }
+
+ public virtual PkiHeaderBuilder SetSenderNonce(byte[] nonce)
+ {
+ return SetSenderNonce(nonce == null ? null : new DerOctetString(nonce));
+ }
+
+ public virtual PkiHeaderBuilder SetSenderNonce(Asn1OctetString nonce)
+ {
+ senderNonce = nonce;
+ return this;
+ }
+
+ public virtual PkiHeaderBuilder SetRecipNonce(byte[] nonce)
+ {
+ return SetRecipNonce(nonce == null ? null : new DerOctetString(nonce));
+ }
+
+ public virtual PkiHeaderBuilder SetRecipNonce(Asn1OctetString nonce)
+ {
+ recipNonce = nonce;
+ return this;
+ }
+
+ public virtual PkiHeaderBuilder SetFreeText(PkiFreeText text)
+ {
+ freeText = text;
+ return this;
+ }
+
+ public virtual PkiHeaderBuilder SetGeneralInfo(InfoTypeAndValue genInfo)
+ {
+ return SetGeneralInfo(MakeGeneralInfoSeq(genInfo));
+ }
+
+ public virtual PkiHeaderBuilder SetGeneralInfo(InfoTypeAndValue[] genInfos)
+ {
+ return SetGeneralInfo(MakeGeneralInfoSeq(genInfos));
+ }
+
+ public virtual PkiHeaderBuilder SetGeneralInfo(Asn1Sequence seqOfInfoTypeAndValue)
+ {
+ generalInfo = seqOfInfoTypeAndValue;
+ return this;
+ }
+
+ private static Asn1Sequence MakeGeneralInfoSeq(
+ InfoTypeAndValue generalInfo)
+ {
+ return new DerSequence(generalInfo);
+ }
+
+ private static Asn1Sequence MakeGeneralInfoSeq(
+ InfoTypeAndValue[] generalInfos)
+ {
+ Asn1Sequence genInfoSeq = null;
+ if (generalInfos != null)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ for (int i = 0; i < generalInfos.Length; ++i)
+ {
+ v.Add(generalInfos[i]);
+ }
+ genInfoSeq = new DerSequence(v);
+ }
+ return genInfoSeq;
+ }
+
+ /**
+ *
+ * PKIHeader ::= SEQUENCE {
+ * pvno INTEGER { cmp1999(1), cmp2000(2) },
+ * sender GeneralName,
+ * -- identifies the sender
+ * recipient GeneralName,
+ * -- identifies the intended recipient
+ * messageTime [0] GeneralizedTime OPTIONAL,
+ * -- time of production of this message (used when sender
+ * -- believes that the transport will be "suitable"; i.e.,
+ * -- that the time will still be meaningful upon receipt)
+ * protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ * -- algorithm used for calculation of protection bits
+ * senderKID [2] KeyIdentifier OPTIONAL,
+ * recipKID [3] KeyIdentifier OPTIONAL,
+ * -- to identify specific keys used for protection
+ * transactionID [4] OCTET STRING OPTIONAL,
+ * -- identifies the transaction; i.e., this will be the same in
+ * -- corresponding request, response, certConf, and PKIConf
+ * -- messages
+ * senderNonce [5] OCTET STRING OPTIONAL,
+ * recipNonce [6] OCTET STRING OPTIONAL,
+ * -- nonces used to provide replay protection, senderNonce
+ * -- is inserted by the creator of this message; recipNonce
+ * -- is a nonce previously inserted in a related message by
+ * -- the intended recipient of this message
+ * freeText [7] PKIFreeText OPTIONAL,
+ * -- this may be used to indicate context-specific instructions
+ * -- (this field is intended for human consumption)
+ * generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ * InfoTypeAndValue OPTIONAL
+ * -- this may be used to convey context-specific information
+ * -- (this field not primarily intended for human consumption)
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public virtual PkiHeader Build()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(pvno, sender, recipient);
+ AddOptional(v, 0, messageTime);
+ AddOptional(v, 1, protectionAlg);
+ AddOptional(v, 2, senderKID);
+ AddOptional(v, 3, recipKID);
+ AddOptional(v, 4, transactionID);
+ AddOptional(v, 5, senderNonce);
+ AddOptional(v, 6, recipNonce);
+ AddOptional(v, 7, freeText);
+ AddOptional(v, 8, generalInfo);
+
+ messageTime = null;
+ protectionAlg = null;
+ senderKID = null;
+ recipKID = null;
+ transactionID = null;
+ senderNonce = null;
+ recipNonce = null;
+ freeText = null;
+ generalInfo = null;
+
+ return PkiHeader.GetInstance(new DerSequence(v));
+ }
+
+ private void AddOptional(Asn1EncodableVector v, int tagNo, Asn1Encodable obj)
+ {
+ if (obj != null)
+ {
+ v.Add(new DerTaggedObject(true, tagNo, obj));
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeaderBuilder.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeaderBuilder.cs.meta
new file mode 100644
index 00000000..c13277fc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIHeaderBuilder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a85274fc962a4eb40b0193f5d7ff5ccb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessage.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessage.cs
new file mode 100644
index 00000000..ae3ac38e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessage.cs
@@ -0,0 +1,134 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class PkiMessage
+ : Asn1Encodable
+ {
+ private readonly PkiHeader header;
+ private readonly PkiBody body;
+ private readonly DerBitString protection;
+ private readonly Asn1Sequence extraCerts;
+
+ private PkiMessage(Asn1Sequence seq)
+ {
+ header = PkiHeader.GetInstance(seq[0]);
+ body = PkiBody.GetInstance(seq[1]);
+
+ for (int pos = 2; pos < seq.Count; ++pos)
+ {
+ Asn1TaggedObject tObj = (Asn1TaggedObject)seq[pos].ToAsn1Object();
+
+ if (tObj.TagNo == 0)
+ {
+ protection = DerBitString.GetInstance(tObj, true);
+ }
+ else
+ {
+ extraCerts = Asn1Sequence.GetInstance(tObj, true);
+ }
+ }
+ }
+
+ public static PkiMessage GetInstance(object obj)
+ {
+ if (obj is PkiMessage)
+ return (PkiMessage)obj;
+
+ if (obj != null)
+ return new PkiMessage(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ /**
+ * Creates a new PkiMessage.
+ *
+ * @param header message header
+ * @param body message body
+ * @param protection message protection (may be null)
+ * @param extraCerts extra certificates (may be null)
+ */
+ public PkiMessage(
+ PkiHeader header,
+ PkiBody body,
+ DerBitString protection,
+ CmpCertificate[] extraCerts)
+ {
+ this.header = header;
+ this.body = body;
+ this.protection = protection;
+ if (extraCerts != null)
+ {
+ this.extraCerts = new DerSequence(extraCerts);
+ }
+ }
+
+ public PkiMessage(
+ PkiHeader header,
+ PkiBody body,
+ DerBitString protection)
+ : this(header, body, protection, null)
+ {
+ }
+
+ public PkiMessage(
+ PkiHeader header,
+ PkiBody body)
+ : this(header, body, null, null)
+ {
+ }
+
+ public virtual PkiHeader Header
+ {
+ get { return header; }
+ }
+
+ public virtual PkiBody Body
+ {
+ get { return body; }
+ }
+
+ public virtual DerBitString Protection
+ {
+ get { return protection; }
+ }
+
+ public virtual CmpCertificate[] GetExtraCerts()
+ {
+ if (extraCerts == null)
+ return null;
+
+ CmpCertificate[] results = new CmpCertificate[extraCerts.Count];
+ for (int i = 0; i < results.Length; ++i)
+ {
+ results[i] = CmpCertificate.GetInstance(extraCerts[i]);
+ }
+ return results;
+ }
+
+ /**
+ *
+ * PkiMessage ::= SEQUENCE {
+ * header PKIHeader,
+ * body PKIBody,
+ * protection [0] PKIProtection OPTIONAL,
+ * extraCerts [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ * OPTIONAL
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(header, body);
+ v.AddOptionalTagged(true, 0, protection);
+ v.AddOptionalTagged(true, 1, extraCerts);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessage.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessage.cs.meta
new file mode 100644
index 00000000..2bc94cd0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessage.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c766bc81d0a58f04dbd305ed7364de06
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessages.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessages.cs
new file mode 100644
index 00000000..0c762851
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessages.cs
@@ -0,0 +1,58 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class PkiMessages
+ : Asn1Encodable
+ {
+ private Asn1Sequence content;
+
+ internal PkiMessages(Asn1Sequence seq)
+ {
+ content = seq;
+ }
+
+ public static PkiMessages GetInstance(object obj)
+ {
+ if (obj is PkiMessages)
+ return (PkiMessages)obj;
+
+ if (obj is Asn1Sequence)
+ return new PkiMessages((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public PkiMessages(params PkiMessage[] msgs)
+ {
+ content = new DerSequence(msgs);
+ }
+
+ public virtual PkiMessage[] ToPkiMessageArray()
+ {
+ PkiMessage[] result = new PkiMessage[content.Count];
+ for (int i = 0; i != result.Length; ++i)
+ {
+ result[i] = PkiMessage.GetInstance(content[i]);
+ }
+ return result;
+ }
+
+ /**
+ *
+ * PkiMessages ::= SEQUENCE SIZE (1..MAX) OF PkiMessage
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessages.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessages.cs.meta
new file mode 100644
index 00000000..fea9684f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIMessages.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6aa6d080265a8284389d7b43a19e8fea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatus.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatus.cs
new file mode 100644
index 00000000..788d3284
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatus.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public enum PkiStatus
+ {
+ Granted = 0,
+ GrantedWithMods = 1,
+ Rejection = 2,
+ Waiting = 3,
+ RevocationWarning = 4,
+ RevocationNotification = 5,
+ KeyUpdateWarning = 6,
+ }
+
+ public class PkiStatusEncodable
+ : Asn1Encodable
+ {
+ public static readonly PkiStatusEncodable granted = new PkiStatusEncodable(PkiStatus.Granted);
+ public static readonly PkiStatusEncodable grantedWithMods = new PkiStatusEncodable(PkiStatus.GrantedWithMods);
+ public static readonly PkiStatusEncodable rejection = new PkiStatusEncodable(PkiStatus.Rejection);
+ public static readonly PkiStatusEncodable waiting = new PkiStatusEncodable(PkiStatus.Waiting);
+ public static readonly PkiStatusEncodable revocationWarning = new PkiStatusEncodable(PkiStatus.RevocationWarning);
+ public static readonly PkiStatusEncodable revocationNotification = new PkiStatusEncodable(PkiStatus.RevocationNotification);
+ public static readonly PkiStatusEncodable keyUpdateWaiting = new PkiStatusEncodable(PkiStatus.KeyUpdateWarning);
+
+ private readonly DerInteger status;
+
+ private PkiStatusEncodable(PkiStatus status)
+ : this(new DerInteger((int)status))
+ {
+ }
+
+ private PkiStatusEncodable(DerInteger status)
+ {
+ this.status = status;
+ }
+
+ public static PkiStatusEncodable GetInstance(object obj)
+ {
+ if (obj is PkiStatusEncodable)
+ return (PkiStatusEncodable)obj;
+
+ if (obj is DerInteger)
+ return new PkiStatusEncodable((DerInteger)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public virtual BigInteger Value
+ {
+ get { return status.Value; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return status;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatus.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatus.cs.meta
new file mode 100644
index 00000000..c71264e9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatus.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6ab11c44e454a734abe83489016d91ce
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatusInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatusInfo.cs
new file mode 100644
index 00000000..666905ad
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatusInfo.cs
@@ -0,0 +1,160 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class PkiStatusInfo
+ : Asn1Encodable
+ {
+ DerInteger status;
+ PkiFreeText statusString;
+ DerBitString failInfo;
+
+ public static PkiStatusInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ public static PkiStatusInfo GetInstance(
+ object obj)
+ {
+ if (obj is PkiStatusInfo)
+ {
+ return (PkiStatusInfo)obj;
+ }
+ else if (obj is Asn1Sequence)
+ {
+ return new PkiStatusInfo((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public PkiStatusInfo(
+ Asn1Sequence seq)
+ {
+ this.status = DerInteger.GetInstance(seq[0]);
+
+ this.statusString = null;
+ this.failInfo = null;
+
+ if (seq.Count > 2)
+ {
+ this.statusString = PkiFreeText.GetInstance(seq[1]);
+ this.failInfo = DerBitString.GetInstance(seq[2]);
+ }
+ else if (seq.Count > 1)
+ {
+ object obj = seq[1];
+ if (obj is DerBitString)
+ {
+ this.failInfo = DerBitString.GetInstance(obj);
+ }
+ else
+ {
+ this.statusString = PkiFreeText.GetInstance(obj);
+ }
+ }
+ }
+
+ /**
+ * @param status
+ */
+ public PkiStatusInfo(int status)
+ {
+ this.status = new DerInteger(status);
+ }
+
+ /**
+ * @param status
+ * @param statusString
+ */
+ public PkiStatusInfo(
+ int status,
+ PkiFreeText statusString)
+ {
+ this.status = new DerInteger(status);
+ this.statusString = statusString;
+ }
+
+ public PkiStatusInfo(
+ int status,
+ PkiFreeText statusString,
+ PkiFailureInfo failInfo)
+ {
+ this.status = new DerInteger(status);
+ this.statusString = statusString;
+ this.failInfo = failInfo;
+ }
+
+ public BigInteger Status
+ {
+ get
+ {
+ return status.Value;
+ }
+ }
+
+ public PkiFreeText StatusString
+ {
+ get
+ {
+ return statusString;
+ }
+ }
+
+ public DerBitString FailInfo
+ {
+ get
+ {
+ return failInfo;
+ }
+ }
+
+ /**
+ *
+ * PkiStatusInfo ::= SEQUENCE {
+ * status PKIStatus, (INTEGER)
+ * statusString PkiFreeText OPTIONAL,
+ * failInfo PkiFailureInfo OPTIONAL (BIT STRING)
+ * }
+ *
+ * PKIStatus:
+ * granted (0), -- you got exactly what you asked for
+ * grantedWithMods (1), -- you got something like what you asked for
+ * rejection (2), -- you don't get it, more information elsewhere in the message
+ * waiting (3), -- the request body part has not yet been processed, expect to hear more later
+ * revocationWarning (4), -- this message contains a warning that a revocation is imminent
+ * revocationNotification (5), -- notification that a revocation has occurred
+ * keyUpdateWarning (6) -- update already done for the oldCertId specified in CertReqMsg
+ *
+ * PkiFailureInfo:
+ * badAlg (0), -- unrecognized or unsupported Algorithm Identifier
+ * badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ * badRequest (2), -- transaction not permitted or supported
+ * badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ * badCertId (4), -- no certificate could be found matching the provided criteria
+ * badDataFormat (5), -- the data submitted has the wrong format
+ * wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ * incorrectData (7), -- the requester's data is incorrect (for notary services)
+ * missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ * badPOP (9) -- the proof-of-possession failed
+ *
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(status);
+ v.AddOptional(statusString, failInfo);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatusInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatusInfo.cs.meta
new file mode 100644
index 00000000..e4746fb1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PKIStatusInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5e920049330b4c543a988929e11dada6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PbmParameter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PbmParameter.cs
new file mode 100644
index 00000000..c1916c51
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PbmParameter.cs
@@ -0,0 +1,102 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * PBMParameter ::= SEQUENCE {
+ * salt OCTET STRING,
+ * -- note: implementations MAY wish to limit acceptable sizes
+ * -- of this string to values appropriate for their environment
+ * -- in order to reduce the risk of denial-of-service attacks
+ * owf AlgorithmIdentifier,
+ * -- AlgId for a One-Way Function (SHA-1 recommended)
+ * iterationCount INTEGER,
+ * -- number of times the OWF is applied
+ * -- note: implementations MAY wish to limit acceptable sizes
+ * -- of this integer to values appropriate for their environment
+ * -- in order to reduce the risk of denial-of-service attacks
+ * mac AlgorithmIdentifier
+ * -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
+ * } -- or HMAC [RFC2104, RFC2202])
+ */
+ public class PbmParameter
+ : Asn1Encodable
+ {
+ public static PbmParameter GetInstance(object obj)
+ {
+ if (obj is PbmParameter pbmParameter)
+ return pbmParameter;
+
+ if (obj != null)
+ return new PbmParameter(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1OctetString m_salt;
+ private readonly AlgorithmIdentifier m_owf;
+ private readonly DerInteger m_iterationCount;
+ private readonly AlgorithmIdentifier m_mac;
+
+ private PbmParameter(Asn1Sequence seq)
+ {
+ m_salt = Asn1OctetString.GetInstance(seq[0]);
+ m_owf = AlgorithmIdentifier.GetInstance(seq[1]);
+ m_iterationCount = DerInteger.GetInstance(seq[2]);
+ m_mac = AlgorithmIdentifier.GetInstance(seq[3]);
+ }
+
+ public PbmParameter(byte[] salt, AlgorithmIdentifier owf, int iterationCount, AlgorithmIdentifier mac)
+ : this(new DerOctetString(salt), owf, new DerInteger(iterationCount), mac)
+ {
+ }
+
+ public PbmParameter(Asn1OctetString salt, AlgorithmIdentifier owf, DerInteger iterationCount,
+ AlgorithmIdentifier mac)
+ {
+ m_salt = salt;
+ m_owf = owf;
+ m_iterationCount = iterationCount;
+ m_mac = mac;
+ }
+
+ public virtual DerInteger IterationCount => m_iterationCount;
+
+ public virtual AlgorithmIdentifier Mac => m_mac;
+
+ public virtual AlgorithmIdentifier Owf => m_owf;
+
+ public virtual Asn1OctetString Salt => m_salt;
+
+ /**
+ *
+ * PbmParameter ::= SEQUENCE {
+ * salt OCTET STRING,
+ * -- note: implementations MAY wish to limit acceptable sizes
+ * -- of this string to values appropriate for their environment
+ * -- in order to reduce the risk of denial-of-service attacks
+ * owf AlgorithmIdentifier,
+ * -- AlgId for a One-Way Function (SHA-1 recommended)
+ * iterationCount INTEGER,
+ * -- number of times the OWF is applied
+ * -- note: implementations MAY wish to limit acceptable sizes
+ * -- of this integer to values appropriate for their environment
+ * -- in order to reduce the risk of denial-of-service attacks
+ * mac AlgorithmIdentifier
+ * -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
+ * } -- or HMAC [RFC2104, RFC2202])
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(m_salt, m_owf, m_iterationCount, m_mac);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PbmParameter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PbmParameter.cs.meta
new file mode 100644
index 00000000..8f6320f6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PbmParameter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7d820fb493c2e3b448eea9f6935804a0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollRepContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollRepContent.cs
new file mode 100644
index 00000000..441d72a2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollRepContent.cs
@@ -0,0 +1,100 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * PollRepContent ::= SEQUENCE OF SEQUENCE {
+ * certReqId INTEGER,
+ * checkAfter INTEGER, -- time in seconds
+ * reason PKIFreeText OPTIONAL }
+ */
+ public class PollRepContent
+ : Asn1Encodable
+ {
+ public static PollRepContent GetInstance(object obj)
+ {
+ if (obj is PollRepContent pollRepContent)
+ return pollRepContent;
+
+ if (obj != null)
+ return new PollRepContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly DerInteger[] m_certReqID;
+ private readonly DerInteger[] m_checkAfter;
+ private readonly PkiFreeText[] m_reason;
+
+ private PollRepContent(Asn1Sequence seq)
+ {
+ int count = seq.Count;
+ m_certReqID = new DerInteger[count];
+ m_checkAfter = new DerInteger[count];
+ m_reason = new PkiFreeText[count];
+
+ for (int i = 0; i != count; i++)
+ {
+ Asn1Sequence s = Asn1Sequence.GetInstance(seq[i]);
+
+ m_certReqID[i] = DerInteger.GetInstance(s[0]);
+ m_checkAfter[i] = DerInteger.GetInstance(s[1]);
+
+ if (s.Count > 2)
+ {
+ m_reason[i] = PkiFreeText.GetInstance(s[2]);
+ }
+ }
+ }
+
+ public PollRepContent(DerInteger certReqID, DerInteger checkAfter)
+ : this(certReqID, checkAfter, null)
+ {
+ }
+
+ public PollRepContent(DerInteger certReqID, DerInteger checkAfter, PkiFreeText reason)
+ {
+ m_certReqID = new DerInteger[1]{ certReqID };
+ m_checkAfter = new DerInteger[1]{ checkAfter };
+ m_reason = new PkiFreeText[1]{ reason };
+ }
+
+ public virtual int Count => m_certReqID.Length;
+
+ public virtual DerInteger GetCertReqID(int index) => m_certReqID[index];
+
+ public virtual DerInteger GetCheckAfter(int index) => m_checkAfter[index];
+
+ public virtual PkiFreeText GetReason(int index) => m_reason[index];
+
+ /**
+ *
+ * PollRepContent ::= SEQUENCE OF SEQUENCE {
+ * certReqId INTEGER,
+ * checkAfter INTEGER, -- time in seconds
+ * reason PKIFreeText OPTIONAL
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector outer = new Asn1EncodableVector(m_certReqID.Length);
+
+ for (int i = 0; i != m_certReqID.Length; i++)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(3);
+
+ v.Add(m_certReqID[i]);
+ v.Add(m_checkAfter[i]);
+ v.AddOptional(m_reason[i]);
+
+ outer.Add(new DerSequence(v));
+ }
+
+ return new DerSequence(outer);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollRepContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollRepContent.cs.meta
new file mode 100644
index 00000000..a1589aa7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollRepContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7d4c7c5d740ed224588b9122ba4db074
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollReqContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollReqContent.cs
new file mode 100644
index 00000000..6de7f12b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollReqContent.cs
@@ -0,0 +1,134 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class PollReqContent
+ : Asn1Encodable
+ {
+ public static PollReqContent GetInstance(object obj)
+ {
+ if (obj is PollReqContent pollReqContent)
+ return pollReqContent;
+
+ if (obj != null)
+ return new PollReqContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1Sequence m_content;
+
+ private PollReqContent(Asn1Sequence seq)
+ {
+ m_content = seq;
+ }
+
+ /**
+ * Create a pollReqContent for a single certReqId.
+ *
+ * @param certReqId the certificate request ID.
+ */
+ public PollReqContent(DerInteger certReqId)
+ : this(new DerSequence(new DerSequence(certReqId)))
+ {
+ }
+
+ /**
+ * Create a pollReqContent for a multiple certReqIds.
+ *
+ * @param certReqIds the certificate request IDs.
+ */
+ public PollReqContent(DerInteger[] certReqIds)
+ : this(new DerSequence(IntsToSequence(certReqIds)))
+ {
+ }
+
+ /**
+ * Create a pollReqContent for a single certReqId.
+ *
+ * @param certReqId the certificate request ID.
+ */
+ public PollReqContent(BigInteger certReqId)
+ : this(new DerInteger(certReqId))
+ {
+ }
+
+ /**
+ * Create a pollReqContent for a multiple certReqIds.
+ *
+ * @param certReqIds the certificate request IDs.
+ */
+ public PollReqContent(BigInteger[] certReqIds)
+ : this(IntsToAsn1(certReqIds))
+ {
+ }
+
+ public virtual DerInteger[][] GetCertReqIDs()
+ {
+ DerInteger[][] result = new DerInteger[m_content.Count][];
+ for (int i = 0; i != result.Length; ++i)
+ {
+ result[i] = SequenceToDerIntegerArray((Asn1Sequence)m_content[i]);
+ }
+ return result;
+ }
+
+ public virtual BigInteger[] GetCertReqIDValues()
+ {
+ BigInteger[] result = new BigInteger[m_content.Count];
+
+ for (int i = 0; i != result.Length; i++)
+ {
+ result[i] = DerInteger.GetInstance(Asn1Sequence.GetInstance(m_content[i])[0]).Value;
+ }
+
+ return result;
+ }
+
+ /**
+ *
+ * PollReqContent ::= SEQUENCE OF SEQUENCE {
+ * certReqId INTEGER
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_content;
+ }
+
+ private static DerInteger[] SequenceToDerIntegerArray(Asn1Sequence seq)
+ {
+ return seq.MapElements(DerInteger.GetInstance);
+ }
+
+ private static DerSequence[] IntsToSequence(DerInteger[] ids)
+ {
+ DerSequence[] result = new DerSequence[ids.Length];
+
+ for (int i = 0; i != result.Length; i++)
+ {
+ result[i] = new DerSequence(ids[i]);
+ }
+
+ return result;
+ }
+
+ private static DerInteger[] IntsToAsn1(BigInteger[] ids)
+ {
+ DerInteger[] result = new DerInteger[ids.Length];
+
+ for (int i = 0; i != result.Length; i++)
+ {
+ result[i] = new DerInteger(ids[i]);
+ }
+
+ return result;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollReqContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollReqContent.cs.meta
new file mode 100644
index 00000000..95a5e3b7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PollReqContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 89db50e925544cc4bb8035575757618a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyChallContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyChallContent.cs
new file mode 100644
index 00000000..69581c8a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyChallContent.cs
@@ -0,0 +1,46 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class PopoDecKeyChallContent
+ : Asn1Encodable
+ {
+ public static PopoDecKeyChallContent GetInstance(object obj)
+ {
+ if (obj is PopoDecKeyChallContent popoDecKeyChallContent)
+ return popoDecKeyChallContent;
+
+ if (obj != null)
+ return new PopoDecKeyChallContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1Sequence m_content;
+
+ private PopoDecKeyChallContent(Asn1Sequence seq)
+ {
+ m_content = seq;
+ }
+
+ public virtual Challenge[] ToChallengeArray()
+ {
+ return m_content.MapElements(Challenge.GetInstance);
+ }
+
+ /**
+ *
+ * PopoDecKeyChallContent ::= SEQUENCE OF Challenge
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyChallContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyChallContent.cs.meta
new file mode 100644
index 00000000..86349eac
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyChallContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ca6e2dbcd0353db4e9e07fab689b6db0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyRespContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyRespContent.cs
new file mode 100644
index 00000000..d2bc4917
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyRespContent.cs
@@ -0,0 +1,44 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class PopoDecKeyRespContent
+ : Asn1Encodable
+ {
+ public static PopoDecKeyRespContent GetInstance(object obj)
+ {
+ if (obj is PopoDecKeyRespContent popoDecKeyRespContent)
+ return popoDecKeyRespContent;
+
+ if (obj != null)
+ return new PopoDecKeyRespContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1Sequence m_content;
+
+ private PopoDecKeyRespContent(Asn1Sequence seq)
+ {
+ m_content = seq;
+ }
+
+ public virtual DerInteger[] ToIntegerArray()
+ {
+ return m_content.MapElements(DerInteger.GetInstance);
+ }
+
+ /**
+ *
+ * PopoDecKeyRespContent ::= SEQUENCE OF INTEGER
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyRespContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyRespContent.cs.meta
new file mode 100644
index 00000000..8a814bdd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/PopoDecKeyRespContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 285540a2dd3350b4dba1bb41d57b1f9b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ProtectedPart.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ProtectedPart.cs
new file mode 100644
index 00000000..bee2af6c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ProtectedPart.cs
@@ -0,0 +1,54 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class ProtectedPart
+ : Asn1Encodable
+ {
+ public static ProtectedPart GetInstance(object obj)
+ {
+ if (obj is ProtectedPart protectedPart)
+ return protectedPart;
+
+ if (obj != null)
+ return new ProtectedPart(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly PkiHeader m_header;
+ private readonly PkiBody m_body;
+
+ private ProtectedPart(Asn1Sequence seq)
+ {
+ m_header = PkiHeader.GetInstance(seq[0]);
+ m_body = PkiBody.GetInstance(seq[1]);
+ }
+
+ public ProtectedPart(PkiHeader header, PkiBody body)
+ {
+ m_header = header;
+ m_body = body;
+ }
+
+ public virtual PkiHeader Header => m_header;
+
+ public virtual PkiBody Body => m_body;
+
+ /**
+ *
+ * ProtectedPart ::= SEQUENCE {
+ * header PKIHeader,
+ * body PKIBody
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(m_header, m_body);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ProtectedPart.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ProtectedPart.cs.meta
new file mode 100644
index 00000000..bde817c8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/ProtectedPart.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 79565afff7b32cf498e67edf130c2fa1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevAnnContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevAnnContent.cs
new file mode 100644
index 00000000..c42044a2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevAnnContent.cs
@@ -0,0 +1,89 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class RevAnnContent
+ : Asn1Encodable
+ {
+ public static RevAnnContent GetInstance(object obj)
+ {
+ if (obj is RevAnnContent revAnnContent)
+ return revAnnContent;
+
+ if (obj != null)
+ return new RevAnnContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly PkiStatusEncodable m_status;
+ private readonly CertId m_certID;
+ private readonly Asn1GeneralizedTime m_willBeRevokedAt;
+ private readonly Asn1GeneralizedTime m_badSinceDate;
+ private readonly X509Extensions m_crlDetails;
+
+ public RevAnnContent(PkiStatusEncodable status, CertId certID, Asn1GeneralizedTime willBeRevokedAt,
+ Asn1GeneralizedTime badSinceDate)
+ : this(status, certID, willBeRevokedAt, badSinceDate, null)
+ {
+ }
+
+ public RevAnnContent(PkiStatusEncodable status, CertId certID, Asn1GeneralizedTime willBeRevokedAt,
+ Asn1GeneralizedTime badSinceDate, X509Extensions crlDetails)
+ {
+ m_status = status;
+ m_certID = certID;
+ m_willBeRevokedAt = willBeRevokedAt;
+ m_badSinceDate = badSinceDate;
+ m_crlDetails = crlDetails;
+ }
+
+ private RevAnnContent(Asn1Sequence seq)
+ {
+ m_status = PkiStatusEncodable.GetInstance(seq[0]);
+ m_certID = CertId.GetInstance(seq[1]);
+ m_willBeRevokedAt = Asn1GeneralizedTime.GetInstance(seq[2]);
+ m_badSinceDate = Asn1GeneralizedTime.GetInstance(seq[3]);
+
+ if (seq.Count > 4)
+ {
+ m_crlDetails = X509Extensions.GetInstance(seq[4]);
+ }
+ }
+
+ public virtual PkiStatusEncodable Status => m_status;
+
+ public virtual CertId CertID => m_certID;
+
+ public virtual Asn1GeneralizedTime WillBeRevokedAt => m_willBeRevokedAt;
+
+ public virtual Asn1GeneralizedTime BadSinceDate => m_badSinceDate;
+
+ public virtual X509Extensions CrlDetails => m_crlDetails;
+
+ /**
+ *
+ * RevAnnContent ::= SEQUENCE {
+ * status PKIStatus,
+ * certId CertId,
+ * willBeRevokedAt GeneralizedTime,
+ * badSinceDate GeneralizedTime,
+ * crlDetails Extensions OPTIONAL
+ * -- extra CRL details (e.g., crl number, reason, location, etc.)
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_status, m_certID, m_willBeRevokedAt, m_badSinceDate);
+ v.AddOptional(m_crlDetails);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevAnnContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevAnnContent.cs.meta
new file mode 100644
index 00000000..b0c3c0b9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevAnnContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ec0ea9c18865c29439dc8cb75ed463ea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevDetails.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevDetails.cs
new file mode 100644
index 00000000..493bd406
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevDetails.cs
@@ -0,0 +1,84 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ *
+ * RevDetails ::= SEQUENCE {
+ * certDetails CertTemplate,
+ * -- allows requester to specify as much as they can about
+ * -- the cert. for which revocation is requested
+ * -- (e.g., for cases in which serialNumber is not available)
+ * crlEntryDetails Extensions OPTIONAL
+ * -- requested crlEntryExtensions
+ * }
+ *
+ */
+ public class RevDetails
+ : Asn1Encodable
+ {
+ public static RevDetails GetInstance(object obj)
+ {
+ if (obj is RevDetails revDetails)
+ return revDetails;
+
+ if (obj != null)
+ return new RevDetails(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly CertTemplate m_certDetails;
+ private readonly X509Extensions m_crlEntryDetails;
+
+ private RevDetails(Asn1Sequence seq)
+ {
+ m_certDetails = CertTemplate.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ m_crlEntryDetails = X509Extensions.GetInstance(seq[1]);
+ }
+ }
+
+ public RevDetails(CertTemplate certDetails)
+ : this(certDetails, null)
+ {
+ }
+
+ public RevDetails(CertTemplate certDetails, X509Extensions crlEntryDetails)
+ {
+ m_certDetails = certDetails;
+ m_crlEntryDetails = crlEntryDetails;
+ }
+
+ public virtual CertTemplate CertDetails => m_certDetails;
+
+ public virtual X509Extensions CrlEntryDetails => m_crlEntryDetails;
+
+ /**
+ *
+ * RevDetails ::= SEQUENCE {
+ * certDetails CertTemplate,
+ * -- allows requester to specify as much as they can about
+ * -- the cert. for which revocation is requested
+ * -- (e.g., for cases in which serialNumber is not available)
+ * crlEntryDetails Extensions OPTIONAL
+ * -- requested crlEntryExtensions
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_certDetails);
+ v.AddOptional(m_crlEntryDetails);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevDetails.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevDetails.cs.meta
new file mode 100644
index 00000000..e0478b0d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevDetails.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f4b3619c16336b345b55ab20dce9a8ab
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContent.cs
new file mode 100644
index 00000000..809a5608
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContent.cs
@@ -0,0 +1,104 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ *
+ * RevRepContent ::= SEQUENCE {
+ * status SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
+ * -- in same order as was sent in RevReqContent
+ * revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId
+ * OPTIONAL,
+ * -- IDs for which revocation was requested
+ * -- (same order as status)
+ * crls [1] SEQUENCE SIZE (1..MAX) OF CertificateList OPTIONAL
+ * -- the resulting CRLs (there may be more than one)
+ * }
+ *
+ */
+ public class RevRepContent
+ : Asn1Encodable
+ {
+ public static RevRepContent GetInstance(object obj)
+ {
+ if (obj is RevRepContent revRepContent)
+ return revRepContent;
+
+ if (obj != null)
+ return new RevRepContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1Sequence m_status;
+ private readonly Asn1Sequence m_revCerts;
+ private readonly Asn1Sequence m_crls;
+
+ private RevRepContent(Asn1Sequence seq)
+ {
+ m_status = Asn1Sequence.GetInstance(seq[0]);
+
+ for (int pos = 1; pos < seq.Count; ++pos)
+ {
+ Asn1TaggedObject tObj = Asn1TaggedObject.GetInstance(seq[pos]);
+
+ if (tObj.TagNo == 0)
+ {
+ m_revCerts = Asn1Sequence.GetInstance(tObj, true);
+ }
+ else
+ {
+ m_crls = Asn1Sequence.GetInstance(tObj, true);
+ }
+ }
+ }
+
+ public virtual PkiStatusInfo[] GetStatus()
+ {
+ return m_status.MapElements(PkiStatusInfo.GetInstance);
+ }
+
+ public virtual CertId[] GetRevCerts()
+ {
+ if (m_revCerts == null)
+ return null;
+
+ return m_revCerts.MapElements(CertId.GetInstance);
+ }
+
+ public virtual CertificateList[] GetCrls()
+ {
+ if (m_crls == null)
+ return null;
+
+ return m_crls.MapElements(CertificateList.GetInstance);
+ }
+
+ /**
+ *
+ * RevRepContent ::= SEQUENCE {
+ * status SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
+ * -- in same order as was sent in RevReqContent
+ * revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
+ * -- IDs for which revocation was requested
+ * -- (same order as status)
+ * crls [1] SEQUENCE SIZE (1..MAX) OF CertificateList OPTIONAL
+ * -- the resulting CRLs (there may be more than one)
+ * }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_status);
+ v.AddOptionalTagged(true, 0, m_revCerts);
+ v.AddOptionalTagged(true, 1, m_crls);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContent.cs.meta
new file mode 100644
index 00000000..50db458f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 61fb5fcb2f0c8f94abe8b3191cf184eb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContentBuilder.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContentBuilder.cs
new file mode 100644
index 00000000..4c4f4e86
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContentBuilder.cs
@@ -0,0 +1,59 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class RevRepContentBuilder
+ {
+ private readonly Asn1EncodableVector m_status = new Asn1EncodableVector();
+ private readonly Asn1EncodableVector m_revCerts = new Asn1EncodableVector();
+ private readonly Asn1EncodableVector m_crls = new Asn1EncodableVector();
+
+ public virtual RevRepContentBuilder Add(PkiStatusInfo status)
+ {
+ m_status.Add(status);
+ return this;
+ }
+
+ public virtual RevRepContentBuilder Add(PkiStatusInfo status, CertId certId)
+ {
+ if (m_status.Count != m_revCerts.Count)
+ throw new InvalidOperationException("status and revCerts sequence must be in common order");
+
+ m_status.Add(status);
+ m_revCerts.Add(certId);
+ return this;
+ }
+
+ public virtual RevRepContentBuilder AddCrl(CertificateList crl)
+ {
+ m_crls.Add(crl);
+ return this;
+ }
+
+ public virtual RevRepContent Build()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ v.Add(new DerSequence(m_status));
+
+ if (m_revCerts.Count != 0)
+ {
+ v.Add(new DerTaggedObject(true, 0, new DerSequence(m_revCerts)));
+ }
+
+ if (m_crls.Count != 0)
+ {
+ v.Add(new DerTaggedObject(true, 1, new DerSequence(m_crls)));
+ }
+
+ return RevRepContent.GetInstance(new DerSequence(v));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContentBuilder.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContentBuilder.cs.meta
new file mode 100644
index 00000000..3f7ac557
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevRepContentBuilder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 05e473700bed52f47ad85cabbd7413d3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevReqContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevReqContent.cs
new file mode 100644
index 00000000..dd051cff
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevReqContent.cs
@@ -0,0 +1,58 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ public class RevReqContent
+ : Asn1Encodable
+ {
+ public static RevReqContent GetInstance(object obj)
+ {
+ if (obj is RevReqContent revReqContent)
+ return revReqContent;
+
+ if (obj != null)
+ return new RevReqContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly Asn1Sequence m_content;
+
+ private RevReqContent(Asn1Sequence seq)
+ {
+ m_content = seq;
+ }
+
+ public RevReqContent(RevDetails revDetails)
+ {
+ m_content = new DerSequence(revDetails);
+ }
+
+ public RevReqContent(params RevDetails[] revDetailsArray)
+ {
+ m_content = new DerSequence(revDetailsArray);
+ }
+
+ public virtual RevDetails[] ToRevDetailsArray()
+ {
+ return m_content.MapElements(RevDetails.GetInstance);
+ }
+
+ /**
+ *
+ * RevReqContent ::= SEQUENCE OF RevDetails
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevReqContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevReqContent.cs.meta
new file mode 100644
index 00000000..5e3383c2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RevReqContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9a8e0e45790a3804ba7cda6acc7c3a37
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RootCaKeyUpdateContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RootCaKeyUpdateContent.cs
new file mode 100644
index 00000000..98ba9aeb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RootCaKeyUpdateContent.cs
@@ -0,0 +1,95 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
+{
+ /**
+ * GenMsg: {id-it 20}, RootCaCertValue | < absent >
+ * GenRep: {id-it 18}, RootCaKeyUpdateContent | < absent >
+ *
+ * RootCaCertValue ::= CMPCertificate
+ *
+ * RootCaKeyUpdateValue ::= RootCaKeyUpdateContent
+ *
+ * RootCaKeyUpdateContent ::= SEQUENCE {
+ * newWithNew CMPCertificate,
+ * newWithOld [0] CMPCertificate OPTIONAL,
+ * oldWithNew [1] CMPCertificate OPTIONAL
+ * }
+ *
+ */
+ public class RootCaKeyUpdateContent
+ : Asn1Encodable
+ {
+ public static RootCaKeyUpdateContent GetInstance(object obj)
+ {
+ if (obj is RootCaKeyUpdateContent rootCaKeyUpdateContent)
+ return rootCaKeyUpdateContent;
+
+ if (obj != null)
+ return new RootCaKeyUpdateContent(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly CmpCertificate m_newWithNew;
+ private readonly CmpCertificate m_newWithOld;
+ private readonly CmpCertificate m_oldWithNew;
+
+ public RootCaKeyUpdateContent(CmpCertificate newWithNew, CmpCertificate newWithOld, CmpCertificate oldWithNew)
+ {
+ if (newWithNew == null)
+ throw new ArgumentNullException(nameof(newWithNew));
+
+ m_newWithNew = newWithNew;
+ m_newWithOld = newWithOld;
+ m_oldWithNew = oldWithNew;
+ }
+
+ private RootCaKeyUpdateContent(Asn1Sequence seq)
+ {
+ if (seq.Count < 1 || seq.Count > 3)
+ throw new ArgumentException("expected sequence of 1 to 3 elements only");
+
+ CmpCertificate newWithNew;
+ CmpCertificate newWithOld = null;
+ CmpCertificate oldWithNew = null;
+
+ newWithNew = CmpCertificate.GetInstance(seq[0]);
+
+ for (int pos = 1; pos < seq.Count; ++pos)
+ {
+ Asn1TaggedObject ato = Asn1TaggedObject.GetInstance(seq[pos]);
+ if (ato.TagNo == 0)
+ {
+ newWithOld = CmpCertificate.GetInstance(ato, true);
+ }
+ else if (ato.TagNo == 1)
+ {
+ oldWithNew = CmpCertificate.GetInstance(ato, true);
+ }
+ }
+
+ m_newWithNew = newWithNew;
+ m_newWithOld = newWithOld;
+ m_oldWithNew = oldWithNew;
+ }
+
+ public virtual CmpCertificate NewWithNew => m_newWithNew;
+
+ public virtual CmpCertificate NewWithOld => m_newWithOld;
+
+ public virtual CmpCertificate OldWithNew => m_oldWithNew;
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_newWithNew);
+ v.AddOptionalTagged(true, 0, m_newWithOld);
+ v.AddOptionalTagged(true, 1, m_oldWithNew);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RootCaKeyUpdateContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RootCaKeyUpdateContent.cs.meta
new file mode 100644
index 00000000..355743ea
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cmp/RootCaKeyUpdateContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1715bfa0022963c4696082543f5e8fe2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms.meta
new file mode 100644
index 00000000..093211b4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5e708fec1acb56d4c8ef1b399036826d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attribute.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attribute.cs
new file mode 100644
index 00000000..1132cdcc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attribute.cs
@@ -0,0 +1,74 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class Attribute
+ : Asn1Encodable
+ {
+ private DerObjectIdentifier attrType;
+ private Asn1Set attrValues;
+
+ /**
+ * return an Attribute object from the given object.
+ *
+ * @param o the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static Attribute GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is Attribute)
+ return (Attribute) obj;
+
+ if (obj is Asn1Sequence)
+ return new Attribute((Asn1Sequence) obj);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public Attribute(
+ Asn1Sequence seq)
+ {
+ attrType = (DerObjectIdentifier)seq[0];
+ attrValues = (Asn1Set)seq[1];
+ }
+
+ public Attribute(
+ DerObjectIdentifier attrType,
+ Asn1Set attrValues)
+ {
+ this.attrType = attrType;
+ this.attrValues = attrValues;
+ }
+
+ public DerObjectIdentifier AttrType
+ {
+ get { return attrType; }
+ }
+
+ public Asn1Set AttrValues
+ {
+ get { return attrValues; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Attribute ::= SEQUENCE {
+ * attrType OBJECT IDENTIFIER,
+ * attrValues SET OF AttributeValue
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(attrType, attrValues);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attribute.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attribute.cs.meta
new file mode 100644
index 00000000..4cc71774
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4e7b2ed0c0e219d439652e22b9125ff7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AttributeTable.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AttributeTable.cs
new file mode 100644
index 00000000..263a6448
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AttributeTable.cs
@@ -0,0 +1,224 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class AttributeTable
+ {
+ private readonly Dictionary m_attributes;
+
+ public AttributeTable(IDictionary attrs)
+ {
+ m_attributes = new Dictionary(attrs);
+ }
+
+ public AttributeTable(Asn1EncodableVector v)
+ {
+ m_attributes = new Dictionary(v.Count);
+
+ foreach (Asn1Encodable e in v)
+ {
+ AddAttribute(Attribute.GetInstance(e));
+ }
+ }
+
+ public AttributeTable(Asn1Set s)
+ {
+ m_attributes = new Dictionary(s.Count);
+
+ foreach (Asn1Encodable e in s)
+ {
+ AddAttribute(Attribute.GetInstance(e));
+ }
+ }
+
+ public AttributeTable(Attributes attrs)
+ : this(Asn1Set.GetInstance(attrs.ToAsn1Object()))
+ {
+ }
+
+ private void AddAttribute(Attribute a)
+ {
+ DerObjectIdentifier oid = a.AttrType;
+
+ if (!m_attributes.TryGetValue(oid, out object existingValue))
+ {
+ m_attributes[oid] = a;
+ return;
+ }
+
+ if (existingValue is IList existingList)
+ {
+ existingList.Add(a);
+ return;
+ }
+
+ if (existingValue is Attribute existingAttr)
+ {
+ var newList = new List();
+ newList.Add(existingAttr);
+ newList.Add(a);
+ m_attributes[oid] = newList;
+ return;
+ }
+
+ throw new InvalidOperationException();
+ }
+
+ /// Return the first attribute matching the given OBJECT IDENTIFIER
+ public Attribute this[DerObjectIdentifier oid]
+ {
+ get
+ {
+ if (!m_attributes.TryGetValue(oid, out object existingValue))
+ return null;
+
+ if (existingValue is IList existingList)
+ return existingList[0];
+
+ if (existingValue is Attribute existingAttr)
+ return existingAttr;
+
+ throw new InvalidOperationException();
+ }
+ }
+
+ /**
+ * Return all the attributes matching the OBJECT IDENTIFIER oid. The vector will be
+ * empty if there are no attributes of the required type present.
+ *
+ * @param oid type of attribute required.
+ * @return a vector of all the attributes found of type oid.
+ */
+ public Asn1EncodableVector GetAll(DerObjectIdentifier oid)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (m_attributes.TryGetValue(oid, out object existingValue))
+ {
+ if (existingValue is IList existingList)
+ {
+ foreach (var attr in existingList)
+ {
+ v.Add(attr);
+ }
+ }
+ else if (existingValue is Attribute existingAttr)
+ {
+ v.Add(existingAttr);
+ }
+ else
+ {
+ throw new InvalidOperationException();
+ }
+ }
+
+ return v;
+ }
+
+ public int Count
+ {
+ get
+ {
+ int total = 0;
+
+ foreach (object existingValue in m_attributes.Values)
+ {
+ if (existingValue is IList existingList)
+ {
+ total += existingList.Count;
+ }
+ else if (existingValue is Attribute existingAttr)
+ {
+ ++total;
+ }
+ else
+ {
+ throw new InvalidOperationException();
+ }
+ }
+
+ return total;
+ }
+ }
+
+ public IDictionary ToDictionary()
+ {
+ return new Dictionary(m_attributes);
+ }
+
+ public Asn1EncodableVector ToAsn1EncodableVector()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ foreach (object existingValue in m_attributes.Values)
+ {
+ if (existingValue is IList existingList)
+ {
+ foreach (Attribute existingAttr in existingList)
+ {
+ v.Add(existingAttr);
+ }
+ }
+ else if (existingValue is Attribute existingAttr)
+ {
+ v.Add(existingAttr);
+ }
+ else
+ {
+ throw new InvalidOperationException();
+ }
+ }
+
+ return v;
+ }
+
+ public Attributes ToAttributes()
+ {
+ return new Attributes(ToAsn1EncodableVector());
+ }
+
+ public AttributeTable Add(params Attribute[] attributes)
+ {
+ if (attributes == null || attributes.Length < 1)
+ return this;
+
+ var newTable = new AttributeTable(m_attributes);
+ foreach (Attribute attribute in attributes)
+ {
+ newTable.AddAttribute(attribute);
+ }
+
+ return newTable;
+ }
+
+ /**
+ * Return a new table with the passed in attribute added.
+ *
+ * @param attrType
+ * @param attrValue
+ * @return
+ */
+ public AttributeTable Add(DerObjectIdentifier attrType, Asn1Encodable attrValue)
+ {
+ AttributeTable newTable = new AttributeTable(m_attributes);
+
+ newTable.AddAttribute(new Attribute(attrType, new DerSet(attrValue)));
+
+ return newTable;
+ }
+
+ public AttributeTable Remove(DerObjectIdentifier attrType)
+ {
+ AttributeTable newTable = new AttributeTable(m_attributes);
+
+ newTable.m_attributes.Remove(attrType);
+
+ return newTable;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AttributeTable.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AttributeTable.cs.meta
new file mode 100644
index 00000000..2ec710cc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AttributeTable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d7d4a7121d9179946b171e9919501078
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attributes.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attributes.cs
new file mode 100644
index 00000000..aff0bd9a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attributes.cs
@@ -0,0 +1,59 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class Attributes
+ : Asn1Encodable
+ {
+ private readonly Asn1Set attributes;
+
+ private Attributes(Asn1Set attributes)
+ {
+ this.attributes = attributes;
+ }
+
+ public Attributes(Asn1EncodableVector v)
+ {
+ attributes = new BerSet(v);
+ }
+
+ public static Attributes GetInstance(object obj)
+ {
+ if (obj is Attributes)
+ return (Attributes)obj;
+
+ if (obj != null)
+ return new Attributes(Asn1Set.GetInstance(obj));
+
+ return null;
+ }
+
+ public virtual Attribute[] GetAttributes()
+ {
+ Attribute[] rv = new Attribute[attributes.Count];
+
+ for (int i = 0; i != rv.Length; i++)
+ {
+ rv[i] = Attribute.GetInstance(attributes[i]);
+ }
+
+ return rv;
+ }
+
+ /**
+ *
+ * Attributes ::=
+ * SET SIZE(1..MAX) OF Attribute -- according to RFC 5652
+ *
+ * @return
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return attributes;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attributes.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attributes.cs.meta
new file mode 100644
index 00000000..37ddd678
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Attributes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 93e45ad275157a34f82737172f176419
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedData.cs
new file mode 100644
index 00000000..fd08babf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedData.cs
@@ -0,0 +1,209 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class AuthEnvelopedData
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private OriginatorInfo originatorInfo;
+ private Asn1Set recipientInfos;
+ private EncryptedContentInfo authEncryptedContentInfo;
+ private Asn1Set authAttrs;
+ private Asn1OctetString mac;
+ private Asn1Set unauthAttrs;
+
+ public AuthEnvelopedData(
+ OriginatorInfo originatorInfo,
+ Asn1Set recipientInfos,
+ EncryptedContentInfo authEncryptedContentInfo,
+ Asn1Set authAttrs,
+ Asn1OctetString mac,
+ Asn1Set unauthAttrs)
+ {
+ // "It MUST be set to 0."
+ this.version = new DerInteger(0);
+
+ this.originatorInfo = originatorInfo;
+
+ // "There MUST be at least one element in the collection."
+ this.recipientInfos = recipientInfos;
+ if (this.recipientInfos.Count < 1)
+ throw new ArgumentException("AuthEnvelopedData requires at least 1 RecipientInfo");
+
+ this.authEncryptedContentInfo = authEncryptedContentInfo;
+
+ // "The authAttrs MUST be present if the content type carried in
+ // EncryptedContentInfo is not id-data."
+ this.authAttrs = authAttrs;
+ if (!authEncryptedContentInfo.ContentType.Equals(CmsObjectIdentifiers.Data))
+ {
+ if (authAttrs == null || authAttrs.Count < 1)
+ throw new ArgumentException("authAttrs must be present with non-data content");
+ }
+
+ this.mac = mac;
+
+ this.unauthAttrs = unauthAttrs;
+ }
+
+ private AuthEnvelopedData(
+ Asn1Sequence seq)
+ {
+ int index = 0;
+
+ // "It MUST be set to 0."
+ Asn1Object tmp = seq[index++].ToAsn1Object();
+ version = DerInteger.GetInstance(tmp);
+ if (!version.HasValue(0))
+ throw new ArgumentException("AuthEnvelopedData version number must be 0");
+
+ tmp = seq[index++].ToAsn1Object();
+ if (tmp is Asn1TaggedObject)
+ {
+ originatorInfo = OriginatorInfo.GetInstance((Asn1TaggedObject)tmp, false);
+ tmp = seq[index++].ToAsn1Object();
+ }
+
+ // "There MUST be at least one element in the collection."
+ recipientInfos = Asn1Set.GetInstance(tmp);
+ if (recipientInfos.Count < 1)
+ throw new ArgumentException("AuthEnvelopedData requires at least 1 RecipientInfo");
+
+ tmp = seq[index++].ToAsn1Object();
+ authEncryptedContentInfo = EncryptedContentInfo.GetInstance(tmp);
+
+ tmp = seq[index++].ToAsn1Object();
+ if (tmp is Asn1TaggedObject)
+ {
+ authAttrs = Asn1Set.GetInstance((Asn1TaggedObject)tmp, false);
+ tmp = seq[index++].ToAsn1Object();
+ }
+ else
+ {
+ // "The authAttrs MUST be present if the content type carried in
+ // EncryptedContentInfo is not id-data."
+ if (!authEncryptedContentInfo.ContentType.Equals(CmsObjectIdentifiers.Data))
+ {
+ if (authAttrs == null || authAttrs.Count < 1)
+ throw new ArgumentException("authAttrs must be present with non-data content");
+ }
+ }
+
+ mac = Asn1OctetString.GetInstance(tmp);
+
+ if (seq.Count > index)
+ {
+ tmp = seq[index++].ToAsn1Object();
+ unauthAttrs = Asn1Set.GetInstance((Asn1TaggedObject)tmp, false);
+ }
+ }
+
+ /**
+ * return an AuthEnvelopedData object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param isExplicit true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @throws ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static AuthEnvelopedData GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * return an AuthEnvelopedData object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @throws ArgumentException if the object cannot be converted.
+ */
+ public static AuthEnvelopedData GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is AuthEnvelopedData)
+ return (AuthEnvelopedData)obj;
+
+ if (obj is Asn1Sequence)
+ return new AuthEnvelopedData((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid AuthEnvelopedData: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public OriginatorInfo OriginatorInfo
+ {
+ get { return originatorInfo; }
+ }
+
+ public Asn1Set RecipientInfos
+ {
+ get { return recipientInfos; }
+ }
+
+ public EncryptedContentInfo AuthEncryptedContentInfo
+ {
+ get { return authEncryptedContentInfo; }
+ }
+
+ public Asn1Set AuthAttrs
+ {
+ get { return authAttrs; }
+ }
+
+ public Asn1OctetString Mac
+ {
+ get { return mac; }
+ }
+
+ public Asn1Set UnauthAttrs
+ {
+ get { return unauthAttrs; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * AuthEnvelopedData ::= SEQUENCE {
+ * version CMSVersion,
+ * originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ * recipientInfos RecipientInfos,
+ * authEncryptedContentInfo EncryptedContentInfo,
+ * authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ * mac MessageAuthenticationCode,
+ * unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version);
+ v.AddOptionalTagged(false, 0, originatorInfo);
+ v.Add(recipientInfos, authEncryptedContentInfo);
+
+ // "authAttrs optionally contains the authenticated attributes."
+ // "AuthAttributes MUST be DER encoded, even if the rest of the
+ // AuthEnvelopedData structure is BER encoded."
+ v.AddOptionalTagged(false, 1, authAttrs);
+
+ v.Add(mac);
+
+ // "unauthAttrs optionally contains the unauthenticated attributes."
+ v.AddOptionalTagged(false, 2, unauthAttrs);
+
+ return new BerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedData.cs.meta
new file mode 100644
index 00000000..b5b41a38
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4395da7e62945354ebf65fc7312dc0be
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedDataParser.cs
new file mode 100644
index 00000000..fb0e6340
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedDataParser.cs
@@ -0,0 +1,155 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ *
+ * AuthEnvelopedData ::= SEQUENCE {
+ * version CMSVersion,
+ * originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ * recipientInfos RecipientInfos,
+ * authEncryptedContentInfo EncryptedContentInfo,
+ * authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ * mac MessageAuthenticationCode,
+ * unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+ *
+ */
+ public class AuthEnvelopedDataParser
+ {
+ private Asn1SequenceParser seq;
+ private DerInteger version;
+ private IAsn1Convertible nextObject;
+ private bool originatorInfoCalled;
+ private bool isData;
+
+ public AuthEnvelopedDataParser(
+ Asn1SequenceParser seq)
+ {
+ this.seq = seq;
+
+ // "It MUST be set to 0."
+ this.version = (DerInteger)seq.ReadObject();
+ if (!version.HasValue(0))
+ throw new Asn1ParsingException("AuthEnvelopedData version number must be 0");
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public OriginatorInfo GetOriginatorInfo()
+ {
+ originatorInfoCalled = true;
+
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject is Asn1TaggedObjectParser o)
+ {
+ if (o.HasContextTag(0))
+ {
+ Asn1SequenceParser originatorInfo = (Asn1SequenceParser)o.ParseBaseUniversal(false, Asn1Tags.Sequence);
+ nextObject = null;
+ return OriginatorInfo.GetInstance(originatorInfo.ToAsn1Object());
+ }
+ }
+
+ return null;
+ }
+
+ public Asn1SetParser GetRecipientInfos()
+ {
+ if (!originatorInfoCalled)
+ {
+ GetOriginatorInfo();
+ }
+
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ Asn1SetParser recipientInfos = (Asn1SetParser)nextObject;
+ nextObject = null;
+ return recipientInfos;
+ }
+
+ public EncryptedContentInfoParser GetAuthEncryptedContentInfo()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject != null)
+ {
+ Asn1SequenceParser o = (Asn1SequenceParser) nextObject;
+ nextObject = null;
+ EncryptedContentInfoParser encryptedContentInfoParser = new EncryptedContentInfoParser(o);
+ isData = CmsObjectIdentifiers.Data.Equals(encryptedContentInfoParser.ContentType);
+ return encryptedContentInfoParser;
+ }
+
+ return null;
+ }
+
+ public Asn1SetParser GetAuthAttrs()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject is Asn1TaggedObjectParser o)
+ {
+ nextObject = null;
+ return (Asn1SetParser)Asn1Utilities.ParseContextBaseUniversal(o, 1, false, Asn1Tags.SetOf);
+ }
+
+ // "The authAttrs MUST be present if the content type carried in EncryptedContentInfo is not id-data."
+ if (!isData)
+ throw new Asn1ParsingException("authAttrs must be present with non-data content");
+
+ return null;
+ }
+
+ public Asn1OctetString GetMac()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ IAsn1Convertible o = nextObject;
+ nextObject = null;
+
+ return Asn1OctetString.GetInstance(o.ToAsn1Object());
+ }
+
+ public Asn1SetParser GetUnauthAttrs()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject != null)
+ {
+ Asn1TaggedObjectParser o = (Asn1TaggedObjectParser)nextObject;
+ nextObject = null;
+ return (Asn1SetParser)Asn1Utilities.ParseContextBaseUniversal(o, 2, false, Asn1Tags.SetOf);
+ }
+
+ return null;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedDataParser.cs.meta
new file mode 100644
index 00000000..af7108b9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthEnvelopedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8e5fac709ab110c47bc9eb66d230007a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedData.cs
new file mode 100644
index 00000000..47380cc8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedData.cs
@@ -0,0 +1,255 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class AuthenticatedData
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private OriginatorInfo originatorInfo;
+ private Asn1Set recipientInfos;
+ private AlgorithmIdentifier macAlgorithm;
+ private AlgorithmIdentifier digestAlgorithm;
+ private ContentInfo encapsulatedContentInfo;
+ private Asn1Set authAttrs;
+ private Asn1OctetString mac;
+ private Asn1Set unauthAttrs;
+
+ public AuthenticatedData(
+ OriginatorInfo originatorInfo,
+ Asn1Set recipientInfos,
+ AlgorithmIdentifier macAlgorithm,
+ AlgorithmIdentifier digestAlgorithm,
+ ContentInfo encapsulatedContent,
+ Asn1Set authAttrs,
+ Asn1OctetString mac,
+ Asn1Set unauthAttrs)
+ {
+ if (digestAlgorithm != null || authAttrs != null)
+ {
+ if (digestAlgorithm == null || authAttrs == null)
+ {
+ throw new ArgumentException("digestAlgorithm and authAttrs must be set together");
+ }
+ }
+
+ version = new DerInteger(CalculateVersion(originatorInfo));
+
+ this.originatorInfo = originatorInfo;
+ this.macAlgorithm = macAlgorithm;
+ this.digestAlgorithm = digestAlgorithm;
+ this.recipientInfos = recipientInfos;
+ this.encapsulatedContentInfo = encapsulatedContent;
+ this.authAttrs = authAttrs;
+ this.mac = mac;
+ this.unauthAttrs = unauthAttrs;
+ }
+
+ private AuthenticatedData(
+ Asn1Sequence seq)
+ {
+ int index = 0;
+
+ version = (DerInteger)seq[index++];
+
+ Asn1Encodable tmp = seq[index++];
+ if (tmp is Asn1TaggedObject)
+ {
+ originatorInfo = OriginatorInfo.GetInstance((Asn1TaggedObject)tmp, false);
+ tmp = seq[index++];
+ }
+
+ recipientInfos = Asn1Set.GetInstance(tmp);
+ macAlgorithm = AlgorithmIdentifier.GetInstance(seq[index++]);
+
+ tmp = seq[index++];
+ if (tmp is Asn1TaggedObject)
+ {
+ digestAlgorithm = AlgorithmIdentifier.GetInstance((Asn1TaggedObject)tmp, false);
+ tmp = seq[index++];
+ }
+
+ encapsulatedContentInfo = ContentInfo.GetInstance(tmp);
+
+ tmp = seq[index++];
+ if (tmp is Asn1TaggedObject)
+ {
+ authAttrs = Asn1Set.GetInstance((Asn1TaggedObject)tmp, false);
+ tmp = seq[index++];
+ }
+
+ mac = Asn1OctetString.GetInstance(tmp);
+
+ if (seq.Count > index)
+ {
+ unauthAttrs = Asn1Set.GetInstance((Asn1TaggedObject)seq[index], false);
+ }
+ }
+
+ /**
+ * return an AuthenticatedData object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param isExplicit true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @throws ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static AuthenticatedData GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * return an AuthenticatedData object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @throws ArgumentException if the object cannot be converted.
+ */
+ public static AuthenticatedData GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is AuthenticatedData)
+ {
+ return (AuthenticatedData)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new AuthenticatedData((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("Invalid AuthenticatedData: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public OriginatorInfo OriginatorInfo
+ {
+ get { return originatorInfo; }
+ }
+
+ public Asn1Set RecipientInfos
+ {
+ get { return recipientInfos; }
+ }
+
+ public AlgorithmIdentifier MacAlgorithm
+ {
+ get { return macAlgorithm; }
+ }
+
+ public AlgorithmIdentifier DigestAlgorithm
+ {
+ get { return digestAlgorithm; }
+ }
+
+ public ContentInfo EncapsulatedContentInfo
+ {
+ get { return encapsulatedContentInfo; }
+ }
+
+ public Asn1Set AuthAttrs
+ {
+ get { return authAttrs; }
+ }
+
+ public Asn1OctetString Mac
+ {
+ get { return mac; }
+ }
+
+ public Asn1Set UnauthAttrs
+ {
+ get { return unauthAttrs; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * AuthenticatedData ::= SEQUENCE {
+ * version CMSVersion,
+ * originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ * recipientInfos RecipientInfos,
+ * macAlgorithm MessageAuthenticationCodeAlgorithm,
+ * digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ * encapContentInfo EncapsulatedContentInfo,
+ * authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ * mac MessageAuthenticationCode,
+ * unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+ *
+ * AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+ *
+ * UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+ *
+ * MessageAuthenticationCode ::= OCTET STRING
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version);
+ v.AddOptionalTagged(false, 0, originatorInfo);
+ v.Add(recipientInfos, macAlgorithm);
+ v.AddOptionalTagged(false, 1, digestAlgorithm);
+ v.Add(encapsulatedContentInfo);
+ v.AddOptionalTagged(false, 2, authAttrs);
+ v.Add(mac);
+ v.AddOptionalTagged(false, 3, unauthAttrs);
+ return new BerSequence(v);
+ }
+
+ public static int CalculateVersion(OriginatorInfo origInfo)
+ {
+ if (origInfo == null)
+ return 0;
+
+ int ver = 0;
+
+ foreach (object obj in origInfo.Certificates)
+ {
+ if (obj is Asn1TaggedObject)
+ {
+ Asn1TaggedObject tag = (Asn1TaggedObject)obj;
+
+ if (tag.TagNo == 2)
+ {
+ ver = 1;
+ }
+ else if (tag.TagNo == 3)
+ {
+ ver = 3;
+ break;
+ }
+ }
+ }
+
+ foreach (object obj in origInfo.Crls)
+ {
+ if (obj is Asn1TaggedObject)
+ {
+ Asn1TaggedObject tag = (Asn1TaggedObject)obj;
+
+ if (tag.TagNo == 1)
+ {
+ ver = 3;
+ break;
+ }
+ }
+ }
+
+ return ver;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedData.cs.meta
new file mode 100644
index 00000000..220a7ec8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4ff572d35ad682f4486444d1af9600a5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedDataParser.cs
new file mode 100644
index 00000000..7fcb7b9a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedDataParser.cs
@@ -0,0 +1,188 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * AuthenticatedData ::= SEQUENCE {
+ * version CMSVersion,
+ * originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ * recipientInfos RecipientInfos,
+ * macAlgorithm MessageAuthenticationCodeAlgorithm,
+ * digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ * encapContentInfo EncapsulatedContentInfo,
+ * authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ * mac MessageAuthenticationCode,
+ * unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+ *
+ * AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+ *
+ * UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+ *
+ * MessageAuthenticationCode ::= OCTET STRING
+ *
+ */
+ public class AuthenticatedDataParser
+ {
+ private Asn1SequenceParser seq;
+ private DerInteger version;
+ private IAsn1Convertible nextObject;
+ private bool originatorInfoCalled;
+
+ public AuthenticatedDataParser(
+ Asn1SequenceParser seq)
+ {
+ this.seq = seq;
+ this.version = (DerInteger)seq.ReadObject();
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public OriginatorInfo GetOriginatorInfo()
+ {
+ originatorInfoCalled = true;
+
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject is Asn1TaggedObjectParser o)
+ {
+ if (o.HasContextTag(0))
+ {
+ Asn1SequenceParser originatorInfo = (Asn1SequenceParser)o.ParseBaseUniversal(false, Asn1Tags.Sequence);
+ nextObject = null;
+ return OriginatorInfo.GetInstance(originatorInfo.ToAsn1Object());
+ }
+ }
+
+ return null;
+ }
+
+ public Asn1SetParser GetRecipientInfos()
+ {
+ if (!originatorInfoCalled)
+ {
+ GetOriginatorInfo();
+ }
+
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ Asn1SetParser recipientInfos = (Asn1SetParser)nextObject;
+ nextObject = null;
+ return recipientInfos;
+ }
+
+ public AlgorithmIdentifier GetMacAlgorithm()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject != null)
+ {
+ Asn1SequenceParser o = (Asn1SequenceParser)nextObject;
+ nextObject = null;
+ return AlgorithmIdentifier.GetInstance(o.ToAsn1Object());
+ }
+
+ return null;
+ }
+
+ public AlgorithmIdentifier GetDigestAlgorithm()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject is Asn1TaggedObjectParser)
+ {
+ AlgorithmIdentifier obj = AlgorithmIdentifier.GetInstance(
+ (Asn1TaggedObject)nextObject.ToAsn1Object(), false);
+ nextObject = null;
+ return obj;
+ }
+
+ return null;
+ }
+
+ public ContentInfoParser GetEnapsulatedContentInfo()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject != null)
+ {
+ Asn1SequenceParser o = (Asn1SequenceParser)nextObject;
+ nextObject = null;
+ return new ContentInfoParser(o);
+ }
+
+ return null;
+ }
+
+ public Asn1SetParser GetAuthAttrs()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject is Asn1TaggedObjectParser o)
+ {
+ nextObject = null;
+ return (Asn1SetParser)Asn1Utilities.ParseContextBaseUniversal(o, 2, false, Asn1Tags.SetOf);
+ }
+
+ return null;
+ }
+
+ public Asn1OctetString GetMac()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ IAsn1Convertible o = nextObject;
+ nextObject = null;
+
+ return Asn1OctetString.GetInstance(o.ToAsn1Object());
+ }
+
+ public Asn1SetParser GetUnauthAttrs()
+ {
+ if (nextObject == null)
+ {
+ nextObject = seq.ReadObject();
+ }
+
+ if (nextObject != null)
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject)nextObject;
+ nextObject = null;
+ return (Asn1SetParser)Asn1Utilities.ParseContextBaseUniversal(o, 3, false, Asn1Tags.SetOf);
+ }
+
+ return null;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedDataParser.cs.meta
new file mode 100644
index 00000000..2d983dad
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/AuthenticatedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2c19c2da6a0d2194e86593aad8a68c87
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSAttributes.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSAttributes.cs
new file mode 100644
index 00000000..3d70670b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSAttributes.cs
@@ -0,0 +1,18 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public abstract class CmsAttributes
+ {
+ public static readonly DerObjectIdentifier ContentType = PkcsObjectIdentifiers.Pkcs9AtContentType;
+ public static readonly DerObjectIdentifier MessageDigest = PkcsObjectIdentifiers.Pkcs9AtMessageDigest;
+ public static readonly DerObjectIdentifier SigningTime = PkcsObjectIdentifiers.Pkcs9AtSigningTime;
+ public static readonly DerObjectIdentifier CounterSignature = PkcsObjectIdentifiers.Pkcs9AtCounterSignature;
+ public static readonly DerObjectIdentifier ContentHint = PkcsObjectIdentifiers.IdAAContentHint;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSAttributes.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSAttributes.cs.meta
new file mode 100644
index 00000000..8247d40f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSAttributes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3536faf70205ac240a1f81abacaa70b7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSObjectIdentifiers.cs
new file mode 100644
index 00000000..f1ec2cfb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSObjectIdentifiers.cs
@@ -0,0 +1,33 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public abstract class CmsObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier Data = PkcsObjectIdentifiers.Data;
+ public static readonly DerObjectIdentifier SignedData = PkcsObjectIdentifiers.SignedData;
+ public static readonly DerObjectIdentifier EnvelopedData = PkcsObjectIdentifiers.EnvelopedData;
+ public static readonly DerObjectIdentifier SignedAndEnvelopedData = PkcsObjectIdentifiers.SignedAndEnvelopedData;
+ public static readonly DerObjectIdentifier DigestedData = PkcsObjectIdentifiers.DigestedData;
+ public static readonly DerObjectIdentifier EncryptedData = PkcsObjectIdentifiers.EncryptedData;
+ public static readonly DerObjectIdentifier AuthenticatedData = PkcsObjectIdentifiers.IdCTAuthData;
+ public static readonly DerObjectIdentifier CompressedData = PkcsObjectIdentifiers.IdCTCompressedData;
+ public static readonly DerObjectIdentifier AuthEnvelopedData = PkcsObjectIdentifiers.IdCTAuthEnvelopedData;
+ public static readonly DerObjectIdentifier TimestampedData = PkcsObjectIdentifiers.IdCTTimestampedData;
+ public static readonly DerObjectIdentifier ZlibCompress = PkcsObjectIdentifiers.IdAlgZlibCompress;
+
+ /**
+ * The other Revocation Info arc
+ * id-ri OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
+ * dod(6) internet(1) security(5) mechanisms(5) pkix(7) ri(16) }
+ */
+ public static readonly DerObjectIdentifier id_ri = new DerObjectIdentifier("1.3.6.1.5.5.7.16");
+
+ public static readonly DerObjectIdentifier id_ri_ocsp_response = id_ri.Branch("2");
+ public static readonly DerObjectIdentifier id_ri_scvp = id_ri.Branch("4");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..c25b52d2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CMSObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fb16ff4f1005f3c43b3f3b7527cef3c5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedData.cs
new file mode 100644
index 00000000..186f8297
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedData.cs
@@ -0,0 +1,100 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ /**
+ * RFC 3274 - CMS Compressed Data.
+ *
+ * CompressedData ::= Sequence {
+ * version CMSVersion,
+ * compressionAlgorithm CompressionAlgorithmIdentifier,
+ * encapContentInfo EncapsulatedContentInfo
+ * }
+ *
+ */
+ public class CompressedData
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private AlgorithmIdentifier compressionAlgorithm;
+ private ContentInfo encapContentInfo;
+
+ public CompressedData(
+ AlgorithmIdentifier compressionAlgorithm,
+ ContentInfo encapContentInfo)
+ {
+ this.version = new DerInteger(0);
+ this.compressionAlgorithm = compressionAlgorithm;
+ this.encapContentInfo = encapContentInfo;
+ }
+
+ public CompressedData(
+ Asn1Sequence seq)
+ {
+ this.version = (DerInteger) seq[0];
+ this.compressionAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
+ this.encapContentInfo = ContentInfo.GetInstance(seq[2]);
+ }
+
+ /**
+ * return a CompressedData object from a tagged object.
+ *
+ * @param ato the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static CompressedData GetInstance(
+ Asn1TaggedObject ato,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(ato, explicitly));
+ }
+
+ /**
+ * return a CompressedData object from the given object.
+ *
+ * @param _obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static CompressedData GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CompressedData)
+ return (CompressedData)obj;
+
+ if (obj is Asn1Sequence)
+ return new CompressedData((Asn1Sequence) obj);
+
+ throw new ArgumentException("Invalid CompressedData: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public AlgorithmIdentifier CompressionAlgorithmIdentifier
+ {
+ get { return compressionAlgorithm; }
+ }
+
+ public ContentInfo EncapContentInfo
+ {
+ get { return encapContentInfo; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new BerSequence(version, compressionAlgorithm, encapContentInfo);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedData.cs.meta
new file mode 100644
index 00000000..5e191ca3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9457f0c939bd3a64db91f73728493334
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedDataParser.cs
new file mode 100644
index 00000000..7059747c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedDataParser.cs
@@ -0,0 +1,51 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ /**
+ * RFC 3274 - CMS Compressed Data.
+ *
+ * CompressedData ::= SEQUENCE {
+ * version CMSVersion,
+ * compressionAlgorithm CompressionAlgorithmIdentifier,
+ * encapContentInfo EncapsulatedContentInfo
+ * }
+ *
+ */
+ public class CompressedDataParser
+ {
+ private DerInteger _version;
+ private AlgorithmIdentifier _compressionAlgorithm;
+ private ContentInfoParser _encapContentInfo;
+
+ public CompressedDataParser(
+ Asn1SequenceParser seq)
+ {
+ this._version = (DerInteger)seq.ReadObject();
+ this._compressionAlgorithm = AlgorithmIdentifier.GetInstance(seq.ReadObject().ToAsn1Object());
+ this._encapContentInfo = new ContentInfoParser((Asn1SequenceParser)seq.ReadObject());
+ }
+
+ public DerInteger Version
+ {
+ get { return _version; }
+ }
+
+ public AlgorithmIdentifier CompressionAlgorithmIdentifier
+ {
+ get { return _compressionAlgorithm; }
+ }
+
+ public ContentInfoParser GetEncapContentInfo()
+ {
+ return _encapContentInfo;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedDataParser.cs.meta
new file mode 100644
index 00000000..110dc790
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/CompressedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3793ea5a61cce8e469fa9dc164e95a48
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfo.cs
new file mode 100644
index 00000000..cbad3fab
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfo.cs
@@ -0,0 +1,91 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class ContentInfo
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier contentType;
+ private readonly Asn1Encodable content;
+
+ public static ContentInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is ContentInfo)
+ return (ContentInfo) obj;
+
+ if (obj is Asn1Sequence)
+ return new ContentInfo((Asn1Sequence) obj);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public static ContentInfo GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ private ContentInfo(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 1 || seq.Count > 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ contentType = (DerObjectIdentifier) seq[0];
+
+ if (seq.Count > 1)
+ {
+ Asn1TaggedObject tagged = (Asn1TaggedObject) seq[1];
+ if (!tagged.IsExplicit() || tagged.TagNo != 0)
+ throw new ArgumentException("Bad tag for 'content'", "seq");
+
+ content = tagged.GetObject();
+ }
+ }
+
+ public ContentInfo(
+ DerObjectIdentifier contentType,
+ Asn1Encodable content)
+ {
+ this.contentType = contentType;
+ this.content = content;
+ }
+
+ public DerObjectIdentifier ContentType
+ {
+ get { return contentType; }
+ }
+
+ public Asn1Encodable Content
+ {
+ get { return content; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * ContentInfo ::= Sequence {
+ * contentType ContentType,
+ * content
+ * [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(contentType);
+
+ if (content != null)
+ {
+ v.Add(new BerTaggedObject(0, content));
+ }
+
+ return new BerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfo.cs.meta
new file mode 100644
index 00000000..5f98da7f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 60dc726915386494a93527c45d350449
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfoParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfoParser.cs
new file mode 100644
index 00000000..ae701e41
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfoParser.cs
@@ -0,0 +1,44 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * ContentInfo ::= SEQUENCE {
+ * contentType ContentType,
+ * content
+ * [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+ *
+ */
+ public class ContentInfoParser
+ {
+ private readonly DerObjectIdentifier m_contentType;
+ private readonly Asn1TaggedObjectParser m_content;
+
+ public ContentInfoParser(Asn1SequenceParser seq)
+ {
+ m_contentType = (DerObjectIdentifier)seq.ReadObject();
+ m_content = (Asn1TaggedObjectParser)seq.ReadObject();
+ }
+
+ public DerObjectIdentifier ContentType
+ {
+ get { return m_contentType; }
+ }
+
+ public IAsn1Convertible GetContent(int tag)
+ {
+ if (null == m_content)
+ return null;
+
+ // TODO[cms] Ideally we could enforce the claimed tag
+ //return Asn1Utilities.ParseContextBaseUniversal(content, 0, true, tag);
+ return Asn1Utilities.ParseExplicitContextBaseObject(m_content, 0);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfoParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfoParser.cs.meta
new file mode 100644
index 00000000..ddafed92
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ContentInfoParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ea9252b7438c0be4391421c0b342301d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfo.cs
new file mode 100644
index 00000000..85145871
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfo.cs
@@ -0,0 +1,98 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class EncryptedContentInfo
+ : Asn1Encodable
+ {
+ private DerObjectIdentifier contentType;
+ private AlgorithmIdentifier contentEncryptionAlgorithm;
+ private Asn1OctetString encryptedContent;
+
+ public EncryptedContentInfo(
+ DerObjectIdentifier contentType,
+ AlgorithmIdentifier contentEncryptionAlgorithm,
+ Asn1OctetString encryptedContent)
+ {
+ this.contentType = contentType;
+ this.contentEncryptionAlgorithm = contentEncryptionAlgorithm;
+ this.encryptedContent = encryptedContent;
+ }
+
+ public EncryptedContentInfo(
+ Asn1Sequence seq)
+ {
+ contentType = (DerObjectIdentifier) seq[0];
+ contentEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
+
+ if (seq.Count > 2)
+ {
+ encryptedContent = Asn1OctetString.GetInstance(
+ (Asn1TaggedObject) seq[2], false);
+ }
+ }
+
+ /**
+ * return an EncryptedContentInfo object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static EncryptedContentInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is EncryptedContentInfo)
+ return (EncryptedContentInfo)obj;
+
+ if (obj is Asn1Sequence)
+ return new EncryptedContentInfo((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid EncryptedContentInfo: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public DerObjectIdentifier ContentType
+ {
+ get { return contentType; }
+ }
+
+ public AlgorithmIdentifier ContentEncryptionAlgorithm
+ {
+ get { return contentEncryptionAlgorithm; }
+ }
+
+ public Asn1OctetString EncryptedContent
+ {
+ get { return encryptedContent; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * EncryptedContentInfo ::= Sequence {
+ * contentType ContentType,
+ * contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ * encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ contentType, contentEncryptionAlgorithm);
+
+ if (encryptedContent != null)
+ {
+ v.Add(new BerTaggedObject(false, 0, encryptedContent));
+ }
+
+ return new BerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfo.cs.meta
new file mode 100644
index 00000000..6d13e8c5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3bad0f2b4823f394ca2aa0ff2f31de2c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfoParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfoParser.cs
new file mode 100644
index 00000000..a03a2ad7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfoParser.cs
@@ -0,0 +1,50 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ /**
+ *
+ * EncryptedContentInfo ::= SEQUENCE {
+ * contentType ContentType,
+ * contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ * encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ * }
+ *
+ */
+ public class EncryptedContentInfoParser
+ {
+ private DerObjectIdentifier _contentType;
+ private AlgorithmIdentifier _contentEncryptionAlgorithm;
+ private Asn1TaggedObjectParser _encryptedContent;
+
+ public EncryptedContentInfoParser(
+ Asn1SequenceParser seq)
+ {
+ _contentType = (DerObjectIdentifier)seq.ReadObject();
+ _contentEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq.ReadObject().ToAsn1Object());
+ _encryptedContent = (Asn1TaggedObjectParser)seq.ReadObject();
+ }
+
+ public DerObjectIdentifier ContentType
+ {
+ get { return _contentType; }
+ }
+
+ public AlgorithmIdentifier ContentEncryptionAlgorithm
+ {
+ get { return _contentEncryptionAlgorithm; }
+ }
+
+ public IAsn1Convertible GetEncryptedContent(
+ int tag)
+ {
+ return Asn1Utilities.ParseContextBaseUniversal(_encryptedContent, 0, false, tag);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfoParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfoParser.cs.meta
new file mode 100644
index 00000000..0c05c583
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedContentInfoParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1bfe6014042c4844687f17cbad385878
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedData.cs
new file mode 100644
index 00000000..0ffb6196
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedData.cs
@@ -0,0 +1,101 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class EncryptedData
+ : Asn1Encodable
+ {
+ private readonly DerInteger version;
+ private readonly EncryptedContentInfo encryptedContentInfo;
+ private readonly Asn1Set unprotectedAttrs;
+
+ public static EncryptedData GetInstance(
+ object obj)
+ {
+ if (obj is EncryptedData)
+ return (EncryptedData) obj;
+
+ if (obj is Asn1Sequence)
+ return new EncryptedData((Asn1Sequence) obj);
+
+ throw new ArgumentException("Invalid EncryptedData: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public EncryptedData(
+ EncryptedContentInfo encInfo)
+ : this(encInfo, null)
+ {
+ }
+
+ public EncryptedData(
+ EncryptedContentInfo encInfo,
+ Asn1Set unprotectedAttrs)
+ {
+ if (encInfo == null)
+ throw new ArgumentNullException("encInfo");
+
+ this.version = new DerInteger((unprotectedAttrs == null) ? 0 : 2);
+ this.encryptedContentInfo = encInfo;
+ this.unprotectedAttrs = unprotectedAttrs;
+ }
+
+ private EncryptedData(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count < 2 || seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.version = DerInteger.GetInstance(seq[0]);
+ this.encryptedContentInfo = EncryptedContentInfo.GetInstance(seq[1]);
+
+ if (seq.Count > 2)
+ {
+ this.unprotectedAttrs = Asn1Set.GetInstance((Asn1TaggedObject)seq[2], false);
+ }
+ }
+
+ public virtual DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public virtual EncryptedContentInfo EncryptedContentInfo
+ {
+ get { return encryptedContentInfo; }
+ }
+
+ public virtual Asn1Set UnprotectedAttrs
+ {
+ get { return unprotectedAttrs; }
+ }
+
+ /**
+ *
+ * EncryptedData ::= SEQUENCE {
+ * version CMSVersion,
+ * encryptedContentInfo EncryptedContentInfo,
+ * unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version, encryptedContentInfo);
+
+ if (unprotectedAttrs != null)
+ {
+ v.Add(new BerTaggedObject(false, 1, unprotectedAttrs));
+ }
+
+ return new BerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedData.cs.meta
new file mode 100644
index 00000000..2308a4eb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EncryptedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e831d81ebdc6d1049bda28344baa9e4a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedData.cs
new file mode 100644
index 00000000..7c1924f1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedData.cs
@@ -0,0 +1,165 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class EnvelopedData
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private OriginatorInfo originatorInfo;
+ private Asn1Set recipientInfos;
+ private EncryptedContentInfo encryptedContentInfo;
+ private Asn1Set unprotectedAttrs;
+
+ public EnvelopedData(
+ OriginatorInfo originatorInfo,
+ Asn1Set recipientInfos,
+ EncryptedContentInfo encryptedContentInfo,
+ Asn1Set unprotectedAttrs)
+ {
+ this.version = new DerInteger(CalculateVersion(originatorInfo, recipientInfos, unprotectedAttrs));
+ this.originatorInfo = originatorInfo;
+ this.recipientInfos = recipientInfos;
+ this.encryptedContentInfo = encryptedContentInfo;
+ this.unprotectedAttrs = unprotectedAttrs;
+ }
+
+ public EnvelopedData(
+ OriginatorInfo originatorInfo,
+ Asn1Set recipientInfos,
+ EncryptedContentInfo encryptedContentInfo,
+ Attributes unprotectedAttrs)
+ {
+ this.version = new DerInteger(CalculateVersion(originatorInfo, recipientInfos, Asn1Set.GetInstance(unprotectedAttrs)));
+ this.originatorInfo = originatorInfo;
+ this.recipientInfos = recipientInfos;
+ this.encryptedContentInfo = encryptedContentInfo;
+ this.unprotectedAttrs = Asn1Set.GetInstance(unprotectedAttrs);
+ }
+
+ private EnvelopedData(Asn1Sequence seq)
+ {
+ int index = 0;
+
+ version = (DerInteger) seq[index++];
+
+ object tmp = seq[index++];
+
+ if (tmp is Asn1TaggedObject)
+ {
+ originatorInfo = OriginatorInfo.GetInstance((Asn1TaggedObject) tmp, false);
+ tmp = seq[index++];
+ }
+
+ recipientInfos = Asn1Set.GetInstance(tmp);
+ encryptedContentInfo = EncryptedContentInfo.GetInstance(seq[index++]);
+
+ if (seq.Count > index)
+ {
+ unprotectedAttrs = Asn1Set.GetInstance((Asn1TaggedObject) seq[index], false);
+ }
+ }
+
+ /**
+ * return an EnvelopedData object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static EnvelopedData GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ /**
+ * return an EnvelopedData object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static EnvelopedData GetInstance(
+ object obj)
+ {
+ if (obj is EnvelopedData)
+ return (EnvelopedData)obj;
+ if (obj == null)
+ return null;
+ return new EnvelopedData(Asn1Sequence.GetInstance(obj));
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public OriginatorInfo OriginatorInfo
+ {
+ get { return originatorInfo; }
+ }
+
+ public Asn1Set RecipientInfos
+ {
+ get { return recipientInfos; }
+ }
+
+ public EncryptedContentInfo EncryptedContentInfo
+ {
+ get { return encryptedContentInfo; }
+ }
+
+ public Asn1Set UnprotectedAttrs
+ {
+ get { return unprotectedAttrs; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * EnvelopedData ::= Sequence {
+ * version CMSVersion,
+ * originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ * recipientInfos RecipientInfos,
+ * encryptedContentInfo EncryptedContentInfo,
+ * unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version);
+ v.AddOptionalTagged(false, 0, originatorInfo);
+ v.Add(recipientInfos, encryptedContentInfo);
+ v.AddOptionalTagged(false, 1, unprotectedAttrs);
+ return new BerSequence(v);
+ }
+
+ public static int CalculateVersion(OriginatorInfo originatorInfo, Asn1Set recipientInfos, Asn1Set unprotectedAttrs)
+ {
+ if (originatorInfo != null || unprotectedAttrs != null)
+ {
+ return 2;
+ }
+
+ foreach (object o in recipientInfos)
+ {
+ RecipientInfo ri = RecipientInfo.GetInstance(o);
+
+ if (!ri.Version.HasValue(0))
+ {
+ return 2;
+ }
+ }
+
+ return 0;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedData.cs.meta
new file mode 100644
index 00000000..ad239a01
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 888a33b285e27814b89fea6c91204f49
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedDataParser.cs
new file mode 100644
index 00000000..feea1c40
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedDataParser.cs
@@ -0,0 +1,113 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * EnvelopedData ::= SEQUENCE {
+ * version CMSVersion,
+ * originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ * recipientInfos RecipientInfos,
+ * encryptedContentInfo EncryptedContentInfo,
+ * unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ * }
+ *
+ */
+ public class EnvelopedDataParser
+ {
+ private Asn1SequenceParser _seq;
+ private DerInteger _version;
+ private IAsn1Convertible _nextObject;
+ private bool _originatorInfoCalled;
+
+ public EnvelopedDataParser(
+ Asn1SequenceParser seq)
+ {
+ this._seq = seq;
+ this._version = (DerInteger)seq.ReadObject();
+ }
+
+ public DerInteger Version
+ {
+ get { return _version; }
+ }
+
+ public OriginatorInfo GetOriginatorInfo()
+ {
+ _originatorInfoCalled = true;
+
+ if (_nextObject == null)
+ {
+ _nextObject = _seq.ReadObject();
+ }
+
+ if (_nextObject is Asn1TaggedObjectParser o)
+ {
+ if (o.HasContextTag(0))
+ {
+ Asn1SequenceParser originatorInfo = (Asn1SequenceParser)o.ParseBaseUniversal(false, Asn1Tags.Sequence);
+ _nextObject = null;
+ return OriginatorInfo.GetInstance(originatorInfo.ToAsn1Object());
+ }
+ }
+
+ return null;
+ }
+
+ public Asn1SetParser GetRecipientInfos()
+ {
+ if (!_originatorInfoCalled)
+ {
+ GetOriginatorInfo();
+ }
+
+ if (_nextObject == null)
+ {
+ _nextObject = _seq.ReadObject();
+ }
+
+ Asn1SetParser recipientInfos = (Asn1SetParser)_nextObject;
+ _nextObject = null;
+ return recipientInfos;
+ }
+
+ public EncryptedContentInfoParser GetEncryptedContentInfo()
+ {
+ if (_nextObject == null)
+ {
+ _nextObject = _seq.ReadObject();
+ }
+
+ if (_nextObject != null)
+ {
+ Asn1SequenceParser o = (Asn1SequenceParser) _nextObject;
+ _nextObject = null;
+ return new EncryptedContentInfoParser(o);
+ }
+
+ return null;
+ }
+
+ public Asn1SetParser GetUnprotectedAttrs()
+ {
+ if (_nextObject == null)
+ {
+ _nextObject = _seq.ReadObject();
+ }
+
+ if (_nextObject != null)
+ {
+ Asn1TaggedObjectParser o = (Asn1TaggedObjectParser)_nextObject;
+ _nextObject = null;
+ return (Asn1SetParser)Asn1Utilities.ParseContextBaseUniversal(o, 1, false, Asn1Tags.SetOf);
+ }
+
+ return null;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedDataParser.cs.meta
new file mode 100644
index 00000000..d4ee2ca6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/EnvelopedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bc54f1f2ca7d7ae499634d13c6c8aaa7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Evidence.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Evidence.cs
new file mode 100644
index 00000000..85c2e93a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Evidence.cs
@@ -0,0 +1,77 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class Evidence
+ : Asn1Encodable, IAsn1Choice
+ {
+ private TimeStampTokenEvidence tstEvidence;
+ private Asn1Sequence otherEvidence;
+
+ public Evidence(TimeStampTokenEvidence tstEvidence)
+ {
+ this.tstEvidence = tstEvidence;
+ }
+
+ private Evidence(Asn1TaggedObject tagged)
+ {
+ if (tagged.TagNo == 0)
+ {
+ this.tstEvidence = TimeStampTokenEvidence.GetInstance(tagged, false);
+ }
+ //else if (tagged.TagNo == 1)
+ //{
+ // this.ersEvidence = EvidenceRecord.GetInstance(tagged, false);
+ //}
+ else if (tagged.TagNo == 2)
+ {
+ this.otherEvidence = Asn1Sequence.GetInstance(tagged, false);
+ }
+ else
+ {
+ throw new ArgumentException("unknown tag in Evidence", "tagged");
+ }
+ }
+
+ public static Evidence GetInstance(object obj)
+ {
+ if (obj is Evidence)
+ return (Evidence)obj;
+
+ if (obj is Asn1TaggedObject)
+ return new Evidence(Asn1TaggedObject.GetInstance(obj));
+
+ throw new ArgumentException("Unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static Evidence GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(obj.GetObject()); // must be explicitly tagged
+ }
+
+ public virtual TimeStampTokenEvidence TstEvidence
+ {
+ get { return tstEvidence; }
+ }
+
+ //public EvidenceRecord ErsEvidence
+ //{
+ // get { return ersEvidence; }
+ //}
+
+ public override Asn1Object ToAsn1Object()
+ {
+ if (tstEvidence != null)
+ return new DerTaggedObject(false, 0, tstEvidence);
+ //if (ersEvidence != null)
+ // return new DerTaggedObject(false, 1, ersEvidence);
+ return new DerTaggedObject(false, 2, otherEvidence);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Evidence.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Evidence.cs.meta
new file mode 100644
index 00000000..05679150
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Evidence.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e0d0b98dea935524fba0aaa44e38d720
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/IssuerAndSerialNumber.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/IssuerAndSerialNumber.cs
new file mode 100644
index 00000000..66a46c87
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/IssuerAndSerialNumber.cs
@@ -0,0 +1,65 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class IssuerAndSerialNumber
+ : Asn1Encodable
+ {
+ private X509Name name;
+ private DerInteger serialNumber;
+
+ public static IssuerAndSerialNumber GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+ IssuerAndSerialNumber existing = obj as IssuerAndSerialNumber;
+ if (existing != null)
+ return existing;
+ return new IssuerAndSerialNumber(Asn1Sequence.GetInstance(obj));
+ }
+
+ private IssuerAndSerialNumber(Asn1Sequence seq)
+ {
+ this.name = X509Name.GetInstance(seq[0]);
+ this.serialNumber = (DerInteger) seq[1];
+ }
+
+ public IssuerAndSerialNumber(
+ X509Name name,
+ BigInteger serialNumber)
+ {
+ this.name = name;
+ this.serialNumber = new DerInteger(serialNumber);
+ }
+
+ public IssuerAndSerialNumber(
+ X509Name name,
+ DerInteger serialNumber)
+ {
+ this.name = name;
+ this.serialNumber = serialNumber;
+ }
+
+ public X509Name Name
+ {
+ get { return name; }
+ }
+
+ public DerInteger SerialNumber
+ {
+ get { return serialNumber; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(name, serialNumber);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/IssuerAndSerialNumber.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/IssuerAndSerialNumber.cs.meta
new file mode 100644
index 00000000..c10ebbfd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/IssuerAndSerialNumber.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ae24f598301e6d245954af2b9f8c72f4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKIdentifier.cs
new file mode 100644
index 00000000..11739989
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKIdentifier.cs
@@ -0,0 +1,123 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class KekIdentifier
+ : Asn1Encodable
+ {
+ private Asn1OctetString keyIdentifier;
+ private Asn1GeneralizedTime date;
+ private OtherKeyAttribute other;
+
+ public KekIdentifier(
+ byte[] keyIdentifier,
+ Asn1GeneralizedTime date,
+ OtherKeyAttribute other)
+ {
+ this.keyIdentifier = new DerOctetString(keyIdentifier);
+ this.date = date;
+ this.other = other;
+ }
+
+ public KekIdentifier(
+ Asn1Sequence seq)
+ {
+ keyIdentifier = (Asn1OctetString) seq[0];
+
+ switch (seq.Count)
+ {
+ case 1:
+ break;
+ case 2:
+ if (seq[1] is Asn1GeneralizedTime)
+ {
+ date = (Asn1GeneralizedTime) seq[1];
+ }
+ else
+ {
+ other = OtherKeyAttribute.GetInstance(seq[2]);
+ }
+ break;
+ case 3:
+ date = (Asn1GeneralizedTime) seq[1];
+ other = OtherKeyAttribute.GetInstance(seq[2]);
+ break;
+ default:
+ throw new ArgumentException("Invalid KekIdentifier");
+ }
+ }
+
+ /**
+ * return a KekIdentifier object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static KekIdentifier GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ /**
+ * return a KekIdentifier object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static KekIdentifier GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is KekIdentifier)
+ return (KekIdentifier)obj;
+
+ if (obj is Asn1Sequence)
+ return new KekIdentifier((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid KekIdentifier: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public Asn1OctetString KeyIdentifier
+ {
+ get { return keyIdentifier; }
+ }
+
+ public Asn1GeneralizedTime Date
+ {
+ get { return date; }
+ }
+
+ public OtherKeyAttribute Other
+ {
+ get { return other; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KekIdentifier ::= Sequence {
+ * keyIdentifier OCTET STRING,
+ * date GeneralizedTime OPTIONAL,
+ * other OtherKeyAttribute OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(keyIdentifier);
+ v.AddOptional(date, other);
+ return new DerSequence(v);
+ }
+ }
+}
+
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKIdentifier.cs.meta
new file mode 100644
index 00000000..e9b8b511
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 61cf57550f3fe8245aa52a6fda2b863c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKRecipientInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKRecipientInfo.cs
new file mode 100644
index 00000000..1f603f2a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKRecipientInfo.cs
@@ -0,0 +1,110 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class KekRecipientInfo
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private KekIdentifier kekID;
+ private AlgorithmIdentifier keyEncryptionAlgorithm;
+ private Asn1OctetString encryptedKey;
+
+ public KekRecipientInfo(
+ KekIdentifier kekID,
+ AlgorithmIdentifier keyEncryptionAlgorithm,
+ Asn1OctetString encryptedKey)
+ {
+ this.version = new DerInteger(4);
+ this.kekID = kekID;
+ this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
+ this.encryptedKey = encryptedKey;
+ }
+
+ public KekRecipientInfo(
+ Asn1Sequence seq)
+ {
+ version = (DerInteger) seq[0];
+ kekID = KekIdentifier.GetInstance(seq[1]);
+ keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]);
+ encryptedKey = (Asn1OctetString) seq[3];
+ }
+
+ /**
+ * return a KekRecipientInfo object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static KekRecipientInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ /**
+ * return a KekRecipientInfo object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static KekRecipientInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is KekRecipientInfo)
+ return (KekRecipientInfo)obj;
+
+ if(obj is Asn1Sequence)
+ return new KekRecipientInfo((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid KekRecipientInfo: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public KekIdentifier KekID
+ {
+ get { return kekID; }
+ }
+
+ public AlgorithmIdentifier KeyEncryptionAlgorithm
+ {
+ get { return keyEncryptionAlgorithm; }
+ }
+
+ public Asn1OctetString EncryptedKey
+ {
+ get { return encryptedKey; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KekRecipientInfo ::= Sequence {
+ * version CMSVersion, -- always set to 4
+ * kekID KekIdentifier,
+ * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ * encryptedKey EncryptedKey
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(version, kekID, keyEncryptionAlgorithm, encryptedKey);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKRecipientInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKRecipientInfo.cs.meta
new file mode 100644
index 00000000..16dea8a0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KEKRecipientInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 078b20050375049498516d9b8d758480
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientIdentifier.cs
new file mode 100644
index 00000000..afa5dc6b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientIdentifier.cs
@@ -0,0 +1,98 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class KeyAgreeRecipientIdentifier
+ : Asn1Encodable, IAsn1Choice
+ {
+ /**
+ * return an KeyAgreeRecipientIdentifier object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param isExplicit true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static KeyAgreeRecipientIdentifier GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * return an KeyAgreeRecipientIdentifier object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static KeyAgreeRecipientIdentifier GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is KeyAgreeRecipientIdentifier)
+ return (KeyAgreeRecipientIdentifier)obj;
+
+ if (obj is Asn1Sequence)
+ return new KeyAgreeRecipientIdentifier(IssuerAndSerialNumber.GetInstance(obj));
+
+ if (obj is Asn1TaggedObject && ((Asn1TaggedObject)obj).TagNo == 0)
+ {
+ return new KeyAgreeRecipientIdentifier(RecipientKeyIdentifier.GetInstance(
+ (Asn1TaggedObject)obj, false));
+ }
+
+ throw new ArgumentException("Invalid KeyAgreeRecipientIdentifier: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private readonly IssuerAndSerialNumber issuerSerial;
+ private readonly RecipientKeyIdentifier rKeyID;
+
+ public KeyAgreeRecipientIdentifier(
+ IssuerAndSerialNumber issuerSerial)
+ {
+ this.issuerSerial = issuerSerial;
+ }
+
+ public KeyAgreeRecipientIdentifier(
+ RecipientKeyIdentifier rKeyID)
+ {
+ this.rKeyID = rKeyID;
+ }
+
+ public IssuerAndSerialNumber IssuerAndSerialNumber
+ {
+ get { return issuerSerial; }
+ }
+
+ public RecipientKeyIdentifier RKeyID
+ {
+ get { return rKeyID; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KeyAgreeRecipientIdentifier ::= CHOICE {
+ * issuerAndSerialNumber IssuerAndSerialNumber,
+ * rKeyId [0] IMPLICIT RecipientKeyIdentifier
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (issuerSerial != null)
+ {
+ return issuerSerial.ToAsn1Object();
+ }
+
+ return new DerTaggedObject(false, 0, rKeyID);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientIdentifier.cs.meta
new file mode 100644
index 00000000..55d04965
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 31df2eb3dc66bac439bb35b6655efd96
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientInfo.cs
new file mode 100644
index 00000000..1520f9de
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientInfo.cs
@@ -0,0 +1,138 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class KeyAgreeRecipientInfo
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private OriginatorIdentifierOrKey originator;
+ private Asn1OctetString ukm;
+ private AlgorithmIdentifier keyEncryptionAlgorithm;
+ private Asn1Sequence recipientEncryptedKeys;
+
+ public KeyAgreeRecipientInfo(
+ OriginatorIdentifierOrKey originator,
+ Asn1OctetString ukm,
+ AlgorithmIdentifier keyEncryptionAlgorithm,
+ Asn1Sequence recipientEncryptedKeys)
+ {
+ this.version = new DerInteger(3);
+ this.originator = originator;
+ this.ukm = ukm;
+ this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
+ this.recipientEncryptedKeys = recipientEncryptedKeys;
+ }
+
+ public KeyAgreeRecipientInfo(
+ Asn1Sequence seq)
+ {
+ int index = 0;
+
+ version = (DerInteger) seq[index++];
+ originator = OriginatorIdentifierOrKey.GetInstance(
+ (Asn1TaggedObject) seq[index++], true);
+
+ if (seq[index] is Asn1TaggedObject)
+ {
+ ukm = Asn1OctetString.GetInstance(
+ (Asn1TaggedObject) seq[index++], true);
+ }
+
+ keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(
+ seq[index++]);
+
+ recipientEncryptedKeys = (Asn1Sequence) seq[index++];
+ }
+
+ /**
+ * return a KeyAgreeRecipientInfo object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static KeyAgreeRecipientInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ /**
+ * return a KeyAgreeRecipientInfo object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static KeyAgreeRecipientInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is KeyAgreeRecipientInfo)
+ return (KeyAgreeRecipientInfo)obj;
+
+ if (obj is Asn1Sequence)
+ return new KeyAgreeRecipientInfo((Asn1Sequence)obj);
+
+ throw new ArgumentException(
+ "Illegal object in KeyAgreeRecipientInfo: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public OriginatorIdentifierOrKey Originator
+ {
+ get { return originator; }
+ }
+
+ public Asn1OctetString UserKeyingMaterial
+ {
+ get { return ukm; }
+ }
+
+ public AlgorithmIdentifier KeyEncryptionAlgorithm
+ {
+ get { return keyEncryptionAlgorithm; }
+ }
+
+ public Asn1Sequence RecipientEncryptedKeys
+ {
+ get { return recipientEncryptedKeys; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KeyAgreeRecipientInfo ::= Sequence {
+ * version CMSVersion, -- always set to 3
+ * originator [0] EXPLICIT OriginatorIdentifierOrKey,
+ * ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
+ * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ * recipientEncryptedKeys RecipientEncryptedKeys
+ * }
+ *
+ * UserKeyingMaterial ::= OCTET STRING
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version, new DerTaggedObject(true, 0, originator));
+ v.AddOptionalTagged(true, 1, ukm);
+ v.Add(keyEncryptionAlgorithm, recipientEncryptedKeys);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientInfo.cs.meta
new file mode 100644
index 00000000..13be6214
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyAgreeRecipientInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 34fe33ea8c64d624197ed3c1d6992862
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyTransRecipientInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyTransRecipientInfo.cs
new file mode 100644
index 00000000..b6a4e0e5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyTransRecipientInfo.cs
@@ -0,0 +1,103 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class KeyTransRecipientInfo
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private RecipientIdentifier rid;
+ private AlgorithmIdentifier keyEncryptionAlgorithm;
+ private Asn1OctetString encryptedKey;
+
+ public KeyTransRecipientInfo(
+ RecipientIdentifier rid,
+ AlgorithmIdentifier keyEncryptionAlgorithm,
+ Asn1OctetString encryptedKey)
+ {
+ if (rid.ToAsn1Object() is Asn1TaggedObject)
+ {
+ this.version = new DerInteger(2);
+ }
+ else
+ {
+ this.version = new DerInteger(0);
+ }
+
+ this.rid = rid;
+ this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
+ this.encryptedKey = encryptedKey;
+ }
+
+ public KeyTransRecipientInfo(
+ Asn1Sequence seq)
+ {
+ this.version = (DerInteger) seq[0];
+ this.rid = RecipientIdentifier.GetInstance(seq[1]);
+ this.keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]);
+ this.encryptedKey = (Asn1OctetString) seq[3];
+ }
+
+ /**
+ * return a KeyTransRecipientInfo object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static KeyTransRecipientInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is KeyTransRecipientInfo)
+ return (KeyTransRecipientInfo) obj;
+
+ if(obj is Asn1Sequence)
+ return new KeyTransRecipientInfo((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Illegal object in KeyTransRecipientInfo: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public RecipientIdentifier RecipientIdentifier
+ {
+ get { return rid; }
+ }
+
+ public AlgorithmIdentifier KeyEncryptionAlgorithm
+ {
+ get { return keyEncryptionAlgorithm; }
+ }
+
+ public Asn1OctetString EncryptedKey
+ {
+ get { return encryptedKey; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KeyTransRecipientInfo ::= Sequence {
+ * version CMSVersion, -- always set to 0 or 2
+ * rid RecipientIdentifier,
+ * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ * encryptedKey EncryptedKey
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(version, rid, keyEncryptionAlgorithm, encryptedKey);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyTransRecipientInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyTransRecipientInfo.cs.meta
new file mode 100644
index 00000000..1839a07d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/KeyTransRecipientInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3ecf1fad3a8bf9247bca3ece6b50dcbe
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/MetaData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/MetaData.cs
new file mode 100644
index 00000000..5a753b7e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/MetaData.cs
@@ -0,0 +1,98 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class MetaData
+ : Asn1Encodable
+ {
+ private DerBoolean hashProtected;
+ private DerUtf8String fileName;
+ private DerIA5String mediaType;
+ private Attributes otherMetaData;
+
+ public MetaData(
+ DerBoolean hashProtected,
+ DerUtf8String fileName,
+ DerIA5String mediaType,
+ Attributes otherMetaData)
+ {
+ this.hashProtected = hashProtected;
+ this.fileName = fileName;
+ this.mediaType = mediaType;
+ this.otherMetaData = otherMetaData;
+ }
+
+ private MetaData(Asn1Sequence seq)
+ {
+ this.hashProtected = DerBoolean.GetInstance(seq[0]);
+
+ int index = 1;
+
+ if (index < seq.Count && seq[index] is DerUtf8String)
+ {
+ this.fileName = DerUtf8String.GetInstance(seq[index++]);
+ }
+ if (index < seq.Count && seq[index] is DerIA5String)
+ {
+ this.mediaType = DerIA5String.GetInstance(seq[index++]);
+ }
+ if (index < seq.Count)
+ {
+ this.otherMetaData = Attributes.GetInstance(seq[index++]);
+ }
+ }
+
+ public static MetaData GetInstance(object obj)
+ {
+ if (obj is MetaData)
+ return (MetaData)obj;
+
+ if (obj != null)
+ return new MetaData(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ /**
+ *
+ * MetaData ::= SEQUENCE {
+ * hashProtected BOOLEAN,
+ * fileName UTF8String OPTIONAL,
+ * mediaType IA5String OPTIONAL,
+ * otherMetaData Attributes OPTIONAL
+ * }
+ *
+ * @return
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(hashProtected);
+ v.AddOptional(fileName, mediaType, otherMetaData);
+ return new DerSequence(v);
+ }
+
+ public virtual bool IsHashProtected
+ {
+ get { return hashProtected.IsTrue; }
+ }
+
+ public virtual DerUtf8String FileName
+ {
+ get { return fileName; }
+ }
+
+ public virtual DerIA5String MediaType
+ {
+ get { return mediaType; }
+ }
+
+ public virtual Attributes OtherMetaData
+ {
+ get { return otherMetaData; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/MetaData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/MetaData.cs.meta
new file mode 100644
index 00000000..aa12aefb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/MetaData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d2d072480f8d0a4499b4251e11c11d91
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorIdentifierOrKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorIdentifierOrKey.cs
new file mode 100644
index 00000000..3c1663bf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorIdentifierOrKey.cs
@@ -0,0 +1,148 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class OriginatorIdentifierOrKey
+ : Asn1Encodable, IAsn1Choice
+ {
+ private readonly Asn1Encodable id;
+
+ public OriginatorIdentifierOrKey(IssuerAndSerialNumber id)
+ {
+ this.id = id;
+ }
+
+ public OriginatorIdentifierOrKey(SubjectKeyIdentifier id)
+ {
+ this.id = new DerTaggedObject(false, 0, id);
+ }
+
+ public OriginatorIdentifierOrKey(OriginatorPublicKey id)
+ {
+ this.id = new DerTaggedObject(false, 1, id);
+ }
+
+ private OriginatorIdentifierOrKey(Asn1TaggedObject id)
+ {
+ // TODO Add validation
+ this.id = id;
+ }
+
+ /**
+ * return an OriginatorIdentifierOrKey object from a tagged object.
+ *
+ * @param o the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static OriginatorIdentifierOrKey GetInstance(
+ Asn1TaggedObject o,
+ bool explicitly)
+ {
+ if (!explicitly)
+ {
+ throw new ArgumentException(
+ "Can't implicitly tag OriginatorIdentifierOrKey");
+ }
+
+ return GetInstance(o.GetObject());
+ }
+
+ /**
+ * return an OriginatorIdentifierOrKey object from the given object.
+ *
+ * @param o the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static OriginatorIdentifierOrKey GetInstance(
+ object o)
+ {
+ if (o == null || o is OriginatorIdentifierOrKey)
+ return (OriginatorIdentifierOrKey)o;
+
+ if (o is IssuerAndSerialNumber)
+ return new OriginatorIdentifierOrKey((IssuerAndSerialNumber)o);
+
+ if (o is SubjectKeyIdentifier)
+ return new OriginatorIdentifierOrKey((SubjectKeyIdentifier)o);
+
+ if (o is OriginatorPublicKey)
+ return new OriginatorIdentifierOrKey((OriginatorPublicKey)o);
+
+ if (o is Asn1TaggedObject)
+ return new OriginatorIdentifierOrKey((Asn1TaggedObject)o);
+
+ throw new ArgumentException("Invalid OriginatorIdentifierOrKey: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+
+ public Asn1Encodable ID
+ {
+ get { return id; }
+ }
+
+ public IssuerAndSerialNumber IssuerAndSerialNumber
+ {
+ get
+ {
+ if (id is IssuerAndSerialNumber)
+ {
+ return (IssuerAndSerialNumber)id;
+ }
+
+ return null;
+ }
+ }
+
+ public SubjectKeyIdentifier SubjectKeyIdentifier
+ {
+ get
+ {
+ if (id is Asn1TaggedObject && ((Asn1TaggedObject)id).TagNo == 0)
+ {
+ return SubjectKeyIdentifier.GetInstance((Asn1TaggedObject)id, false);
+ }
+
+ return null;
+ }
+ }
+
+ public OriginatorPublicKey OriginatorPublicKey
+ {
+ get
+ {
+ if (id is Asn1TaggedObject && ((Asn1TaggedObject)id).TagNo == 1)
+ {
+ return OriginatorPublicKey.GetInstance((Asn1TaggedObject)id, false);
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * OriginatorIdentifierOrKey ::= CHOICE {
+ * issuerAndSerialNumber IssuerAndSerialNumber,
+ * subjectKeyIdentifier [0] SubjectKeyIdentifier,
+ * originatorKey [1] OriginatorPublicKey
+ * }
+ *
+ * SubjectKeyIdentifier ::= OCTET STRING
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return id.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorIdentifierOrKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorIdentifierOrKey.cs.meta
new file mode 100644
index 00000000..15ab00ce
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorIdentifierOrKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dc08d582034c58541b6a145196d0002f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorInfo.cs
new file mode 100644
index 00000000..7df256ca
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorInfo.cs
@@ -0,0 +1,116 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class OriginatorInfo
+ : Asn1Encodable
+ {
+ private Asn1Set certs;
+ private Asn1Set crls;
+
+ public OriginatorInfo(
+ Asn1Set certs,
+ Asn1Set crls)
+ {
+ this.certs = certs;
+ this.crls = crls;
+ }
+
+ public OriginatorInfo(
+ Asn1Sequence seq)
+ {
+ switch (seq.Count)
+ {
+ case 0: // empty
+ break;
+ case 1:
+ Asn1TaggedObject o = (Asn1TaggedObject) seq[0];
+ switch (o.TagNo)
+ {
+ case 0 :
+ certs = Asn1Set.GetInstance(o, false);
+ break;
+ case 1 :
+ crls = Asn1Set.GetInstance(o, false);
+ break;
+ default:
+ throw new ArgumentException("Bad tag in OriginatorInfo: " + o.TagNo);
+ }
+ break;
+ case 2:
+ certs = Asn1Set.GetInstance((Asn1TaggedObject) seq[0], false);
+ crls = Asn1Set.GetInstance((Asn1TaggedObject) seq[1], false);
+ break;
+ default:
+ throw new ArgumentException("OriginatorInfo too big");
+ }
+ }
+
+ /**
+ * return an OriginatorInfo object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static OriginatorInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ /**
+ * return an OriginatorInfo object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static OriginatorInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OriginatorInfo)
+ return (OriginatorInfo)obj;
+
+ if (obj is Asn1Sequence)
+ return new OriginatorInfo((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid OriginatorInfo: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public Asn1Set Certificates
+ {
+ get { return certs; }
+ }
+
+ public Asn1Set Crls
+ {
+ get { return crls; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * OriginatorInfo ::= Sequence {
+ * certs [0] IMPLICIT CertificateSet OPTIONAL,
+ * crls [1] IMPLICIT CertificateRevocationLists OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(false, 0, certs);
+ v.AddOptionalTagged(false, 1, crls);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorInfo.cs.meta
new file mode 100644
index 00000000..1a5452bb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3b67e77451499f541ac1eec0c4a94419
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorPublicKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorPublicKey.cs
new file mode 100644
index 00000000..422c1b18
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorPublicKey.cs
@@ -0,0 +1,90 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class OriginatorPublicKey
+ : Asn1Encodable
+ {
+ private readonly AlgorithmIdentifier mAlgorithm;
+ private readonly DerBitString mPublicKey;
+
+ public OriginatorPublicKey(
+ AlgorithmIdentifier algorithm,
+ byte[] publicKey)
+ {
+ this.mAlgorithm = algorithm;
+ this.mPublicKey = new DerBitString(publicKey);
+ }
+
+ private OriginatorPublicKey(Asn1Sequence seq)
+ {
+ this.mAlgorithm = AlgorithmIdentifier.GetInstance(seq[0]);
+ this.mPublicKey = DerBitString.GetInstance(seq[1]);
+ }
+
+ /**
+ * return an OriginatorPublicKey object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static OriginatorPublicKey GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ /**
+ * return an OriginatorPublicKey object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static OriginatorPublicKey GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OriginatorPublicKey)
+ return (OriginatorPublicKey)obj;
+
+ if (obj is Asn1Sequence)
+ return new OriginatorPublicKey(Asn1Sequence.GetInstance(obj));
+
+ throw new ArgumentException("Invalid OriginatorPublicKey: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public AlgorithmIdentifier Algorithm
+ {
+ get { return mAlgorithm; }
+ }
+
+ public DerBitString PublicKey
+ {
+ get { return mPublicKey; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * OriginatorPublicKey ::= Sequence {
+ * algorithm AlgorithmIdentifier,
+ * publicKey BIT STRING
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(mAlgorithm, mPublicKey);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorPublicKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorPublicKey.cs.meta
new file mode 100644
index 00000000..4460f332
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OriginatorPublicKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 901fb85c86fb2bb44bf63a38fb907c76
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherKeyAttribute.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherKeyAttribute.cs
new file mode 100644
index 00000000..491b6f10
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherKeyAttribute.cs
@@ -0,0 +1,74 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class OtherKeyAttribute
+ : Asn1Encodable
+ {
+ private DerObjectIdentifier keyAttrId;
+ private Asn1Encodable keyAttr;
+
+ /**
+ * return an OtherKeyAttribute object from the given object.
+ *
+ * @param o the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static OtherKeyAttribute GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OtherKeyAttribute)
+ return (OtherKeyAttribute) obj;
+
+ if (obj is Asn1Sequence)
+ return new OtherKeyAttribute((Asn1Sequence) obj);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public OtherKeyAttribute(
+ Asn1Sequence seq)
+ {
+ keyAttrId = (DerObjectIdentifier) seq[0];
+ keyAttr = seq[1];
+ }
+
+ public OtherKeyAttribute(
+ DerObjectIdentifier keyAttrId,
+ Asn1Encodable keyAttr)
+ {
+ this.keyAttrId = keyAttrId;
+ this.keyAttr = keyAttr;
+ }
+
+ public DerObjectIdentifier KeyAttrId
+ {
+ get { return keyAttrId; }
+ }
+
+ public Asn1Encodable KeyAttr
+ {
+ get { return keyAttr; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * OtherKeyAttribute ::= Sequence {
+ * keyAttrId OBJECT IDENTIFIER,
+ * keyAttr ANY DEFINED BY keyAttrId OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(keyAttrId, keyAttr);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherKeyAttribute.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherKeyAttribute.cs.meta
new file mode 100644
index 00000000..b62debd8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherKeyAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bce1698247e12b44d9bca522b2d812b7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRecipientInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRecipientInfo.cs
new file mode 100644
index 00000000..b66b2655
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRecipientInfo.cs
@@ -0,0 +1,85 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class OtherRecipientInfo
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier oriType;
+ private readonly Asn1Encodable oriValue;
+
+ public OtherRecipientInfo(
+ DerObjectIdentifier oriType,
+ Asn1Encodable oriValue)
+ {
+ this.oriType = oriType;
+ this.oriValue = oriValue;
+ }
+
+ private OtherRecipientInfo(Asn1Sequence seq)
+ {
+ oriType = DerObjectIdentifier.GetInstance(seq[0]);
+ oriValue = seq[1];
+ }
+
+ /**
+ * return a OtherRecipientInfo object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static OtherRecipientInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ /**
+ * return a OtherRecipientInfo object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static OtherRecipientInfo GetInstance(
+ object obj)
+ {
+ if (obj == null)
+ return null;
+ OtherRecipientInfo existing = obj as OtherRecipientInfo;
+ if (existing != null)
+ return existing;
+ return new OtherRecipientInfo(Asn1Sequence.GetInstance(obj));
+ }
+
+ public virtual DerObjectIdentifier OriType
+ {
+ get { return oriType; }
+ }
+
+ public virtual Asn1Encodable OriValue
+ {
+ get { return oriValue; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * OtherRecipientInfo ::= Sequence {
+ * oriType OBJECT IDENTIFIER,
+ * oriValue ANY DEFINED BY oriType }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(oriType, oriValue);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRecipientInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRecipientInfo.cs.meta
new file mode 100644
index 00000000..0f42bd16
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRecipientInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f1d41e3896d8556499306ab621d44846
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRevocationInfoFormat.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRevocationInfoFormat.cs
new file mode 100644
index 00000000..645970eb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRevocationInfoFormat.cs
@@ -0,0 +1,79 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class OtherRevocationInfoFormat
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier otherRevInfoFormat;
+ private readonly Asn1Encodable otherRevInfo;
+
+ public OtherRevocationInfoFormat(
+ DerObjectIdentifier otherRevInfoFormat,
+ Asn1Encodable otherRevInfo)
+ {
+ this.otherRevInfoFormat = otherRevInfoFormat;
+ this.otherRevInfo = otherRevInfo;
+ }
+
+ private OtherRevocationInfoFormat(Asn1Sequence seq)
+ {
+ otherRevInfoFormat = DerObjectIdentifier.GetInstance(seq[0]);
+ otherRevInfo = seq[1];
+ }
+
+ /**
+ * return a OtherRevocationInfoFormat object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param explicit true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception IllegalArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static OtherRevocationInfoFormat GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * return a OtherRevocationInfoFormat object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception IllegalArgumentException if the object cannot be converted.
+ */
+ public static OtherRevocationInfoFormat GetInstance(object obj)
+ {
+ if (obj is OtherRevocationInfoFormat otherRevocationInfoFormat)
+ return otherRevocationInfoFormat;
+ if (obj != null)
+ return new OtherRevocationInfoFormat(Asn1Sequence.GetInstance(obj));
+ return null;
+ }
+
+ public virtual DerObjectIdentifier InfoFormat
+ {
+ get { return otherRevInfoFormat; }
+ }
+
+ public virtual Asn1Encodable Info
+ {
+ get { return otherRevInfo; }
+ }
+
+ /**
+ * Produce an object suitable for an ASN1OutputStream.
+ *
+ * OtherRevocationInfoFormat ::= SEQUENCE {
+ * otherRevInfoFormat OBJECT IDENTIFIER,
+ * otherRevInfo ANY DEFINED BY otherRevInfoFormat }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(otherRevInfoFormat, otherRevInfo);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRevocationInfoFormat.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRevocationInfoFormat.cs.meta
new file mode 100644
index 00000000..c5c7141f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/OtherRevocationInfoFormat.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6056228d8a0a82849bf87fc2b84bb594
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/PasswordRecipientInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/PasswordRecipientInfo.cs
new file mode 100644
index 00000000..981b5240
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/PasswordRecipientInfo.cs
@@ -0,0 +1,131 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class PasswordRecipientInfo
+ : Asn1Encodable
+ {
+ private readonly DerInteger version;
+ private readonly AlgorithmIdentifier keyDerivationAlgorithm;
+ private readonly AlgorithmIdentifier keyEncryptionAlgorithm;
+ private readonly Asn1OctetString encryptedKey;
+
+ public PasswordRecipientInfo(
+ AlgorithmIdentifier keyEncryptionAlgorithm,
+ Asn1OctetString encryptedKey)
+ {
+ this.version = new DerInteger(0);
+ this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
+ this.encryptedKey = encryptedKey;
+ }
+
+ public PasswordRecipientInfo(
+ AlgorithmIdentifier keyDerivationAlgorithm,
+ AlgorithmIdentifier keyEncryptionAlgorithm,
+ Asn1OctetString encryptedKey)
+ {
+ this.version = new DerInteger(0);
+ this.keyDerivationAlgorithm = keyDerivationAlgorithm;
+ this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
+ this.encryptedKey = encryptedKey;
+ }
+
+ public PasswordRecipientInfo(
+ Asn1Sequence seq)
+ {
+ version = (DerInteger) seq[0];
+
+ if (seq[1] is Asn1TaggedObject)
+ {
+ keyDerivationAlgorithm = AlgorithmIdentifier.GetInstance((Asn1TaggedObject) seq[1], false);
+ keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]);
+ encryptedKey = (Asn1OctetString) seq[3];
+ }
+ else
+ {
+ keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
+ encryptedKey = (Asn1OctetString) seq[2];
+ }
+ }
+
+ /**
+ * return a PasswordRecipientInfo object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param explicitly true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static PasswordRecipientInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ /**
+ * return a PasswordRecipientInfo object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static PasswordRecipientInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is PasswordRecipientInfo)
+ return (PasswordRecipientInfo) obj;
+
+ if (obj is Asn1Sequence)
+ return new PasswordRecipientInfo((Asn1Sequence) obj);
+
+ throw new ArgumentException("Invalid PasswordRecipientInfo: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public AlgorithmIdentifier KeyDerivationAlgorithm
+ {
+ get { return keyDerivationAlgorithm; }
+ }
+
+ public AlgorithmIdentifier KeyEncryptionAlgorithm
+ {
+ get { return keyEncryptionAlgorithm; }
+ }
+
+ public Asn1OctetString EncryptedKey
+ {
+ get { return encryptedKey; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * PasswordRecipientInfo ::= Sequence {
+ * version CMSVersion, -- Always set to 0
+ * keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier
+ * OPTIONAL,
+ * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ * encryptedKey EncryptedKey }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version);
+ v.AddOptionalTagged(false, 0, keyDerivationAlgorithm);
+ v.Add(keyEncryptionAlgorithm, encryptedKey);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/PasswordRecipientInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/PasswordRecipientInfo.cs.meta
new file mode 100644
index 00000000..6a76803a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/PasswordRecipientInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a0b8029af5f106a4ca472ea854b10b5f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientEncryptedKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientEncryptedKey.cs
new file mode 100644
index 00000000..cb7d94f5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientEncryptedKey.cs
@@ -0,0 +1,94 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class RecipientEncryptedKey
+ : Asn1Encodable
+ {
+ private readonly KeyAgreeRecipientIdentifier identifier;
+ private readonly Asn1OctetString encryptedKey;
+
+ private RecipientEncryptedKey(
+ Asn1Sequence seq)
+ {
+ identifier = KeyAgreeRecipientIdentifier.GetInstance(seq[0]);
+ encryptedKey = (Asn1OctetString) seq[1];
+ }
+
+ /**
+ * return an RecipientEncryptedKey object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param isExplicit true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static RecipientEncryptedKey GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * return a RecipientEncryptedKey object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static RecipientEncryptedKey GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is RecipientEncryptedKey)
+ {
+ return (RecipientEncryptedKey) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new RecipientEncryptedKey((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Invalid RecipientEncryptedKey: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public RecipientEncryptedKey(
+ KeyAgreeRecipientIdentifier id,
+ Asn1OctetString encryptedKey)
+ {
+ this.identifier = id;
+ this.encryptedKey = encryptedKey;
+ }
+
+ public KeyAgreeRecipientIdentifier Identifier
+ {
+ get { return identifier; }
+ }
+
+ public Asn1OctetString EncryptedKey
+ {
+ get { return encryptedKey; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * RecipientEncryptedKey ::= SEQUENCE {
+ * rid KeyAgreeRecipientIdentifier,
+ * encryptedKey EncryptedKey
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(identifier, encryptedKey);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientEncryptedKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientEncryptedKey.cs.meta
new file mode 100644
index 00000000..1e6cc721
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientEncryptedKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 55d6b0041f9583941bcaa6cb61a9ecb3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientIdentifier.cs
new file mode 100644
index 00000000..94fdf452
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientIdentifier.cs
@@ -0,0 +1,93 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class RecipientIdentifier
+ : Asn1Encodable, IAsn1Choice
+ {
+ private Asn1Encodable id;
+
+ public RecipientIdentifier(
+ IssuerAndSerialNumber id)
+ {
+ this.id = id;
+ }
+
+ public RecipientIdentifier(
+ Asn1OctetString id)
+ {
+ this.id = new DerTaggedObject(false, 0, id);
+ }
+
+ public RecipientIdentifier(
+ Asn1Object id)
+ {
+ this.id = id;
+ }
+
+ /**
+ * return a RecipientIdentifier object from the given object.
+ *
+ * @param o the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static RecipientIdentifier GetInstance(
+ object o)
+ {
+ if (o == null || o is RecipientIdentifier)
+ return (RecipientIdentifier)o;
+
+ if (o is IssuerAndSerialNumber)
+ return new RecipientIdentifier((IssuerAndSerialNumber) o);
+
+ if (o is Asn1OctetString)
+ return new RecipientIdentifier((Asn1OctetString) o);
+
+ if (o is Asn1Object)
+ return new RecipientIdentifier((Asn1Object) o);
+
+ throw new ArgumentException(
+ "Illegal object in RecipientIdentifier: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+
+ public bool IsTagged
+ {
+ get { return (id is Asn1TaggedObject); }
+ }
+
+ public Asn1Encodable ID
+ {
+ get
+ {
+ if (id is Asn1TaggedObject)
+ {
+ return Asn1OctetString.GetInstance((Asn1TaggedObject) id, false);
+ }
+
+ return IssuerAndSerialNumber.GetInstance(id);
+ }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * RecipientIdentifier ::= CHOICE {
+ * issuerAndSerialNumber IssuerAndSerialNumber,
+ * subjectKeyIdentifier [0] SubjectKeyIdentifier
+ * }
+ *
+ * SubjectKeyIdentifier ::= OCTET STRING
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return id.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientIdentifier.cs.meta
new file mode 100644
index 00000000..acf10d83
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 268ed068df9ccc340a33d29480368f40
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientInfo.cs
new file mode 100644
index 00000000..a1c2dfda
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientInfo.cs
@@ -0,0 +1,149 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class RecipientInfo
+ : Asn1Encodable, IAsn1Choice
+ {
+ internal Asn1Encodable info;
+
+ public RecipientInfo(
+ KeyTransRecipientInfo info)
+ {
+ this.info = info;
+ }
+
+ public RecipientInfo(
+ KeyAgreeRecipientInfo info)
+ {
+ this.info = new DerTaggedObject(false, 1, info);
+ }
+
+ public RecipientInfo(
+ KekRecipientInfo info)
+ {
+ this.info = new DerTaggedObject(false, 2, info);
+ }
+
+ public RecipientInfo(
+ PasswordRecipientInfo info)
+ {
+ this.info = new DerTaggedObject(false, 3, info);
+ }
+
+ public RecipientInfo(
+ OtherRecipientInfo info)
+ {
+ this.info = new DerTaggedObject(false, 4, info);
+ }
+
+ public RecipientInfo(
+ Asn1Object info)
+ {
+ this.info = info;
+ }
+
+ public static RecipientInfo GetInstance(
+ object o)
+ {
+ if (o == null || o is RecipientInfo)
+ return (RecipientInfo) o;
+
+ if (o is Asn1Sequence)
+ return new RecipientInfo((Asn1Sequence) o);
+
+ if (o is Asn1TaggedObject)
+ return new RecipientInfo((Asn1TaggedObject) o);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+
+ public DerInteger Version
+ {
+ get
+ {
+ if (info is Asn1TaggedObject)
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject) info;
+
+ switch (o.TagNo)
+ {
+ case 1:
+ return KeyAgreeRecipientInfo.GetInstance(o, false).Version;
+ case 2:
+ return GetKekInfo(o).Version;
+ case 3:
+ return PasswordRecipientInfo.GetInstance(o, false).Version;
+ case 4:
+ return new DerInteger(0); // no syntax version for OtherRecipientInfo
+ default:
+ throw new InvalidOperationException("unknown tag");
+ }
+ }
+
+ return KeyTransRecipientInfo.GetInstance(info).Version;
+ }
+ }
+
+ public bool IsTagged
+ {
+ get { return info is Asn1TaggedObject; }
+ }
+
+ public Asn1Encodable Info
+ {
+ get
+ {
+ if (info is Asn1TaggedObject)
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject) info;
+
+ switch (o.TagNo)
+ {
+ case 1:
+ return KeyAgreeRecipientInfo.GetInstance(o, false);
+ case 2:
+ return GetKekInfo(o);
+ case 3:
+ return PasswordRecipientInfo.GetInstance(o, false);
+ case 4:
+ return OtherRecipientInfo.GetInstance(o, false);
+ default:
+ throw new InvalidOperationException("unknown tag");
+ }
+ }
+
+ return KeyTransRecipientInfo.GetInstance(info);
+ }
+ }
+
+ private KekRecipientInfo GetKekInfo(
+ Asn1TaggedObject o)
+ {
+ // For compatibility with erroneous version, we don't always pass 'false' here
+ return KekRecipientInfo.GetInstance(o, o.IsExplicit());
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * RecipientInfo ::= CHOICE {
+ * ktri KeyTransRecipientInfo,
+ * kari [1] KeyAgreeRecipientInfo,
+ * kekri [2] KekRecipientInfo,
+ * pwri [3] PasswordRecipientInfo,
+ * ori [4] OtherRecipientInfo }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return info.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientInfo.cs.meta
new file mode 100644
index 00000000..204a3b60
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5eac07e1fb01c1046820e7a687450906
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientKeyIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientKeyIdentifier.cs
new file mode 100644
index 00000000..297b2d2f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientKeyIdentifier.cs
@@ -0,0 +1,141 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class RecipientKeyIdentifier
+ : Asn1Encodable
+ {
+ private Asn1OctetString subjectKeyIdentifier;
+ private Asn1GeneralizedTime date;
+ private OtherKeyAttribute other;
+
+ public RecipientKeyIdentifier(
+ Asn1OctetString subjectKeyIdentifier,
+ Asn1GeneralizedTime date,
+ OtherKeyAttribute other)
+ {
+ this.subjectKeyIdentifier = subjectKeyIdentifier;
+ this.date = date;
+ this.other = other;
+ }
+
+ public RecipientKeyIdentifier(
+ byte[] subjectKeyIdentifier)
+ : this(subjectKeyIdentifier, null, null)
+ {
+ }
+
+ public RecipientKeyIdentifier(
+ byte[] subjectKeyIdentifier,
+ Asn1GeneralizedTime date,
+ OtherKeyAttribute other)
+ {
+ this.subjectKeyIdentifier = new DerOctetString(subjectKeyIdentifier);
+ this.date = date;
+ this.other = other;
+ }
+
+ public RecipientKeyIdentifier(
+ Asn1Sequence seq)
+ {
+ subjectKeyIdentifier = Asn1OctetString.GetInstance(
+ seq[0]);
+
+ switch(seq.Count)
+ {
+ case 1:
+ break;
+ case 2:
+ if (seq[1] is Asn1GeneralizedTime)
+ {
+ date = (Asn1GeneralizedTime)seq[1];
+ }
+ else
+ {
+ other = OtherKeyAttribute.GetInstance(seq[2]);
+ }
+ break;
+ case 3:
+ date = (Asn1GeneralizedTime)seq[1];
+ other = OtherKeyAttribute.GetInstance(seq[2]);
+ break;
+ default:
+ throw new ArgumentException("Invalid RecipientKeyIdentifier");
+ }
+ }
+
+ /**
+ * return a RecipientKeyIdentifier object from a tagged object.
+ *
+ * @param _ato the tagged object holding the object we want.
+ * @param _explicit true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @exception ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static RecipientKeyIdentifier GetInstance(
+ Asn1TaggedObject ato,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(ato, explicitly));
+ }
+
+ /**
+ * return a RecipientKeyIdentifier object from the given object.
+ *
+ * @param _obj the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static RecipientKeyIdentifier GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is RecipientKeyIdentifier)
+ return (RecipientKeyIdentifier) obj;
+
+ if (obj is Asn1Sequence)
+ return new RecipientKeyIdentifier((Asn1Sequence) obj);
+
+ throw new ArgumentException("Invalid RecipientKeyIdentifier: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public Asn1OctetString SubjectKeyIdentifier
+ {
+ get { return subjectKeyIdentifier; }
+ }
+
+ public Asn1GeneralizedTime Date
+ {
+ get { return date; }
+ }
+
+ public OtherKeyAttribute OtherKeyAttribute
+ {
+ get { return other; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * RecipientKeyIdentifier ::= Sequence {
+ * subjectKeyIdentifier SubjectKeyIdentifier,
+ * date GeneralizedTime OPTIONAL,
+ * other OtherKeyAttribute OPTIONAL
+ * }
+ *
+ * SubjectKeyIdentifier ::= OCTET STRING
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(subjectKeyIdentifier);
+ v.AddOptional(date, other);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientKeyIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientKeyIdentifier.cs.meta
new file mode 100644
index 00000000..21db8561
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/RecipientKeyIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f98189ae4c7921f4b89e1df99adbea78
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SCVPReqRes.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SCVPReqRes.cs
new file mode 100644
index 00000000..5e16f60c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SCVPReqRes.cs
@@ -0,0 +1,75 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class ScvpReqRes
+ : Asn1Encodable
+ {
+ private readonly ContentInfo request;
+ private readonly ContentInfo response;
+
+ public static ScvpReqRes GetInstance(object obj)
+ {
+ if (obj is ScvpReqRes)
+ return (ScvpReqRes)obj;
+ if (obj != null)
+ return new ScvpReqRes(Asn1Sequence.GetInstance(obj));
+ return null;
+ }
+
+ private ScvpReqRes(Asn1Sequence seq)
+ {
+ if (seq[0] is Asn1TaggedObject)
+ {
+ this.request = ContentInfo.GetInstance(Asn1TaggedObject.GetInstance(seq[0]), true);
+ this.response = ContentInfo.GetInstance(seq[1]);
+ }
+ else
+ {
+ this.request = null;
+ this.response = ContentInfo.GetInstance(seq[0]);
+ }
+ }
+
+ public ScvpReqRes(ContentInfo response)
+ : this(null, response)
+ {
+ }
+
+ public ScvpReqRes(ContentInfo request, ContentInfo response)
+ {
+ this.request = request;
+ this.response = response;
+ }
+
+ public virtual ContentInfo Request
+ {
+ get { return request; }
+ }
+
+ public virtual ContentInfo Response
+ {
+ get { return response; }
+ }
+
+ /**
+ *
+ * ScvpReqRes ::= SEQUENCE {
+ * request [0] EXPLICIT ContentInfo OPTIONAL,
+ * response ContentInfo }
+ *
+ * @return the ASN.1 primitive representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, request);
+ v.Add(response);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SCVPReqRes.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SCVPReqRes.cs.meta
new file mode 100644
index 00000000..b15e552e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SCVPReqRes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 30933c482b046e147af52fff411761cf
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedData.cs
new file mode 100644
index 00000000..53ed892a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedData.cs
@@ -0,0 +1,281 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ /**
+ * a signed data object.
+ */
+ public class SignedData
+ : Asn1Encodable
+ {
+ private static readonly DerInteger Version1 = new DerInteger(1);
+ private static readonly DerInteger Version3 = new DerInteger(3);
+ private static readonly DerInteger Version4 = new DerInteger(4);
+ private static readonly DerInteger Version5 = new DerInteger(5);
+
+ private readonly DerInteger version;
+ private readonly Asn1Set digestAlgorithms;
+ private readonly ContentInfo contentInfo;
+ private readonly Asn1Set certificates;
+ private readonly Asn1Set crls;
+ private readonly Asn1Set signerInfos;
+ private readonly bool certsBer;
+ private readonly bool crlsBer;
+
+ public static SignedData GetInstance(object obj)
+ {
+ if (obj is SignedData)
+ return (SignedData)obj;
+ if (obj == null)
+ return null;
+ return new SignedData(Asn1Sequence.GetInstance(obj));
+ }
+
+ public SignedData(
+ Asn1Set digestAlgorithms,
+ ContentInfo contentInfo,
+ Asn1Set certificates,
+ Asn1Set crls,
+ Asn1Set signerInfos)
+ {
+ this.version = CalculateVersion(contentInfo.ContentType, certificates, crls, signerInfos);
+ this.digestAlgorithms = digestAlgorithms;
+ this.contentInfo = contentInfo;
+ this.certificates = certificates;
+ this.crls = crls;
+ this.signerInfos = signerInfos;
+ this.crlsBer = crls is BerSet;
+ this.certsBer = certificates is BerSet;
+ }
+
+ // RFC3852, section 5.1:
+ // IF ((certificates is present) AND
+ // (any certificates with a type of other are present)) OR
+ // ((crls is present) AND
+ // (any crls with a type of other are present))
+ // THEN version MUST be 5
+ // ELSE
+ // IF (certificates is present) AND
+ // (any version 2 attribute certificates are present)
+ // THEN version MUST be 4
+ // ELSE
+ // IF ((certificates is present) AND
+ // (any version 1 attribute certificates are present)) OR
+ // (any SignerInfo structures are version 3) OR
+ // (encapContentInfo eContentType is other than id-data)
+ // THEN version MUST be 3
+ // ELSE version MUST be 1
+ //
+ private DerInteger CalculateVersion(
+ DerObjectIdentifier contentOid,
+ Asn1Set certs,
+ Asn1Set crls,
+ Asn1Set signerInfs)
+ {
+ bool otherCert = false;
+ bool otherCrl = false;
+ bool attrCertV1Found = false;
+ bool attrCertV2Found = false;
+
+ if (certs != null)
+ {
+ foreach (object obj in certs)
+ {
+ if (obj is Asn1TaggedObject)
+ {
+ Asn1TaggedObject tagged = (Asn1TaggedObject)obj;
+
+ if (tagged.TagNo == 1)
+ {
+ attrCertV1Found = true;
+ }
+ else if (tagged.TagNo == 2)
+ {
+ attrCertV2Found = true;
+ }
+ else if (tagged.TagNo == 3)
+ {
+ otherCert = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (otherCert)
+ {
+ return Version5;
+ }
+
+ if (crls != null)
+ {
+ foreach (object obj in crls)
+ {
+ if (obj is Asn1TaggedObject)
+ {
+ otherCrl = true;
+ break;
+ }
+ }
+ }
+
+ if (otherCrl)
+ {
+ return Version5;
+ }
+
+ if (attrCertV2Found)
+ {
+ return Version4;
+ }
+
+ if (attrCertV1Found || !CmsObjectIdentifiers.Data.Equals(contentOid) || CheckForVersion3(signerInfs))
+ {
+ return Version3;
+ }
+
+ return Version1;
+ }
+
+ private bool CheckForVersion3(Asn1Set signerInfs)
+ {
+ foreach (object obj in signerInfs)
+ {
+ SignerInfo s = SignerInfo.GetInstance(obj);
+
+ if (s.Version.HasValue(3))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private SignedData(Asn1Sequence seq)
+ {
+ var e = seq.GetEnumerator();
+
+ e.MoveNext();
+ version = (DerInteger)e.Current;
+
+ e.MoveNext();
+ digestAlgorithms = (Asn1Set)e.Current.ToAsn1Object();
+
+ e.MoveNext();
+ contentInfo = ContentInfo.GetInstance(e.Current.ToAsn1Object());
+
+ while (e.MoveNext())
+ {
+ Asn1Object o = e.Current.ToAsn1Object();
+
+ //
+ // an interesting feature of SignedData is that there appear
+ // to be varying implementations...
+ // for the moment we ignore anything which doesn't fit.
+ //
+ if (o is Asn1TaggedObject tagged)
+ {
+ switch (tagged.TagNo)
+ {
+ case 0:
+ certsBer = tagged is BerTaggedObject;
+ certificates = Asn1Set.GetInstance(tagged, false);
+ break;
+ case 1:
+ crlsBer = tagged is BerTaggedObject;
+ crls = Asn1Set.GetInstance(tagged, false);
+ break;
+ default:
+ throw new ArgumentException("unknown tag value " + tagged.TagNo);
+ }
+ }
+ else
+ {
+ signerInfos = (Asn1Set) o;
+ }
+ }
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public Asn1Set DigestAlgorithms
+ {
+ get { return digestAlgorithms; }
+ }
+
+ public ContentInfo EncapContentInfo
+ {
+ get { return contentInfo; }
+ }
+
+ public Asn1Set Certificates
+ {
+ get { return certificates; }
+ }
+
+ public Asn1Set CRLs
+ {
+ get { return crls; }
+ }
+
+ public Asn1Set SignerInfos
+ {
+ get { return signerInfos; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * SignedData ::= Sequence {
+ * version CMSVersion,
+ * digestAlgorithms DigestAlgorithmIdentifiers,
+ * encapContentInfo EncapsulatedContentInfo,
+ * certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ * crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ * signerInfos SignerInfos
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ version, digestAlgorithms, contentInfo);
+
+ if (certificates != null)
+ {
+ if (certsBer)
+ {
+ v.Add(new BerTaggedObject(false, 0, certificates));
+ }
+ else
+ {
+ v.Add(new DerTaggedObject(false, 0, certificates));
+ }
+ }
+
+ if (crls != null)
+ {
+ if (crlsBer)
+ {
+ v.Add(new BerTaggedObject(false, 1, crls));
+ }
+ else
+ {
+ v.Add(new DerTaggedObject(false, 1, crls));
+ }
+ }
+
+ v.Add(signerInfos);
+
+ return new BerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedData.cs.meta
new file mode 100644
index 00000000..edcdcf2a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7c423f66ca24d1c4ba73c7e43140f576
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedDataParser.cs
new file mode 100644
index 00000000..c6c2a800
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedDataParser.cs
@@ -0,0 +1,122 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ /**
+ *
+ * SignedData ::= SEQUENCE {
+ * version CMSVersion,
+ * digestAlgorithms DigestAlgorithmIdentifiers,
+ * encapContentInfo EncapsulatedContentInfo,
+ * certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ * crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ * signerInfos SignerInfos
+ * }
+ *
+ */
+ public class SignedDataParser
+ {
+ private Asn1SequenceParser _seq;
+ private DerInteger _version;
+ private object _nextObject;
+ private bool _certsCalled;
+ private bool _crlsCalled;
+
+ public static SignedDataParser GetInstance(
+ object o)
+ {
+ if (o is Asn1Sequence)
+ return new SignedDataParser(((Asn1Sequence)o).Parser);
+
+ if (o is Asn1SequenceParser)
+ return new SignedDataParser((Asn1SequenceParser)o);
+
+ throw new IOException("unknown object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+
+ public SignedDataParser(
+ Asn1SequenceParser seq)
+ {
+ this._seq = seq;
+ this._version = (DerInteger)seq.ReadObject();
+ }
+
+ public DerInteger Version
+ {
+ get { return _version; }
+ }
+
+ public Asn1SetParser GetDigestAlgorithms()
+ {
+ return (Asn1SetParser)_seq.ReadObject();
+ }
+
+ public ContentInfoParser GetEncapContentInfo()
+ {
+ return new ContentInfoParser((Asn1SequenceParser)_seq.ReadObject());
+ }
+
+ public Asn1SetParser GetCertificates()
+ {
+ _certsCalled = true;
+ _nextObject = _seq.ReadObject();
+
+ if (_nextObject is Asn1TaggedObjectParser o)
+ {
+ if (o.HasContextTag(0))
+ {
+ Asn1SetParser certs = (Asn1SetParser)o.ParseBaseUniversal(false, Asn1Tags.SetOf);
+ _nextObject = null;
+ return certs;
+ }
+ }
+
+ return null;
+ }
+
+ public Asn1SetParser GetCrls()
+ {
+ if (!_certsCalled)
+ throw new IOException("GetCerts() has not been called.");
+
+ _crlsCalled = true;
+
+ if (_nextObject == null)
+ {
+ _nextObject = _seq.ReadObject();
+ }
+
+ if (_nextObject is Asn1TaggedObjectParser o)
+ {
+ if (o.HasContextTag(1))
+ {
+ Asn1SetParser crls = (Asn1SetParser)o.ParseBaseUniversal(false, Asn1Tags.SetOf);
+ _nextObject = null;
+ return crls;
+ }
+ }
+
+ return null;
+ }
+
+ public Asn1SetParser GetSignerInfos()
+ {
+ if (!_certsCalled || !_crlsCalled)
+ throw new IOException("GetCerts() and/or GetCrls() has not been called.");
+
+ if (_nextObject == null)
+ {
+ _nextObject = _seq.ReadObject();
+ }
+
+ return (Asn1SetParser)_nextObject;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedDataParser.cs.meta
new file mode 100644
index 00000000..44726c38
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 05e7b42e6f58b8241b76bd70edc648ee
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerIdentifier.cs
new file mode 100644
index 00000000..9463bcac
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerIdentifier.cs
@@ -0,0 +1,93 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class SignerIdentifier
+ : Asn1Encodable, IAsn1Choice
+ {
+ private Asn1Encodable id;
+
+ public SignerIdentifier(
+ IssuerAndSerialNumber id)
+ {
+ this.id = id;
+ }
+
+ public SignerIdentifier(
+ Asn1OctetString id)
+ {
+ this.id = new DerTaggedObject(false, 0, id);
+ }
+
+ public SignerIdentifier(
+ Asn1Object id)
+ {
+ this.id = id;
+ }
+
+ /**
+ * return a SignerIdentifier object from the given object.
+ *
+ * @param o the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static SignerIdentifier GetInstance(
+ object o)
+ {
+ if (o == null || o is SignerIdentifier)
+ return (SignerIdentifier) o;
+
+ if (o is IssuerAndSerialNumber)
+ return new SignerIdentifier((IssuerAndSerialNumber) o);
+
+ if (o is Asn1OctetString)
+ return new SignerIdentifier((Asn1OctetString) o);
+
+ if (o is Asn1Object)
+ return new SignerIdentifier((Asn1Object) o);
+
+ throw new ArgumentException(
+ "Illegal object in SignerIdentifier: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+
+ public bool IsTagged
+ {
+ get { return (id is Asn1TaggedObject); }
+ }
+
+ public Asn1Encodable ID
+ {
+ get
+ {
+ if (id is Asn1TaggedObject)
+ {
+ return Asn1OctetString.GetInstance((Asn1TaggedObject)id, false);
+ }
+
+ return id;
+ }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * SignerIdentifier ::= CHOICE {
+ * issuerAndSerialNumber IssuerAndSerialNumber,
+ * subjectKeyIdentifier [0] SubjectKeyIdentifier
+ * }
+ *
+ * SubjectKeyIdentifier ::= OCTET STRING
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return id.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerIdentifier.cs.meta
new file mode 100644
index 00000000..3046950c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5831edaa0fffd8c49b6b6954d736ca02
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerInfo.cs
new file mode 100644
index 00000000..5ec45801
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerInfo.cs
@@ -0,0 +1,174 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class SignerInfo
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private SignerIdentifier sid;
+ private AlgorithmIdentifier digAlgorithm;
+ private Asn1Set authenticatedAttributes;
+ private AlgorithmIdentifier digEncryptionAlgorithm;
+ private Asn1OctetString encryptedDigest;
+ private Asn1Set unauthenticatedAttributes;
+
+ public static SignerInfo GetInstance(object obj)
+ {
+ if (obj == null || obj is SignerInfo)
+ return (SignerInfo) obj;
+
+ if (obj is Asn1Sequence)
+ return new SignerInfo((Asn1Sequence) obj);
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public SignerInfo(
+ SignerIdentifier sid,
+ AlgorithmIdentifier digAlgorithm,
+ Asn1Set authenticatedAttributes,
+ AlgorithmIdentifier digEncryptionAlgorithm,
+ Asn1OctetString encryptedDigest,
+ Asn1Set unauthenticatedAttributes)
+ {
+ this.version = new DerInteger(sid.IsTagged ? 3 : 1);
+ this.sid = sid;
+ this.digAlgorithm = digAlgorithm;
+ this.authenticatedAttributes = authenticatedAttributes;
+ this.digEncryptionAlgorithm = digEncryptionAlgorithm;
+ this.encryptedDigest = encryptedDigest;
+ this.unauthenticatedAttributes = unauthenticatedAttributes;
+ }
+
+ public SignerInfo(
+ SignerIdentifier sid,
+ AlgorithmIdentifier digAlgorithm,
+ Attributes authenticatedAttributes,
+ AlgorithmIdentifier digEncryptionAlgorithm,
+ Asn1OctetString encryptedDigest,
+ Attributes unauthenticatedAttributes)
+ {
+ this.version = new DerInteger(sid.IsTagged ? 3 : 1);
+ this.sid = sid;
+ this.digAlgorithm = digAlgorithm;
+ this.authenticatedAttributes = Asn1Set.GetInstance(authenticatedAttributes);
+ this.digEncryptionAlgorithm = digEncryptionAlgorithm;
+ this.encryptedDigest = encryptedDigest;
+ this.unauthenticatedAttributes = Asn1Set.GetInstance(unauthenticatedAttributes);
+ }
+
+ private SignerInfo(Asn1Sequence seq)
+ {
+ var e = seq.GetEnumerator();
+
+ e.MoveNext();
+ version = (DerInteger)e.Current;
+
+ e.MoveNext();
+ sid = SignerIdentifier.GetInstance(e.Current.ToAsn1Object());
+
+ e.MoveNext();
+ digAlgorithm = AlgorithmIdentifier.GetInstance(e.Current.ToAsn1Object());
+
+ e.MoveNext();
+ var obj = e.Current.ToAsn1Object();
+
+ if (obj is Asn1TaggedObject tagged)
+ {
+ authenticatedAttributes = Asn1Set.GetInstance(tagged, false);
+
+ e.MoveNext();
+ digEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(e.Current.ToAsn1Object());
+ }
+ else
+ {
+ authenticatedAttributes = null;
+ digEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(obj);
+ }
+
+ e.MoveNext();
+ encryptedDigest = Asn1OctetString.GetInstance(e.Current.ToAsn1Object());
+
+ if (e.MoveNext())
+ {
+ unauthenticatedAttributes = Asn1Set.GetInstance((Asn1TaggedObject)e.Current.ToAsn1Object(), false);
+ }
+ else
+ {
+ unauthenticatedAttributes = null;
+ }
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public SignerIdentifier SignerID
+ {
+ get { return sid; }
+ }
+
+ public Asn1Set AuthenticatedAttributes
+ {
+ get { return authenticatedAttributes; }
+ }
+
+ public AlgorithmIdentifier DigestAlgorithm
+ {
+ get { return digAlgorithm; }
+ }
+
+ public Asn1OctetString EncryptedDigest
+ {
+ get { return encryptedDigest; }
+ }
+
+ public AlgorithmIdentifier DigestEncryptionAlgorithm
+ {
+ get { return digEncryptionAlgorithm; }
+ }
+
+ public Asn1Set UnauthenticatedAttributes
+ {
+ get { return unauthenticatedAttributes; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * SignerInfo ::= Sequence {
+ * version Version,
+ * SignerIdentifier sid,
+ * digestAlgorithm DigestAlgorithmIdentifier,
+ * authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ * digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ * encryptedDigest EncryptedDigest,
+ * unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ * }
+ *
+ * EncryptedDigest ::= OCTET STRING
+ *
+ * DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+ *
+ * DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version, sid, digAlgorithm);
+ v.AddOptionalTagged(false, 0, authenticatedAttributes);
+ v.Add(digEncryptionAlgorithm, encryptedDigest);
+ v.AddOptionalTagged(false, 1, unauthenticatedAttributes);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerInfo.cs.meta
new file mode 100644
index 00000000..28822d89
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/SignerInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 45efbcfcd327360458fa1d300c0cb7a7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Time.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Time.cs
new file mode 100644
index 00000000..4c0e6935
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Time.cs
@@ -0,0 +1,114 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Globalization;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class Time
+ : Asn1Encodable, IAsn1Choice
+ {
+ public static Time GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+ if (obj is Time time)
+ return time;
+ if (obj is Asn1UtcTime utcTime)
+ return new Time(utcTime);
+ if (obj is Asn1GeneralizedTime generalizedTime)
+ return new Time(generalizedTime);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ public static Time GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return GetInstance(taggedObject.GetObject());
+ }
+
+ private readonly Asn1Object m_timeObject;
+
+ public Time(Asn1GeneralizedTime generalizedTime)
+ {
+ this.m_timeObject = generalizedTime ?? throw new ArgumentNullException(nameof(generalizedTime));
+ }
+
+ public Time(Asn1UtcTime utcTime)
+ {
+ if (utcTime == null)
+ throw new ArgumentNullException(nameof(utcTime));
+
+ // Validate utcTime is in the appropriate year range
+ utcTime.ToDateTime(2049);
+
+ this.m_timeObject = utcTime;
+ }
+
+ /**
+ * creates a time object from a given date - if the date is between 1950
+ * and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ * is used.
+ */
+ public Time(DateTime date)
+ {
+ DateTime utc = date.ToUniversalTime();
+
+ if (utc.Year < 1950 || utc.Year > 2049)
+ {
+ m_timeObject = new DerGeneralizedTime(utc);
+ }
+ else
+ {
+ m_timeObject = new DerUtcTime(utc, 2049);
+ }
+ }
+
+ public DateTime ToDateTime()
+ {
+ try
+ {
+ if (m_timeObject is Asn1UtcTime utcTime)
+ return utcTime.ToDateTime(2049);
+
+ return ((Asn1GeneralizedTime)m_timeObject).ToDateTime();
+ }
+ catch (FormatException e)
+ {
+ // this should never happen
+ throw new InvalidOperationException("invalid date string: " + e.Message);
+ }
+ }
+
+
+ public DateTime Date => ToDateTime();
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Time ::= CHOICE {
+ * utcTime UTCTime,
+ * generalTime GeneralizedTime }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_timeObject;
+ }
+
+ public override string ToString()
+ {
+ if (m_timeObject is Asn1UtcTime utcTime)
+ return utcTime.ToDateTime(2049).ToString(@"yyyyMMddHHmmssK", DateTimeFormatInfo.InvariantInfo);
+
+ if (m_timeObject is Asn1GeneralizedTime generalizedTime)
+ return generalizedTime.ToDateTime().ToString(@"yyyyMMddHHmmss.FFFFFFFK", DateTimeFormatInfo.InvariantInfo);
+
+ throw new InvalidOperationException();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Time.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Time.cs.meta
new file mode 100644
index 00000000..264f68a7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/Time.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bb973623f792e0f409b05930fa72b8d6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampAndCRL.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampAndCRL.cs
new file mode 100644
index 00000000..6495df90
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampAndCRL.cs
@@ -0,0 +1,66 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class TimeStampAndCrl
+ : Asn1Encodable
+ {
+ private ContentInfo timeStamp;
+ private X509.CertificateList crl;
+
+ public TimeStampAndCrl(ContentInfo timeStamp)
+ {
+ this.timeStamp = timeStamp;
+ }
+
+ private TimeStampAndCrl(Asn1Sequence seq)
+ {
+ this.timeStamp = ContentInfo.GetInstance(seq[0]);
+ if (seq.Count == 2)
+ {
+ this.crl = X509.CertificateList.GetInstance(seq[1]);
+ }
+ }
+
+ public static TimeStampAndCrl GetInstance(object obj)
+ {
+ if (obj is TimeStampAndCrl)
+ return (TimeStampAndCrl)obj;
+
+ if (obj != null)
+ return new TimeStampAndCrl(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public virtual ContentInfo TimeStampToken
+ {
+ get { return this.timeStamp; }
+ }
+
+ public virtual X509.CertificateList Crl
+ {
+ get { return this.crl; }
+ }
+
+ /**
+ *
+ * TimeStampAndCRL ::= SEQUENCE {
+ * timeStamp TimeStampToken, -- according to RFC 3161
+ * crl CertificateList OPTIONAL -- according to RFC 5280
+ * }
+ *
+ * @return
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(timeStamp);
+ v.AddOptional(crl);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampAndCRL.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampAndCRL.cs.meta
new file mode 100644
index 00000000..ed7a403f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampAndCRL.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5f4dcd32502de784a9926445d3380301
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampTokenEvidence.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampTokenEvidence.cs
new file mode 100644
index 00000000..319976cc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampTokenEvidence.cs
@@ -0,0 +1,69 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class TimeStampTokenEvidence
+ : Asn1Encodable
+ {
+ private TimeStampAndCrl[] timeStampAndCrls;
+
+ public TimeStampTokenEvidence(TimeStampAndCrl[] timeStampAndCrls)
+ {
+ this.timeStampAndCrls = timeStampAndCrls;
+ }
+
+ public TimeStampTokenEvidence(TimeStampAndCrl timeStampAndCrl)
+ {
+ this.timeStampAndCrls = new TimeStampAndCrl[]{ timeStampAndCrl };
+ }
+
+ private TimeStampTokenEvidence(Asn1Sequence seq)
+ {
+ this.timeStampAndCrls = new TimeStampAndCrl[seq.Count];
+
+ int count = 0;
+
+ foreach (Asn1Encodable ae in seq)
+ {
+ this.timeStampAndCrls[count++] = TimeStampAndCrl.GetInstance(ae.ToAsn1Object());
+ }
+ }
+
+ public static TimeStampTokenEvidence GetInstance(Asn1TaggedObject tagged, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(tagged, isExplicit));
+ }
+
+ public static TimeStampTokenEvidence GetInstance(object obj)
+ {
+ if (obj is TimeStampTokenEvidence)
+ return (TimeStampTokenEvidence)obj;
+
+ if (obj != null)
+ return new TimeStampTokenEvidence(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public virtual TimeStampAndCrl[] ToTimeStampAndCrlArray()
+ {
+ return (TimeStampAndCrl[])timeStampAndCrls.Clone();
+ }
+
+ /**
+ *
+ * TimeStampTokenEvidence ::=
+ * SEQUENCE SIZE(1..MAX) OF TimeStampAndCrl
+ *
+ * @return
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(timeStampAndCrls);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampTokenEvidence.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampTokenEvidence.cs.meta
new file mode 100644
index 00000000..76258cdd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampTokenEvidence.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9677d88eeedf9374597fdb1722202d99
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedData.cs
new file mode 100644
index 00000000..68d89cea
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedData.cs
@@ -0,0 +1,99 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class TimeStampedData
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private DerIA5String dataUri;
+ private MetaData metaData;
+ private Asn1OctetString content;
+ private Evidence temporalEvidence;
+
+ public TimeStampedData(DerIA5String dataUri, MetaData metaData, Asn1OctetString content,
+ Evidence temporalEvidence)
+ {
+ this.version = new DerInteger(1);
+ this.dataUri = dataUri;
+ this.metaData = metaData;
+ this.content = content;
+ this.temporalEvidence = temporalEvidence;
+ }
+
+ private TimeStampedData(Asn1Sequence seq)
+ {
+ this.version = DerInteger.GetInstance(seq[0]);
+
+ int index = 1;
+ if (seq[index] is DerIA5String)
+ {
+ this.dataUri = DerIA5String.GetInstance(seq[index++]);
+ }
+ if (seq[index] is MetaData || seq[index] is Asn1Sequence)
+ {
+ this.metaData = MetaData.GetInstance(seq[index++]);
+ }
+ if (seq[index] is Asn1OctetString)
+ {
+ this.content = Asn1OctetString.GetInstance(seq[index++]);
+ }
+ this.temporalEvidence = Evidence.GetInstance(seq[index]);
+ }
+
+ public static TimeStampedData GetInstance(object obj)
+ {
+ if (obj is TimeStampedData)
+ return (TimeStampedData)obj;
+
+ if (obj != null)
+ return new TimeStampedData(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public virtual DerIA5String DataUri
+ {
+ get { return dataUri; }
+ }
+
+ public MetaData MetaData
+ {
+ get { return metaData; }
+ }
+
+ public Asn1OctetString Content
+ {
+ get { return content; }
+ }
+
+ public Evidence TemporalEvidence
+ {
+ get { return temporalEvidence; }
+ }
+
+ /**
+ *
+ * TimeStampedData ::= SEQUENCE {
+ * version INTEGER { v1(1) },
+ * dataUri IA5String OPTIONAL,
+ * metaData MetaData OPTIONAL,
+ * content OCTET STRING OPTIONAL,
+ * temporalEvidence Evidence
+ * }
+ *
+ * @return
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version);
+ v.AddOptional(dataUri, metaData, content);
+ v.Add(temporalEvidence);
+ return new BerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedData.cs.meta
new file mode 100644
index 00000000..b13f3d10
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 44dbb40e9540e9a43828dba5a0dedd98
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedDataParser.cs
new file mode 100644
index 00000000..bb4136f3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedDataParser.cs
@@ -0,0 +1,80 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
+{
+ public class TimeStampedDataParser
+ {
+ private DerInteger version;
+ private DerIA5String dataUri;
+ private MetaData metaData;
+ private Asn1OctetStringParser content;
+ private Evidence temporalEvidence;
+ private Asn1SequenceParser parser;
+
+ private TimeStampedDataParser(Asn1SequenceParser parser)
+ {
+ this.parser = parser;
+ this.version = DerInteger.GetInstance(parser.ReadObject());
+
+ Asn1Object obj = parser.ReadObject().ToAsn1Object();
+
+ if (obj is DerIA5String)
+ {
+ this.dataUri = DerIA5String.GetInstance(obj);
+ obj = parser.ReadObject().ToAsn1Object();
+ }
+
+ if (//obj is MetaData ||
+ obj is Asn1SequenceParser)
+ {
+ this.metaData = MetaData.GetInstance(obj.ToAsn1Object());
+ obj = parser.ReadObject().ToAsn1Object();
+ }
+
+ if (obj is Asn1OctetStringParser)
+ {
+ this.content = (Asn1OctetStringParser)obj;
+ }
+ }
+
+ public static TimeStampedDataParser GetInstance(object obj)
+ {
+ if (obj is Asn1Sequence)
+ return new TimeStampedDataParser(((Asn1Sequence)obj).Parser);
+
+ if (obj is Asn1SequenceParser)
+ return new TimeStampedDataParser((Asn1SequenceParser)obj);
+
+ return null;
+ }
+
+ public virtual DerIA5String DataUri
+ {
+ get { return dataUri; }
+ }
+
+ public virtual MetaData MetaData
+ {
+ get { return metaData; }
+ }
+
+ public virtual Asn1OctetStringParser Content
+ {
+ get { return content; }
+ }
+
+ public virtual Evidence GetTemporalEvidence()
+ {
+ if (temporalEvidence == null)
+ {
+ temporalEvidence = Evidence.GetInstance(parser.ReadObject().ToAsn1Object());
+ }
+
+ return temporalEvidence;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedDataParser.cs.meta
new file mode 100644
index 00000000..e40b06d0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/TimeStampedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 11ea87c7cb447c647ab686bb9dd0deda
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc.meta
new file mode 100644
index 00000000..c924191f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ddfa1d4dfe54044448daca0f58ec039a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc/MQVuserKeyingMaterial.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc/MQVuserKeyingMaterial.cs
new file mode 100644
index 00000000..96002fcf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc/MQVuserKeyingMaterial.cs
@@ -0,0 +1,104 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.Ecc
+{
+ public class MQVuserKeyingMaterial
+ : Asn1Encodable
+ {
+ private OriginatorPublicKey ephemeralPublicKey;
+ private Asn1OctetString addedukm;
+
+ public MQVuserKeyingMaterial(
+ OriginatorPublicKey ephemeralPublicKey,
+ Asn1OctetString addedukm)
+ {
+ // TODO Check ephemeralPublicKey not null
+
+ this.ephemeralPublicKey = ephemeralPublicKey;
+ this.addedukm = addedukm;
+ }
+
+ private MQVuserKeyingMaterial(
+ Asn1Sequence seq)
+ {
+ // TODO Check seq has either 1 or 2 elements
+
+ this.ephemeralPublicKey = OriginatorPublicKey.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ this.addedukm = Asn1OctetString.GetInstance(
+ (Asn1TaggedObject)seq[1], true);
+ }
+ }
+
+ /**
+ * return an AuthEnvelopedData object from a tagged object.
+ *
+ * @param obj the tagged object holding the object we want.
+ * @param isExplicit true if the object is meant to be explicitly
+ * tagged false otherwise.
+ * @throws ArgumentException if the object held by the
+ * tagged object cannot be converted.
+ */
+ public static MQVuserKeyingMaterial GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * return an AuthEnvelopedData object from the given object.
+ *
+ * @param obj the object we want converted.
+ * @throws ArgumentException if the object cannot be converted.
+ */
+ public static MQVuserKeyingMaterial GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is MQVuserKeyingMaterial)
+ {
+ return (MQVuserKeyingMaterial)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new MQVuserKeyingMaterial((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("Invalid MQVuserKeyingMaterial: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public OriginatorPublicKey EphemeralPublicKey
+ {
+ get { return ephemeralPublicKey; }
+ }
+
+ public Asn1OctetString AddedUkm
+ {
+ get { return addedukm; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * MQVuserKeyingMaterial ::= SEQUENCE {
+ * ephemeralPublicKey OriginatorPublicKey,
+ * addedukm [0] EXPLICIT UserKeyingMaterial OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(ephemeralPublicKey);
+ v.AddOptionalTagged(true, 0, addedukm);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc/MQVuserKeyingMaterial.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc/MQVuserKeyingMaterial.cs.meta
new file mode 100644
index 00000000..7ebb3be5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cms/ecc/MQVuserKeyingMaterial.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ca994732aac101b46a2c4018dbb9a9b0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf.meta
new file mode 100644
index 00000000..355d0c07
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 64c68fae2f3b4e742ab1bb4bbd415d58
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/AttributeTypeAndValue.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/AttributeTypeAndValue.cs
new file mode 100644
index 00000000..036ad938
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/AttributeTypeAndValue.cs
@@ -0,0 +1,72 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class AttributeTypeAndValue
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier type;
+ private readonly Asn1Encodable value;
+
+ private AttributeTypeAndValue(Asn1Sequence seq)
+ {
+ type = (DerObjectIdentifier)seq[0];
+ value = (Asn1Encodable)seq[1];
+ }
+
+ public static AttributeTypeAndValue GetInstance(object obj)
+ {
+ if (obj is AttributeTypeAndValue)
+ return (AttributeTypeAndValue)obj;
+
+ if (obj is Asn1Sequence)
+ return new AttributeTypeAndValue((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public AttributeTypeAndValue(
+ string oid,
+ Asn1Encodable value)
+ : this(new DerObjectIdentifier(oid), value)
+ {
+ }
+
+ public AttributeTypeAndValue(
+ DerObjectIdentifier type,
+ Asn1Encodable value)
+ {
+ this.type = type;
+ this.value = value;
+ }
+
+ public virtual DerObjectIdentifier Type
+ {
+ get { return type; }
+ }
+
+ public virtual Asn1Encodable Value
+ {
+ get { return value; }
+ }
+
+ /**
+ *
+ * AttributeTypeAndValue ::= SEQUENCE {
+ * type OBJECT IDENTIFIER,
+ * value ANY DEFINED BY type }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(type, value);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/AttributeTypeAndValue.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/AttributeTypeAndValue.cs.meta
new file mode 100644
index 00000000..994745de
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/AttributeTypeAndValue.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 10929e85222075a45944037e77775558
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertId.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertId.cs
new file mode 100644
index 00000000..c29b2bfc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertId.cs
@@ -0,0 +1,63 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class CertId
+ : Asn1Encodable
+ {
+ private readonly GeneralName issuer;
+ private readonly DerInteger serialNumber;
+
+ private CertId(Asn1Sequence seq)
+ {
+ issuer = GeneralName.GetInstance(seq[0]);
+ serialNumber = DerInteger.GetInstance(seq[1]);
+ }
+
+ public static CertId GetInstance(object obj)
+ {
+ if (obj is CertId)
+ return (CertId)obj;
+
+ if (obj is Asn1Sequence)
+ return new CertId((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static CertId GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ public virtual GeneralName Issuer
+ {
+ get { return issuer; }
+ }
+
+ public virtual DerInteger SerialNumber
+ {
+ get { return serialNumber; }
+ }
+
+ /**
+ *
+ * CertId ::= SEQUENCE {
+ * issuer GeneralName,
+ * serialNumber INTEGER }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(issuer, serialNumber);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertId.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertId.cs.meta
new file mode 100644
index 00000000..3860895f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertId.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 278626812312f974d9ceb32eba1c407f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMessages.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMessages.cs
new file mode 100644
index 00000000..5d7ad4a3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMessages.cs
@@ -0,0 +1,58 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class CertReqMessages
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence content;
+
+ private CertReqMessages(Asn1Sequence seq)
+ {
+ content = seq;
+ }
+
+ public static CertReqMessages GetInstance(object obj)
+ {
+ if (obj is CertReqMessages)
+ return (CertReqMessages)obj;
+
+ if (obj is Asn1Sequence)
+ return new CertReqMessages((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public CertReqMessages(params CertReqMsg[] msgs)
+ {
+ content = new DerSequence(msgs);
+ }
+
+ public virtual CertReqMsg[] ToCertReqMsgArray()
+ {
+ CertReqMsg[] result = new CertReqMsg[content.Count];
+ for (int i = 0; i != result.Length; ++i)
+ {
+ result[i] = CertReqMsg.GetInstance(content[i]);
+ }
+ return result;
+ }
+
+ /**
+ *
+ * CertReqMessages ::= SEQUENCE SIZE (1..MAX) OF CertReqMsg
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMessages.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMessages.cs.meta
new file mode 100644
index 00000000..f0f92180
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMessages.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 95c108803b6695049aa7a5f143e18635
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMsg.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMsg.cs
new file mode 100644
index 00000000..a1c800f8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMsg.cs
@@ -0,0 +1,116 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class CertReqMsg
+ : Asn1Encodable
+ {
+ private readonly CertRequest certReq;
+ private readonly ProofOfPossession popo;
+ private readonly Asn1Sequence regInfo;
+
+ private CertReqMsg(Asn1Sequence seq)
+ {
+ certReq = CertRequest.GetInstance(seq[0]);
+
+ for (int pos = 1; pos < seq.Count; ++pos)
+ {
+ object o = seq[pos];
+
+ if (o is Asn1TaggedObject || o is ProofOfPossession)
+ {
+ popo = ProofOfPossession.GetInstance(o);
+ }
+ else
+ {
+ regInfo = Asn1Sequence.GetInstance(o);
+ }
+ }
+ }
+
+ public static CertReqMsg GetInstance(object obj)
+ {
+ if (obj is CertReqMsg)
+ return (CertReqMsg)obj;
+
+ if (obj != null)
+ return new CertReqMsg(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public static CertReqMsg GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * Creates a new CertReqMsg.
+ * @param certReq CertRequest
+ * @param popo may be null
+ * @param regInfo may be null
+ */
+ public CertReqMsg(
+ CertRequest certReq,
+ ProofOfPossession popo,
+ AttributeTypeAndValue[] regInfo)
+ {
+ if (certReq == null)
+ throw new ArgumentNullException("certReq");
+
+ this.certReq = certReq;
+ this.popo = popo;
+
+ if (regInfo != null)
+ {
+ this.regInfo = new DerSequence(regInfo);
+ }
+ }
+
+ public virtual CertRequest CertReq
+ {
+ get { return certReq; }
+ }
+
+ public virtual ProofOfPossession Popo
+ {
+ get { return popo; }
+ }
+
+ public virtual AttributeTypeAndValue[] GetRegInfo()
+ {
+ if (regInfo == null)
+ return null;
+
+ AttributeTypeAndValue[] results = new AttributeTypeAndValue[regInfo.Count];
+ for (int i = 0; i != results.Length; ++i)
+ {
+ results[i] = AttributeTypeAndValue.GetInstance(regInfo[i]);
+ }
+ return results;
+ }
+
+ /**
+ *
+ * CertReqMsg ::= SEQUENCE {
+ * certReq CertRequest,
+ * pop ProofOfPossession OPTIONAL,
+ * -- content depends upon key type
+ * regInfo SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue OPTIONAL }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(certReq);
+ v.AddOptional(popo, regInfo);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMsg.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMsg.cs.meta
new file mode 100644
index 00000000..fc7b7a62
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertReqMsg.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e017944cda918a54a9128204afdbe99f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertRequest.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertRequest.cs
new file mode 100644
index 00000000..c482fed3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertRequest.cs
@@ -0,0 +1,87 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crmf;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class CertRequest
+ : Asn1Encodable
+ {
+ private readonly DerInteger certReqId;
+ private readonly CertTemplate certTemplate;
+ private readonly Controls controls;
+
+ private CertRequest(Asn1Sequence seq)
+ {
+ certReqId = DerInteger.GetInstance(seq[0]);
+ certTemplate = CertTemplate.GetInstance(seq[1]);
+ if (seq.Count > 2)
+ {
+ controls = Controls.GetInstance(seq[2]);
+ }
+ }
+
+ public static CertRequest GetInstance(object obj)
+ {
+ if (obj is CertRequest)
+ return (CertRequest)obj;
+
+ if (obj != null)
+ return new CertRequest(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public CertRequest(
+ int certReqId,
+ CertTemplate certTemplate,
+ Controls controls)
+ : this(new DerInteger(certReqId), certTemplate, controls)
+ {
+ }
+
+ public CertRequest(
+ DerInteger certReqId,
+ CertTemplate certTemplate,
+ Controls controls)
+ {
+ this.certReqId = certReqId;
+ this.certTemplate = certTemplate;
+ this.controls = controls;
+ }
+
+ public virtual DerInteger CertReqID
+ {
+ get { return certReqId; }
+ }
+
+ public virtual CertTemplate CertTemplate
+ {
+ get { return certTemplate; }
+ }
+
+ public virtual Controls Controls
+ {
+ get { return controls; }
+ }
+
+ /**
+ *
+ * CertRequest ::= SEQUENCE {
+ * certReqId INTEGER, -- ID for matching request and reply
+ * certTemplate CertTemplate, -- Selected fields of cert to be issued
+ * controls Controls OPTIONAL } -- Attributes affecting issuance
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(certReqId, certTemplate);
+ v.AddOptional(controls);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertRequest.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertRequest.cs.meta
new file mode 100644
index 00000000..c84b7454
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertRequest.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6af25341d32afe64b918925674998e1e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplate.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplate.cs
new file mode 100644
index 00000000..fbefc7e5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplate.cs
@@ -0,0 +1,153 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class CertTemplate
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence seq;
+
+ private readonly DerInteger version;
+ private readonly DerInteger serialNumber;
+ private readonly AlgorithmIdentifier signingAlg;
+ private readonly X509Name issuer;
+ private readonly OptionalValidity validity;
+ private readonly X509Name subject;
+ private readonly SubjectPublicKeyInfo publicKey;
+ private readonly DerBitString issuerUID;
+ private readonly DerBitString subjectUID;
+ private readonly X509Extensions extensions;
+
+ private CertTemplate(Asn1Sequence seq)
+ {
+ this.seq = seq;
+
+ foreach (Asn1TaggedObject tObj in seq)
+ {
+ switch (tObj.TagNo)
+ {
+ case 0:
+ version = DerInteger.GetInstance(tObj, false);
+ break;
+ case 1:
+ serialNumber = DerInteger.GetInstance(tObj, false);
+ break;
+ case 2:
+ signingAlg = AlgorithmIdentifier.GetInstance(tObj, false);
+ break;
+ case 3:
+ issuer = X509Name.GetInstance(tObj, true); // CHOICE
+ break;
+ case 4:
+ validity = OptionalValidity.GetInstance(Asn1Sequence.GetInstance(tObj, false));
+ break;
+ case 5:
+ subject = X509Name.GetInstance(tObj, true); // CHOICE
+ break;
+ case 6:
+ publicKey = SubjectPublicKeyInfo.GetInstance(tObj, false);
+ break;
+ case 7:
+ issuerUID = DerBitString.GetInstance(tObj, false);
+ break;
+ case 8:
+ subjectUID = DerBitString.GetInstance(tObj, false);
+ break;
+ case 9:
+ extensions = X509Extensions.GetInstance(tObj, false);
+ break;
+ default:
+ throw new ArgumentException("unknown tag: " + tObj.TagNo, "seq");
+ }
+ }
+ }
+
+ public static CertTemplate GetInstance(object obj)
+ {
+ if (obj is CertTemplate)
+ return (CertTemplate)obj;
+
+ if (obj != null)
+ return new CertTemplate(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public virtual int Version
+ {
+ get { return version.IntValueExact; }
+ }
+
+ public virtual DerInteger SerialNumber
+ {
+ get { return serialNumber; }
+ }
+
+ public virtual AlgorithmIdentifier SigningAlg
+ {
+ get { return signingAlg; }
+ }
+
+ public virtual X509Name Issuer
+ {
+ get { return issuer; }
+ }
+
+ public virtual OptionalValidity Validity
+ {
+ get { return validity; }
+ }
+
+ public virtual X509Name Subject
+ {
+ get { return subject; }
+ }
+
+ public virtual SubjectPublicKeyInfo PublicKey
+ {
+ get { return publicKey; }
+ }
+
+ public virtual DerBitString IssuerUID
+ {
+ get { return issuerUID; }
+ }
+
+ public virtual DerBitString SubjectUID
+ {
+ get { return subjectUID; }
+ }
+
+ public virtual X509Extensions Extensions
+ {
+ get { return extensions; }
+ }
+
+ /**
+ *
+ * CertTemplate ::= SEQUENCE {
+ * version [0] Version OPTIONAL,
+ * serialNumber [1] INTEGER OPTIONAL,
+ * signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ * issuer [3] Name OPTIONAL,
+ * validity [4] OptionalValidity OPTIONAL,
+ * subject [5] Name OPTIONAL,
+ * publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ * issuerUID [7] UniqueIdentifier OPTIONAL,
+ * subjectUID [8] UniqueIdentifier OPTIONAL,
+ * extensions [9] Extensions OPTIONAL }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return seq;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplate.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplate.cs.meta
new file mode 100644
index 00000000..03f29ccb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplate.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1121577eb63294944a978be8412f172a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplateBuilder.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplateBuilder.cs
new file mode 100644
index 00000000..bb4b98df
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplateBuilder.cs
@@ -0,0 +1,129 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class CertTemplateBuilder
+ {
+ private DerInteger version;
+ private DerInteger serialNumber;
+ private AlgorithmIdentifier signingAlg;
+ private X509Name issuer;
+ private OptionalValidity validity;
+ private X509Name subject;
+ private SubjectPublicKeyInfo publicKey;
+ private DerBitString issuerUID;
+ private DerBitString subjectUID;
+ private X509Extensions extensions;
+
+ /** Sets the X.509 version. Note: for X509v3, use 2 here. */
+ public virtual CertTemplateBuilder SetVersion(int ver)
+ {
+ version = new DerInteger(ver);
+ return this;
+ }
+
+ public virtual CertTemplateBuilder SetSerialNumber(DerInteger ser)
+ {
+ serialNumber = ser;
+ return this;
+ }
+
+ public virtual CertTemplateBuilder SetSigningAlg(AlgorithmIdentifier aid)
+ {
+ signingAlg = aid;
+ return this;
+ }
+
+ public virtual CertTemplateBuilder SetIssuer(X509Name name)
+ {
+ issuer = name;
+ return this;
+ }
+
+ public virtual CertTemplateBuilder SetValidity(OptionalValidity v)
+ {
+ validity = v;
+ return this;
+ }
+
+ public virtual CertTemplateBuilder SetSubject(X509Name name)
+ {
+ subject = name;
+ return this;
+ }
+
+ public virtual CertTemplateBuilder SetPublicKey(SubjectPublicKeyInfo spki)
+ {
+ publicKey = spki;
+ return this;
+ }
+
+ /** Sets the issuer unique ID (deprecated in X.509v3) */
+ public virtual CertTemplateBuilder SetIssuerUID(DerBitString uid)
+ {
+ issuerUID = uid;
+ return this;
+ }
+
+ /** Sets the subject unique ID (deprecated in X.509v3) */
+ public virtual CertTemplateBuilder SetSubjectUID(DerBitString uid)
+ {
+ subjectUID = uid;
+ return this;
+ }
+
+ public virtual CertTemplateBuilder SetExtensions(X509Extensions extens)
+ {
+ extensions = extens;
+ return this;
+ }
+
+ /**
+ *
+ * CertTemplate ::= SEQUENCE {
+ * version [0] Version OPTIONAL,
+ * serialNumber [1] INTEGER OPTIONAL,
+ * signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ * issuer [3] Name OPTIONAL,
+ * validity [4] OptionalValidity OPTIONAL,
+ * subject [5] Name OPTIONAL,
+ * publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ * issuerUID [7] UniqueIdentifier OPTIONAL,
+ * subjectUID [8] UniqueIdentifier OPTIONAL,
+ * extensions [9] Extensions OPTIONAL }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public virtual CertTemplate Build()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ AddOptional(v, 0, false, version);
+ AddOptional(v, 1, false, serialNumber);
+ AddOptional(v, 2, false, signingAlg);
+ AddOptional(v, 3, true, issuer); // CHOICE
+ AddOptional(v, 4, false, validity);
+ AddOptional(v, 5, true, subject); // CHOICE
+ AddOptional(v, 6, false, publicKey);
+ AddOptional(v, 7, false, issuerUID);
+ AddOptional(v, 8, false, subjectUID);
+ AddOptional(v, 9, false, extensions);
+
+ return CertTemplate.GetInstance(new DerSequence(v));
+ }
+
+ private void AddOptional(Asn1EncodableVector v, int tagNo, bool isExplicit, Asn1Encodable obj)
+ {
+ if (obj != null)
+ {
+ v.Add(new DerTaggedObject(isExplicit, tagNo, obj));
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplateBuilder.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplateBuilder.cs.meta
new file mode 100644
index 00000000..d79a479b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CertTemplateBuilder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 68e8dab6aededb04fa4a98f8ba95f225
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/Controls.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/Controls.cs
new file mode 100644
index 00000000..2de5195b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/Controls.cs
@@ -0,0 +1,59 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class Controls
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence content;
+
+ private Controls(Asn1Sequence seq)
+ {
+ content = seq;
+ }
+
+ public static Controls GetInstance(object obj)
+ {
+ if (obj is Controls)
+ return (Controls)obj;
+
+ if (obj is Asn1Sequence)
+ return new Controls((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public Controls(params AttributeTypeAndValue[] atvs)
+ {
+ content = new DerSequence(atvs);
+ }
+
+ public virtual AttributeTypeAndValue[] ToAttributeTypeAndValueArray()
+ {
+ AttributeTypeAndValue[] result = new AttributeTypeAndValue[content.Count];
+ for (int i = 0; i != result.Length; ++i)
+ {
+ result[i] = AttributeTypeAndValue.GetInstance(content[i]);
+ }
+ return result;
+ }
+
+ /**
+ *
+ * Controls ::= SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return content;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/Controls.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/Controls.cs.meta
new file mode 100644
index 00000000..50d678af
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/Controls.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7181c72771f04904580361d17a8472c5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CrmfObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CrmfObjectIdentifiers.cs
new file mode 100644
index 00000000..e71f4ac2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CrmfObjectIdentifiers.cs
@@ -0,0 +1,27 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public abstract class CrmfObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier id_pkix = new DerObjectIdentifier("1.3.6.1.5.5.7");
+
+ // arc for Internet X.509 PKI protocols and their components
+
+ public static readonly DerObjectIdentifier id_pkip = id_pkix.Branch("5");
+
+ public static readonly DerObjectIdentifier id_regCtrl = id_pkip.Branch("1");
+ public static readonly DerObjectIdentifier id_regCtrl_regToken = id_regCtrl.Branch("1");
+ public static readonly DerObjectIdentifier id_regCtrl_authenticator = id_regCtrl.Branch("2");
+ public static readonly DerObjectIdentifier id_regCtrl_pkiPublicationInfo = id_regCtrl.Branch("3");
+ public static readonly DerObjectIdentifier id_regCtrl_pkiArchiveOptions = id_regCtrl.Branch("4");
+
+ public static readonly DerObjectIdentifier id_ct_encKeyWithID = new DerObjectIdentifier(PkcsObjectIdentifiers.IdCT + ".21");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CrmfObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CrmfObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..a03553dc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/CrmfObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e4012dc3c092db046a06a77ad11940ea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncKeyWithID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncKeyWithID.cs
new file mode 100644
index 00000000..74922d8d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncKeyWithID.cs
@@ -0,0 +1,107 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class EncKeyWithID
+ : Asn1Encodable
+ {
+ private readonly PrivateKeyInfo privKeyInfo;
+ private readonly Asn1Encodable identifier;
+
+ public static EncKeyWithID GetInstance(object obj)
+ {
+ if (obj is EncKeyWithID)
+ return (EncKeyWithID)obj;
+
+ if (obj != null)
+ return new EncKeyWithID(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private EncKeyWithID(Asn1Sequence seq)
+ {
+ this.privKeyInfo = PrivateKeyInfo.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ if (!(seq[1] is DerUtf8String))
+ {
+ this.identifier = GeneralName.GetInstance(seq[1]);
+ }
+ else
+ {
+ this.identifier = (Asn1Encodable)seq[1];
+ }
+ }
+ else
+ {
+ this.identifier = null;
+ }
+ }
+
+ public EncKeyWithID(PrivateKeyInfo privKeyInfo)
+ {
+ this.privKeyInfo = privKeyInfo;
+ this.identifier = null;
+ }
+
+ public EncKeyWithID(PrivateKeyInfo privKeyInfo, DerUtf8String str)
+ {
+ this.privKeyInfo = privKeyInfo;
+ this.identifier = str;
+ }
+
+ public EncKeyWithID(PrivateKeyInfo privKeyInfo, GeneralName generalName)
+ {
+ this.privKeyInfo = privKeyInfo;
+ this.identifier = generalName;
+ }
+
+ public virtual PrivateKeyInfo PrivateKey
+ {
+ get { return privKeyInfo; }
+ }
+
+ public virtual bool HasIdentifier
+ {
+ get { return identifier != null; }
+ }
+
+ public virtual bool IsIdentifierUtf8String
+ {
+ get { return identifier is DerUtf8String; }
+ }
+
+ public virtual Asn1Encodable Identifier
+ {
+ get { return identifier; }
+ }
+
+ /**
+ *
+ * EncKeyWithID ::= SEQUENCE {
+ * privateKey PrivateKeyInfo,
+ * identifier CHOICE {
+ * string UTF8String,
+ * generalName GeneralName
+ * } OPTIONAL
+ * }
+ *
+ * @return
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(privKeyInfo);
+ v.AddOptional(identifier);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncKeyWithID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncKeyWithID.cs.meta
new file mode 100644
index 00000000..6e3dcfdc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncKeyWithID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4d9851431fa9fa749b0d380fc86ade10
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedKey.cs
new file mode 100644
index 00000000..becfd3b4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedKey.cs
@@ -0,0 +1,66 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class EncryptedKey
+ : Asn1Encodable, IAsn1Choice
+ {
+ public static EncryptedKey GetInstance(object obj)
+ {
+ if (obj is EncryptedKey encryptedKey)
+ return encryptedKey;
+
+ if (obj is Asn1TaggedObject taggedObject)
+ return new EncryptedKey(EnvelopedData.GetInstance(taggedObject, false));
+
+ return new EncryptedKey(EncryptedValue.GetInstance(obj));
+ }
+
+ private readonly EnvelopedData m_envelopedData;
+ private readonly EncryptedValue m_encryptedValue;
+
+ public EncryptedKey(EnvelopedData envelopedData)
+ {
+ m_envelopedData = envelopedData;
+ }
+
+ public EncryptedKey(EncryptedValue encryptedValue)
+ {
+ m_encryptedValue = encryptedValue;
+ }
+
+ public virtual bool IsEncryptedValue => m_encryptedValue != null;
+
+ public virtual Asn1Encodable Value
+ {
+ get
+ {
+ if (m_encryptedValue != null)
+ return m_encryptedValue;
+
+ return m_envelopedData;
+ }
+ }
+
+ /**
+ *
+ * EncryptedKey ::= CHOICE {
+ * encryptedValue EncryptedValue, -- deprecated
+ * envelopedData [0] EnvelopedData }
+ * -- The encrypted private key MUST be placed in the envelopedData
+ * -- encryptedContentInfo encryptedContent OCTET STRING.
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (m_encryptedValue != null)
+ return m_encryptedValue.ToAsn1Object();
+
+ return new DerTaggedObject(false, 0, m_envelopedData);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedKey.cs.meta
new file mode 100644
index 00000000..653bbbcc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 987b8baf397675b4b8c1c16838cc119a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedValue.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedValue.cs
new file mode 100644
index 00000000..3ea0066f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedValue.cs
@@ -0,0 +1,121 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class EncryptedValue
+ : Asn1Encodable
+ {
+ public static EncryptedValue GetInstance(object obj)
+ {
+ if (obj is EncryptedValue encryptedValue)
+ return encryptedValue;
+
+ if (obj != null)
+ return new EncryptedValue(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly AlgorithmIdentifier m_intendedAlg;
+ private readonly AlgorithmIdentifier m_symmAlg;
+ private readonly DerBitString m_encSymmKey;
+ private readonly AlgorithmIdentifier m_keyAlg;
+ private readonly Asn1OctetString m_valueHint;
+ private readonly DerBitString m_encValue;
+
+ private EncryptedValue(Asn1Sequence seq)
+ {
+ int index = 0;
+ while (seq[index] is Asn1TaggedObject tObj)
+ {
+ switch (tObj.TagNo)
+ {
+ case 0:
+ m_intendedAlg = AlgorithmIdentifier.GetInstance(tObj, false);
+ break;
+ case 1:
+ m_symmAlg = AlgorithmIdentifier.GetInstance(tObj, false);
+ break;
+ case 2:
+ m_encSymmKey = DerBitString.GetInstance(tObj, false);
+ break;
+ case 3:
+ m_keyAlg = AlgorithmIdentifier.GetInstance(tObj, false);
+ break;
+ case 4:
+ m_valueHint = Asn1OctetString.GetInstance(tObj, false);
+ break;
+ }
+ ++index;
+ }
+
+ m_encValue = DerBitString.GetInstance(seq[index]);
+ }
+
+ public EncryptedValue(AlgorithmIdentifier intendedAlg, AlgorithmIdentifier symmAlg, DerBitString encSymmKey,
+ AlgorithmIdentifier keyAlg, Asn1OctetString valueHint, DerBitString encValue)
+ {
+ if (encValue == null)
+ throw new ArgumentNullException(nameof(encValue));
+
+ m_intendedAlg = intendedAlg;
+ m_symmAlg = symmAlg;
+ m_encSymmKey = encSymmKey;
+ m_keyAlg = keyAlg;
+ m_valueHint = valueHint;
+ m_encValue = encValue;
+ }
+
+ public virtual AlgorithmIdentifier IntendedAlg => m_intendedAlg;
+
+ public virtual AlgorithmIdentifier SymmAlg => m_symmAlg;
+
+ public virtual DerBitString EncSymmKey => m_encSymmKey;
+
+ public virtual AlgorithmIdentifier KeyAlg => m_keyAlg;
+
+ public virtual Asn1OctetString ValueHint => m_valueHint;
+
+ public virtual DerBitString EncValue => m_encValue;
+
+ /**
+ *
+ * (IMPLICIT TAGS)
+ * EncryptedValue ::= SEQUENCE {
+ * intendedAlg [0] AlgorithmIdentifier OPTIONAL,
+ * -- the intended algorithm for which the value will be used
+ * symmAlg [1] AlgorithmIdentifier OPTIONAL,
+ * -- the symmetric algorithm used to encrypt the value
+ * encSymmKey [2] BIT STRING OPTIONAL,
+ * -- the (encrypted) symmetric key used to encrypt the value
+ * keyAlg [3] AlgorithmIdentifier OPTIONAL,
+ * -- algorithm used to encrypt the symmetric key
+ * valueHint [4] OCTET STRING OPTIONAL,
+ * -- a brief description or identifier of the encValue content
+ * -- (may be meaningful only to the sending entity, and used only
+ * -- if EncryptedValue might be re-examined by the sending entity
+ * -- in the future)
+ * encValue BIT STRING }
+ * -- the encrypted value itself
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(false, 0, m_intendedAlg);
+ v.AddOptionalTagged(false, 1, m_symmAlg);
+ v.AddOptionalTagged(false, 2, m_encSymmKey);
+ v.AddOptionalTagged(false, 3, m_keyAlg);
+ v.AddOptionalTagged(false, 4, m_valueHint);
+ v.Add(m_encValue);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedValue.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedValue.cs.meta
new file mode 100644
index 00000000..ea3a83d0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/EncryptedValue.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 384131c555e30744da1edefbb044e78e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/OptionalValidity.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/OptionalValidity.cs
new file mode 100644
index 00000000..b6c0061f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/OptionalValidity.cs
@@ -0,0 +1,72 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class OptionalValidity
+ : Asn1Encodable
+ {
+ private readonly Time notBefore;
+ private readonly Time notAfter;
+
+ private OptionalValidity(Asn1Sequence seq)
+ {
+ foreach (Asn1TaggedObject tObj in seq)
+ {
+ if (tObj.TagNo == 0)
+ {
+ notBefore = Time.GetInstance(tObj, true);
+ }
+ else
+ {
+ notAfter = Time.GetInstance(tObj, true);
+ }
+ }
+ }
+
+ public static OptionalValidity GetInstance(object obj)
+ {
+ if (obj == null || obj is OptionalValidity)
+ return (OptionalValidity)obj;
+
+ return new OptionalValidity(Asn1Sequence.GetInstance(obj));
+ }
+
+ public OptionalValidity(Time notBefore, Time notAfter)
+ {
+ this.notBefore = notBefore;
+ this.notAfter = notAfter;
+ }
+
+ public virtual Time NotBefore
+ {
+ get { return notBefore; }
+ }
+
+ public virtual Time NotAfter
+ {
+ get { return notAfter; }
+ }
+
+ /**
+ *
+ * OptionalValidity ::= SEQUENCE {
+ * notBefore [0] Time OPTIONAL,
+ * notAfter [1] Time OPTIONAL } --at least one MUST be present
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, notBefore);
+ v.AddOptionalTagged(true, 1, notAfter);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/OptionalValidity.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/OptionalValidity.cs.meta
new file mode 100644
index 00000000..50965c5d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/OptionalValidity.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1f1791c18ff6755478877daf115e5d74
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIArchiveOptions.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIArchiveOptions.cs
new file mode 100644
index 00000000..b3914155
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIArchiveOptions.cs
@@ -0,0 +1,111 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class PkiArchiveOptions
+ : Asn1Encodable, IAsn1Choice
+ {
+ public const int encryptedPrivKey = 0;
+ public const int keyGenParameters = 1;
+ public const int archiveRemGenPrivKey = 2;
+
+ private readonly Asn1Encodable value;
+
+ public static PkiArchiveOptions GetInstance(object obj)
+ {
+ if (obj is PkiArchiveOptions)
+ return (PkiArchiveOptions)obj;
+
+ if (obj is Asn1TaggedObject)
+ return new PkiArchiveOptions((Asn1TaggedObject)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private PkiArchiveOptions(Asn1TaggedObject tagged)
+ {
+ switch (tagged.TagNo)
+ {
+ case encryptedPrivKey:
+ value = EncryptedKey.GetInstance(tagged.GetObject());
+ break;
+ case keyGenParameters:
+ value = Asn1OctetString.GetInstance(tagged, false);
+ break;
+ case archiveRemGenPrivKey:
+ value = DerBoolean.GetInstance(tagged, false);
+ break;
+ default:
+ throw new ArgumentException("unknown tag number: " + tagged.TagNo, "tagged");
+ }
+ }
+
+ public PkiArchiveOptions(EncryptedKey encKey)
+ {
+ this.value = encKey;
+ }
+
+ public PkiArchiveOptions(Asn1OctetString keyGenParameters)
+ {
+ this.value = keyGenParameters;
+ }
+
+ public PkiArchiveOptions(bool archiveRemGenPrivKey)
+ {
+ this.value = DerBoolean.GetInstance(archiveRemGenPrivKey);
+ }
+
+ public virtual int Type
+ {
+ get
+ {
+ if (value is EncryptedKey)
+ return encryptedPrivKey;
+
+ if (value is Asn1OctetString)
+ return keyGenParameters;
+
+ return archiveRemGenPrivKey;
+ }
+ }
+
+ public virtual Asn1Encodable Value
+ {
+ get { return value; }
+ }
+
+ /**
+ *
+ * PkiArchiveOptions ::= CHOICE {
+ * encryptedPrivKey [0] EncryptedKey,
+ * -- the actual value of the private key
+ * keyGenParameters [1] KeyGenParameters,
+ * -- parameters which allow the private key to be re-generated
+ * archiveRemGenPrivKey [2] BOOLEAN }
+ * -- set to TRUE if sender wishes receiver to archive the private
+ * -- key of a key pair that the receiver generates in response to
+ * -- this request; set to FALSE if no archival is desired.
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (value is EncryptedKey)
+ {
+ return new DerTaggedObject(true, encryptedPrivKey, value); // choice
+ }
+
+ if (value is Asn1OctetString)
+ {
+ return new DerTaggedObject(false, keyGenParameters, value);
+ }
+
+ return new DerTaggedObject(false, archiveRemGenPrivKey, value);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIArchiveOptions.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIArchiveOptions.cs.meta
new file mode 100644
index 00000000..6df93b61
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIArchiveOptions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fb54bc848ddbe7142a167523c41379b1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIPublicationInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIPublicationInfo.cs
new file mode 100644
index 00000000..7803fdf8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIPublicationInfo.cs
@@ -0,0 +1,116 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ /**
+ *
+ * PKIPublicationInfo ::= SEQUENCE {
+ * action INTEGER {
+ * dontPublish (0),
+ * pleasePublish (1) },
+ * pubInfos SEQUENCE SIZE (1..MAX) OF SinglePubInfo OPTIONAL }
+ * -- pubInfos MUST NOT be present if action is "dontPublish"
+ * -- (if action is "pleasePublish" and pubInfos is omitted,
+ * -- "dontCare" is assumed)
+ *
+ */
+ public class PkiPublicationInfo
+ : Asn1Encodable
+ {
+ public static readonly DerInteger DontPublish = new DerInteger(0);
+ public static readonly DerInteger PleasePublish = new DerInteger(1);
+
+ public static PkiPublicationInfo GetInstance(object obj)
+ {
+ if (obj is PkiPublicationInfo pkiPublicationInfo)
+ return pkiPublicationInfo;
+
+ if (obj != null)
+ return new PkiPublicationInfo(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private readonly DerInteger m_action;
+ private readonly Asn1Sequence m_pubInfos;
+
+ private PkiPublicationInfo(Asn1Sequence seq)
+ {
+ m_action = DerInteger.GetInstance(seq[0]);
+ if (seq.Count > 1)
+ {
+ m_pubInfos = Asn1Sequence.GetInstance(seq[1]);
+ }
+ }
+
+ public PkiPublicationInfo(BigInteger action)
+ : this(new DerInteger(action))
+ {
+ }
+
+ public PkiPublicationInfo(DerInteger action)
+ {
+ m_action = action;
+ }
+
+ /**
+ * Constructor with a single pubInfo, assumes pleasePublish as the action.
+ *
+ * @param pubInfo the pubInfo to be published (can be null if don't care is required).
+ */
+ public PkiPublicationInfo(SinglePubInfo pubInfo)
+ : this(pubInfo != null ? new SinglePubInfo[1]{ pubInfo } : null)
+ {
+ }
+
+ /**
+ * Constructor with multiple pubInfo, assumes pleasePublish as the action.
+ *
+ * @param pubInfos the pubInfos to be published (can be null if don't care is required).
+ */
+ public PkiPublicationInfo(SinglePubInfo[] pubInfos)
+ {
+ m_action = PleasePublish;
+
+ if (pubInfos != null)
+ {
+ m_pubInfos = new DerSequence(pubInfos);
+ }
+ }
+
+ public virtual DerInteger Action => m_action;
+
+ public virtual SinglePubInfo[] GetPubInfos()
+ {
+ if (m_pubInfos == null)
+ return null;
+
+ return m_pubInfos.MapElements(SinglePubInfo.GetInstance);
+ }
+
+ /**
+ *
+ * PkiPublicationInfo ::= SEQUENCE {
+ * action INTEGER {
+ * dontPublish (0),
+ * pleasePublish (1) },
+ * pubInfos SEQUENCE SIZE (1..MAX) OF SinglePubInfo OPTIONAL }
+ * -- pubInfos MUST NOT be present if action is "dontPublish"
+ * -- (if action is "pleasePublish" and pubInfos is omitted,
+ * -- "dontCare" is assumed)
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (m_pubInfos == null)
+ return new DerSequence(m_action);
+
+ return new DerSequence(m_action, m_pubInfos);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIPublicationInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIPublicationInfo.cs.meta
new file mode 100644
index 00000000..c3c08de2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKIPublicationInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b092b0381196e13428b372cefd759e9a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKMacValue.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKMacValue.cs
new file mode 100644
index 00000000..6b5646e0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKMacValue.cs
@@ -0,0 +1,94 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ /**
+ * Password-based MAC value for use with POPOSigningKeyInput.
+ */
+ public class PKMacValue
+ : Asn1Encodable
+ {
+ private readonly AlgorithmIdentifier algID;
+ private readonly DerBitString macValue;
+
+ private PKMacValue(Asn1Sequence seq)
+ {
+ this.algID = AlgorithmIdentifier.GetInstance(seq[0]);
+ this.macValue = DerBitString.GetInstance(seq[1]);
+ }
+
+ public static PKMacValue GetInstance(object obj)
+ {
+ if (obj is PKMacValue)
+ return (PKMacValue)obj;
+
+ if (obj is Asn1Sequence)
+ return new PKMacValue((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static PKMacValue GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * Creates a new PKMACValue.
+ * @param params parameters for password-based MAC
+ * @param value MAC of the DER-encoded SubjectPublicKeyInfo
+ */
+ public PKMacValue(
+ PbmParameter pbmParams,
+ DerBitString macValue)
+ : this(new AlgorithmIdentifier(CmpObjectIdentifiers.passwordBasedMac, pbmParams), macValue)
+ {
+ }
+
+ /**
+ * Creates a new PKMACValue.
+ * @param aid CMPObjectIdentifiers.passwordBasedMAC, with PBMParameter
+ * @param value MAC of the DER-encoded SubjectPublicKeyInfo
+ */
+ public PKMacValue(
+ AlgorithmIdentifier algID,
+ DerBitString macValue)
+ {
+ this.algID = algID;
+ this.macValue = macValue;
+ }
+
+ public virtual AlgorithmIdentifier AlgID
+ {
+ get { return algID; }
+ }
+
+ public virtual DerBitString MacValue
+ {
+ get { return macValue; }
+ }
+
+ /**
+ *
+ * PKMACValue ::= SEQUENCE {
+ * algId AlgorithmIdentifier,
+ * -- algorithm value shall be PasswordBasedMac 1.2.840.113533.7.66.13
+ * -- parameter value is PBMParameter
+ * value BIT STRING }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(algID, macValue);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKMacValue.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKMacValue.cs.meta
new file mode 100644
index 00000000..15cfdd0c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PKMacValue.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 95cf0bd85d68cb0439a7cb22a794ecc7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoPrivKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoPrivKey.cs
new file mode 100644
index 00000000..8eece57f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoPrivKey.cs
@@ -0,0 +1,88 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class PopoPrivKey
+ : Asn1Encodable, IAsn1Choice
+ {
+ public const int thisMessage = 0;
+ public const int subsequentMessage = 1;
+ public const int dhMAC = 2;
+ public const int agreeMAC = 3;
+ public const int encryptedKey = 4;
+
+ private readonly int tagNo;
+ private readonly Asn1Encodable obj;
+
+ private PopoPrivKey(Asn1TaggedObject obj)
+ {
+ this.tagNo = obj.TagNo;
+
+ switch (tagNo)
+ {
+ case thisMessage:
+ this.obj = DerBitString.GetInstance(obj, false);
+ break;
+ case subsequentMessage:
+ this.obj = SubsequentMessage.ValueOf(DerInteger.GetInstance(obj, false).IntValueExact);
+ break;
+ case dhMAC:
+ this.obj = DerBitString.GetInstance(obj, false);
+ break;
+ case agreeMAC:
+ this.obj = PKMacValue.GetInstance(obj, false);
+ break;
+ case encryptedKey:
+ this.obj = EnvelopedData.GetInstance(obj, false);
+ break;
+ default:
+ throw new ArgumentException("unknown tag in PopoPrivKey", "obj");
+ }
+ }
+
+ public static PopoPrivKey GetInstance(Asn1TaggedObject tagged, bool isExplicit)
+ {
+ return new PopoPrivKey(Asn1TaggedObject.GetInstance(tagged, true));
+ }
+
+ public PopoPrivKey(SubsequentMessage msg)
+ {
+ this.tagNo = subsequentMessage;
+ this.obj = msg;
+ }
+
+ public virtual int Type
+ {
+ get { return tagNo; }
+ }
+
+ public virtual Asn1Encodable Value
+ {
+ get { return obj; }
+ }
+
+ /**
+ *
+ * PopoPrivKey ::= CHOICE {
+ * thisMessage [0] BIT STRING, -- Deprecated
+ * -- possession is proven in this message (which contains the private
+ * -- key itself (encrypted for the CA))
+ * subsequentMessage [1] SubsequentMessage,
+ * -- possession will be proven in a subsequent message
+ * dhMAC [2] BIT STRING, -- Deprecated
+ * agreeMAC [3] PKMACValue,
+ * encryptedKey [4] EnvelopedData }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerTaggedObject(false, tagNo, obj);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoPrivKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoPrivKey.cs.meta
new file mode 100644
index 00000000..0b71ffdf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoPrivKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f28283b87adf8414b8447039f9e98f91
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKey.cs
new file mode 100644
index 00000000..7173cbe5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKey.cs
@@ -0,0 +1,114 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class PopoSigningKey
+ : Asn1Encodable
+ {
+ private readonly PopoSigningKeyInput poposkInput;
+ private readonly AlgorithmIdentifier algorithmIdentifier;
+ private readonly DerBitString signature;
+
+ private PopoSigningKey(Asn1Sequence seq)
+ {
+ int index = 0;
+
+ if (seq[index] is Asn1TaggedObject)
+ {
+ Asn1TaggedObject tagObj
+ = (Asn1TaggedObject) seq[index++];
+ if (tagObj.TagNo != 0)
+ {
+ throw new ArgumentException( "Unknown PopoSigningKeyInput tag: " + tagObj.TagNo, "seq");
+ }
+ poposkInput = PopoSigningKeyInput.GetInstance(tagObj.GetObject());
+ }
+ algorithmIdentifier = AlgorithmIdentifier.GetInstance(seq[index++]);
+ signature = DerBitString.GetInstance(seq[index]);
+ }
+
+ public static PopoSigningKey GetInstance(object obj)
+ {
+ if (obj is PopoSigningKey)
+ return (PopoSigningKey)obj;
+
+ if (obj is Asn1Sequence)
+ return new PopoSigningKey((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static PopoSigningKey GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * Creates a new Proof of Possession object for a signing key.
+ * @param poposkIn the PopoSigningKeyInput structure, or null if the
+ * CertTemplate includes both subject and publicKey values.
+ * @param aid the AlgorithmIdentifier used to sign the proof of possession.
+ * @param signature a signature over the DER-encoded value of poposkIn,
+ * or the DER-encoded value of certReq if poposkIn is null.
+ */
+ public PopoSigningKey(
+ PopoSigningKeyInput poposkIn,
+ AlgorithmIdentifier aid,
+ DerBitString signature)
+ {
+ this.poposkInput = poposkIn;
+ this.algorithmIdentifier = aid;
+ this.signature = signature;
+ }
+
+ public virtual PopoSigningKeyInput PoposkInput
+ {
+ get { return poposkInput; }
+ }
+
+ public virtual AlgorithmIdentifier AlgorithmIdentifier
+ {
+ get { return algorithmIdentifier; }
+ }
+
+ public virtual DerBitString Signature
+ {
+ get { return signature; }
+ }
+
+ /**
+ *
+ * PopoSigningKey ::= SEQUENCE {
+ * poposkInput [0] PopoSigningKeyInput OPTIONAL,
+ * algorithmIdentifier AlgorithmIdentifier,
+ * signature BIT STRING }
+ * -- The signature (using "algorithmIdentifier") is on the
+ * -- DER-encoded value of poposkInput. NOTE: If the CertReqMsg
+ * -- certReq CertTemplate contains the subject and publicKey values,
+ * -- then poposkInput MUST be omitted and the signature MUST be
+ * -- computed on the DER-encoded value of CertReqMsg certReq. If
+ * -- the CertReqMsg certReq CertTemplate does not contain the public
+ * -- key and subject values, then poposkInput MUST be present and
+ * -- MUST be signed. This strategy ensures that the public key is
+ * -- not present in both the poposkInput and CertReqMsg certReq
+ * -- CertTemplate fields.
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(false, 0, poposkInput);
+ v.Add(algorithmIdentifier);
+ v.Add(signature);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKey.cs.meta
new file mode 100644
index 00000000..08b2860b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6208fd84c2584df449899d3bba939bd9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKeyInput.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKeyInput.cs
new file mode 100644
index 00000000..3928a52f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKeyInput.cs
@@ -0,0 +1,120 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class PopoSigningKeyInput
+ : Asn1Encodable
+ {
+ private readonly GeneralName sender;
+ private readonly PKMacValue publicKeyMac;
+ private readonly SubjectPublicKeyInfo publicKey;
+
+ private PopoSigningKeyInput(Asn1Sequence seq)
+ {
+ Asn1Encodable authInfo = (Asn1Encodable)seq[0];
+
+ if (authInfo is Asn1TaggedObject)
+ {
+ Asn1TaggedObject tagObj = (Asn1TaggedObject)authInfo;
+ if (tagObj.TagNo != 0)
+ {
+ throw new ArgumentException("Unknown authInfo tag: " + tagObj.TagNo, "seq");
+ }
+ sender = GeneralName.GetInstance(tagObj.GetObject());
+ }
+ else
+ {
+ publicKeyMac = PKMacValue.GetInstance(authInfo);
+ }
+
+ publicKey = SubjectPublicKeyInfo.GetInstance(seq[1]);
+ }
+
+ public static PopoSigningKeyInput GetInstance(object obj)
+ {
+ if (obj is PopoSigningKeyInput)
+ return (PopoSigningKeyInput)obj;
+
+ if (obj is Asn1Sequence)
+ return new PopoSigningKeyInput((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /** Creates a new PopoSigningKeyInput with sender name as authInfo. */
+ public PopoSigningKeyInput(
+ GeneralName sender,
+ SubjectPublicKeyInfo spki)
+ {
+ this.sender = sender;
+ this.publicKey = spki;
+ }
+
+ /** Creates a new PopoSigningKeyInput using password-based MAC. */
+ public PopoSigningKeyInput(
+ PKMacValue pkmac,
+ SubjectPublicKeyInfo spki)
+ {
+ this.publicKeyMac = pkmac;
+ this.publicKey = spki;
+ }
+
+ /** Returns the sender field, or null if authInfo is publicKeyMac */
+ public virtual GeneralName Sender
+ {
+ get { return sender; }
+ }
+
+ /** Returns the publicKeyMac field, or null if authInfo is sender */
+ public virtual PKMacValue PublicKeyMac
+ {
+ get { return publicKeyMac; }
+ }
+
+ public virtual SubjectPublicKeyInfo PublicKey
+ {
+ get { return publicKey; }
+ }
+
+ /**
+ *
+ * PopoSigningKeyInput ::= SEQUENCE {
+ * authInfo CHOICE {
+ * sender [0] GeneralName,
+ * -- used only if an authenticated identity has been
+ * -- established for the sender (e.g., a DN from a
+ * -- previously-issued and currently-valid certificate
+ * publicKeyMac PKMacValue },
+ * -- used if no authenticated GeneralName currently exists for
+ * -- the sender; publicKeyMac contains a password-based MAC
+ * -- on the DER-encoded value of publicKey
+ * publicKey SubjectPublicKeyInfo } -- from CertTemplate
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (sender != null)
+ {
+ v.Add(new DerTaggedObject(false, 0, sender));
+ }
+ else
+ {
+ v.Add(publicKeyMac);
+ }
+
+ v.Add(publicKey);
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKeyInput.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKeyInput.cs.meta
new file mode 100644
index 00000000..aac940c3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/PopoSigningKeyInput.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2412d787b4f435545abff0826e0c9e4d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/ProofOfPossession.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/ProofOfPossession.cs
new file mode 100644
index 00000000..1856c256
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/ProofOfPossession.cs
@@ -0,0 +1,104 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class ProofOfPossession
+ : Asn1Encodable, IAsn1Choice
+ {
+ public const int TYPE_RA_VERIFIED = 0;
+ public const int TYPE_SIGNING_KEY = 1;
+ public const int TYPE_KEY_ENCIPHERMENT = 2;
+ public const int TYPE_KEY_AGREEMENT = 3;
+
+ private readonly int tagNo;
+ private readonly Asn1Encodable obj;
+
+ private ProofOfPossession(Asn1TaggedObject tagged)
+ {
+ tagNo = tagged.TagNo;
+ switch (tagNo)
+ {
+ case 0:
+ obj = DerNull.Instance;
+ break;
+ case 1:
+ obj = PopoSigningKey.GetInstance(tagged, false);
+ break;
+ case 2:
+ case 3:
+ obj = PopoPrivKey.GetInstance(tagged, false);
+ break;
+ default:
+ throw new ArgumentException("unknown tag: " + tagNo, "tagged");
+ }
+ }
+
+ public static ProofOfPossession GetInstance(object obj)
+ {
+ if (obj is ProofOfPossession)
+ return (ProofOfPossession)obj;
+
+ if (obj is Asn1TaggedObject)
+ return new ProofOfPossession((Asn1TaggedObject)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /** Creates a ProofOfPossession with type raVerified. */
+ public ProofOfPossession()
+ {
+ tagNo = TYPE_RA_VERIFIED;
+ obj = DerNull.Instance;
+ }
+
+ /** Creates a ProofOfPossession for a signing key. */
+ public ProofOfPossession(PopoSigningKey Poposk)
+ {
+ tagNo = TYPE_SIGNING_KEY;
+ obj = Poposk;
+ }
+
+ /**
+ * Creates a ProofOfPossession for key encipherment or agreement.
+ * @param type one of TYPE_KEY_ENCIPHERMENT or TYPE_KEY_AGREEMENT
+ */
+ public ProofOfPossession(int type, PopoPrivKey privkey)
+ {
+ tagNo = type;
+ obj = privkey;
+ }
+
+ public virtual int Type
+ {
+ get { return tagNo; }
+ }
+
+ public virtual Asn1Encodable Object
+ {
+ get { return obj; }
+ }
+
+ /**
+ *
+ * ProofOfPossession ::= CHOICE {
+ * raVerified [0] NULL,
+ * -- used if the RA has already verified that the requester is in
+ * -- possession of the private key
+ * signature [1] PopoSigningKey,
+ * keyEncipherment [2] PopoPrivKey,
+ * keyAgreement [3] PopoPrivKey }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerTaggedObject(false, tagNo, obj);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/ProofOfPossession.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/ProofOfPossession.cs.meta
new file mode 100644
index 00000000..87866d6f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/ProofOfPossession.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d7ca0880911f99c44b8163c48da74263
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SinglePubInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SinglePubInfo.cs
new file mode 100644
index 00000000..6df3320f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SinglePubInfo.cs
@@ -0,0 +1,63 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class SinglePubInfo
+ : Asn1Encodable
+ {
+ private readonly DerInteger pubMethod;
+ private readonly GeneralName pubLocation;
+
+ private SinglePubInfo(Asn1Sequence seq)
+ {
+ pubMethod = DerInteger.GetInstance(seq[0]);
+
+ if (seq.Count == 2)
+ {
+ pubLocation = GeneralName.GetInstance(seq[1]);
+ }
+ }
+
+ public static SinglePubInfo GetInstance(object obj)
+ {
+ if (obj is SinglePubInfo)
+ return (SinglePubInfo)obj;
+
+ if (obj is Asn1Sequence)
+ return new SinglePubInfo((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public virtual GeneralName PubLocation
+ {
+ get { return pubLocation; }
+ }
+
+ /**
+ *
+ * SinglePubInfo ::= SEQUENCE {
+ * pubMethod INTEGER {
+ * dontCare (0),
+ * x500 (1),
+ * web (2),
+ * ldap (3) },
+ * pubLocation GeneralName OPTIONAL }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(pubMethod);
+ v.AddOptional(pubLocation);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SinglePubInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SinglePubInfo.cs.meta
new file mode 100644
index 00000000..b4b1434c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SinglePubInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 645932d2306ef97438653d481b2e9963
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SubsequentMessage.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SubsequentMessage.cs
new file mode 100644
index 00000000..2653c54f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SubsequentMessage.cs
@@ -0,0 +1,31 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf
+{
+ public class SubsequentMessage
+ : DerInteger
+ {
+ public static readonly SubsequentMessage encrCert = new SubsequentMessage(0);
+ public static readonly SubsequentMessage challengeResp = new SubsequentMessage(1);
+
+ private SubsequentMessage(int value)
+ : base(value)
+ {
+ }
+
+ public static SubsequentMessage ValueOf(int value)
+ {
+ if (value == 0)
+ return encrCert;
+
+ if (value == 1)
+ return challengeResp;
+
+ throw new ArgumentException("unknown value: " + value, "value");
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SubsequentMessage.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SubsequentMessage.cs.meta
new file mode 100644
index 00000000..536865e7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/crmf/SubsequentMessage.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f6c948121986aaf45bede1acf7e93383
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib.meta
new file mode 100644
index 00000000..2b4c1a7d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 05b02271c8391bb4fb3676049ca35cc5
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib/CryptlibObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib/CryptlibObjectIdentifiers.cs
new file mode 100644
index 00000000..a4b828b7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib/CryptlibObjectIdentifiers.cs
@@ -0,0 +1,15 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cryptlib
+{
+ internal class CryptlibObjectIdentifiers
+ {
+ internal static readonly DerObjectIdentifier cryptlib = new DerObjectIdentifier("1.3.6.1.4.1.3029");
+
+ internal static readonly DerObjectIdentifier ecc = cryptlib.Branch("1.5");
+
+ internal static readonly DerObjectIdentifier curvey25519 = ecc.Branch("1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib/CryptlibObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib/CryptlibObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..95c8bbe8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptlib/CryptlibObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0adc39be45fadbd459b78552e8e7e16a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro.meta
new file mode 100644
index 00000000..0afddef8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 6bba8ac3161358f4d85bd886d90e08b3
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/CryptoProObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/CryptoProObjectIdentifiers.cs
new file mode 100644
index 00000000..cd4d3bff
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/CryptoProObjectIdentifiers.cs
@@ -0,0 +1,61 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro
+{
+ public abstract class CryptoProObjectIdentifiers
+ {
+ // GOST Algorithms OBJECT IDENTIFIERS :
+ // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2)}
+ public const string GostID = "1.2.643.2.2";
+
+ public static readonly DerObjectIdentifier GostR3411 = new DerObjectIdentifier(GostID + ".9");
+ public static readonly DerObjectIdentifier GostR3411Hmac = new DerObjectIdentifier(GostID + ".10");
+
+ public static readonly DerObjectIdentifier GostR28147Gcfb = new DerObjectIdentifier(GostID + ".21");
+
+ public static readonly DerObjectIdentifier GostR28147Cbc = GostR28147Gcfb;
+
+ public static readonly DerObjectIdentifier ID_Gost28147_89_CryptoPro_A_ParamSet = new DerObjectIdentifier(GostID + ".31.1");
+
+ public static readonly DerObjectIdentifier GostR3410x94 = new DerObjectIdentifier(GostID + ".20");
+ public static readonly DerObjectIdentifier GostR3410x2001 = new DerObjectIdentifier(GostID + ".19");
+ public static readonly DerObjectIdentifier GostR3411x94WithGostR3410x94 = new DerObjectIdentifier(GostID + ".4");
+ public static readonly DerObjectIdentifier GostR3411x94WithGostR3410x2001 = new DerObjectIdentifier(GostID + ".3");
+
+ // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2) hashes(30) }
+ public static readonly DerObjectIdentifier GostR3411x94CryptoProParamSet = new DerObjectIdentifier(GostID + ".30.1");
+
+ // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2) signs(32) }
+ public static readonly DerObjectIdentifier GostR3410x94CryptoProA = new DerObjectIdentifier(GostID + ".32.2");
+ public static readonly DerObjectIdentifier GostR3410x94CryptoProB = new DerObjectIdentifier(GostID + ".32.3");
+ public static readonly DerObjectIdentifier GostR3410x94CryptoProC = new DerObjectIdentifier(GostID + ".32.4");
+ public static readonly DerObjectIdentifier GostR3410x94CryptoProD = new DerObjectIdentifier(GostID + ".32.5");
+
+ // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2) exchanges(33) }
+ public static readonly DerObjectIdentifier GostR3410x94CryptoProXchA = new DerObjectIdentifier(GostID + ".33.1");
+ public static readonly DerObjectIdentifier GostR3410x94CryptoProXchB = new DerObjectIdentifier(GostID + ".33.2");
+ public static readonly DerObjectIdentifier GostR3410x94CryptoProXchC = new DerObjectIdentifier(GostID + ".33.3");
+
+ //{ iso(1) member-body(2)ru(643) rans(2) cryptopro(2) ecc-signs(35) }
+ public static readonly DerObjectIdentifier GostR3410x2001CryptoProA = new DerObjectIdentifier(GostID + ".35.1");
+ public static readonly DerObjectIdentifier GostR3410x2001CryptoProB = new DerObjectIdentifier(GostID + ".35.2");
+ public static readonly DerObjectIdentifier GostR3410x2001CryptoProC = new DerObjectIdentifier(GostID + ".35.3");
+
+ // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2) ecc-exchanges(36) }
+ public static readonly DerObjectIdentifier GostR3410x2001CryptoProXchA = new DerObjectIdentifier(GostID + ".36.0");
+ public static readonly DerObjectIdentifier GostR3410x2001CryptoProXchB = new DerObjectIdentifier(GostID + ".36.1");
+
+ public static readonly DerObjectIdentifier GostElSgDH3410Default = new DerObjectIdentifier(GostID + ".36.0");
+ public static readonly DerObjectIdentifier GostElSgDH3410x1 = new DerObjectIdentifier(GostID + ".36.1");
+
+ public static readonly DerObjectIdentifier GostR3410x2001CryptoProESDH = new DerObjectIdentifier(GostID + ".96");
+
+ public static readonly DerObjectIdentifier GostR3410x2001DH = new DerObjectIdentifier(GostID + ".98");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/CryptoProObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/CryptoProObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..23397985
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/CryptoProObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c23ba903641042c4f91e1e06f872e1c5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410NamedCurves.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410NamedCurves.cs
new file mode 100644
index 00000000..2953f501
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410NamedCurves.cs
@@ -0,0 +1,399 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Rosstandart;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Multiplier;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro
+{
+ /// Elliptic curve registry for GOST 3410-2001 / 2012.
+ public static class ECGost3410NamedCurves
+ {
+ private static X9ECPoint ConfigureBasepoint(ECCurve curve, BigInteger x, BigInteger y)
+ {
+ ECPoint G = curve.CreatePoint(x, y);
+ WNafUtilities.ConfigureBasepoint(G);
+ return new X9ECPoint(G, false);
+ }
+
+ private static ECCurve ConfigureCurve(ECCurve curve)
+ {
+ return curve;
+ }
+
+ private static BigInteger FromHex(string hex)
+ {
+ return new BigInteger(1, Hex.DecodeStrict(hex));
+ }
+
+ internal class Holder_gostR3410_2001_CryptoPro_A
+ : X9ECParametersHolder
+ {
+ private Holder_gostR3410_2001_CryptoPro_A() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Holder_gostR3410_2001_CryptoPro_A();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger mod_p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD97");
+ BigInteger mod_q = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6C611070995AD10045841B09B761B893");
+
+ return ConfigureCurve(new FpCurve(
+ mod_p,
+ FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD94"),
+ FromHex("A6"),
+ mod_q, BigInteger.One, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ BigInteger.One,
+ FromHex("8D91E471E0989CDA27DF505A453F2B7635294F2DDF23E3B122ACC99C9E9F1E14"));
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ };
+
+ internal class Holder_gostR3410_2001_CryptoPro_B
+ : X9ECParametersHolder
+ {
+ private Holder_gostR3410_2001_CryptoPro_B() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Holder_gostR3410_2001_CryptoPro_B();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger mod_p = FromHex("8000000000000000000000000000000000000000000000000000000000000C99");
+ BigInteger mod_q = FromHex("800000000000000000000000000000015F700CFFF1A624E5E497161BCC8A198F");
+
+ return ConfigureCurve(new FpCurve(
+ mod_p,
+ FromHex("8000000000000000000000000000000000000000000000000000000000000C96"),
+ FromHex("3E1AF419A269A5F866A7D3C25C3DF80AE979259373FF2B182F49D4CE7E1BBC8B"),
+ mod_q, BigInteger.One, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ BigInteger.One,
+ FromHex("3FA8124359F96680B83D1C3EB2C070E5C545C9858D03ECFB744BF8D717717EFC"));
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ };
+
+ internal class Holder_gostR3410_2001_CryptoPro_C
+ : X9ECParametersHolder
+ {
+ private Holder_gostR3410_2001_CryptoPro_C() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Holder_gostR3410_2001_CryptoPro_C();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger mod_p = FromHex("9B9F605F5A858107AB1EC85E6B41C8AACF846E86789051D37998F7B9022D759B");
+ BigInteger mod_q = FromHex("9B9F605F5A858107AB1EC85E6B41C8AA582CA3511EDDFB74F02F3A6598980BB9");
+
+ return ConfigureCurve(new FpCurve(
+ mod_p,
+ FromHex("9B9F605F5A858107AB1EC85E6B41C8AACF846E86789051D37998F7B9022D7598"),
+ FromHex("805A"),
+ mod_q, BigInteger.One, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ BigInteger.Zero,
+ FromHex("41ECE55743711A8C3CBF3783CD08C0EE4D4DC440D4641A8F366E550DFDB3BB67"));
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ };
+
+ internal class Holder_gostR3410_2001_CryptoPro_XchB
+ : X9ECParametersHolder
+ {
+ private Holder_gostR3410_2001_CryptoPro_XchB() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Holder_gostR3410_2001_CryptoPro_XchB();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger mod_p = FromHex("9B9F605F5A858107AB1EC85E6B41C8AACF846E86789051D37998F7B9022D759B");
+ BigInteger mod_q = FromHex("9B9F605F5A858107AB1EC85E6B41C8AA582CA3511EDDFB74F02F3A6598980BB9");
+
+ return ConfigureCurve(new FpCurve(
+ mod_p,
+ FromHex("9B9F605F5A858107AB1EC85E6B41C8AACF846E86789051D37998F7B9022D7598"),
+ FromHex("805A"),
+ mod_q, BigInteger.One, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ BigInteger.Zero,
+ FromHex("41ECE55743711A8C3CBF3783CD08C0EE4D4DC440D4641A8F366E550DFDB3BB67"));
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ };
+
+ internal class Holder_id_tc26_gost_3410_12_256_paramSetA
+ : X9ECParametersHolder
+ {
+ private Holder_id_tc26_gost_3410_12_256_paramSetA() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Holder_id_tc26_gost_3410_12_256_paramSetA();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger mod_p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD97");
+ BigInteger mod_q = FromHex("400000000000000000000000000000000FD8CDDFC87B6635C115AF556C360C67");
+
+ return ConfigureCurve(new FpCurve(
+ mod_p,
+ FromHex("C2173F1513981673AF4892C23035A27CE25E2013BF95AA33B22C656F277E7335"),
+ FromHex("295F9BAE7428ED9CCC20E7C359A9D41A22FCCD9108E17BF7BA9337A6F8AE9513"),
+ mod_q, BigInteger.Four, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ FromHex("91E38443A5E82C0D880923425712B2BB658B9196932E02C78B2582FE742DAA28"),
+ FromHex("32879423AB1A0375895786C4BB46E9565FDE0B5344766740AF268ADB32322E5C"));
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ };
+
+ internal class Holder_id_tc26_gost_3410_12_512_paramSetA
+ : X9ECParametersHolder
+ {
+ private Holder_id_tc26_gost_3410_12_512_paramSetA() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Holder_id_tc26_gost_3410_12_512_paramSetA();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger mod_p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC7");
+ BigInteger mod_q = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF27E69532F48D89116FF22B8D4E0560609B4B38ABFAD2B85DCACDB1411F10B275");
+
+ return ConfigureCurve(new FpCurve(
+ mod_p,
+ FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC4"),
+ FromHex("E8C2505DEDFC86DDC1BD0B2B6667F1DA34B82574761CB0E879BD081CFD0B6265EE3CB090F30D27614CB4574010DA90DD862EF9D4EBEE4761503190785A71C760"),
+ mod_q, BigInteger.One, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ BigInteger.Three,
+ FromHex("7503CFE87A836AE3A61B8816E25450E6CE5E1C93ACF1ABC1778064FDCBEFA921DF1626BE4FD036E93D75E6A50E3A41E98028FE5FC235F5B889A589CB5215F2A4"));
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ };
+
+ internal class Holder_id_tc26_gost_3410_12_512_paramSetB
+ : X9ECParametersHolder
+ {
+ private Holder_id_tc26_gost_3410_12_512_paramSetB() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Holder_id_tc26_gost_3410_12_512_paramSetB();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger mod_p = FromHex("8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006F");
+ BigInteger mod_q = FromHex("800000000000000000000000000000000000000000000000000000000000000149A1EC142565A545ACFDB77BD9D40CFA8B996712101BEA0EC6346C54374F25BD");
+
+ return ConfigureCurve(new FpCurve(
+ mod_p,
+ FromHex("8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006C"),
+ FromHex("687D1B459DC841457E3E06CF6F5E2517B97C7D614AF138BCBF85DC806C4B289F3E965D2DB1416D217F8B276FAD1AB69C50F78BEE1FA3106EFB8CCBC7C5140116"),
+ mod_q, BigInteger.One, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ BigInteger.Two,
+ FromHex("1A8F7EDA389B094C2C071E3647A8940F3C123B697578C213BE6DD9E6C8EC7335DCB228FD1EDF4A39152CBCAAF8C0398828041055F94CEEEC7E21340780FE41BD"));
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ };
+
+ internal class Holder_id_tc26_gost_3410_12_512_paramSetC
+ : X9ECParametersHolder
+ {
+ private Holder_id_tc26_gost_3410_12_512_paramSetC() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Holder_id_tc26_gost_3410_12_512_paramSetC();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger mod_p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC7");
+ BigInteger mod_q = FromHex("3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC98CDBA46506AB004C33A9FF5147502CC8EDA9E7A769A12694623CEF47F023ED");
+
+ return ConfigureCurve(new FpCurve(
+ mod_p,
+ FromHex("DC9203E514A721875485A529D2C722FB187BC8980EB866644DE41C68E143064546E861C0E2C9EDD92ADE71F46FCF50FF2AD97F951FDA9F2A2EB6546F39689BD3"),
+ FromHex("B4C4EE28CEBC6C2C8AC12952CF37F16AC7EFB6A9F69F4B57FFDA2E4F0DE5ADE038CBC2FFF719D2C18DE0284B8BFEF3B52B8CC7A5F5BF0A3C8D2319A5312557E1"),
+ mod_q, BigInteger.Four, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ FromHex("E2E31EDFC23DE7BDEBE241CE593EF5DE2295B7A9CBAEF021D385F7074CEA043AA27272A7AE602BF2A7B9033DB9ED3610C6FB85487EAE97AAC5BC7928C1950148"),
+ FromHex("F5CE40D95B5EB899ABBCCFF5911CB8577939804D6527378B8C108C3D2090FF9BE18E2D33E3021ED2EF32D85822423B6304F726AA854BAE07D0396E9A9ADDC40F"));
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ };
+
+ private static readonly Dictionary objIds =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly Dictionary curves =
+ new Dictionary();
+ private static readonly Dictionary names =
+ new Dictionary();
+
+ private static void DefineCurve(string name, DerObjectIdentifier oid, X9ECParametersHolder holder)
+ {
+ objIds.Add(name, oid);
+ names.Add(oid, name);
+ curves.Add(oid, holder);
+ }
+
+ static ECGost3410NamedCurves()
+ {
+ DefineCurve("GostR3410-2001-CryptoPro-A",
+ CryptoProObjectIdentifiers.GostR3410x2001CryptoProA,
+ Holder_gostR3410_2001_CryptoPro_A.Instance);
+ DefineCurve("GostR3410-2001-CryptoPro-B",
+ CryptoProObjectIdentifiers.GostR3410x2001CryptoProB,
+ Holder_gostR3410_2001_CryptoPro_B.Instance);
+ DefineCurve("GostR3410-2001-CryptoPro-C",
+ CryptoProObjectIdentifiers.GostR3410x2001CryptoProC,
+ Holder_gostR3410_2001_CryptoPro_C.Instance);
+ DefineCurve("GostR3410-2001-CryptoPro-XchA",
+ CryptoProObjectIdentifiers.GostR3410x2001CryptoProXchA,
+ Holder_gostR3410_2001_CryptoPro_A.Instance);
+ DefineCurve("GostR3410-2001-CryptoPro-XchB",
+ CryptoProObjectIdentifiers.GostR3410x2001CryptoProXchB,
+ Holder_gostR3410_2001_CryptoPro_XchB.Instance);
+ DefineCurve("Tc26-Gost-3410-12-256-paramSetA",
+ RosstandartObjectIdentifiers.id_tc26_gost_3410_12_256_paramSetA,
+ Holder_id_tc26_gost_3410_12_256_paramSetA.Instance);
+ DefineCurve("Tc26-Gost-3410-12-512-paramSetA",
+ RosstandartObjectIdentifiers.id_tc26_gost_3410_12_512_paramSetA,
+ Holder_id_tc26_gost_3410_12_512_paramSetA.Instance);
+ DefineCurve("Tc26-Gost-3410-12-512-paramSetB",
+ RosstandartObjectIdentifiers.id_tc26_gost_3410_12_512_paramSetB,
+ Holder_id_tc26_gost_3410_12_512_paramSetB.Instance);
+ DefineCurve("Tc26-Gost-3410-12-512-paramSetC",
+ RosstandartObjectIdentifiers.id_tc26_gost_3410_12_512_paramSetC,
+ Holder_id_tc26_gost_3410_12_512_paramSetC.Instance);
+ }
+
+ /// Look up the for the curve with the given name.
+ /// The name of the curve.
+ public static X9ECParameters GetByName(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOid(oid);
+ }
+
+ /// Look up an for the curve with the given name.
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The name of the curve.
+ public static X9ECParametersHolder GetByNameLazy(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOidLazy(oid);
+ }
+
+ /// Look up the for the curve with the given
+ /// OID .
+ /// The OID for the curve.
+ public static X9ECParameters GetByOid(DerObjectIdentifier oid)
+ {
+ return GetByOidLazy(oid)?.Parameters;
+ }
+
+ /// Look up an for the curve with the given
+ /// OID .
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The OID for the curve.
+ public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(curves, oid);
+ }
+
+ /// Look up the name of the curve with the given OID .
+ /// The OID for the curve.
+ public static string GetName(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(names, oid);
+ }
+
+ /// Look up the OID of the curve with the given name.
+ /// The name of the curve.
+ public static DerObjectIdentifier GetOid(string name)
+ {
+ return CollectionUtilities.GetValueOrNull(objIds, name);
+ }
+
+ /// Enumerate the available curve names in this registry.
+ public static IEnumerable Names
+ {
+ get { return CollectionUtilities.Proxy(objIds.Keys); }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410NamedCurves.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410NamedCurves.cs.meta
new file mode 100644
index 00000000..84222ef3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410NamedCurves.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 66d8e5a0881bc6c4496b585b4e8bbc64
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410ParamSetParameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410ParamSetParameters.cs
new file mode 100644
index 00000000..e0fa6cde
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410ParamSetParameters.cs
@@ -0,0 +1,85 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro
+{
+ public class ECGost3410ParamSetParameters
+ : Asn1Encodable
+ {
+ internal readonly DerInteger p, q, a, b, x, y;
+
+ public static ECGost3410ParamSetParameters GetInstance(Asn1TaggedObject obj, bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static ECGost3410ParamSetParameters GetInstance(object obj)
+ {
+ if (obj == null || obj is ECGost3410ParamSetParameters)
+ {
+ return (ECGost3410ParamSetParameters) obj;
+ }
+
+ if (obj is Asn1Sequence seq)
+ return new ECGost3410ParamSetParameters(seq);
+
+ throw new ArgumentException("Invalid GOST3410Parameter: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public ECGost3410ParamSetParameters(
+ BigInteger a,
+ BigInteger b,
+ BigInteger p,
+ BigInteger q,
+ int x,
+ BigInteger y)
+ {
+ this.a = new DerInteger(a);
+ this.b = new DerInteger(b);
+ this.p = new DerInteger(p);
+ this.q = new DerInteger(q);
+ this.x = new DerInteger(x);
+ this.y = new DerInteger(y);
+ }
+
+ public ECGost3410ParamSetParameters(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 6)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.a = DerInteger.GetInstance(seq[0]);
+ this.b = DerInteger.GetInstance(seq[1]);
+ this.p = DerInteger.GetInstance(seq[2]);
+ this.q = DerInteger.GetInstance(seq[3]);
+ this.x = DerInteger.GetInstance(seq[4]);
+ this.y = DerInteger.GetInstance(seq[5]);
+ }
+
+ public BigInteger P
+ {
+ get { return p.PositiveValue; }
+ }
+
+ public BigInteger Q
+ {
+ get { return q.PositiveValue; }
+ }
+
+ public BigInteger A
+ {
+ get { return a.PositiveValue; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(a, b, p, q, x, y);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410ParamSetParameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410ParamSetParameters.cs.meta
new file mode 100644
index 00000000..b5e01be6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/ECGOST3410ParamSetParameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dba7ef28019746549ac489da0e382c5e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST28147Parameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST28147Parameters.cs
new file mode 100644
index 00000000..04316aa6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST28147Parameters.cs
@@ -0,0 +1,58 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro
+{
+ public class Gost28147Parameters
+ : Asn1Encodable
+ {
+ private readonly Asn1OctetString iv;
+ private readonly DerObjectIdentifier paramSet;
+
+ public static Gost28147Parameters GetInstance(Asn1TaggedObject obj, bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static Gost28147Parameters GetInstance(object obj)
+ {
+ if (obj == null || obj is Gost28147Parameters)
+ return (Gost28147Parameters) obj;
+
+ if (obj is Asn1Sequence seq)
+ return new Gost28147Parameters(seq);
+
+ throw new ArgumentException("Invalid GOST3410Parameter: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ private Gost28147Parameters(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.iv = Asn1OctetString.GetInstance(seq[0]);
+ this.paramSet = DerObjectIdentifier.GetInstance(seq[1]);
+ }
+
+ /**
+ *
+ * Gost28147-89-Parameters ::=
+ * SEQUENCE {
+ * iv Gost28147-89-IV,
+ * encryptionParamSet OBJECT IDENTIFIER
+ * }
+ *
+ * Gost28147-89-IV ::= OCTET STRING (SIZE (8))
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(iv, paramSet);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST28147Parameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST28147Parameters.cs.meta
new file mode 100644
index 00000000..97836606
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST28147Parameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5d51ef1fdb3f40e459a78a6810363964
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410NamedParameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410NamedParameters.cs
new file mode 100644
index 00000000..f3dd24cb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410NamedParameters.cs
@@ -0,0 +1,112 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro
+{
+ /// Registry of available named parameters for GOST 3410-94.
+ public static class Gost3410NamedParameters
+ {
+ private static readonly Gost3410ParamSetParameters cryptoProA = new Gost3410ParamSetParameters(
+ 1024,
+ new BigInteger("127021248288932417465907042777176443525787653508916535812817507265705031260985098497423188333483401180925999995120988934130659205614996724254121049274349357074920312769561451689224110579311248812610229678534638401693520013288995000362260684222750813532307004517341633685004541062586971416883686778842537820383"),
+ new BigInteger("68363196144955700784444165611827252895102170888761442055095051287550314083023"),
+ new BigInteger("100997906755055304772081815535925224869841082572053457874823515875577147990529272777244152852699298796483356699682842027972896052747173175480590485607134746852141928680912561502802222185647539190902656116367847270145019066794290930185446216399730872221732889830323194097355403213400972588322876850946740663962")
+ // validationAlgorithm {
+ // algorithm
+ // id-GostR3410-94-bBis,
+ // parameters
+ // GostR3410-94-ValidationBisParameters: {
+ // x0 1376285941,
+ // c 3996757427
+ // }
+ // }
+
+ );
+
+ private static readonly Gost3410ParamSetParameters cryptoProB = new Gost3410ParamSetParameters(
+ 1024,
+ new BigInteger("139454871199115825601409655107690713107041707059928031797758001454375765357722984094124368522288239833039114681648076688236921220737322672160740747771700911134550432053804647694904686120113087816240740184800477047157336662926249423571248823968542221753660143391485680840520336859458494803187341288580489525163"),
+ new BigInteger("79885141663410976897627118935756323747307951916507639758300472692338873533959"),
+ new BigInteger("42941826148615804143873447737955502392672345968607143066798112994089471231420027060385216699563848719957657284814898909770759462613437669456364882730370838934791080835932647976778601915343474400961034231316672578686920482194932878633360203384797092684342247621055760235016132614780652761028509445403338652341")
+ // validationAlgorithm {
+ // algorithm
+ // id-GostR3410-94-bBis,
+ // parameters
+ // GostR3410-94-ValidationBisParameters: {
+ // x0 1536654555,
+ // c 1855361757,
+ // d 14408629386140014567655
+ //4902939282056547857802241461782996702017713059974755104394739915140
+ //6115284791024439062735788342744854120601660303926203867703556828005
+ //8957203818114895398976594425537561271800850306
+ // }
+ // }
+ //}
+ );
+
+ private static readonly Gost3410ParamSetParameters cryptoProXchA = new Gost3410ParamSetParameters(
+ 1024,
+ new BigInteger("142011741597563481196368286022318089743276138395243738762872573441927459393512718973631166078467600360848946623567625795282774719212241929071046134208380636394084512691828894000571524625445295769349356752728956831541775441763139384457191755096847107846595662547942312293338483924514339614727760681880609734239"),
+ new BigInteger("91771529896554605945588149018382750217296858393520724172743325725474374979801"),
+ new BigInteger("133531813272720673433859519948319001217942375967847486899482359599369642528734712461590403327731821410328012529253871914788598993103310567744136196364803064721377826656898686468463277710150809401182608770201615324990468332931294920912776241137878030224355746606283971659376426832674269780880061631528163475887")
+ );
+
+ private static readonly Dictionary objIds =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly Dictionary parameters =
+ new Dictionary();
+
+ private static void DefineParameters(string name, DerObjectIdentifier oid,
+ Gost3410ParamSetParameters parameterSet)
+ {
+ objIds.Add(name, oid);
+ parameters.Add(oid, parameterSet);
+ }
+
+ static Gost3410NamedParameters()
+ {
+ DefineParameters("GostR3410-94-CryptoPro-A", CryptoProObjectIdentifiers.GostR3410x94CryptoProA, cryptoProA);
+ DefineParameters("GostR3410-94-CryptoPro-B", CryptoProObjectIdentifiers.GostR3410x94CryptoProB, cryptoProB);
+ DefineParameters("GostR3410-94-CryptoPro-XchA", CryptoProObjectIdentifiers.GostR3410x94CryptoProXchA,
+ cryptoProXchA);
+ }
+
+ /// Look up the for the parameter set with the given name.
+ ///
+ /// The name of the parameter set.
+ public static Gost3410ParamSetParameters GetByName(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOid(oid);
+ }
+
+ /// Look up the for the parameter set with the given
+ /// OID .
+ /// The OID for the parameter set.
+ public static Gost3410ParamSetParameters GetByOid(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(parameters, oid);
+ }
+
+ /// Look up the OID of the parameter set with the given name.
+ ///
+ /// The name of the parameter set.
+ public static DerObjectIdentifier GetOid(string name)
+ {
+ return CollectionUtilities.GetValueOrNull(objIds, name);
+ }
+
+ /// Enumerate the available parameter set names in this registry.
+ public static IEnumerable Names
+ {
+ get { return CollectionUtilities.Proxy(objIds.Keys); }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410NamedParameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410NamedParameters.cs.meta
new file mode 100644
index 00000000..f56c01f7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410NamedParameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 202baced9e4bc474ea48f92a5dce885a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410ParamSetParameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410ParamSetParameters.cs
new file mode 100644
index 00000000..bf6a9dbf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410ParamSetParameters.cs
@@ -0,0 +1,83 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro
+{
+ public class Gost3410ParamSetParameters
+ : Asn1Encodable
+ {
+ private readonly int keySize;
+ private readonly DerInteger p, q, a;
+
+ public static Gost3410ParamSetParameters GetInstance(Asn1TaggedObject obj, bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static Gost3410ParamSetParameters GetInstance(object obj)
+ {
+ if (obj == null || obj is Gost3410ParamSetParameters)
+ return (Gost3410ParamSetParameters) obj;
+
+ if (obj is Asn1Sequence seq)
+ return new Gost3410ParamSetParameters(seq);
+
+ throw new ArgumentException("Invalid GOST3410Parameter: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public Gost3410ParamSetParameters(
+ int keySize,
+ BigInteger p,
+ BigInteger q,
+ BigInteger a)
+ {
+ this.keySize = keySize;
+ this.p = new DerInteger(p);
+ this.q = new DerInteger(q);
+ this.a = new DerInteger(a);
+ }
+
+ private Gost3410ParamSetParameters(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 4)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.keySize = DerInteger.GetInstance(seq[0]).IntValueExact;
+ this.p = DerInteger.GetInstance(seq[1]);
+ this.q = DerInteger.GetInstance(seq[2]);
+ this.a = DerInteger.GetInstance(seq[3]);
+ }
+
+ public int KeySize
+ {
+ get { return keySize; }
+ }
+
+ public BigInteger P
+ {
+ get { return p.PositiveValue; }
+ }
+
+ public BigInteger Q
+ {
+ get { return q.PositiveValue; }
+ }
+
+ public BigInteger A
+ {
+ get { return a.PositiveValue; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(new DerInteger(keySize), p, q, a);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410ParamSetParameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410ParamSetParameters.cs.meta
new file mode 100644
index 00000000..bec19da7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410ParamSetParameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 212fae964a87c784cb48c6d34c296562
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410PublicKeyAlgParameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410PublicKeyAlgParameters.cs
new file mode 100644
index 00000000..3ad0ca8c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410PublicKeyAlgParameters.cs
@@ -0,0 +1,84 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro
+{
+ public class Gost3410PublicKeyAlgParameters
+ : Asn1Encodable
+ {
+ private DerObjectIdentifier publicKeyParamSet;
+ private DerObjectIdentifier digestParamSet;
+ private DerObjectIdentifier encryptionParamSet;
+
+ public static Gost3410PublicKeyAlgParameters GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
+ }
+
+ public static Gost3410PublicKeyAlgParameters GetInstance(object obj)
+ {
+ if (obj == null || obj is Gost3410PublicKeyAlgParameters)
+ return (Gost3410PublicKeyAlgParameters)obj;
+
+ return new Gost3410PublicKeyAlgParameters(Asn1Sequence.GetInstance(obj));
+ }
+
+ public Gost3410PublicKeyAlgParameters(
+ DerObjectIdentifier publicKeyParamSet,
+ DerObjectIdentifier digestParamSet)
+ : this (publicKeyParamSet, digestParamSet, null)
+ {
+ }
+
+ public Gost3410PublicKeyAlgParameters(
+ DerObjectIdentifier publicKeyParamSet,
+ DerObjectIdentifier digestParamSet,
+ DerObjectIdentifier encryptionParamSet)
+ {
+ if (publicKeyParamSet == null)
+ throw new ArgumentNullException("publicKeyParamSet");
+ if (digestParamSet == null)
+ throw new ArgumentNullException("digestParamSet");
+
+ this.publicKeyParamSet = publicKeyParamSet;
+ this.digestParamSet = digestParamSet;
+ this.encryptionParamSet = encryptionParamSet;
+ }
+
+ private Gost3410PublicKeyAlgParameters(Asn1Sequence seq)
+ {
+ this.publicKeyParamSet = (DerObjectIdentifier) seq[0];
+ this.digestParamSet = (DerObjectIdentifier) seq[1];
+
+ if (seq.Count > 2)
+ {
+ this.encryptionParamSet = (DerObjectIdentifier) seq[2];
+ }
+ }
+
+ public DerObjectIdentifier PublicKeyParamSet
+ {
+ get { return publicKeyParamSet; }
+ }
+
+ public DerObjectIdentifier DigestParamSet
+ {
+ get { return digestParamSet; }
+ }
+
+ public DerObjectIdentifier EncryptionParamSet
+ {
+ get { return encryptionParamSet; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(publicKeyParamSet, digestParamSet);
+ v.AddOptional(encryptionParamSet);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410PublicKeyAlgParameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410PublicKeyAlgParameters.cs.meta
new file mode 100644
index 00000000..fcaaf7f4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/cryptopro/GOST3410PublicKeyAlgParameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 60a88c8a465a350409779ce27c0561aa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac.meta
new file mode 100644
index 00000000..535c9757
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d34df01b25a926f46aec98c6d19537c5
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac/EACObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac/EACObjectIdentifiers.cs
new file mode 100644
index 00000000..d6d5704a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac/EACObjectIdentifiers.cs
@@ -0,0 +1,54 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Eac
+{
+ public abstract class EacObjectIdentifiers
+ {
+ // bsi-de OBJECT IDENTIFIER ::= {
+ // itu-t(0) identified-organization(4) etsi(0)
+ // reserved(127) etsi-identified-organization(0) 7
+ // }
+ public static readonly DerObjectIdentifier bsi_de = new DerObjectIdentifier("0.4.0.127.0.7");
+
+ // id-PK OBJECT IDENTIFIER ::= {
+ // bsi-de protocols(2) smartcard(2) 1
+ // }
+ public static readonly DerObjectIdentifier id_PK = new DerObjectIdentifier(bsi_de + ".2.2.1");
+
+ public static readonly DerObjectIdentifier id_PK_DH = new DerObjectIdentifier(id_PK + ".1");
+ public static readonly DerObjectIdentifier id_PK_ECDH = new DerObjectIdentifier(id_PK + ".2");
+
+ // id-CA OBJECT IDENTIFIER ::= {
+ // bsi-de protocols(2) smartcard(2) 3
+ // }
+ public static readonly DerObjectIdentifier id_CA = new DerObjectIdentifier(bsi_de + ".2.2.3");
+ public static readonly DerObjectIdentifier id_CA_DH = new DerObjectIdentifier(id_CA + ".1");
+ public static readonly DerObjectIdentifier id_CA_DH_3DES_CBC_CBC = new DerObjectIdentifier(id_CA_DH + ".1");
+ public static readonly DerObjectIdentifier id_CA_ECDH = new DerObjectIdentifier(id_CA + ".2");
+ public static readonly DerObjectIdentifier id_CA_ECDH_3DES_CBC_CBC = new DerObjectIdentifier(id_CA_ECDH + ".1");
+
+ //
+ // id-TA OBJECT IDENTIFIER ::= {
+ // bsi-de protocols(2) smartcard(2) 2
+ // }
+ public static readonly DerObjectIdentifier id_TA = new DerObjectIdentifier(bsi_de + ".2.2.2");
+
+ public static readonly DerObjectIdentifier id_TA_RSA = new DerObjectIdentifier(id_TA + ".1");
+ public static readonly DerObjectIdentifier id_TA_RSA_v1_5_SHA_1 = new DerObjectIdentifier(id_TA_RSA + ".1");
+ public static readonly DerObjectIdentifier id_TA_RSA_v1_5_SHA_256 = new DerObjectIdentifier(id_TA_RSA + ".2");
+ public static readonly DerObjectIdentifier id_TA_RSA_PSS_SHA_1 = new DerObjectIdentifier(id_TA_RSA + ".3");
+ public static readonly DerObjectIdentifier id_TA_RSA_PSS_SHA_256 = new DerObjectIdentifier(id_TA_RSA + ".4");
+ public static readonly DerObjectIdentifier id_TA_ECDSA = new DerObjectIdentifier(id_TA + ".2");
+ public static readonly DerObjectIdentifier id_TA_ECDSA_SHA_1 = new DerObjectIdentifier(id_TA_ECDSA + ".1");
+ public static readonly DerObjectIdentifier id_TA_ECDSA_SHA_224 = new DerObjectIdentifier(id_TA_ECDSA + ".2");
+ public static readonly DerObjectIdentifier id_TA_ECDSA_SHA_256 = new DerObjectIdentifier(id_TA_ECDSA + ".3");
+ public static readonly DerObjectIdentifier id_TA_ECDSA_SHA_384 = new DerObjectIdentifier(id_TA_ECDSA + ".4");
+ public static readonly DerObjectIdentifier id_TA_ECDSA_SHA_512 = new DerObjectIdentifier(id_TA_ECDSA + ".5");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac/EACObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac/EACObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..396d5443
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/eac/EACObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 945d93ce3fb494c4db560cdb29a6bbfc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec.meta
new file mode 100644
index 00000000..da1c4a0e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 50a22b5956cb47f49a13f96ffc28f6f0
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec/EdECObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec/EdECObjectIdentifiers.cs
new file mode 100644
index 00000000..041908f0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec/EdECObjectIdentifiers.cs
@@ -0,0 +1,21 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.EdEC
+{
+ /**
+ * Edwards Elliptic Curve Object Identifiers (RFC 8410)
+ */
+ public abstract class EdECObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier id_edwards_curve_algs = new DerObjectIdentifier("1.3.101");
+
+ public static readonly DerObjectIdentifier id_X25519 = id_edwards_curve_algs.Branch("110");
+ public static readonly DerObjectIdentifier id_X448 = id_edwards_curve_algs.Branch("111");
+ public static readonly DerObjectIdentifier id_Ed25519 = id_edwards_curve_algs.Branch("112");
+ public static readonly DerObjectIdentifier id_Ed448 = id_edwards_curve_algs.Branch("113");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec/EdECObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec/EdECObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..2069e04d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/edec/EdECObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5843a33e617f6d74f9aaa607ac291eb4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf.meta
new file mode 100644
index 00000000..fb1d61ba
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 3ed857771f04d4447bd106c2150bf750
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CertificateValues.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CertificateValues.cs
new file mode 100644
index 00000000..2d519f0f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CertificateValues.cs
@@ -0,0 +1,87 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.3.1 Certificate Values Attribute Definition
+ ///
+ /// CertificateValues ::= SEQUENCE OF Certificate
+ ///
+ ///
+ public class CertificateValues
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence certificates;
+
+ public static CertificateValues GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CertificateValues)
+ return (CertificateValues) obj;
+
+ if (obj is Asn1Sequence)
+ return new CertificateValues((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'CertificateValues' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private CertificateValues(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+
+ foreach (Asn1Encodable ae in seq)
+ {
+ X509CertificateStructure.GetInstance(ae.ToAsn1Object());
+ }
+
+ this.certificates = seq;
+ }
+
+ public CertificateValues(
+ params X509CertificateStructure[] certificates)
+ {
+ if (certificates == null)
+ throw new ArgumentNullException("certificates");
+
+ this.certificates = new DerSequence(certificates);
+ }
+
+ public CertificateValues(
+ IEnumerable certificates)
+ {
+ if (certificates == null)
+ throw new ArgumentNullException("certificates");
+
+ this.certificates = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(certificates));
+ }
+
+ public X509CertificateStructure[] GetCertificates()
+ {
+ X509CertificateStructure[] result = new X509CertificateStructure[certificates.Count];
+ for (int i = 0; i < certificates.Count; ++i)
+ {
+ result[i] = X509CertificateStructure.GetInstance(certificates[i]);
+ }
+ return result;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return certificates;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CertificateValues.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CertificateValues.cs.meta
new file mode 100644
index 00000000..75a01f49
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CertificateValues.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 092b4648537b98d4b847275b3d4faf9a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIdentifier.cs
new file mode 100644
index 00000000..6a7ab430
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIdentifier.cs
@@ -0,0 +1,21 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ public abstract class CommitmentTypeIdentifier
+ {
+ public static readonly DerObjectIdentifier ProofOfOrigin = PkcsObjectIdentifiers.IdCtiEtsProofOfOrigin;
+ public static readonly DerObjectIdentifier ProofOfReceipt = PkcsObjectIdentifiers.IdCtiEtsProofOfReceipt;
+ public static readonly DerObjectIdentifier ProofOfDelivery = PkcsObjectIdentifiers.IdCtiEtsProofOfDelivery;
+ public static readonly DerObjectIdentifier ProofOfSender = PkcsObjectIdentifiers.IdCtiEtsProofOfSender;
+ public static readonly DerObjectIdentifier ProofOfApproval = PkcsObjectIdentifiers.IdCtiEtsProofOfApproval;
+ public static readonly DerObjectIdentifier ProofOfCreation = PkcsObjectIdentifiers.IdCtiEtsProofOfCreation;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIdentifier.cs.meta
new file mode 100644
index 00000000..bd5da5c8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ec3d445a64faf9a4990e3f85b9972b01
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIndication.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIndication.cs
new file mode 100644
index 00000000..84240e3c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIndication.cs
@@ -0,0 +1,94 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ public class CommitmentTypeIndication
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier commitmentTypeId;
+ private readonly Asn1Sequence commitmentTypeQualifier;
+
+ public static CommitmentTypeIndication GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CommitmentTypeIndication)
+ return (CommitmentTypeIndication) obj;
+
+ if (obj is Asn1Sequence)
+ return new CommitmentTypeIndication((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'CommitmentTypeIndication' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ public CommitmentTypeIndication(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count < 1 || seq.Count > 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.commitmentTypeId = (DerObjectIdentifier) seq[0].ToAsn1Object();
+
+ if (seq.Count > 1)
+ {
+ this.commitmentTypeQualifier = (Asn1Sequence) seq[1].ToAsn1Object();
+ }
+ }
+
+ public CommitmentTypeIndication(
+ DerObjectIdentifier commitmentTypeId)
+ : this(commitmentTypeId, null)
+ {
+ }
+
+ public CommitmentTypeIndication(
+ DerObjectIdentifier commitmentTypeId,
+ Asn1Sequence commitmentTypeQualifier)
+ {
+ if (commitmentTypeId == null)
+ throw new ArgumentNullException("commitmentTypeId");
+
+ this.commitmentTypeId = commitmentTypeId;
+
+ if (commitmentTypeQualifier != null)
+ {
+ this.commitmentTypeQualifier = commitmentTypeQualifier;
+ }
+ }
+
+ public DerObjectIdentifier CommitmentTypeID
+ {
+ get { return commitmentTypeId; }
+ }
+
+ public Asn1Sequence CommitmentTypeQualifier
+ {
+ get { return commitmentTypeQualifier; }
+ }
+
+ /**
+ *
+ * CommitmentTypeIndication ::= SEQUENCE {
+ * commitmentTypeId CommitmentTypeIdentifier,
+ * commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
+ * CommitmentTypeQualifier OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(commitmentTypeId);
+ v.AddOptional(commitmentTypeQualifier);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIndication.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIndication.cs.meta
new file mode 100644
index 00000000..1b587c7f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeIndication.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2da3d0e0966b8f44dbf55929a796f6bc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeQualifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeQualifier.cs
new file mode 100644
index 00000000..c55365ff
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeQualifier.cs
@@ -0,0 +1,117 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ /**
+ * Commitment type qualifiers, used in the Commitment-Type-Indication attribute (RFC3126).
+ *
+ *
+ * CommitmentTypeQualifier ::= SEQUENCE {
+ * commitmentTypeIdentifier CommitmentTypeIdentifier,
+ * qualifier ANY DEFINED BY commitmentTypeIdentifier OPTIONAL }
+ *
+ */
+ public class CommitmentTypeQualifier
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier commitmentTypeIdentifier;
+ private readonly Asn1Object qualifier;
+
+ /**
+ * Creates a new CommitmentTypeQualifier instance.
+ *
+ * @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+ */
+ public CommitmentTypeQualifier(
+ DerObjectIdentifier commitmentTypeIdentifier)
+ : this(commitmentTypeIdentifier, null)
+ {
+ }
+
+ /**
+ * Creates a new CommitmentTypeQualifier instance.
+ *
+ * @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+ * @param qualifier the qualifier, defined by the above field.
+ */
+ public CommitmentTypeQualifier(
+ DerObjectIdentifier commitmentTypeIdentifier,
+ Asn1Encodable qualifier)
+ {
+ if (commitmentTypeIdentifier == null)
+ throw new ArgumentNullException("commitmentTypeIdentifier");
+
+ this.commitmentTypeIdentifier = commitmentTypeIdentifier;
+
+ if (qualifier != null)
+ {
+ this.qualifier = qualifier.ToAsn1Object();
+ }
+ }
+
+ /**
+ * Creates a new CommitmentTypeQualifier instance.
+ *
+ * @param as CommitmentTypeQualifier structure
+ * encoded as an Asn1Sequence.
+ */
+ public CommitmentTypeQualifier(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count < 1 || seq.Count > 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ commitmentTypeIdentifier = (DerObjectIdentifier) seq[0].ToAsn1Object();
+
+ if (seq.Count > 1)
+ {
+ qualifier = seq[1].ToAsn1Object();
+ }
+ }
+
+ public static CommitmentTypeQualifier GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CommitmentTypeQualifier)
+ return (CommitmentTypeQualifier) obj;
+
+ if (obj is Asn1Sequence)
+ return new CommitmentTypeQualifier((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'CommitmentTypeQualifier' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ public DerObjectIdentifier CommitmentTypeIdentifier
+ {
+ get { return commitmentTypeIdentifier; }
+ }
+
+ public Asn1Object Qualifier
+ {
+ get { return qualifier; }
+ }
+
+ /**
+ * Returns a DER-encodable representation of this instance.
+ *
+ * @return a Asn1Object value
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(commitmentTypeIdentifier);
+ v.AddOptional(qualifier);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeQualifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeQualifier.cs.meta
new file mode 100644
index 00000000..050a7b07
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CommitmentTypeQualifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e2eb54d61b3c7e0429e81810ee930b75
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteCertificateRefs.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteCertificateRefs.cs
new file mode 100644
index 00000000..46542a25
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteCertificateRefs.cs
@@ -0,0 +1,86 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.1 Complete Certificate Refs Attribute Definition
+ ///
+ /// CompleteCertificateRefs ::= SEQUENCE OF OtherCertID
+ ///
+ ///
+ public class CompleteCertificateRefs
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence otherCertIDs;
+
+ public static CompleteCertificateRefs GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CompleteCertificateRefs)
+ return (CompleteCertificateRefs) obj;
+
+ if (obj is Asn1Sequence)
+ return new CompleteCertificateRefs((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'CompleteCertificateRefs' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private CompleteCertificateRefs(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+
+ foreach (Asn1Encodable ae in seq)
+ {
+ OtherCertID.GetInstance(ae.ToAsn1Object());
+ }
+
+ this.otherCertIDs = seq;
+ }
+
+ public CompleteCertificateRefs(
+ params OtherCertID[] otherCertIDs)
+ {
+ if (otherCertIDs == null)
+ throw new ArgumentNullException("otherCertIDs");
+
+ this.otherCertIDs = new DerSequence(otherCertIDs);
+ }
+
+ public CompleteCertificateRefs(
+ IEnumerable otherCertIDs)
+ {
+ if (otherCertIDs == null)
+ throw new ArgumentNullException("otherCertIDs");
+
+ this.otherCertIDs = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(otherCertIDs));
+ }
+
+ public OtherCertID[] GetOtherCertIDs()
+ {
+ OtherCertID[] result = new OtherCertID[otherCertIDs.Count];
+ for (int i = 0; i < otherCertIDs.Count; ++i)
+ {
+ result[i] = OtherCertID.GetInstance(otherCertIDs[i].ToAsn1Object());
+ }
+ return result;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return otherCertIDs;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteCertificateRefs.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteCertificateRefs.cs.meta
new file mode 100644
index 00000000..d2ad7226
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteCertificateRefs.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e47f9b58addc6cb4681cf1609c99d441
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteRevocationRefs.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteRevocationRefs.cs
new file mode 100644
index 00000000..4f52c124
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteRevocationRefs.cs
@@ -0,0 +1,86 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+ ///
+ /// CompleteRevocationRefs ::= SEQUENCE OF CrlOcspRef
+ ///
+ ///
+ public class CompleteRevocationRefs
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence crlOcspRefs;
+
+ public static CompleteRevocationRefs GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CompleteRevocationRefs)
+ return (CompleteRevocationRefs) obj;
+
+ if (obj is Asn1Sequence)
+ return new CompleteRevocationRefs((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'CompleteRevocationRefs' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private CompleteRevocationRefs(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+
+ foreach (Asn1Encodable ae in seq)
+ {
+ CrlOcspRef.GetInstance(ae.ToAsn1Object());
+ }
+
+ this.crlOcspRefs = seq;
+ }
+
+ public CompleteRevocationRefs(
+ params CrlOcspRef[] crlOcspRefs)
+ {
+ if (crlOcspRefs == null)
+ throw new ArgumentNullException("crlOcspRefs");
+
+ this.crlOcspRefs = new DerSequence(crlOcspRefs);
+ }
+
+ public CompleteRevocationRefs(
+ IEnumerable crlOcspRefs)
+ {
+ if (crlOcspRefs == null)
+ throw new ArgumentNullException("crlOcspRefs");
+
+ this.crlOcspRefs = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(crlOcspRefs));
+ }
+
+ public CrlOcspRef[] GetCrlOcspRefs()
+ {
+ CrlOcspRef[] result = new CrlOcspRef[crlOcspRefs.Count];
+ for (int i = 0; i < crlOcspRefs.Count; ++i)
+ {
+ result[i] = CrlOcspRef.GetInstance(crlOcspRefs[i].ToAsn1Object());
+ }
+ return result;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return crlOcspRefs;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteRevocationRefs.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteRevocationRefs.cs.meta
new file mode 100644
index 00000000..9c818737
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CompleteRevocationRefs.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b7f0539207fca804897c87c6a2c1c3e1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlIdentifier.cs
new file mode 100644
index 00000000..55998c95
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlIdentifier.cs
@@ -0,0 +1,121 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Reflection;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+ ///
+ /// CrlIdentifier ::= SEQUENCE
+ /// {
+ /// crlissuer Name,
+ /// crlIssuedTime UTCTime,
+ /// crlNumber INTEGER OPTIONAL
+ /// }
+ ///
+ ///
+ public class CrlIdentifier
+ : Asn1Encodable
+ {
+ private readonly X509Name crlIssuer;
+ private readonly Asn1UtcTime crlIssuedTime;
+ private readonly DerInteger crlNumber;
+
+ public static CrlIdentifier GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+
+ if (obj is CrlIdentifier crlIdentifier)
+ return crlIdentifier;
+
+ if (obj is Asn1Sequence asn1Sequence)
+ return new CrlIdentifier(asn1Sequence);
+
+ throw new ArgumentException("Unknown object in 'CrlIdentifier' factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ nameof(obj));
+ }
+
+ private CrlIdentifier(Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException(nameof(seq));
+ if (seq.Count < 2 || seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, nameof(seq));
+
+ this.crlIssuer = X509Name.GetInstance(seq[0]);
+ this.crlIssuedTime = Asn1UtcTime.GetInstance(seq[1]);
+
+ // Validate crlIssuedTime is in the appropriate year range
+ crlIssuedTime.ToDateTime(2049);
+
+ if (seq.Count > 2)
+ {
+ this.crlNumber = DerInteger.GetInstance(seq[2]);
+ }
+ }
+
+ public CrlIdentifier(X509Name crlIssuer, DateTime crlIssuedTime)
+ : this(crlIssuer, crlIssuedTime, null)
+ {
+ }
+
+ public CrlIdentifier(X509Name crlIssuer, DateTime crlIssuedTime, BigInteger crlNumber)
+ : this(crlIssuer, new Asn1UtcTime(crlIssuedTime, 2049), crlNumber)
+ {
+ }
+
+ public CrlIdentifier(X509Name crlIssuer, Asn1UtcTime crlIssuedTime)
+ : this(crlIssuer, crlIssuedTime, null)
+ {
+ }
+
+ public CrlIdentifier(X509Name crlIssuer, Asn1UtcTime crlIssuedTime, BigInteger crlNumber)
+ {
+ if (crlIssuer == null)
+ throw new ArgumentNullException(nameof(crlIssuer));
+ if (crlIssuedTime == null)
+ throw new ArgumentNullException(nameof(crlIssuedTime));
+
+ // Validate crlIssuedTime is in the appropriate year range
+ crlIssuedTime.ToDateTime(2049);
+
+ this.crlIssuer = crlIssuer;
+ this.crlIssuedTime = crlIssuedTime;
+
+ if (null != crlNumber)
+ {
+ this.crlNumber = new DerInteger(crlNumber);
+ }
+ }
+
+ public X509Name CrlIssuer
+ {
+ get { return crlIssuer; }
+ }
+
+ public DateTime CrlIssuedTime
+ {
+ get { return crlIssuedTime.ToDateTime(2049); }
+ }
+
+ public BigInteger CrlNumber
+ {
+ get { return crlNumber == null ? null : crlNumber.Value; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(crlIssuer.ToAsn1Object(), crlIssuedTime);
+ v.AddOptional(crlNumber);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlIdentifier.cs.meta
new file mode 100644
index 00000000..8147f8dd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f2b010df93d63524d8d0bcc16d49dd8e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlListID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlListID.cs
new file mode 100644
index 00000000..926bf70b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlListID.cs
@@ -0,0 +1,91 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+ ///
+ /// CRLListID ::= SEQUENCE
+ /// {
+ /// crls SEQUENCE OF CrlValidatedID
+ /// }
+ ///
+ ///
+ public class CrlListID
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence crls;
+
+ public static CrlListID GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CrlListID)
+ return (CrlListID) obj;
+
+ if (obj is Asn1Sequence)
+ return new CrlListID((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'CrlListID' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private CrlListID(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count != 1)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.crls = (Asn1Sequence) seq[0].ToAsn1Object();
+
+ foreach (Asn1Encodable ae in this.crls)
+ {
+ CrlValidatedID.GetInstance(ae.ToAsn1Object());
+ }
+ }
+
+ public CrlListID(
+ params CrlValidatedID[] crls)
+ {
+ if (crls == null)
+ throw new ArgumentNullException("crls");
+
+ this.crls = new DerSequence(crls);
+ }
+
+ public CrlListID(
+ IEnumerable crls)
+ {
+ if (crls == null)
+ throw new ArgumentNullException("crls");
+
+ this.crls = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(crls));
+ }
+
+ public CrlValidatedID[] GetCrls()
+ {
+ CrlValidatedID[] result = new CrlValidatedID[crls.Count];
+ for (int i = 0; i < crls.Count; ++i)
+ {
+ result[i] = CrlValidatedID.GetInstance(crls[i].ToAsn1Object());
+ }
+ return result;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(crls);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlListID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlListID.cs.meta
new file mode 100644
index 00000000..2b96148c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlListID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f2934f373eaa3fa439de7053968641ec
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlOcspRef.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlOcspRef.cs
new file mode 100644
index 00000000..75521c84
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlOcspRef.cs
@@ -0,0 +1,117 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+ ///
+ /// CrlOcspRef ::= SEQUENCE {
+ /// crlids [0] CRLListID OPTIONAL,
+ /// ocspids [1] OcspListID OPTIONAL,
+ /// otherRev [2] OtherRevRefs OPTIONAL
+ /// }
+ ///
+ ///
+ public class CrlOcspRef
+ : Asn1Encodable
+ {
+ private readonly CrlListID crlids;
+ private readonly OcspListID ocspids;
+ private readonly OtherRevRefs otherRev;
+
+ public static CrlOcspRef GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CrlOcspRef)
+ return (CrlOcspRef) obj;
+
+ if (obj is Asn1Sequence)
+ return new CrlOcspRef((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'CrlOcspRef' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private CrlOcspRef(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+
+ foreach (Asn1TaggedObject taggedObj in seq)
+ {
+ Asn1Object asn1Obj = taggedObj.GetObject();
+
+ switch (taggedObj.TagNo)
+ {
+ case 0:
+ this.crlids = CrlListID.GetInstance(asn1Obj);
+ break;
+ case 1:
+ this.ocspids = OcspListID.GetInstance(asn1Obj);
+ break;
+ case 2:
+ this.otherRev = OtherRevRefs.GetInstance(asn1Obj);
+ break;
+ default:
+ throw new ArgumentException("Illegal tag in CrlOcspRef", "seq");
+ }
+ }
+ }
+
+ public CrlOcspRef(
+ CrlListID crlids,
+ OcspListID ocspids,
+ OtherRevRefs otherRev)
+ {
+ this.crlids = crlids;
+ this.ocspids = ocspids;
+ this.otherRev = otherRev;
+ }
+
+ public CrlListID CrlIDs
+ {
+ get { return crlids; }
+ }
+
+ public OcspListID OcspIDs
+ {
+ get { return ocspids; }
+ }
+
+ public OtherRevRefs OtherRev
+ {
+ get { return otherRev; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (crlids != null)
+ {
+ v.Add(new DerTaggedObject(true, 0, crlids.ToAsn1Object()));
+ }
+
+ if (ocspids != null)
+ {
+ v.Add(new DerTaggedObject(true, 1, ocspids.ToAsn1Object()));
+ }
+
+ if (otherRev != null)
+ {
+ v.Add(new DerTaggedObject(true, 2, otherRev.ToAsn1Object()));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlOcspRef.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlOcspRef.cs.meta
new file mode 100644
index 00000000..445f977b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlOcspRef.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c2b8ede172bb0f94880558a47cb9856b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlValidatedID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlValidatedID.cs
new file mode 100644
index 00000000..3dc22849
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlValidatedID.cs
@@ -0,0 +1,95 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+ ///
+ /// CrlValidatedID ::= SEQUENCE {
+ /// crlHash OtherHash,
+ /// crlIdentifier CrlIdentifier OPTIONAL}
+ ///
+ ///
+ public class CrlValidatedID
+ : Asn1Encodable
+ {
+ private readonly OtherHash crlHash;
+ private readonly CrlIdentifier crlIdentifier;
+
+ public static CrlValidatedID GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CrlValidatedID)
+ return (CrlValidatedID) obj;
+
+ if (obj is Asn1Sequence)
+ return new CrlValidatedID((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'CrlValidatedID' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private CrlValidatedID(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count < 1 || seq.Count > 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.crlHash = OtherHash.GetInstance(seq[0].ToAsn1Object());
+
+ if (seq.Count > 1)
+ {
+ this.crlIdentifier = CrlIdentifier.GetInstance(seq[1].ToAsn1Object());
+ }
+ }
+
+ public CrlValidatedID(
+ OtherHash crlHash)
+ : this(crlHash, null)
+ {
+ }
+
+ public CrlValidatedID(
+ OtherHash crlHash,
+ CrlIdentifier crlIdentifier)
+ {
+ if (crlHash == null)
+ throw new ArgumentNullException("crlHash");
+
+ this.crlHash = crlHash;
+ this.crlIdentifier = crlIdentifier;
+ }
+
+ public OtherHash CrlHash
+ {
+ get { return crlHash; }
+ }
+
+ public CrlIdentifier CrlIdentifier
+ {
+ get { return crlIdentifier; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(crlHash.ToAsn1Object());
+
+ if (crlIdentifier != null)
+ {
+ v.Add(crlIdentifier.ToAsn1Object());
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlValidatedID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlValidatedID.cs.meta
new file mode 100644
index 00000000..7326d109
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/CrlValidatedID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 92f8ddba6175fa941a7707d004cd0830
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/ESFAttributes.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/ESFAttributes.cs
new file mode 100644
index 00000000..186445a8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/ESFAttributes.cs
@@ -0,0 +1,29 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ public abstract class EsfAttributes
+ {
+ public static readonly DerObjectIdentifier SigPolicyId = PkcsObjectIdentifiers.IdAAEtsSigPolicyID;
+ public static readonly DerObjectIdentifier CommitmentType = PkcsObjectIdentifiers.IdAAEtsCommitmentType;
+ public static readonly DerObjectIdentifier SignerLocation = PkcsObjectIdentifiers.IdAAEtsSignerLocation;
+ public static readonly DerObjectIdentifier SignerAttr = PkcsObjectIdentifiers.IdAAEtsSignerAttr;
+ public static readonly DerObjectIdentifier OtherSigCert = PkcsObjectIdentifiers.IdAAEtsOtherSigCert;
+ public static readonly DerObjectIdentifier ContentTimestamp = PkcsObjectIdentifiers.IdAAEtsContentTimestamp;
+ public static readonly DerObjectIdentifier CertificateRefs = PkcsObjectIdentifiers.IdAAEtsCertificateRefs;
+ public static readonly DerObjectIdentifier RevocationRefs = PkcsObjectIdentifiers.IdAAEtsRevocationRefs;
+ public static readonly DerObjectIdentifier CertValues = PkcsObjectIdentifiers.IdAAEtsCertValues;
+ public static readonly DerObjectIdentifier RevocationValues = PkcsObjectIdentifiers.IdAAEtsRevocationValues;
+ public static readonly DerObjectIdentifier EscTimeStamp = PkcsObjectIdentifiers.IdAAEtsEscTimeStamp;
+ public static readonly DerObjectIdentifier CertCrlTimestamp = PkcsObjectIdentifiers.IdAAEtsCertCrlTimestamp;
+ public static readonly DerObjectIdentifier ArchiveTimestamp = PkcsObjectIdentifiers.IdAAEtsArchiveTimestamp;
+ public static readonly DerObjectIdentifier ArchiveTimestampV2 = new DerObjectIdentifier(PkcsObjectIdentifiers.IdAA + ".48");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/ESFAttributes.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/ESFAttributes.cs.meta
new file mode 100644
index 00000000..e171b2fb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/ESFAttributes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dc892043a96f9ba45bb32241548a273a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspIdentifier.cs
new file mode 100644
index 00000000..61d0c291
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspIdentifier.cs
@@ -0,0 +1,91 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+ ///
+ /// OcspIdentifier ::= SEQUENCE {
+ /// ocspResponderID ResponderID,
+ /// -- As in OCSP response data
+ /// producedAt GeneralizedTime
+ /// -- As in OCSP response data
+ /// }
+ ///
+ ///
+ public class OcspIdentifier
+ : Asn1Encodable
+ {
+ private readonly ResponderID ocspResponderID;
+ private readonly Asn1GeneralizedTime producedAt;
+
+ public static OcspIdentifier GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OcspIdentifier)
+ return (OcspIdentifier) obj;
+
+ if (obj is Asn1Sequence)
+ return new OcspIdentifier((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'OcspIdentifier' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private OcspIdentifier(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.ocspResponderID = ResponderID.GetInstance(seq[0].ToAsn1Object());
+ this.producedAt = (Asn1GeneralizedTime)seq[1].ToAsn1Object();
+ }
+
+ public OcspIdentifier(ResponderID ocspResponderID, DateTime producedAt)
+ {
+ if (ocspResponderID == null)
+ throw new ArgumentNullException(nameof(ocspResponderID));
+
+ this.ocspResponderID = ocspResponderID;
+ this.producedAt = new Asn1GeneralizedTime(producedAt);
+ }
+
+ public OcspIdentifier(ResponderID ocspResponderID, Asn1GeneralizedTime producedAt)
+ {
+ if (ocspResponderID == null)
+ throw new ArgumentNullException(nameof(ocspResponderID));
+ if (producedAt == null)
+ throw new ArgumentNullException(nameof(producedAt));
+
+ this.ocspResponderID = ocspResponderID;
+ this.producedAt = producedAt;
+ }
+
+ public ResponderID OcspResponderID
+ {
+ get { return ocspResponderID; }
+ }
+
+ public DateTime ProducedAt
+ {
+ get { return producedAt.ToDateTime(); }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(ocspResponderID, producedAt);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspIdentifier.cs.meta
new file mode 100644
index 00000000..6399489b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dd3d3b491378a6e4888a6db2ec78ba8c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspListID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspListID.cs
new file mode 100644
index 00000000..33ef078b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspListID.cs
@@ -0,0 +1,90 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+ ///
+ /// OcspListID ::= SEQUENCE {
+ /// ocspResponses SEQUENCE OF OcspResponsesID
+ /// }
+ ///
+ ///
+ public class OcspListID
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence ocspResponses;
+
+ public static OcspListID GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OcspListID)
+ return (OcspListID) obj;
+
+ if (obj is Asn1Sequence)
+ return new OcspListID((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'OcspListID' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private OcspListID(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count != 1)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.ocspResponses = (Asn1Sequence) seq[0].ToAsn1Object();
+
+ foreach (Asn1Encodable ae in this.ocspResponses)
+ {
+ OcspResponsesID.GetInstance(ae.ToAsn1Object());
+ }
+ }
+
+ public OcspListID(
+ params OcspResponsesID[] ocspResponses)
+ {
+ if (ocspResponses == null)
+ throw new ArgumentNullException("ocspResponses");
+
+ this.ocspResponses = new DerSequence(ocspResponses);
+ }
+
+ public OcspListID(
+ IEnumerable ocspResponses)
+ {
+ if (ocspResponses == null)
+ throw new ArgumentNullException("ocspResponses");
+
+ this.ocspResponses = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(ocspResponses));
+ }
+
+ public OcspResponsesID[] GetOcspResponses()
+ {
+ OcspResponsesID[] result = new OcspResponsesID[ocspResponses.Count];
+ for (int i = 0; i < ocspResponses.Count; ++i)
+ {
+ result[i] = OcspResponsesID.GetInstance(ocspResponses[i].ToAsn1Object());
+ }
+ return result;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(ocspResponses);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspListID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspListID.cs.meta
new file mode 100644
index 00000000..c492e070
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspListID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 428f1d09cf895a44194db8d397d51c0f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspResponsesID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspResponsesID.cs
new file mode 100644
index 00000000..dd956aa9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspResponsesID.cs
@@ -0,0 +1,98 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+ ///
+ /// OcspResponsesID ::= SEQUENCE {
+ /// ocspIdentifier OcspIdentifier,
+ /// ocspRepHash OtherHash OPTIONAL
+ /// }
+ ///
+ ///
+ public class OcspResponsesID
+ : Asn1Encodable
+ {
+ private readonly OcspIdentifier ocspIdentifier;
+ private readonly OtherHash ocspRepHash;
+
+ public static OcspResponsesID GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OcspResponsesID)
+ return (OcspResponsesID) obj;
+
+ if (obj is Asn1Sequence)
+ return new OcspResponsesID((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'OcspResponsesID' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private OcspResponsesID(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count < 1 || seq.Count > 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.ocspIdentifier = OcspIdentifier.GetInstance(seq[0].ToAsn1Object());
+
+ if (seq.Count > 1)
+ {
+ this.ocspRepHash = OtherHash.GetInstance(seq[1].ToAsn1Object());
+ }
+ }
+
+ public OcspResponsesID(
+ OcspIdentifier ocspIdentifier)
+ : this(ocspIdentifier, null)
+ {
+ }
+
+ public OcspResponsesID(
+ OcspIdentifier ocspIdentifier,
+ OtherHash ocspRepHash)
+ {
+ if (ocspIdentifier == null)
+ throw new ArgumentNullException("ocspIdentifier");
+
+ this.ocspIdentifier = ocspIdentifier;
+ this.ocspRepHash = ocspRepHash;
+ }
+
+ public OcspIdentifier OcspIdentifier
+ {
+ get { return ocspIdentifier; }
+ }
+
+ public OtherHash OcspRepHash
+ {
+ get { return ocspRepHash; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ ocspIdentifier.ToAsn1Object());
+
+ if (ocspRepHash != null)
+ {
+ v.Add(ocspRepHash.ToAsn1Object());
+ }
+
+ return new DerSequence(v);
+ }
+
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspResponsesID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspResponsesID.cs.meta
new file mode 100644
index 00000000..28207885
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OcspResponsesID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 772b3ba20242d6740b4138bb10e91309
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherCertID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherCertID.cs
new file mode 100644
index 00000000..41b22523
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherCertID.cs
@@ -0,0 +1,98 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ ///
+ /// OtherCertID ::= SEQUENCE {
+ /// otherCertHash OtherHash,
+ /// issuerSerial IssuerSerial OPTIONAL
+ /// }
+ ///
+ ///
+ public class OtherCertID
+ : Asn1Encodable
+ {
+ private readonly OtherHash otherCertHash;
+ private readonly IssuerSerial issuerSerial;
+
+ public static OtherCertID GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OtherCertID)
+ return (OtherCertID) obj;
+
+ if (obj is Asn1Sequence)
+ return new OtherCertID((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'OtherCertID' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private OtherCertID(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count < 1 || seq.Count > 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.otherCertHash = OtherHash.GetInstance(seq[0].ToAsn1Object());
+
+ if (seq.Count > 1)
+ {
+ this.issuerSerial = IssuerSerial.GetInstance(seq[1].ToAsn1Object());
+ }
+ }
+
+ public OtherCertID(
+ OtherHash otherCertHash)
+ : this(otherCertHash, null)
+ {
+ }
+
+ public OtherCertID(
+ OtherHash otherCertHash,
+ IssuerSerial issuerSerial)
+ {
+ if (otherCertHash == null)
+ throw new ArgumentNullException("otherCertHash");
+
+ this.otherCertHash = otherCertHash;
+ this.issuerSerial = issuerSerial;
+ }
+
+ public OtherHash OtherCertHash
+ {
+ get { return otherCertHash; }
+ }
+
+ public IssuerSerial IssuerSerial
+ {
+ get { return issuerSerial; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ otherCertHash.ToAsn1Object());
+
+ if (issuerSerial != null)
+ {
+ v.Add(issuerSerial.ToAsn1Object());
+ }
+
+ return new DerSequence(v);
+ }
+
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherCertID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherCertID.cs.meta
new file mode 100644
index 00000000..ff29fb80
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherCertID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: caba59b28b7bb2b44ab5f328dabdd593
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHash.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHash.cs
new file mode 100644
index 00000000..9ab30d72
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHash.cs
@@ -0,0 +1,92 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ ///
+ /// OtherHash ::= CHOICE {
+ /// sha1Hash OtherHashValue, -- This contains a SHA-1 hash
+ /// otherHash OtherHashAlgAndValue
+ /// }
+ ///
+ /// OtherHashValue ::= OCTET STRING
+ ///
+ ///
+ public class OtherHash
+ : Asn1Encodable, IAsn1Choice
+ {
+ private readonly Asn1OctetString sha1Hash;
+ private readonly OtherHashAlgAndValue otherHash;
+
+ public static OtherHash GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OtherHash)
+ return (OtherHash) obj;
+
+ if (obj is Asn1OctetString)
+ return new OtherHash((Asn1OctetString) obj);
+
+ return new OtherHash(
+ OtherHashAlgAndValue.GetInstance(obj));
+ }
+
+ public OtherHash(
+ byte[] sha1Hash)
+ {
+ if (sha1Hash == null)
+ throw new ArgumentNullException("sha1Hash");
+
+ this.sha1Hash = new DerOctetString(sha1Hash);
+ }
+
+ public OtherHash(
+ Asn1OctetString sha1Hash)
+ {
+ if (sha1Hash == null)
+ throw new ArgumentNullException("sha1Hash");
+
+ this.sha1Hash = sha1Hash;
+ }
+
+ public OtherHash(
+ OtherHashAlgAndValue otherHash)
+ {
+ if (otherHash == null)
+ throw new ArgumentNullException("otherHash");
+
+ this.otherHash = otherHash;
+ }
+
+ public AlgorithmIdentifier HashAlgorithm
+ {
+ get
+ {
+ return otherHash == null
+ ? new AlgorithmIdentifier(OiwObjectIdentifiers.IdSha1)
+ : otherHash.HashAlgorithm;
+ }
+ }
+
+ public byte[] GetHashValue()
+ {
+ return otherHash == null
+ ? sha1Hash.GetOctets()
+ : otherHash.GetHashValue();
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return otherHash == null
+ ? sha1Hash
+ : otherHash.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHash.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHash.cs.meta
new file mode 100644
index 00000000..6fd85bb3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHash.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 17c0c475d3163d14dacf8e21ffbaf253
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHashAlgAndValue.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHashAlgAndValue.cs
new file mode 100644
index 00000000..0d996639
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHashAlgAndValue.cs
@@ -0,0 +1,99 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// Summary description for OtherHashAlgAndValue.
+ ///
+ ///
+ ///
+ /// OtherHashAlgAndValue ::= SEQUENCE {
+ /// hashAlgorithm AlgorithmIdentifier,
+ /// hashValue OtherHashValue
+ /// }
+ ///
+ /// OtherHashValue ::= OCTET STRING
+ ///
+ ///
+ public class OtherHashAlgAndValue
+ : Asn1Encodable
+ {
+ private readonly AlgorithmIdentifier hashAlgorithm;
+ private readonly Asn1OctetString hashValue;
+
+ public static OtherHashAlgAndValue GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OtherHashAlgAndValue)
+ return (OtherHashAlgAndValue) obj;
+
+ if (obj is Asn1Sequence)
+ return new OtherHashAlgAndValue((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'OtherHashAlgAndValue' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private OtherHashAlgAndValue(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.hashAlgorithm = AlgorithmIdentifier.GetInstance(seq[0].ToAsn1Object());
+ this.hashValue = (Asn1OctetString) seq[1].ToAsn1Object();
+ }
+
+ public OtherHashAlgAndValue(
+ AlgorithmIdentifier hashAlgorithm,
+ byte[] hashValue)
+ {
+ if (hashAlgorithm == null)
+ throw new ArgumentNullException("hashAlgorithm");
+ if (hashValue == null)
+ throw new ArgumentNullException("hashValue");
+
+ this.hashAlgorithm = hashAlgorithm;
+ this.hashValue = new DerOctetString(hashValue);
+ }
+
+ public OtherHashAlgAndValue(
+ AlgorithmIdentifier hashAlgorithm,
+ Asn1OctetString hashValue)
+ {
+ if (hashAlgorithm == null)
+ throw new ArgumentNullException("hashAlgorithm");
+ if (hashValue == null)
+ throw new ArgumentNullException("hashValue");
+
+ this.hashAlgorithm = hashAlgorithm;
+ this.hashValue = hashValue;
+ }
+
+ public AlgorithmIdentifier HashAlgorithm
+ {
+ get { return hashAlgorithm; }
+ }
+
+ public byte[] GetHashValue()
+ {
+ return hashValue.GetOctets();
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(hashAlgorithm, hashValue);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHashAlgAndValue.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHashAlgAndValue.cs.meta
new file mode 100644
index 00000000..e5063061
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherHashAlgAndValue.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 298569801435f22439a2aaeb3b72b5d5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevRefs.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevRefs.cs
new file mode 100644
index 00000000..70a4a557
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevRefs.cs
@@ -0,0 +1,84 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+ ///
+ /// OtherRevRefs ::= SEQUENCE
+ /// {
+ /// otherRevRefType OtherRevRefType,
+ /// otherRevRefs ANY DEFINED BY otherRevRefType
+ /// }
+ ///
+ /// OtherRevRefType ::= OBJECT IDENTIFIER
+ ///
+ ///
+ public class OtherRevRefs
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier otherRevRefType;
+ private readonly Asn1Object otherRevRefs;
+
+ public static OtherRevRefs GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OtherRevRefs)
+ return (OtherRevRefs) obj;
+
+ if (obj is Asn1Sequence)
+ return new OtherRevRefs((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'OtherRevRefs' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private OtherRevRefs(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.otherRevRefType = (DerObjectIdentifier) seq[0].ToAsn1Object();
+ this.otherRevRefs = seq[1].ToAsn1Object();
+ }
+
+ public OtherRevRefs(
+ DerObjectIdentifier otherRevRefType,
+ Asn1Encodable otherRevRefs)
+ {
+ if (otherRevRefType == null)
+ throw new ArgumentNullException("otherRevRefType");
+ if (otherRevRefs == null)
+ throw new ArgumentNullException("otherRevRefs");
+
+ this.otherRevRefType = otherRevRefType;
+ this.otherRevRefs = otherRevRefs.ToAsn1Object();
+ }
+
+ public DerObjectIdentifier OtherRevRefType
+ {
+ get { return otherRevRefType; }
+ }
+
+ public Asn1Object OtherRevRefsObject
+ {
+ get { return otherRevRefs; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(otherRevRefType, otherRevRefs);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevRefs.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevRefs.cs.meta
new file mode 100644
index 00000000..9cab445a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevRefs.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 25166e4d38113624ba3b78c6201c7cf1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevVals.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevVals.cs
new file mode 100644
index 00000000..e27ab14f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevVals.cs
@@ -0,0 +1,84 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 3126: 4.3.2 Revocation Values Attribute Definition
+ ///
+ /// OtherRevVals ::= SEQUENCE
+ /// {
+ /// otherRevValType OtherRevValType,
+ /// otherRevVals ANY DEFINED BY otherRevValType
+ /// }
+ ///
+ /// OtherRevValType ::= OBJECT IDENTIFIER
+ ///
+ ///
+ public class OtherRevVals
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier otherRevValType;
+ private readonly Asn1Object otherRevVals;
+
+ public static OtherRevVals GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OtherRevVals)
+ return (OtherRevVals) obj;
+
+ if (obj is Asn1Sequence)
+ return new OtherRevVals((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'OtherRevVals' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private OtherRevVals(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.otherRevValType = (DerObjectIdentifier) seq[0].ToAsn1Object();
+ this.otherRevVals = seq[1].ToAsn1Object();
+ }
+
+ public OtherRevVals(
+ DerObjectIdentifier otherRevValType,
+ Asn1Encodable otherRevVals)
+ {
+ if (otherRevValType == null)
+ throw new ArgumentNullException("otherRevValType");
+ if (otherRevVals == null)
+ throw new ArgumentNullException("otherRevVals");
+
+ this.otherRevValType = otherRevValType;
+ this.otherRevVals = otherRevVals.ToAsn1Object();
+ }
+
+ public DerObjectIdentifier OtherRevValType
+ {
+ get { return otherRevValType; }
+ }
+
+ public Asn1Object OtherRevValsObject
+ {
+ get { return otherRevVals; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(otherRevValType, otherRevVals);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevVals.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevVals.cs.meta
new file mode 100644
index 00000000..a3af72b6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherRevVals.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: eb045476300253e419d767312265270b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherSigningCertificate.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherSigningCertificate.cs
new file mode 100644
index 00000000..94758170
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherSigningCertificate.cs
@@ -0,0 +1,132 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ ///
+ /// OtherSigningCertificate ::= SEQUENCE {
+ /// certs SEQUENCE OF OtherCertID,
+ /// policies SEQUENCE OF PolicyInformation OPTIONAL
+ /// }
+ ///
+ ///
+ public class OtherSigningCertificate
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence certs;
+ private readonly Asn1Sequence policies;
+
+ public static OtherSigningCertificate GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OtherSigningCertificate)
+ return (OtherSigningCertificate) obj;
+
+ if (obj is Asn1Sequence)
+ return new OtherSigningCertificate((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'OtherSigningCertificate' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private OtherSigningCertificate(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count < 1 || seq.Count > 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.certs = Asn1Sequence.GetInstance(seq[0].ToAsn1Object());
+
+ if (seq.Count > 1)
+ {
+ this.policies = Asn1Sequence.GetInstance(seq[1].ToAsn1Object());
+ }
+ }
+
+ public OtherSigningCertificate(
+ params OtherCertID[] certs)
+ : this(certs, null)
+ {
+ }
+
+ public OtherSigningCertificate(
+ OtherCertID[] certs,
+ params PolicyInformation[] policies)
+ {
+ if (certs == null)
+ throw new ArgumentNullException("certs");
+
+ this.certs = new DerSequence(certs);
+
+ if (policies != null)
+ {
+ this.policies = new DerSequence(policies);
+ }
+ }
+
+ public OtherSigningCertificate(
+ IEnumerable certs)
+ : this(certs, null)
+ {
+ }
+
+ public OtherSigningCertificate(
+ IEnumerable certs,
+ IEnumerable policies)
+ {
+ if (certs == null)
+ throw new ArgumentNullException("certs");
+
+ this.certs = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(certs));
+
+ if (policies != null)
+ {
+ this.policies = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(policies));
+ }
+ }
+
+ public OtherCertID[] GetCerts()
+ {
+ OtherCertID[] cs = new OtherCertID[certs.Count];
+ for (int i = 0; i < certs.Count; ++i)
+ {
+ cs[i] = OtherCertID.GetInstance(certs[i].ToAsn1Object());
+ }
+ return cs;
+ }
+
+ public PolicyInformation[] GetPolicies()
+ {
+ if (policies == null)
+ return null;
+
+ PolicyInformation[] ps = new PolicyInformation[policies.Count];
+ for (int i = 0; i < policies.Count; ++i)
+ {
+ ps[i] = PolicyInformation.GetInstance(policies[i].ToAsn1Object());
+ }
+ return ps;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(certs);
+ v.AddOptional(policies);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherSigningCertificate.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherSigningCertificate.cs.meta
new file mode 100644
index 00000000..2f969c93
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/OtherSigningCertificate.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6f7b6b9fb7323464ab4c5b7865a8a444
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/RevocationValues.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/RevocationValues.cs
new file mode 100644
index 00000000..5b0ba1f6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/RevocationValues.cs
@@ -0,0 +1,154 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ /// RFC 5126: 6.3.4. revocation-values Attribute Definition
+ ///
+ /// RevocationValues ::= SEQUENCE {
+ /// crlVals [0] SEQUENCE OF CertificateList OPTIONAL,
+ /// ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
+ /// otherRevVals [2] OtherRevVals OPTIONAL
+ /// }
+ ///
+ ///
+ public class RevocationValues
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence crlVals;
+ private readonly Asn1Sequence ocspVals;
+ private readonly OtherRevVals otherRevVals;
+
+ public static RevocationValues GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is RevocationValues)
+ return (RevocationValues) obj;
+
+ return new RevocationValues(Asn1Sequence.GetInstance(obj));
+ }
+
+ private RevocationValues(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ foreach (Asn1TaggedObject taggedObj in seq)
+ {
+ Asn1Object asn1Obj = taggedObj.GetObject();
+ switch (taggedObj.TagNo)
+ {
+ case 0:
+ Asn1Sequence crlValsSeq = (Asn1Sequence) asn1Obj;
+ foreach (Asn1Encodable ae in crlValsSeq)
+ {
+ CertificateList.GetInstance(ae.ToAsn1Object());
+ }
+ this.crlVals = crlValsSeq;
+ break;
+ case 1:
+ Asn1Sequence ocspValsSeq = (Asn1Sequence) asn1Obj;
+ foreach (Asn1Encodable ae in ocspValsSeq)
+ {
+ BasicOcspResponse.GetInstance(ae.ToAsn1Object());
+ }
+ this.ocspVals = ocspValsSeq;
+ break;
+ case 2:
+ this.otherRevVals = OtherRevVals.GetInstance(asn1Obj);
+ break;
+ default:
+ throw new ArgumentException("Illegal tag in RevocationValues", "seq");
+ }
+ }
+ }
+
+ public RevocationValues(
+ CertificateList[] crlVals,
+ BasicOcspResponse[] ocspVals,
+ OtherRevVals otherRevVals)
+ {
+ if (crlVals != null)
+ {
+ this.crlVals = new DerSequence(crlVals);
+ }
+
+ if (ocspVals != null)
+ {
+ this.ocspVals = new DerSequence(ocspVals);
+ }
+
+ this.otherRevVals = otherRevVals;
+ }
+
+ public RevocationValues(
+ IEnumerable crlVals,
+ IEnumerable ocspVals,
+ OtherRevVals otherRevVals)
+ {
+ if (crlVals != null)
+ {
+ this.crlVals = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(crlVals));
+ }
+
+ if (ocspVals != null)
+ {
+ this.ocspVals = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(ocspVals));
+ }
+
+ this.otherRevVals = otherRevVals;
+ }
+
+ public CertificateList[] GetCrlVals()
+ {
+ CertificateList[] result = new CertificateList[crlVals.Count];
+ for (int i = 0; i < crlVals.Count; ++i)
+ {
+ result[i] = CertificateList.GetInstance(crlVals[i].ToAsn1Object());
+ }
+ return result;
+ }
+
+ public BasicOcspResponse[] GetOcspVals()
+ {
+ BasicOcspResponse[] result = new BasicOcspResponse[ocspVals.Count];
+ for (int i = 0; i < ocspVals.Count; ++i)
+ {
+ result[i] = BasicOcspResponse.GetInstance(ocspVals[i].ToAsn1Object());
+ }
+ return result;
+ }
+
+ public OtherRevVals OtherRevVals
+ {
+ get { return otherRevVals; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, crlVals);
+ v.AddOptionalTagged(true, 1, ocspVals);
+
+ if (otherRevVals != null)
+ {
+ v.Add(new DerTaggedObject(true, 2, otherRevVals.ToAsn1Object()));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/RevocationValues.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/RevocationValues.cs.meta
new file mode 100644
index 00000000..2987f3e0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/RevocationValues.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 55efe2f3e0343dd4386522217ef9cbe1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SigPolicyQualifierInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SigPolicyQualifierInfo.cs
new file mode 100644
index 00000000..2afde411
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SigPolicyQualifierInfo.cs
@@ -0,0 +1,77 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ ///
+ /// SigPolicyQualifierInfo ::= SEQUENCE {
+ /// sigPolicyQualifierId SigPolicyQualifierId,
+ /// sigQualifier ANY DEFINED BY sigPolicyQualifierId
+ /// }
+ ///
+ /// SigPolicyQualifierId ::= OBJECT IDENTIFIER
+ ///
+ ///
+ public class SigPolicyQualifierInfo
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier sigPolicyQualifierId;
+ private readonly Asn1Object sigQualifier;
+
+ public static SigPolicyQualifierInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is SigPolicyQualifierInfo)
+ return (SigPolicyQualifierInfo) obj;
+
+ if (obj is Asn1Sequence)
+ return new SigPolicyQualifierInfo((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'SigPolicyQualifierInfo' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private SigPolicyQualifierInfo(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.sigPolicyQualifierId = (DerObjectIdentifier) seq[0].ToAsn1Object();
+ this.sigQualifier = seq[1].ToAsn1Object();
+ }
+
+ public SigPolicyQualifierInfo(
+ DerObjectIdentifier sigPolicyQualifierId,
+ Asn1Encodable sigQualifier)
+ {
+ this.sigPolicyQualifierId = sigPolicyQualifierId;
+ this.sigQualifier = sigQualifier.ToAsn1Object();
+ }
+
+ public DerObjectIdentifier SigPolicyQualifierId
+ {
+ get { return sigPolicyQualifierId; }
+ }
+
+ public Asn1Object SigQualifier
+ {
+ get { return sigQualifier; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(sigPolicyQualifierId, sigQualifier);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SigPolicyQualifierInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SigPolicyQualifierInfo.cs.meta
new file mode 100644
index 00000000..2599a8e7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SigPolicyQualifierInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e7fe96c8be596134bac2ee02392ee9d1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyId.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyId.cs
new file mode 100644
index 00000000..aeba2b41
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyId.cs
@@ -0,0 +1,146 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ ///
+ /// SignaturePolicyId ::= SEQUENCE {
+ /// sigPolicyIdentifier SigPolicyId,
+ /// sigPolicyHash SigPolicyHash,
+ /// sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF SigPolicyQualifierInfo OPTIONAL
+ /// }
+ ///
+ /// SigPolicyId ::= OBJECT IDENTIFIER
+ ///
+ /// SigPolicyHash ::= OtherHashAlgAndValue
+ ///
+ ///
+ public class SignaturePolicyId
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier sigPolicyIdentifier;
+ private readonly OtherHashAlgAndValue sigPolicyHash;
+ private readonly Asn1Sequence sigPolicyQualifiers;
+
+ public static SignaturePolicyId GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is SignaturePolicyId)
+ return (SignaturePolicyId) obj;
+
+ if (obj is Asn1Sequence)
+ return new SignaturePolicyId((Asn1Sequence) obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'SignaturePolicyId' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private SignaturePolicyId(
+ Asn1Sequence seq)
+ {
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+ if (seq.Count < 2 || seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.sigPolicyIdentifier = (DerObjectIdentifier) seq[0].ToAsn1Object();
+ this.sigPolicyHash = OtherHashAlgAndValue.GetInstance(seq[1].ToAsn1Object());
+
+ if (seq.Count > 2)
+ {
+ this.sigPolicyQualifiers = (Asn1Sequence) seq[2].ToAsn1Object();
+ }
+ }
+
+ public SignaturePolicyId(
+ DerObjectIdentifier sigPolicyIdentifier,
+ OtherHashAlgAndValue sigPolicyHash)
+ : this(sigPolicyIdentifier, sigPolicyHash, null)
+ {
+ }
+
+ public SignaturePolicyId(
+ DerObjectIdentifier sigPolicyIdentifier,
+ OtherHashAlgAndValue sigPolicyHash,
+ params SigPolicyQualifierInfo[] sigPolicyQualifiers)
+ {
+ if (sigPolicyIdentifier == null)
+ throw new ArgumentNullException("sigPolicyIdentifier");
+ if (sigPolicyHash == null)
+ throw new ArgumentNullException("sigPolicyHash");
+
+ this.sigPolicyIdentifier = sigPolicyIdentifier;
+ this.sigPolicyHash = sigPolicyHash;
+
+ if (sigPolicyQualifiers != null)
+ {
+ this.sigPolicyQualifiers = new DerSequence(sigPolicyQualifiers);
+ }
+ }
+
+ public SignaturePolicyId(
+ DerObjectIdentifier sigPolicyIdentifier,
+ OtherHashAlgAndValue sigPolicyHash,
+ IEnumerable sigPolicyQualifiers)
+ {
+ if (sigPolicyIdentifier == null)
+ throw new ArgumentNullException("sigPolicyIdentifier");
+ if (sigPolicyHash == null)
+ throw new ArgumentNullException("sigPolicyHash");
+
+ this.sigPolicyIdentifier = sigPolicyIdentifier;
+ this.sigPolicyHash = sigPolicyHash;
+
+ if (sigPolicyQualifiers != null)
+ {
+ this.sigPolicyQualifiers = new DerSequence(
+ Asn1EncodableVector.FromEnumerable(sigPolicyQualifiers));
+ }
+ }
+
+ public DerObjectIdentifier SigPolicyIdentifier
+ {
+ get { return sigPolicyIdentifier; }
+ }
+
+ public OtherHashAlgAndValue SigPolicyHash
+ {
+ get { return sigPolicyHash; }
+ }
+
+ public SigPolicyQualifierInfo[] GetSigPolicyQualifiers()
+ {
+ if (sigPolicyQualifiers == null)
+ return null;
+
+ SigPolicyQualifierInfo[] infos = new SigPolicyQualifierInfo[sigPolicyQualifiers.Count];
+ for (int i = 0; i < sigPolicyQualifiers.Count; ++i)
+ {
+ infos[i] = SigPolicyQualifierInfo.GetInstance(sigPolicyQualifiers[i]);
+ }
+ return infos;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ sigPolicyIdentifier, sigPolicyHash.ToAsn1Object());
+
+ if (sigPolicyQualifiers != null)
+ {
+ v.Add(sigPolicyQualifiers.ToAsn1Object());
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyId.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyId.cs.meta
new file mode 100644
index 00000000..c172a962
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyId.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 99be878f13c4b034aa698d274b195b84
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyIdentifier.cs
new file mode 100644
index 00000000..8ea91259
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyIdentifier.cs
@@ -0,0 +1,70 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ ///
+ ///
+ /// SignaturePolicyIdentifier ::= CHOICE {
+ /// SignaturePolicyId SignaturePolicyId,
+ /// SignaturePolicyImplied SignaturePolicyImplied
+ /// }
+ ///
+ /// SignaturePolicyImplied ::= NULL
+ ///
+ ///
+ public class SignaturePolicyIdentifier
+ : Asn1Encodable, IAsn1Choice
+ {
+ private readonly SignaturePolicyId sigPolicy;
+
+ public static SignaturePolicyIdentifier GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is SignaturePolicyIdentifier)
+ return (SignaturePolicyIdentifier) obj;
+
+ if (obj is SignaturePolicyId)
+ return new SignaturePolicyIdentifier((SignaturePolicyId) obj);
+
+ if (obj is Asn1Null)
+ return new SignaturePolicyIdentifier();
+
+ throw new ArgumentException(
+ "Unknown object in 'SignaturePolicyIdentifier' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ public SignaturePolicyIdentifier()
+ {
+ this.sigPolicy = null;
+ }
+
+ public SignaturePolicyIdentifier(
+ SignaturePolicyId signaturePolicyId)
+ {
+ if (signaturePolicyId == null)
+ throw new ArgumentNullException("signaturePolicyId");
+
+ this.sigPolicy = signaturePolicyId;
+ }
+
+ public SignaturePolicyId SignaturePolicyId
+ {
+ get { return sigPolicy; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return sigPolicy == null
+ ? DerNull.Instance
+ : sigPolicy.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyIdentifier.cs.meta
new file mode 100644
index 00000000..b29d5130
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignaturePolicyIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 38e7b593193c0d848ad9ea61b84ba7f4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerAttribute.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerAttribute.cs
new file mode 100644
index 00000000..bb452ae2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerAttribute.cs
@@ -0,0 +1,101 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ public class SignerAttribute
+ : Asn1Encodable
+ {
+ private Asn1Sequence claimedAttributes;
+ private AttributeCertificate certifiedAttributes;
+
+ public static SignerAttribute GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is SignerAttribute)
+ return (SignerAttribute) obj;
+
+ if (obj is Asn1Sequence)
+ return new SignerAttribute(obj);
+
+ throw new ArgumentException(
+ "Unknown object in 'SignerAttribute' factory: "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj),
+ "obj");
+ }
+
+ private SignerAttribute(
+ object obj)
+ {
+ Asn1Sequence seq = (Asn1Sequence) obj;
+ DerTaggedObject taggedObject = (DerTaggedObject) seq[0];
+ if (taggedObject.TagNo == 0)
+ {
+ claimedAttributes = Asn1Sequence.GetInstance(taggedObject, true);
+ }
+ else if (taggedObject.TagNo == 1)
+ {
+ certifiedAttributes = AttributeCertificate.GetInstance(taggedObject);
+ }
+ else
+ {
+ throw new ArgumentException("illegal tag.", "obj");
+ }
+ }
+
+ public SignerAttribute(
+ Asn1Sequence claimedAttributes)
+ {
+ this.claimedAttributes = claimedAttributes;
+ }
+
+ public SignerAttribute(
+ AttributeCertificate certifiedAttributes)
+ {
+ this.certifiedAttributes = certifiedAttributes;
+ }
+
+ public virtual Asn1Sequence ClaimedAttributes
+ {
+ get { return claimedAttributes; }
+ }
+
+ public virtual AttributeCertificate CertifiedAttributes
+ {
+ get { return certifiedAttributes; }
+ }
+
+ /**
+ *
+ *
+ * SignerAttribute ::= SEQUENCE OF CHOICE {
+ * claimedAttributes [0] ClaimedAttributes,
+ * certifiedAttributes [1] CertifiedAttributes }
+ *
+ * ClaimedAttributes ::= SEQUENCE OF Attribute
+ * CertifiedAttributes ::= AttributeCertificate -- as defined in RFC 3281: see clause 4.1.
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (claimedAttributes != null)
+ {
+ v.Add(new DerTaggedObject(0, claimedAttributes));
+ }
+ else
+ {
+ v.Add(new DerTaggedObject(1, certifiedAttributes));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerAttribute.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerAttribute.cs.meta
new file mode 100644
index 00000000..30eb9ddd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c6fd77b53c8c1a1408dae6fba217b087
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerLocation.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerLocation.cs
new file mode 100644
index 00000000..64aa5d97
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerLocation.cs
@@ -0,0 +1,146 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf
+{
+ /**
+ * Signer-Location attribute (RFC3126).
+ *
+ *
+ * SignerLocation ::= SEQUENCE {
+ * countryName [0] DirectoryString OPTIONAL,
+ * localityName [1] DirectoryString OPTIONAL,
+ * postalAddress [2] PostalAddress OPTIONAL }
+ *
+ * PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+ *
+ */
+ public class SignerLocation
+ : Asn1Encodable
+ {
+ private DirectoryString countryName;
+ private DirectoryString localityName;
+ private Asn1Sequence postalAddress;
+
+ public SignerLocation(Asn1Sequence seq)
+ {
+ foreach (Asn1TaggedObject obj in seq)
+ {
+ switch (obj.TagNo)
+ {
+ case 0:
+ this.countryName = DirectoryString.GetInstance(obj, true);
+ break;
+ case 1:
+ this.localityName = DirectoryString.GetInstance(obj, true);
+ break;
+ case 2:
+ bool isExplicit = obj.IsExplicit(); // handle erroneous implicitly tagged sequences
+ this.postalAddress = Asn1Sequence.GetInstance(obj, isExplicit);
+ if (postalAddress != null && postalAddress.Count > 6)
+ throw new ArgumentException("postal address must contain less than 6 strings");
+ break;
+ default:
+ throw new ArgumentException("illegal tag");
+ }
+ }
+ }
+
+ private SignerLocation(
+ DirectoryString countryName,
+ DirectoryString localityName,
+ Asn1Sequence postalAddress)
+ {
+ if (postalAddress != null && postalAddress.Count > 6)
+ throw new ArgumentException("postal address must contain less than 6 strings");
+
+ this.countryName = countryName;
+ this.localityName = localityName;
+ this.postalAddress = postalAddress;
+ }
+
+ public SignerLocation(
+ DirectoryString countryName,
+ DirectoryString localityName,
+ DirectoryString[] postalAddress)
+ : this(countryName, localityName, new DerSequence(postalAddress))
+ {
+ }
+
+ public SignerLocation(
+ DerUtf8String countryName,
+ DerUtf8String localityName,
+ Asn1Sequence postalAddress)
+ : this(DirectoryString.GetInstance(countryName), DirectoryString.GetInstance(localityName), postalAddress)
+ {
+ }
+
+ public static SignerLocation GetInstance(object obj)
+ {
+ if (obj == null || obj is SignerLocation)
+ return (SignerLocation) obj;
+
+ return new SignerLocation(Asn1Sequence.GetInstance(obj));
+ }
+
+ public DirectoryString Country
+ {
+ get { return countryName; }
+ }
+
+ public DirectoryString Locality
+ {
+ get { return localityName; }
+ }
+
+ public DirectoryString[] GetPostal()
+ {
+ if (postalAddress == null)
+ return null;
+
+ DirectoryString[] dirStrings = new DirectoryString[postalAddress.Count];
+ for (int i = 0; i != dirStrings.Length; i++)
+ {
+ dirStrings[i] = DirectoryString.GetInstance(postalAddress[i]);
+ }
+
+ return dirStrings;
+ }
+
+ public Asn1Sequence PostalAddress
+ {
+ get { return postalAddress; }
+ }
+
+ /**
+ *
+ * SignerLocation ::= SEQUENCE {
+ * countryName [0] DirectoryString OPTIONAL,
+ * localityName [1] DirectoryString OPTIONAL,
+ * postalAddress [2] PostalAddress OPTIONAL }
+ *
+ * PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+ *
+ * DirectoryString ::= CHOICE {
+ * teletexString TeletexString (SIZE (1..MAX)),
+ * printableString PrintableString (SIZE (1..MAX)),
+ * universalString UniversalString (SIZE (1..MAX)),
+ * utf8String UTF8String (SIZE (1.. MAX)),
+ * bmpString BMPString (SIZE (1..MAX)) }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, countryName);
+ v.AddOptionalTagged(true, 1, localityName);
+ v.AddOptionalTagged(true, 2, postalAddress);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerLocation.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerLocation.cs.meta
new file mode 100644
index 00000000..66fcdd67
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/esf/SignerLocation.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 30313862107873a40bb9ba65d82dbcdd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess.meta
new file mode 100644
index 00000000..4db94f12
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b657f266ce7dfc14f839d03374753d22
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentHints.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentHints.cs
new file mode 100644
index 00000000..b32caeb7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentHints.cs
@@ -0,0 +1,92 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ess
+{
+ public class ContentHints
+ : Asn1Encodable
+ {
+ private readonly DerUtf8String contentDescription;
+ private readonly DerObjectIdentifier contentType;
+
+ public static ContentHints GetInstance(
+ object o)
+ {
+ if (o == null || o is ContentHints)
+ {
+ return (ContentHints)o;
+ }
+
+ if (o is Asn1Sequence)
+ {
+ return new ContentHints((Asn1Sequence)o);
+ }
+
+ throw new ArgumentException("unknown object in 'ContentHints' factory : "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(o) + ".");
+ }
+
+ /**
+ * constructor
+ */
+ private ContentHints(
+ Asn1Sequence seq)
+ {
+ IAsn1Convertible field = seq[0];
+ if (field.ToAsn1Object() is DerUtf8String)
+ {
+ contentDescription = DerUtf8String.GetInstance(field);
+ contentType = DerObjectIdentifier.GetInstance(seq[1]);
+ }
+ else
+ {
+ contentType = DerObjectIdentifier.GetInstance(seq[0]);
+ }
+ }
+
+ public ContentHints(
+ DerObjectIdentifier contentType)
+ {
+ this.contentType = contentType;
+ this.contentDescription = null;
+ }
+
+ public ContentHints(
+ DerObjectIdentifier contentType,
+ DerUtf8String contentDescription)
+ {
+ this.contentType = contentType;
+ this.contentDescription = contentDescription;
+ }
+
+ public DerObjectIdentifier ContentType
+ {
+ get { return contentType; }
+ }
+
+ public DerUtf8String ContentDescription
+ {
+ get { return contentDescription; }
+ }
+
+ /**
+ *
+ * ContentHints ::= SEQUENCE {
+ * contentDescription UTF8String (SIZE (1..MAX)) OPTIONAL,
+ * contentType ContentType }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(contentDescription);
+ v.Add(contentType);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentHints.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentHints.cs.meta
new file mode 100644
index 00000000..b2786edd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentHints.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e9433cbc49e0f2049b844cfe16f2e5a5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentIdentifier.cs
new file mode 100644
index 00000000..747c0168
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentIdentifier.cs
@@ -0,0 +1,71 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ess
+{
+ public class ContentIdentifier
+ : Asn1Encodable
+ {
+ private Asn1OctetString value;
+
+ public static ContentIdentifier GetInstance(
+ object o)
+ {
+ if (o == null || o is ContentIdentifier)
+ {
+ return (ContentIdentifier) o;
+ }
+
+ if (o is Asn1OctetString)
+ {
+ return new ContentIdentifier((Asn1OctetString) o);
+ }
+
+ throw new ArgumentException(
+ "unknown object in 'ContentIdentifier' factory : "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(o) + ".");
+ }
+
+ /**
+ * Create from OCTET STRING whose octets represent the identifier.
+ */
+ public ContentIdentifier(
+ Asn1OctetString value)
+ {
+ this.value = value;
+ }
+
+ /**
+ * Create from byte array representing the identifier.
+ */
+ public ContentIdentifier(
+ byte[] value)
+ : this(new DerOctetString(value))
+ {
+ }
+
+ public Asn1OctetString Value
+ {
+ get { return value; }
+ }
+
+ /**
+ * The definition of ContentIdentifier is
+ *
+ * ContentIdentifier ::= OCTET STRING
+ *
+ * id-aa-contentIdentifier OBJECT IDENTIFIER ::= { iso(1)
+ * member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ * smime(16) id-aa(2) 7 }
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return value;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentIdentifier.cs.meta
new file mode 100644
index 00000000..750da85d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ContentIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d718fb70d08b26d4793c1a8b738d1cf7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertID.cs
new file mode 100644
index 00000000..be1f8169
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertID.cs
@@ -0,0 +1,93 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ess
+{
+ public class EssCertID
+ : Asn1Encodable
+ {
+ private Asn1OctetString certHash;
+ private IssuerSerial issuerSerial;
+
+ public static EssCertID GetInstance(
+ object o)
+ {
+ if (o == null || o is EssCertID)
+ {
+ return (EssCertID) o;
+ }
+
+ if (o is Asn1Sequence)
+ {
+ return new EssCertID((Asn1Sequence) o);
+ }
+
+ throw new ArgumentException(
+ "unknown object in 'EssCertID' factory : "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(o) + ".");
+ }
+
+ /**
+ * constructor
+ */
+ public EssCertID(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 1 || seq.Count > 2)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+
+ this.certHash = Asn1OctetString.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ issuerSerial = IssuerSerial.GetInstance(seq[1]);
+ }
+ }
+
+ public EssCertID(
+ byte[] hash)
+ {
+ certHash = new DerOctetString(hash);
+ }
+
+ public EssCertID(
+ byte[] hash,
+ IssuerSerial issuerSerial)
+ {
+ this.certHash = new DerOctetString(hash);
+ this.issuerSerial = issuerSerial;
+ }
+
+ public byte[] GetCertHash()
+ {
+ return certHash.GetOctets();
+ }
+
+ public IssuerSerial IssuerSerial
+ {
+ get { return issuerSerial; }
+ }
+
+ /**
+ *
+ * EssCertID ::= SEQUENCE {
+ * certHash Hash,
+ * issuerSerial IssuerSerial OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(certHash);
+ v.AddOptional(issuerSerial);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertID.cs.meta
new file mode 100644
index 00000000..5505d1ca
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9d12b9037daa67e4a850a9f040b538dc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertIDv2.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertIDv2.cs
new file mode 100644
index 00000000..0ff5213c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertIDv2.cs
@@ -0,0 +1,145 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ess
+{
+ public class EssCertIDv2
+ : Asn1Encodable
+ {
+ private readonly AlgorithmIdentifier hashAlgorithm;
+ private readonly byte[] certHash;
+ private readonly IssuerSerial issuerSerial;
+
+ private static readonly AlgorithmIdentifier DefaultAlgID = new AlgorithmIdentifier(
+ NistObjectIdentifiers.IdSha256);
+
+ public static EssCertIDv2 GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+ EssCertIDv2 existing = obj as EssCertIDv2;
+ if (existing != null)
+ return existing;
+ return new EssCertIDv2(Asn1Sequence.GetInstance(obj));
+ }
+
+ private EssCertIDv2(
+ Asn1Sequence seq)
+ {
+ if (seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ int count = 0;
+
+ if (seq[0] is Asn1OctetString)
+ {
+ // Default value
+ this.hashAlgorithm = DefaultAlgID;
+ }
+ else
+ {
+ this.hashAlgorithm = AlgorithmIdentifier.GetInstance(seq[count++].ToAsn1Object());
+ }
+
+ this.certHash = Asn1OctetString.GetInstance(seq[count++].ToAsn1Object()).GetOctets();
+
+ if (seq.Count > count)
+ {
+ this.issuerSerial = IssuerSerial.GetInstance(
+ Asn1Sequence.GetInstance(seq[count].ToAsn1Object()));
+ }
+ }
+
+ public EssCertIDv2(byte[] certHash)
+ : this(null, certHash, null)
+ {
+ }
+
+ public EssCertIDv2(
+ AlgorithmIdentifier algId,
+ byte[] certHash)
+ : this(algId, certHash, null)
+ {
+ }
+
+ public EssCertIDv2(
+ byte[] certHash,
+ IssuerSerial issuerSerial)
+ : this(null, certHash, issuerSerial)
+ {
+ }
+
+ public EssCertIDv2(
+ AlgorithmIdentifier algId,
+ byte[] certHash,
+ IssuerSerial issuerSerial)
+ {
+ if (algId == null)
+ {
+ // Default value
+ this.hashAlgorithm = DefaultAlgID;
+ }
+ else
+ {
+ this.hashAlgorithm = algId;
+ }
+
+ this.certHash = certHash;
+ this.issuerSerial = issuerSerial;
+ }
+
+ public AlgorithmIdentifier HashAlgorithm
+ {
+ get { return this.hashAlgorithm; }
+ }
+
+ public byte[] GetCertHash()
+ {
+ return Arrays.Clone(certHash);
+ }
+
+ public IssuerSerial IssuerSerial
+ {
+ get { return issuerSerial; }
+ }
+
+ /**
+ *
+ * EssCertIDv2 ::= SEQUENCE {
+ * hashAlgorithm AlgorithmIdentifier
+ * DEFAULT {algorithm id-sha256},
+ * certHash Hash,
+ * issuerSerial IssuerSerial OPTIONAL
+ * }
+ *
+ * Hash ::= OCTET STRING
+ *
+ * IssuerSerial ::= SEQUENCE {
+ * issuer GeneralNames,
+ * serialNumber CertificateSerialNumber
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (!hashAlgorithm.Equals(DefaultAlgID))
+ {
+ v.Add(hashAlgorithm);
+ }
+
+ v.Add(new DerOctetString(certHash).ToAsn1Object());
+ v.AddOptional(issuerSerial);
+ return new DerSequence(v);
+ }
+
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertIDv2.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertIDv2.cs.meta
new file mode 100644
index 00000000..fd403204
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/ESSCertIDv2.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fa48900c0800a3546920b01edb65a5b1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificate.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificate.cs
new file mode 100644
index 00000000..e13394e5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificate.cs
@@ -0,0 +1,108 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ess
+{
+ public class SigningCertificate
+ : Asn1Encodable
+ {
+ private Asn1Sequence certs, policies;
+
+ public static SigningCertificate GetInstance(
+ object o)
+ {
+ if (o == null || o is SigningCertificate)
+ {
+ return (SigningCertificate) o;
+ }
+
+ if (o is Asn1Sequence)
+ {
+ return new SigningCertificate((Asn1Sequence) o);
+ }
+
+ throw new ArgumentException(
+ "unknown object in 'SigningCertificate' factory : "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(o) + ".");
+ }
+
+ /**
+ * constructors
+ */
+ public SigningCertificate(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 1 || seq.Count > 2)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+
+ this.certs = Asn1Sequence.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ this.policies = Asn1Sequence.GetInstance(seq[1]);
+ }
+ }
+
+ public SigningCertificate(
+ EssCertID essCertID)
+ {
+ certs = new DerSequence(essCertID);
+ }
+
+ public EssCertID[] GetCerts()
+ {
+ EssCertID[] cs = new EssCertID[certs.Count];
+
+ for (int i = 0; i != certs.Count; i++)
+ {
+ cs[i] = EssCertID.GetInstance(certs[i]);
+ }
+
+ return cs;
+ }
+
+ public PolicyInformation[] GetPolicies()
+ {
+ if (policies == null)
+ {
+ return null;
+ }
+
+ PolicyInformation[] ps = new PolicyInformation[policies.Count];
+
+ for (int i = 0; i != policies.Count; i++)
+ {
+ ps[i] = PolicyInformation.GetInstance(policies[i]);
+ }
+
+ return ps;
+ }
+
+ /**
+ * The definition of SigningCertificate is
+ *
+ * SigningCertificate ::= SEQUENCE {
+ * certs SEQUENCE OF EssCertID,
+ * policies SEQUENCE OF PolicyInformation OPTIONAL
+ * }
+ *
+ * id-aa-signingCertificate OBJECT IDENTIFIER ::= { iso(1)
+ * member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ * smime(16) id-aa(2) 12 }
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(certs);
+ v.AddOptional(policies);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificate.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificate.cs.meta
new file mode 100644
index 00000000..4bbd9c95
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificate.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e70e8e77c86e9cf47bf645362e801f88
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificateV2.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificateV2.cs
new file mode 100644
index 00000000..a93d9bd1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificateV2.cs
@@ -0,0 +1,112 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ess
+{
+ public class SigningCertificateV2
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence certs;
+ private readonly Asn1Sequence policies;
+
+ public static SigningCertificateV2 GetInstance(
+ object o)
+ {
+ if (o == null || o is SigningCertificateV2)
+ return (SigningCertificateV2) o;
+
+ if (o is Asn1Sequence)
+ return new SigningCertificateV2((Asn1Sequence) o);
+
+ throw new ArgumentException(
+ "unknown object in 'SigningCertificateV2' factory : "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(o) + ".");
+ }
+
+ private SigningCertificateV2(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 1 || seq.Count > 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.certs = Asn1Sequence.GetInstance(seq[0].ToAsn1Object());
+
+ if (seq.Count > 1)
+ {
+ this.policies = Asn1Sequence.GetInstance(seq[1].ToAsn1Object());
+ }
+ }
+
+ public SigningCertificateV2(
+ EssCertIDv2 cert)
+ {
+ this.certs = new DerSequence(cert);
+ }
+
+ public SigningCertificateV2(
+ EssCertIDv2[] certs)
+ {
+ this.certs = new DerSequence(certs);
+ }
+
+ public SigningCertificateV2(
+ EssCertIDv2[] certs,
+ PolicyInformation[] policies)
+ {
+ this.certs = new DerSequence(certs);
+
+ if (policies != null)
+ {
+ this.policies = new DerSequence(policies);
+ }
+ }
+
+ public EssCertIDv2[] GetCerts()
+ {
+ EssCertIDv2[] certIds = new EssCertIDv2[certs.Count];
+ for (int i = 0; i != certs.Count; i++)
+ {
+ certIds[i] = EssCertIDv2.GetInstance(certs[i]);
+ }
+ return certIds;
+ }
+
+ public PolicyInformation[] GetPolicies()
+ {
+ if (policies == null)
+ return null;
+
+ PolicyInformation[] policyInformations = new PolicyInformation[policies.Count];
+ for (int i = 0; i != policies.Count; i++)
+ {
+ policyInformations[i] = PolicyInformation.GetInstance(policies[i]);
+ }
+ return policyInformations;
+ }
+
+ /**
+ * The definition of SigningCertificateV2 is
+ *
+ * SigningCertificateV2 ::= SEQUENCE {
+ * certs SEQUENCE OF EssCertIDv2,
+ * policies SEQUENCE OF PolicyInformation OPTIONAL
+ * }
+ *
+ * id-aa-signingCertificateV2 OBJECT IDENTIFIER ::= { iso(1)
+ * member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ * smime(16) id-aa(2) 47 }
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(certs);
+ v.AddOptional(policies);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificateV2.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificateV2.cs.meta
new file mode 100644
index 00000000..8679dbed
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ess/SigningCertificateV2.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 06783a2331c183e42a9ebe87154438a5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm.meta
new file mode 100644
index 00000000..5a53ec54
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 313fbff6073b42244bfa8ea7df584644
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMNamedCurves.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMNamedCurves.cs
new file mode 100644
index 00000000..5b402711
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMNamedCurves.cs
@@ -0,0 +1,177 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Multiplier;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.GM
+{
+ /// Elliptic curve registry for GM.
+ public static class GMNamedCurves
+ {
+ private static X9ECPoint ConfigureBasepoint(ECCurve curve, string encoding)
+ {
+ X9ECPoint G = new X9ECPoint(curve, Hex.DecodeStrict(encoding));
+ WNafUtilities.ConfigureBasepoint(G.Point);
+ return G;
+ }
+
+ private static ECCurve ConfigureCurve(ECCurve curve)
+ {
+ return curve;
+ }
+
+ private static BigInteger FromHex(string hex)
+ {
+ return new BigInteger(1, Hex.DecodeStrict(hex));
+ }
+
+ internal class SM2P256V1Holder
+ : X9ECParametersHolder
+ {
+ private SM2P256V1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new SM2P256V1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger p = FromHex("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF");
+ BigInteger a = FromHex("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC");
+ BigInteger b = FromHex("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93");
+ BigInteger n = FromHex("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class WapiP192V1Holder
+ : X9ECParametersHolder
+ {
+ private WapiP192V1Holder() { }
+
+ internal static readonly X9ECParametersHolder Instance = new WapiP192V1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger p = FromHex("BDB6F4FE3E8B1D9E0DA8C0D46F4C318CEFE4AFE3B6B8551F");
+ BigInteger a = FromHex("BB8E5E8FBC115E139FE6A814FE48AAA6F0ADA1AA5DF91985");
+ BigInteger b = FromHex("1854BEBDC31B21B7AEFC80AB0ECD10D5B1B3308E6DBF11C1");
+ BigInteger n = FromHex("BDB6F4FE3E8B1D9E0DA8C0D40FC962195DFAE76F56564677");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "044AD5F7048DE709AD51236DE65E4D4B482C836DC6E410664002BB3A02D4AAADACAE24817A4CA3A1B014B5270432DB27D2");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ private static readonly Dictionary objIds =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly Dictionary curves =
+ new Dictionary();
+ private static readonly Dictionary names =
+ new Dictionary();
+
+ private static void DefineCurve(string name, DerObjectIdentifier oid, X9ECParametersHolder holder)
+ {
+ objIds.Add(name, oid);
+ names.Add(oid, name);
+ curves.Add(oid, holder);
+ }
+
+ static GMNamedCurves()
+ {
+ DefineCurve("wapip192v1", GMObjectIdentifiers.wapip192v1, WapiP192V1Holder.Instance);
+ DefineCurve("sm2p256v1", GMObjectIdentifiers.sm2p256v1, SM2P256V1Holder.Instance);
+ }
+
+ /// Look up the for the curve with the given name.
+ /// The name of the curve.
+ public static X9ECParameters GetByName(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOid(oid);
+ }
+
+ /// Look up an for the curve with the given name.
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The name of the curve.
+ public static X9ECParametersHolder GetByNameLazy(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOidLazy(oid);
+ }
+
+ /// Look up the for the curve with the given
+ /// OID .
+ /// The OID for the curve.
+ public static X9ECParameters GetByOid(DerObjectIdentifier oid)
+ {
+ return GetByOidLazy(oid)?.Parameters;
+ }
+
+ /// Look up an for the curve with the given
+ /// OID .
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The OID for the curve.
+ public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(curves, oid);
+ }
+
+ /// Look up the name of the curve with the given OID .
+ /// The OID for the curve.
+ public static string GetName(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(names, oid);
+ }
+
+ /// Look up the OID of the curve with the given name.
+ /// The name of the curve.
+ public static DerObjectIdentifier GetOid(string name)
+ {
+ return CollectionUtilities.GetValueOrNull(objIds, name);
+ }
+
+ /// Enumerate the available curve names in this registry.
+ public static IEnumerable Names
+ {
+ get { return CollectionUtilities.Proxy(objIds.Keys); }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMNamedCurves.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMNamedCurves.cs.meta
new file mode 100644
index 00000000..e4a8e223
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMNamedCurves.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cc5f0323c7d1d374c99b8e0fd3115d74
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMObjectIdentifiers.cs
new file mode 100644
index 00000000..210d27ac
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMObjectIdentifiers.cs
@@ -0,0 +1,89 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.GM
+{
+ public abstract class GMObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier sm_scheme = new DerObjectIdentifier("1.2.156.10197.1");
+
+ public static readonly DerObjectIdentifier sm6_ecb = sm_scheme.Branch("101.1");
+ public static readonly DerObjectIdentifier sm6_cbc = sm_scheme.Branch("101.2");
+ public static readonly DerObjectIdentifier sm6_ofb128 = sm_scheme.Branch("101.3");
+ public static readonly DerObjectIdentifier sm6_cfb128 = sm_scheme.Branch("101.4");
+
+ public static readonly DerObjectIdentifier sm1_ecb = sm_scheme.Branch("102.1");
+ public static readonly DerObjectIdentifier sm1_cbc = sm_scheme.Branch("102.2");
+ public static readonly DerObjectIdentifier sm1_ofb128 = sm_scheme.Branch("102.3");
+ public static readonly DerObjectIdentifier sm1_cfb128 = sm_scheme.Branch("102.4");
+ public static readonly DerObjectIdentifier sm1_cfb1 = sm_scheme.Branch("102.5");
+ public static readonly DerObjectIdentifier sm1_cfb8 = sm_scheme.Branch("102.6");
+
+ public static readonly DerObjectIdentifier ssf33_ecb = sm_scheme.Branch("103.1");
+ public static readonly DerObjectIdentifier ssf33_cbc = sm_scheme.Branch("103.2");
+ public static readonly DerObjectIdentifier ssf33_ofb128 = sm_scheme.Branch("103.3");
+ public static readonly DerObjectIdentifier ssf33_cfb128 = sm_scheme.Branch("103.4");
+ public static readonly DerObjectIdentifier ssf33_cfb1 = sm_scheme.Branch("103.5");
+ public static readonly DerObjectIdentifier ssf33_cfb8 = sm_scheme.Branch("103.6");
+
+ public static readonly DerObjectIdentifier sms4_ecb = sm_scheme.Branch("104.1");
+ public static readonly DerObjectIdentifier sms4_cbc = sm_scheme.Branch("104.2");
+ public static readonly DerObjectIdentifier sms4_ofb128 = sm_scheme.Branch("104.3");
+ public static readonly DerObjectIdentifier sms4_cfb128 = sm_scheme.Branch("104.4");
+ public static readonly DerObjectIdentifier sms4_cfb1 = sm_scheme.Branch("104.5");
+ public static readonly DerObjectIdentifier sms4_cfb8 = sm_scheme.Branch("104.6");
+ public static readonly DerObjectIdentifier sms4_ctr = sm_scheme.Branch("104.7");
+ public static readonly DerObjectIdentifier sms4_gcm = sm_scheme.Branch("104.8");
+ public static readonly DerObjectIdentifier sms4_ccm = sm_scheme.Branch("104.9");
+ public static readonly DerObjectIdentifier sms4_xts = sm_scheme.Branch("104.10");
+ public static readonly DerObjectIdentifier sms4_wrap = sm_scheme.Branch("104.11");
+ public static readonly DerObjectIdentifier sms4_wrap_pad = sm_scheme.Branch("104.12");
+ public static readonly DerObjectIdentifier sms4_ocb = sm_scheme.Branch("104.100");
+
+ public static readonly DerObjectIdentifier sm5 = sm_scheme.Branch("201");
+
+ public static readonly DerObjectIdentifier sm2p256v1 = sm_scheme.Branch("301");
+ public static readonly DerObjectIdentifier sm2sign = sm_scheme.Branch("301.1");
+ public static readonly DerObjectIdentifier sm2exchange = sm_scheme.Branch("301.2");
+ public static readonly DerObjectIdentifier sm2encrypt = sm_scheme.Branch("301.3");
+
+ public static readonly DerObjectIdentifier wapip192v1 = sm_scheme.Branch("301.101");
+
+ public static readonly DerObjectIdentifier sm2encrypt_recommendedParameters = sm2encrypt.Branch("1");
+ public static readonly DerObjectIdentifier sm2encrypt_specifiedParameters = sm2encrypt.Branch("2");
+ public static readonly DerObjectIdentifier sm2encrypt_with_sm3 = sm2encrypt.Branch("2.1");
+ public static readonly DerObjectIdentifier sm2encrypt_with_sha1 = sm2encrypt.Branch("2.2");
+ public static readonly DerObjectIdentifier sm2encrypt_with_sha224 = sm2encrypt.Branch("2.3");
+ public static readonly DerObjectIdentifier sm2encrypt_with_sha256 = sm2encrypt.Branch("2.4");
+ public static readonly DerObjectIdentifier sm2encrypt_with_sha384 = sm2encrypt.Branch("2.5");
+ public static readonly DerObjectIdentifier sm2encrypt_with_sha512 = sm2encrypt.Branch("2.6");
+ public static readonly DerObjectIdentifier sm2encrypt_with_rmd160 = sm2encrypt.Branch("2.7");
+ public static readonly DerObjectIdentifier sm2encrypt_with_whirlpool = sm2encrypt.Branch("2.8");
+ public static readonly DerObjectIdentifier sm2encrypt_with_blake2b512 = sm2encrypt.Branch("2.9");
+ public static readonly DerObjectIdentifier sm2encrypt_with_blake2s256 = sm2encrypt.Branch("2.10");
+ public static readonly DerObjectIdentifier sm2encrypt_with_md5 = sm2encrypt.Branch("2.11");
+
+ public static readonly DerObjectIdentifier id_sm9PublicKey = sm_scheme.Branch("302");
+ public static readonly DerObjectIdentifier sm9sign = sm_scheme.Branch("302.1");
+ public static readonly DerObjectIdentifier sm9keyagreement = sm_scheme.Branch("302.2");
+ public static readonly DerObjectIdentifier sm9encrypt = sm_scheme.Branch("302.3");
+
+ public static readonly DerObjectIdentifier sm3 = sm_scheme.Branch("401");
+
+ public static readonly DerObjectIdentifier hmac_sm3 = sm3.Branch("2");
+
+ public static readonly DerObjectIdentifier sm2sign_with_sm3 = sm_scheme.Branch("501");
+ public static readonly DerObjectIdentifier sm2sign_with_sha1 = sm_scheme.Branch("502");
+ public static readonly DerObjectIdentifier sm2sign_with_sha256 = sm_scheme.Branch("503");
+ public static readonly DerObjectIdentifier sm2sign_with_sha512 = sm_scheme.Branch("504");
+ public static readonly DerObjectIdentifier sm2sign_with_sha224 = sm_scheme.Branch("505");
+ public static readonly DerObjectIdentifier sm2sign_with_sha384 = sm_scheme.Branch("506");
+ public static readonly DerObjectIdentifier sm2sign_with_rmd160 = sm_scheme.Branch("507");
+ public static readonly DerObjectIdentifier sm2sign_with_whirlpool = sm_scheme.Branch("520");
+ public static readonly DerObjectIdentifier sm2sign_with_blake2b512 = sm_scheme.Branch("521");
+ public static readonly DerObjectIdentifier sm2sign_with_blake2s256 = sm_scheme.Branch("522");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..5451466a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gm/GMObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0fde6a1bc666ac241ada3f5f8e2c6e90
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu.meta
new file mode 100644
index 00000000..8e608a2e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ca80dc3c12ce0d745add4d2598bd0f28
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu/GNUObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu/GNUObjectIdentifiers.cs
new file mode 100644
index 00000000..96cc5759
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu/GNUObjectIdentifiers.cs
@@ -0,0 +1,40 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Gnu
+{
+ public abstract class GnuObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier Gnu = new DerObjectIdentifier("1.3.6.1.4.1.11591.1"); // GNU Radius
+ public static readonly DerObjectIdentifier GnuPG = new DerObjectIdentifier("1.3.6.1.4.1.11591.2"); // GnuPG (Ägypten)
+ public static readonly DerObjectIdentifier Notation = new DerObjectIdentifier("1.3.6.1.4.1.11591.2.1"); // notation
+ public static readonly DerObjectIdentifier PkaAddress = new DerObjectIdentifier("1.3.6.1.4.1.11591.2.1.1"); // pkaAddress
+ public static readonly DerObjectIdentifier GnuRadar = new DerObjectIdentifier("1.3.6.1.4.1.11591.3"); // GNU Radar
+ public static readonly DerObjectIdentifier DigestAlgorithm = new DerObjectIdentifier("1.3.6.1.4.1.11591.12"); // digestAlgorithm
+ public static readonly DerObjectIdentifier Tiger192 = new DerObjectIdentifier("1.3.6.1.4.1.11591.12.2"); // TIGER/192
+ public static readonly DerObjectIdentifier EncryptionAlgorithm = new DerObjectIdentifier("1.3.6.1.4.1.11591.13"); // encryptionAlgorithm
+ public static readonly DerObjectIdentifier Serpent = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2"); // Serpent
+ public static readonly DerObjectIdentifier Serpent128Ecb = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.1"); // Serpent-128-ECB
+ public static readonly DerObjectIdentifier Serpent128Cbc = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.2"); // Serpent-128-CBC
+ public static readonly DerObjectIdentifier Serpent128Ofb = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.3"); // Serpent-128-OFB
+ public static readonly DerObjectIdentifier Serpent128Cfb = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.4"); // Serpent-128-CFB
+ public static readonly DerObjectIdentifier Serpent192Ecb = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.21"); // Serpent-192-ECB
+ public static readonly DerObjectIdentifier Serpent192Cbc = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.22"); // Serpent-192-CBC
+ public static readonly DerObjectIdentifier Serpent192Ofb = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.23"); // Serpent-192-OFB
+ public static readonly DerObjectIdentifier Serpent192Cfb = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.24"); // Serpent-192-CFB
+ public static readonly DerObjectIdentifier Serpent256Ecb = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.41"); // Serpent-256-ECB
+ public static readonly DerObjectIdentifier Serpent256Cbc = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.42"); // Serpent-256-CBC
+ public static readonly DerObjectIdentifier Serpent256Ofb = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.43"); // Serpent-256-OFB
+ public static readonly DerObjectIdentifier Serpent256Cfb = new DerObjectIdentifier("1.3.6.1.4.1.11591.13.2.44"); // Serpent-256-CFB
+ public static readonly DerObjectIdentifier Crc = new DerObjectIdentifier("1.3.6.1.4.1.11591.14"); // CRC algorithms
+ public static readonly DerObjectIdentifier Crc32 = new DerObjectIdentifier("1.3.6.1.4.1.11591.14.1"); // CRC 32
+
+ /** 1.3.6.1.4.1.11591.15 - ellipticCurve */
+ public static readonly DerObjectIdentifier EllipticCurve = new DerObjectIdentifier("1.3.6.1.4.1.11591.15");
+
+ public static readonly DerObjectIdentifier Ed25519 = EllipticCurve.Branch("1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu/GNUObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu/GNUObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..8e07a74d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/gnu/GNUObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4376ce243d281454ea3ec0ebc759f9f2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana.meta
new file mode 100644
index 00000000..20062d1d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c9d033038e0d12244a24a4625ea3510d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana/IANAObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana/IANAObjectIdentifiers.cs
new file mode 100644
index 00000000..433e9cce
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana/IANAObjectIdentifiers.cs
@@ -0,0 +1,22 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Iana
+{
+ public abstract class IanaObjectIdentifiers
+ {
+ // id-SHA1 OBJECT IDENTIFIER ::=
+ // {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) ipsec(8) isakmpOakley(1)}
+ //
+
+ public static readonly DerObjectIdentifier IsakmpOakley = new DerObjectIdentifier("1.3.6.1.5.5.8.1");
+
+ public static readonly DerObjectIdentifier HmacMD5 = new DerObjectIdentifier(IsakmpOakley + ".1");
+ public static readonly DerObjectIdentifier HmacSha1 = new DerObjectIdentifier(IsakmpOakley + ".2");
+
+ public static readonly DerObjectIdentifier HmacTiger = new DerObjectIdentifier(IsakmpOakley + ".3");
+
+ public static readonly DerObjectIdentifier HmacRipeMD160 = new DerObjectIdentifier(IsakmpOakley + ".4");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana/IANAObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana/IANAObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..9ea49c79
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/iana/IANAObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a525be4db9035d24b9a04b721ce0eb4f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao.meta
new file mode 100644
index 00000000..be3eefff
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a822227ad184de545b619b843a09c3c2
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/CscaMasterList.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/CscaMasterList.cs
new file mode 100644
index 00000000..73013aa8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/CscaMasterList.cs
@@ -0,0 +1,87 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Icao
+{
+ /**
+ * The CscaMasterList object. This object can be wrapped in a
+ * CMSSignedData to be published in LDAP.
+ *
+ *
+ * CscaMasterList ::= SEQUENCE {
+ * version CscaMasterListVersion,
+ * certList SET OF Certificate }
+ *
+ * CscaMasterListVersion :: INTEGER {v0(0)}
+ *
+ */
+ public class CscaMasterList
+ : Asn1Encodable
+ {
+ private DerInteger version = new DerInteger(0);
+ private X509CertificateStructure[] certList;
+
+ public static CscaMasterList GetInstance(
+ object obj)
+ {
+ if (obj is CscaMasterList)
+ return (CscaMasterList)obj;
+
+ if (obj != null)
+ return new CscaMasterList(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private CscaMasterList(
+ Asn1Sequence seq)
+ {
+ if (seq == null || seq.Count == 0)
+ throw new ArgumentException("null or empty sequence passed.");
+
+ if (seq.Count != 2)
+ throw new ArgumentException("Incorrect sequence size: " + seq.Count);
+
+ this.version = DerInteger.GetInstance(seq[0]);
+
+ Asn1Set certSet = Asn1Set.GetInstance(seq[1]);
+
+ this.certList = new X509CertificateStructure[certSet.Count];
+ for (int i = 0; i < certList.Length; i++)
+ {
+ certList[i] = X509CertificateStructure.GetInstance(certSet[i]);
+ }
+ }
+
+ public CscaMasterList(
+ X509CertificateStructure[] certStructs)
+ {
+ certList = CopyCertList(certStructs);
+ }
+
+ public virtual int Version
+ {
+ get { return version.IntValueExact; }
+ }
+
+ public X509CertificateStructure[] GetCertStructs()
+ {
+ return CopyCertList(certList);
+ }
+
+ private static X509CertificateStructure[] CopyCertList(X509CertificateStructure[] orig)
+ {
+ return (X509CertificateStructure[])orig.Clone();
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(version, new DerSet(certList));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/CscaMasterList.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/CscaMasterList.cs.meta
new file mode 100644
index 00000000..b13ee47a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/CscaMasterList.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f5d7fe5ed16a1714997106a145af7c88
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/DataGroupHash.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/DataGroupHash.cs
new file mode 100644
index 00000000..ccb3b522
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/DataGroupHash.cs
@@ -0,0 +1,85 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Icao
+{
+ /**
+ * The DataGroupHash object.
+ *
+ * DataGroupHash ::= SEQUENCE {
+ * dataGroupNumber DataGroupNumber,
+ * dataGroupHashValue OCTET STRING }
+ *
+ * DataGroupNumber ::= INTEGER {
+ * dataGroup1 (1),
+ * dataGroup1 (2),
+ * dataGroup1 (3),
+ * dataGroup1 (4),
+ * dataGroup1 (5),
+ * dataGroup1 (6),
+ * dataGroup1 (7),
+ * dataGroup1 (8),
+ * dataGroup1 (9),
+ * dataGroup1 (10),
+ * dataGroup1 (11),
+ * dataGroup1 (12),
+ * dataGroup1 (13),
+ * dataGroup1 (14),
+ * dataGroup1 (15),
+ * dataGroup1 (16) }
+ *
+ *
+ */
+ public class DataGroupHash
+ : Asn1Encodable
+ {
+ private readonly DerInteger dataGroupNumber;
+ private readonly Asn1OctetString dataGroupHashValue;
+
+ public static DataGroupHash GetInstance(object obj)
+ {
+ if (obj is DataGroupHash)
+ return (DataGroupHash)obj;
+
+ if (obj != null)
+ return new DataGroupHash(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private DataGroupHash(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.dataGroupNumber = DerInteger.GetInstance(seq[0]);
+ this.dataGroupHashValue = Asn1OctetString.GetInstance(seq[1]);
+ }
+
+ public DataGroupHash(
+ int dataGroupNumber,
+ Asn1OctetString dataGroupHashValue)
+ {
+ this.dataGroupNumber = new DerInteger(dataGroupNumber);
+ this.dataGroupHashValue = dataGroupHashValue;
+ }
+
+ public int DataGroupNumber
+ {
+ get { return dataGroupNumber.IntValueExact; }
+ }
+
+ public Asn1OctetString DataGroupHashValue
+ {
+ get { return dataGroupHashValue; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(dataGroupNumber, dataGroupHashValue);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/DataGroupHash.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/DataGroupHash.cs.meta
new file mode 100644
index 00000000..e816c91b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/DataGroupHash.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6b508919f8fc8bd49acad65a6400ae3d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/ICAOObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/ICAOObjectIdentifiers.cs
new file mode 100644
index 00000000..0573b1da
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/ICAOObjectIdentifiers.cs
@@ -0,0 +1,38 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Icao
+{
+ public abstract class IcaoObjectIdentifiers
+ {
+ //
+ // base id
+ //
+ public static readonly DerObjectIdentifier IdIcao = new DerObjectIdentifier("2.23.136");
+
+ public static readonly DerObjectIdentifier IdIcaoMrtd = IdIcao.Branch("1");
+ public static readonly DerObjectIdentifier IdIcaoMrtdSecurity = IdIcaoMrtd.Branch("1");
+
+ // LDS security object, see ICAO Doc 9303-Volume 2-Section IV-A3.2
+ public static readonly DerObjectIdentifier IdIcaoLdsSecurityObject = IdIcaoMrtdSecurity.Branch("1");
+
+ // CSCA master list, see TR CSCA Countersigning and Master List issuance
+ public static readonly DerObjectIdentifier IdIcaoCscaMasterList = IdIcaoMrtdSecurity.Branch("2");
+ public static readonly DerObjectIdentifier IdIcaoCscaMasterListSigningKey = IdIcaoMrtdSecurity.Branch("3");
+
+ // document type list, see draft TR LDS and PKI Maintenance, par. 3.2.1
+ public static readonly DerObjectIdentifier IdIcaoDocumentTypeList = IdIcaoMrtdSecurity.Branch("4");
+
+ // Active Authentication protocol, see draft TR LDS and PKI Maintenance,
+ // par. 5.2.2
+ public static readonly DerObjectIdentifier IdIcaoAAProtocolObject = IdIcaoMrtdSecurity.Branch("5");
+
+ // CSCA name change and key reoll-over, see draft TR LDS and PKI
+ // Maintenance, par. 3.2.1
+ public static readonly DerObjectIdentifier IdIcaoExtensions = IdIcaoMrtdSecurity.Branch("6");
+ public static readonly DerObjectIdentifier IdIcaoExtensionsNamechangekeyrollover = IdIcaoExtensions.Branch("1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/ICAOObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/ICAOObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..289b99cf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/ICAOObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d745e3b72aeb38e4f9740ac8712594f0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSSecurityObject.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSSecurityObject.cs
new file mode 100644
index 00000000..23e24e84
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSSecurityObject.cs
@@ -0,0 +1,140 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Icao
+{
+ /**
+ * The LDSSecurityObject object (V1.8).
+ *
+ * LDSSecurityObject ::= SEQUENCE {
+ * version LDSSecurityObjectVersion,
+ * hashAlgorithm DigestAlgorithmIdentifier,
+ * dataGroupHashValues SEQUENCE SIZE (2..ub-DataGroups) OF DataHashGroup,
+ * ldsVersionInfo LDSVersionInfo OPTIONAL
+ * -- if present, version MUST be v1 }
+ *
+ * DigestAlgorithmIdentifier ::= AlgorithmIdentifier,
+ *
+ * LDSSecurityObjectVersion :: INTEGER {V0(0)}
+ *
+ */
+ public class LdsSecurityObject
+ : Asn1Encodable
+ {
+ public const int UBDataGroups = 16;
+
+ private DerInteger version = new DerInteger(0);
+ private AlgorithmIdentifier digestAlgorithmIdentifier;
+ private DataGroupHash[] datagroupHash;
+ private LdsVersionInfo versionInfo;
+
+ public static LdsSecurityObject GetInstance(object obj)
+ {
+ if (obj is LdsSecurityObject)
+ return (LdsSecurityObject)obj;
+
+ if (obj != null)
+ return new LdsSecurityObject(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private LdsSecurityObject(Asn1Sequence seq)
+ {
+ if (seq == null || seq.Count == 0)
+ throw new ArgumentException("null or empty sequence passed.");
+
+ var e = seq.GetEnumerator();
+
+ // version
+ e.MoveNext();
+ version = DerInteger.GetInstance(e.Current);
+ // digestAlgorithmIdentifier
+ e.MoveNext();
+ digestAlgorithmIdentifier = AlgorithmIdentifier.GetInstance(e.Current);
+
+ e.MoveNext();
+ Asn1Sequence datagroupHashSeq = Asn1Sequence.GetInstance(e.Current);
+
+ if (version.HasValue(1))
+ {
+ e.MoveNext();
+ versionInfo = LdsVersionInfo.GetInstance(e.Current);
+ }
+
+ CheckDatagroupHashSeqSize(datagroupHashSeq.Count);
+
+ datagroupHash = new DataGroupHash[datagroupHashSeq.Count];
+ for (int i= 0; i< datagroupHashSeq.Count; i++)
+ {
+ datagroupHash[i] = DataGroupHash.GetInstance(datagroupHashSeq[i]);
+ }
+ }
+
+ public LdsSecurityObject(
+ AlgorithmIdentifier digestAlgorithmIdentifier,
+ DataGroupHash[] datagroupHash)
+ {
+ this.version = new DerInteger(0);
+ this.digestAlgorithmIdentifier = digestAlgorithmIdentifier;
+ this.datagroupHash = datagroupHash;
+
+ CheckDatagroupHashSeqSize(datagroupHash.Length);
+ }
+
+
+ public LdsSecurityObject(
+ AlgorithmIdentifier digestAlgorithmIdentifier,
+ DataGroupHash[] datagroupHash,
+ LdsVersionInfo versionInfo)
+ {
+ this.version = new DerInteger(1);
+ this.digestAlgorithmIdentifier = digestAlgorithmIdentifier;
+ this.datagroupHash = datagroupHash;
+ this.versionInfo = versionInfo;
+
+ CheckDatagroupHashSeqSize(datagroupHash.Length);
+ }
+
+ private void CheckDatagroupHashSeqSize(int size)
+ {
+ if (size < 2 || size > UBDataGroups)
+ throw new ArgumentException("wrong size in DataGroupHashValues : not in (2.."+ UBDataGroups +")");
+ }
+
+ public BigInteger Version
+ {
+ get { return version.Value; }
+ }
+
+ public AlgorithmIdentifier DigestAlgorithmIdentifier
+ {
+ get { return digestAlgorithmIdentifier; }
+ }
+
+ public DataGroupHash[] GetDatagroupHash()
+ {
+ return datagroupHash;
+ }
+
+ public LdsVersionInfo VersionInfo
+ {
+ get { return versionInfo; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ DerSequence hashSeq = new DerSequence(datagroupHash);
+
+ Asn1EncodableVector v = new Asn1EncodableVector(version, digestAlgorithmIdentifier, hashSeq);
+ v.AddOptional(versionInfo);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSSecurityObject.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSSecurityObject.cs.meta
new file mode 100644
index 00000000..a4d0cd20
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSSecurityObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 13e76aa13a3a04d41ad37460d35c2c7c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSVersionInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSVersionInfo.cs
new file mode 100644
index 00000000..2eb805a5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSVersionInfo.cs
@@ -0,0 +1,65 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Icao
+{
+ public class LdsVersionInfo
+ : Asn1Encodable
+ {
+ private DerPrintableString ldsVersion;
+ private DerPrintableString unicodeVersion;
+
+ public LdsVersionInfo(string ldsVersion, string unicodeVersion)
+ {
+ this.ldsVersion = new DerPrintableString(ldsVersion);
+ this.unicodeVersion = new DerPrintableString(unicodeVersion);
+ }
+
+ private LdsVersionInfo(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("sequence wrong size for LDSVersionInfo", "seq");
+
+ this.ldsVersion = DerPrintableString.GetInstance(seq[0]);
+ this.unicodeVersion = DerPrintableString.GetInstance(seq[1]);
+ }
+
+ public static LdsVersionInfo GetInstance(object obj)
+ {
+ if (obj is LdsVersionInfo)
+ return (LdsVersionInfo)obj;
+
+ if (obj != null)
+ return new LdsVersionInfo(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public virtual string GetLdsVersion()
+ {
+ return ldsVersion.GetString();
+ }
+
+ public virtual string GetUnicodeVersion()
+ {
+ return unicodeVersion.GetString();
+ }
+
+ /**
+ *
+ * LDSVersionInfo ::= SEQUENCE {
+ * ldsVersion PRINTABLE STRING
+ * unicodeVersion PRINTABLE STRING
+ * }
+ *
+ * @return
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(ldsVersion, unicodeVersion);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSVersionInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSVersionInfo.cs.meta
new file mode 100644
index 00000000..6d502ac5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/icao/LDSVersionInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a19ff095474efdb41945f53a3cd467eb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt.meta
new file mode 100644
index 00000000..a569f3cc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 438c1c315dbc0594c8c4be527c4945d5
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ISISMTTObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ISISMTTObjectIdentifiers.cs
new file mode 100644
index 00000000..ca243659
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ISISMTTObjectIdentifiers.cs
@@ -0,0 +1,181 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt
+{
+ public abstract class IsisMttObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier IdIsisMtt = new DerObjectIdentifier("1.3.36.8");
+
+ public static readonly DerObjectIdentifier IdIsisMttCP = new DerObjectIdentifier(IdIsisMtt + ".1");
+
+ /**
+ * The id-isismtt-cp-accredited OID indicates that the certificate is a
+ * qualified certificate according to Directive 1999/93/EC of the European
+ * Parliament and of the Council of 13 December 1999 on a Community
+ * Framework for Electronic Signatures, which additionally conforms the
+ * special requirements of the SigG and has been issued by an accredited CA.
+ */
+ public static readonly DerObjectIdentifier IdIsisMttCPAccredited = new DerObjectIdentifier(IdIsisMttCP + ".1");
+
+ public static readonly DerObjectIdentifier IdIsisMttAT = new DerObjectIdentifier(IdIsisMtt + ".3");
+
+ /**
+ * Certificate extensionDate of certificate generation
+ *
+ *
+ * DateOfCertGenSyntax ::= GeneralizedTime
+ *
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATDateOfCertGen = new DerObjectIdentifier(IdIsisMttAT + ".1");
+
+ /**
+ * Attribute to indicate that the certificate holder may sign in the name of
+ * a third person. May also be used as extension in a certificate.
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATProcuration = new DerObjectIdentifier(IdIsisMttAT + ".2");
+
+ /**
+ * Attribute to indicate admissions to certain professions. May be used as
+ * attribute in attribute certificate or as extension in a certificate
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATAdmission = new DerObjectIdentifier(IdIsisMttAT + ".3");
+
+ /**
+ * Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST
+ * be used in new certificates in place of the extension/attribute
+ * MonetaryLimit since January 1, 2004. For the sake of backward
+ * compatibility with certificates already in use, SigG conforming
+ * components MUST support MonetaryLimit (as well as QcEuLimitValue).
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATMonetaryLimit = new DerObjectIdentifier(IdIsisMttAT + ".4");
+
+ /**
+ * A declaration of majority. May be used as attribute in attribute
+ * certificate or as extension in a certificate
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATDeclarationOfMajority = new DerObjectIdentifier(IdIsisMttAT + ".5");
+
+ /**
+ *
+ * Serial number of the smart card containing the corresponding private key
+ *
+ *
+ * ICCSNSyntax ::= OCTET STRING (SIZE(8..20))
+ *
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATIccsn = new DerObjectIdentifier(IdIsisMttAT + ".6");
+
+ /**
+ *
+ * Reference for a file of a smartcard that stores the public key of this
+ * certificate and that is used as �security anchor�.
+ *
+ *
+ * PKReferenceSyntax ::= OCTET STRING (SIZE(20))
+ *
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATPKReference = new DerObjectIdentifier(IdIsisMttAT + ".7");
+
+ /**
+ * Some other restriction regarding the usage of this certificate. May be
+ * used as attribute in attribute certificate or as extension in a
+ * certificate.
+ *
+ *
+ * RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+ *
+ *
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.Restriction
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATRestriction = new DerObjectIdentifier(IdIsisMttAT + ".8");
+
+ /**
+ *
+ * (Single)Request extension: Clients may include this extension in a
+ * (single) Request to request the responder to send the certificate in the
+ * response message along with the status information. Besides the LDAP
+ * service, this extension provides another mechanism for the distribution
+ * of certificates, which MAY optionally be provided by certificate
+ * repositories.
+ *
+ *
+ * RetrieveIfAllowed ::= BOOLEAN
+ *
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATRetrieveIfAllowed = new DerObjectIdentifier(IdIsisMttAT + ".9");
+
+ /**
+ * SingleOCSPResponse extension: The certificate requested by the client by
+ * inserting the RetrieveIfAllowed extension in the request, will be
+ * returned in this extension.
+ *
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATRequestedCertificate = new DerObjectIdentifier(IdIsisMttAT + ".10");
+
+ /**
+ * Base ObjectIdentifier for naming authorities
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATNamingAuthorities = new DerObjectIdentifier(IdIsisMttAT + ".11");
+
+ /**
+ * SingleOCSPResponse extension: Date, when certificate has been published
+ * in the directory and status information has become available. Currently,
+ * accrediting authorities enforce that SigG-conforming OCSP servers include
+ * this extension in the responses.
+ *
+ *
+ * CertInDirSince ::= GeneralizedTime
+ *
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATCertInDirSince = new DerObjectIdentifier(IdIsisMttAT + ".12");
+
+ /**
+ * Hash of a certificate in OCSP.
+ *
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.Ocsp.CertHash
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATCertHash = new DerObjectIdentifier(IdIsisMttAT + ".13");
+
+ /**
+ *
+ * NameAtBirth ::= DirectoryString(SIZE(1..64)
+ *
+ *
+ * Used in
+ * {@link Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectDirectoryAttributes SubjectDirectoryAttributes}
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATNameAtBirth = new DerObjectIdentifier(IdIsisMttAT + ".14");
+
+ /**
+ * Some other information of non-restrictive nature regarding the usage of
+ * this certificate. May be used as attribute in atribute certificate or as
+ * extension in a certificate.
+ *
+ *
+ * AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+ *
+ *
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.AdditionalInformationSyntax
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATAdditionalInformation = new DerObjectIdentifier(IdIsisMttAT + ".15");
+
+ /**
+ * Indicates that an attribute certificate exists, which limits the
+ * usability of this public key certificate. Whenever verifying a signature
+ * with the help of this certificate, the content of the corresponding
+ * attribute certificate should be concerned. This extension MUST be
+ * included in a PKC, if a corresponding attribute certificate (having the
+ * PKC as base certificate) contains some attribute that restricts the
+ * usability of the PKC too. Attribute certificates with restricting content
+ * MUST always be included in the signed document.
+ *
+ *
+ * LiabilityLimitationFlagSyntax ::= BOOLEAN
+ *
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATLiabilityLimitationFlag = new DerObjectIdentifier("0.2.262.1.10.12.0");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ISISMTTObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ISISMTTObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..2c76ec4e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ISISMTTObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c31166856664b3747998adc8ca633035
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp.meta
new file mode 100644
index 00000000..bb71f39d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 56e51b11b6318274eaa908006ec522b6
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/CertHash.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/CertHash.cs
new file mode 100644
index 00000000..ce464f2b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/CertHash.cs
@@ -0,0 +1,126 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.Ocsp
+{
+ /**
+ * ISIS-MTT PROFILE: The responder may include this extension in a response to
+ * send the hash of the requested certificate to the responder. This hash is
+ * cryptographically bound to the certificate and serves as evidence that the
+ * certificate is known to the responder (i.e. it has been issued and is present
+ * in the directory). Hence, this extension is a means to provide a positive
+ * statement of availability as described in T8.[8]. As explained in T13.[1],
+ * clients may rely on this information to be able to validate signatures after
+ * the expiry of the corresponding certificate. Hence, clients MUST support this
+ * extension. If a positive statement of availability is to be delivered, this
+ * extension syntax and OID MUST be used.
+ *
+ *
+ *
+ * CertHash ::= SEQUENCE {
+ * hashAlgorithm AlgorithmIdentifier,
+ * certificateHash OCTET STRING
+ * }
+ *
+ */
+ public class CertHash
+ : Asn1Encodable
+ {
+ private readonly AlgorithmIdentifier hashAlgorithm;
+ private readonly byte[] certificateHash;
+
+ public static CertHash GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CertHash)
+ {
+ return (CertHash) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new CertHash((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * The sequence is of type CertHash:
+ *
+ *
+ * CertHash ::= SEQUENCE {
+ * hashAlgorithm AlgorithmIdentifier,
+ * certificateHash OCTET STRING
+ * }
+ *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private CertHash(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ this.hashAlgorithm = AlgorithmIdentifier.GetInstance(seq[0]);
+ this.certificateHash = DerOctetString.GetInstance(seq[1]).GetOctets();
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * @param hashAlgorithm The hash algorithm identifier.
+ * @param certificateHash The hash of the whole DER encoding of the certificate.
+ */
+ public CertHash(
+ AlgorithmIdentifier hashAlgorithm,
+ byte[] certificateHash)
+ {
+ if (hashAlgorithm == null)
+ throw new ArgumentNullException("hashAlgorithm");
+ if (certificateHash == null)
+ throw new ArgumentNullException("certificateHash");
+
+ this.hashAlgorithm = hashAlgorithm;
+ this.certificateHash = (byte[]) certificateHash.Clone();
+ }
+
+ public AlgorithmIdentifier HashAlgorithm
+ {
+ get { return hashAlgorithm; }
+ }
+
+ public byte[] CertificateHash
+ {
+ get { return (byte[]) certificateHash.Clone(); }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * CertHash ::= SEQUENCE {
+ * hashAlgorithm AlgorithmIdentifier,
+ * certificateHash OCTET STRING
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(hashAlgorithm, new DerOctetString(certificateHash));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/CertHash.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/CertHash.cs.meta
new file mode 100644
index 00000000..03c5571c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/CertHash.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c599f67230568ed46878473f19edc18c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/RequestedCertificate.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/RequestedCertificate.cs
new file mode 100644
index 00000000..605fc102
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/RequestedCertificate.cs
@@ -0,0 +1,192 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.Ocsp
+{
+ /**
+ * ISIS-MTT-Optional: The certificate requested by the client by inserting the
+ * RetrieveIfAllowed extension in the request, will be returned in this
+ * extension.
+ *
+ * ISIS-MTT-SigG: The signature act allows publishing certificates only then,
+ * when the certificate owner gives his isExplicit permission. Accordingly, there
+ * may be �nondownloadable� certificates, about which the responder must provide
+ * status information, but MUST NOT include them in the response. Clients may
+ * get therefore the following three kind of answers on a single request
+ * including the RetrieveIfAllowed extension:
+ *
+ * a) the responder supports the extension and is allowed to publish the
+ * certificate: RequestedCertificate returned including the requested
+ * certificate
+ * b) the responder supports the extension but is NOT allowed to publish
+ * the certificate: RequestedCertificate returned including an empty OCTET
+ * STRING
+ * c) the responder does not support the extension: RequestedCertificate is
+ * not included in the response
+ *
+ * Clients requesting RetrieveIfAllowed MUST be able to handle these cases. If
+ * any of the OCTET STRING options is used, it MUST contain the DER encoding of
+ * the requested certificate.
+ *
+ *
+ * RequestedCertificate ::= CHOICE {
+ * Certificate Certificate,
+ * publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ * attributeCertificate [1] EXPLICIT OCTET STRING
+ * }
+ *
+ */
+ public class RequestedCertificate
+ : Asn1Encodable, IAsn1Choice
+ {
+ public enum Choice
+ {
+ Certificate = -1,
+ PublicKeyCertificate = 0,
+ AttributeCertificate = 1
+ }
+
+ private readonly X509CertificateStructure cert;
+ private readonly byte[] publicKeyCert;
+ private readonly byte[] attributeCert;
+
+ public static RequestedCertificate GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is RequestedCertificate)
+ {
+ return (RequestedCertificate) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new RequestedCertificate(X509CertificateStructure.GetInstance(obj));
+ }
+
+ if (obj is Asn1TaggedObject)
+ {
+ return new RequestedCertificate((Asn1TaggedObject) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static RequestedCertificate GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ if (!isExplicit)
+ throw new ArgumentException("choice item must be explicitly tagged");
+
+ return GetInstance(obj.GetObject());
+ }
+
+ private RequestedCertificate(
+ Asn1TaggedObject tagged)
+ {
+ switch ((Choice) tagged.TagNo)
+ {
+ case Choice.AttributeCertificate:
+ this.attributeCert = Asn1OctetString.GetInstance(tagged, true).GetOctets();
+ break;
+ case Choice.PublicKeyCertificate:
+ this.publicKeyCert = Asn1OctetString.GetInstance(tagged, true).GetOctets();
+ break;
+ default:
+ throw new ArgumentException("unknown tag number: " + tagged.TagNo);
+ }
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * Only one parameter can be given. All other must be null.
+ *
+ * @param certificate Given as Certificate
+ */
+ public RequestedCertificate(
+ X509CertificateStructure certificate)
+ {
+ this.cert = certificate;
+ }
+
+ public RequestedCertificate(
+ Choice type,
+ byte[] certificateOctets)
+ : this(new DerTaggedObject((int) type, new DerOctetString(certificateOctets)))
+ {
+ }
+
+ public Choice Type
+ {
+ get
+ {
+ if (cert != null)
+ return Choice.Certificate;
+
+ if (publicKeyCert != null)
+ return Choice.PublicKeyCertificate;
+
+ return Choice.AttributeCertificate;
+ }
+ }
+
+ public byte[] GetCertificateBytes()
+ {
+ if (cert != null)
+ {
+ try
+ {
+ return cert.GetEncoded();
+ }
+ catch (IOException e)
+ {
+ throw new InvalidOperationException("can't decode certificate: " + e);
+ }
+ }
+
+ if (publicKeyCert != null)
+ return publicKeyCert;
+
+ return attributeCert;
+ }
+
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * RequestedCertificate ::= CHOICE {
+ * Certificate Certificate,
+ * publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ * attributeCertificate [1] EXPLICIT OCTET STRING
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (publicKeyCert != null)
+ {
+ return new DerTaggedObject(0, new DerOctetString(publicKeyCert));
+ }
+
+ if (attributeCert != null)
+ {
+ return new DerTaggedObject(1, new DerOctetString(attributeCert));
+ }
+
+ return cert.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/RequestedCertificate.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/RequestedCertificate.cs.meta
new file mode 100644
index 00000000..e2693528
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/ocsp/RequestedCertificate.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ba2458c8f5cf77542a823ec99589d785
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509.meta
new file mode 100644
index 00000000..2c142700
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 3496fc8fa36fe3946931a61e02e78f0d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdditionalInformationSyntax.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdditionalInformationSyntax.cs
new file mode 100644
index 00000000..64c37d0c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdditionalInformationSyntax.cs
@@ -0,0 +1,75 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509
+{
+ /**
+ * Some other information of non-restrictive nature regarding the usage of this
+ * certificate.
+ *
+ *
+ * AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+ *
+ */
+ public class AdditionalInformationSyntax
+ : Asn1Encodable
+ {
+ private readonly DirectoryString information;
+
+ public static AdditionalInformationSyntax GetInstance(
+ object obj)
+ {
+ if (obj is AdditionalInformationSyntax)
+ return (AdditionalInformationSyntax) obj;
+
+ if (obj is IAsn1String)
+ return new AdditionalInformationSyntax(DirectoryString.GetInstance(obj));
+
+ throw new ArgumentException("Unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private AdditionalInformationSyntax(
+ DirectoryString information)
+ {
+ this.information = information;
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * @param information The describtion of the information.
+ */
+ public AdditionalInformationSyntax(
+ string information)
+ {
+ this.information = new DirectoryString(information);
+ }
+
+ public virtual DirectoryString Information
+ {
+ get { return information; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return information.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdditionalInformationSyntax.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdditionalInformationSyntax.cs.meta
new file mode 100644
index 00000000..b226caf2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdditionalInformationSyntax.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5d06e00a692047041bc68c25afa2929e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs
new file mode 100644
index 00000000..b0d22cda
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs
@@ -0,0 +1,279 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509
+{
+ /**
+ * Attribute to indicate admissions to certain professions.
+ *
+ *
+ * AdmissionSyntax ::= SEQUENCE
+ * {
+ * admissionAuthority GeneralName OPTIONAL,
+ * contentsOfAdmissions SEQUENCE OF Admissions
+ * }
+ *
+ * Admissions ::= SEQUENCE
+ * {
+ * admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ * namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ * professionInfos SEQUENCE OF ProfessionInfo
+ * }
+ *
+ * NamingAuthority ::= SEQUENCE
+ * {
+ * namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ * namingAuthorityUrl IA5String OPTIONAL,
+ * namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ * }
+ *
+ * ProfessionInfo ::= SEQUENCE
+ * {
+ * namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ * professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ * professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ * registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ * addProfessionInfo OCTET STRING OPTIONAL
+ * }
+ *
+ *
+ *
+ * ISIS-MTT PROFILE: The relatively complex structure of AdmissionSyntax
+ * supports the following concepts and requirements:
+ *
+ * External institutions (e.g. professional associations, chambers, unions,
+ * administrative bodies, companies, etc.), which are responsible for granting
+ * and verifying professional admissions, are indicated by means of the data
+ * field admissionAuthority. An admission authority is indicated by a
+ * GeneralName object. Here an X.501 directory name (distinguished name) can be
+ * indicated in the field directoryName, a URL address can be indicated in the
+ * field uniformResourceIdentifier, and an object identifier can be indicated in
+ * the field registeredId.
+ * The names of authorities which are responsible for the administration of
+ * title registers are indicated in the data field namingAuthority. The name of
+ * the authority can be identified by an object identifier in the field
+ * namingAuthorityId, by means of a text string in the field
+ * namingAuthorityText, by means of a URL address in the field
+ * namingAuthorityUrl, or by a combination of them. For example, the text string
+ * can contain the name of the authority, the country and the name of the title
+ * register. The URL-option refers to a web page which contains lists with
+ * officially registered professions (text and possibly OID) as well as
+ * further information on these professions. Object identifiers for the
+ * component namingAuthorityId are grouped under the OID-branch
+ * id-isis-at-namingAuthorities and must be applied for.
+ * See http://www.teletrust.de/anwend.asp?Id=30200&Sprache=E_&HomePG=0
+ * for an application form and http://www.teletrust.de/links.asp?id=30220,11
+ * for an overview of registered naming authorities.
+ * By means of the data type ProfessionInfo certain professions,
+ * specializations, disciplines, fields of activity, etc. are identified. A
+ * profession is represented by one or more text strings, resp. profession OIDs
+ * in the fields professionItems and professionOIDs and by a registration number
+ * in the field registrationNumber. An indication in text form must always be
+ * present, whereas the other indications are optional. The component
+ * addProfessionInfo may contain additional applicationspecific information in
+ * DER-encoded form.
+ *
+ *
+ * By means of different namingAuthority-OIDs or profession OIDs hierarchies of
+ * professions, specializations, disciplines, fields of activity, etc. can be
+ * expressed. The issuing admission authority should always be indicated (field
+ * admissionAuthority), whenever a registration number is presented. Still,
+ * information on admissions can be given without indicating an admission or a
+ * naming authority by the exclusive use of the component professionItems. In
+ * this case the certification authority is responsible for the verification of
+ * the admission information.
+ *
+ *
+ *
+ * This attribute is single-valued. Still, several admissions can be captured in
+ * the sequence structure of the component contentsOfAdmissions of
+ * AdmissionSyntax or in the component professionInfos of Admissions. The
+ * component admissionAuthority of AdmissionSyntax serves as default value for
+ * the component admissionAuthority of Admissions. Within the latter component
+ * the default value can be overwritten, in case that another authority is
+ * responsible. The component namingAuthority of Admissions serves as a default
+ * value for the component namingAuthority of ProfessionInfo. Within the latter
+ * component the default value can be overwritten, in case that another naming
+ * authority needs to be recorded.
+ *
+ * The length of the string objects is limited to 128 characters. It is
+ * recommended to indicate a namingAuthorityURL in all issued attribute
+ * certificates. If a namingAuthorityURL is indicated, the field professionItems
+ * of ProfessionInfo should contain only registered titles. If the field
+ * professionOIDs exists, it has to contain the OIDs of the professions listed
+ * in professionItems in the same order. In general, the field professionInfos
+ * should contain only one entry, unless the admissions that are to be listed
+ * are logically connected (e.g. they have been issued under the same admission
+ * number).
+ *
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.Admissions
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+ */
+ public class AdmissionSyntax
+ : Asn1Encodable
+ {
+ private readonly GeneralName admissionAuthority;
+ private readonly Asn1Sequence contentsOfAdmissions;
+
+ public static AdmissionSyntax GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is AdmissionSyntax)
+ {
+ return (AdmissionSyntax)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new AdmissionSyntax((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * The sequence is of type ProcurationSyntax:
+ *
+ *
+ * AdmissionSyntax ::= SEQUENCE
+ * {
+ * admissionAuthority GeneralName OPTIONAL,
+ * contentsOfAdmissions SEQUENCE OF Admissions
+ * }
+ *
+ * Admissions ::= SEQUENCE
+ * {
+ * admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ * namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ * professionInfos SEQUENCE OF ProfessionInfo
+ * }
+ *
+ * NamingAuthority ::= SEQUENCE
+ * {
+ * namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ * namingAuthorityUrl IA5String OPTIONAL,
+ * namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ * }
+ *
+ * ProfessionInfo ::= SEQUENCE
+ * {
+ * namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ * professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ * professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ * registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ * addProfessionInfo OCTET STRING OPTIONAL
+ * }
+ *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private AdmissionSyntax(
+ Asn1Sequence seq)
+ {
+ switch (seq.Count)
+ {
+ case 1:
+ this.contentsOfAdmissions = DerSequence.GetInstance(seq[0]);
+ break;
+ case 2:
+ admissionAuthority = GeneralName.GetInstance(seq[0]);
+ contentsOfAdmissions = DerSequence.GetInstance(seq[1]);
+ break;
+ default:
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+ }
+
+ /**
+ * Constructor from given details.
+ *
+ * @param admissionAuthority The admission authority.
+ * @param contentsOfAdmissions The admissions.
+ */
+ public AdmissionSyntax(
+ GeneralName admissionAuthority,
+ Asn1Sequence contentsOfAdmissions)
+ {
+ this.admissionAuthority = admissionAuthority;
+ this.contentsOfAdmissions = contentsOfAdmissions;
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * AdmissionSyntax ::= SEQUENCE
+ * {
+ * admissionAuthority GeneralName OPTIONAL,
+ * contentsOfAdmissions SEQUENCE OF Admissions
+ * }
+ *
+ * Admissions ::= SEQUENCE
+ * {
+ * admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ * namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ * professionInfos SEQUENCE OF ProfessionInfo
+ * }
+ *
+ * NamingAuthority ::= SEQUENCE
+ * {
+ * namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ * namingAuthorityUrl IA5String OPTIONAL,
+ * namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ * }
+ *
+ * ProfessionInfo ::= SEQUENCE
+ * {
+ * namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ * professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ * professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ * registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ * addProfessionInfo OCTET STRING OPTIONAL
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(admissionAuthority);
+ v.Add(contentsOfAdmissions);
+ return new DerSequence(v);
+ }
+
+ /**
+ * @return Returns the admissionAuthority if present, null otherwise.
+ */
+ public virtual GeneralName AdmissionAuthority
+ {
+ get { return admissionAuthority; }
+ }
+
+ /**
+ * @return Returns the contentsOfAdmissions.
+ */
+ public virtual Admissions[] GetContentsOfAdmissions()
+ {
+ Admissions[] result = new Admissions[contentsOfAdmissions.Count];
+
+ for (int i = 0; i < contentsOfAdmissions.Count; ++i)
+ {
+ result[i] = Admissions.GetInstance(contentsOfAdmissions[i]);
+ }
+
+ return result;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs.meta
new file mode 100644
index 00000000..e99745b1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9585d9a3646432b498c88670026b6b1c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Admissions.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Admissions.cs
new file mode 100644
index 00000000..4267bec9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Admissions.cs
@@ -0,0 +1,174 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509
+{
+ /**
+ * An Admissions structure.
+ *
+ *
+ * Admissions ::= SEQUENCE
+ * {
+ * admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ * namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ * professionInfos SEQUENCE OF ProfessionInfo
+ * }
+ *
+ *
+ *
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+ */
+ public class Admissions
+ : Asn1Encodable
+ {
+ private readonly GeneralName admissionAuthority;
+ private readonly NamingAuthority namingAuthority;
+ private readonly Asn1Sequence professionInfos;
+
+ public static Admissions GetInstance(object obj)
+ {
+ if (obj == null || obj is Admissions)
+ return (Admissions)obj;
+
+ if (obj is Asn1Sequence seq)
+ return new Admissions(seq);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * The sequence is of type ProcurationSyntax:
+ *
+ *
+ * Admissions ::= SEQUENCE
+ * {
+ * admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ * namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ * professionInfos SEQUENCE OF ProfessionInfo
+ * }
+ *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private Admissions(Asn1Sequence seq)
+ {
+ if (seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ var e = seq.GetEnumerator();
+
+ e.MoveNext();
+ Asn1Encodable o = e.Current;
+ if (o is Asn1TaggedObject tagged1)
+ {
+ switch (tagged1.TagNo)
+ {
+ case 0:
+ admissionAuthority = GeneralName.GetInstance((Asn1TaggedObject)o, true);
+ break;
+ case 1:
+ namingAuthority = NamingAuthority.GetInstance((Asn1TaggedObject)o, true);
+ break;
+ default:
+ throw new ArgumentException("Bad tag number: " + ((Asn1TaggedObject)o).TagNo);
+ }
+ e.MoveNext();
+ o = e.Current;
+ }
+ if (o is Asn1TaggedObject tagged2)
+ {
+ switch (tagged2.TagNo)
+ {
+ case 1:
+ namingAuthority = NamingAuthority.GetInstance((Asn1TaggedObject)o, true);
+ break;
+ default:
+ throw new ArgumentException("Bad tag number: " + ((Asn1TaggedObject)o).TagNo);
+ }
+ e.MoveNext();
+ o = e.Current;
+ }
+ professionInfos = Asn1Sequence.GetInstance(o);
+ if (e.MoveNext())
+ {
+ throw new ArgumentException("Bad object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(e.Current));
+ }
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * Parameter professionInfos is mandatory.
+ *
+ * @param admissionAuthority The admission authority.
+ * @param namingAuthority The naming authority.
+ * @param professionInfos The profession infos.
+ */
+ public Admissions(
+ GeneralName admissionAuthority,
+ NamingAuthority namingAuthority,
+ ProfessionInfo[] professionInfos)
+ {
+ this.admissionAuthority = admissionAuthority;
+ this.namingAuthority = namingAuthority;
+ this.professionInfos = new DerSequence(professionInfos);
+ }
+
+ public virtual GeneralName AdmissionAuthority
+ {
+ get { return admissionAuthority; }
+ }
+
+ public virtual NamingAuthority NamingAuthority
+ {
+ get { return namingAuthority; }
+ }
+
+ public ProfessionInfo[] GetProfessionInfos()
+ {
+ ProfessionInfo[] infos = new ProfessionInfo[professionInfos.Count];
+ int count = 0;
+ foreach (Asn1Encodable ae in professionInfos)
+ {
+ infos[count++] = ProfessionInfo.GetInstance(ae);
+ }
+ return infos;
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * Admissions ::= SEQUENCE
+ * {
+ * admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ * namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ * professionInfos SEQUENCE OF ProfessionInfo
+ * }
+ *
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, admissionAuthority);
+ v.AddOptionalTagged(true, 1, namingAuthority);
+ v.Add(professionInfos);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Admissions.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Admissions.cs.meta
new file mode 100644
index 00000000..05b19a7f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Admissions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e7a8122cc5f09da46b019dbd4bb8a39e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/DeclarationOfMajority.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/DeclarationOfMajority.cs
new file mode 100644
index 00000000..2e95e90a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/DeclarationOfMajority.cs
@@ -0,0 +1,176 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509
+{
+ /**
+ * A declaration of majority.
+ *
+ *
+ * DeclarationOfMajoritySyntax ::= CHOICE
+ * {
+ * notYoungerThan [0] IMPLICIT INTEGER,
+ * fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ * {
+ * fullAge BOOLEAN DEFAULT TRUE,
+ * country PrintableString (SIZE(2))
+ * }
+ * dateOfBirth [2] IMPLICIT GeneralizedTime
+ * }
+ *
+ *
+ * fullAgeAtCountry indicates the majority of the owner with respect to the laws
+ * of a specific country.
+ */
+ public class DeclarationOfMajority
+ : Asn1Encodable, IAsn1Choice
+ {
+ public enum Choice
+ {
+ NotYoungerThan = 0,
+ FullAgeAtCountry = 1,
+ DateOfBirth = 2
+ };
+
+ private readonly Asn1TaggedObject declaration;
+
+ public DeclarationOfMajority(
+ int notYoungerThan)
+ {
+ declaration = new DerTaggedObject(false, 0, new DerInteger(notYoungerThan));
+ }
+
+ public DeclarationOfMajority(
+ bool fullAge,
+ string country)
+ {
+ if (country.Length > 2)
+ throw new ArgumentException("country can only be 2 characters");
+
+ DerPrintableString countryString = new DerPrintableString(country, true);
+
+ DerSequence seq;
+ if (fullAge)
+ {
+ seq = new DerSequence(countryString);
+ }
+ else
+ {
+ seq = new DerSequence(DerBoolean.False, countryString);
+ }
+
+ this.declaration = new DerTaggedObject(false, 1, seq);
+ }
+
+ public DeclarationOfMajority(
+ Asn1GeneralizedTime dateOfBirth)
+ {
+ this.declaration = new DerTaggedObject(false, 2, dateOfBirth);
+ }
+
+ public static DeclarationOfMajority GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is DeclarationOfMajority)
+ {
+ return (DeclarationOfMajority) obj;
+ }
+
+ if (obj is Asn1TaggedObject)
+ {
+ return new DeclarationOfMajority((Asn1TaggedObject) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private DeclarationOfMajority(
+ Asn1TaggedObject o)
+ {
+ if (o.TagNo > 2)
+ throw new ArgumentException("Bad tag number: " + o.TagNo);
+
+ this.declaration = o;
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * DeclarationOfMajoritySyntax ::= CHOICE
+ * {
+ * notYoungerThan [0] IMPLICIT INTEGER,
+ * fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ * {
+ * fullAge BOOLEAN DEFAULT TRUE,
+ * country PrintableString (SIZE(2))
+ * }
+ * dateOfBirth [2] IMPLICIT GeneralizedTime
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return declaration;
+ }
+
+ public Choice Type
+ {
+ get { return (Choice) declaration.TagNo; }
+ }
+
+ /**
+ * @return notYoungerThan if that's what we are, -1 otherwise
+ */
+ public virtual int NotYoungerThan
+ {
+ get
+ {
+ switch ((Choice) declaration.TagNo)
+ {
+ case Choice.NotYoungerThan:
+ return DerInteger.GetInstance(declaration, false).IntValueExact;
+ default:
+ return -1;
+ }
+ }
+ }
+
+ public virtual Asn1Sequence FullAgeAtCountry
+ {
+ get
+ {
+ switch ((Choice) declaration.TagNo)
+ {
+ case Choice.FullAgeAtCountry:
+ return Asn1Sequence.GetInstance(declaration, false);
+ default:
+ return null;
+ }
+ }
+ }
+
+ public virtual Asn1GeneralizedTime DateOfBirth
+ {
+ get
+ {
+ switch ((Choice) declaration.TagNo)
+ {
+ case Choice.DateOfBirth:
+ return Asn1GeneralizedTime.GetInstance(declaration, false);
+ default:
+ return null;
+ }
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/DeclarationOfMajority.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/DeclarationOfMajority.cs.meta
new file mode 100644
index 00000000..440def9a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/DeclarationOfMajority.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9a846b6feaeaf6047b72348ce0f2634a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/MonetaryLimit.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/MonetaryLimit.cs
new file mode 100644
index 00000000..d3b6a5b5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/MonetaryLimit.cs
@@ -0,0 +1,126 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509
+{
+ /**
+ * Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST be
+ * used in new certificates in place of the extension/attribute MonetaryLimit
+ * since January 1, 2004. For the sake of backward compatibility with
+ * certificates already in use, components SHOULD support MonetaryLimit (as well
+ * as QcEuLimitValue).
+ *
+ * Indicates a monetary limit within which the certificate holder is authorized
+ * to act. (This value DOES NOT express a limit on the liability of the
+ * certification authority).
+ *
+ *
+ * MonetaryLimitSyntax ::= SEQUENCE
+ * {
+ * currency PrintableString (SIZE(3)),
+ * amount INTEGER,
+ * exponent INTEGER
+ * }
+ *
+ *
+ * currency must be the ISO code.
+ *
+ * value = amount�10*exponent
+ */
+ public class MonetaryLimit
+ : Asn1Encodable
+ {
+ private readonly DerPrintableString currency;
+ private readonly DerInteger amount;
+ private readonly DerInteger exponent;
+
+ public static MonetaryLimit GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is MonetaryLimit)
+ {
+ return (MonetaryLimit) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new MonetaryLimit(Asn1Sequence.GetInstance(obj));
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private MonetaryLimit(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ currency = DerPrintableString.GetInstance(seq[0]);
+ amount = DerInteger.GetInstance(seq[1]);
+ exponent = DerInteger.GetInstance(seq[2]);
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ *
+ * value = amount�10^exponent
+ *
+ * @param currency The currency. Must be the ISO code.
+ * @param amount The amount
+ * @param exponent The exponent
+ */
+ public MonetaryLimit(
+ string currency,
+ int amount,
+ int exponent)
+ {
+ this.currency = new DerPrintableString(currency, true);
+ this.amount = new DerInteger(amount);
+ this.exponent = new DerInteger(exponent);
+ }
+
+ public virtual string Currency
+ {
+ get { return currency.GetString(); }
+ }
+
+ public virtual BigInteger Amount
+ {
+ get { return amount.Value; }
+ }
+
+ public virtual BigInteger Exponent
+ {
+ get { return exponent.Value; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * MonetaryLimitSyntax ::= SEQUENCE
+ * {
+ * currency PrintableString (SIZE(3)),
+ * amount INTEGER,
+ * exponent INTEGER
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(currency, amount, exponent);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/MonetaryLimit.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/MonetaryLimit.cs.meta
new file mode 100644
index 00000000..11d76cc7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/MonetaryLimit.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5d752b8efd0fd5c42a7ca40ae38d0f3c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/NamingAuthority.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/NamingAuthority.cs
new file mode 100644
index 00000000..84a1fa4a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/NamingAuthority.cs
@@ -0,0 +1,206 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509
+{
+ /**
+ * Names of authorities which are responsible for the administration of title
+ * registers.
+ *
+ *
+ * NamingAuthority ::= SEQUENCE
+ * {
+ * namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ * namingAuthorityUrl IA5String OPTIONAL,
+ * namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ * }
+ *
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+ *
+ */
+ public class NamingAuthority
+ : Asn1Encodable
+ {
+ /**
+ * Profession OIDs should always be defined under the OID branch of the
+ * responsible naming authority. At the time of this writing, the work group
+ * �Recht, Wirtschaft, Steuern� (�Law, Economy, Taxes�) is registered as the
+ * first naming authority under the OID id-isismtt-at-namingAuthorities.
+ */
+ public static readonly DerObjectIdentifier IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern
+ = new DerObjectIdentifier(IsisMttObjectIdentifiers.IdIsisMttATNamingAuthorities + ".1");
+
+ private readonly DerObjectIdentifier namingAuthorityID;
+ private readonly string namingAuthorityUrl;
+ private readonly DirectoryString namingAuthorityText;
+
+ public static NamingAuthority GetInstance(object obj)
+ {
+ if (obj == null || obj is NamingAuthority)
+ return (NamingAuthority) obj;
+
+ if (obj is Asn1Sequence seq)
+ return new NamingAuthority(seq);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static NamingAuthority GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ *
+ *
+ * NamingAuthority ::= SEQUENCE
+ * {
+ * namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ * namingAuthorityUrl IA5String OPTIONAL,
+ * namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ * }
+ *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private NamingAuthority(Asn1Sequence seq)
+ {
+ if (seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ var e = seq.GetEnumerator();
+
+ if (e.MoveNext())
+ {
+ Asn1Encodable o = e.Current;
+ if (o is DerObjectIdentifier oid)
+ {
+ namingAuthorityID = oid;
+ }
+ else if (o is DerIA5String ia5)
+ {
+ namingAuthorityUrl = ia5.GetString();
+ }
+ else if (o is IAsn1String)
+ {
+ namingAuthorityText = DirectoryString.GetInstance(o);
+ }
+ else
+ {
+ throw new ArgumentException("Bad object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+ }
+
+ if (e.MoveNext())
+ {
+ Asn1Encodable o = e.Current;
+ if (o is DerIA5String ia5)
+ {
+ namingAuthorityUrl = ia5.GetString();
+ }
+ else if (o is IAsn1String)
+ {
+ namingAuthorityText = DirectoryString.GetInstance(o);
+ }
+ else
+ {
+ throw new ArgumentException("Bad object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+ }
+
+ if (e.MoveNext())
+ {
+ Asn1Encodable o = e.Current;
+ if (o is IAsn1String)
+ {
+ namingAuthorityText = DirectoryString.GetInstance(o);
+ }
+ else
+ {
+ throw new ArgumentException("Bad object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+ }
+ }
+
+ /**
+ * @return Returns the namingAuthorityID.
+ */
+ public virtual DerObjectIdentifier NamingAuthorityID
+ {
+ get { return namingAuthorityID; }
+ }
+
+ /**
+ * @return Returns the namingAuthorityText.
+ */
+ public virtual DirectoryString NamingAuthorityText
+ {
+ get { return namingAuthorityText; }
+ }
+
+ /**
+ * @return Returns the namingAuthorityUrl.
+ */
+ public virtual string NamingAuthorityUrl
+ {
+ get { return namingAuthorityUrl; }
+ }
+
+ /**
+ * Constructor from given details.
+ *
+ * All parameters can be combined.
+ *
+ * @param namingAuthorityID ObjectIdentifier for naming authority.
+ * @param namingAuthorityUrl URL for naming authority.
+ * @param namingAuthorityText Textual representation of naming authority.
+ */
+ public NamingAuthority(
+ DerObjectIdentifier namingAuthorityID,
+ string namingAuthorityUrl,
+ DirectoryString namingAuthorityText)
+ {
+ this.namingAuthorityID = namingAuthorityID;
+ this.namingAuthorityUrl = namingAuthorityUrl;
+ this.namingAuthorityText = namingAuthorityText;
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * NamingAuthority ::= SEQUENCE
+ * {
+ * namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ * namingAuthorityUrl IA5String OPTIONAL,
+ * namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(namingAuthorityID);
+
+ if (namingAuthorityUrl != null)
+ {
+ v.Add(new DerIA5String(namingAuthorityUrl, true));
+ }
+
+ v.AddOptional(namingAuthorityText);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/NamingAuthority.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/NamingAuthority.cs.meta
new file mode 100644
index 00000000..67173040
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/NamingAuthority.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d78ac00b78d233649bd92c29fa09f50b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProcurationSyntax.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProcurationSyntax.cs
new file mode 100644
index 00000000..297544cc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProcurationSyntax.cs
@@ -0,0 +1,230 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509
+{
+ /**
+ * Attribute to indicate that the certificate holder may sign in the name of a
+ * third person.
+ *
+ * ISIS-MTT PROFILE: The corresponding ProcurationSyntax contains either the
+ * name of the person who is represented (subcomponent thirdPerson) or a
+ * reference to his/her base certificate (in the component signingFor,
+ * subcomponent certRef), furthermore the optional components country and
+ * typeSubstitution to indicate the country whose laws apply, and respectively
+ * the type of procuration (e.g. manager, procuration, custody).
+ *
+ *
+ * ISIS-MTT PROFILE: The GeneralName MUST be of type directoryName and MAY only
+ * contain: - RFC3039 attributes, except pseudonym (countryName, commonName,
+ * surname, givenName, serialNumber, organizationName, organizationalUnitName,
+ * stateOrProvincename, localityName, postalAddress) and - SubjectDirectoryName
+ * attributes (title, dateOfBirth, placeOfBirth, gender, countryOfCitizenship,
+ * countryOfResidence and NameAtBirth).
+ *
+ *
+ * ProcurationSyntax ::= SEQUENCE {
+ * country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ * typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ * signingFor [3] EXPLICIT SigningFor
+ * }
+ *
+ * SigningFor ::= CHOICE
+ * {
+ * thirdPerson GeneralName,
+ * certRef IssuerSerial
+ * }
+ *
+ *
+ */
+ public class ProcurationSyntax
+ : Asn1Encodable
+ {
+ private readonly string country;
+ private readonly DirectoryString typeOfSubstitution;
+ private readonly GeneralName thirdPerson;
+ private readonly IssuerSerial certRef;
+
+ public static ProcurationSyntax GetInstance(object obj)
+ {
+ if (obj == null || obj is ProcurationSyntax)
+ return (ProcurationSyntax) obj;
+
+ if (obj is Asn1Sequence seq)
+ return new ProcurationSyntax(seq);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * The sequence is of type ProcurationSyntax:
+ *
+ *
+ * ProcurationSyntax ::= SEQUENCE {
+ * country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ * typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ * signingFor [3] EXPLICIT SigningFor
+ * }
+ *
+ * SigningFor ::= CHOICE
+ * {
+ * thirdPerson GeneralName,
+ * certRef IssuerSerial
+ * }
+ *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private ProcurationSyntax(Asn1Sequence seq)
+ {
+ if (seq.Count < 1 || seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ var e = seq.GetEnumerator();
+
+ while (e.MoveNext())
+ {
+ Asn1TaggedObject o = Asn1TaggedObject.GetInstance(e.Current);
+ switch (o.TagNo)
+ {
+ case 1:
+ country = DerPrintableString.GetInstance(o, true).GetString();
+ break;
+ case 2:
+ typeOfSubstitution = DirectoryString.GetInstance(o, true);
+ break;
+ case 3:
+ Asn1Object signingFor = o.GetObject();
+ if (signingFor is Asn1TaggedObject)
+ {
+ thirdPerson = GeneralName.GetInstance(signingFor);
+ }
+ else
+ {
+ certRef = IssuerSerial.GetInstance(signingFor);
+ }
+ break;
+ default:
+ throw new ArgumentException("Bad tag number: " + o.TagNo);
+ }
+ }
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ *
+ * Either generalName or certRef MUST be
+ * null.
+ *
+ * @param country The country code whose laws apply.
+ * @param typeOfSubstitution The type of procuration.
+ * @param certRef Reference to certificate of the person who is represented.
+ */
+ public ProcurationSyntax(
+ string country,
+ DirectoryString typeOfSubstitution,
+ IssuerSerial certRef)
+ {
+ this.country = country;
+ this.typeOfSubstitution = typeOfSubstitution;
+ this.thirdPerson = null;
+ this.certRef = certRef;
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ *
+ * Either generalName or certRef MUST be
+ * null.
+ *
+ * @param country The country code whose laws apply.
+ * @param typeOfSubstitution The type of procuration.
+ * @param thirdPerson The GeneralName of the person who is represented.
+ */
+ public ProcurationSyntax(
+ string country,
+ DirectoryString typeOfSubstitution,
+ GeneralName thirdPerson)
+ {
+ this.country = country;
+ this.typeOfSubstitution = typeOfSubstitution;
+ this.thirdPerson = thirdPerson;
+ this.certRef = null;
+ }
+
+ public virtual string Country
+ {
+ get { return country; }
+ }
+
+ public virtual DirectoryString TypeOfSubstitution
+ {
+ get { return typeOfSubstitution; }
+ }
+
+ public virtual GeneralName ThirdPerson
+ {
+ get { return thirdPerson; }
+ }
+
+ public virtual IssuerSerial CertRef
+ {
+ get { return certRef; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * ProcurationSyntax ::= SEQUENCE {
+ * country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ * typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ * signingFor [3] EXPLICIT SigningFor
+ * }
+ *
+ * SigningFor ::= CHOICE
+ * {
+ * thirdPerson GeneralName,
+ * certRef IssuerSerial
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (country != null)
+ {
+ v.Add(new DerTaggedObject(true, 1, new DerPrintableString(country, true)));
+ }
+
+ v.AddOptionalTagged(true, 2, typeOfSubstitution);
+
+ if (thirdPerson != null)
+ {
+ v.Add(new DerTaggedObject(true, 3, thirdPerson));
+ }
+ else
+ {
+ v.Add(new DerTaggedObject(true, 3, certRef));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProcurationSyntax.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProcurationSyntax.cs.meta
new file mode 100644
index 00000000..9379301e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProcurationSyntax.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cc708de42965f2b4da574d61f562b6a8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProfessionInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProfessionInfo.cs
new file mode 100644
index 00000000..19352461
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProfessionInfo.cs
@@ -0,0 +1,376 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509
+{
+ /**
+ * Professions, specializations, disciplines, fields of activity, etc.
+ *
+ *
+ * ProfessionInfo ::= SEQUENCE
+ * {
+ * namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ * professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ * professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ * registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ * addProfessionInfo OCTET STRING OPTIONAL
+ * }
+ *
+ *
+ * @see Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+ */
+ public class ProfessionInfo
+ : Asn1Encodable
+ {
+ /**
+ * Rechtsanw�ltin
+ */
+ public static readonly DerObjectIdentifier Rechtsanwltin = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".1");
+
+ /**
+ * Rechtsanwalt
+ */
+ public static readonly DerObjectIdentifier Rechtsanwalt = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".2");
+
+ /**
+ * Rechtsbeistand
+ */
+ public static readonly DerObjectIdentifier Rechtsbeistand = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".3");
+
+ /**
+ * Steuerberaterin
+ */
+ public static readonly DerObjectIdentifier Steuerberaterin = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".4");
+
+ /**
+ * Steuerberater
+ */
+ public static readonly DerObjectIdentifier Steuerberater = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".5");
+
+ /**
+ * Steuerbevollm�chtigte
+ */
+ public static readonly DerObjectIdentifier Steuerbevollmchtigte = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".6");
+
+ /**
+ * Steuerbevollm�chtigter
+ */
+ public static readonly DerObjectIdentifier Steuerbevollmchtigter = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".7");
+
+ /**
+ * Notarin
+ */
+ public static readonly DerObjectIdentifier Notarin = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".8");
+
+ /**
+ * Notar
+ */
+ public static readonly DerObjectIdentifier Notar = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".9");
+
+ /**
+ * Notarvertreterin
+ */
+ public static readonly DerObjectIdentifier Notarvertreterin = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".10");
+
+ /**
+ * Notarvertreter
+ */
+ public static readonly DerObjectIdentifier Notarvertreter = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".11");
+
+ /**
+ * Notariatsverwalterin
+ */
+ public static readonly DerObjectIdentifier Notariatsverwalterin = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".12");
+
+ /**
+ * Notariatsverwalter
+ */
+ public static readonly DerObjectIdentifier Notariatsverwalter = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".13");
+
+ /**
+ * Wirtschaftspr�ferin
+ */
+ public static readonly DerObjectIdentifier Wirtschaftsprferin = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".14");
+
+ /**
+ * Wirtschaftspr�fer
+ */
+ public static readonly DerObjectIdentifier Wirtschaftsprfer = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".15");
+
+ /**
+ * Vereidigte Buchpr�ferin
+ */
+ public static readonly DerObjectIdentifier VereidigteBuchprferin = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".16");
+
+ /**
+ * Vereidigter Buchpr�fer
+ */
+ public static readonly DerObjectIdentifier VereidigterBuchprfer = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".17");
+
+ /**
+ * Patentanw�ltin
+ */
+ public static readonly DerObjectIdentifier Patentanwltin = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".18");
+
+ /**
+ * Patentanwalt
+ */
+ public static readonly DerObjectIdentifier Patentanwalt = new DerObjectIdentifier(
+ NamingAuthority.IdIsisMttATNamingAuthoritiesRechtWirtschaftSteuern + ".19");
+
+ private readonly NamingAuthority namingAuthority;
+ private readonly Asn1Sequence professionItems;
+ private readonly Asn1Sequence professionOids;
+ private readonly string registrationNumber;
+ private readonly Asn1OctetString addProfessionInfo;
+
+ public static ProfessionInfo GetInstance(object obj)
+ {
+ if (obj == null || obj is ProfessionInfo)
+ return (ProfessionInfo) obj;
+
+ if (obj is Asn1Sequence seq)
+ return new ProfessionInfo(seq);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ *
+ *
+ * ProfessionInfo ::= SEQUENCE
+ * {
+ * namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ * professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ * professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ * registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ * addProfessionInfo OCTET STRING OPTIONAL
+ * }
+ *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private ProfessionInfo(Asn1Sequence seq)
+ {
+ if (seq.Count > 5)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ var e = seq.GetEnumerator();
+
+ e.MoveNext();
+ Asn1Encodable o = e.Current;
+
+ if (o is Asn1TaggedObject ato)
+ {
+ if (ato.TagNo != 0)
+ throw new ArgumentException("Bad tag number: " + ato.TagNo);
+
+ namingAuthority = NamingAuthority.GetInstance(ato, true);
+ e.MoveNext();
+ o = e.Current;
+ }
+
+ professionItems = Asn1Sequence.GetInstance(o);
+
+ if (e.MoveNext())
+ {
+ o = e.Current;
+ if (o is Asn1Sequence sequence)
+ {
+ professionOids = sequence;
+ }
+ else if (o is DerPrintableString printable)
+ {
+ registrationNumber = printable.GetString();
+ }
+ else if (o is Asn1OctetString octets)
+ {
+ addProfessionInfo = octets;
+ }
+ else
+ {
+ throw new ArgumentException("Bad object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+ }
+
+ if (e.MoveNext())
+ {
+ o = e.Current;
+ if (o is DerPrintableString printable)
+ {
+ registrationNumber = printable.GetString();
+ }
+ else if (o is Asn1OctetString octets)
+ {
+ addProfessionInfo = octets;
+ }
+ else
+ {
+ throw new ArgumentException("Bad object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+ }
+
+ if (e.MoveNext())
+ {
+ o = e.Current;
+ if (o is Asn1OctetString octets)
+ {
+ addProfessionInfo = octets;
+ }
+ else
+ {
+ throw new ArgumentException("Bad object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(o));
+ }
+ }
+ }
+
+ /**
+ * Constructor from given details.
+ *
+ * professionItems is mandatory, all other parameters are
+ * optional.
+ *
+ * @param namingAuthority The naming authority.
+ * @param professionItems Directory strings of the profession.
+ * @param professionOids DERObjectIdentfier objects for the
+ * profession.
+ * @param registrationNumber Registration number.
+ * @param addProfessionInfo Additional infos in encoded form.
+ */
+ public ProfessionInfo(
+ NamingAuthority namingAuthority,
+ DirectoryString[] professionItems,
+ DerObjectIdentifier[] professionOids,
+ string registrationNumber,
+ Asn1OctetString addProfessionInfo)
+ {
+ this.namingAuthority = namingAuthority;
+ this.professionItems = new DerSequence(professionItems);
+ if (professionOids != null)
+ {
+ this.professionOids = new DerSequence(professionOids);
+ }
+ this.registrationNumber = registrationNumber;
+ this.addProfessionInfo = addProfessionInfo;
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * ProfessionInfo ::= SEQUENCE
+ * {
+ * namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ * professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ * professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ * registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ * addProfessionInfo OCTET STRING OPTIONAL
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, namingAuthority);
+ v.Add(professionItems);
+ v.AddOptional(professionOids);
+
+ if (registrationNumber != null)
+ {
+ v.Add(new DerPrintableString(registrationNumber, true));
+ }
+
+ v.AddOptional(addProfessionInfo);
+ return new DerSequence(v);
+ }
+
+ /**
+ * @return Returns the addProfessionInfo.
+ */
+ public virtual Asn1OctetString AddProfessionInfo
+ {
+ get { return addProfessionInfo; }
+ }
+
+ /**
+ * @return Returns the namingAuthority.
+ */
+ public virtual NamingAuthority NamingAuthority
+ {
+ get { return namingAuthority; }
+ }
+
+ /**
+ * @return Returns the professionItems.
+ */
+ public virtual DirectoryString[] GetProfessionItems()
+ {
+ DirectoryString[] result = new DirectoryString[professionItems.Count];
+
+ for (int i = 0; i < professionItems.Count; ++i)
+ {
+ result[i] = DirectoryString.GetInstance(professionItems[i]);
+ }
+
+ return result;
+ }
+
+ /**
+ * @return Returns the professionOids.
+ */
+ public virtual DerObjectIdentifier[] GetProfessionOids()
+ {
+ if (professionOids == null)
+ {
+ return new DerObjectIdentifier[0];
+ }
+
+ DerObjectIdentifier[] result = new DerObjectIdentifier[professionOids.Count];
+
+ for (int i = 0; i < professionOids.Count; ++i)
+ {
+ result[i] = DerObjectIdentifier.GetInstance(professionOids[i]);
+ }
+
+ return result;
+ }
+
+ /**
+ * @return Returns the registrationNumber.
+ */
+ public virtual string RegistrationNumber
+ {
+ get { return registrationNumber; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProfessionInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProfessionInfo.cs.meta
new file mode 100644
index 00000000..958f07c8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/ProfessionInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9d6814f01a13d6b4b889110032b064af
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Restriction.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Restriction.cs
new file mode 100644
index 00000000..eeae09c0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Restriction.cs
@@ -0,0 +1,83 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.IsisMtt.X509
+{
+ /**
+ * Some other restriction regarding the usage of this certificate.
+ *
+ *
+ * RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+ *
+ */
+ public class Restriction
+ : Asn1Encodable
+ {
+ private readonly DirectoryString restriction;
+
+ public static Restriction GetInstance(object obj)
+ {
+ if (obj is Restriction)
+ return (Restriction) obj;
+
+ if (obj is IAsn1String)
+ return new Restriction(DirectoryString.GetInstance(obj));
+
+ throw new ArgumentException("Unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from DirectoryString.
+ *
+ * The DirectoryString is of type RestrictionSyntax:
+ *
+ *
+ * RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+ *
+ *
+ * @param restriction A IAsn1String.
+ */
+ private Restriction(DirectoryString restriction)
+ {
+ this.restriction = restriction;
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * @param restriction The description of the restriction.
+ */
+ public Restriction(string restriction)
+ {
+ this.restriction = new DirectoryString(restriction);
+ }
+
+ public virtual DirectoryString RestrictionString
+ {
+ get { return restriction; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+ *
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return restriction.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Restriction.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Restriction.cs.meta
new file mode 100644
index 00000000..eb6c16c8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/isismtt/x509/Restriction.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 87a6e7888408104458b791ec7669c5e3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa.meta
new file mode 100644
index 00000000..77360911
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 541c2a1edf19b8e4b8e9c103c2b80762
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa/KISAObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa/KISAObjectIdentifiers.cs
new file mode 100644
index 00000000..b918214d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa/KISAObjectIdentifiers.cs
@@ -0,0 +1,12 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Kisa
+{
+ public abstract class KisaObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier IdSeedCbc = new DerObjectIdentifier("1.2.410.200004.1.4");
+ public static readonly DerObjectIdentifier IdNpkiAppCmsSeedWrap = new DerObjectIdentifier("1.2.410.200004.7.1.1.1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa/KISAObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa/KISAObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..8cd3e5fa
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/kisa/KISAObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 789322e5999977548af42b9d087a4633
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft.meta
new file mode 100644
index 00000000..9d55b585
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1341de6b3ad718e4ca3aeb95e04ed889
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft/MicrosoftObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft/MicrosoftObjectIdentifiers.cs
new file mode 100644
index 00000000..346f8173
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft/MicrosoftObjectIdentifiers.cs
@@ -0,0 +1,23 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Microsoft
+{
+ public abstract class MicrosoftObjectIdentifiers
+ {
+ //
+ // Microsoft
+ // iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) Microsoft(311)
+ //
+ public static readonly DerObjectIdentifier Microsoft = new DerObjectIdentifier("1.3.6.1.4.1.311");
+ public static readonly DerObjectIdentifier MicrosoftCertTemplateV1 = Microsoft.Branch("20.2");
+ public static readonly DerObjectIdentifier MicrosoftCAVersion = Microsoft.Branch("21.1");
+ public static readonly DerObjectIdentifier MicrosoftPrevCACertHash = Microsoft.Branch("21.2");
+ public static readonly DerObjectIdentifier MicrosoftCrlNextPublish = Microsoft.Branch("21.4");
+ public static readonly DerObjectIdentifier MicrosoftCertTemplateV2 = Microsoft.Branch("21.7");
+ public static readonly DerObjectIdentifier MicrosoftAppPolicies = Microsoft.Branch("21.10");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft/MicrosoftObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft/MicrosoftObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..02588766
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/microsoft/MicrosoftObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 469fd9c10e8453b4fad454a5d4c89d3e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc.meta
new file mode 100644
index 00000000..277bce9d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e5312eac793d21c47855632cc9d52d1b
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs
new file mode 100644
index 00000000..5bffcaf8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs
@@ -0,0 +1,78 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
+{
+ public class Cast5CbcParameters
+ : Asn1Encodable
+ {
+ private readonly DerInteger keyLength;
+ private readonly Asn1OctetString iv;
+
+ public static Cast5CbcParameters GetInstance(
+ object o)
+ {
+ if (o is Cast5CbcParameters)
+ {
+ return (Cast5CbcParameters) o;
+ }
+
+ if (o is Asn1Sequence)
+ {
+ return new Cast5CbcParameters((Asn1Sequence) o);
+ }
+
+ throw new ArgumentException("unknown object in Cast5CbcParameters factory");
+ }
+
+ public Cast5CbcParameters(
+ byte[] iv,
+ int keyLength)
+ {
+ this.iv = new DerOctetString(iv);
+ this.keyLength = new DerInteger(keyLength);
+ }
+
+ private Cast5CbcParameters(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ iv = (Asn1OctetString) seq[0];
+ keyLength = (DerInteger) seq[1];
+ }
+
+ public byte[] GetIV()
+ {
+ return Arrays.Clone(iv.GetOctets());
+ }
+
+ public int KeyLength
+ {
+ get { return keyLength.IntValueExact; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * cast5CBCParameters ::= Sequence {
+ * iv OCTET STRING DEFAULT 0,
+ * -- Initialization vector
+ * keyLength Integer
+ * -- Key length, in bits
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(iv, keyLength);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs.meta
new file mode 100644
index 00000000..0de601f5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/CAST5CBCParameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3f69b0269ba180c45ad3c00555a60398
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs
new file mode 100644
index 00000000..779cf781
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
+{
+ public class IdeaCbcPar
+ : Asn1Encodable
+ {
+ internal Asn1OctetString iv;
+
+ public static IdeaCbcPar GetInstance(
+ object o)
+ {
+ if (o is IdeaCbcPar)
+ {
+ return (IdeaCbcPar) o;
+ }
+
+ if (o is Asn1Sequence)
+ {
+ return new IdeaCbcPar((Asn1Sequence) o);
+ }
+
+ throw new ArgumentException("unknown object in IDEACBCPar factory");
+ }
+
+ public IdeaCbcPar(
+ byte[] iv)
+ {
+ this.iv = new DerOctetString(iv);
+ }
+
+ private IdeaCbcPar(
+ Asn1Sequence seq)
+ {
+ if (seq.Count == 1)
+ {
+ iv = (Asn1OctetString) seq[0];
+ }
+ }
+
+ public byte[] GetIV()
+ {
+ return iv == null ? null : iv.GetOctets();
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * IDEA-CBCPar ::= Sequence {
+ * iv OCTET STRING OPTIONAL -- exactly 8 octets
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(iv);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs.meta
new file mode 100644
index 00000000..a923d8f0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/IDEACBCPar.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 29a817e7067eb46489a7ec474922f0ec
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs
new file mode 100644
index 00000000..f3a16a30
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs
@@ -0,0 +1,124 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
+{
+ public abstract class MiscObjectIdentifiers
+ {
+ //
+ // Netscape
+ // iso/itu(2) joint-assign(16) us(840) uscompany(1) Netscape(113730) cert-extensions(1) }
+ //
+ public static readonly DerObjectIdentifier Netscape = new DerObjectIdentifier("2.16.840.1.113730.1");
+ public static readonly DerObjectIdentifier NetscapeCertType = Netscape.Branch("1");
+ public static readonly DerObjectIdentifier NetscapeBaseUrl = Netscape.Branch("2");
+ public static readonly DerObjectIdentifier NetscapeRevocationUrl = Netscape.Branch("3");
+ public static readonly DerObjectIdentifier NetscapeCARevocationUrl = Netscape.Branch("4");
+ public static readonly DerObjectIdentifier NetscapeRenewalUrl = Netscape.Branch("7");
+ public static readonly DerObjectIdentifier NetscapeCAPolicyUrl = Netscape.Branch("8");
+ public static readonly DerObjectIdentifier NetscapeSslServerName = Netscape.Branch("12");
+ public static readonly DerObjectIdentifier NetscapeCertComment = Netscape.Branch("13");
+
+ //
+ // Verisign
+ // iso/itu(2) joint-assign(16) us(840) uscompany(1) verisign(113733) cert-extensions(1) }
+ //
+ public static readonly DerObjectIdentifier Verisign = new DerObjectIdentifier("2.16.840.1.113733.1");
+
+ //
+ // CZAG - country, zip, age, and gender
+ //
+ public static readonly DerObjectIdentifier VerisignCzagExtension = Verisign.Branch("6.3");
+
+ public static readonly DerObjectIdentifier VerisignPrivate_6_9 = Verisign.Branch("6.9");
+ public static readonly DerObjectIdentifier VerisignOnSiteJurisdictionHash = Verisign.Branch("6.11");
+ public static readonly DerObjectIdentifier VerisignBitString_6_13 = Verisign.Branch("6.13");
+
+ // D&B D-U-N-S number
+ public static readonly DerObjectIdentifier VerisignDnbDunsNumber = Verisign.Branch("6.15");
+
+ public static readonly DerObjectIdentifier VerisignIssStrongCrypto = Verisign.Branch("8.1");
+
+ //
+ // Novell
+ // iso/itu(2) country(16) us(840) organization(1) novell(113719)
+ //
+ public static readonly DerObjectIdentifier Novell = new DerObjectIdentifier("2.16.840.1.113719");
+ public static readonly DerObjectIdentifier NovellSecurityAttribs = Novell.Branch("1.9.4.1");
+
+ //
+ // Entrust
+ // iso(1) member-body(16) us(840) nortelnetworks(113533) entrust(7)
+ //
+ public static readonly DerObjectIdentifier Entrust = new DerObjectIdentifier("1.2.840.113533.7");
+ public static readonly DerObjectIdentifier EntrustVersionExtension = Entrust.Branch("65.0");
+
+ public static readonly DerObjectIdentifier cast5CBC = new DerObjectIdentifier(Entrust+ ".66.10");
+
+ //
+ // HMAC-SHA1 hMAC-SHA1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
+ // dod(6) internet(1) security(5) mechanisms(5) 8 1 2 }
+ //
+ public static readonly DerObjectIdentifier HMAC_SHA1 = new DerObjectIdentifier("1.3.6.1.5.5.8.1.2");
+
+ //
+ // Ascom
+ //
+ public static readonly DerObjectIdentifier as_sys_sec_alg_ideaCBC = new DerObjectIdentifier("1.3.6.1.4.1.188.7.1.1.2");
+
+ //
+ // Peter Gutmann's Cryptlib
+ //
+ public static readonly DerObjectIdentifier cryptlib = new DerObjectIdentifier("1.3.6.1.4.1.3029");
+
+ public static readonly DerObjectIdentifier cryptlib_algorithm = cryptlib.Branch("1");
+ public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_ECB = cryptlib_algorithm.Branch("1.1");
+ public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_CBC = cryptlib_algorithm.Branch("1.2");
+ public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_CFB = cryptlib_algorithm.Branch("1.3");
+ public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_OFB = cryptlib_algorithm.Branch("1.4");
+
+ //
+ // Blake2b
+ //
+ public static readonly DerObjectIdentifier blake2 = new DerObjectIdentifier("1.3.6.1.4.1.1722.12.2");
+
+ public static readonly DerObjectIdentifier id_blake2b160 = blake2.Branch("1.5");
+ public static readonly DerObjectIdentifier id_blake2b256 = blake2.Branch("1.8");
+ public static readonly DerObjectIdentifier id_blake2b384 = blake2.Branch("1.12");
+ public static readonly DerObjectIdentifier id_blake2b512 = blake2.Branch("1.16");
+
+ public static readonly DerObjectIdentifier id_blake2s128 = blake2.Branch("2.4");
+ public static readonly DerObjectIdentifier id_blake2s160 = blake2.Branch("2.5");
+ public static readonly DerObjectIdentifier id_blake2s224 = blake2.Branch("2.7");
+ public static readonly DerObjectIdentifier id_blake2s256 = blake2.Branch("2.8");
+
+ public static readonly DerObjectIdentifier blake3 = blake2.Branch("3");
+
+ public static readonly DerObjectIdentifier blake3_256 = blake3.Branch("8");
+
+ //
+ // Scrypt
+ public static readonly DerObjectIdentifier id_scrypt = new DerObjectIdentifier("1.3.6.1.4.1.11591.4.11");
+
+ // Composite key/signature oid - prototyping
+ //
+ // id-alg-composite OBJECT IDENTIFIER ::= {
+ // iso(1) identified-organization(3) dod(6) internet(1) private(4)
+ // enterprise(1) OpenCA(18227) Algorithms(2) id-alg-composite(1) }
+ public static readonly DerObjectIdentifier id_alg_composite = new DerObjectIdentifier("1.3.6.1.4.1.18227.2.1");
+
+ // -- To be replaced by IANA
+ //
+ //id-composite-key OBJECT IDENTIFIER ::= {
+ //
+ // joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
+ //
+ // Algorithm(80) Composite(4) CompositeKey(1)
+ public static readonly DerObjectIdentifier id_composite_key =
+ new DerObjectIdentifier("2.16.840.1.114027.80.4.1");
+
+ public static readonly DerObjectIdentifier id_oracle_pkcs12_trusted_key_usage =
+ new DerObjectIdentifier("2.16.840.1.113894.746875.1.1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..e6fd2211
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: faf6c2d54aebe384e9ebbb5837ed22d0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs
new file mode 100644
index 00000000..42ed429a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs
@@ -0,0 +1,58 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
+{
+ /**
+ * The NetscapeCertType object.
+ *
+ * NetscapeCertType ::= BIT STRING {
+ * SSLClient (0),
+ * SSLServer (1),
+ * S/MIME (2),
+ * Object Signing (3),
+ * Reserved (4),
+ * SSL CA (5),
+ * S/MIME CA (6),
+ * Object Signing CA (7) }
+ *
+ */
+ public class NetscapeCertType
+ : DerBitString
+ {
+ public const int SslClient = (1 << 7);
+ public const int SslServer = (1 << 6);
+ public const int Smime = (1 << 5);
+ public const int ObjectSigning = (1 << 4);
+ public const int Reserved = (1 << 3);
+ public const int SslCA = (1 << 2);
+ public const int SmimeCA = (1 << 1);
+ public const int ObjectSigningCA = (1 << 0);
+
+ /**
+ * Basic constructor.
+ *
+ * @param usage - the bitwise OR of the Key Usage flags giving the
+ * allowed uses for the key.
+ * e.g. (X509NetscapeCertType.sslCA | X509NetscapeCertType.smimeCA)
+ */
+ public NetscapeCertType(int usage)
+ : base(usage)
+ {
+ }
+
+ public NetscapeCertType(DerBitString usage)
+ : base(usage.GetBytes(), usage.PadBits)
+ {
+ }
+
+ public override string ToString()
+ {
+ byte[] data = GetBytes();
+ return "NetscapeCertType: 0x" + (data[0] & 0xff).ToString("X");
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs.meta
new file mode 100644
index 00000000..e23cf1ef
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeCertType.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1bc5a052c31c0314994732d07f5afc4d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs
new file mode 100644
index 00000000..843e8124
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs
@@ -0,0 +1,22 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
+{
+ public class NetscapeRevocationUrl
+ : DerIA5String
+ {
+ public NetscapeRevocationUrl(DerIA5String str)
+ : base(str.GetString())
+ {
+ }
+
+ public override string ToString()
+ {
+ return "NetscapeRevocationUrl: " + this.GetString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs.meta
new file mode 100644
index 00000000..af49f4af
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d22c307cdb816a0459acb624803e18d5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs
new file mode 100644
index 00000000..9ca8edbd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs
@@ -0,0 +1,22 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Misc
+{
+ public class VerisignCzagExtension
+ : DerIA5String
+ {
+ public VerisignCzagExtension(DerIA5String str)
+ : base(str.GetString())
+ {
+ }
+
+ public override string ToString()
+ {
+ return "VerisignCzagExtension: " + this.GetString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs.meta
new file mode 100644
index 00000000..b4b9bee5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/misc/VerisignCzagExtension.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e1851bd9fb0851f4580636dc5c47eeb9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla.meta
new file mode 100644
index 00000000..2a95572c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2f646c6bd36b16d40a00554b4383c957
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla/PublicKeyAndChallenge.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla/PublicKeyAndChallenge.cs
new file mode 100644
index 00000000..dce2854f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla/PublicKeyAndChallenge.cs
@@ -0,0 +1,72 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Mozilla
+{
+ /**
+ * This is designed to parse
+ * the PublicKeyAndChallenge created by the KEYGEN tag included by
+ * Mozilla based browsers.
+ *
+ * PublicKeyAndChallenge ::= SEQUENCE {
+ * spki SubjectPublicKeyInfo,
+ * challenge IA5STRING
+ * }
+ *
+ *
+ */
+ public class PublicKeyAndChallenge
+ : Asn1Encodable
+ {
+ private Asn1Sequence pkacSeq;
+ private SubjectPublicKeyInfo spki;
+ private DerIA5String challenge;
+
+ public static PublicKeyAndChallenge GetInstance(
+ object obj)
+ {
+ if (obj is PublicKeyAndChallenge)
+ {
+ return (PublicKeyAndChallenge) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new PublicKeyAndChallenge((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException(
+ "unknown object in 'PublicKeyAndChallenge' factory : "
+ + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj) + ".");
+ }
+
+ public PublicKeyAndChallenge(
+ Asn1Sequence seq)
+ {
+ pkacSeq = seq;
+ spki = SubjectPublicKeyInfo.GetInstance(seq[0]);
+ challenge = DerIA5String.GetInstance(seq[1]);
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return pkacSeq;
+ }
+
+ public SubjectPublicKeyInfo SubjectPublicKeyInfo
+ {
+ get { return spki; }
+ }
+
+ public DerIA5String Challenge
+ {
+ get { return challenge; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla/PublicKeyAndChallenge.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla/PublicKeyAndChallenge.cs.meta
new file mode 100644
index 00000000..2762d10e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/mozilla/PublicKeyAndChallenge.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d8f606cb85a286849a7bec6ddbfd8636
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist.meta
new file mode 100644
index 00000000..129e8346
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f55d0df425b7c1d499d6aca484aebdbd
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE128_params.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE128_params.cs
new file mode 100644
index 00000000..28fe741c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE128_params.cs
@@ -0,0 +1,107 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using System;
+
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist
+{
+ ///
+ /// KMACwithSHAKE128-params ::= SEQUENCE {
+ /// kMACOutputLength INTEGER DEFAULT 256, -- Output length in bits
+ /// customizationString OCTET STRING DEFAULT ''H
+ /// }
+ ///
+public class KMacWithShake128Params : Asn1Encodable
+{
+ private static readonly byte[] EMPTY_STRING = new byte[0];
+ private static readonly int DEF_LENGTH = 256;
+
+ private readonly int outputLength;
+ private readonly byte[] customizationString;
+
+ public KMacWithShake128Params(int outputLength)
+ {
+ this.outputLength = outputLength;
+ this.customizationString = EMPTY_STRING;
+ }
+
+ public KMacWithShake128Params(int outputLength, byte[] customizationString)
+ {
+ this.outputLength = outputLength;
+ this.customizationString = Arrays.Clone(customizationString);
+ }
+
+ public static KMacWithShake128Params GetInstance(object o)
+ {
+ if (o is KMacWithShake128Params)
+ {
+ return (KMacWithShake128Params)o;
+ }
+ else if (o != null)
+ {
+ return new KMacWithShake128Params(Asn1Sequence.GetInstance(o));
+ }
+
+ return null;
+ }
+
+ private KMacWithShake128Params(Asn1Sequence seq)
+ {
+ if (seq.Count > 2)
+ throw new InvalidOperationException("sequence size greater than 2");
+
+ if (seq.Count == 2)
+ {
+ this.outputLength = DerInteger.GetInstance(seq[0]).IntValueExact;
+ this.customizationString = Arrays.Clone(Asn1OctetString.GetInstance(seq[1]).GetOctets());
+ }
+ else if (seq.Count == 1)
+ {
+ if (seq[0] is DerInteger)
+ {
+ this.outputLength = DerInteger.GetInstance(seq[0]).IntValueExact;
+ this.customizationString = EMPTY_STRING;
+ }
+ else
+ {
+ this.outputLength = DEF_LENGTH;
+ this.customizationString = Arrays.Clone(Asn1OctetString.GetInstance(seq[0]).GetOctets());
+ }
+ }
+ else
+ {
+ this.outputLength = DEF_LENGTH;
+ this.customizationString = EMPTY_STRING;
+ }
+ }
+
+ public int OutputLength
+ {
+ get { return outputLength; }
+ }
+
+ public byte[] CustomizationString
+ {
+ get { return Arrays.Clone(customizationString); }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ if (outputLength != DEF_LENGTH)
+ {
+ v.Add(new DerInteger(outputLength));
+ }
+
+ if (customizationString.Length != 0)
+ {
+ v.Add(new DerOctetString(CustomizationString));
+ }
+
+ return new DerSequence(v);
+ }
+}
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE128_params.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE128_params.cs.meta
new file mode 100644
index 00000000..78924d96
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE128_params.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a24c9896b5be4c04caafa46c3e526a34
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE256_params.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE256_params.cs
new file mode 100644
index 00000000..8f230851
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE256_params.cs
@@ -0,0 +1,106 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist
+{
+ ///
+ /// KMACwithSHAKE256-params ::= SEQUENCE {
+ /// kMACOutputLength INTEGER DEFAULT 512, -- Output length in bits
+ /// customizationString OCTET STRING DEFAULT ''H
+ /// }
+ ///
+public class KMacWithShake256Params : Asn1Encodable
+{
+ private static readonly byte[] EMPTY_STRING = new byte[0];
+ private static readonly int DEF_LENGTH = 512;
+
+ private readonly int outputLength;
+ private readonly byte[] customizationString;
+
+ public KMacWithShake256Params(int outputLength)
+ {
+ this.outputLength = outputLength;
+ this.customizationString = EMPTY_STRING;
+ }
+
+ public KMacWithShake256Params(int outputLength, byte[] customizationString)
+ {
+ this.outputLength = outputLength;
+ this.customizationString = Arrays.Clone(customizationString);
+ }
+
+ public static KMacWithShake256Params GetInstance(object o)
+ {
+ if (o is KMacWithShake256Params)
+ {
+ return (KMacWithShake256Params)o;
+ }
+ else if (o != null)
+ {
+ return new KMacWithShake256Params(Asn1Sequence.GetInstance(o));
+ }
+
+ return null;
+ }
+
+ private KMacWithShake256Params(Asn1Sequence seq)
+ {
+ if (seq.Count > 2)
+ throw new InvalidOperationException("sequence size greater than 2");
+
+ if (seq.Count == 2)
+ {
+ this.outputLength = DerInteger.GetInstance(seq[0]).IntValueExact;
+ this.customizationString = Arrays.Clone(Asn1OctetString.GetInstance(seq[1]).GetOctets());
+ }
+ else if (seq.Count == 1)
+ {
+ if (seq[0] is DerInteger)
+ {
+ this.outputLength = DerInteger.GetInstance(seq[0]).IntValueExact;
+ this.customizationString = EMPTY_STRING;
+ }
+ else
+ {
+ this.outputLength = DEF_LENGTH;
+ this.customizationString = Arrays.Clone(Asn1OctetString.GetInstance(seq[0]).GetOctets());
+ }
+ }
+ else
+ {
+ this.outputLength = DEF_LENGTH;
+ this.customizationString = EMPTY_STRING;
+ }
+ }
+
+ public int OutputLength
+ {
+ get { return outputLength; }
+ }
+
+ public byte[] CustomizationString
+ {
+ get { return Arrays.Clone(customizationString); }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ if (outputLength != DEF_LENGTH)
+ {
+ v.Add(new DerInteger(outputLength));
+ }
+
+ if (customizationString.Length != 0)
+ {
+ v.Add(new DerOctetString(CustomizationString));
+ }
+
+ return new DerSequence(v);
+ }
+}
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE256_params.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE256_params.cs.meta
new file mode 100644
index 00000000..394ee621
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/KMACwithSHAKE256_params.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 08f572fdeff008f4ca702197b266273f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTNamedCurves.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTNamedCurves.cs
new file mode 100644
index 00000000..77c2a967
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTNamedCurves.cs
@@ -0,0 +1,112 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Sec;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist
+{
+ /// Elliptic curve registry for NIST curves.
+ public static class NistNamedCurves
+ {
+ private static readonly Dictionary objIds =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly Dictionary names =
+ new Dictionary();
+
+ private static void DefineCurveAlias(string name, DerObjectIdentifier oid)
+ {
+ if (SecNamedCurves.GetByOidLazy(oid) == null)
+ throw new InvalidOperationException();
+
+ objIds.Add(name, oid);
+ names.Add(oid, name);
+ }
+
+ static NistNamedCurves()
+ {
+ DefineCurveAlias("B-163", SecObjectIdentifiers.SecT163r2);
+ DefineCurveAlias("B-233", SecObjectIdentifiers.SecT233r1);
+ DefineCurveAlias("B-283", SecObjectIdentifiers.SecT283r1);
+ DefineCurveAlias("B-409", SecObjectIdentifiers.SecT409r1);
+ DefineCurveAlias("B-571", SecObjectIdentifiers.SecT571r1);
+
+ DefineCurveAlias("K-163", SecObjectIdentifiers.SecT163k1);
+ DefineCurveAlias("K-233", SecObjectIdentifiers.SecT233k1);
+ DefineCurveAlias("K-283", SecObjectIdentifiers.SecT283k1);
+ DefineCurveAlias("K-409", SecObjectIdentifiers.SecT409k1);
+ DefineCurveAlias("K-571", SecObjectIdentifiers.SecT571k1);
+
+ DefineCurveAlias("P-192", SecObjectIdentifiers.SecP192r1);
+ DefineCurveAlias("P-224", SecObjectIdentifiers.SecP224r1);
+ DefineCurveAlias("P-256", SecObjectIdentifiers.SecP256r1);
+ DefineCurveAlias("P-384", SecObjectIdentifiers.SecP384r1);
+ DefineCurveAlias("P-521", SecObjectIdentifiers.SecP521r1);
+ }
+
+ /// Look up the for the curve with the given name.
+ /// The name of the curve.
+ public static X9ECParameters GetByName(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOid(oid);
+ }
+
+ /// Look up an for the curve with the given name.
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of
+ /// the full .
+ ///
+ /// The name of the curve.
+ public static X9ECParametersHolder GetByNameLazy(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOidLazy(oid);
+ }
+
+ /// Look up the for the curve with the given
+ /// OID .
+ /// The OID for the curve.
+ public static X9ECParameters GetByOid(DerObjectIdentifier oid)
+ {
+ return GetByOidLazy(oid)?.Parameters;
+ }
+
+ /// Look up an for the curve with the given
+ /// OID .
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of
+ /// the full .
+ ///
+ /// The OID for the curve.
+ public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid)
+ {
+ return names.ContainsKey(oid) ? SecNamedCurves.GetByOidLazy(oid) : null;
+ }
+
+ /// Look up the name of the curve with the given OID .
+ /// The OID for the curve.
+ public static string GetName(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(names, oid);
+ }
+
+ /// Look up the OID of the curve with the given name.
+ /// The name of the curve.
+ public static DerObjectIdentifier GetOid(string name)
+ {
+ return CollectionUtilities.GetValueOrNull(objIds, name);
+ }
+
+ /// Enumerate the available curve names in this registry.
+ public static IEnumerable Names
+ {
+ get { return CollectionUtilities.Proxy(objIds.Keys); }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTNamedCurves.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTNamedCurves.cs.meta
new file mode 100644
index 00000000..1a3eddd5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTNamedCurves.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b6f4d35ad37f26942a3e1fe948e58516
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTObjectIdentifiers.cs
new file mode 100644
index 00000000..bcdb20f3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTObjectIdentifiers.cs
@@ -0,0 +1,112 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist
+{
+ public sealed class NistObjectIdentifiers
+ {
+ private NistObjectIdentifiers()
+ {
+ }
+
+ //
+ // NIST
+ // iso/itu(2) joint-assign(16) us(840) organization(1) gov(101) csor(3)
+
+ //
+ // nistalgorithms(4)
+ //
+ public static readonly DerObjectIdentifier NistAlgorithm = new DerObjectIdentifier("2.16.840.1.101.3.4");
+
+ public static readonly DerObjectIdentifier HashAlgs = NistAlgorithm.Branch("2");
+
+ public static readonly DerObjectIdentifier IdSha256 = HashAlgs.Branch("1");
+ public static readonly DerObjectIdentifier IdSha384 = HashAlgs.Branch("2");
+ public static readonly DerObjectIdentifier IdSha512 = HashAlgs.Branch("3");
+ public static readonly DerObjectIdentifier IdSha224 = HashAlgs.Branch("4");
+ public static readonly DerObjectIdentifier IdSha512_224 = HashAlgs.Branch("5");
+ public static readonly DerObjectIdentifier IdSha512_256 = HashAlgs.Branch("6");
+ public static readonly DerObjectIdentifier IdSha3_224 = HashAlgs.Branch("7");
+ public static readonly DerObjectIdentifier IdSha3_256 = HashAlgs.Branch("8");
+ public static readonly DerObjectIdentifier IdSha3_384 = HashAlgs.Branch("9");
+ public static readonly DerObjectIdentifier IdSha3_512 = HashAlgs.Branch("10");
+ public static readonly DerObjectIdentifier IdShake128 = HashAlgs.Branch("11");
+ public static readonly DerObjectIdentifier IdShake256 = HashAlgs.Branch("12");
+ public static readonly DerObjectIdentifier IdHMacWithSha3_224 = HashAlgs.Branch("13");
+ public static readonly DerObjectIdentifier IdHMacWithSha3_256 = HashAlgs.Branch("14");
+ public static readonly DerObjectIdentifier IdHMacWithSha3_384 = HashAlgs.Branch("15");
+ public static readonly DerObjectIdentifier IdHMacWithSha3_512 = HashAlgs.Branch("16");
+ public static readonly DerObjectIdentifier IdShake128Len = HashAlgs.Branch("17");
+ public static readonly DerObjectIdentifier IdShake256Len = HashAlgs.Branch("18");
+ public static readonly DerObjectIdentifier IdKmacWithShake128 = HashAlgs.Branch("19");
+ public static readonly DerObjectIdentifier IdKmacWithShake256 = HashAlgs.Branch("20");
+
+ public static readonly DerObjectIdentifier Aes = new DerObjectIdentifier(NistAlgorithm + ".1");
+
+ public static readonly DerObjectIdentifier IdAes128Ecb = new DerObjectIdentifier(Aes + ".1");
+ public static readonly DerObjectIdentifier IdAes128Cbc = new DerObjectIdentifier(Aes + ".2");
+ public static readonly DerObjectIdentifier IdAes128Ofb = new DerObjectIdentifier(Aes + ".3");
+ public static readonly DerObjectIdentifier IdAes128Cfb = new DerObjectIdentifier(Aes + ".4");
+ public static readonly DerObjectIdentifier IdAes128Wrap = new DerObjectIdentifier(Aes + ".5");
+ public static readonly DerObjectIdentifier IdAes128Gcm = new DerObjectIdentifier(Aes + ".6");
+ public static readonly DerObjectIdentifier IdAes128Ccm = new DerObjectIdentifier(Aes + ".7");
+
+ public static readonly DerObjectIdentifier IdAes192Ecb = new DerObjectIdentifier(Aes + ".21");
+ public static readonly DerObjectIdentifier IdAes192Cbc = new DerObjectIdentifier(Aes + ".22");
+ public static readonly DerObjectIdentifier IdAes192Ofb = new DerObjectIdentifier(Aes + ".23");
+ public static readonly DerObjectIdentifier IdAes192Cfb = new DerObjectIdentifier(Aes + ".24");
+ public static readonly DerObjectIdentifier IdAes192Wrap = new DerObjectIdentifier(Aes + ".25");
+ public static readonly DerObjectIdentifier IdAes192Gcm = new DerObjectIdentifier(Aes + ".26");
+ public static readonly DerObjectIdentifier IdAes192Ccm = new DerObjectIdentifier(Aes + ".27");
+
+ public static readonly DerObjectIdentifier IdAes256Ecb = new DerObjectIdentifier(Aes + ".41");
+ public static readonly DerObjectIdentifier IdAes256Cbc = new DerObjectIdentifier(Aes + ".42");
+ public static readonly DerObjectIdentifier IdAes256Ofb = new DerObjectIdentifier(Aes + ".43");
+ public static readonly DerObjectIdentifier IdAes256Cfb = new DerObjectIdentifier(Aes + ".44");
+ public static readonly DerObjectIdentifier IdAes256Wrap = new DerObjectIdentifier(Aes + ".45");
+ public static readonly DerObjectIdentifier IdAes256Gcm = new DerObjectIdentifier(Aes + ".46");
+ public static readonly DerObjectIdentifier IdAes256Ccm = new DerObjectIdentifier(Aes + ".47");
+
+ //
+ // signatures
+ //
+ public static readonly DerObjectIdentifier IdDsaWithSha2 = new DerObjectIdentifier(NistAlgorithm + ".3");
+
+ public static readonly DerObjectIdentifier DsaWithSha224 = new DerObjectIdentifier(IdDsaWithSha2 + ".1");
+ public static readonly DerObjectIdentifier DsaWithSha256 = new DerObjectIdentifier(IdDsaWithSha2 + ".2");
+ public static readonly DerObjectIdentifier DsaWithSha384 = new DerObjectIdentifier(IdDsaWithSha2 + ".3");
+ public static readonly DerObjectIdentifier DsaWithSha512 = new DerObjectIdentifier(IdDsaWithSha2 + ".4");
+
+ /** 2.16.840.1.101.3.4.3.5 */
+ public static readonly DerObjectIdentifier IdDsaWithSha3_224 = new DerObjectIdentifier(IdDsaWithSha2 + ".5");
+ /** 2.16.840.1.101.3.4.3.6 */
+ public static readonly DerObjectIdentifier IdDsaWithSha3_256 = new DerObjectIdentifier(IdDsaWithSha2 + ".6");
+ /** 2.16.840.1.101.3.4.3.7 */
+ public static readonly DerObjectIdentifier IdDsaWithSha3_384 = new DerObjectIdentifier(IdDsaWithSha2 + ".7");
+ /** 2.16.840.1.101.3.4.3.8 */
+ public static readonly DerObjectIdentifier IdDsaWithSha3_512 = new DerObjectIdentifier(IdDsaWithSha2 + ".8");
+
+ // ECDSA with SHA-3
+ /** 2.16.840.1.101.3.4.3.9 */
+ public static readonly DerObjectIdentifier IdEcdsaWithSha3_224 = new DerObjectIdentifier(IdDsaWithSha2 + ".9");
+ /** 2.16.840.1.101.3.4.3.10 */
+ public static readonly DerObjectIdentifier IdEcdsaWithSha3_256 = new DerObjectIdentifier(IdDsaWithSha2 + ".10");
+ /** 2.16.840.1.101.3.4.3.11 */
+ public static readonly DerObjectIdentifier IdEcdsaWithSha3_384 = new DerObjectIdentifier(IdDsaWithSha2 + ".11");
+ /** 2.16.840.1.101.3.4.3.12 */
+ public static readonly DerObjectIdentifier IdEcdsaWithSha3_512 = new DerObjectIdentifier(IdDsaWithSha2 + ".12");
+
+ // RSA PKCS #1 v1.5 Signature with SHA-3 family.
+ /** 2.16.840.1.101.3.4.3.9 */
+ public static readonly DerObjectIdentifier IdRsassaPkcs1V15WithSha3_224 = new DerObjectIdentifier(IdDsaWithSha2 + ".13");
+ /** 2.16.840.1.101.3.4.3.10 */
+ public static readonly DerObjectIdentifier IdRsassaPkcs1V15WithSha3_256 = new DerObjectIdentifier(IdDsaWithSha2 + ".14");
+ /** 2.16.840.1.101.3.4.3.11 */
+ public static readonly DerObjectIdentifier IdRsassaPkcs1V15WithSha3_384 = new DerObjectIdentifier(IdDsaWithSha2 + ".15");
+ /** 2.16.840.1.101.3.4.3.12 */
+ public static readonly DerObjectIdentifier IdRsassaPkcs1V15WithSha3_512 = new DerObjectIdentifier(IdDsaWithSha2 + ".16");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..4c60f8ef
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nist/NISTObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6056fa0387de90644b8ed0dc77361e4d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri.meta
new file mode 100644
index 00000000..bb40d7e6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b6096e4d257a01641b9309842a6ca233
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri/NsriObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri/NsriObjectIdentifiers.cs
new file mode 100644
index 00000000..c65da543
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri/NsriObjectIdentifiers.cs
@@ -0,0 +1,63 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nsri
+{
+ public sealed class NsriObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier nsri = new DerObjectIdentifier("1.2.410.200046");
+
+ public static readonly DerObjectIdentifier id_algorithm = nsri.Branch("1");
+
+ public static readonly DerObjectIdentifier id_sea = id_algorithm.Branch("1");
+ public static readonly DerObjectIdentifier id_pad = id_algorithm.Branch("2");
+
+ public static readonly DerObjectIdentifier id_pad_null = id_algorithm.Branch("0");
+ public static readonly DerObjectIdentifier id_pad_1 = id_algorithm.Branch("1");
+
+ public static readonly DerObjectIdentifier id_aria128_ecb = id_sea.Branch("1");
+ public static readonly DerObjectIdentifier id_aria128_cbc = id_sea.Branch("2");
+ public static readonly DerObjectIdentifier id_aria128_cfb = id_sea.Branch("3");
+ public static readonly DerObjectIdentifier id_aria128_ofb = id_sea.Branch("4");
+ public static readonly DerObjectIdentifier id_aria128_ctr = id_sea.Branch("5");
+
+ public static readonly DerObjectIdentifier id_aria192_ecb = id_sea.Branch("6");
+ public static readonly DerObjectIdentifier id_aria192_cbc = id_sea.Branch("7");
+ public static readonly DerObjectIdentifier id_aria192_cfb = id_sea.Branch("8");
+ public static readonly DerObjectIdentifier id_aria192_ofb = id_sea.Branch("9");
+ public static readonly DerObjectIdentifier id_aria192_ctr = id_sea.Branch("10");
+
+ public static readonly DerObjectIdentifier id_aria256_ecb = id_sea.Branch("11");
+ public static readonly DerObjectIdentifier id_aria256_cbc = id_sea.Branch("12");
+ public static readonly DerObjectIdentifier id_aria256_cfb = id_sea.Branch("13");
+ public static readonly DerObjectIdentifier id_aria256_ofb = id_sea.Branch("14");
+ public static readonly DerObjectIdentifier id_aria256_ctr = id_sea.Branch("15");
+
+ public static readonly DerObjectIdentifier id_aria128_cmac = id_sea.Branch("21");
+ public static readonly DerObjectIdentifier id_aria192_cmac = id_sea.Branch("22");
+ public static readonly DerObjectIdentifier id_aria256_cmac = id_sea.Branch("23");
+
+ public static readonly DerObjectIdentifier id_aria128_ocb2 = id_sea.Branch("31");
+ public static readonly DerObjectIdentifier id_aria192_ocb2 = id_sea.Branch("32");
+ public static readonly DerObjectIdentifier id_aria256_ocb2 = id_sea.Branch("33");
+
+ public static readonly DerObjectIdentifier id_aria128_gcm = id_sea.Branch("34");
+ public static readonly DerObjectIdentifier id_aria192_gcm = id_sea.Branch("35");
+ public static readonly DerObjectIdentifier id_aria256_gcm = id_sea.Branch("36");
+
+ public static readonly DerObjectIdentifier id_aria128_ccm = id_sea.Branch("37");
+ public static readonly DerObjectIdentifier id_aria192_ccm = id_sea.Branch("38");
+ public static readonly DerObjectIdentifier id_aria256_ccm = id_sea.Branch("39");
+
+ public static readonly DerObjectIdentifier id_aria128_kw = id_sea.Branch("40");
+ public static readonly DerObjectIdentifier id_aria192_kw = id_sea.Branch("41");
+ public static readonly DerObjectIdentifier id_aria256_kw = id_sea.Branch("42");
+
+ public static readonly DerObjectIdentifier id_aria128_kwp = id_sea.Branch("43");
+ public static readonly DerObjectIdentifier id_aria192_kwp = id_sea.Branch("44");
+ public static readonly DerObjectIdentifier id_aria256_kwp = id_sea.Branch("45");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri/NsriObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri/NsriObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..69cee6d9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/nsri/NsriObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e7b5851fbe594304f841ec00dae22ec2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt.meta
new file mode 100644
index 00000000..ccf6c794
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0789eb0ee84bbb641a1b9d8a19843768
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt/NTTObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt/NTTObjectIdentifiers.cs
new file mode 100644
index 00000000..3e62dbcc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt/NTTObjectIdentifiers.cs
@@ -0,0 +1,18 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ntt
+{
+ /// From RFC 3657
+ public abstract class NttObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier IdCamellia128Cbc = new DerObjectIdentifier("1.2.392.200011.61.1.1.1.2");
+ public static readonly DerObjectIdentifier IdCamellia192Cbc = new DerObjectIdentifier("1.2.392.200011.61.1.1.1.3");
+ public static readonly DerObjectIdentifier IdCamellia256Cbc = new DerObjectIdentifier("1.2.392.200011.61.1.1.1.4");
+
+ public static readonly DerObjectIdentifier IdCamellia128Wrap = new DerObjectIdentifier("1.2.392.200011.61.1.1.3.2");
+ public static readonly DerObjectIdentifier IdCamellia192Wrap = new DerObjectIdentifier("1.2.392.200011.61.1.1.3.3");
+ public static readonly DerObjectIdentifier IdCamellia256Wrap = new DerObjectIdentifier("1.2.392.200011.61.1.1.3.4");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt/NTTObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt/NTTObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..6002e40e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ntt/NTTObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 08c35f4be43a28944a4db9c088b7312f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp.meta
new file mode 100644
index 00000000..103ed668
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 049b1b14b33e02b4a9dff0258f94f6b9
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/BasicOCSPResponse.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/BasicOCSPResponse.cs
new file mode 100644
index 00000000..9d6b6c5d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/BasicOCSPResponse.cs
@@ -0,0 +1,111 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class BasicOcspResponse
+ : Asn1Encodable
+ {
+ private readonly ResponseData tbsResponseData;
+ private readonly AlgorithmIdentifier signatureAlgorithm;
+ private readonly DerBitString signature;
+ private readonly Asn1Sequence certs;
+
+ public static BasicOcspResponse GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static BasicOcspResponse GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is BasicOcspResponse)
+ {
+ return (BasicOcspResponse)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new BasicOcspResponse((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public BasicOcspResponse(
+ ResponseData tbsResponseData,
+ AlgorithmIdentifier signatureAlgorithm,
+ DerBitString signature,
+ Asn1Sequence certs)
+ {
+ this.tbsResponseData = tbsResponseData;
+ this.signatureAlgorithm = signatureAlgorithm;
+ this.signature = signature;
+ this.certs = certs;
+ }
+
+ private BasicOcspResponse(
+ Asn1Sequence seq)
+ {
+ this.tbsResponseData = ResponseData.GetInstance(seq[0]);
+ this.signatureAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
+ this.signature = (DerBitString)seq[2];
+
+ if (seq.Count > 3)
+ {
+ this.certs = Asn1Sequence.GetInstance((Asn1TaggedObject)seq[3], true);
+ }
+ }
+
+ public ResponseData TbsResponseData
+ {
+ get { return tbsResponseData; }
+ }
+
+ public AlgorithmIdentifier SignatureAlgorithm
+ {
+ get { return signatureAlgorithm; }
+ }
+
+ public DerBitString Signature
+ {
+ get { return signature; }
+ }
+
+ public byte[] GetSignatureOctets()
+ {
+ return signature.GetOctets();
+ }
+
+ public Asn1Sequence Certs
+ {
+ get { return certs; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * BasicOcspResponse ::= Sequence {
+ * tbsResponseData ResponseData,
+ * signatureAlgorithm AlgorithmIdentifier,
+ * signature BIT STRING,
+ * certs [0] EXPLICIT Sequence OF Certificate OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(tbsResponseData, signatureAlgorithm, signature);
+ v.AddOptionalTagged(true, 0, certs);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/BasicOCSPResponse.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/BasicOCSPResponse.cs.meta
new file mode 100644
index 00000000..febf9912
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/BasicOCSPResponse.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a78e148fa5ffe994ca6bb04d921c50ba
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertID.cs
new file mode 100644
index 00000000..ce29e9f0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertID.cs
@@ -0,0 +1,103 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class CertID
+ : Asn1Encodable
+ {
+ private readonly AlgorithmIdentifier hashAlgorithm;
+ private readonly Asn1OctetString issuerNameHash;
+ private readonly Asn1OctetString issuerKeyHash;
+ private readonly DerInteger serialNumber;
+
+ public static CertID GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static CertID GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CertID)
+ {
+ return (CertID)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new CertID((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public CertID(
+ AlgorithmIdentifier hashAlgorithm,
+ Asn1OctetString issuerNameHash,
+ Asn1OctetString issuerKeyHash,
+ DerInteger serialNumber)
+ {
+ this.hashAlgorithm = hashAlgorithm;
+ this.issuerNameHash = issuerNameHash;
+ this.issuerKeyHash = issuerKeyHash;
+ this.serialNumber = serialNumber;
+ }
+
+ private CertID(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 4)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.hashAlgorithm = AlgorithmIdentifier.GetInstance(seq[0]);
+ this.issuerNameHash = Asn1OctetString.GetInstance(seq[1]);
+ this.issuerKeyHash = Asn1OctetString.GetInstance(seq[2]);
+ this.serialNumber = DerInteger.GetInstance(seq[3]);
+ }
+
+ public AlgorithmIdentifier HashAlgorithm
+ {
+ get { return hashAlgorithm; }
+ }
+
+ public Asn1OctetString IssuerNameHash
+ {
+ get { return issuerNameHash; }
+ }
+
+ public Asn1OctetString IssuerKeyHash
+ {
+ get { return issuerKeyHash; }
+ }
+
+ public DerInteger SerialNumber
+ {
+ get { return serialNumber; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * CertID ::= Sequence {
+ * hashAlgorithm AlgorithmIdentifier,
+ * issuerNameHash OCTET STRING, -- Hash of Issuer's DN
+ * issuerKeyHash OCTET STRING, -- Hash of Issuers public key
+ * serialNumber CertificateSerialNumber }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(hashAlgorithm, issuerNameHash, issuerKeyHash, serialNumber);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertID.cs.meta
new file mode 100644
index 00000000..775013c8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7bd00837f4fea0643a1b2ebd06c721b3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertStatus.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertStatus.cs
new file mode 100644
index 00000000..cd9a2d8e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertStatus.cs
@@ -0,0 +1,101 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class CertStatus
+ : Asn1Encodable, IAsn1Choice
+ {
+ private readonly int tagNo;
+ private readonly Asn1Encodable value;
+
+ /**
+ * create a CertStatus object with a tag of zero.
+ */
+ public CertStatus()
+ {
+ tagNo = 0;
+ value = DerNull.Instance;
+ }
+
+ public CertStatus(
+ RevokedInfo info)
+ {
+ tagNo = 1;
+ value = info;
+ }
+
+ public CertStatus(
+ int tagNo,
+ Asn1Encodable value)
+ {
+ this.tagNo = tagNo;
+ this.value = value;
+ }
+
+ public CertStatus(Asn1TaggedObject choice)
+ {
+ this.tagNo = choice.TagNo;
+
+ switch (choice.TagNo)
+ {
+ case 0:
+ value = Asn1Null.GetInstance(choice, false);
+ break;
+ case 1:
+ value = RevokedInfo.GetInstance(choice, false);
+ break;
+ case 2:
+ value = Asn1Null.GetInstance(choice, false);
+ break;
+ default:
+ throw new ArgumentException("Unknown tag encountered: " + Asn1Utilities.GetTagText(choice));
+ }
+ }
+
+ public static CertStatus GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CertStatus)
+ {
+ return (CertStatus)obj;
+ }
+
+ if (obj is Asn1TaggedObject)
+ {
+ return new CertStatus((Asn1TaggedObject)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public int TagNo
+ {
+ get { return tagNo; }
+ }
+
+ public Asn1Encodable Status
+ {
+ get { return value; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * CertStatus ::= CHOICE {
+ * good [0] IMPLICIT Null,
+ * revoked [1] IMPLICIT RevokedInfo,
+ * unknown [2] IMPLICIT UnknownInfo }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerTaggedObject(false, tagNo, value);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertStatus.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertStatus.cs.meta
new file mode 100644
index 00000000..3e2be4aa
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CertStatus.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4d3ba235321f4a0499f25d3aaca6e1ad
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CrlID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CrlID.cs
new file mode 100644
index 00000000..62fedc09
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CrlID.cs
@@ -0,0 +1,71 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class CrlID
+ : Asn1Encodable
+ {
+ private readonly DerIA5String crlUrl;
+ private readonly DerInteger crlNum;
+ private readonly Asn1GeneralizedTime crlTime;
+
+ // TODO Add GetInstance method(s) and make this private?
+ public CrlID(Asn1Sequence seq)
+ {
+ foreach (Asn1TaggedObject o in seq)
+ {
+ switch (o.TagNo)
+ {
+ case 0:
+ crlUrl = DerIA5String.GetInstance(o, true);
+ break;
+ case 1:
+ crlNum = DerInteger.GetInstance(o, true);
+ break;
+ case 2:
+ crlTime = Asn1GeneralizedTime.GetInstance(o, true);
+ break;
+ default:
+ throw new ArgumentException("unknown tag number: " + o.TagNo);
+ }
+ }
+ }
+
+ public DerIA5String CrlUrl
+ {
+ get { return crlUrl; }
+ }
+
+ public DerInteger CrlNum
+ {
+ get { return crlNum; }
+ }
+
+ public Asn1GeneralizedTime CrlTime
+ {
+ get { return crlTime; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * CrlID ::= Sequence {
+ * crlUrl [0] EXPLICIT IA5String OPTIONAL,
+ * crlNum [1] EXPLICIT Integer OPTIONAL,
+ * crlTime [2] EXPLICIT GeneralizedTime OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, crlUrl);
+ v.AddOptionalTagged(true, 1, crlNum);
+ v.AddOptionalTagged(true, 2, crlTime);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CrlID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CrlID.cs.meta
new file mode 100644
index 00000000..ee2482b7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/CrlID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9a270ddb13f9b024e8328f62d7a75ede
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPObjectIdentifiers.cs
new file mode 100644
index 00000000..6b76fcea
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPObjectIdentifiers.cs
@@ -0,0 +1,27 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public abstract class OcspObjectIdentifiers
+ {
+ internal const string PkixOcspId = "1.3.6.1.5.5.7.48.1";
+
+ public static readonly DerObjectIdentifier PkixOcsp = new DerObjectIdentifier(PkixOcspId);
+ public static readonly DerObjectIdentifier PkixOcspBasic = new DerObjectIdentifier(PkixOcspId + ".1");
+
+ //
+ // extensions
+ //
+ public static readonly DerObjectIdentifier PkixOcspNonce = new DerObjectIdentifier(PkixOcsp + ".2");
+ public static readonly DerObjectIdentifier PkixOcspCrl = new DerObjectIdentifier(PkixOcsp + ".3");
+
+ public static readonly DerObjectIdentifier PkixOcspResponse = new DerObjectIdentifier(PkixOcsp + ".4");
+ public static readonly DerObjectIdentifier PkixOcspNocheck = new DerObjectIdentifier(PkixOcsp + ".5");
+ public static readonly DerObjectIdentifier PkixOcspArchiveCutoff = new DerObjectIdentifier(PkixOcsp + ".6");
+ public static readonly DerObjectIdentifier PkixOcspServiceLocator = new DerObjectIdentifier(PkixOcsp + ".7");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..b3561a0d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3cdf3f483bd239a438f365b5c7116bfd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPRequest.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPRequest.cs
new file mode 100644
index 00000000..236a8d97
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPRequest.cs
@@ -0,0 +1,88 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class OcspRequest
+ : Asn1Encodable
+ {
+ private readonly TbsRequest tbsRequest;
+ private readonly Signature optionalSignature;
+
+ public static OcspRequest GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static OcspRequest GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OcspRequest)
+ {
+ return (OcspRequest)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new OcspRequest((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public OcspRequest(
+ TbsRequest tbsRequest,
+ Signature optionalSignature)
+ {
+ if (tbsRequest == null)
+ throw new ArgumentNullException("tbsRequest");
+
+ this.tbsRequest = tbsRequest;
+ this.optionalSignature = optionalSignature;
+ }
+
+ private OcspRequest(
+ Asn1Sequence seq)
+ {
+ tbsRequest = TbsRequest.GetInstance(seq[0]);
+
+ if (seq.Count == 2)
+ {
+ optionalSignature = Signature.GetInstance(
+ (Asn1TaggedObject)seq[1], true);
+ }
+ }
+
+ public TbsRequest TbsRequest
+ {
+ get { return tbsRequest; }
+ }
+
+ public Signature OptionalSignature
+ {
+ get { return optionalSignature; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * OcspRequest ::= Sequence {
+ * tbsRequest TBSRequest,
+ * optionalSignature [0] EXPLICIT Signature OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(tbsRequest);
+ v.AddOptionalTagged(true, 0, optionalSignature);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPRequest.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPRequest.cs.meta
new file mode 100644
index 00000000..0b08029d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPRequest.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0f00ee9eee897a047869c0862e6022e5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponse.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponse.cs
new file mode 100644
index 00000000..7892231b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponse.cs
@@ -0,0 +1,89 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class OcspResponse
+ : Asn1Encodable
+ {
+ private readonly OcspResponseStatus responseStatus;
+ private readonly ResponseBytes responseBytes;
+
+ public static OcspResponse GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static OcspResponse GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is OcspResponse)
+ {
+ return (OcspResponse)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new OcspResponse((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public OcspResponse(
+ OcspResponseStatus responseStatus,
+ ResponseBytes responseBytes)
+ {
+ if (responseStatus == null)
+ throw new ArgumentNullException("responseStatus");
+
+ this.responseStatus = responseStatus;
+ this.responseBytes = responseBytes;
+ }
+
+ private OcspResponse(
+ Asn1Sequence seq)
+ {
+ responseStatus = new OcspResponseStatus(
+ DerEnumerated.GetInstance(seq[0]));
+
+ if (seq.Count == 2)
+ {
+ responseBytes = ResponseBytes.GetInstance(
+ (Asn1TaggedObject)seq[1], true);
+ }
+ }
+
+ public OcspResponseStatus ResponseStatus
+ {
+ get { return responseStatus; }
+ }
+
+ public ResponseBytes ResponseBytes
+ {
+ get { return responseBytes; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * OcspResponse ::= Sequence {
+ * responseStatus OcspResponseStatus,
+ * responseBytes [0] EXPLICIT ResponseBytes OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(responseStatus);
+ v.AddOptionalTagged(true, 0, responseBytes);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponse.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponse.cs.meta
new file mode 100644
index 00000000..e7404c8b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponse.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 25f607595e44d8f468452cba8e765218
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponseStatus.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponseStatus.cs
new file mode 100644
index 00000000..e377107b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponseStatus.cs
@@ -0,0 +1,45 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class OcspResponseStatus
+ : DerEnumerated
+ {
+ public const int Successful = 0;
+ public const int MalformedRequest = 1;
+ public const int InternalError = 2;
+ public const int TryLater = 3;
+ public const int SignatureRequired = 5;
+ public const int Unauthorized = 6;
+
+ /**
+ * The OcspResponseStatus enumeration.
+ *
+ * OcspResponseStatus ::= Enumerated {
+ * successful (0), --Response has valid confirmations
+ * malformedRequest (1), --Illegal confirmation request
+ * internalError (2), --Internal error in issuer
+ * tryLater (3), --Try again later
+ * --(4) is not used
+ * sigRequired (5), --Must sign the request
+ * unauthorized (6) --Request unauthorized
+ * }
+ *
+ */
+ public OcspResponseStatus(int value)
+ : base(value)
+ {
+ }
+
+ public OcspResponseStatus(DerEnumerated value)
+ : base(value.IntValueExact)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponseStatus.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponseStatus.cs.meta
new file mode 100644
index 00000000..c2a94688
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/OCSPResponseStatus.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 343e1dfaaabbf324faae98c0b4ca3016
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Request.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Request.cs
new file mode 100644
index 00000000..37e7177d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Request.cs
@@ -0,0 +1,90 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class Request
+ : Asn1Encodable
+ {
+ private readonly CertID reqCert;
+ private readonly X509Extensions singleRequestExtensions;
+
+ public static Request GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static Request GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is Request)
+ {
+ return (Request)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new Request((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public Request(
+ CertID reqCert,
+ X509Extensions singleRequestExtensions)
+ {
+ if (reqCert == null)
+ throw new ArgumentNullException("reqCert");
+
+ this.reqCert = reqCert;
+ this.singleRequestExtensions = singleRequestExtensions;
+ }
+
+ private Request(
+ Asn1Sequence seq)
+ {
+ reqCert = CertID.GetInstance(seq[0]);
+
+ if (seq.Count == 2)
+ {
+ singleRequestExtensions = X509Extensions.GetInstance(
+ (Asn1TaggedObject)seq[1], true);
+ }
+ }
+
+ public CertID ReqCert
+ {
+ get { return reqCert; }
+ }
+
+ public X509Extensions SingleRequestExtensions
+ {
+ get { return singleRequestExtensions; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Request ::= Sequence {
+ * reqCert CertID,
+ * singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(reqCert);
+ v.AddOptionalTagged(true, 0, singleRequestExtensions);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Request.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Request.cs.meta
new file mode 100644
index 00000000..414d1fa9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Request.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 33c7d75991000524cbad39572f8566f8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponderID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponderID.cs
new file mode 100644
index 00000000..bd30bd0c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponderID.cs
@@ -0,0 +1,111 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class ResponderID
+ : Asn1Encodable, IAsn1Choice
+ {
+ private readonly Asn1Encodable id;
+
+ public static ResponderID GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is ResponderID)
+ {
+ return (ResponderID)obj;
+ }
+
+ if (obj is DerOctetString)
+ {
+ return new ResponderID((DerOctetString)obj);
+ }
+
+ if (obj is Asn1TaggedObject)
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject)obj;
+
+ if (o.TagNo == 1)
+ {
+ return new ResponderID(X509Name.GetInstance(o, true));
+ }
+
+ return new ResponderID(Asn1OctetString.GetInstance(o, true));
+ }
+
+ return new ResponderID(X509Name.GetInstance(obj));
+ }
+
+ public ResponderID(
+ Asn1OctetString id)
+ {
+ if (id == null)
+ throw new ArgumentNullException("id");
+
+ this.id = id;
+ }
+
+ public ResponderID(
+ X509Name id)
+ {
+ if (id == null)
+ throw new ArgumentNullException("id");
+
+ this.id = id;
+ }
+
+ public static ResponderID GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(obj.GetObject()); // must be explicitly tagged
+ }
+
+ public virtual byte[] GetKeyHash()
+ {
+ if (id is Asn1OctetString)
+ {
+ return ((Asn1OctetString)id).GetOctets();
+ }
+
+ return null;
+ }
+
+ public virtual X509Name Name
+ {
+ get
+ {
+ if (id is Asn1OctetString)
+ {
+ return null;
+ }
+
+ return X509Name.GetInstance(id);
+ }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * ResponderID ::= CHOICE {
+ * byName [1] Name,
+ * byKey [2] KeyHash }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (id is Asn1OctetString)
+ {
+ return new DerTaggedObject(true, 2, id);
+ }
+
+ return new DerTaggedObject(true, 1, id);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponderID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponderID.cs.meta
new file mode 100644
index 00000000..4ca7b2f9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponderID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fc63b7779ff0c61439730ae8bba82848
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseBytes.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseBytes.cs
new file mode 100644
index 00000000..71b0286a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseBytes.cs
@@ -0,0 +1,86 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class ResponseBytes
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier responseType;
+ private readonly Asn1OctetString response;
+
+ public static ResponseBytes GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static ResponseBytes GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is ResponseBytes)
+ {
+ return (ResponseBytes)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new ResponseBytes((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public ResponseBytes(
+ DerObjectIdentifier responseType,
+ Asn1OctetString response)
+ {
+ if (responseType == null)
+ throw new ArgumentNullException("responseType");
+ if (response == null)
+ throw new ArgumentNullException("response");
+
+ this.responseType = responseType;
+ this.response = response;
+ }
+
+ private ResponseBytes(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.responseType = DerObjectIdentifier.GetInstance(seq[0]);
+ this.response = Asn1OctetString.GetInstance(seq[1]);
+ }
+
+ public DerObjectIdentifier ResponseType
+ {
+ get { return responseType; }
+ }
+
+ public Asn1OctetString Response
+ {
+ get { return response; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * ResponseBytes ::= Sequence {
+ * responseType OBJECT IDENTIFIER,
+ * response OCTET STRING }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(responseType, response);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseBytes.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseBytes.cs.meta
new file mode 100644
index 00000000..4a13e7e8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseBytes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a810ad92acb00f242af349509d44cb4b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseData.cs
new file mode 100644
index 00000000..4b61cb56
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseData.cs
@@ -0,0 +1,157 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class ResponseData
+ : Asn1Encodable
+ {
+ private static readonly DerInteger V1 = new DerInteger(0);
+
+ private readonly bool versionPresent;
+ private readonly DerInteger version;
+ private readonly ResponderID responderID;
+ private readonly Asn1GeneralizedTime producedAt;
+ private readonly Asn1Sequence responses;
+ private readonly X509Extensions responseExtensions;
+
+ public static ResponseData GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static ResponseData GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is ResponseData)
+ {
+ return (ResponseData)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new ResponseData((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public ResponseData(
+ DerInteger version,
+ ResponderID responderID,
+ Asn1GeneralizedTime producedAt,
+ Asn1Sequence responses,
+ X509Extensions responseExtensions)
+ {
+ this.version = version;
+ this.responderID = responderID;
+ this.producedAt = producedAt;
+ this.responses = responses;
+ this.responseExtensions = responseExtensions;
+ }
+
+ public ResponseData(
+ ResponderID responderID,
+ Asn1GeneralizedTime producedAt,
+ Asn1Sequence responses,
+ X509Extensions responseExtensions)
+ : this(V1, responderID, producedAt, responses, responseExtensions)
+ {
+ }
+
+ private ResponseData(
+ Asn1Sequence seq)
+ {
+ int index = 0;
+
+ Asn1Encodable enc = seq[0];
+ if (enc is Asn1TaggedObject)
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject)enc;
+
+ if (o.TagNo == 0)
+ {
+ this.versionPresent = true;
+ this.version = DerInteger.GetInstance(o, true);
+ index++;
+ }
+ else
+ {
+ this.version = V1;
+ }
+ }
+ else
+ {
+ this.version = V1;
+ }
+
+ this.responderID = ResponderID.GetInstance(seq[index++]);
+ this.producedAt = (Asn1GeneralizedTime)seq[index++];
+ this.responses = (Asn1Sequence)seq[index++];
+
+ if (seq.Count > index)
+ {
+ this.responseExtensions = X509Extensions.GetInstance(
+ (Asn1TaggedObject)seq[index], true);
+ }
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public ResponderID ResponderID
+ {
+ get { return responderID; }
+ }
+
+ public Asn1GeneralizedTime ProducedAt
+ {
+ get { return producedAt; }
+ }
+
+ public Asn1Sequence Responses
+ {
+ get { return responses; }
+ }
+
+ public X509Extensions ResponseExtensions
+ {
+ get { return responseExtensions; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * ResponseData ::= Sequence {
+ * version [0] EXPLICIT Version DEFAULT v1,
+ * responderID ResponderID,
+ * producedAt GeneralizedTime,
+ * responses Sequence OF SingleResponse,
+ * responseExtensions [1] EXPLICIT Extensions OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (versionPresent || !version.Equals(V1))
+ {
+ v.Add(new DerTaggedObject(true, 0, version));
+ }
+
+ v.Add(responderID, producedAt, responses);
+ v.AddOptionalTagged(true, 1, responseExtensions);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseData.cs.meta
new file mode 100644
index 00000000..26ecb25a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ResponseData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 73f04262b993eaa4cb9f283fef37a601
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/RevokedInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/RevokedInfo.cs
new file mode 100644
index 00000000..f80b4b28
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/RevokedInfo.cs
@@ -0,0 +1,95 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class RevokedInfo
+ : Asn1Encodable
+ {
+ private readonly Asn1GeneralizedTime revocationTime;
+ private readonly CrlReason revocationReason;
+
+ public static RevokedInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static RevokedInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is RevokedInfo)
+ {
+ return (RevokedInfo) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new RevokedInfo((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public RevokedInfo(
+ Asn1GeneralizedTime revocationTime)
+ : this(revocationTime, null)
+ {
+ }
+
+ public RevokedInfo(
+ Asn1GeneralizedTime revocationTime,
+ CrlReason revocationReason)
+ {
+ if (revocationTime == null)
+ throw new ArgumentNullException("revocationTime");
+
+ this.revocationTime = revocationTime;
+ this.revocationReason = revocationReason;
+ }
+
+ private RevokedInfo(
+ Asn1Sequence seq)
+ {
+ this.revocationTime = (Asn1GeneralizedTime)seq[0];
+
+ if (seq.Count > 1)
+ {
+ this.revocationReason = new CrlReason(
+ DerEnumerated.GetInstance((Asn1TaggedObject) seq[1], true));
+ }
+ }
+
+ public Asn1GeneralizedTime RevocationTime
+ {
+ get { return revocationTime; }
+ }
+
+ public CrlReason RevocationReason
+ {
+ get { return revocationReason; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * RevokedInfo ::= Sequence {
+ * revocationTime GeneralizedTime,
+ * revocationReason [0] EXPLICIT CRLReason OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(revocationTime);
+ v.AddOptionalTagged(true, 0, revocationReason);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/RevokedInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/RevokedInfo.cs.meta
new file mode 100644
index 00000000..ddababa9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/RevokedInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 74e47e4f5d7ee1348a13175e36afb12a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ServiceLocator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ServiceLocator.cs
new file mode 100644
index 00000000..e0e13f95
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ServiceLocator.cs
@@ -0,0 +1,94 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class ServiceLocator
+ : Asn1Encodable
+ {
+ private readonly X509Name issuer;
+ private readonly Asn1Object locator;
+
+ public static ServiceLocator GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static ServiceLocator GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is ServiceLocator)
+ {
+ return (ServiceLocator) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new ServiceLocator((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public ServiceLocator(
+ X509Name issuer)
+ : this(issuer, null)
+ {
+ }
+
+ public ServiceLocator(
+ X509Name issuer,
+ Asn1Object locator)
+ {
+ if (issuer == null)
+ throw new ArgumentNullException("issuer");
+
+ this.issuer = issuer;
+ this.locator = locator;
+ }
+
+ private ServiceLocator(
+ Asn1Sequence seq)
+ {
+ this.issuer = X509Name.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ this.locator = seq[1].ToAsn1Object();
+ }
+ }
+
+ public X509Name Issuer
+ {
+ get { return issuer; }
+ }
+
+ public Asn1Object Locator
+ {
+ get { return locator; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * ServiceLocator ::= Sequence {
+ * issuer Name,
+ * locator AuthorityInfoAccessSyntax OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(issuer);
+ v.AddOptional(locator);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ServiceLocator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ServiceLocator.cs.meta
new file mode 100644
index 00000000..83e82c91
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/ServiceLocator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c91e3d6069fb0e84d8c206a1f2213771
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Signature.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Signature.cs
new file mode 100644
index 00000000..c9c1e34a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Signature.cs
@@ -0,0 +1,113 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class Signature
+ : Asn1Encodable
+ {
+ internal AlgorithmIdentifier signatureAlgorithm;
+ internal DerBitString signatureValue;
+ internal Asn1Sequence certs;
+
+ public static Signature GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static Signature GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is Signature)
+ {
+ return (Signature)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new Signature((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public Signature(
+ AlgorithmIdentifier signatureAlgorithm,
+ DerBitString signatureValue)
+ : this(signatureAlgorithm, signatureValue, null)
+ {
+ }
+
+ public Signature(
+ AlgorithmIdentifier signatureAlgorithm,
+ DerBitString signatureValue,
+ Asn1Sequence certs)
+ {
+ if (signatureAlgorithm == null)
+ throw new ArgumentException("signatureAlgorithm");
+ if (signatureValue == null)
+ throw new ArgumentException("signatureValue");
+
+ this.signatureAlgorithm = signatureAlgorithm;
+ this.signatureValue = signatureValue;
+ this.certs = certs;
+ }
+
+ private Signature(
+ Asn1Sequence seq)
+ {
+ signatureAlgorithm = AlgorithmIdentifier.GetInstance(seq[0]);
+ signatureValue = (DerBitString)seq[1];
+
+ if (seq.Count == 3)
+ {
+ certs = Asn1Sequence.GetInstance(
+ (Asn1TaggedObject)seq[2], true);
+ }
+ }
+
+ public AlgorithmIdentifier SignatureAlgorithm
+ {
+ get { return signatureAlgorithm; }
+ }
+
+ public DerBitString SignatureValue
+ {
+ get { return signatureValue; }
+ }
+
+ public byte[] GetSignatureOctets()
+ {
+ return signatureValue.GetOctets();
+ }
+
+ public Asn1Sequence Certs
+ {
+ get { return certs; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Signature ::= Sequence {
+ * signatureAlgorithm AlgorithmIdentifier,
+ * signature BIT STRING,
+ * certs [0] EXPLICIT Sequence OF Certificate OPTIONAL}
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(signatureAlgorithm, signatureValue);
+ v.AddOptionalTagged(true, 0, certs);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Signature.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Signature.cs.meta
new file mode 100644
index 00000000..6a286067
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/Signature.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9cb8d71b9385de8418b5a722d2d9579a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/SingleResponse.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/SingleResponse.cs
new file mode 100644
index 00000000..8d58632d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/SingleResponse.cs
@@ -0,0 +1,131 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class SingleResponse
+ : Asn1Encodable
+ {
+ private readonly CertID certID;
+ private readonly CertStatus certStatus;
+ private readonly Asn1GeneralizedTime thisUpdate;
+ private readonly Asn1GeneralizedTime nextUpdate;
+ private readonly X509Extensions singleExtensions;
+
+ public SingleResponse(
+ CertID certID,
+ CertStatus certStatus,
+ Asn1GeneralizedTime thisUpdate,
+ Asn1GeneralizedTime nextUpdate,
+ X509Extensions singleExtensions)
+ {
+ this.certID = certID;
+ this.certStatus = certStatus;
+ this.thisUpdate = thisUpdate;
+ this.nextUpdate = nextUpdate;
+ this.singleExtensions = singleExtensions;
+ }
+
+ public SingleResponse(
+ Asn1Sequence seq)
+ {
+ this.certID = CertID.GetInstance(seq[0]);
+ this.certStatus = CertStatus.GetInstance(seq[1]);
+ this.thisUpdate = (Asn1GeneralizedTime)seq[2];
+
+ if (seq.Count > 4)
+ {
+ this.nextUpdate = Asn1GeneralizedTime.GetInstance(
+ (Asn1TaggedObject) seq[3], true);
+ this.singleExtensions = X509Extensions.GetInstance(
+ (Asn1TaggedObject) seq[4], true);
+ }
+ else if (seq.Count > 3)
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject) seq[3];
+
+ if (o.TagNo == 0)
+ {
+ this.nextUpdate = Asn1GeneralizedTime.GetInstance(o, true);
+ }
+ else
+ {
+ this.singleExtensions = X509Extensions.GetInstance(o, true);
+ }
+ }
+ }
+
+ public static SingleResponse GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static SingleResponse GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is SingleResponse)
+ {
+ return (SingleResponse)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new SingleResponse((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public CertID CertId
+ {
+ get { return certID; }
+ }
+
+ public CertStatus CertStatus
+ {
+ get { return certStatus; }
+ }
+
+ public Asn1GeneralizedTime ThisUpdate
+ {
+ get { return thisUpdate; }
+ }
+
+ public Asn1GeneralizedTime NextUpdate
+ {
+ get { return nextUpdate; }
+ }
+
+ public X509Extensions SingleExtensions
+ {
+ get { return singleExtensions; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * SingleResponse ::= Sequence {
+ * certID CertID,
+ * certStatus CertStatus,
+ * thisUpdate GeneralizedTime,
+ * nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL,
+ * singleExtensions [1] EXPLICIT Extensions OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(certID, certStatus, thisUpdate);
+ v.AddOptionalTagged(true, 0, nextUpdate);
+ v.AddOptionalTagged(true, 1, singleExtensions);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/SingleResponse.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/SingleResponse.cs.meta
new file mode 100644
index 00000000..ebe63f2a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/SingleResponse.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4214d46efe910cc4b854520cc23d9fa8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/TBSRequest.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/TBSRequest.cs
new file mode 100644
index 00000000..09fa1437
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/TBSRequest.cs
@@ -0,0 +1,146 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ocsp
+{
+ public class TbsRequest
+ : Asn1Encodable
+ {
+ private static readonly DerInteger V1 = new DerInteger(0);
+
+ private readonly DerInteger version;
+ private readonly GeneralName requestorName;
+ private readonly Asn1Sequence requestList;
+ private readonly X509Extensions requestExtensions;
+
+ private bool versionSet;
+
+ public static TbsRequest GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static TbsRequest GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is TbsRequest)
+ {
+ return (TbsRequest)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new TbsRequest((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public TbsRequest(
+ GeneralName requestorName,
+ Asn1Sequence requestList,
+ X509Extensions requestExtensions)
+ {
+ this.version = V1;
+ this.requestorName = requestorName;
+ this.requestList = requestList;
+ this.requestExtensions = requestExtensions;
+ }
+
+ private TbsRequest(
+ Asn1Sequence seq)
+ {
+ int index = 0;
+
+ Asn1Encodable enc = seq[0];
+ if (enc is Asn1TaggedObject)
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject) enc;
+
+ if (o.TagNo == 0)
+ {
+ versionSet = true;
+ version = DerInteger.GetInstance(o, true);
+ index++;
+ }
+ else
+ {
+ version = V1;
+ }
+ }
+ else
+ {
+ version = V1;
+ }
+
+ if (seq[index] is Asn1TaggedObject)
+ {
+ requestorName = GeneralName.GetInstance((Asn1TaggedObject) seq[index++], true);
+ }
+
+ requestList = (Asn1Sequence) seq[index++];
+
+ if (seq.Count == (index + 1))
+ {
+ requestExtensions = X509Extensions.GetInstance((Asn1TaggedObject) seq[index], true);
+ }
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public GeneralName RequestorName
+ {
+ get { return requestorName; }
+ }
+
+ public Asn1Sequence RequestList
+ {
+ get { return requestList; }
+ }
+
+ public X509Extensions RequestExtensions
+ {
+ get { return requestExtensions; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * TBSRequest ::= Sequence {
+ * version [0] EXPLICIT Version DEFAULT v1,
+ * requestorName [1] EXPLICIT GeneralName OPTIONAL,
+ * requestList Sequence OF Request,
+ * requestExtensions [2] EXPLICIT Extensions OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ //
+ // if default don't include - unless explicitly provided. Not strictly correct
+ // but required for some requests
+ //
+ if (!version.Equals(V1) || versionSet)
+ {
+ v.Add(new DerTaggedObject(true, 0, version));
+ }
+
+ v.AddOptionalTagged(true, 1, requestorName);
+ v.Add(requestList);
+ v.AddOptionalTagged(true, 2, requestExtensions);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/TBSRequest.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/TBSRequest.cs.meta
new file mode 100644
index 00000000..8f3e67b7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ocsp/TBSRequest.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6e4f53713011703448927be09e3bfbd3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw.meta
new file mode 100644
index 00000000..0b3afe64
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ca8b9848f4801244e93a8033cc87eb8b
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/ElGamalParameter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/ElGamalParameter.cs
new file mode 100644
index 00000000..7a5073f0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/ElGamalParameter.cs
@@ -0,0 +1,49 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw
+{
+ public class ElGamalParameter
+ : Asn1Encodable
+ {
+ internal DerInteger p, g;
+
+ public ElGamalParameter(
+ BigInteger p,
+ BigInteger g)
+ {
+ this.p = new DerInteger(p);
+ this.g = new DerInteger(g);
+ }
+
+ public ElGamalParameter(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ p = DerInteger.GetInstance(seq[0]);
+ g = DerInteger.GetInstance(seq[1]);
+ }
+
+ public BigInteger P
+ {
+ get { return p.PositiveValue; }
+ }
+
+ public BigInteger G
+ {
+ get { return g.PositiveValue; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(p, g);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/ElGamalParameter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/ElGamalParameter.cs.meta
new file mode 100644
index 00000000..254f8b2d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/ElGamalParameter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9bebdf735272df247a9624b98d485314
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/OIWObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/OIWObjectIdentifiers.cs
new file mode 100644
index 00000000..98dcdff2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/OIWObjectIdentifiers.cs
@@ -0,0 +1,33 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw
+{
+ public abstract class OiwObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier MD4WithRsa = new DerObjectIdentifier("1.3.14.3.2.2");
+ public static readonly DerObjectIdentifier MD5WithRsa = new DerObjectIdentifier("1.3.14.3.2.3");
+ public static readonly DerObjectIdentifier MD4WithRsaEncryption = new DerObjectIdentifier("1.3.14.3.2.4");
+
+ public static readonly DerObjectIdentifier DesEcb = new DerObjectIdentifier("1.3.14.3.2.6");
+ public static readonly DerObjectIdentifier DesCbc = new DerObjectIdentifier("1.3.14.3.2.7");
+ public static readonly DerObjectIdentifier DesOfb = new DerObjectIdentifier("1.3.14.3.2.8");
+ public static readonly DerObjectIdentifier DesCfb = new DerObjectIdentifier("1.3.14.3.2.9");
+
+ public static readonly DerObjectIdentifier DesEde = new DerObjectIdentifier("1.3.14.3.2.17");
+
+ // id-SHA1 OBJECT IDENTIFIER ::=
+ // {iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) 26 } //
+ public static readonly DerObjectIdentifier IdSha1 = new DerObjectIdentifier("1.3.14.3.2.26");
+
+ public static readonly DerObjectIdentifier DsaWithSha1 = new DerObjectIdentifier("1.3.14.3.2.27");
+
+ public static readonly DerObjectIdentifier Sha1WithRsa = new DerObjectIdentifier("1.3.14.3.2.29");
+
+ // ElGamal Algorithm OBJECT IDENTIFIER ::=
+ // {iso(1) identified-organization(3) oiw(14) dirservsig(7) algorithm(2) encryption(1) 1 }
+ //
+ public static readonly DerObjectIdentifier ElGamalAlgorithm = new DerObjectIdentifier("1.3.14.7.2.1.1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/OIWObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/OIWObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..713029bb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/oiw/OIWObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 575bfad451892c84387b8d6d36305943
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs.meta
new file mode 100644
index 00000000..59e7c165
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b87c35d0e53ee50469adc8ab6a06a396
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Attribute.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Attribute.cs
new file mode 100644
index 00000000..a66b6cf9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Attribute.cs
@@ -0,0 +1,83 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class AttributePkcs
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier attrType;
+ private readonly Asn1Set attrValues;
+
+ /**
+ * return an Attribute object from the given object.
+ *
+ * @param o the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static AttributePkcs GetInstance(
+ object obj)
+ {
+ AttributePkcs attr = obj as AttributePkcs;
+ if (obj == null || attr != null)
+ {
+ return attr;
+ }
+
+ Asn1Sequence seq = obj as Asn1Sequence;
+ if (seq != null)
+ {
+ return new AttributePkcs(seq);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private AttributePkcs(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ attrType = DerObjectIdentifier.GetInstance(seq[0]);
+ attrValues = Asn1Set.GetInstance(seq[1]);
+ }
+
+ public AttributePkcs(
+ DerObjectIdentifier attrType,
+ Asn1Set attrValues)
+ {
+ this.attrType = attrType;
+ this.attrValues = attrValues;
+ }
+
+ public DerObjectIdentifier AttrType
+ {
+ get { return attrType; }
+ }
+
+ public Asn1Set AttrValues
+ {
+ get { return attrValues; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Attr ::= Sequence {
+ * attrType OBJECT IDENTIFIER,
+ * attrValues Set OF AttributeValue
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(attrType, attrValues);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Attribute.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Attribute.cs.meta
new file mode 100644
index 00000000..1f1e0eab
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Attribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2d268672e1497ee448ce1eb3dcb4e877
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/AuthenticatedSafe.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/AuthenticatedSafe.cs
new file mode 100644
index 00000000..43da5225
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/AuthenticatedSafe.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class AuthenticatedSafe
+ : Asn1Encodable
+ {
+ private static ContentInfo[] Copy(ContentInfo[] info)
+ {
+ return (ContentInfo[])info.Clone();
+ }
+
+ public static AuthenticatedSafe GetInstance(object obj)
+ {
+ if (obj is AuthenticatedSafe)
+ return (AuthenticatedSafe)obj;
+ if (obj == null)
+ return null;
+ return new AuthenticatedSafe(Asn1Sequence.GetInstance(obj));
+ }
+
+ private readonly ContentInfo[] info;
+ private readonly bool isBer;
+
+ private AuthenticatedSafe(Asn1Sequence seq)
+ {
+ info = new ContentInfo[seq.Count];
+
+ for (int i = 0; i != info.Length; i++)
+ {
+ info[i] = ContentInfo.GetInstance(seq[i]);
+ }
+
+ isBer = seq is BerSequence;
+ }
+
+ public AuthenticatedSafe(
+ ContentInfo[] info)
+ {
+ this.info = Copy(info);
+ this.isBer = true;
+ }
+
+ public ContentInfo[] GetContentInfo()
+ {
+ return Copy(info);
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ if (isBer)
+ {
+ return new BerSequence(info);
+ }
+
+ // TODO bc-java uses DL sequence
+ //return new DLSequence(info);
+ return new DerSequence(info);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/AuthenticatedSafe.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/AuthenticatedSafe.cs.meta
new file mode 100644
index 00000000..3b1b98ae
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/AuthenticatedSafe.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9fb6dd81e8425c14990ae72a959720c7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertBag.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertBag.cs
new file mode 100644
index 00000000..6463be37
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertBag.cs
@@ -0,0 +1,56 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class CertBag
+ : Asn1Encodable
+ {
+ public static CertBag GetInstance(object obj)
+ {
+ if (obj is CertBag)
+ return (CertBag)obj;
+ if (obj == null)
+ return null;
+ return new CertBag(Asn1Sequence.GetInstance(obj));
+ }
+
+ private readonly DerObjectIdentifier certID;
+ private readonly Asn1Object certValue;
+
+ private CertBag(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.certID = DerObjectIdentifier.GetInstance(seq[0]);
+ this.certValue = Asn1TaggedObject.GetInstance(seq[1]).GetObject();
+ }
+
+ public CertBag(
+ DerObjectIdentifier certID,
+ Asn1Object certValue)
+ {
+ this.certID = certID;
+ this.certValue = certValue;
+ }
+
+ public virtual DerObjectIdentifier CertID
+ {
+ get { return certID; }
+ }
+
+ public virtual Asn1Object CertValue
+ {
+ get { return certValue; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(certID, new DerTaggedObject(0, certValue));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertBag.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertBag.cs.meta
new file mode 100644
index 00000000..6861fad8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertBag.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3b1219cc2eca6ed408abf4ec1ddc9385
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequest.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequest.cs
new file mode 100644
index 00000000..4c5da7e3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequest.cs
@@ -0,0 +1,87 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ /**
+ * Pkcs10 Certfication request object.
+ *
+ * CertificationRequest ::= Sequence {
+ * certificationRequestInfo CertificationRequestInfo,
+ * signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ * signature BIT STRING
+ * }
+ *
+ */
+ public class CertificationRequest
+ : Asn1Encodable
+ {
+ protected CertificationRequestInfo reqInfo;
+ protected AlgorithmIdentifier sigAlgId;
+ protected DerBitString sigBits;
+
+ public static CertificationRequest GetInstance(
+ object obj)
+ {
+ if (obj == null)
+ return null;
+ if (obj is CertificationRequest)
+ return (CertificationRequest)obj;
+ return new CertificationRequest(Asn1Sequence.GetInstance(obj));
+ }
+
+ protected CertificationRequest()
+ {
+ }
+
+ public CertificationRequest(
+ CertificationRequestInfo requestInfo,
+ AlgorithmIdentifier algorithm,
+ DerBitString signature)
+ {
+ this.reqInfo = requestInfo;
+ this.sigAlgId = algorithm;
+ this.sigBits = signature;
+ }
+
+ internal CertificationRequest(Asn1Sequence seq)
+ {
+ if (seq.Count != 3)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ reqInfo = CertificationRequestInfo.GetInstance(seq[0]);
+ sigAlgId = AlgorithmIdentifier.GetInstance(seq[1]);
+ sigBits = DerBitString.GetInstance(seq[2]);
+ }
+
+ public CertificationRequestInfo GetCertificationRequestInfo()
+ {
+ return reqInfo;
+ }
+
+ public AlgorithmIdentifier SignatureAlgorithm
+ {
+ get { return sigAlgId; }
+ }
+
+ public DerBitString Signature
+ {
+ get { return sigBits; }
+ }
+
+ public byte[] GetSignatureOctets()
+ {
+ return sigBits.GetOctets();
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(reqInfo, sigAlgId, sigBits);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequest.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequest.cs.meta
new file mode 100644
index 00000000..e0ca5275
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequest.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ec57ebecbac0c3c49a399591def4ab9c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequestInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequestInfo.cs
new file mode 100644
index 00000000..3429481f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequestInfo.cs
@@ -0,0 +1,135 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ /**
+ * Pkcs10 CertificationRequestInfo object.
+ *
+ * CertificationRequestInfo ::= Sequence {
+ * version Integer { v1(0) } (v1,...),
+ * subject Name,
+ * subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ * attributes [0] Attributes{{ CRIAttributes }}
+ * }
+ *
+ * Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+ *
+ * Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ * type ATTRIBUTE.&id({IOSet}),
+ * values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ * }
+ *
+ */
+ public class CertificationRequestInfo
+ : Asn1Encodable
+ {
+ internal DerInteger version = new DerInteger(0);
+ internal X509Name subject;
+ internal SubjectPublicKeyInfo subjectPKInfo;
+ internal Asn1Set attributes;
+
+ public static CertificationRequestInfo GetInstance(object obj)
+ {
+ if (obj is CertificationRequestInfo)
+ return (CertificationRequestInfo)obj;
+ if (obj != null)
+ return new CertificationRequestInfo(Asn1Sequence.GetInstance(obj));
+ return null;
+ }
+
+ public CertificationRequestInfo(
+ X509Name subject,
+ SubjectPublicKeyInfo pkInfo,
+ Asn1Set attributes)
+ {
+ this.subject = subject;
+ this.subjectPKInfo = pkInfo;
+ this.attributes = attributes;
+
+ ValidateAttributes(attributes);
+
+ if (subject == null || version == null || subjectPKInfo == null)
+ {
+ throw new ArgumentException(
+ "Not all mandatory fields set in CertificationRequestInfo generator.");
+ }
+ }
+
+ private CertificationRequestInfo(
+ Asn1Sequence seq)
+ {
+ version = (DerInteger) seq[0];
+
+ subject = X509Name.GetInstance(seq[1]);
+ subjectPKInfo = SubjectPublicKeyInfo.GetInstance(seq[2]);
+
+ //
+ // some CertificationRequestInfo objects seem to treat this field
+ // as optional.
+ //
+ if (seq.Count > 3)
+ {
+ DerTaggedObject tagobj = (DerTaggedObject) seq[3];
+ attributes = Asn1Set.GetInstance(tagobj, false);
+ }
+
+ ValidateAttributes(attributes);
+
+ if (subject == null || version == null || subjectPKInfo == null)
+ {
+ throw new ArgumentException(
+ "Not all mandatory fields set in CertificationRequestInfo generator.");
+ }
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public X509Name Subject
+ {
+ get { return subject; }
+ }
+
+ public SubjectPublicKeyInfo SubjectPublicKeyInfo
+ {
+ get { return subjectPKInfo; }
+ }
+
+ public Asn1Set Attributes
+ {
+ get { return attributes; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version, subject, subjectPKInfo);
+ v.AddOptionalTagged(false, 0, attributes);
+ return new DerSequence(v);
+ }
+
+ private static void ValidateAttributes(Asn1Set attributes)
+ {
+ if (attributes == null)
+ return;
+
+ foreach (Asn1Encodable ae in attributes)
+ {
+ Asn1Object obj = ae.ToAsn1Object();
+ AttributePkcs attr = AttributePkcs.GetInstance(obj);
+ if (attr.AttrType.Equals(PkcsObjectIdentifiers.Pkcs9AtChallengePassword))
+ {
+ if (attr.AttrValues.Count != 1)
+ throw new ArgumentException("challengePassword attribute must have one value");
+ }
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequestInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequestInfo.cs.meta
new file mode 100644
index 00000000..b8d9ef4e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/CertificationRequestInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 39d9369d046e0624fb04640d2e352bfc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/ContentInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/ContentInfo.cs
new file mode 100644
index 00000000..793b8d62
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/ContentInfo.cs
@@ -0,0 +1,75 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class ContentInfo
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier contentType;
+ private readonly Asn1Encodable content;
+
+ public static ContentInfo GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+ ContentInfo existing = obj as ContentInfo;
+ if (existing != null)
+ return existing;
+ return new ContentInfo(Asn1Sequence.GetInstance(obj));
+ }
+
+ private ContentInfo(
+ Asn1Sequence seq)
+ {
+ contentType = (DerObjectIdentifier) seq[0];
+
+ if (seq.Count > 1)
+ {
+ content = ((Asn1TaggedObject) seq[1]).GetObject();
+ }
+ }
+
+ public ContentInfo(
+ DerObjectIdentifier contentType,
+ Asn1Encodable content)
+ {
+ this.contentType = contentType;
+ this.content = content;
+ }
+
+ public DerObjectIdentifier ContentType
+ {
+ get { return contentType; }
+ }
+
+ public Asn1Encodable Content
+ {
+ get { return content; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * ContentInfo ::= Sequence {
+ * contentType ContentType,
+ * content
+ * [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(contentType);
+
+ if (content != null)
+ {
+ v.Add(new BerTaggedObject(0, content));
+ }
+
+ return new BerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/ContentInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/ContentInfo.cs.meta
new file mode 100644
index 00000000..e8597246
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/ContentInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6ef23aeb3896d664f84c2b3ea17ab39a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/DHParameter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/DHParameter.cs
new file mode 100644
index 00000000..bb3ec764
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/DHParameter.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class DHParameter
+ : Asn1Encodable
+ {
+ internal DerInteger p, g, l;
+
+ public DHParameter(
+ BigInteger p,
+ BigInteger g,
+ int l)
+ {
+ this.p = new DerInteger(p);
+ this.g = new DerInteger(g);
+
+ if (l != 0)
+ {
+ this.l = new DerInteger(l);
+ }
+ }
+
+ public DHParameter(
+ Asn1Sequence seq)
+ {
+ var e = seq.GetEnumerator();
+
+ e.MoveNext();
+ p = (DerInteger)e.Current;
+
+ e.MoveNext();
+ g = (DerInteger)e.Current;
+
+ if (e.MoveNext())
+ {
+ l = (DerInteger) e.Current;
+ }
+ }
+
+ public BigInteger P
+ {
+ get { return p.PositiveValue; }
+ }
+
+ public BigInteger G
+ {
+ get { return g.PositiveValue; }
+ }
+
+ public BigInteger L
+ {
+ get { return l == null ? null : l.PositiveValue; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(p, g);
+ v.AddOptional(l);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/DHParameter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/DHParameter.cs.meta
new file mode 100644
index 00000000..b6cd0e71
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/DHParameter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e7a5d221997748c4bb607ccbaea8617a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedData.cs
new file mode 100644
index 00000000..28392123
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedData.cs
@@ -0,0 +1,107 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ /**
+ * The EncryptedData object.
+ *
+ * EncryptedData ::= Sequence {
+ * version Version,
+ * encryptedContentInfo EncryptedContentInfo
+ * }
+ *
+ *
+ * EncryptedContentInfo ::= Sequence {
+ * contentType ContentType,
+ * contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ * encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ * }
+ *
+ * EncryptedContent ::= OCTET STRING
+ *
+ */
+ public class EncryptedData
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence data;
+// private readonly DerObjectIdentifier bagId;
+// private readonly Asn1Object bagValue;
+
+ public static EncryptedData GetInstance(
+ object obj)
+ {
+ if (obj is EncryptedData)
+ {
+ return (EncryptedData) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new EncryptedData((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private EncryptedData(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ DerInteger version = (DerInteger)seq[0];
+ if (!version.HasValue(0))
+ throw new ArgumentException("sequence not version 0");
+
+ this.data = (Asn1Sequence) seq[1];
+ }
+
+ public EncryptedData(
+ DerObjectIdentifier contentType,
+ AlgorithmIdentifier encryptionAlgorithm,
+ Asn1Encodable content)
+ {
+ data = new BerSequence(
+ contentType,
+ encryptionAlgorithm.ToAsn1Object(),
+ new BerTaggedObject(false, 0, content));
+ }
+
+ public DerObjectIdentifier ContentType
+ {
+ get { return (DerObjectIdentifier) data[0]; }
+ }
+
+ public AlgorithmIdentifier EncryptionAlgorithm
+ {
+ get { return AlgorithmIdentifier.GetInstance(data[1]); }
+ }
+
+ public Asn1OctetString Content
+ {
+ get
+ {
+ if (data.Count == 3)
+ {
+ DerTaggedObject o = (DerTaggedObject) data[2];
+
+ return Asn1OctetString.GetInstance(o, false);
+ }
+
+ return null;
+ }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new BerSequence(new DerInteger(0), data);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedData.cs.meta
new file mode 100644
index 00000000..d34bf035
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7a61974c3c96b5343916f5ae4fda77c4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedPrivateKeyInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedPrivateKeyInfo.cs
new file mode 100644
index 00000000..01bfabec
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedPrivateKeyInfo.cs
@@ -0,0 +1,79 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class EncryptedPrivateKeyInfo
+ : Asn1Encodable
+ {
+ private readonly AlgorithmIdentifier algId;
+ private readonly Asn1OctetString data;
+
+ private EncryptedPrivateKeyInfo(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ algId = AlgorithmIdentifier.GetInstance(seq[0]);
+ data = Asn1OctetString.GetInstance(seq[1]);
+ }
+
+ public EncryptedPrivateKeyInfo(
+ AlgorithmIdentifier algId,
+ byte[] encoding)
+ {
+ this.algId = algId;
+ this.data = new DerOctetString(encoding);
+ }
+
+ public static EncryptedPrivateKeyInfo GetInstance(
+ object obj)
+ {
+ if (obj is EncryptedPrivateKeyInfo)
+ {
+ return (EncryptedPrivateKeyInfo) obj;
+ }
+
+ if (obj is Asn1Sequence seq)
+ return new EncryptedPrivateKeyInfo(seq);
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public AlgorithmIdentifier EncryptionAlgorithm
+ {
+ get { return algId; }
+ }
+
+ public byte[] GetEncryptedData()
+ {
+ return data.GetOctets();
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * EncryptedPrivateKeyInfo ::= Sequence {
+ * encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
+ * encryptedData EncryptedData
+ * }
+ *
+ * EncryptedData ::= OCTET STRING
+ *
+ * KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
+ * ... -- For local profiles
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(algId, data);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedPrivateKeyInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedPrivateKeyInfo.cs.meta
new file mode 100644
index 00000000..c4d87a7f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptedPrivateKeyInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cabd96d4b4fb45e4a9477ae611e12485
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptionScheme.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptionScheme.cs
new file mode 100644
index 00000000..6684a1e1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptionScheme.cs
@@ -0,0 +1,59 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class EncryptionScheme
+ : AlgorithmIdentifier
+ {
+ public EncryptionScheme(
+ DerObjectIdentifier objectID)
+ : base(objectID)
+ {
+ }
+
+ public EncryptionScheme(
+ DerObjectIdentifier objectID,
+ Asn1Encodable parameters)
+ : base(objectID, parameters)
+ {
+ }
+
+ internal EncryptionScheme(
+ Asn1Sequence seq)
+ : this((DerObjectIdentifier)seq[0], seq[1])
+ {
+ }
+
+ public new static EncryptionScheme GetInstance(object obj)
+ {
+ if (obj is EncryptionScheme)
+ {
+ return (EncryptionScheme)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new EncryptionScheme((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public Asn1Object Asn1Object
+ {
+ get { return Parameters.ToAsn1Object(); }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(Algorithm, Parameters);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptionScheme.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptionScheme.cs.meta
new file mode 100644
index 00000000..b2479bab
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/EncryptionScheme.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 11049dd1b7d45a04ea99a06552561c31
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/IssuerAndSerialNumber.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/IssuerAndSerialNumber.cs
new file mode 100644
index 00000000..13c4dd8e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/IssuerAndSerialNumber.cs
@@ -0,0 +1,76 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class IssuerAndSerialNumber
+ : Asn1Encodable
+ {
+ private readonly X509Name name;
+ private readonly DerInteger certSerialNumber;
+
+ public static IssuerAndSerialNumber GetInstance(
+ object obj)
+ {
+ if (obj is IssuerAndSerialNumber)
+ {
+ return (IssuerAndSerialNumber) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new IssuerAndSerialNumber((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private IssuerAndSerialNumber(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.name = X509Name.GetInstance(seq[0]);
+ this.certSerialNumber = DerInteger.GetInstance(seq[1]);
+ }
+
+ public IssuerAndSerialNumber(
+ X509Name name,
+ BigInteger certSerialNumber)
+ {
+ this.name = name;
+ this.certSerialNumber = new DerInteger(certSerialNumber);
+ }
+
+ public IssuerAndSerialNumber(
+ X509Name name,
+ DerInteger certSerialNumber)
+ {
+ this.name = name;
+ this.certSerialNumber = certSerialNumber;
+ }
+
+ public X509Name Name
+ {
+ get { return name; }
+ }
+
+ public DerInteger CertificateSerialNumber
+ {
+ get { return certSerialNumber; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(name, certSerialNumber);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/IssuerAndSerialNumber.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/IssuerAndSerialNumber.cs.meta
new file mode 100644
index 00000000..54de5a6b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/IssuerAndSerialNumber.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0b4832801ca7151458986f5012c2e8e6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/KeyDerivationFunc.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/KeyDerivationFunc.cs
new file mode 100644
index 00000000..d3187529
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/KeyDerivationFunc.cs
@@ -0,0 +1,25 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class KeyDerivationFunc
+ : AlgorithmIdentifier
+ {
+ internal KeyDerivationFunc(Asn1Sequence seq)
+ : base(seq)
+ {
+ }
+
+ public KeyDerivationFunc(
+ DerObjectIdentifier id,
+ Asn1Encodable parameters)
+ : base(id, parameters)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/KeyDerivationFunc.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/KeyDerivationFunc.cs.meta
new file mode 100644
index 00000000..6c8ce7a8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/KeyDerivationFunc.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f43d3668186ac844cbfdd49c34abbfbd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/MacData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/MacData.cs
new file mode 100644
index 00000000..1189f701
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/MacData.cs
@@ -0,0 +1,100 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class MacData
+ : Asn1Encodable
+ {
+ internal DigestInfo digInfo;
+ internal byte[] salt;
+ internal BigInteger iterationCount;
+
+ public static MacData GetInstance(
+ object obj)
+ {
+ if (obj is MacData)
+ {
+ return (MacData) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new MacData((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private MacData(
+ Asn1Sequence seq)
+ {
+ this.digInfo = DigestInfo.GetInstance(seq[0]);
+ this.salt = ((Asn1OctetString) seq[1]).GetOctets();
+
+ if (seq.Count == 3)
+ {
+ this.iterationCount = ((DerInteger) seq[2]).Value;
+ }
+ else
+ {
+ this.iterationCount = BigInteger.One;
+ }
+ }
+
+ public MacData(
+ DigestInfo digInfo,
+ byte[] salt,
+ int iterationCount)
+ {
+ this.digInfo = digInfo;
+ this.salt = (byte[]) salt.Clone();
+ this.iterationCount = BigInteger.ValueOf(iterationCount);
+ }
+
+ public DigestInfo Mac
+ {
+ get { return digInfo; }
+ }
+
+ public byte[] GetSalt()
+ {
+ return (byte[]) salt.Clone();
+ }
+
+ public BigInteger IterationCount
+ {
+ get { return iterationCount; }
+ }
+
+ /**
+ *
+ * MacData ::= SEQUENCE {
+ * mac DigestInfo,
+ * macSalt OCTET STRING,
+ * iterations INTEGER DEFAULT 1
+ * -- Note: The default is for historic reasons and its use is deprecated. A
+ * -- higher value, like 1024 is recommended.
+ *
+ * @return the basic DERObject construction.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(digInfo, new DerOctetString(salt));
+
+ if (!iterationCount.Equals(BigInteger.One))
+ {
+ v.Add(new DerInteger(iterationCount));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/MacData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/MacData.cs.meta
new file mode 100644
index 00000000..b81b004b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/MacData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 32c8c807cc496de4e9d6ca0bf91adc71
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBEParameter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBEParameter.cs
new file mode 100644
index 00000000..4617a952
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBEParameter.cs
@@ -0,0 +1,63 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class PbeParameter
+ : Asn1Encodable
+ {
+ private readonly Asn1OctetString salt;
+ private readonly DerInteger iterationCount;
+
+ public static PbeParameter GetInstance(object obj)
+ {
+ if (obj is PbeParameter || obj == null)
+ {
+ return (PbeParameter) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new PbeParameter((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private PbeParameter(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ salt = Asn1OctetString.GetInstance(seq[0]);
+ iterationCount = DerInteger.GetInstance(seq[1]);
+ }
+
+ public PbeParameter(byte[] salt, int iterationCount)
+ {
+ this.salt = new DerOctetString(salt);
+ this.iterationCount = new DerInteger(iterationCount);
+ }
+
+ public byte[] GetSalt()
+ {
+ return salt.GetOctets();
+ }
+
+ public BigInteger IterationCount
+ {
+ get { return iterationCount.Value; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(salt, iterationCount);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBEParameter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBEParameter.cs.meta
new file mode 100644
index 00000000..b5b667eb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBEParameter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e94bc4f5aa52ba241b77cf94c5b2e875
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBES2Parameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBES2Parameters.cs
new file mode 100644
index 00000000..15359430
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBES2Parameters.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class PbeS2Parameters
+ : Asn1Encodable
+ {
+ private readonly KeyDerivationFunc func;
+ private readonly EncryptionScheme scheme;
+
+ public static PbeS2Parameters GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+ PbeS2Parameters existing = obj as PbeS2Parameters;
+ if (existing != null)
+ return existing;
+ return new PbeS2Parameters(Asn1Sequence.GetInstance(obj));
+ }
+
+ public PbeS2Parameters(KeyDerivationFunc keyDevFunc, EncryptionScheme encScheme)
+ {
+ this.func = keyDevFunc;
+ this.scheme = encScheme;
+ }
+
+ private PbeS2Parameters(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ Asn1Sequence funcSeq = (Asn1Sequence)seq[0].ToAsn1Object();
+
+ // TODO Not sure if this special case is really necessary/appropriate
+ if (funcSeq[0].Equals(PkcsObjectIdentifiers.IdPbkdf2))
+ {
+ func = new KeyDerivationFunc(PkcsObjectIdentifiers.IdPbkdf2,
+ Pbkdf2Params.GetInstance(funcSeq[1]));
+ }
+ else
+ {
+ func = new KeyDerivationFunc(funcSeq);
+ }
+
+ scheme = EncryptionScheme.GetInstance(seq[1].ToAsn1Object());
+ }
+
+ public KeyDerivationFunc KeyDerivationFunc
+ {
+ get { return func; }
+ }
+
+ public EncryptionScheme EncryptionScheme
+ {
+ get { return scheme; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(func, scheme);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBES2Parameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBES2Parameters.cs.meta
new file mode 100644
index 00000000..3be8f533
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBES2Parameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 38bf767c1b3addb40b6d4e0993b124f8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBKDF2Params.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBKDF2Params.cs
new file mode 100644
index 00000000..539f71c1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBKDF2Params.cs
@@ -0,0 +1,144 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class Pbkdf2Params
+ : Asn1Encodable
+ {
+ private static AlgorithmIdentifier algid_hmacWithSHA1 = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdHmacWithSha1, DerNull.Instance);
+
+ private readonly Asn1OctetString octStr;
+ private readonly DerInteger iterationCount, keyLength;
+ private readonly AlgorithmIdentifier prf;
+
+ public static Pbkdf2Params GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is Pbkdf2Params)
+ return (Pbkdf2Params)obj;
+
+ if (obj is Asn1Sequence)
+ return new Pbkdf2Params((Asn1Sequence)obj);
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public Pbkdf2Params(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 2 || seq.Count > 4)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.octStr = (Asn1OctetString)seq[0];
+ this.iterationCount = (DerInteger)seq[1];
+
+ Asn1Encodable kl = null, d = null;
+ if (seq.Count > 3)
+ {
+ kl = seq[2];
+ d = seq[3];
+ }
+ else if (seq.Count > 2)
+ {
+ if (seq[2] is DerInteger)
+ {
+ kl = seq[2];
+ }
+ else
+ {
+ d = seq[2];
+ }
+ }
+ if (kl != null)
+ {
+ keyLength = (DerInteger)kl;
+ }
+ if (d != null)
+ {
+ prf = AlgorithmIdentifier.GetInstance(d);
+ }
+ }
+
+ public Pbkdf2Params(
+ byte[] salt,
+ int iterationCount)
+ {
+ this.octStr = new DerOctetString(salt);
+ this.iterationCount = new DerInteger(iterationCount);
+ }
+
+ public Pbkdf2Params(
+ byte[] salt,
+ int iterationCount,
+ int keyLength)
+ : this(salt, iterationCount)
+ {
+ this.keyLength = new DerInteger(keyLength);
+ }
+
+ public Pbkdf2Params(
+ byte[] salt,
+ int iterationCount,
+ int keyLength,
+ AlgorithmIdentifier prf)
+ : this(salt, iterationCount, keyLength)
+ {
+ this.prf = prf;
+ }
+
+ public Pbkdf2Params(
+ byte[] salt,
+ int iterationCount,
+ AlgorithmIdentifier prf)
+ : this(salt, iterationCount)
+ {
+ this.prf = prf;
+ }
+
+ public byte[] GetSalt()
+ {
+ return octStr.GetOctets();
+ }
+
+ public BigInteger IterationCount
+ {
+ get { return iterationCount.Value; }
+ }
+
+ public BigInteger KeyLength
+ {
+ get { return keyLength == null ? null : keyLength.Value; }
+ }
+
+ public bool IsDefaultPrf
+ {
+ get { return prf == null || prf.Equals(algid_hmacWithSHA1); }
+ }
+
+ public AlgorithmIdentifier Prf
+ {
+ get { return prf != null ? prf : algid_hmacWithSHA1; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(octStr, iterationCount);
+ v.AddOptional(keyLength);
+
+ if (!IsDefaultPrf)
+ {
+ v.Add(prf);
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBKDF2Params.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBKDF2Params.cs.meta
new file mode 100644
index 00000000..455b4ca1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PBKDF2Params.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 847bdf2c765ac9543bb9eaca350caf03
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCS12PBEParams.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCS12PBEParams.cs
new file mode 100644
index 00000000..aee1ce45
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCS12PBEParams.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class Pkcs12PbeParams
+ : Asn1Encodable
+ {
+ private readonly DerInteger iterations;
+ private readonly Asn1OctetString iv;
+
+ public Pkcs12PbeParams(
+ byte[] salt,
+ int iterations)
+ {
+ this.iv = new DerOctetString(salt);
+ this.iterations = new DerInteger(iterations);
+ }
+
+ private Pkcs12PbeParams(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ iv = Asn1OctetString.GetInstance(seq[0]);
+ iterations = DerInteger.GetInstance(seq[1]);
+ }
+
+ public static Pkcs12PbeParams GetInstance(
+ object obj)
+ {
+ if (obj is Pkcs12PbeParams)
+ {
+ return (Pkcs12PbeParams) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new Pkcs12PbeParams((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public BigInteger Iterations
+ {
+ get { return iterations.Value; }
+ }
+
+ public byte[] GetIV()
+ {
+ return iv.GetOctets();
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(iv, iterations);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCS12PBEParams.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCS12PBEParams.cs.meta
new file mode 100644
index 00000000..e886b539
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCS12PBEParams.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3d3038c74fca8ff42a93a94e90a17587
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCSObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCSObjectIdentifiers.cs
new file mode 100644
index 00000000..0a942268
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCSObjectIdentifiers.cs
@@ -0,0 +1,306 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public abstract class PkcsObjectIdentifiers
+ {
+ //
+ // pkcs-1 OBJECT IDENTIFIER ::= {
+ // iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 }
+ //
+ public const string Pkcs1 = "1.2.840.113549.1.1";
+ internal static readonly DerObjectIdentifier Pkcs1Oid = new DerObjectIdentifier(Pkcs1);
+
+ public static readonly DerObjectIdentifier RsaEncryption = Pkcs1Oid.Branch("1");
+ public static readonly DerObjectIdentifier MD2WithRsaEncryption = Pkcs1Oid.Branch("2");
+ public static readonly DerObjectIdentifier MD4WithRsaEncryption = Pkcs1Oid.Branch("3");
+ public static readonly DerObjectIdentifier MD5WithRsaEncryption = Pkcs1Oid.Branch("4");
+ public static readonly DerObjectIdentifier Sha1WithRsaEncryption = Pkcs1Oid.Branch("5");
+ public static readonly DerObjectIdentifier SrsaOaepEncryptionSet = Pkcs1Oid.Branch("6");
+ public static readonly DerObjectIdentifier IdRsaesOaep = Pkcs1Oid.Branch("7");
+ public static readonly DerObjectIdentifier IdMgf1 = Pkcs1Oid.Branch("8");
+ public static readonly DerObjectIdentifier IdPSpecified = Pkcs1Oid.Branch("9");
+ public static readonly DerObjectIdentifier IdRsassaPss = Pkcs1Oid.Branch("10");
+ public static readonly DerObjectIdentifier Sha256WithRsaEncryption = Pkcs1Oid.Branch("11");
+ public static readonly DerObjectIdentifier Sha384WithRsaEncryption = Pkcs1Oid.Branch("12");
+ public static readonly DerObjectIdentifier Sha512WithRsaEncryption = Pkcs1Oid.Branch("13");
+ public static readonly DerObjectIdentifier Sha224WithRsaEncryption = Pkcs1Oid.Branch("14");
+ /** PKCS#1: 1.2.840.113549.1.1.15 */
+ public static readonly DerObjectIdentifier Sha512_224WithRSAEncryption = Pkcs1Oid.Branch("15");
+ /** PKCS#1: 1.2.840.113549.1.1.16 */
+ public static readonly DerObjectIdentifier Sha512_256WithRSAEncryption = Pkcs1Oid.Branch("16");
+
+ //
+ // pkcs-3 OBJECT IDENTIFIER ::= {
+ // iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 3 }
+ //
+ public const string Pkcs3 = "1.2.840.113549.1.3";
+
+ public static readonly DerObjectIdentifier DhKeyAgreement = new DerObjectIdentifier(Pkcs3 + ".1");
+
+ //
+ // pkcs-5 OBJECT IDENTIFIER ::= {
+ // iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 5 }
+ //
+ public const string Pkcs5 = "1.2.840.113549.1.5";
+
+ public static readonly DerObjectIdentifier PbeWithMD2AndDesCbc = new DerObjectIdentifier(Pkcs5 + ".1");
+ public static readonly DerObjectIdentifier PbeWithMD2AndRC2Cbc = new DerObjectIdentifier(Pkcs5 + ".4");
+ public static readonly DerObjectIdentifier PbeWithMD5AndDesCbc = new DerObjectIdentifier(Pkcs5 + ".3");
+ public static readonly DerObjectIdentifier PbeWithMD5AndRC2Cbc = new DerObjectIdentifier(Pkcs5 + ".6");
+ public static readonly DerObjectIdentifier PbeWithSha1AndDesCbc = new DerObjectIdentifier(Pkcs5 + ".10");
+ public static readonly DerObjectIdentifier PbeWithSha1AndRC2Cbc = new DerObjectIdentifier(Pkcs5 + ".11");
+
+ public static readonly DerObjectIdentifier IdPbeS2 = new DerObjectIdentifier(Pkcs5 + ".13");
+ public static readonly DerObjectIdentifier IdPbkdf2 = new DerObjectIdentifier(Pkcs5 + ".12");
+
+ //
+ // encryptionAlgorithm OBJECT IDENTIFIER ::= {
+ // iso(1) member-body(2) us(840) rsadsi(113549) 3 }
+ //
+ public const string EncryptionAlgorithm = "1.2.840.113549.3";
+
+ public static readonly DerObjectIdentifier DesEde3Cbc = new DerObjectIdentifier(EncryptionAlgorithm + ".7");
+ public static readonly DerObjectIdentifier RC2Cbc = new DerObjectIdentifier(EncryptionAlgorithm + ".2");
+ public static readonly DerObjectIdentifier rc4 = new DerObjectIdentifier(EncryptionAlgorithm + ".4");
+
+ //
+ // object identifiers for digests
+ //
+ public const string DigestAlgorithm = "1.2.840.113549.2";
+
+ //
+ // md2 OBJECT IDENTIFIER ::=
+ // {iso(1) member-body(2) US(840) rsadsi(113549) DigestAlgorithm(2) 2}
+ //
+ public static readonly DerObjectIdentifier MD2 = new DerObjectIdentifier(DigestAlgorithm + ".2");
+
+ //
+ // md4 OBJECT IDENTIFIER ::=
+ // {iso(1) member-body(2) US(840) rsadsi(113549) DigestAlgorithm(2) 4}
+ //
+ public static readonly DerObjectIdentifier MD4 = new DerObjectIdentifier(DigestAlgorithm + ".4");
+
+ //
+ // md5 OBJECT IDENTIFIER ::=
+ // {iso(1) member-body(2) US(840) rsadsi(113549) DigestAlgorithm(2) 5}
+ //
+ public static readonly DerObjectIdentifier MD5 = new DerObjectIdentifier(DigestAlgorithm + ".5");
+
+ public static readonly DerObjectIdentifier IdHmacWithSha1 = new DerObjectIdentifier(DigestAlgorithm + ".7");
+ public static readonly DerObjectIdentifier IdHmacWithSha224 = new DerObjectIdentifier(DigestAlgorithm + ".8");
+ public static readonly DerObjectIdentifier IdHmacWithSha256 = new DerObjectIdentifier(DigestAlgorithm + ".9");
+ public static readonly DerObjectIdentifier IdHmacWithSha384 = new DerObjectIdentifier(DigestAlgorithm + ".10");
+ public static readonly DerObjectIdentifier IdHmacWithSha512 = new DerObjectIdentifier(DigestAlgorithm + ".11");
+
+ //
+ // pkcs-7 OBJECT IDENTIFIER ::= {
+ // iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 7 }
+ //
+ public const string Pkcs7 = "1.2.840.113549.1.7";
+
+ public static readonly DerObjectIdentifier Data = new DerObjectIdentifier(Pkcs7 + ".1");
+ public static readonly DerObjectIdentifier SignedData = new DerObjectIdentifier(Pkcs7 + ".2");
+ public static readonly DerObjectIdentifier EnvelopedData = new DerObjectIdentifier(Pkcs7 + ".3");
+ public static readonly DerObjectIdentifier SignedAndEnvelopedData = new DerObjectIdentifier(Pkcs7 + ".4");
+ public static readonly DerObjectIdentifier DigestedData = new DerObjectIdentifier(Pkcs7 + ".5");
+ public static readonly DerObjectIdentifier EncryptedData = new DerObjectIdentifier(Pkcs7 + ".6");
+
+ //
+ // pkcs-9 OBJECT IDENTIFIER ::= {
+ // iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 }
+ //
+ public const string Pkcs9 = "1.2.840.113549.1.9";
+
+ public static readonly DerObjectIdentifier Pkcs9AtEmailAddress = new DerObjectIdentifier(Pkcs9 + ".1");
+ public static readonly DerObjectIdentifier Pkcs9AtUnstructuredName = new DerObjectIdentifier(Pkcs9 + ".2");
+ public static readonly DerObjectIdentifier Pkcs9AtContentType = new DerObjectIdentifier(Pkcs9 + ".3");
+ public static readonly DerObjectIdentifier Pkcs9AtMessageDigest = new DerObjectIdentifier(Pkcs9 + ".4");
+ public static readonly DerObjectIdentifier Pkcs9AtSigningTime = new DerObjectIdentifier(Pkcs9 + ".5");
+ public static readonly DerObjectIdentifier Pkcs9AtCounterSignature = new DerObjectIdentifier(Pkcs9 + ".6");
+ public static readonly DerObjectIdentifier Pkcs9AtChallengePassword = new DerObjectIdentifier(Pkcs9 + ".7");
+ public static readonly DerObjectIdentifier Pkcs9AtUnstructuredAddress = new DerObjectIdentifier(Pkcs9 + ".8");
+ public static readonly DerObjectIdentifier Pkcs9AtExtendedCertificateAttributes = new DerObjectIdentifier(Pkcs9 + ".9");
+ public static readonly DerObjectIdentifier Pkcs9AtSigningDescription = new DerObjectIdentifier(Pkcs9 + ".13");
+ public static readonly DerObjectIdentifier Pkcs9AtExtensionRequest = new DerObjectIdentifier(Pkcs9 + ".14");
+ public static readonly DerObjectIdentifier Pkcs9AtSmimeCapabilities = new DerObjectIdentifier(Pkcs9 + ".15");
+ public static readonly DerObjectIdentifier IdSmime = new DerObjectIdentifier(Pkcs9 + ".16");
+
+ public static readonly DerObjectIdentifier Pkcs9AtFriendlyName = new DerObjectIdentifier(Pkcs9 + ".20");
+ public static readonly DerObjectIdentifier Pkcs9AtLocalKeyID = new DerObjectIdentifier(Pkcs9 + ".21");
+
+ public const string CertTypes = Pkcs9 + ".22";
+ public static readonly DerObjectIdentifier X509Certificate = new DerObjectIdentifier(CertTypes + ".1");
+ public static readonly DerObjectIdentifier SdsiCertificate = new DerObjectIdentifier(CertTypes + ".2");
+
+ public const string CrlTypes = Pkcs9 + ".23";
+ public static readonly DerObjectIdentifier X509Crl = new DerObjectIdentifier(CrlTypes + ".1");
+
+ public static readonly DerObjectIdentifier IdAlg = IdSmime.Branch("3");
+
+ public static readonly DerObjectIdentifier IdAlgEsdh = IdAlg.Branch("5");
+ public static readonly DerObjectIdentifier IdAlgCms3DesWrap = IdAlg.Branch("6");
+ public static readonly DerObjectIdentifier IdAlgCmsRC2Wrap = IdAlg.Branch("7");
+ public static readonly DerObjectIdentifier IdAlgZlibCompress = IdAlg.Branch("8");
+ public static readonly DerObjectIdentifier IdAlgPwriKek = IdAlg.Branch("9");
+ public static readonly DerObjectIdentifier IdAlgSsdh = IdAlg.Branch("10");
+
+ /*
+ *
+ * -- RSA-KEM Key Transport Algorithm
+ *
+ * id-rsa-kem OID ::= {
+ * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
+ * pkcs-9(9) smime(16) alg(3) 14
+ * }
+ *
+ */
+ public static readonly DerObjectIdentifier IdRsaKem = IdAlg.Branch("14");
+
+ /**
+ *
+ * id-alg-AEADChaCha20Poly1305 OBJECT IDENTIFIER ::=
+ * { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
+ * pkcs9(9) smime(16) alg(3) 18 }
+ *
+ * AEADChaCha20Poly1305Nonce ::= OCTET STRING (SIZE(12))
+ *
+ */
+ public static readonly DerObjectIdentifier IdAlgAeadChaCha20Poly1305 = IdAlg.Branch("18");
+
+
+ /**
+ * id-alg-hss-lms-hashsig OBJECT IDENTIFIER ::= { iso(1)
+ * member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ * smime(16) alg(3) 17 }
+ */
+ public static readonly DerObjectIdentifier IdAlgHssLmsHashsig = IdAlg.Branch("17");
+
+ //
+ // SMIME capability sub oids.
+ //
+ public static readonly DerObjectIdentifier PreferSignedData = Pkcs9AtSmimeCapabilities.Branch("1");
+ public static readonly DerObjectIdentifier CannotDecryptAny = Pkcs9AtSmimeCapabilities.Branch("2");
+ public static readonly DerObjectIdentifier SmimeCapabilitiesVersions = Pkcs9AtSmimeCapabilities.Branch("3");
+
+ //
+ // other SMIME attributes
+ //
+ public static readonly DerObjectIdentifier IdAAReceiptRequest = IdSmime.Branch("2.1");
+
+ //
+ // id-ct OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
+ // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1)}
+ //
+ public const string IdCT = "1.2.840.113549.1.9.16.1";
+
+ public static readonly DerObjectIdentifier IdCTAuthData = new DerObjectIdentifier(IdCT + ".2");
+ public static readonly DerObjectIdentifier IdCTTstInfo = new DerObjectIdentifier(IdCT + ".4");
+ public static readonly DerObjectIdentifier IdCTCompressedData = new DerObjectIdentifier(IdCT + ".9");
+ public static readonly DerObjectIdentifier IdCTAuthEnvelopedData = new DerObjectIdentifier(IdCT + ".23");
+ public static readonly DerObjectIdentifier IdCTTimestampedData = new DerObjectIdentifier(IdCT + ".31");
+
+ //
+ // id-cti OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
+ // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6)}
+ //
+ public const string IdCti = "1.2.840.113549.1.9.16.6";
+
+ public static readonly DerObjectIdentifier IdCtiEtsProofOfOrigin = new DerObjectIdentifier(IdCti + ".1");
+ public static readonly DerObjectIdentifier IdCtiEtsProofOfReceipt = new DerObjectIdentifier(IdCti + ".2");
+ public static readonly DerObjectIdentifier IdCtiEtsProofOfDelivery = new DerObjectIdentifier(IdCti + ".3");
+ public static readonly DerObjectIdentifier IdCtiEtsProofOfSender = new DerObjectIdentifier(IdCti + ".4");
+ public static readonly DerObjectIdentifier IdCtiEtsProofOfApproval = new DerObjectIdentifier(IdCti + ".5");
+ public static readonly DerObjectIdentifier IdCtiEtsProofOfCreation = new DerObjectIdentifier(IdCti + ".6");
+
+ //
+ // id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
+ // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)}
+ //
+ public const string IdAA = "1.2.840.113549.1.9.16.2";
+ public static readonly DerObjectIdentifier IdAAOid = new DerObjectIdentifier(IdAA);
+
+ public static readonly DerObjectIdentifier IdAAContentHint = new DerObjectIdentifier(IdAA + ".4"); // See RFC 2634
+ public static readonly DerObjectIdentifier IdAAMsgSigDigest = new DerObjectIdentifier(IdAA + ".5");
+ public static readonly DerObjectIdentifier IdAAContentReference = new DerObjectIdentifier(IdAA + ".10");
+
+ /*
+ * id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11}
+ *
+ */
+ public static readonly DerObjectIdentifier IdAAEncrypKeyPref = new DerObjectIdentifier(IdAA + ".11");
+ public static readonly DerObjectIdentifier IdAASigningCertificate = new DerObjectIdentifier(IdAA + ".12");
+ public static readonly DerObjectIdentifier IdAASigningCertificateV2 = new DerObjectIdentifier(IdAA + ".47");
+
+ public static readonly DerObjectIdentifier IdAAContentIdentifier = new DerObjectIdentifier(IdAA + ".7"); // See RFC 2634
+
+ /*
+ * RFC 3126
+ */
+ public static readonly DerObjectIdentifier IdAASignatureTimeStampToken = new DerObjectIdentifier(IdAA + ".14");
+
+ public static readonly DerObjectIdentifier IdAAEtsSigPolicyID = new DerObjectIdentifier(IdAA + ".15");
+ public static readonly DerObjectIdentifier IdAAEtsCommitmentType = new DerObjectIdentifier(IdAA + ".16");
+ public static readonly DerObjectIdentifier IdAAEtsSignerLocation = new DerObjectIdentifier(IdAA + ".17");
+ public static readonly DerObjectIdentifier IdAAEtsSignerAttr = new DerObjectIdentifier(IdAA + ".18");
+ public static readonly DerObjectIdentifier IdAAEtsOtherSigCert = new DerObjectIdentifier(IdAA + ".19");
+ public static readonly DerObjectIdentifier IdAAEtsContentTimestamp = new DerObjectIdentifier(IdAA + ".20");
+ public static readonly DerObjectIdentifier IdAAEtsCertificateRefs = new DerObjectIdentifier(IdAA + ".21");
+ public static readonly DerObjectIdentifier IdAAEtsRevocationRefs = new DerObjectIdentifier(IdAA + ".22");
+ public static readonly DerObjectIdentifier IdAAEtsCertValues = new DerObjectIdentifier(IdAA + ".23");
+ public static readonly DerObjectIdentifier IdAAEtsRevocationValues = new DerObjectIdentifier(IdAA + ".24");
+ public static readonly DerObjectIdentifier IdAAEtsEscTimeStamp = new DerObjectIdentifier(IdAA + ".25");
+ public static readonly DerObjectIdentifier IdAAEtsCertCrlTimestamp = new DerObjectIdentifier(IdAA + ".26");
+ public static readonly DerObjectIdentifier IdAAEtsArchiveTimestamp = new DerObjectIdentifier(IdAA + ".27");
+
+ /** PKCS#9: 1.2.840.113549.1.9.16.2.37 - RFC 4108 */
+ public static readonly DerObjectIdentifier IdAADecryptKeyID = IdAAOid.Branch("37");
+
+ /** PKCS#9: 1.2.840.113549.1.9.16.2.38 - RFC 4108 */
+ public static readonly DerObjectIdentifier IdAAImplCryptoAlgs = IdAAOid.Branch("38");
+
+ /** PKCS#9: 1.2.840.113549.1.9.16.2.54 RFC7030 */
+ public static readonly DerObjectIdentifier IdAAAsymmDecryptKeyID = IdAAOid.Branch("54");
+
+ /** PKCS#9: 1.2.840.113549.1.9.16.2.43 RFC7030 */
+ public static readonly DerObjectIdentifier IdAAImplCompressAlgs = IdAAOid.Branch("43");
+ /** PKCS#9: 1.2.840.113549.1.9.16.2.40 RFC7030 */
+ public static readonly DerObjectIdentifier IdAACommunityIdentifiers = IdAAOid.Branch("40");
+
+ //
+ // id-spq OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
+ // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-spq(5)}
+ //
+ public const string IdSpq = "1.2.840.113549.1.9.16.5";
+
+ public static readonly DerObjectIdentifier IdSpqEtsUri = new DerObjectIdentifier(IdSpq + ".1");
+ public static readonly DerObjectIdentifier IdSpqEtsUNotice = new DerObjectIdentifier(IdSpq + ".2");
+
+ //
+ // pkcs-12 OBJECT IDENTIFIER ::= {
+ // iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 12 }
+ //
+ public const string Pkcs12 = "1.2.840.113549.1.12";
+ public const string BagTypes = Pkcs12 + ".10.1";
+
+ public static readonly DerObjectIdentifier KeyBag = new DerObjectIdentifier(BagTypes + ".1");
+ public static readonly DerObjectIdentifier Pkcs8ShroudedKeyBag = new DerObjectIdentifier(BagTypes + ".2");
+ public static readonly DerObjectIdentifier CertBag = new DerObjectIdentifier(BagTypes + ".3");
+ public static readonly DerObjectIdentifier CrlBag = new DerObjectIdentifier(BagTypes + ".4");
+ public static readonly DerObjectIdentifier SecretBag = new DerObjectIdentifier(BagTypes + ".5");
+ public static readonly DerObjectIdentifier SafeContentsBag = new DerObjectIdentifier(BagTypes + ".6");
+
+ public const string Pkcs12PbeIds = Pkcs12 + ".1";
+
+ public static readonly DerObjectIdentifier PbeWithShaAnd128BitRC4 = new DerObjectIdentifier(Pkcs12PbeIds + ".1");
+ public static readonly DerObjectIdentifier PbeWithShaAnd40BitRC4 = new DerObjectIdentifier(Pkcs12PbeIds + ".2");
+ public static readonly DerObjectIdentifier PbeWithShaAnd3KeyTripleDesCbc = new DerObjectIdentifier(Pkcs12PbeIds + ".3");
+ public static readonly DerObjectIdentifier PbeWithShaAnd2KeyTripleDesCbc = new DerObjectIdentifier(Pkcs12PbeIds + ".4");
+ public static readonly DerObjectIdentifier PbeWithShaAnd128BitRC2Cbc = new DerObjectIdentifier(Pkcs12PbeIds + ".5");
+ public static readonly DerObjectIdentifier PbewithShaAnd40BitRC2Cbc = new DerObjectIdentifier(Pkcs12PbeIds + ".6");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCSObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCSObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..f9365f98
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PKCSObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8b5a35db33d7f954a856e8127636bc8e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Pfx.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Pfx.cs
new file mode 100644
index 00000000..c7ddbd1a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Pfx.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ /**
+ * the infamous Pfx from Pkcs12
+ */
+ public class Pfx
+ : Asn1Encodable
+ {
+ public static Pfx GetInstance(object obj)
+ {
+ if (obj is Pfx)
+ return (Pfx)obj;
+ if (obj == null)
+ return null;
+ return new Pfx(Asn1Sequence.GetInstance(obj));
+ }
+
+ private readonly ContentInfo contentInfo;
+ private readonly MacData macData;
+
+ private Pfx(Asn1Sequence seq)
+ {
+ DerInteger version = DerInteger.GetInstance(seq[0]);
+ if (!version.HasValue(3))
+ throw new ArgumentException("wrong version for PFX PDU");
+
+ this.contentInfo = ContentInfo.GetInstance(seq[1]);
+
+ if (seq.Count == 3)
+ {
+ this.macData = MacData.GetInstance(seq[2]);
+ }
+ }
+
+ public Pfx(ContentInfo contentInfo, MacData macData)
+ {
+ this.contentInfo = contentInfo;
+ this.macData = macData;
+ }
+
+ public ContentInfo AuthSafe
+ {
+ get { return contentInfo; }
+ }
+
+ public MacData MacData
+ {
+ get { return macData; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(new DerInteger(3), contentInfo);
+ v.AddOptional(macData);
+ return new BerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Pfx.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Pfx.cs.meta
new file mode 100644
index 00000000..5d0f95a1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/Pfx.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7b047def731647e4fb7ae8d716ca7558
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PrivateKeyInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PrivateKeyInfo.cs
new file mode 100644
index 00000000..232739e6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PrivateKeyInfo.cs
@@ -0,0 +1,207 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ /**
+ * RFC 5958
+ *
+ *
+ * [IMPLICIT TAGS]
+ *
+ * OneAsymmetricKey ::= SEQUENCE {
+ * version Version,
+ * privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
+ * privateKey PrivateKey,
+ * attributes [0] Attributes OPTIONAL,
+ * ...,
+ * [[2: publicKey [1] PublicKey OPTIONAL ]],
+ * ...
+ * }
+ *
+ * PrivateKeyInfo ::= OneAsymmetricKey
+ *
+ * Version ::= INTEGER { v1(0), v2(1) } (v1, ..., v2)
+ *
+ * PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
+ * { PUBLIC-KEY,
+ * { PrivateKeyAlgorithms } }
+ *
+ * PrivateKey ::= OCTET STRING
+ * -- Content varies based on type of key. The
+ * -- algorithm identifier dictates the format of
+ * -- the key.
+ *
+ * PublicKey ::= BIT STRING
+ * -- Content varies based on type of key. The
+ * -- algorithm identifier dictates the format of
+ * -- the key.
+ *
+ * Attributes ::= SET OF Attribute { { OneAsymmetricKeyAttributes } }
+ *
+ */
+ public class PrivateKeyInfo
+ : Asn1Encodable
+ {
+ private readonly DerInteger version;
+ private readonly AlgorithmIdentifier privateKeyAlgorithm;
+ private readonly Asn1OctetString privateKey;
+ private readonly Asn1Set attributes;
+ private readonly DerBitString publicKey;
+
+ public static PrivateKeyInfo GetInstance(Asn1TaggedObject obj, bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static PrivateKeyInfo GetInstance(
+ object obj)
+ {
+ if (obj == null)
+ return null;
+ if (obj is PrivateKeyInfo)
+ return (PrivateKeyInfo)obj;
+ return new PrivateKeyInfo(Asn1Sequence.GetInstance(obj));
+ }
+
+ private static int GetVersionValue(DerInteger version)
+ {
+ BigInteger bigValue = version.Value;
+ if (bigValue.CompareTo(BigInteger.Zero) < 0 || bigValue.CompareTo(BigInteger.One) > 0)
+ throw new ArgumentException("invalid version for private key info", "version");
+
+ return bigValue.IntValue;
+ }
+
+ public PrivateKeyInfo(
+ AlgorithmIdentifier privateKeyAlgorithm,
+ Asn1Encodable privateKey)
+ : this(privateKeyAlgorithm, privateKey, null, null)
+ {
+ }
+
+ public PrivateKeyInfo(
+ AlgorithmIdentifier privateKeyAlgorithm,
+ Asn1Encodable privateKey,
+ Asn1Set attributes)
+ : this(privateKeyAlgorithm, privateKey, attributes, null)
+ {
+ }
+
+ public PrivateKeyInfo(
+ AlgorithmIdentifier privateKeyAlgorithm,
+ Asn1Encodable privateKey,
+ Asn1Set attributes,
+ byte[] publicKey)
+ {
+ this.version = new DerInteger(publicKey != null ? BigInteger.One : BigInteger.Zero);
+ this.privateKeyAlgorithm = privateKeyAlgorithm;
+ this.privateKey = new DerOctetString(privateKey);
+ this.attributes = attributes;
+ this.publicKey = publicKey == null ? null : new DerBitString(publicKey);
+ }
+
+ private PrivateKeyInfo(Asn1Sequence seq)
+ {
+ var e = seq.GetEnumerator();
+
+ this.version = DerInteger.GetInstance(CollectionUtilities.RequireNext(e));
+
+ int versionValue = GetVersionValue(version);
+
+ this.privateKeyAlgorithm = AlgorithmIdentifier.GetInstance(CollectionUtilities.RequireNext(e));
+ this.privateKey = Asn1OctetString.GetInstance(CollectionUtilities.RequireNext(e));
+
+ int lastTag = -1;
+ while (e.MoveNext())
+ {
+ Asn1TaggedObject tagged = (Asn1TaggedObject)e.Current;
+
+ int tag = tagged.TagNo;
+ if (tag <= lastTag)
+ throw new ArgumentException("invalid optional field in private key info", "seq");
+
+ lastTag = tag;
+
+ switch (tag)
+ {
+ case 0:
+ {
+ this.attributes = Asn1Set.GetInstance(tagged, false);
+ break;
+ }
+ case 1:
+ {
+ if (versionValue < 1)
+ throw new ArgumentException("'publicKey' requires version v2(1) or later", "seq");
+
+ this.publicKey = DerBitString.GetInstance(tagged, false);
+ break;
+ }
+ default:
+ {
+ throw new ArgumentException("unknown optional field in private key info", "seq");
+ }
+ }
+ }
+ }
+
+ public virtual DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public virtual Asn1Set Attributes
+ {
+ get { return attributes; }
+ }
+
+ /// Return true if a public key is present, false otherwise.
+ public virtual bool HasPublicKey
+ {
+ get { return publicKey != null; }
+ }
+
+ public virtual AlgorithmIdentifier PrivateKeyAlgorithm
+ {
+ get { return privateKeyAlgorithm; }
+ }
+
+ public virtual Asn1OctetString PrivateKeyData
+ {
+ get { return privateKey; }
+ }
+
+ public virtual Asn1Object ParsePrivateKey()
+ {
+ return Asn1Object.FromByteArray(privateKey.GetOctets());
+ }
+
+ /// For when the public key is an ASN.1 encoding.
+ public virtual Asn1Object ParsePublicKey()
+ {
+ return publicKey == null ? null : Asn1Object.FromByteArray(publicKey.GetOctets());
+ }
+
+ /// Return the public key as a raw bit string.
+ public virtual DerBitString PublicKeyData
+ {
+ get { return publicKey; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version, privateKeyAlgorithm, privateKey);
+ v.AddOptionalTagged(false, 0, attributes);
+ v.AddOptionalTagged(false, 1, publicKey);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PrivateKeyInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PrivateKeyInfo.cs.meta
new file mode 100644
index 00000000..ffbfa1fd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/PrivateKeyInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 68f715a8fa0b2614685db9fe32778d60
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RC2CBCParameter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RC2CBCParameter.cs
new file mode 100644
index 00000000..1f910567
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RC2CBCParameter.cs
@@ -0,0 +1,78 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class RC2CbcParameter
+ : Asn1Encodable
+ {
+ internal DerInteger version;
+ internal Asn1OctetString iv;
+
+ public static RC2CbcParameter GetInstance(
+ object obj)
+ {
+ if (obj is Asn1Sequence)
+ {
+ return new RC2CbcParameter((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public RC2CbcParameter(
+ byte[] iv)
+ {
+ this.iv = new DerOctetString(iv);
+ }
+
+ public RC2CbcParameter(
+ int parameterVersion,
+ byte[] iv)
+ {
+ this.version = new DerInteger(parameterVersion);
+ this.iv = new DerOctetString(iv);
+ }
+
+ private RC2CbcParameter(
+ Asn1Sequence seq)
+ {
+ if (seq.Count == 1)
+ {
+ iv = (Asn1OctetString)seq[0];
+ }
+ else
+ {
+ version = (DerInteger)seq[0];
+ iv = (Asn1OctetString)seq[1];
+ }
+ }
+
+ public BigInteger RC2ParameterVersion
+ {
+ get
+ {
+ return version == null ? null : version.Value;
+ }
+ }
+
+ public byte[] GetIV()
+ {
+ return Arrays.Clone(iv.GetOctets());
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(version);
+ v.Add(iv);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RC2CBCParameter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RC2CBCParameter.cs.meta
new file mode 100644
index 00000000..169dd168
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RC2CBCParameter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 98be317ecd40b4147b5f2951df706084
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAESOAEPparams.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAESOAEPparams.cs
new file mode 100644
index 00000000..5d299417
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAESOAEPparams.cs
@@ -0,0 +1,155 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class RsaesOaepParameters
+ : Asn1Encodable
+ {
+ private AlgorithmIdentifier hashAlgorithm;
+ private AlgorithmIdentifier maskGenAlgorithm;
+ private AlgorithmIdentifier pSourceAlgorithm;
+
+ public readonly static AlgorithmIdentifier DefaultHashAlgorithm = new AlgorithmIdentifier(OiwObjectIdentifiers.IdSha1, DerNull.Instance);
+ public readonly static AlgorithmIdentifier DefaultMaskGenFunction = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdMgf1, DefaultHashAlgorithm);
+ public readonly static AlgorithmIdentifier DefaultPSourceAlgorithm = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdPSpecified, new DerOctetString(new byte[0]));
+
+ public static RsaesOaepParameters GetInstance(
+ object obj)
+ {
+ if (obj is RsaesOaepParameters)
+ {
+ return (RsaesOaepParameters)obj;
+ }
+ else if (obj is Asn1Sequence)
+ {
+ return new RsaesOaepParameters((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * The default version
+ */
+ public RsaesOaepParameters()
+ : this(DefaultHashAlgorithm, DefaultMaskGenFunction, DefaultPSourceAlgorithm)
+ {
+ }
+
+ public RsaesOaepParameters(
+ AlgorithmIdentifier hashAlgorithm,
+ AlgorithmIdentifier maskGenAlgorithm)
+ : this(hashAlgorithm, maskGenAlgorithm, DefaultPSourceAlgorithm)
+ {
+ }
+
+ public RsaesOaepParameters(
+ AlgorithmIdentifier hashAlgorithm,
+ AlgorithmIdentifier maskGenAlgorithm,
+ AlgorithmIdentifier pSourceAlgorithm)
+ {
+ this.hashAlgorithm = hashAlgorithm;
+ this.maskGenAlgorithm = maskGenAlgorithm;
+ this.pSourceAlgorithm = pSourceAlgorithm;
+ }
+
+ public RsaesOaepParameters(
+ Asn1Sequence seq)
+ {
+ hashAlgorithm = DefaultHashAlgorithm;
+ maskGenAlgorithm = DefaultMaskGenFunction;
+ pSourceAlgorithm = DefaultPSourceAlgorithm;
+
+ for (int i = 0; i != seq.Count; i++)
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject)seq[i];
+
+ switch (o.TagNo)
+ {
+ case 0:
+ hashAlgorithm = AlgorithmIdentifier.GetInstance(o, true);
+ break;
+ case 1:
+ maskGenAlgorithm = AlgorithmIdentifier.GetInstance(o, true);
+ break;
+ case 2:
+ pSourceAlgorithm = AlgorithmIdentifier.GetInstance(o, true);
+ break;
+ default:
+ throw new ArgumentException("unknown tag");
+ }
+ }
+ }
+
+ public AlgorithmIdentifier HashAlgorithm
+ {
+ get { return hashAlgorithm; }
+ }
+
+ public AlgorithmIdentifier MaskGenAlgorithm
+ {
+ get { return maskGenAlgorithm; }
+ }
+
+ public AlgorithmIdentifier PSourceAlgorithm
+ {
+ get { return pSourceAlgorithm; }
+ }
+
+ /**
+ *
+ * RSAES-OAEP-params ::= SEQUENCE {
+ * hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ * maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ * pSourceAlgorithm [2] PKCS1PSourceAlgorithms DEFAULT pSpecifiedEmpty
+ * }
+ *
+ * OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ * { OID id-sha1 PARAMETERS NULL }|
+ * { OID id-sha256 PARAMETERS NULL }|
+ * { OID id-sha384 PARAMETERS NULL }|
+ * { OID id-sha512 PARAMETERS NULL },
+ * ... -- Allows for future expansion --
+ * }
+ * PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ * { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ * ... -- Allows for future expansion --
+ * }
+ * PKCS1PSourceAlgorithms ALGORITHM-IDENTIFIER ::= {
+ * { OID id-pSpecified PARAMETERS OCTET STRING },
+ * ... -- Allows for future expansion --
+ * }
+ *
+ * @return the asn1 primitive representing the parameters.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (!hashAlgorithm.Equals(DefaultHashAlgorithm))
+ {
+ v.Add(new DerTaggedObject(true, 0, hashAlgorithm));
+ }
+
+ if (!maskGenAlgorithm.Equals(DefaultMaskGenFunction))
+ {
+ v.Add(new DerTaggedObject(true, 1, maskGenAlgorithm));
+ }
+
+ if (!pSourceAlgorithm.Equals(DefaultPSourceAlgorithm))
+ {
+ v.Add(new DerTaggedObject(true, 2, pSourceAlgorithm));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAESOAEPparams.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAESOAEPparams.cs.meta
new file mode 100644
index 00000000..b1e2d43b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAESOAEPparams.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6b6fc9562b657954896be11d9c85d2d6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAPrivateKeyStructure.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAPrivateKeyStructure.cs
new file mode 100644
index 00000000..fb2542c9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAPrivateKeyStructure.cs
@@ -0,0 +1,146 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class RsaPrivateKeyStructure
+ : Asn1Encodable
+ {
+ private readonly BigInteger modulus;
+ private readonly BigInteger publicExponent;
+ private readonly BigInteger privateExponent;
+ private readonly BigInteger prime1;
+ private readonly BigInteger prime2;
+ private readonly BigInteger exponent1;
+ private readonly BigInteger exponent2;
+ private readonly BigInteger coefficient;
+
+ public static RsaPrivateKeyStructure GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ public static RsaPrivateKeyStructure GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+ if (obj is RsaPrivateKeyStructure)
+ return (RsaPrivateKeyStructure)obj;
+ return new RsaPrivateKeyStructure(Asn1Sequence.GetInstance(obj));
+ }
+
+ public RsaPrivateKeyStructure(
+ BigInteger modulus,
+ BigInteger publicExponent,
+ BigInteger privateExponent,
+ BigInteger prime1,
+ BigInteger prime2,
+ BigInteger exponent1,
+ BigInteger exponent2,
+ BigInteger coefficient)
+ {
+ this.modulus = modulus;
+ this.publicExponent = publicExponent;
+ this.privateExponent = privateExponent;
+ this.prime1 = prime1;
+ this.prime2 = prime2;
+ this.exponent1 = exponent1;
+ this.exponent2 = exponent2;
+ this.coefficient = coefficient;
+ }
+
+ private RsaPrivateKeyStructure(Asn1Sequence seq)
+ {
+ BigInteger version = ((DerInteger)seq[0]).Value;
+ if (version.IntValue != 0)
+ throw new ArgumentException("wrong version for RSA private key");
+
+ modulus = ((DerInteger)seq[1]).Value;
+ publicExponent = ((DerInteger)seq[2]).Value;
+ privateExponent = ((DerInteger)seq[3]).Value;
+ prime1 = ((DerInteger)seq[4]).Value;
+ prime2 = ((DerInteger)seq[5]).Value;
+ exponent1 = ((DerInteger)seq[6]).Value;
+ exponent2 = ((DerInteger)seq[7]).Value;
+ coefficient = ((DerInteger)seq[8]).Value;
+ }
+
+ public BigInteger Modulus
+ {
+ get { return modulus; }
+ }
+
+ public BigInteger PublicExponent
+ {
+ get { return publicExponent; }
+ }
+
+ public BigInteger PrivateExponent
+ {
+ get { return privateExponent; }
+ }
+
+ public BigInteger Prime1
+ {
+ get { return prime1; }
+ }
+
+ public BigInteger Prime2
+ {
+ get { return prime2; }
+ }
+
+ public BigInteger Exponent1
+ {
+ get { return exponent1; }
+ }
+
+ public BigInteger Exponent2
+ {
+ get { return exponent2; }
+ }
+
+ public BigInteger Coefficient
+ {
+ get { return coefficient; }
+ }
+
+ /**
+ * This outputs the key in Pkcs1v2 format.
+ *
+ * RsaPrivateKey ::= Sequence {
+ * version Version,
+ * modulus Integer, -- n
+ * publicExponent Integer, -- e
+ * privateExponent Integer, -- d
+ * prime1 Integer, -- p
+ * prime2 Integer, -- q
+ * exponent1 Integer, -- d mod (p-1)
+ * exponent2 Integer, -- d mod (q-1)
+ * coefficient Integer -- (inverse of q) mod p
+ * }
+ *
+ * Version ::= Integer
+ *
+ * This routine is written to output Pkcs1 version 0, private keys.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(
+ new DerInteger(0), // version
+ new DerInteger(Modulus),
+ new DerInteger(PublicExponent),
+ new DerInteger(PrivateExponent),
+ new DerInteger(Prime1),
+ new DerInteger(Prime2),
+ new DerInteger(Exponent1),
+ new DerInteger(Exponent2),
+ new DerInteger(Coefficient));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAPrivateKeyStructure.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAPrivateKeyStructure.cs.meta
new file mode 100644
index 00000000..45e64516
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSAPrivateKeyStructure.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: af28ed0dbcfbf6949b06528a70b42dc3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSASSAPSSparams.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSASSAPSSparams.cs
new file mode 100644
index 00000000..32160a4f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSASSAPSSparams.cs
@@ -0,0 +1,170 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class RsassaPssParameters
+ : Asn1Encodable
+ {
+ private AlgorithmIdentifier hashAlgorithm;
+ private AlgorithmIdentifier maskGenAlgorithm;
+ private DerInteger saltLength;
+ private DerInteger trailerField;
+
+ public readonly static AlgorithmIdentifier DefaultHashAlgorithm = new AlgorithmIdentifier(OiwObjectIdentifiers.IdSha1, DerNull.Instance);
+ public readonly static AlgorithmIdentifier DefaultMaskGenFunction = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdMgf1, DefaultHashAlgorithm);
+ public readonly static DerInteger DefaultSaltLength = new DerInteger(20);
+ public readonly static DerInteger DefaultTrailerField = new DerInteger(1);
+
+ public static RsassaPssParameters GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is RsassaPssParameters)
+ {
+ return (RsassaPssParameters)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new RsassaPssParameters((Asn1Sequence)obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * The default version
+ */
+ public RsassaPssParameters()
+ {
+ hashAlgorithm = DefaultHashAlgorithm;
+ maskGenAlgorithm = DefaultMaskGenFunction;
+ saltLength = DefaultSaltLength;
+ trailerField = DefaultTrailerField;
+ }
+
+ public RsassaPssParameters(
+ AlgorithmIdentifier hashAlgorithm,
+ AlgorithmIdentifier maskGenAlgorithm,
+ DerInteger saltLength,
+ DerInteger trailerField)
+ {
+ this.hashAlgorithm = hashAlgorithm;
+ this.maskGenAlgorithm = maskGenAlgorithm;
+ this.saltLength = saltLength;
+ this.trailerField = trailerField;
+ }
+
+ public RsassaPssParameters(
+ Asn1Sequence seq)
+ {
+ hashAlgorithm = DefaultHashAlgorithm;
+ maskGenAlgorithm = DefaultMaskGenFunction;
+ saltLength = DefaultSaltLength;
+ trailerField = DefaultTrailerField;
+
+ for (int i = 0; i != seq.Count; i++)
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject)seq[i];
+
+ switch (o.TagNo)
+ {
+ case 0:
+ hashAlgorithm = AlgorithmIdentifier.GetInstance(o, true);
+ break;
+ case 1:
+ maskGenAlgorithm = AlgorithmIdentifier.GetInstance(o, true);
+ break;
+ case 2:
+ saltLength = DerInteger.GetInstance(o, true);
+ break;
+ case 3:
+ trailerField = DerInteger.GetInstance(o, true);
+ break;
+ default:
+ throw new ArgumentException("unknown tag");
+ }
+ }
+ }
+
+ public AlgorithmIdentifier HashAlgorithm
+ {
+ get { return hashAlgorithm; }
+ }
+
+ public AlgorithmIdentifier MaskGenAlgorithm
+ {
+ get { return maskGenAlgorithm; }
+ }
+
+ public DerInteger SaltLength
+ {
+ get { return saltLength; }
+ }
+
+ public DerInteger TrailerField
+ {
+ get { return trailerField; }
+ }
+
+ /**
+ *
+ * RSASSA-PSS-params ::= SEQUENCE {
+ * hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ * maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ * saltLength [2] INTEGER DEFAULT 20,
+ * trailerField [3] TrailerField DEFAULT trailerFieldBC
+ * }
+ *
+ * OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ * { OID id-sha1 PARAMETERS NULL }|
+ * { OID id-sha256 PARAMETERS NULL }|
+ * { OID id-sha384 PARAMETERS NULL }|
+ * { OID id-sha512 PARAMETERS NULL },
+ * ... -- Allows for future expansion --
+ * }
+ *
+ * PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ * { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ * ... -- Allows for future expansion --
+ * }
+ *
+ * TrailerField ::= INTEGER { trailerFieldBC(1) }
+ *
+ * @return the asn1 primitive representing the parameters.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (!hashAlgorithm.Equals(DefaultHashAlgorithm))
+ {
+ v.Add(new DerTaggedObject(true, 0, hashAlgorithm));
+ }
+
+ if (!maskGenAlgorithm.Equals(DefaultMaskGenFunction))
+ {
+ v.Add(new DerTaggedObject(true, 1, maskGenAlgorithm));
+ }
+
+ if (!saltLength.Equals(DefaultSaltLength))
+ {
+ v.Add(new DerTaggedObject(true, 2, saltLength));
+ }
+
+ if (!trailerField.Equals(DefaultTrailerField))
+ {
+ v.Add(new DerTaggedObject(true, 3, trailerField));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSASSAPSSparams.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSASSAPSSparams.cs.meta
new file mode 100644
index 00000000..4cd55bb7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/RSASSAPSSparams.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8d93f906e4aef5245949be6c399b9bd4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SafeBag.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SafeBag.cs
new file mode 100644
index 00000000..41a68560
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SafeBag.cs
@@ -0,0 +1,78 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ public class SafeBag
+ : Asn1Encodable
+ {
+ public static SafeBag GetInstance(object obj)
+ {
+ if (obj is SafeBag)
+ return (SafeBag)obj;
+ if (obj == null)
+ return null;
+ return new SafeBag(Asn1Sequence.GetInstance(obj));
+ }
+
+ private readonly DerObjectIdentifier bagID;
+ private readonly Asn1Object bagValue;
+ private readonly Asn1Set bagAttributes;
+
+ public SafeBag(
+ DerObjectIdentifier oid,
+ Asn1Object obj)
+ {
+ this.bagID = oid;
+ this.bagValue = obj;
+ this.bagAttributes = null;
+ }
+
+ public SafeBag(
+ DerObjectIdentifier oid,
+ Asn1Object obj,
+ Asn1Set bagAttributes)
+ {
+ this.bagID = oid;
+ this.bagValue = obj;
+ this.bagAttributes = bagAttributes;
+ }
+
+ private SafeBag(Asn1Sequence seq)
+ {
+ this.bagID = (DerObjectIdentifier)seq[0];
+ this.bagValue = ((DerTaggedObject)seq[1]).GetObject();
+ if (seq.Count == 3)
+ {
+ this.bagAttributes = (Asn1Set)seq[2];
+ }
+ }
+
+ public DerObjectIdentifier BagID
+ {
+ get { return bagID; }
+ }
+
+ public Asn1Object BagValue
+ {
+ get { return bagValue; }
+ }
+
+ public Asn1Set BagAttributes
+ {
+ get { return bagAttributes; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(bagID, new DerTaggedObject(0, bagValue));
+ v.AddOptional(bagAttributes);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SafeBag.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SafeBag.cs.meta
new file mode 100644
index 00000000..5979fc3f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SafeBag.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 377fef3d32291114494f56d9d5ea884f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignedData.cs
new file mode 100644
index 00000000..856d582d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignedData.cs
@@ -0,0 +1,145 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ /**
+ * a Pkcs#7 signed data object.
+ */
+ public class SignedData
+ : Asn1Encodable
+ {
+ private readonly DerInteger version;
+ private readonly Asn1Set digestAlgorithms;
+ private readonly ContentInfo contentInfo;
+ private readonly Asn1Set certificates;
+ private readonly Asn1Set crls;
+ private readonly Asn1Set signerInfos;
+
+ public static SignedData GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+ SignedData existing = obj as SignedData;
+ if (existing != null)
+ return existing;
+ return new SignedData(Asn1Sequence.GetInstance(obj));
+ }
+
+ public SignedData(
+ DerInteger _version,
+ Asn1Set _digestAlgorithms,
+ ContentInfo _contentInfo,
+ Asn1Set _certificates,
+ Asn1Set _crls,
+ Asn1Set _signerInfos)
+ {
+ version = _version;
+ digestAlgorithms = _digestAlgorithms;
+ contentInfo = _contentInfo;
+ certificates = _certificates;
+ crls = _crls;
+ signerInfos = _signerInfos;
+ }
+
+ private SignedData(
+ Asn1Sequence seq)
+ {
+ var e = seq.GetEnumerator();
+
+ e.MoveNext();
+ version = (DerInteger) e.Current;
+
+ e.MoveNext();
+ digestAlgorithms = (Asn1Set) e.Current;
+
+ e.MoveNext();
+ contentInfo = ContentInfo.GetInstance(e.Current);
+
+ while (e.MoveNext())
+ {
+ Asn1Object o = e.Current.ToAsn1Object();
+
+ //
+ // an interesting feature of SignedData is that there appear to be varying implementations...
+ // for the moment we ignore anything which doesn't fit.
+ //
+ if (o is Asn1TaggedObject tagged)
+ {
+ switch (tagged.TagNo)
+ {
+ case 0:
+ certificates = Asn1Set.GetInstance(tagged, false);
+ break;
+ case 1:
+ crls = Asn1Set.GetInstance(tagged, false);
+ break;
+ default:
+ throw new ArgumentException("unknown tag value " + tagged.TagNo);
+ }
+ }
+ else
+ {
+ signerInfos = (Asn1Set) o;
+ }
+ }
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public Asn1Set DigestAlgorithms
+ {
+ get { return digestAlgorithms; }
+ }
+
+ public ContentInfo ContentInfo
+ {
+ get { return contentInfo; }
+ }
+
+ public Asn1Set Certificates
+ {
+ get { return certificates; }
+ }
+
+ public Asn1Set Crls
+ {
+ get { return crls; }
+ }
+
+ public Asn1Set SignerInfos
+ {
+ get { return signerInfos; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * SignedData ::= Sequence {
+ * version Version,
+ * digestAlgorithms DigestAlgorithmIdentifiers,
+ * contentInfo ContentInfo,
+ * certificates
+ * [0] IMPLICIT ExtendedCertificatesAndCertificates
+ * OPTIONAL,
+ * crls
+ * [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ * signerInfos SignerInfos }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version, digestAlgorithms, contentInfo);
+ v.AddOptionalTagged(false, 0, certificates);
+ v.AddOptionalTagged(false, 1, crls);
+ v.Add(signerInfos);
+ return new BerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignedData.cs.meta
new file mode 100644
index 00000000..36780b29
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 79707c1b9341dac4ea02ac8c31c82c84
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignerInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignerInfo.cs
new file mode 100644
index 00000000..33b099d5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignerInfo.cs
@@ -0,0 +1,146 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs
+{
+ /**
+ * a Pkcs#7 signer info object.
+ */
+ public class SignerInfo
+ : Asn1Encodable
+ {
+ private DerInteger version;
+ private IssuerAndSerialNumber issuerAndSerialNumber;
+ private AlgorithmIdentifier digAlgorithm;
+ private Asn1Set authenticatedAttributes;
+ private AlgorithmIdentifier digEncryptionAlgorithm;
+ private Asn1OctetString encryptedDigest;
+ private Asn1Set unauthenticatedAttributes;
+
+ public static SignerInfo GetInstance(
+ object obj)
+ {
+ if (obj is SignerInfo)
+ {
+ return (SignerInfo) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new SignerInfo((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public SignerInfo(
+ DerInteger version,
+ IssuerAndSerialNumber issuerAndSerialNumber,
+ AlgorithmIdentifier digAlgorithm,
+ Asn1Set authenticatedAttributes,
+ AlgorithmIdentifier digEncryptionAlgorithm,
+ Asn1OctetString encryptedDigest,
+ Asn1Set unauthenticatedAttributes)
+ {
+ this.version = version;
+ this.issuerAndSerialNumber = issuerAndSerialNumber;
+ this.digAlgorithm = digAlgorithm;
+ this.authenticatedAttributes = authenticatedAttributes;
+ this.digEncryptionAlgorithm = digEncryptionAlgorithm;
+ this.encryptedDigest = encryptedDigest;
+ this.unauthenticatedAttributes = unauthenticatedAttributes;
+ }
+
+ public SignerInfo(
+ Asn1Sequence seq)
+ {
+ var e = seq.GetEnumerator();
+
+ e.MoveNext();
+ version = (DerInteger) e.Current;
+
+ e.MoveNext();
+ issuerAndSerialNumber = IssuerAndSerialNumber.GetInstance(e.Current);
+
+ e.MoveNext();
+ digAlgorithm = AlgorithmIdentifier.GetInstance(e.Current);
+
+ e.MoveNext();
+ var obj = e.Current;
+
+ if (obj is Asn1TaggedObject tagged)
+ {
+ authenticatedAttributes = Asn1Set.GetInstance(tagged, false);
+
+ e.MoveNext();
+ digEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(e.Current);
+ }
+ else
+ {
+ authenticatedAttributes = null;
+ digEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(obj);
+ }
+
+ e.MoveNext();
+ encryptedDigest = DerOctetString.GetInstance(e.Current);
+
+ if (e.MoveNext())
+ {
+ unauthenticatedAttributes = Asn1Set.GetInstance((Asn1TaggedObject)e.Current, false);
+ }
+ else
+ {
+ unauthenticatedAttributes = null;
+ }
+ }
+
+ public DerInteger Version { get { return version; } }
+
+ public IssuerAndSerialNumber IssuerAndSerialNumber { get { return issuerAndSerialNumber; } }
+
+ public Asn1Set AuthenticatedAttributes { get { return authenticatedAttributes; } }
+
+ public AlgorithmIdentifier DigestAlgorithm { get { return digAlgorithm; } }
+
+ public Asn1OctetString EncryptedDigest { get { return encryptedDigest; } }
+
+ public AlgorithmIdentifier DigestEncryptionAlgorithm { get { return digEncryptionAlgorithm; } }
+
+ public Asn1Set UnauthenticatedAttributes { get { return unauthenticatedAttributes; } }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * SignerInfo ::= Sequence {
+ * version Version,
+ * issuerAndSerialNumber IssuerAndSerialNumber,
+ * digestAlgorithm DigestAlgorithmIdentifier,
+ * authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ * digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ * encryptedDigest EncryptedDigest,
+ * unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ * }
+ *
+ * EncryptedDigest ::= OCTET STRING
+ *
+ * DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+ *
+ * DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version, issuerAndSerialNumber, digAlgorithm);
+ v.AddOptionalTagged(false, 0, authenticatedAttributes);
+ v.Add(digEncryptionAlgorithm, encryptedDigest);
+ v.AddOptionalTagged(false, 1, unauthenticatedAttributes);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignerInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignerInfo.cs.meta
new file mode 100644
index 00000000..e82f3ece
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/pkcs/SignerInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6502c2d8185b0614fbcb752e02f3713c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart.meta
new file mode 100644
index 00000000..d6e28264
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5fa0c9d7383ddc74da08e1de0a03e61f
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart/RosstandartObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart/RosstandartObjectIdentifiers.cs
new file mode 100644
index 00000000..4fb2f8bd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart/RosstandartObjectIdentifiers.cs
@@ -0,0 +1,51 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Rosstandart
+{
+ public abstract class RosstandartObjectIdentifiers
+ {
+ public static readonly DerObjectIdentifier rosstandart = new DerObjectIdentifier("1.2.643.7");
+
+ public static readonly DerObjectIdentifier id_tc26 = rosstandart.Branch("1");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3411_12_256 = id_tc26.Branch("1.2.2");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3411_12_512 = id_tc26.Branch("1.2.3");
+
+ public static readonly DerObjectIdentifier id_tc26_hmac_gost_3411_12_256 = id_tc26.Branch("1.4.1");
+
+ public static readonly DerObjectIdentifier id_tc26_hmac_gost_3411_12_512 = id_tc26.Branch("1.4.2");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3410_12_256 = id_tc26.Branch("1.1.1");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512 = id_tc26.Branch("1.1.2");
+
+ public static readonly DerObjectIdentifier id_tc26_signwithdigest_gost_3410_12_256 = id_tc26.Branch("1.3.2");
+
+ public static readonly DerObjectIdentifier id_tc26_signwithdigest_gost_3410_12_512 = id_tc26.Branch("1.3.3");
+
+ public static readonly DerObjectIdentifier id_tc26_agreement = id_tc26.Branch("1.6");
+
+ public static readonly DerObjectIdentifier id_tc26_agreement_gost_3410_12_256 = id_tc26_agreement.Branch("1");
+
+ public static readonly DerObjectIdentifier id_tc26_agreement_gost_3410_12_512 = id_tc26_agreement.Branch("2");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3410_12_256_paramSet = id_tc26.Branch("2.1.1");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3410_12_256_paramSetA = id_tc26_gost_3410_12_256_paramSet.Branch("1");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512_paramSet = id_tc26.Branch("2.1.2");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512_paramSetA = id_tc26_gost_3410_12_512_paramSet.Branch("1");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512_paramSetB = id_tc26_gost_3410_12_512_paramSet.Branch("2");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512_paramSetC = id_tc26_gost_3410_12_512_paramSet.Branch("3");
+
+ public static readonly DerObjectIdentifier id_tc26_gost_28147_param_Z = id_tc26.Branch("2.5.1.1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart/RosstandartObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart/RosstandartObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..f8951f2e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/rosstandart/RosstandartObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8c7a3e963e4c5c14dbeccdea84267081
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec.meta
new file mode 100644
index 00000000..c7c9bbdd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 92c79a6ffc5c0e746a1de24957b60e0a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/ECPrivateKeyStructure.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/ECPrivateKeyStructure.cs
new file mode 100644
index 00000000..932881ee
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/ECPrivateKeyStructure.cs
@@ -0,0 +1,121 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Sec
+{
+ /**
+ * the elliptic curve private key object from SEC 1
+ */
+ public class ECPrivateKeyStructure
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence m_seq;
+
+ public static ECPrivateKeyStructure GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+ if (obj is ECPrivateKeyStructure ecPrivateKeyStructure)
+ return ecPrivateKeyStructure;
+ return new ECPrivateKeyStructure(Asn1Sequence.GetInstance(obj));
+ }
+
+ private ECPrivateKeyStructure(Asn1Sequence seq)
+ {
+ m_seq = seq ?? throw new ArgumentNullException(nameof(seq));
+ }
+
+ public ECPrivateKeyStructure(
+ int orderBitLength,
+ BigInteger key)
+ : this(orderBitLength, key, null)
+ {
+ }
+
+ public ECPrivateKeyStructure(
+ int orderBitLength,
+ BigInteger key,
+ Asn1Encodable parameters)
+ : this(orderBitLength, key, null, parameters)
+ {
+ }
+
+ public ECPrivateKeyStructure(
+ int orderBitLength,
+ BigInteger key,
+ DerBitString publicKey,
+ Asn1Encodable parameters)
+ {
+ if (key == null)
+ throw new ArgumentNullException(nameof(key));
+ if (orderBitLength < key.BitLength)
+ throw new ArgumentException("must be >= key bitlength", nameof(orderBitLength));
+
+ byte[] bytes = BigIntegers.AsUnsignedByteArray((orderBitLength + 7) / 8, key);
+
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ new DerInteger(1),
+ new DerOctetString(bytes));
+
+ v.AddOptionalTagged(true, 0, parameters);
+ v.AddOptionalTagged(true, 1, publicKey);
+
+ m_seq = new DerSequence(v);
+ }
+
+ public virtual BigInteger GetKey()
+ {
+ Asn1OctetString octs = (Asn1OctetString)m_seq[1];
+
+ return new BigInteger(1, octs.GetOctets());
+ }
+
+ public virtual DerBitString GetPublicKey()
+ {
+ return (DerBitString)GetObjectInTag(1, Asn1Tags.BitString);
+ }
+
+ public virtual Asn1Object GetParameters()
+ {
+ return GetObjectInTag(0, -1);
+ }
+
+ private Asn1Object GetObjectInTag(int tagNo, int baseTagNo)
+ {
+ foreach (Asn1Encodable ae in m_seq)
+ {
+ Asn1Object obj = ae.ToAsn1Object();
+
+ if (obj is Asn1TaggedObject tag)
+ {
+ if (tag.HasContextTag(tagNo))
+ {
+ return baseTagNo < 0
+ ? tag.GetExplicitBaseObject().ToAsn1Object()
+ : tag.GetBaseUniversal(true, baseTagNo);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * ECPrivateKey ::= SEQUENCE {
+ * version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
+ * privateKey OCTET STRING,
+ * parameters [0] Parameters OPTIONAL,
+ * publicKey [1] BIT STRING OPTIONAL }
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_seq;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/ECPrivateKeyStructure.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/ECPrivateKeyStructure.cs.meta
new file mode 100644
index 00000000..6a343e84
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/ECPrivateKeyStructure.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5d3d5786feccac3499d0f2fe7b812100
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECNamedCurves.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECNamedCurves.cs
new file mode 100644
index 00000000..8fe3f61e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECNamedCurves.cs
@@ -0,0 +1,1278 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Endo;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Multiplier;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Sec
+{
+ /// Elliptic curve registry for the SEC standard.
+ public static class SecNamedCurves
+ {
+ private static X9ECPoint ConfigureBasepoint(ECCurve curve, string encoding)
+ {
+ X9ECPoint G = new X9ECPoint(curve, Hex.DecodeStrict(encoding));
+ WNafUtilities.ConfigureBasepoint(G.Point);
+ return G;
+ }
+
+ private static ECCurve ConfigureCurve(ECCurve curve)
+ {
+ return curve;
+ }
+
+ private static ECCurve ConfigureCurveGlv(ECCurve c, GlvTypeBParameters p)
+ {
+ return c.Configure().SetEndomorphism(new GlvTypeBEndomorphism(c, p)).Create();
+ }
+
+ private static BigInteger FromHex(string hex)
+ {
+ return new BigInteger(1, Hex.DecodeStrict(hex));
+ }
+
+ internal class Secp112r1Holder
+ : X9ECParametersHolder
+ {
+ private Secp112r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp112r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = (2^128 - 3) / 76439
+ BigInteger p = FromHex("DB7C2ABF62E35E668076BEAD208B");
+ BigInteger a = FromHex("DB7C2ABF62E35E668076BEAD2088");
+ BigInteger b = FromHex("659EF8BA043916EEDE8911702B22");
+ BigInteger n = FromHex("DB7C2ABF62E35E7628DFAC6561C5");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("00F50B028E4D696E676875615175290472783FB1");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0409487239995A5EE76B55F9C2F098A89CE5AF8724C0A23E0E0FF77500");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp112r2Holder
+ : X9ECParametersHolder
+ {
+ private Secp112r2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp112r2Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = (2^128 - 3) / 76439
+ BigInteger p = FromHex("DB7C2ABF62E35E668076BEAD208B");
+ BigInteger a = FromHex("6127C24C05F38A0AAAF65C0EF02C");
+ BigInteger b = FromHex("51DEF1815DB5ED74FCC34C85D709");
+ BigInteger n = FromHex("36DF0AAFD8B8D7597CA10520D04B");
+ BigInteger h = BigInteger.ValueOf(4);
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("002757A1114D696E6768756151755316C05E0BD4");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "044BA30AB5E892B4E1649DD0928643ADCD46F5882E3747DEF36E956E97");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp128r1Holder
+ : X9ECParametersHolder
+ {
+ private Secp128r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp128r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^128 - 2^97 - 1
+ BigInteger p = FromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");
+ BigInteger a = FromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC");
+ BigInteger b = FromHex("E87579C11079F43DD824993C2CEE5ED3");
+ BigInteger n = FromHex("FFFFFFFE0000000075A30D1B9038A115");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("000E0D4D696E6768756151750CC03A4473D03679");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04161FF7528B899B2D0C28607CA52C5B86CF5AC8395BAFEB13C02DA292DDED7A83");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp128r2Holder
+ : X9ECParametersHolder
+ {
+ private Secp128r2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp128r2Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^128 - 2^97 - 1
+ BigInteger p = FromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");
+ BigInteger a = FromHex("D6031998D1B3BBFEBF59CC9BBFF9AEE1");
+ BigInteger b = FromHex("5EEEFCA380D02919DC2C6558BB6D8A5D");
+ BigInteger n = FromHex("3FFFFFFF7FFFFFFFBE0024720613B5A3");
+ BigInteger h = BigInteger.ValueOf(4);
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("004D696E67687561517512D8F03431FCE63B88F4");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "047B6AA5D85E572983E6FB32A7CDEBC14027B6916A894D3AEE7106FE805FC34B44");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp160k1Holder
+ : X9ECParametersHolder
+ {
+ private Secp160k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp160k1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1
+ BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");
+ BigInteger a = BigInteger.Zero;
+ BigInteger b = BigInteger.ValueOf(7);
+ BigInteger n = FromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3");
+ BigInteger h = BigInteger.One;
+
+ GlvTypeBParameters glv = new GlvTypeBParameters(
+ new BigInteger("9ba48cba5ebcb9b6bd33b92830b2a2e0e192f10a", 16),
+ new BigInteger("c39c6c3b3a36d7701b9c71a1f5804ae5d0003f4", 16),
+ new ScalarSplitParameters(
+ new BigInteger[]{
+ new BigInteger("9162fbe73984472a0a9e", 16),
+ new BigInteger("-96341f1138933bc2f505", 16) },
+ new BigInteger[]{
+ new BigInteger("127971af8721782ecffa3", 16),
+ new BigInteger("9162fbe73984472a0a9e", 16) },
+ new BigInteger("9162fbe73984472a0a9d0590", 16),
+ new BigInteger("96341f1138933bc2f503fd44", 16),
+ 176));
+
+ return ConfigureCurveGlv(new FpCurve(p, a, b, n, h, true), glv);
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "043B4C382CE37AA192A4019E763036F4F5DD4D7EBB938CF935318FDCED6BC28286531733C3F03C4FEE");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp160r1Holder
+ : X9ECParametersHolder
+ {
+ private Secp160r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp160r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^160 - 2^31 - 1
+ BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF");
+ BigInteger a = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC");
+ BigInteger b = FromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45");
+ BigInteger n = FromHex("0100000000000000000001F4C8F927AED3CA752257");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("1053CDE42C14D696E67687561517533BF3F83345");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB32");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp160r2Holder
+ : X9ECParametersHolder
+ {
+ private Secp160r2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp160r2Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1
+ BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");
+ BigInteger a = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70");
+ BigInteger b = FromHex("B4E134D3FB59EB8BAB57274904664D5AF50388BA");
+ BigInteger n = FromHex("0100000000000000000000351EE786A818F3A1A16B");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("B99B99B099B323E02709A4D696E6768756151751");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0452DCB034293A117E1F4FF11B30F7199D3144CE6DFEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp192k1Holder
+ : X9ECParametersHolder
+ {
+ private Secp192k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp192k1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1
+ BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37");
+ BigInteger a = BigInteger.Zero;
+ BigInteger b = BigInteger.ValueOf(3);
+ BigInteger n = FromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D");
+ BigInteger h = BigInteger.One;
+
+ GlvTypeBParameters glv = new GlvTypeBParameters(
+ new BigInteger("bb85691939b869c1d087f601554b96b80cb4f55b35f433c2", 16),
+ new BigInteger("3d84f26c12238d7b4f3d516613c1759033b1a5800175d0b1", 16),
+ new ScalarSplitParameters(
+ new BigInteger[]{
+ new BigInteger("71169be7330b3038edb025f1", 16),
+ new BigInteger("-b3fb3400dec5c4adceb8655c", 16) },
+ new BigInteger[]{
+ new BigInteger("12511cfe811d0f4e6bc688b4d", 16),
+ new BigInteger("71169be7330b3038edb025f1", 16) },
+ new BigInteger("71169be7330b3038edb025f1d0f9", 16),
+ new BigInteger("b3fb3400dec5c4adceb8655d4c94", 16),
+ 208));
+
+ return ConfigureCurveGlv(new FpCurve(p, a, b, n, h, true), glv);
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp192r1Holder
+ : X9ECParametersHolder
+ {
+ private Secp192r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp192r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^192 - 2^64 - 1
+ BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF");
+ BigInteger a = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC");
+ BigInteger b = FromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1");
+ BigInteger n = FromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("3045AE6FC8422F64ED579528D38120EAE12196D5");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF101207192B95FFC8DA78631011ED6B24CDD573F977A11E794811");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp224k1Holder
+ : X9ECParametersHolder
+ {
+ private Secp224k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp224k1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^224 - 2^32 - 2^12 - 2^11 - 2^9 - 2^7 - 2^4 - 2 - 1
+ BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D");
+ BigInteger a = BigInteger.Zero;
+ BigInteger b = BigInteger.ValueOf(5);
+ BigInteger n = FromHex("010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7");
+ BigInteger h = BigInteger.One;
+
+ GlvTypeBParameters glv = new GlvTypeBParameters(
+ new BigInteger("fe0e87005b4e83761908c5131d552a850b3f58b749c37cf5b84d6768", 16),
+ new BigInteger("60dcd2104c4cbc0be6eeefc2bdd610739ec34e317f9b33046c9e4788", 16),
+ new ScalarSplitParameters(
+ new BigInteger[]{
+ new BigInteger("6b8cf07d4ca75c88957d9d670591", 16),
+ new BigInteger("-b8adf1378a6eb73409fa6c9c637d", 16) },
+ new BigInteger[]{
+ new BigInteger("1243ae1b4d71613bc9f780a03690e", 16),
+ new BigInteger("6b8cf07d4ca75c88957d9d670591", 16) },
+ new BigInteger("6b8cf07d4ca75c88957d9d67059037a4", 16),
+ new BigInteger("b8adf1378a6eb73409fa6c9c637ba7f5", 16),
+ 240));
+
+ return ConfigureCurveGlv(new FpCurve(p, a, b, n, h, true), glv);
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp224r1Holder
+ : X9ECParametersHolder
+ {
+ private Secp224r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp224r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^224 - 2^96 + 1
+ BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");
+ BigInteger a = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE");
+ BigInteger b = FromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4");
+ BigInteger n = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp256k1Holder
+ : X9ECParametersHolder
+ {
+ private Secp256k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp256k1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^256 - 2^32 - 2^9 - 2^8 - 2^7 - 2^6 - 2^4 - 1
+ BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F");
+ BigInteger a = BigInteger.Zero;
+ BigInteger b = BigInteger.ValueOf(7);
+ BigInteger n = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141");
+ BigInteger h = BigInteger.One;
+
+ GlvTypeBParameters glv = new GlvTypeBParameters(
+ new BigInteger("7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee", 16),
+ new BigInteger("5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72", 16),
+ new ScalarSplitParameters(
+ new BigInteger[]{
+ new BigInteger("3086d221a7d46bcde86c90e49284eb15", 16),
+ new BigInteger("-e4437ed6010e88286f547fa90abfe4c3", 16) },
+ new BigInteger[]{
+ new BigInteger("114ca50f7a8e2f3f657c1108d9d44cfd8", 16),
+ new BigInteger("3086d221a7d46bcde86c90e49284eb15", 16) },
+ new BigInteger("3086d221a7d46bcde86c90e49284eb153dab", 16),
+ new BigInteger("e4437ed6010e88286f547fa90abfe4c42212", 16),
+ 272));
+
+ return ConfigureCurveGlv(new FpCurve(p, a, b, n, h, true), glv);
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp256r1Holder
+ : X9ECParametersHolder
+ {
+ private Secp256r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp256r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^224 (2^32 - 1) + 2^192 + 2^96 - 1
+ BigInteger p = FromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");
+ BigInteger a = FromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC");
+ BigInteger b = FromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B");
+ BigInteger n = FromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("C49D360886E704936A6678E1139D26B7819F7E90");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp384r1Holder
+ : X9ECParametersHolder
+ {
+ private Secp384r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp384r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^384 - 2^128 - 2^96 + 2^32 - 1
+ BigInteger p = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF");
+ BigInteger a = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC");
+ BigInteger b = FromHex("B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF");
+ BigInteger n = FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("A335926AA319A27A1D00896A6773A4827ACDAC73");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve, "04"
+ + "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7"
+ + "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Secp521r1Holder
+ : X9ECParametersHolder
+ {
+ private Secp521r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Secp521r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ // p = 2^521 - 1
+ BigInteger p = FromHex("01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF");
+ BigInteger a = FromHex("01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC");
+ BigInteger b = FromHex("0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00");
+ BigInteger n = FromHex("01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(p, a, b, n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("D09E8800291CB85396CC6717393284AAA0DA64BA");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve, "04"
+ + "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66"
+ + "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect113r1Holder
+ : X9ECParametersHolder
+ {
+ private Sect113r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect113r1Holder();
+
+ private const int m = 113;
+ private const int k = 9;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = FromHex("003088250CA6E7C7FE649CE85820F7");
+ BigInteger b = FromHex("00E8BEE4D3E2260744188BE0E9C723");
+ BigInteger n = FromHex("0100000000000000D9CCEC8A39E56F");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("10E723AB14D696E6768756151756FEBF8FCB49A9");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04009D73616F35F4AB1407D73562C10F00A52830277958EE84D1315ED31886");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect113r2Holder
+ : X9ECParametersHolder
+ {
+ private Sect113r2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect113r2Holder();
+
+ private const int m = 113;
+ private const int k = 9;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = FromHex("00689918DBEC7E5A0DD6DFC0AA55C7");
+ BigInteger b = FromHex("0095E9A9EC9B297BD4BF36E059184F");
+ BigInteger n = FromHex("010000000000000108789B2496AF93");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("10C0FB15760860DEF1EEF4D696E676875615175D");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0401A57A6A7B26CA5EF52FCDB816479700B3ADC94ED1FE674C06E695BABA1D");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect131r1Holder
+ : X9ECParametersHolder
+ {
+ private Sect131r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect131r1Holder();
+
+ private const int m = 131;
+ private const int k1 = 2;
+ private const int k2 = 3;
+ private const int k3 = 8;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = FromHex("07A11B09A76B562144418FF3FF8C2570B8");
+ BigInteger b = FromHex("0217C05610884B63B9C6C7291678F9D341");
+ BigInteger n = FromHex("0400000000000000023123953A9464B54D");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k1, k2, k3, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("4D696E676875615175985BD3ADBADA21B43A97E2");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "040081BAF91FDF9833C40F9C181343638399078C6E7EA38C001F73C8134B1B4EF9E150");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect131r2Holder
+ : X9ECParametersHolder
+ {
+ private Sect131r2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect131r2Holder();
+
+ private const int m = 131;
+ private const int k1 = 2;
+ private const int k2 = 3;
+ private const int k3 = 8;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = FromHex("03E5A88919D7CAFCBF415F07C2176573B2");
+ BigInteger b = FromHex("04B8266A46C55657AC734CE38F018F2192");
+ BigInteger n = FromHex("0400000000000000016954A233049BA98F");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k1, k2, k3, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("985BD3ADBAD4D696E676875615175A21B43A97E3");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "040356DCD8F2F95031AD652D23951BB366A80648F06D867940A5366D9E265DE9EB240F");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect163k1Holder
+ : X9ECParametersHolder
+ {
+ private Sect163k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect163k1Holder();
+
+ private const int m = 163;
+ private const int k1 = 3;
+ private const int k2 = 6;
+ private const int k3 = 7;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.One;
+ BigInteger b = BigInteger.One;
+ BigInteger n = FromHex("04000000000000000000020108A2E0CC0D99F8A5EF");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k1, k2, k3, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0402FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE80289070FB05D38FF58321F2E800536D538CCDAA3D9");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect163r1Holder
+ : X9ECParametersHolder
+ {
+ private Sect163r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect163r1Holder();
+
+ private const int m = 163;
+ private const int k1 = 3;
+ private const int k2 = 6;
+ private const int k3 = 7;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = FromHex("07B6882CAAEFA84F9554FF8428BD88E246D2782AE2");
+ BigInteger b = FromHex("0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9");
+ BigInteger n = FromHex("03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k1, k2, k3, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("24B7B137C8A14D696E6768756151756FD0DA2E5C");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "040369979697AB43897789566789567F787A7876A65400435EDB42EFAFB2989D51FEFCE3C80988F41FF883");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect163r2Holder
+ : X9ECParametersHolder
+ {
+ private Sect163r2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect163r2Holder();
+
+ private const int m = 163;
+ private const int k1 = 3;
+ private const int k2 = 6;
+ private const int k3 = 7;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.One;
+ BigInteger b = FromHex("020A601907B8C953CA1481EB10512F78744A3205FD");
+ BigInteger n = FromHex("040000000000000000000292FE77E70C12A4234C33");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k1, k2, k3, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("85E25BFE5C86226CDB12016F7553F9D0E693A268");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0403F0EBA16286A2D57EA0991168D4994637E8343E3600D51FBC6C71A0094FA2CDD545B11C5C0C797324F1");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect193r1Holder
+ : X9ECParametersHolder
+ {
+ private Sect193r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect193r1Holder();
+
+ private const int m = 193;
+ private const int k = 15;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = FromHex("0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01");
+ BigInteger b = FromHex("00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814");
+ BigInteger n = FromHex("01000000000000000000000000C7F34A778F443ACC920EBA49");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("103FAEC74D696E676875615175777FC5B191EF30");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0401F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E10025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect193r2Holder
+ : X9ECParametersHolder
+ {
+ private Sect193r2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect193r2Holder();
+
+ private const int m = 193;
+ private const int k = 15;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = FromHex("0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B");
+ BigInteger b = FromHex("00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE");
+ BigInteger n = FromHex("010000000000000000000000015AAB561B005413CCD4EE99D5");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("10B7B4D696E676875615175137C8A16FD0DA2211");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0400D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect233k1Holder
+ : X9ECParametersHolder
+ {
+ private Sect233k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect233k1Holder();
+
+ private const int m = 233;
+ private const int k = 74;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.Zero;
+ BigInteger b = BigInteger.One;
+ BigInteger n = FromHex("8000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF");
+ BigInteger h = BigInteger.ValueOf(4);
+
+ return ConfigureCurve(new F2mCurve(m, k, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD612601DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect233r1Holder
+ : X9ECParametersHolder
+ {
+ private Sect233r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect233r1Holder();
+
+ private const int m = 233;
+ private const int k = 74;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.One;
+ BigInteger b = FromHex("0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD");
+ BigInteger n = FromHex("01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("74D59FF07F6B413D0EA14B344B20A2DB049B50C3");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0400FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect239k1Holder
+ : X9ECParametersHolder
+ {
+ private Sect239k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect239k1Holder();
+
+ private const int m = 239;
+ private const int k = 158;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.Zero;
+ BigInteger b = BigInteger.One;
+ BigInteger n = FromHex("2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5");
+ BigInteger h = BigInteger.ValueOf(4);
+
+ return ConfigureCurve(new F2mCurve(m, k, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0429A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect283k1Holder
+ : X9ECParametersHolder
+ {
+ private Sect283k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect283k1Holder();
+
+ private const int m = 283;
+ private const int k1 = 5;
+ private const int k2 = 7;
+ private const int k3 = 12;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.Zero;
+ BigInteger b = BigInteger.One;
+ BigInteger n = FromHex("01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61");
+ BigInteger h = BigInteger.ValueOf(4);
+
+ return ConfigureCurve(new F2mCurve(m, k1, k2, k3, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve, "04"
+ + "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836"
+ + "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect283r1Holder
+ : X9ECParametersHolder
+ {
+ private Sect283r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect283r1Holder();
+
+ private const int m = 283;
+ private const int k1 = 5;
+ private const int k2 = 7;
+ private const int k3 = 12;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.One;
+ BigInteger b = FromHex("027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5");
+ BigInteger n = FromHex("03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k1, k2, k3, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("77E2B07370EB0F832A6DD5B62DFC88CD06BB84BE");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve, "04"
+ + "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053"
+ + "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect409k1Holder
+ : X9ECParametersHolder
+ {
+ private Sect409k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect409k1Holder();
+
+ private const int m = 409;
+ private const int k = 87;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.Zero;
+ BigInteger b = BigInteger.One;
+ BigInteger n = FromHex("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF");
+ BigInteger h = BigInteger.ValueOf(4);
+
+ return ConfigureCurve(new F2mCurve(m, k, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve, "04"
+ + "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746"
+ + "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect409r1Holder
+ : X9ECParametersHolder
+ {
+ private Sect409r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect409r1Holder();
+
+ private const int m = 409;
+ private const int k = 87;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.One;
+ BigInteger b = FromHex("0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F");
+ BigInteger n = FromHex("010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("4099B5A457F9D69F79213D094C4BCD4D4262210B");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve, "04"
+ + "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7"
+ + "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect571k1Holder
+ : X9ECParametersHolder
+ {
+ private Sect571k1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect571k1Holder();
+
+ private const int m = 571;
+ private const int k1 = 2;
+ private const int k2 = 5;
+ private const int k3 = 10;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.Zero;
+ BigInteger b = BigInteger.One;
+ BigInteger n = FromHex("020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001");
+ BigInteger h = BigInteger.ValueOf(4);
+
+ return ConfigureCurve(new F2mCurve(m, k1, k2, k3, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve, "04"
+ + "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972"
+ + "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Sect571r1Holder
+ : X9ECParametersHolder
+ {
+ private Sect571r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Sect571r1Holder();
+
+ private const int m = 571;
+ private const int k1 = 2;
+ private const int k2 = 5;
+ private const int k3 = 10;
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger a = BigInteger.One;
+ BigInteger b = FromHex("02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A");
+ BigInteger n = FromHex("03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47");
+ BigInteger h = BigInteger.ValueOf(2);
+
+ return ConfigureCurve(new F2mCurve(m, k1, k2, k3, a, b, n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("2AA058F73A0E33AB486B0F610410C53A7F132310");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve, "04"
+ + "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19"
+ + "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ private static readonly Dictionary objIds =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly Dictionary curves =
+ new Dictionary();
+ private static readonly Dictionary names =
+ new Dictionary();
+
+ private static void DefineCurve(string name, DerObjectIdentifier oid, X9ECParametersHolder holder)
+ {
+ objIds.Add(name, oid);
+ names.Add(oid, name);
+ curves.Add(oid, holder);
+ }
+
+ static SecNamedCurves()
+ {
+ DefineCurve("secp112r1", SecObjectIdentifiers.SecP112r1, Secp112r1Holder.Instance);
+ DefineCurve("secp112r2", SecObjectIdentifiers.SecP112r2, Secp112r2Holder.Instance);
+ DefineCurve("secp128r1", SecObjectIdentifiers.SecP128r1, Secp128r1Holder.Instance);
+ DefineCurve("secp128r2", SecObjectIdentifiers.SecP128r2, Secp128r2Holder.Instance);
+ DefineCurve("secp160k1", SecObjectIdentifiers.SecP160k1, Secp160k1Holder.Instance);
+ DefineCurve("secp160r1", SecObjectIdentifiers.SecP160r1, Secp160r1Holder.Instance);
+ DefineCurve("secp160r2", SecObjectIdentifiers.SecP160r2, Secp160r2Holder.Instance);
+ DefineCurve("secp192k1", SecObjectIdentifiers.SecP192k1, Secp192k1Holder.Instance);
+ DefineCurve("secp192r1", SecObjectIdentifiers.SecP192r1, Secp192r1Holder.Instance);
+ DefineCurve("secp224k1", SecObjectIdentifiers.SecP224k1, Secp224k1Holder.Instance);
+ DefineCurve("secp224r1", SecObjectIdentifiers.SecP224r1, Secp224r1Holder.Instance);
+ DefineCurve("secp256k1", SecObjectIdentifiers.SecP256k1, Secp256k1Holder.Instance);
+ DefineCurve("secp256r1", SecObjectIdentifiers.SecP256r1, Secp256r1Holder.Instance);
+ DefineCurve("secp384r1", SecObjectIdentifiers.SecP384r1, Secp384r1Holder.Instance);
+ DefineCurve("secp521r1", SecObjectIdentifiers.SecP521r1, Secp521r1Holder.Instance);
+
+ DefineCurve("sect113r1", SecObjectIdentifiers.SecT113r1, Sect113r1Holder.Instance);
+ DefineCurve("sect113r2", SecObjectIdentifiers.SecT113r2, Sect113r2Holder.Instance);
+ DefineCurve("sect131r1", SecObjectIdentifiers.SecT131r1, Sect131r1Holder.Instance);
+ DefineCurve("sect131r2", SecObjectIdentifiers.SecT131r2, Sect131r2Holder.Instance);
+ DefineCurve("sect163k1", SecObjectIdentifiers.SecT163k1, Sect163k1Holder.Instance);
+ DefineCurve("sect163r1", SecObjectIdentifiers.SecT163r1, Sect163r1Holder.Instance);
+ DefineCurve("sect163r2", SecObjectIdentifiers.SecT163r2, Sect163r2Holder.Instance);
+ DefineCurve("sect193r1", SecObjectIdentifiers.SecT193r1, Sect193r1Holder.Instance);
+ DefineCurve("sect193r2", SecObjectIdentifiers.SecT193r2, Sect193r2Holder.Instance);
+ DefineCurve("sect233k1", SecObjectIdentifiers.SecT233k1, Sect233k1Holder.Instance);
+ DefineCurve("sect233r1", SecObjectIdentifiers.SecT233r1, Sect233r1Holder.Instance);
+ DefineCurve("sect239k1", SecObjectIdentifiers.SecT239k1, Sect239k1Holder.Instance);
+ DefineCurve("sect283k1", SecObjectIdentifiers.SecT283k1, Sect283k1Holder.Instance);
+ DefineCurve("sect283r1", SecObjectIdentifiers.SecT283r1, Sect283r1Holder.Instance);
+ DefineCurve("sect409k1", SecObjectIdentifiers.SecT409k1, Sect409k1Holder.Instance);
+ DefineCurve("sect409r1", SecObjectIdentifiers.SecT409r1, Sect409r1Holder.Instance);
+ DefineCurve("sect571k1", SecObjectIdentifiers.SecT571k1, Sect571k1Holder.Instance);
+ DefineCurve("sect571r1", SecObjectIdentifiers.SecT571r1, Sect571r1Holder.Instance);
+ }
+
+ /// Look up the for the curve with the given name.
+ /// The name of the curve.
+ public static X9ECParameters GetByName(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOid(oid);
+ }
+
+ /// Look up an for the curve with the given name.
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The name of the curve.
+ public static X9ECParametersHolder GetByNameLazy(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOidLazy(oid);
+ }
+
+ /// Look up the for the curve with the given
+ /// OID .
+ /// The OID for the curve.
+ public static X9ECParameters GetByOid(DerObjectIdentifier oid)
+ {
+ return GetByOidLazy(oid)?.Parameters;
+ }
+
+ /// Look up an for the curve with the given
+ /// OID .
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The OID for the curve.
+ public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(curves, oid);
+ }
+
+ /// Look up the name of the curve with the given OID .
+ /// The OID for the curve.
+ public static string GetName(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(names, oid);
+ }
+
+ /// Look up the OID of the curve with the given name.
+ /// The name of the curve.
+ public static DerObjectIdentifier GetOid(string name)
+ {
+ return CollectionUtilities.GetValueOrNull(objIds, name);
+ }
+
+ /// Enumerate the available curve names in this registry.
+ public static IEnumerable Names
+ {
+ get { return CollectionUtilities.Proxy(objIds.Keys); }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECNamedCurves.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECNamedCurves.cs.meta
new file mode 100644
index 00000000..ee0b2a9c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECNamedCurves.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: df576bb36e3e9f247a0482cd1a9971d9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECObjectIdentifiers.cs
new file mode 100644
index 00000000..9a6dcc61
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECObjectIdentifiers.cs
@@ -0,0 +1,56 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Sec
+{
+ public abstract class SecObjectIdentifiers
+ {
+ /**
+ * EllipticCurve OBJECT IDENTIFIER ::= {
+ * iso(1) identified-organization(3) certicom(132) curve(0)
+ * }
+ */
+ public static readonly DerObjectIdentifier EllipticCurve = new DerObjectIdentifier("1.3.132.0");
+
+ public static readonly DerObjectIdentifier SecT163k1 = new DerObjectIdentifier(EllipticCurve + ".1");
+ public static readonly DerObjectIdentifier SecT163r1 = new DerObjectIdentifier(EllipticCurve + ".2");
+ public static readonly DerObjectIdentifier SecT239k1 = new DerObjectIdentifier(EllipticCurve + ".3");
+ public static readonly DerObjectIdentifier SecT113r1 = new DerObjectIdentifier(EllipticCurve + ".4");
+ public static readonly DerObjectIdentifier SecT113r2 = new DerObjectIdentifier(EllipticCurve + ".5");
+ public static readonly DerObjectIdentifier SecP112r1 = new DerObjectIdentifier(EllipticCurve + ".6");
+ public static readonly DerObjectIdentifier SecP112r2 = new DerObjectIdentifier(EllipticCurve + ".7");
+ public static readonly DerObjectIdentifier SecP160r1 = new DerObjectIdentifier(EllipticCurve + ".8");
+ public static readonly DerObjectIdentifier SecP160k1 = new DerObjectIdentifier(EllipticCurve + ".9");
+ public static readonly DerObjectIdentifier SecP256k1 = new DerObjectIdentifier(EllipticCurve + ".10");
+ public static readonly DerObjectIdentifier SecT163r2 = new DerObjectIdentifier(EllipticCurve + ".15");
+ public static readonly DerObjectIdentifier SecT283k1 = new DerObjectIdentifier(EllipticCurve + ".16");
+ public static readonly DerObjectIdentifier SecT283r1 = new DerObjectIdentifier(EllipticCurve + ".17");
+ public static readonly DerObjectIdentifier SecT131r1 = new DerObjectIdentifier(EllipticCurve + ".22");
+ public static readonly DerObjectIdentifier SecT131r2 = new DerObjectIdentifier(EllipticCurve + ".23");
+ public static readonly DerObjectIdentifier SecT193r1 = new DerObjectIdentifier(EllipticCurve + ".24");
+ public static readonly DerObjectIdentifier SecT193r2 = new DerObjectIdentifier(EllipticCurve + ".25");
+ public static readonly DerObjectIdentifier SecT233k1 = new DerObjectIdentifier(EllipticCurve + ".26");
+ public static readonly DerObjectIdentifier SecT233r1 = new DerObjectIdentifier(EllipticCurve + ".27");
+ public static readonly DerObjectIdentifier SecP128r1 = new DerObjectIdentifier(EllipticCurve + ".28");
+ public static readonly DerObjectIdentifier SecP128r2 = new DerObjectIdentifier(EllipticCurve + ".29");
+ public static readonly DerObjectIdentifier SecP160r2 = new DerObjectIdentifier(EllipticCurve + ".30");
+ public static readonly DerObjectIdentifier SecP192k1 = new DerObjectIdentifier(EllipticCurve + ".31");
+ public static readonly DerObjectIdentifier SecP224k1 = new DerObjectIdentifier(EllipticCurve + ".32");
+ public static readonly DerObjectIdentifier SecP224r1 = new DerObjectIdentifier(EllipticCurve + ".33");
+ public static readonly DerObjectIdentifier SecP384r1 = new DerObjectIdentifier(EllipticCurve + ".34");
+ public static readonly DerObjectIdentifier SecP521r1 = new DerObjectIdentifier(EllipticCurve + ".35");
+ public static readonly DerObjectIdentifier SecT409k1 = new DerObjectIdentifier(EllipticCurve + ".36");
+ public static readonly DerObjectIdentifier SecT409r1 = new DerObjectIdentifier(EllipticCurve + ".37");
+ public static readonly DerObjectIdentifier SecT571k1 = new DerObjectIdentifier(EllipticCurve + ".38");
+ public static readonly DerObjectIdentifier SecT571r1 = new DerObjectIdentifier(EllipticCurve + ".39");
+
+ public static readonly DerObjectIdentifier SecP192r1 = X9ObjectIdentifiers.Prime192v1;
+ public static readonly DerObjectIdentifier SecP256r1 = X9ObjectIdentifiers.Prime256v1;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..8417dd91
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/sec/SECObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3f1b3aedfec42bd43856c0cd99dd1523
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime.meta
new file mode 100644
index 00000000..ff07a4c7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 3cd50e8c7e8bedd44aad19925927bae8
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEAttributes.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEAttributes.cs
new file mode 100644
index 00000000..341c8f92
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEAttributes.cs
@@ -0,0 +1,15 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Smime
+{
+ public abstract class SmimeAttributes
+ {
+ public static readonly DerObjectIdentifier SmimeCapabilities = PkcsObjectIdentifiers.Pkcs9AtSmimeCapabilities;
+ public static readonly DerObjectIdentifier EncrypKeyPref = PkcsObjectIdentifiers.IdAAEncrypKeyPref;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEAttributes.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEAttributes.cs.meta
new file mode 100644
index 00000000..e3bb378b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEAttributes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f5de6cadf43fdfc4c940567a6e5eddd4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilities.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilities.cs
new file mode 100644
index 00000000..cbf4baa2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilities.cs
@@ -0,0 +1,113 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Smime
+{
+ /**
+ * Handler class for dealing with S/MIME Capabilities
+ */
+ public class SmimeCapabilities
+ : Asn1Encodable
+ {
+ /**
+ * general preferences
+ */
+ public static readonly DerObjectIdentifier PreferSignedData = PkcsObjectIdentifiers.PreferSignedData;
+ public static readonly DerObjectIdentifier CannotDecryptAny = PkcsObjectIdentifiers.CannotDecryptAny;
+ public static readonly DerObjectIdentifier SmimeCapabilitesVersions = PkcsObjectIdentifiers.SmimeCapabilitiesVersions;
+
+ /**
+ * encryption algorithms preferences
+ */
+ public static readonly DerObjectIdentifier Aes256Cbc = NistObjectIdentifiers.IdAes256Cbc;
+ public static readonly DerObjectIdentifier Aes192Cbc = NistObjectIdentifiers.IdAes192Cbc;
+ public static readonly DerObjectIdentifier Aes128Cbc = NistObjectIdentifiers.IdAes128Cbc;
+ public static readonly DerObjectIdentifier IdeaCbc = new DerObjectIdentifier("1.3.6.1.4.1.188.7.1.1.2");
+ public static readonly DerObjectIdentifier Cast5Cbc = new DerObjectIdentifier("1.2.840.113533.7.66.10");
+ public static readonly DerObjectIdentifier DesCbc = new DerObjectIdentifier("1.3.14.3.2.7");
+ public static readonly DerObjectIdentifier DesEde3Cbc = PkcsObjectIdentifiers.DesEde3Cbc;
+ public static readonly DerObjectIdentifier RC2Cbc = PkcsObjectIdentifiers.RC2Cbc;
+
+ private Asn1Sequence capabilities;
+
+ /**
+ * return an Attr object from the given object.
+ *
+ * @param o the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static SmimeCapabilities GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is SmimeCapabilities)
+ {
+ return (SmimeCapabilities) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new SmimeCapabilities((Asn1Sequence) obj);
+ }
+
+ if (obj is AttributeX509)
+ {
+ return new SmimeCapabilities(
+ (Asn1Sequence)(((AttributeX509) obj).AttrValues[0]));
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public SmimeCapabilities(
+ Asn1Sequence seq)
+ {
+ capabilities = seq;
+ }
+
+ /**
+ * returns an ArrayList with 0 or more objects of all the capabilities
+ * matching the passed in capability Oid. If the Oid passed is null the
+ * entire set is returned.
+ */
+ public IList GetCapabilitiesForOid(DerObjectIdentifier capability)
+ {
+ var list = new List();
+ DoGetCapabilitiesForOid(capability, list);
+ return list;
+ }
+
+ private void DoGetCapabilitiesForOid(DerObjectIdentifier capability, IList list)
+ {
+ foreach (object o in capabilities)
+ {
+ SmimeCapability cap = SmimeCapability.GetInstance(o);
+
+ if (capability == null || capability.Equals(cap.CapabilityID))
+ {
+ list.Add(cap);
+ }
+ }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * SMIMECapabilities ::= Sequence OF SMIMECapability
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return capabilities;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilities.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilities.cs.meta
new file mode 100644
index 00000000..622f1af1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilities.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8048b881c91172a4e922d21cd020ae40
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilitiesAttribute.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilitiesAttribute.cs
new file mode 100644
index 00000000..5addcb2c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilitiesAttribute.cs
@@ -0,0 +1,20 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Smime
+{
+ public class SmimeCapabilitiesAttribute
+ : AttributeX509
+ {
+ public SmimeCapabilitiesAttribute(
+ SmimeCapabilityVector capabilities)
+ : base(SmimeAttributes.SmimeCapabilities,
+ new DerSet(new DerSequence(capabilities.ToAsn1EncodableVector())))
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilitiesAttribute.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilitiesAttribute.cs.meta
new file mode 100644
index 00000000..d7ed2b30
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilitiesAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c62062cde496d8c4b857ddecfb5ff8c0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapability.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapability.cs
new file mode 100644
index 00000000..da5f4d13
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapability.cs
@@ -0,0 +1,100 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Smime
+{
+ public class SmimeCapability
+ : Asn1Encodable
+ {
+ /**
+ * general preferences
+ */
+ public static readonly DerObjectIdentifier PreferSignedData = PkcsObjectIdentifiers.PreferSignedData;
+ public static readonly DerObjectIdentifier CannotDecryptAny = PkcsObjectIdentifiers.CannotDecryptAny;
+ public static readonly DerObjectIdentifier SmimeCapabilitiesVersions = PkcsObjectIdentifiers.SmimeCapabilitiesVersions;
+
+ /**
+ * encryption algorithms preferences
+ */
+ public static readonly DerObjectIdentifier DesCbc = new DerObjectIdentifier("1.3.14.3.2.7");
+ public static readonly DerObjectIdentifier DesEde3Cbc = PkcsObjectIdentifiers.DesEde3Cbc;
+ public static readonly DerObjectIdentifier RC2Cbc = PkcsObjectIdentifiers.RC2Cbc;
+
+ private DerObjectIdentifier capabilityID;
+ private Asn1Object parameters;
+
+ public SmimeCapability(
+ Asn1Sequence seq)
+ {
+ capabilityID = (DerObjectIdentifier) seq[0].ToAsn1Object();
+
+ if (seq.Count > 1)
+ {
+ parameters = seq[1].ToAsn1Object();
+ }
+ }
+
+ public SmimeCapability(
+ DerObjectIdentifier capabilityID,
+ Asn1Encodable parameters)
+ {
+ if (capabilityID == null)
+ throw new ArgumentNullException("capabilityID");
+
+ this.capabilityID = capabilityID;
+
+ if (parameters != null)
+ {
+ this.parameters = parameters.ToAsn1Object();
+ }
+ }
+
+ public static SmimeCapability GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is SmimeCapability)
+ {
+ return (SmimeCapability) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new SmimeCapability((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Invalid SmimeCapability");
+ }
+
+ public DerObjectIdentifier CapabilityID
+ {
+ get { return capabilityID; }
+ }
+
+ public Asn1Object Parameters
+ {
+ get { return parameters; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * SMIMECapability ::= Sequence {
+ * capabilityID OBJECT IDENTIFIER,
+ * parameters ANY DEFINED BY capabilityID OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(capabilityID);
+ v.AddOptional(parameters);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapability.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapability.cs.meta
new file mode 100644
index 00000000..757c876c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapability.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f18e8231ef7af74479774360d10af8eb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilityVector.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilityVector.cs
new file mode 100644
index 00000000..34a81e10
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilityVector.cs
@@ -0,0 +1,41 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Smime
+{
+ /**
+ * Handler for creating a vector S/MIME Capabilities
+ */
+ public class SmimeCapabilityVector
+ {
+ private readonly Asn1EncodableVector capabilities = new Asn1EncodableVector();
+
+ public void AddCapability(
+ DerObjectIdentifier capability)
+ {
+ capabilities.Add(new DerSequence(capability));
+ }
+
+ public void AddCapability(
+ DerObjectIdentifier capability,
+ int value)
+ {
+ capabilities.Add(new DerSequence(capability, new DerInteger(value)));
+ }
+
+ public void AddCapability(
+ DerObjectIdentifier capability,
+ Asn1Encodable parameters)
+ {
+ capabilities.Add(new DerSequence(capability, parameters));
+ }
+
+ public Asn1EncodableVector ToAsn1EncodableVector()
+ {
+ return capabilities;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilityVector.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilityVector.cs.meta
new file mode 100644
index 00000000..903fd466
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMECapabilityVector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 219a06bd3673c4044948b9dfb5f49b75
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEEncryptionKeyPreferenceAttribute.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEEncryptionKeyPreferenceAttribute.cs
new file mode 100644
index 00000000..604570b8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEEncryptionKeyPreferenceAttribute.cs
@@ -0,0 +1,48 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Smime
+{
+ /**
+ * The SmimeEncryptionKeyPreference object.
+ *
+ * SmimeEncryptionKeyPreference ::= CHOICE {
+ * issuerAndSerialNumber [0] IssuerAndSerialNumber,
+ * receipentKeyId [1] RecipientKeyIdentifier,
+ * subjectAltKeyIdentifier [2] SubjectKeyIdentifier
+ * }
+ *
+ */
+ public class SmimeEncryptionKeyPreferenceAttribute
+ : AttributeX509
+ {
+ public SmimeEncryptionKeyPreferenceAttribute(
+ IssuerAndSerialNumber issAndSer)
+ : base(SmimeAttributes.EncrypKeyPref,
+ new DerSet(new DerTaggedObject(false, 0, issAndSer)))
+ {
+ }
+
+ public SmimeEncryptionKeyPreferenceAttribute(
+ RecipientKeyIdentifier rKeyID)
+ : base(SmimeAttributes.EncrypKeyPref,
+ new DerSet(new DerTaggedObject(false, 1, rKeyID)))
+ {
+ }
+
+ /**
+ * @param sKeyId the subjectKeyIdentifier value (normally the X.509 one)
+ */
+ public SmimeEncryptionKeyPreferenceAttribute(
+ Asn1OctetString sKeyID)
+ : base(SmimeAttributes.EncrypKeyPref,
+ new DerSet(new DerTaggedObject(false, 2, sKeyID)))
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEEncryptionKeyPreferenceAttribute.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEEncryptionKeyPreferenceAttribute.cs.meta
new file mode 100644
index 00000000..7305c994
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/smime/SMIMEEncryptionKeyPreferenceAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d5b356023dc59d741b035778944ac47e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust.meta
new file mode 100644
index 00000000..bfe1db04
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 30f0aab5c588b124d968e0b9cfc7924b
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTNamedCurves.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTNamedCurves.cs
new file mode 100644
index 00000000..b82591bd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTNamedCurves.cs
@@ -0,0 +1,557 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Multiplier;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust
+{
+ /// Elliptic curve registry for curves defined in "ECC Brainpool Standard Curves and Curve Generation"
+ /// http://www.ecc-brainpool.org/download/draft_pkix_additional_ecc_dp.txt .
+ public static class TeleTrusTNamedCurves
+ {
+ private static X9ECPoint ConfigureBasepoint(ECCurve curve, string encoding)
+ {
+ X9ECPoint G = new X9ECPoint(curve, Hex.DecodeStrict(encoding));
+ WNafUtilities.ConfigureBasepoint(G.Point);
+ return G;
+ }
+
+ private static ECCurve ConfigureCurve(ECCurve curve)
+ {
+ return curve;
+ }
+
+ private static BigInteger FromHex(string hex)
+ {
+ return new BigInteger(1, Hex.DecodeStrict(hex));
+ }
+
+ internal class BrainpoolP160r1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP160r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP160r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("E95E4A5F737059DC60DF5991D45029409E60FC09");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("E95E4A5F737059DC60DFC7AD95B3D8139515620F"), // q
+ FromHex("340E7BE2A280EB74E2BE61BADA745D97E8F7C300"), // a
+ FromHex("1E589A8595423412134FAA2DBDEC95C8D8675E58"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04BED5AF16EA3F6A4F62938C4631EB5AF7BDBCDBC31667CB477A1A8EC338F94741669C976316DA6321");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP160t1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP160t1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP160t1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("E95E4A5F737059DC60DF5991D45029409E60FC09");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ //FromHex("24DBFF5DEC9B986BBFE5295A29BFBAE45E0F5D0B"), // Z
+ FromHex("E95E4A5F737059DC60DFC7AD95B3D8139515620F"), // q
+ FromHex("E95E4A5F737059DC60DFC7AD95B3D8139515620C"), // a
+ FromHex("7A556B6DAE535B7B51ED2C4D7DAA7A0B5C55F380"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04B199B13B9B34EFC1397E64BAEB05ACC265FF2378ADD6718B7C7C1961F0991B842443772152C9E0AD");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP192r1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP192r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP192r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("C302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86297"), // q
+ FromHex("6A91174076B1E0E19C39C031FE8685C1CAE040E5C69A28EF"), // a
+ FromHex("469A28EF7C28CCA3DC721D044F4496BCCA7EF4146FBF25C9"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04C0A0647EAAB6A48753B033C56CB0F0900A2F5C4853375FD614B690866ABD5BB88B5F4828C1490002E6773FA2FA299B8F");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP192t1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP192t1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP192t1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("C302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ //FromHex("1B6F5CC8DB4DC7AF19458A9CB80DC2295E5EB9C3732104CB") // Z
+ FromHex("C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86297"), // q
+ FromHex("C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86294"), // a
+ FromHex("13D56FFAEC78681E68F9DEB43B35BEC2FB68542E27897B79"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "043AE9E58C82F63C30282E1FE7BBF43FA72C446AF6F4618129097E2C5667C2223A902AB5CA449D0084B7E5B3DE7CCC01C9");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP224r1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP224r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP224r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("D7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FF"), // q
+ FromHex("68A5E62CA9CE6C1C299803A6C1530B514E182AD8B0042A59CAD29F43"), // a
+ FromHex("2580F63CCFE44138870713B1A92369E33E2135D266DBB372386C400B"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "040D9029AD2C7E5CF4340823B2A87DC68C9E4CE3174C1E6EFDEE12C07D58AA56F772C0726F24C6B89E4ECDAC24354B9E99CAA3F6D3761402CD");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP224t1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP224t1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP224t1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("D7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ //FromHex("2DF271E14427A346910CF7A2E6CFA7B3F484E5C2CCE1C8B730E28B3F") // Z
+ FromHex("D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FF"), // q
+ FromHex("D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FC"), // a
+ FromHex("4B337D934104CD7BEF271BF60CED1ED20DA14C08B3BB64F18A60888D"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "046AB1E344CE25FF3896424E7FFE14762ECB49F8928AC0C76029B4D5800374E9F5143E568CD23F3F4D7C0D4B1E41C8CC0D1C6ABD5F1A46DB4C");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP256r1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP256r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP256r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377"), // q
+ FromHex("7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9"), // a
+ FromHex("26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "048BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP256t1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP256t1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP256t1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ //FromHex("3E2D4BD9597B58639AE7AA669CAB9837CF5CF20A2C852D10F655668DFC150EF0") // Z
+ FromHex("A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377"), // q
+ FromHex("A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5374"), // a
+ FromHex("662C61C430D84EA4FE66A7733D0B76B7BF93EBC4AF2F49256AE58101FEE92B04"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04A3E8EB3CC1CFE7B7732213B23A656149AFA142C47AAFBC2B79A191562E1305F42D996C823439C56D7F7B22E14644417E69BCB6DE39D027001DABE8F35B25C9BE");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP320r1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP320r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP320r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("D35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E98691555B44C59311");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28FCD412B1F1B32E27"), // q
+ FromHex("3EE30B568FBAB0F883CCEBD46D3F3BB8A2A73513F5EB79DA66190EB085FFA9F492F375A97D860EB4"), // a
+ FromHex("520883949DFDBC42D3AD198640688A6FE13F41349554B49ACC31DCCD884539816F5EB4AC8FB1F1A6"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0443BD7E9AFB53D8B85289BCC48EE5BFE6F20137D10A087EB6E7871E2A10A599C710AF8D0D39E2061114FDD05545EC1CC8AB4093247F77275E0743FFED117182EAA9C77877AAAC6AC7D35245D1692E8EE1");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP320t1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP320t1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP320t1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("D35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E98691555B44C59311");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ //FromHex("15F75CAF668077F7E85B42EB01F0A81FF56ECD6191D55CB82B7D861458A18FEFC3E5AB7496F3C7B1") // Z
+ FromHex("D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28FCD412B1F1B32E27"), // q
+ FromHex("D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28FCD412B1F1B32E24"), // a
+ FromHex("A7F561E038EB1ED560B3D147DB782013064C19F27ED27C6780AAF77FB8A547CEB5B4FEF422340353"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04925BE9FB01AFC6FB4D3E7D4990010F813408AB106C4F09CB7EE07868CC136FFF3357F624A21BED5263BA3A7A27483EBF6671DBEF7ABB30EBEE084E58A0B077AD42A5A0989D1EE71B1B9BC0455FB0D2C3");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP384r1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP384r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP384r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53"), // q
+ FromHex("7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F8AA5814A503AD4EB04A8C7DD22CE2826"), // a
+ FromHex("04A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D57CB4390295DBC9943AB78696FA504C11"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "041D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP384t1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP384t1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP384t1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ //FromHex("41DFE8DD399331F7166A66076734A89CD0D2BCDB7D068E44E1F378F41ECBAE97D2D63DBC87BCCDDCCC5DA39E8589291C") // Z
+ FromHex("8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53"), // q
+ FromHex("8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC50"), // a
+ FromHex("7F519EADA7BDA81BD826DBA647910F8C4B9346ED8CCDC64E4B1ABD11756DCE1D2074AA263B88805CED70355A33B471EE"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0418DE98B02DB9A306F2AFCD7235F72A819B80AB12EBD653172476FECD462AABFFC4FF191B946A5F54D8D0AA2F418808CC25AB056962D30651A114AFD2755AD336747F93475B7A1FCA3B88F2B6A208CCFE469408584DC2B2912675BF5B9E582928");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP512r1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP512r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP512r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3"), // q
+ FromHex("7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA"), // a
+ FromHex("3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CADC083E67984050B75EBAE5DD2809BD638016F723"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0481AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F8227DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ internal class BrainpoolP512t1Holder
+ : X9ECParametersHolder
+ {
+ private BrainpoolP512t1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new BrainpoolP512t1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ //FromHex("12EE58E6764838B69782136F0F2D3BA06E27695716054092E60A80BEDB212B64E585D90BCE13761F85C3F1D2A64E3BE8FEA2220F01EBA5EEB0F35DBD29D922AB") // Z
+ FromHex("AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3"), // q
+ FromHex("AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F0"), // a
+ FromHex("7CBBBCF9441CFAB76E1890E46884EAE321F70C0BCB4981527897504BEC3E36A62BCDFA2304976540F6450085F2DAE145C22553B465763689180EA2571867423E"), // b
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "04640ECE5C12788717B9C1BA06CBC2A6FEBA85842458C56DDE9DB1758D39C0313D82BA51735CDB3EA499AA77A7D6943A64F7A3F25FE26F06B51BAA2696FA9035DA5B534BD595F5AF0FA2C892376C84ACE1BB4E3019B71634C01131159CAE03CEE9D9932184BEEF216BD71DF2DADF86A627306ECFF96DBB8BACE198B61E00F8B332");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor);
+ }
+ }
+
+ private static readonly Dictionary objIds =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly Dictionary curves =
+ new Dictionary();
+ private static readonly Dictionary names =
+ new Dictionary();
+
+ private static void DefineCurve(string name, DerObjectIdentifier oid, X9ECParametersHolder holder)
+ {
+ objIds.Add(name, oid);
+ names.Add(oid, name);
+ curves.Add(oid, holder);
+ }
+
+ static TeleTrusTNamedCurves()
+ {
+ DefineCurve("brainpoolP160r1", TeleTrusTObjectIdentifiers.BrainpoolP160R1, BrainpoolP160r1Holder.Instance);
+ DefineCurve("brainpoolP160t1", TeleTrusTObjectIdentifiers.BrainpoolP160T1, BrainpoolP160t1Holder.Instance);
+ DefineCurve("brainpoolP192r1", TeleTrusTObjectIdentifiers.BrainpoolP192R1, BrainpoolP192r1Holder.Instance);
+ DefineCurve("brainpoolP192t1", TeleTrusTObjectIdentifiers.BrainpoolP192T1, BrainpoolP192t1Holder.Instance);
+ DefineCurve("brainpoolP224r1", TeleTrusTObjectIdentifiers.BrainpoolP224R1, BrainpoolP224r1Holder.Instance);
+ DefineCurve("brainpoolP224t1", TeleTrusTObjectIdentifiers.BrainpoolP224T1, BrainpoolP224t1Holder.Instance);
+ DefineCurve("brainpoolP256r1", TeleTrusTObjectIdentifiers.BrainpoolP256R1, BrainpoolP256r1Holder.Instance);
+ DefineCurve("brainpoolP256t1", TeleTrusTObjectIdentifiers.BrainpoolP256T1, BrainpoolP256t1Holder.Instance);
+ DefineCurve("brainpoolP320r1", TeleTrusTObjectIdentifiers.BrainpoolP320R1, BrainpoolP320r1Holder.Instance);
+ DefineCurve("brainpoolP320t1", TeleTrusTObjectIdentifiers.BrainpoolP320T1, BrainpoolP320t1Holder.Instance);
+ DefineCurve("brainpoolP384r1", TeleTrusTObjectIdentifiers.BrainpoolP384R1, BrainpoolP384r1Holder.Instance);
+ DefineCurve("brainpoolP384t1", TeleTrusTObjectIdentifiers.BrainpoolP384T1, BrainpoolP384t1Holder.Instance);
+ DefineCurve("brainpoolP512r1", TeleTrusTObjectIdentifiers.BrainpoolP512R1, BrainpoolP512r1Holder.Instance);
+ DefineCurve("brainpoolP512t1", TeleTrusTObjectIdentifiers.BrainpoolP512T1, BrainpoolP512t1Holder.Instance);
+ }
+
+ /// Look up the for the curve with the given name.
+ /// The name of the curve.
+ public static X9ECParameters GetByName(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOid(oid);
+ }
+
+ /// Look up an for the curve with the given name.
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The name of the curve.
+ public static X9ECParametersHolder GetByNameLazy(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOidLazy(oid);
+ }
+
+ /// Look up the for the curve with the given
+ /// OID .
+ /// The OID for the curve.
+ public static X9ECParameters GetByOid(DerObjectIdentifier oid)
+ {
+ return GetByOidLazy(oid)?.Parameters;
+ }
+
+ /// Look up an for the curve with the given
+ /// OID .
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The OID for the curve.
+ public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(curves, oid);
+ }
+
+ /// Look up the name of the curve with the given OID .
+ /// The OID for the curve.
+ public static string GetName(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(names, oid);
+ }
+
+ /// Look up the OID of the curve with the given name.
+ /// The name of the curve.
+ public static DerObjectIdentifier GetOid(string name)
+ {
+ return CollectionUtilities.GetValueOrNull(objIds, name);
+ }
+
+ /// Enumerate the available curve names in this registry.
+ public static IEnumerable Names
+ {
+ get { return CollectionUtilities.Proxy(objIds.Keys); }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTNamedCurves.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTNamedCurves.cs.meta
new file mode 100644
index 00000000..0a1ebc4e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTNamedCurves.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bf980e6e7cc630b4cbd0c7eae74db8a6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTObjectIdentifiers.cs
new file mode 100644
index 00000000..f5e52820
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTObjectIdentifiers.cs
@@ -0,0 +1,49 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust
+{
+ public sealed class TeleTrusTObjectIdentifiers
+ {
+ private TeleTrusTObjectIdentifiers()
+ {
+ }
+
+ public static readonly DerObjectIdentifier TeleTrusTAlgorithm = new DerObjectIdentifier("1.3.36.3");
+
+ public static readonly DerObjectIdentifier RipeMD160 = new DerObjectIdentifier(TeleTrusTAlgorithm + ".2.1");
+ public static readonly DerObjectIdentifier RipeMD128 = new DerObjectIdentifier(TeleTrusTAlgorithm + ".2.2");
+ public static readonly DerObjectIdentifier RipeMD256 = new DerObjectIdentifier(TeleTrusTAlgorithm + ".2.3");
+
+ public static readonly DerObjectIdentifier TeleTrusTRsaSignatureAlgorithm = new DerObjectIdentifier(TeleTrusTAlgorithm + ".3.1");
+
+ public static readonly DerObjectIdentifier RsaSignatureWithRipeMD160 = new DerObjectIdentifier(TeleTrusTRsaSignatureAlgorithm + ".2");
+ public static readonly DerObjectIdentifier RsaSignatureWithRipeMD128 = new DerObjectIdentifier(TeleTrusTRsaSignatureAlgorithm + ".3");
+ public static readonly DerObjectIdentifier RsaSignatureWithRipeMD256 = new DerObjectIdentifier(TeleTrusTRsaSignatureAlgorithm + ".4");
+
+ public static readonly DerObjectIdentifier ECSign = new DerObjectIdentifier(TeleTrusTAlgorithm + ".3.2");
+
+ public static readonly DerObjectIdentifier ECSignWithSha1 = new DerObjectIdentifier(ECSign + ".1");
+ public static readonly DerObjectIdentifier ECSignWithRipeMD160 = new DerObjectIdentifier(ECSign + ".2");
+
+ public static readonly DerObjectIdentifier EccBrainpool = new DerObjectIdentifier(TeleTrusTAlgorithm + ".3.2.8");
+ public static readonly DerObjectIdentifier EllipticCurve = new DerObjectIdentifier(EccBrainpool + ".1");
+ public static readonly DerObjectIdentifier VersionOne = new DerObjectIdentifier(EllipticCurve + ".1");
+
+ public static readonly DerObjectIdentifier BrainpoolP160R1 = new DerObjectIdentifier(VersionOne + ".1");
+ public static readonly DerObjectIdentifier BrainpoolP160T1 = new DerObjectIdentifier(VersionOne + ".2");
+ public static readonly DerObjectIdentifier BrainpoolP192R1 = new DerObjectIdentifier(VersionOne + ".3");
+ public static readonly DerObjectIdentifier BrainpoolP192T1 = new DerObjectIdentifier(VersionOne + ".4");
+ public static readonly DerObjectIdentifier BrainpoolP224R1 = new DerObjectIdentifier(VersionOne + ".5");
+ public static readonly DerObjectIdentifier BrainpoolP224T1 = new DerObjectIdentifier(VersionOne + ".6");
+ public static readonly DerObjectIdentifier BrainpoolP256R1 = new DerObjectIdentifier(VersionOne + ".7");
+ public static readonly DerObjectIdentifier BrainpoolP256T1 = new DerObjectIdentifier(VersionOne + ".8");
+ public static readonly DerObjectIdentifier BrainpoolP320R1 = new DerObjectIdentifier(VersionOne + ".9");
+ public static readonly DerObjectIdentifier BrainpoolP320T1 = new DerObjectIdentifier(VersionOne + ".10");
+ public static readonly DerObjectIdentifier BrainpoolP384R1 = new DerObjectIdentifier(VersionOne + ".11");
+ public static readonly DerObjectIdentifier BrainpoolP384T1 = new DerObjectIdentifier(VersionOne + ".12");
+ public static readonly DerObjectIdentifier BrainpoolP512R1 = new DerObjectIdentifier(VersionOne + ".13");
+ public static readonly DerObjectIdentifier BrainpoolP512T1 = new DerObjectIdentifier(VersionOne + ".14");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..23471b48
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e8fe476de3c6ffa418ff42c80bb89a8f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp.meta
new file mode 100644
index 00000000..13be2e04
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4b32868c42fa04148896e21f252770f3
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/Accuracy.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/Accuracy.cs
new file mode 100644
index 00000000..d165eb57
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/Accuracy.cs
@@ -0,0 +1,124 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp
+{
+ public class Accuracy
+ : Asn1Encodable
+ {
+ private readonly DerInteger seconds;
+ private readonly DerInteger millis;
+ private readonly DerInteger micros;
+
+ // constants
+ protected const int MinMillis = 1;
+ protected const int MaxMillis = 999;
+ protected const int MinMicros = 1;
+ protected const int MaxMicros = 999;
+
+ public Accuracy(
+ DerInteger seconds,
+ DerInteger millis,
+ DerInteger micros)
+ {
+ if (null != millis)
+ {
+ int millisValue = millis.IntValueExact;
+ if (millisValue < MinMillis || millisValue > MaxMillis)
+ throw new ArgumentException("Invalid millis field : not in (1..999)");
+ }
+ if (null != micros)
+ {
+ int microsValue = micros.IntValueExact;
+ if (microsValue < MinMicros || microsValue > MaxMicros)
+ throw new ArgumentException("Invalid micros field : not in (1..999)");
+ }
+
+ this.seconds = seconds;
+ this.millis = millis;
+ this.micros = micros;
+ }
+
+ private Accuracy(
+ Asn1Sequence seq)
+ {
+ for (int i = 0; i < seq.Count; ++i)
+ {
+ // seconds
+ if (seq[i] is DerInteger)
+ {
+ seconds = (DerInteger) seq[i];
+ }
+ else if (seq[i] is Asn1TaggedObject)
+ {
+ Asn1TaggedObject extra = (Asn1TaggedObject)seq[i];
+
+ switch (extra.TagNo)
+ {
+ case 0:
+ millis = DerInteger.GetInstance(extra, false);
+ int millisValue = millis.IntValueExact;
+ if (millisValue < MinMillis || millisValue > MaxMillis)
+ throw new ArgumentException("Invalid millis field : not in (1..999)");
+ break;
+ case 1:
+ micros = DerInteger.GetInstance(extra, false);
+ int microsValue = micros.IntValueExact;
+ if (microsValue < MinMicros || microsValue > MaxMicros)
+ throw new ArgumentException("Invalid micros field : not in (1..999)");
+ break;
+ default:
+ throw new ArgumentException("Invalid tag number");
+ }
+ }
+ }
+ }
+
+ public static Accuracy GetInstance(object obj)
+ {
+ if (obj is Accuracy)
+ return (Accuracy)obj;
+ if (obj == null)
+ return null;
+ return new Accuracy(Asn1Sequence.GetInstance(obj));
+ }
+
+ public DerInteger Seconds
+ {
+ get { return seconds; }
+ }
+
+ public DerInteger Millis
+ {
+ get { return millis; }
+ }
+
+ public DerInteger Micros
+ {
+ get { return micros; }
+ }
+
+ /**
+ *
+ * Accuracy ::= SEQUENCE {
+ * seconds INTEGER OPTIONAL,
+ * millis [0] INTEGER (1..999) OPTIONAL,
+ * micros [1] INTEGER (1..999) OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(seconds);
+ v.AddOptionalTagged(false, 0, millis);
+ v.AddOptionalTagged(false, 1, micros);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/Accuracy.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/Accuracy.cs.meta
new file mode 100644
index 00000000..d177f095
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/Accuracy.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 339f04e74f343d046bf59842f2d0d8dc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/MessageImprint.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/MessageImprint.cs
new file mode 100644
index 00000000..befb93c5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/MessageImprint.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp
+{
+ public class MessageImprint
+ : Asn1Encodable
+ {
+ private readonly AlgorithmIdentifier hashAlgorithm;
+ private readonly byte[] hashedMessage;
+
+ public static MessageImprint GetInstance(object obj)
+ {
+ if (obj is MessageImprint)
+ return (MessageImprint)obj;
+ if (obj == null)
+ return null;
+ return new MessageImprint(Asn1Sequence.GetInstance(obj));
+ }
+
+ private MessageImprint(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ this.hashAlgorithm = AlgorithmIdentifier.GetInstance(seq[0]);
+ this.hashedMessage = Asn1OctetString.GetInstance(seq[1]).GetOctets();
+ }
+
+ public MessageImprint(
+ AlgorithmIdentifier hashAlgorithm,
+ byte[] hashedMessage)
+ {
+ this.hashAlgorithm = hashAlgorithm;
+ this.hashedMessage = hashedMessage;
+ }
+
+ public AlgorithmIdentifier HashAlgorithm
+ {
+ get { return hashAlgorithm; }
+ }
+
+ public byte[] GetHashedMessage()
+ {
+ return hashedMessage;
+ }
+
+ /**
+ *
+ * MessageImprint ::= SEQUENCE {
+ * hashAlgorithm AlgorithmIdentifier,
+ * hashedMessage OCTET STRING }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(hashAlgorithm, new DerOctetString(hashedMessage));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/MessageImprint.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/MessageImprint.cs.meta
new file mode 100644
index 00000000..4b2a2833
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/MessageImprint.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 719e3daffbac95e4e8246f1394328bcb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TSTInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TSTInfo.cs
new file mode 100644
index 00000000..083f3589
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TSTInfo.cs
@@ -0,0 +1,211 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp
+{
+ public class TstInfo
+ : Asn1Encodable
+ {
+ private readonly DerInteger version;
+ private readonly DerObjectIdentifier tsaPolicyId;
+ private readonly MessageImprint messageImprint;
+ private readonly DerInteger serialNumber;
+ private readonly Asn1GeneralizedTime genTime;
+ private readonly Accuracy accuracy;
+ private readonly DerBoolean ordering;
+ private readonly DerInteger nonce;
+ private readonly GeneralName tsa;
+ private readonly X509Extensions extensions;
+
+ public static TstInfo GetInstance(object obj)
+ {
+ if (obj is TstInfo)
+ return (TstInfo)obj;
+ if (obj == null)
+ return null;
+ return new TstInfo(Asn1Sequence.GetInstance(obj));
+ }
+
+ private TstInfo(Asn1Sequence seq)
+ {
+ var e = seq.GetEnumerator();
+
+ // version
+ e.MoveNext();
+ version = DerInteger.GetInstance(e.Current);
+
+ // tsaPolicy
+ e.MoveNext();
+ tsaPolicyId = DerObjectIdentifier.GetInstance(e.Current);
+
+ // messageImprint
+ e.MoveNext();
+ messageImprint = MessageImprint.GetInstance(e.Current);
+
+ // serialNumber
+ e.MoveNext();
+ serialNumber = DerInteger.GetInstance(e.Current);
+
+ // genTime
+ e.MoveNext();
+ genTime = Asn1GeneralizedTime.GetInstance(e.Current);
+
+ // default for ordering
+ ordering = DerBoolean.False;
+
+ while (e.MoveNext())
+ {
+ Asn1Object o = (Asn1Object) e.Current;
+
+ if (o is Asn1TaggedObject)
+ {
+ DerTaggedObject tagged = (DerTaggedObject) o;
+
+ switch (tagged.TagNo)
+ {
+ case 0:
+ tsa = GeneralName.GetInstance(tagged, true);
+ break;
+ case 1:
+ extensions = X509Extensions.GetInstance(tagged, false);
+ break;
+ default:
+ throw new ArgumentException("Unknown tag value " + tagged.TagNo);
+ }
+ }
+
+ if (o is DerSequence)
+ {
+ accuracy = Accuracy.GetInstance(o);
+ }
+
+ if (o is DerBoolean)
+ {
+ ordering = DerBoolean.GetInstance(o);
+ }
+
+ if (o is DerInteger)
+ {
+ nonce = DerInteger.GetInstance(o);
+ }
+ }
+ }
+
+ public TstInfo(
+ DerObjectIdentifier tsaPolicyId,
+ MessageImprint messageImprint,
+ DerInteger serialNumber,
+ Asn1GeneralizedTime genTime,
+ Accuracy accuracy,
+ DerBoolean ordering,
+ DerInteger nonce,
+ GeneralName tsa,
+ X509Extensions extensions)
+ {
+ this.version = new DerInteger(1);
+ this.tsaPolicyId = tsaPolicyId;
+ this.messageImprint = messageImprint;
+ this.serialNumber = serialNumber;
+ this.genTime = genTime;
+ this.accuracy = accuracy;
+ this.ordering = ordering;
+ this.nonce = nonce;
+ this.tsa = tsa;
+ this.extensions = extensions;
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public MessageImprint MessageImprint
+ {
+ get { return messageImprint; }
+ }
+
+ public DerObjectIdentifier Policy
+ {
+ get { return tsaPolicyId; }
+ }
+
+ public DerInteger SerialNumber
+ {
+ get { return serialNumber; }
+ }
+
+ public Accuracy Accuracy
+ {
+ get { return accuracy; }
+ }
+
+ public Asn1GeneralizedTime GenTime
+ {
+ get { return genTime; }
+ }
+
+ public DerBoolean Ordering
+ {
+ get { return ordering; }
+ }
+
+ public DerInteger Nonce
+ {
+ get { return nonce; }
+ }
+
+ public GeneralName Tsa
+ {
+ get { return tsa; }
+ }
+
+ public X509Extensions Extensions
+ {
+ get { return extensions; }
+ }
+
+ /**
+ *
+ *
+ * TstInfo ::= SEQUENCE {
+ * version INTEGER { v1(1) },
+ * policy TSAPolicyId,
+ * messageImprint MessageImprint,
+ * -- MUST have the same value as the similar field in
+ * -- TimeStampReq
+ * serialNumber INTEGER,
+ * -- Time-Stamping users MUST be ready to accommodate integers
+ * -- up to 160 bits.
+ * genTime GeneralizedTime,
+ * accuracy Accuracy OPTIONAL,
+ * ordering BOOLEAN DEFAULT FALSE,
+ * nonce INTEGER OPTIONAL,
+ * -- MUST be present if the similar field was present
+ * -- in TimeStampReq. In that case it MUST have the same value.
+ * tsa [0] GeneralName OPTIONAL,
+ * extensions [1] IMPLICIT Extensions OPTIONAL }
+ *
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version, tsaPolicyId, messageImprint, serialNumber, genTime);
+ v.AddOptional(accuracy);
+
+ if (ordering != null && ordering.IsTrue)
+ {
+ v.Add(ordering);
+ }
+
+ v.AddOptional(nonce);
+ v.AddOptionalTagged(true, 0, tsa);
+ v.AddOptionalTagged(false, 1, extensions);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TSTInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TSTInfo.cs.meta
new file mode 100644
index 00000000..24520296
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TSTInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c26676e066f194640955a4f6305afe44
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampReq.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampReq.cs
new file mode 100644
index 00000000..4d93fd26
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampReq.cs
@@ -0,0 +1,147 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp
+{
+ public class TimeStampReq
+ : Asn1Encodable
+ {
+ private readonly DerInteger version;
+ private readonly MessageImprint messageImprint;
+ private readonly DerObjectIdentifier tsaPolicy;
+ private readonly DerInteger nonce;
+ private readonly DerBoolean certReq;
+ private readonly X509Extensions extensions;
+
+ public static TimeStampReq GetInstance(object obj)
+ {
+ if (obj is TimeStampReq)
+ return (TimeStampReq)obj;
+ if (obj == null)
+ return null;
+ return new TimeStampReq(Asn1Sequence.GetInstance(obj));
+ }
+
+ private TimeStampReq(
+ Asn1Sequence seq)
+ {
+ int nbObjects = seq.Count;
+ int seqStart = 0;
+
+ // version
+ version = DerInteger.GetInstance(seq[seqStart++]);
+
+ // messageImprint
+ messageImprint = MessageImprint.GetInstance(seq[seqStart++]);
+
+ for (int opt = seqStart; opt < nbObjects; opt++)
+ {
+ // tsaPolicy
+ if (seq[opt] is DerObjectIdentifier)
+ {
+ tsaPolicy = DerObjectIdentifier.GetInstance(seq[opt]);
+ }
+ // nonce
+ else if (seq[opt] is DerInteger)
+ {
+ nonce = DerInteger.GetInstance(seq[opt]);
+ }
+ // certReq
+ else if (seq[opt] is DerBoolean)
+ {
+ certReq = DerBoolean.GetInstance(seq[opt]);
+ }
+ // extensions
+ else if (seq[opt] is Asn1TaggedObject)
+ {
+ Asn1TaggedObject tagged = (Asn1TaggedObject) seq[opt];
+ if (tagged.TagNo == 0)
+ {
+ extensions = X509Extensions.GetInstance(tagged, false);
+ }
+ }
+ }
+ }
+
+ public TimeStampReq(
+ MessageImprint messageImprint,
+ DerObjectIdentifier tsaPolicy,
+ DerInteger nonce,
+ DerBoolean certReq,
+ X509Extensions extensions)
+ {
+ // default
+ this.version = new DerInteger(1);
+
+ this.messageImprint = messageImprint;
+ this.tsaPolicy = tsaPolicy;
+ this.nonce = nonce;
+ this.certReq = certReq;
+ this.extensions = extensions;
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public MessageImprint MessageImprint
+ {
+ get { return messageImprint; }
+ }
+
+ public DerObjectIdentifier ReqPolicy
+ {
+ get { return tsaPolicy; }
+ }
+
+ public DerInteger Nonce
+ {
+ get { return nonce; }
+ }
+
+ public DerBoolean CertReq
+ {
+ get { return certReq; }
+ }
+
+ public X509Extensions Extensions
+ {
+ get { return extensions; }
+ }
+
+ /**
+ *
+ * TimeStampReq ::= SEQUENCE {
+ * version INTEGER { v1(1) },
+ * messageImprint MessageImprint,
+ * --a hash algorithm OID and the hash value of the data to be
+ * --time-stamped
+ * reqPolicy TSAPolicyId OPTIONAL,
+ * nonce INTEGER OPTIONAL,
+ * certReq BOOLEAN DEFAULT FALSE,
+ * extensions [0] IMPLICIT Extensions OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(version, messageImprint);
+ v.AddOptional(tsaPolicy, nonce);
+
+ if (certReq != null && certReq.IsTrue)
+ {
+ v.Add(certReq);
+ }
+
+ v.AddOptionalTagged(false, 0, extensions);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampReq.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampReq.cs.meta
new file mode 100644
index 00000000..f910c198
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampReq.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b405c6ff9d4440344986dd831d6ee912
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampResp.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampResp.cs
new file mode 100644
index 00000000..e59c6b7a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampResp.cs
@@ -0,0 +1,71 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Tsp
+{
+ public class TimeStampResp
+ : Asn1Encodable
+ {
+ private readonly PkiStatusInfo pkiStatusInfo;
+ private readonly ContentInfo timeStampToken;
+
+ public static TimeStampResp GetInstance(object obj)
+ {
+ if (obj is TimeStampResp)
+ return (TimeStampResp)obj;
+ if (obj == null)
+ return null;
+ return new TimeStampResp(Asn1Sequence.GetInstance(obj));
+ }
+
+ private TimeStampResp(
+ Asn1Sequence seq)
+ {
+ this.pkiStatusInfo = PkiStatusInfo.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ this.timeStampToken = ContentInfo.GetInstance(seq[1]);
+ }
+ }
+
+ public TimeStampResp(
+ PkiStatusInfo pkiStatusInfo,
+ ContentInfo timeStampToken)
+ {
+ this.pkiStatusInfo = pkiStatusInfo;
+ this.timeStampToken = timeStampToken;
+ }
+
+ public PkiStatusInfo Status
+ {
+ get { return pkiStatusInfo; }
+ }
+
+ public ContentInfo TimeStampToken
+ {
+ get { return timeStampToken; }
+ }
+
+ /**
+ *
+ * TimeStampResp ::= SEQUENCE {
+ * status PkiStatusInfo,
+ * timeStampToken TimeStampToken OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(pkiStatusInfo);
+ v.AddOptional(timeStampToken);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampResp.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampResp.cs.meta
new file mode 100644
index 00000000..a11e8a8a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/tsp/TimeStampResp.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 628c4af6da9dda340a36d4b4df1c13f5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua.meta
new file mode 100644
index 00000000..22961c46
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9bac964e8dfc2984b94b952f666de8ea
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua/UAObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua/UAObjectIdentifiers.cs
new file mode 100644
index 00000000..d621ff27
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua/UAObjectIdentifiers.cs
@@ -0,0 +1,111 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.UA
+{
+ /**
+ * Ukrainian object identifiers
+ *
+ * {iso(1) member-body(2) Ukraine(804) root(2) security(1) cryptography(1) pki(1)}
+ *
+ * { ... pki-alg(1) pki-alg-sym(3) Dstu4145WithGost34311(1) PB(1)}
+ *
+ * DSTU4145 in polynomial basis has 2 oids, one for little-endian representation and one for big-endian
+ */
+ public abstract class UAObjectIdentifiers
+ {
+ /** Base OID: 1.2.804.2.1.1.1 */
+ public static readonly DerObjectIdentifier UaOid = new DerObjectIdentifier("1.2.804.2.1.1.1");
+
+ /** DSTU4145 Little Endian presentation. OID: 1.2.804.2.1.1.1.1.3.1.1 */
+ public static readonly DerObjectIdentifier dstu4145le = UaOid.Branch("1.3.1.1");
+ /** DSTU4145 Big Endian presentation. OID: 1.2.804.2.1.1.1.1.3.1.1.1 */
+ public static readonly DerObjectIdentifier dstu4145be = UaOid.Branch("1.3.1.1.1.1");
+
+ /** DSTU7564 256-bit digest presentation. */
+ public static readonly DerObjectIdentifier dstu7564digest_256 = UaOid.Branch("1.2.2.1");
+ /** DSTU7564 384-bit digest presentation. */
+ public static readonly DerObjectIdentifier dstu7564digest_384 = UaOid.Branch("1.2.2.2");
+ /** DSTU7564 512-bit digest presentation. */
+ public static readonly DerObjectIdentifier dstu7564digest_512 = UaOid.Branch("1.2.2.3");
+
+ /** DSTU7564 256-bit mac presentation. */
+ public static readonly DerObjectIdentifier dstu7564mac_256 = UaOid.Branch("1.2.2.4");
+ /** DSTU7564 384-bit mac presentation. */
+ public static readonly DerObjectIdentifier dstu7564mac_384 = UaOid.Branch("1.2.2.5");
+ /** DSTU7564 512-bit mac presentation. */
+ public static readonly DerObjectIdentifier dstu7564mac_512 = UaOid.Branch("1.2.2.6");
+
+
+ /** DSTU7624 in ECB mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ecb_128 = UaOid.Branch("1.1.3.1.1");
+ /** DSTU7624 in ECB mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ecb_256 = UaOid.Branch("1.1.3.1.2");
+ /** DSTU7624 in ECB mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ecb_512 = UaOid.Branch("1.1.3.1.3");
+
+ /** DSTU7624 in CTR mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ctr_128 = UaOid.Branch("1.1.3.2.1");
+ /** DSTU7624 in CTR mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ctr_256 = UaOid.Branch("1.1.3.2.2");
+ /** DSTU7624 in CTR mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ctr_512 = UaOid.Branch("1.1.3.2.3");
+
+ /** DSTU7624 in CFB mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624cfb_128 = UaOid.Branch("1.1.3.3.1");
+ /** DSTU7624 in CFB mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624cfb_256 = UaOid.Branch("1.1.3.3.2");
+ /** DSTU7624 in CFB mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624cfb_512 = UaOid.Branch("1.1.3.3.3");
+
+ /** DSTU7624 in MAC mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624cmac_128 = UaOid.Branch("1.1.3.4.1");
+ /** DSTU7624 in MAC mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624cmac_256 = UaOid.Branch("1.1.3.4.2");
+ /** DSTU7624 in MAC mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624cmac_512 = UaOid.Branch("1.1.3.4.3");
+
+ /** DSTU7624 in CBC mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624cbc_128 = UaOid.Branch("1.1.3.5.1");
+ /** DSTU7624 in CBC mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624cbc_256 = UaOid.Branch("1.1.3.5.2");
+ /** DSTU7624 in CBC mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624cbc_512 = UaOid.Branch("1.1.3.5.3");
+
+ /** DSTU7624 in OFB mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ofb_128 = UaOid.Branch("1.1.3.6.1");
+ /** DSTU7624 in OFB mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ofb_256 = UaOid.Branch("1.1.3.6.2");
+ /** DSTU7624 in OFB mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ofb_512 = UaOid.Branch("1.1.3.6.3");
+
+ /** DSTU7624 in GMAC (GCM witout encryption) mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624gmac_128 = UaOid.Branch("1.1.3.7.1");
+ /** DSTU7624 in GMAC (GCM witout encryption) mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624gmac_256 = UaOid.Branch("1.1.3.7.2");
+ /** DSTU7624 in GMAC (GCM witout encryption) mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624gmac_512 = UaOid.Branch("1.1.3.7.3");
+
+ /** DSTU7624 in CCM mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ccm_128 = UaOid.Branch("1.1.3.8.1");
+ /** DSTU7624 in CCM mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ccm_256 = UaOid.Branch("1.1.3.8.2");
+ /** DSTU7624 in CCM mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624ccm_512 = UaOid.Branch("1.1.3.8.3");
+
+ /** DSTU7624 in XTS mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624xts_128 = UaOid.Branch("1.1.3.9.1");
+ /** DSTU7624 in XTS mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624xts_256 = UaOid.Branch("1.1.3.9.2");
+ /** DSTU7624 in XTS mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624xts_512 = UaOid.Branch("1.1.3.9.3");
+
+ /** DSTU7624 in key wrap (KW) mode with 128 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624kw_128 = UaOid.Branch("1.1.3.10.1");
+ /** DSTU7624 in key wrap (KW) mode with 256 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624kw_256 = UaOid.Branch("1.1.3.10.2");
+ /** DSTU7624 in key wrap (KW) mode with 512 bit block/key presentation */
+ public static readonly DerObjectIdentifier dstu7624kw_512 = UaOid.Branch("1.1.3.10.3");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua/UAObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua/UAObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..d39bb3b8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/ua/UAObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f0c5835c2e1e3934cb56b17859df57f1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util.meta
new file mode 100644
index 00000000..808540dc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c62b87920929c1a43b2928c37f4ce036
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/Asn1Dump.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/Asn1Dump.cs
new file mode 100644
index 00000000..292fe7bb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/Asn1Dump.cs
@@ -0,0 +1,332 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Utilities
+{
+ public static class Asn1Dump
+ {
+ private const string Tab = " ";
+ private const int SampleSize = 32;
+
+ /**
+ * dump a Der object as a formatted string with indentation
+ *
+ * @param obj the Asn1Object to be dumped out.
+ */
+ private static void AsString(string indent, bool verbose, Asn1Object obj, StringBuilder buf)
+ {
+ if (obj is Asn1Null)
+ {
+ buf.Append(indent);
+ buf.AppendLine("NULL");
+ }
+ else if (obj is Asn1Sequence asn1Sequence)
+ {
+ buf.Append(indent);
+
+ if (asn1Sequence is BerSequence)
+ {
+ buf.AppendLine("BER Sequence");
+ }
+ else if (!(asn1Sequence is DLSequence))
+ {
+ buf.AppendLine("DER Sequence");
+ }
+ else
+ {
+ buf.AppendLine("Sequence");
+ }
+
+ string elementsIndent = indent + Tab;
+
+ for (int i = 0, count = asn1Sequence.Count; i < count; ++i)
+ {
+ AsString(elementsIndent, verbose, asn1Sequence[i].ToAsn1Object(), buf);
+ }
+ }
+ else if (obj is Asn1Set asn1Set)
+ {
+ buf.Append(indent);
+
+ if (asn1Set is BerSet)
+ {
+ buf.AppendLine("BER Set");
+ }
+ else if (!(asn1Set is DLSet))
+ {
+ buf.AppendLine("DER Set");
+ }
+ else
+ {
+ buf.AppendLine("Set");
+ }
+
+ string elementsIndent = indent + Tab;
+
+ for (int i = 0, count = asn1Set.Count; i < count; ++i)
+ {
+ AsString(elementsIndent, verbose, asn1Set[i].ToAsn1Object(), buf);
+ }
+ }
+ else if (obj is Asn1TaggedObject taggedObject)
+ {
+ buf.Append(indent);
+
+ if (taggedObject is BerTaggedObject)
+ {
+ buf.Append("BER Tagged ");
+ }
+ else if (!(taggedObject is DLTaggedObject))
+ {
+ buf.Append("DER Tagged ");
+ }
+ else
+ {
+ buf.Append("Tagged ");
+ }
+
+ buf.Append(Asn1Utilities.GetTagText(taggedObject));
+
+ if (!taggedObject.IsExplicit())
+ {
+ buf.Append(" IMPLICIT ");
+ }
+
+ buf.AppendLine();
+
+ string baseIndent = indent + Tab;
+
+ AsString(baseIndent, verbose, taggedObject.GetBaseObject().ToAsn1Object(), buf);
+ }
+ else if (obj is DerObjectIdentifier oid)
+ {
+ buf.Append(indent);
+ buf.AppendLine("ObjectIdentifier(" + oid.Id + ")");
+ }
+ else if (obj is Asn1RelativeOid relativeOid)
+ {
+ buf.Append(indent);
+ buf.AppendLine("RelativeOID(" + relativeOid.Id + ")");
+ }
+ else if (obj is DerBoolean derBoolean)
+ {
+ buf.Append(indent);
+ buf.AppendLine("Boolean(" + derBoolean.IsTrue + ")");
+ }
+ else if (obj is DerInteger derInteger)
+ {
+ buf.Append(indent);
+ buf.AppendLine("Integer(" + derInteger.Value + ")");
+ }
+ else if (obj is Asn1OctetString oct)
+ {
+ byte[] octets = oct.GetOctets();
+
+ buf.Append(indent);
+
+ if (obj is BerOctetString)
+ {
+ buf.AppendLine("BER Octet String[" + octets.Length + "]");
+ }
+ else
+ {
+ buf.AppendLine("DER Octet String[" + octets.Length + "]");
+ }
+
+ if (verbose)
+ {
+ DumpBinaryDataAsString(buf, indent, octets);
+ }
+ }
+ else if (obj is DerBitString bitString)
+ {
+ byte[] bytes = bitString.GetBytes();
+ int padBits = bitString.PadBits;
+
+ buf.Append(indent);
+
+ if (bitString is BerBitString)
+ {
+ buf.AppendLine("BER Bit String[" + bytes.Length + ", " + padBits + "]");
+ }
+ else if (bitString is DLBitString)
+ {
+ buf.AppendLine("DL Bit String[" + bytes.Length + ", " + padBits + "]");
+ }
+ else
+ {
+ buf.AppendLine("DER Bit String[" + bytes.Length + ", " + padBits + "]");
+ }
+
+ if (verbose)
+ {
+ DumpBinaryDataAsString(buf, indent, bytes);
+ }
+ }
+ else if (obj is DerIA5String ia5String)
+ {
+ buf.Append(indent);
+ buf.AppendLine("IA5String(" + ia5String.GetString() + ")");
+ }
+ else if (obj is DerUtf8String utf8String)
+ {
+ buf.Append(indent);
+ buf.AppendLine("UTF8String(" + utf8String.GetString() + ")");
+ }
+ else if (obj is DerPrintableString printableString)
+ {
+ buf.Append(indent);
+ buf.AppendLine("PrintableString(" + printableString.GetString() + ")");
+ }
+ else if (obj is DerVisibleString visibleString)
+ {
+ buf.Append(indent);
+ buf.AppendLine("VisibleString(" + visibleString.GetString() + ")");
+ }
+ else if (obj is DerBmpString bmpString)
+ {
+ buf.Append(indent);
+ buf.AppendLine("BMPString(" + bmpString.GetString() + ")");
+ }
+ else if (obj is DerT61String t61String)
+ {
+ buf.Append(indent);
+ buf.AppendLine("T61String(" + t61String.GetString() + ")");
+ }
+ else if (obj is DerGraphicString graphicString)
+ {
+ buf.Append(indent);
+ buf.AppendLine("GraphicString(" + graphicString.GetString() + ")");
+ }
+ else if (obj is DerVideotexString videotexString)
+ {
+ buf.Append(indent);
+ buf.AppendLine("VideotexString(" + videotexString.GetString() + ")");
+ }
+ else if (obj is Asn1UtcTime utcTime)
+ {
+ buf.Append(indent);
+ buf.AppendLine("UTCTime(" + utcTime.TimeString + ")");
+ }
+ else if (obj is Asn1GeneralizedTime generalizedTime)
+ {
+ buf.Append(indent);
+ buf.AppendLine("GeneralizedTime(" + generalizedTime.TimeString + ")");
+ }
+ else if (obj is DerEnumerated en)
+ {
+ buf.Append(indent);
+ buf.AppendLine("DER Enumerated(" + en.Value + ")");
+ }
+ else if (obj is DerExternal ext)
+ {
+ buf.Append(indent);
+ buf.AppendLine("External ");
+ string tab = indent + Tab;
+
+ if (ext.DirectReference != null)
+ {
+ buf.Append(tab);
+ buf.AppendLine("Direct Reference: " + ext.DirectReference.Id);
+ }
+ if (ext.IndirectReference != null)
+ {
+ buf.Append(tab);
+ buf.AppendLine("Indirect Reference: " + ext.IndirectReference.ToString());
+ }
+ if (ext.DataValueDescriptor != null)
+ {
+ AsString(tab, verbose, ext.DataValueDescriptor, buf);
+ }
+ buf.Append(tab);
+ buf.AppendLine("Encoding: " + ext.Encoding);
+ AsString(tab, verbose, ext.ExternalContent, buf);
+ }
+ else
+ {
+ buf.Append(indent);
+ buf.Append(obj);
+ buf.AppendLine();
+ }
+ }
+
+ /// Parse ASN.1 objects from input , and write them to the output.
+ public static void Dump(Stream input, TextWriter output)
+ {
+ Asn1InputStream asn1InputStream = new Asn1InputStream(input);
+ Asn1Object asn1Object;
+ while ((asn1Object = asn1InputStream.ReadObject()) != null)
+ {
+ output.Write(DumpAsString(asn1Object));
+ }
+ }
+
+ /**
+ * dump out a DER object as a formatted string, in non-verbose mode
+ *
+ * @param obj the Asn1Encodable to be dumped out.
+ * @return the resulting string.
+ */
+ public static string DumpAsString(Asn1Encodable obj)
+ {
+ return DumpAsString(obj, false);
+ }
+
+ /**
+ * Dump out the object as a string
+ *
+ * @param obj the Asn1Encodable to be dumped out.
+ * @param verbose if true, dump out the contents of octet and bit strings.
+ * @return the resulting string.
+ */
+ public static string DumpAsString(Asn1Encodable obj, bool verbose)
+ {
+ StringBuilder buf = new StringBuilder();
+ AsString("", verbose, obj.ToAsn1Object(), buf);
+ return buf.ToString();
+ }
+
+ private static void DumpBinaryDataAsString(StringBuilder buf, string indent, byte[] bytes)
+ {
+ if (bytes.Length < 1)
+ return;
+
+ indent += Tab;
+
+ for (int i = 0; i < bytes.Length; i += SampleSize)
+ {
+ int remaining = bytes.Length - i;
+ int chunk = System.Math.Min(remaining, SampleSize);
+
+ buf.Append(indent);
+ buf.Append(Hex.ToHexString(bytes, i, chunk));
+ for (int j = chunk; j < SampleSize; ++j)
+ {
+ buf.Append(" ");
+ }
+ buf.Append(Tab);
+ AppendAscString(buf, bytes, i, chunk);
+ buf.AppendLine();
+ }
+ }
+
+ private static void AppendAscString(StringBuilder buf, byte[] bytes, int off, int len)
+ {
+ for (int i = off; i != off + len; i++)
+ {
+ char c = (char)bytes[i];
+ if (c >= ' ' && c <= '~')
+ {
+ buf.Append(c);
+ }
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/Asn1Dump.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/Asn1Dump.cs.meta
new file mode 100644
index 00000000..9d2c3524
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/Asn1Dump.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b6295c1d96b6f4e429c48163b62660e1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/FilterStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/FilterStream.cs
new file mode 100644
index 00000000..0454b349
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/FilterStream.cs
@@ -0,0 +1,3 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/FilterStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/FilterStream.cs.meta
new file mode 100644
index 00000000..c4700e96
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/util/FilterStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9e6c11a66c2cb2f4db32dc7bd287591c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500.meta
new file mode 100644
index 00000000..d09071c1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: baced376d4dd5b74cbbb6a71f406bb34
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/AttributeTypeAndValue.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/AttributeTypeAndValue.cs
new file mode 100644
index 00000000..d2f3515c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/AttributeTypeAndValue.cs
@@ -0,0 +1,64 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500
+{
+ /**
+ * Holding class for the AttributeTypeAndValue structures that make up an RDN.
+ */
+ public class AttributeTypeAndValue
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier type;
+ private readonly Asn1Encodable value;
+
+ private AttributeTypeAndValue(Asn1Sequence seq)
+ {
+ type = (DerObjectIdentifier)seq[0];
+ value = seq[1];
+ }
+
+ public static AttributeTypeAndValue GetInstance(object obj)
+ {
+ if (obj is AttributeTypeAndValue)
+ return (AttributeTypeAndValue)obj;
+ if (null != obj)
+ return new AttributeTypeAndValue(Asn1Sequence.GetInstance(obj));
+ throw new ArgumentNullException("obj");
+ }
+
+ public AttributeTypeAndValue(
+ DerObjectIdentifier type,
+ Asn1Encodable value)
+ {
+ this.type = type;
+ this.value = value;
+ }
+
+ public virtual DerObjectIdentifier Type
+ {
+ get { return type; }
+ }
+
+ public virtual Asn1Encodable Value
+ {
+ get { return value; }
+ }
+
+ /**
+ *
+ * AttributeTypeAndValue ::= SEQUENCE {
+ * type OBJECT IDENTIFIER,
+ * value ANY DEFINED BY type }
+ *
+ * @return a basic ASN.1 object representation.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(type, value);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/AttributeTypeAndValue.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/AttributeTypeAndValue.cs.meta
new file mode 100644
index 00000000..481807f2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/AttributeTypeAndValue.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ec72e2419cbf80c4a8b3b767174970e7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/DirectoryString.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/DirectoryString.cs
new file mode 100644
index 00000000..18504385
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/DirectoryString.cs
@@ -0,0 +1,78 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500
+{
+ public class DirectoryString
+ : Asn1Encodable, IAsn1Choice, IAsn1String
+ {
+ private readonly DerStringBase str;
+
+ public static DirectoryString GetInstance(object obj)
+ {
+ if (obj == null || obj is DirectoryString)
+ return (DirectoryString) obj;
+
+ if (obj is DerStringBase)
+ {
+ if (obj is DerT61String
+ || obj is DerPrintableString
+ || obj is DerUniversalString
+ || obj is DerUtf8String
+ || obj is DerBmpString)
+ {
+ return new DirectoryString((DerStringBase) obj);
+ }
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static DirectoryString GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ if (!isExplicit)
+ throw new ArgumentException("choice item must be explicitly tagged");
+
+ return GetInstance(obj.GetObject());
+ }
+
+ private DirectoryString(
+ DerStringBase str)
+ {
+ this.str = str;
+ }
+
+ public DirectoryString(
+ string str)
+ {
+ this.str = new DerUtf8String(str);
+ }
+
+ public string GetString()
+ {
+ return str.GetString();
+ }
+
+ /**
+ *
+ * DirectoryString ::= CHOICE {
+ * teletexString TeletexString (SIZE (1..MAX)),
+ * printableString PrintableString (SIZE (1..MAX)),
+ * universalString UniversalString (SIZE (1..MAX)),
+ * utf8String UTF8String (SIZE (1..MAX)),
+ * bmpString BMPString (SIZE (1..MAX)) }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return str.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/DirectoryString.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/DirectoryString.cs.meta
new file mode 100644
index 00000000..cb66af93
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/DirectoryString.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 712a6b0b73b040d45af691d2b5994481
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/Rdn.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/Rdn.cs
new file mode 100644
index 00000000..b09b41e3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/Rdn.cs
@@ -0,0 +1,108 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500
+{
+ /**
+ * Holding class for a single Relative Distinguished Name (RDN).
+ */
+ public class Rdn
+ : Asn1Encodable
+ {
+ private readonly Asn1Set values;
+
+ private Rdn(Asn1Set values)
+ {
+ this.values = values;
+ }
+
+ public static Rdn GetInstance(object obj)
+ {
+ if (obj is Rdn)
+ return (Rdn)obj;
+ if (null != obj)
+ return new Rdn(Asn1Set.GetInstance(obj));
+ return null;
+ }
+
+ /**
+ * Create a single valued RDN.
+ *
+ * @param oid RDN type.
+ * @param value RDN value.
+ */
+ public Rdn(DerObjectIdentifier oid, Asn1Encodable value)
+ {
+ this.values = new DerSet(new DerSequence(oid, value));
+ }
+
+ public Rdn(AttributeTypeAndValue attrTAndV)
+ {
+ this.values = new DerSet(attrTAndV);
+ }
+
+ /**
+ * Create a multi-valued RDN.
+ *
+ * @param aAndVs attribute type/value pairs making up the RDN
+ */
+ public Rdn(AttributeTypeAndValue[] aAndVs)
+ {
+ this.values = new DerSet(aAndVs);
+ }
+
+ public virtual bool IsMultiValued
+ {
+ get { return this.values.Count > 1; }
+ }
+
+ /**
+ * Return the number of AttributeTypeAndValue objects in this RDN,
+ *
+ * @return size of RDN, greater than 1 if multi-valued.
+ */
+ public virtual int Count
+ {
+ get { return this.values.Count; }
+ }
+
+ public virtual AttributeTypeAndValue GetFirst()
+ {
+ if (this.values.Count == 0)
+ return null;
+
+ return AttributeTypeAndValue.GetInstance(this.values[0]);
+ }
+
+ public virtual AttributeTypeAndValue[] GetTypesAndValues()
+ {
+ AttributeTypeAndValue[] tmp = new AttributeTypeAndValue[values.Count];
+
+ for (int i = 0; i < tmp.Length; ++i)
+ {
+ tmp[i] = AttributeTypeAndValue.GetInstance(values[i]);
+ }
+
+ return tmp;
+ }
+
+ /**
+ *
+ * RelativeDistinguishedName ::=
+ * SET OF AttributeTypeAndValue
+
+ * AttributeTypeAndValue ::= SEQUENCE {
+ * type AttributeType,
+ * value AttributeValue }
+ *
+ * @return this object as its ASN1Primitive type
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return values;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/Rdn.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/Rdn.cs.meta
new file mode 100644
index 00000000..2a862941
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/Rdn.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ffeede4586076d543a4ea41223b97e68
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style.meta
new file mode 100644
index 00000000..cac818fd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d72e089432704404a86a3b3ce80102c7
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style/IetfUtilities.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style/IetfUtilities.cs
new file mode 100644
index 00000000..b42a3a49
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style/IetfUtilities.cs
@@ -0,0 +1,217 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500.Style
+{
+ public abstract class IetfUtilities
+ {
+ public static string ValueToString(Asn1Encodable value)
+ {
+ StringBuilder vBuf = new StringBuilder();
+
+ if (value is IAsn1String && !(value is DerUniversalString))
+ {
+ string v = ((IAsn1String)value).GetString();
+ if (v.Length > 0 && v[0] == '#')
+ {
+ vBuf.Append('\\');
+ }
+
+ vBuf.Append(v);
+ }
+ else
+ {
+ try
+ {
+ vBuf.Append('#');
+ vBuf.Append(Hex.ToHexString(value.ToAsn1Object().GetEncoded(Asn1Encodable.Der)));
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("Other value has no encoded form", e);
+ }
+ }
+
+ int end = vBuf.Length;
+ int index = 0;
+
+ if (vBuf.Length >= 2 && vBuf[0] == '\\' && vBuf[1] == '#')
+ {
+ index += 2;
+ }
+
+ while (index != end)
+ {
+ switch (vBuf[index])
+ {
+ case ',':
+ case '"':
+ case '\\':
+ case '+':
+ case '=':
+ case '<':
+ case '>':
+ case ';':
+ {
+ vBuf.Insert(index, "\\");
+ index += 2;
+ ++end;
+ break;
+ }
+ default:
+ {
+ ++index;
+ break;
+ }
+ }
+ }
+
+ int start = 0;
+ if (vBuf.Length > 0)
+ {
+ while (vBuf.Length > start && vBuf[start] == ' ')
+ {
+ vBuf.Insert(start, "\\");
+ start += 2;
+ }
+ }
+
+ int endBuf = vBuf.Length - 1;
+
+ while (endBuf >= 0 && vBuf[endBuf] == ' ')
+ {
+ vBuf.Insert(endBuf, "\\");
+ endBuf--;
+ }
+
+ return vBuf.ToString();
+ }
+
+ public static string Canonicalize(string s)
+ {
+ string value = s.ToLowerInvariant();
+
+ if (value.Length > 0 && value[0] == '#')
+ {
+ Asn1Object obj = DecodeObject(value);
+
+ if (obj is IAsn1String str)
+ {
+ value = str.GetString().ToLowerInvariant();
+ }
+ }
+
+ if (value.Length > 1)
+ {
+ int start = 0;
+ while (start + 1 < value.Length && value[start] == '\\' && value[start + 1] == ' ')
+ {
+ start += 2;
+ }
+
+ int end = value.Length - 1;
+ while (end - 1 > 0 && value[end - 1] == '\\' && value[end] == ' ')
+ {
+ end -= 2;
+ }
+
+ if (start > 0 || end < value.Length - 1)
+ {
+ value = value.Substring(start, end + 1 - start);
+ }
+ }
+
+ return StripInternalSpaces(value);
+ }
+
+ public static string CanonicalString(Asn1Encodable value)
+ {
+ return Canonicalize(ValueToString(value));
+ }
+
+ private static Asn1Object DecodeObject(string oValue)
+ {
+ try
+ {
+ return Asn1Object.FromByteArray(Hex.DecodeStrict(oValue, 1, oValue.Length - 1));
+ }
+ catch (IOException e)
+ {
+ throw new InvalidOperationException("unknown encoding in name: " + e);
+ }
+ }
+
+ public static string StripInternalSpaces(string str)
+ {
+ if (str.IndexOf(" ") < 0)
+ return str;
+
+ StringBuilder res = new StringBuilder();
+
+ char c1 = str[0];
+ res.Append(c1);
+
+ for (int k = 1; k < str.Length; k++)
+ {
+ char c2 = str[k];
+ if (!(' ' == c1 && ' ' == c2))
+ {
+ res.Append(c2);
+ c1 = c2;
+ }
+ }
+
+ return res.ToString();
+ }
+
+ public static bool RdnAreEqual(Rdn rdn1, Rdn rdn2)
+ {
+ if (rdn1.Count != rdn2.Count)
+ return false;
+
+ AttributeTypeAndValue[] atvs1 = rdn1.GetTypesAndValues();
+ AttributeTypeAndValue[] atvs2 = rdn2.GetTypesAndValues();
+
+ if (atvs1.Length != atvs2.Length)
+ return false;
+
+ for (int i = 0; i != atvs1.Length; i++)
+ {
+ if (!AtvAreEqual(atvs1[i], atvs2[i]))
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool AtvAreEqual(AttributeTypeAndValue atv1, AttributeTypeAndValue atv2)
+ {
+ if (atv1 == atv2)
+ return true;
+ if (null == atv1 || null == atv2)
+ return false;
+
+ DerObjectIdentifier o1 = atv1.Type;
+ DerObjectIdentifier o2 = atv2.Type;
+
+ if (!o1.Equals(o2))
+ return false;
+
+ string v1 = CanonicalString(atv1.Value);
+ string v2 = CanonicalString(atv2.Value);
+
+ if (!v1.Equals(v2))
+ return false;
+
+ return true;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style/IetfUtilities.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style/IetfUtilities.cs.meta
new file mode 100644
index 00000000..1a684aec
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x500/style/IetfUtilities.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7f254832f89711c4db98be84d9496672
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509.meta
new file mode 100644
index 00000000..85f0b51b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 306c046cdd23316419e25d4556b48737
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AccessDescription.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AccessDescription.cs
new file mode 100644
index 00000000..91bddafb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AccessDescription.cs
@@ -0,0 +1,89 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The AccessDescription object.
+ *
+ * AccessDescription ::= SEQUENCE {
+ * accessMethod OBJECT IDENTIFIER,
+ * accessLocation GeneralName }
+ *
+ */
+ public class AccessDescription
+ : Asn1Encodable
+ {
+ public readonly static DerObjectIdentifier IdADCAIssuers = new DerObjectIdentifier("1.3.6.1.5.5.7.48.2");
+ public readonly static DerObjectIdentifier IdADOcsp = new DerObjectIdentifier("1.3.6.1.5.5.7.48.1");
+
+ private readonly DerObjectIdentifier accessMethod;
+ private readonly GeneralName accessLocation;
+
+ public static AccessDescription GetInstance(
+ object obj)
+ {
+ if (obj is AccessDescription)
+ return (AccessDescription) obj;
+
+ if (obj is Asn1Sequence)
+ return new AccessDescription((Asn1Sequence) obj);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private AccessDescription(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("wrong number of elements in sequence");
+
+ accessMethod = DerObjectIdentifier.GetInstance(seq[0]);
+ accessLocation = GeneralName.GetInstance(seq[1]);
+ }
+
+ /**
+ * create an AccessDescription with the oid and location provided.
+ */
+ public AccessDescription(
+ DerObjectIdentifier oid,
+ GeneralName location)
+ {
+ accessMethod = oid;
+ accessLocation = location;
+ }
+
+ /**
+ *
+ * @return the access method.
+ */
+ public DerObjectIdentifier AccessMethod
+ {
+ get { return accessMethod; }
+ }
+
+ /**
+ *
+ * @return the access location
+ */
+ public GeneralName AccessLocation
+ {
+ get { return accessLocation; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(accessMethod, accessLocation);
+ }
+
+ public override string ToString()
+ {
+ return "AccessDescription: Oid(" + this.accessMethod.Id + ")";
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AccessDescription.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AccessDescription.cs.meta
new file mode 100644
index 00000000..607c7ede
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AccessDescription.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6fc6b1bce31c4b74183cccf0528a1e92
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AlgorithmIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AlgorithmIdentifier.cs
new file mode 100644
index 00000000..b56016ad
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AlgorithmIdentifier.cs
@@ -0,0 +1,87 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class AlgorithmIdentifier
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier algorithm;
+ private readonly Asn1Encodable parameters;
+
+ public static AlgorithmIdentifier GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static AlgorithmIdentifier GetInstance(
+ object obj)
+ {
+ if (obj == null)
+ return null;
+ if (obj is AlgorithmIdentifier)
+ return (AlgorithmIdentifier)obj;
+ return new AlgorithmIdentifier(Asn1Sequence.GetInstance(obj));
+ }
+
+ public AlgorithmIdentifier(
+ DerObjectIdentifier algorithm)
+ {
+ this.algorithm = algorithm;
+ }
+
+ public AlgorithmIdentifier(
+ DerObjectIdentifier algorithm,
+ Asn1Encodable parameters)
+ {
+ this.algorithm = algorithm;
+ this.parameters = parameters;
+ }
+
+ internal AlgorithmIdentifier(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 1 || seq.Count > 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ this.algorithm = DerObjectIdentifier.GetInstance(seq[0]);
+ this.parameters = seq.Count < 2 ? null : seq[1];
+ }
+
+ ///
+ /// Return the OID in the Algorithm entry of this identifier.
+ ///
+ public virtual DerObjectIdentifier Algorithm
+ {
+ get { return algorithm; }
+ }
+
+ ///
+ /// Return the parameters structure in the Parameters entry of this identifier.
+ ///
+ public virtual Asn1Encodable Parameters
+ {
+ get { return parameters; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * AlgorithmIdentifier ::= Sequence {
+ * algorithm OBJECT IDENTIFIER,
+ * parameters ANY DEFINED BY algorithm OPTIONAL }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(algorithm);
+ v.AddOptional(parameters);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AlgorithmIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AlgorithmIdentifier.cs.meta
new file mode 100644
index 00000000..3c038cef
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AlgorithmIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 74d1f42dee5b53647bd71386bdbc95b5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertIssuer.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertIssuer.cs
new file mode 100644
index 00000000..2b4c1b8e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertIssuer.cs
@@ -0,0 +1,90 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class AttCertIssuer
+ : Asn1Encodable, IAsn1Choice
+ {
+ internal readonly Asn1Encodable obj;
+ internal readonly Asn1Object choiceObj;
+
+ public static AttCertIssuer GetInstance(
+ object obj)
+ {
+ if (obj is AttCertIssuer)
+ {
+ return (AttCertIssuer)obj;
+ }
+ else if (obj is V2Form)
+ {
+ return new AttCertIssuer(V2Form.GetInstance(obj));
+ }
+ else if (obj is GeneralNames)
+ {
+ return new AttCertIssuer((GeneralNames)obj);
+ }
+ else if (obj is Asn1TaggedObject)
+ {
+ return new AttCertIssuer(V2Form.GetInstance((Asn1TaggedObject)obj, false));
+ }
+ else if (obj is Asn1Sequence)
+ {
+ return new AttCertIssuer(GeneralNames.GetInstance(obj));
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static AttCertIssuer GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(obj.GetObject()); // must be explictly tagged
+ }
+
+ ///
+ /// Don't use this one if you are trying to be RFC 3281 compliant.
+ /// Use it for v1 attribute certificates only.
+ ///
+ /// Our GeneralNames structure
+ public AttCertIssuer(
+ GeneralNames names)
+ {
+ obj = names;
+ choiceObj = obj.ToAsn1Object();
+ }
+
+ public AttCertIssuer(
+ V2Form v2Form)
+ {
+ obj = v2Form;
+ choiceObj = new DerTaggedObject(false, 0, obj);
+ }
+
+ public Asn1Encodable Issuer
+ {
+ get { return obj; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * AttCertIssuer ::= CHOICE {
+ * v1Form GeneralNames, -- MUST NOT be used in this
+ * -- profile
+ * v2Form [0] V2Form -- v2 only
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return choiceObj;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertIssuer.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertIssuer.cs.meta
new file mode 100644
index 00000000..4d49ab0c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertIssuer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 24c98319223cbc0488b4a6521e795dc6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertValidityPeriod.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertValidityPeriod.cs
new file mode 100644
index 00000000..887e8957
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertValidityPeriod.cs
@@ -0,0 +1,82 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class AttCertValidityPeriod
+ : Asn1Encodable
+ {
+ private readonly Asn1GeneralizedTime notBeforeTime;
+ private readonly Asn1GeneralizedTime notAfterTime;
+
+ public static AttCertValidityPeriod GetInstance(
+ object obj)
+ {
+ if (obj is AttCertValidityPeriod || obj == null)
+ {
+ return (AttCertValidityPeriod) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new AttCertValidityPeriod((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static AttCertValidityPeriod GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ private AttCertValidityPeriod(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ notBeforeTime = Asn1GeneralizedTime.GetInstance(seq[0]);
+ notAfterTime = Asn1GeneralizedTime.GetInstance(seq[1]);
+ }
+
+ public AttCertValidityPeriod(
+ Asn1GeneralizedTime notBeforeTime,
+ Asn1GeneralizedTime notAfterTime)
+ {
+ this.notBeforeTime = notBeforeTime;
+ this.notAfterTime = notAfterTime;
+ }
+
+ public Asn1GeneralizedTime NotBeforeTime
+ {
+ get { return notBeforeTime; }
+ }
+
+ public Asn1GeneralizedTime NotAfterTime
+ {
+ get { return notAfterTime; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * AttCertValidityPeriod ::= Sequence {
+ * notBeforeTime GeneralizedTime,
+ * notAfterTime GeneralizedTime
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(notBeforeTime, notAfterTime);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertValidityPeriod.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertValidityPeriod.cs.meta
new file mode 100644
index 00000000..ca773311
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttCertValidityPeriod.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5321f2cb782e44043b4fa49060cbae5d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Attribute.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Attribute.cs
new file mode 100644
index 00000000..b9fa88de
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Attribute.cs
@@ -0,0 +1,86 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class AttributeX509
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier attrType;
+ private readonly Asn1Set attrValues;
+
+ /**
+ * return an Attr object from the given object.
+ *
+ * @param o the object we want converted.
+ * @exception ArgumentException if the object cannot be converted.
+ */
+ public static AttributeX509 GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is AttributeX509)
+ {
+ return (AttributeX509) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new AttributeX509((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private AttributeX509(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ attrType = DerObjectIdentifier.GetInstance(seq[0]);
+ attrValues = Asn1Set.GetInstance(seq[1]);
+ }
+
+ public AttributeX509(
+ DerObjectIdentifier attrType,
+ Asn1Set attrValues)
+ {
+ this.attrType = attrType;
+ this.attrValues = attrValues;
+ }
+
+ public DerObjectIdentifier AttrType
+ {
+ get { return attrType; }
+ }
+
+ public Asn1Encodable[] GetAttributeValues()
+ {
+ return attrValues.ToArray();
+ }
+
+ public Asn1Set AttrValues
+ {
+ get { return attrValues; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Attr ::= Sequence {
+ * attrType OBJECT IDENTIFIER,
+ * attrValues Set OF AttributeValue
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(attrType, attrValues);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Attribute.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Attribute.cs.meta
new file mode 100644
index 00000000..96b35942
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Attribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1e4913ceea3f4294b888f419274a1a78
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificate.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificate.cs
new file mode 100644
index 00000000..07bb214c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificate.cs
@@ -0,0 +1,90 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class AttributeCertificate
+ : Asn1Encodable
+ {
+ private readonly AttributeCertificateInfo acinfo;
+ private readonly AlgorithmIdentifier signatureAlgorithm;
+ private readonly DerBitString signatureValue;
+
+ /**
+ * @param obj
+ * @return
+ */
+ public static AttributeCertificate GetInstance(
+ object obj)
+ {
+ if (obj is AttributeCertificate)
+ return (AttributeCertificate) obj;
+
+ if (obj != null)
+ return new AttributeCertificate(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public AttributeCertificate(
+ AttributeCertificateInfo acinfo,
+ AlgorithmIdentifier signatureAlgorithm,
+ DerBitString signatureValue)
+ {
+ this.acinfo = acinfo;
+ this.signatureAlgorithm = signatureAlgorithm;
+ this.signatureValue = signatureValue;
+ }
+
+ private AttributeCertificate(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ this.acinfo = AttributeCertificateInfo.GetInstance(seq[0]);
+ this.signatureAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
+ this.signatureValue = DerBitString.GetInstance(seq[2]);
+ }
+
+ public AttributeCertificateInfo ACInfo
+ {
+ get { return acinfo; }
+ }
+
+ public AlgorithmIdentifier SignatureAlgorithm
+ {
+ get { return signatureAlgorithm; }
+ }
+
+ public DerBitString SignatureValue
+ {
+ get { return signatureValue; }
+ }
+
+ public byte[] GetSignatureOctets()
+ {
+ return signatureValue.GetOctets();
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * AttributeCertificate ::= Sequence {
+ * acinfo AttributeCertificateInfo,
+ * signatureAlgorithm AlgorithmIdentifier,
+ * signatureValue BIT STRING
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(acinfo, signatureAlgorithm, signatureValue);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificate.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificate.cs.meta
new file mode 100644
index 00000000..2a7b0960
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificate.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8a575c445db2d2146bb19447baf9a5bc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificateInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificateInfo.cs
new file mode 100644
index 00000000..1d8f922f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificateInfo.cs
@@ -0,0 +1,167 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class AttributeCertificateInfo
+ : Asn1Encodable
+ {
+ internal readonly DerInteger version;
+ internal readonly Holder holder;
+ internal readonly AttCertIssuer issuer;
+ internal readonly AlgorithmIdentifier signature;
+ internal readonly DerInteger serialNumber;
+ internal readonly AttCertValidityPeriod attrCertValidityPeriod;
+ internal readonly Asn1Sequence attributes;
+ internal readonly DerBitString issuerUniqueID;
+ internal readonly X509Extensions extensions;
+
+ public static AttributeCertificateInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ public static AttributeCertificateInfo GetInstance(
+ object obj)
+ {
+ if (obj is AttributeCertificateInfo)
+ {
+ return (AttributeCertificateInfo) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new AttributeCertificateInfo((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private AttributeCertificateInfo(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 6 || seq.Count > 9)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+
+ int start;
+ if (seq[0] is DerInteger) // in version 1 certs version is DEFAULT v1(0)
+ {
+ this.version = DerInteger.GetInstance(seq[0]);
+ start = 1;
+ }
+ else
+ {
+ this.version = new DerInteger(0);
+ start = 0;
+ }
+
+ this.holder = Holder.GetInstance(seq[start]);
+ this.issuer = AttCertIssuer.GetInstance(seq[start + 1]);
+ this.signature = AlgorithmIdentifier.GetInstance(seq[start + 2]);
+ this.serialNumber = DerInteger.GetInstance(seq[start + 3]);
+ this.attrCertValidityPeriod = AttCertValidityPeriod.GetInstance(seq[start + 4]);
+ this.attributes = Asn1Sequence.GetInstance(seq[start + 5]);
+
+ for (int i = start + 6; i < seq.Count; i++)
+ {
+ Asn1Encodable obj = (Asn1Encodable) seq[i];
+
+ if (obj is DerBitString)
+ {
+ this.issuerUniqueID = DerBitString.GetInstance(seq[i]);
+ }
+ else if (obj is Asn1Sequence || obj is X509Extensions)
+ {
+ this.extensions = X509Extensions.GetInstance(seq[i]);
+ }
+ }
+ }
+
+ public DerInteger Version
+ {
+ get { return version; }
+ }
+
+ public Holder Holder
+ {
+ get { return holder; }
+ }
+
+ public AttCertIssuer Issuer
+ {
+ get { return issuer; }
+ }
+
+ public AlgorithmIdentifier Signature
+ {
+ get { return signature; }
+ }
+
+ public DerInteger SerialNumber
+ {
+ get { return serialNumber; }
+ }
+
+ public AttCertValidityPeriod AttrCertValidityPeriod
+ {
+ get { return attrCertValidityPeriod; }
+ }
+
+ public Asn1Sequence Attributes
+ {
+ get { return attributes; }
+ }
+
+ public DerBitString IssuerUniqueID
+ {
+ get { return issuerUniqueID; }
+ }
+
+ public X509Extensions Extensions
+ {
+ get { return extensions; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * AttributeCertificateInfo ::= Sequence {
+ * version AttCertVersion -- version is v2,
+ * holder Holder,
+ * issuer AttCertIssuer,
+ * signature AlgorithmIdentifier,
+ * serialNumber CertificateSerialNumber,
+ * attrCertValidityPeriod AttCertValidityPeriod,
+ * attributes Sequence OF Attr,
+ * issuerUniqueID UniqueIdentifier OPTIONAL,
+ * extensions Extensions OPTIONAL
+ * }
+ *
+ * AttCertVersion ::= Integer { v2(1) }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(9);
+
+ if (!version.HasValue(0))
+ {
+ v.Add(version);
+ }
+
+ v.Add(holder, issuer, signature, serialNumber, attrCertValidityPeriod, attributes);
+ v.AddOptional(issuerUniqueID, extensions);
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificateInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificateInfo.cs.meta
new file mode 100644
index 00000000..ce48d4f6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeCertificateInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5d9ead0124c35704286b318f293a6640
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeTable.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeTable.cs
new file mode 100644
index 00000000..e6124d99
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeTable.cs
@@ -0,0 +1,54 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class AttributeTable
+ {
+ private readonly IDictionary m_attributes;
+
+ public AttributeTable(IDictionary attrs)
+ {
+ m_attributes = new Dictionary(attrs);
+ }
+
+ public AttributeTable(Asn1EncodableVector v)
+ {
+ m_attributes = new Dictionary(v.Count);
+
+ for (int i = 0; i != v.Count; i++)
+ {
+ AttributeX509 a = AttributeX509.GetInstance(v[i]);
+
+ m_attributes.Add(a.AttrType, a);
+ }
+ }
+
+ public AttributeTable(Asn1Set s)
+ {
+ m_attributes = new Dictionary(s.Count);
+
+ for (int i = 0; i != s.Count; i++)
+ {
+ AttributeX509 a = AttributeX509.GetInstance(s[i]);
+
+ m_attributes.Add(a.AttrType, a);
+ }
+ }
+
+ public AttributeX509 Get(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(m_attributes, oid);
+ }
+
+ public IDictionary ToDictionary()
+ {
+ return new Dictionary(m_attributes);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeTable.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeTable.cs.meta
new file mode 100644
index 00000000..dae4d286
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AttributeTable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 862496a230ee1e644baeda9d3c583189
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityInformationAccess.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityInformationAccess.cs
new file mode 100644
index 00000000..40e603bc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityInformationAccess.cs
@@ -0,0 +1,111 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The AuthorityInformationAccess object.
+ *
+ * id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 }
+ *
+ * AuthorityInfoAccessSyntax ::=
+ * Sequence SIZE (1..MAX) OF AccessDescription
+ * AccessDescription ::= Sequence {
+ * accessMethod OBJECT IDENTIFIER,
+ * accessLocation GeneralName }
+ *
+ * id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
+ * id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
+ * id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 }
+ *
+ */
+ public class AuthorityInformationAccess
+ : Asn1Encodable
+ {
+ private static AccessDescription[] Copy(AccessDescription[] descriptions)
+ {
+ return (AccessDescription[])descriptions.Clone();
+ }
+
+ public static AuthorityInformationAccess GetInstance(object obj)
+ {
+ if (obj is AuthorityInformationAccess)
+ return (AuthorityInformationAccess)obj;
+ if (obj == null)
+ return null;
+ return new AuthorityInformationAccess(Asn1Sequence.GetInstance(obj));
+ }
+
+ public static AuthorityInformationAccess FromExtensions(X509Extensions extensions)
+ {
+ return GetInstance(X509Extensions.GetExtensionParsedValue(extensions, X509Extensions.AuthorityInfoAccess));
+ }
+
+ private readonly AccessDescription[] descriptions;
+
+ private AuthorityInformationAccess(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 1)
+ throw new ArgumentException("sequence may not be empty");
+
+ this.descriptions = new AccessDescription[seq.Count];
+
+ for (int i = 0; i < seq.Count; ++i)
+ {
+ descriptions[i] = AccessDescription.GetInstance(seq[i]);
+ }
+ }
+
+ public AuthorityInformationAccess(
+ AccessDescription description)
+ {
+ this.descriptions = new AccessDescription[]{ description };
+ }
+
+ public AuthorityInformationAccess(
+ AccessDescription[] descriptions)
+ {
+ this.descriptions = Copy(descriptions);
+ }
+
+ /**
+ * create an AuthorityInformationAccess with the oid and location provided.
+ */
+ public AuthorityInformationAccess(DerObjectIdentifier oid, GeneralName location)
+ : this(new AccessDescription(oid, location))
+ {
+ }
+
+ public AccessDescription[] GetAccessDescriptions()
+ {
+ return Copy(descriptions);
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(descriptions);
+ }
+
+ public override string ToString()
+ {
+ //return "AuthorityInformationAccess: Oid(" + this.descriptions[0].AccessMethod.Id + ")";
+
+ StringBuilder buf = new StringBuilder();
+ buf.AppendLine("AuthorityInformationAccess:");
+ foreach (AccessDescription description in descriptions)
+ {
+ buf.Append(" ")
+ .Append(description)
+ .AppendLine();
+ }
+ return buf.ToString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityInformationAccess.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityInformationAccess.cs.meta
new file mode 100644
index 00000000..c0eaea4e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityInformationAccess.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8f412afbd6f3fa64a904932848e473da
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityKeyIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityKeyIdentifier.cs
new file mode 100644
index 00000000..00b0ddc5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityKeyIdentifier.cs
@@ -0,0 +1,187 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The AuthorityKeyIdentifier object.
+ *
+ * id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 35 }
+ *
+ * AuthorityKeyIdentifier ::= Sequence {
+ * keyIdentifier [0] IMPLICIT KeyIdentifier OPTIONAL,
+ * authorityCertIssuer [1] IMPLICIT GeneralNames OPTIONAL,
+ * authorityCertSerialNumber [2] IMPLICIT CertificateSerialNumber OPTIONAL }
+ *
+ * KeyIdentifier ::= OCTET STRING
+ *
+ *
+ */
+ public class AuthorityKeyIdentifier
+ : Asn1Encodable
+ {
+ public static AuthorityKeyIdentifier GetInstance(Asn1TaggedObject obj, bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static AuthorityKeyIdentifier GetInstance(object obj)
+ {
+ if (obj is AuthorityKeyIdentifier)
+ return (AuthorityKeyIdentifier)obj;
+ if (obj is X509Extension)
+ return GetInstance(X509Extension.ConvertValueToObject((X509Extension)obj));
+ if (obj == null)
+ return null;
+ return new AuthorityKeyIdentifier(Asn1Sequence.GetInstance(obj));
+ }
+
+ public static AuthorityKeyIdentifier FromExtensions(X509Extensions extensions)
+ {
+ return GetInstance(X509Extensions.GetExtensionParsedValue(extensions, X509Extensions.AuthorityKeyIdentifier));
+ }
+
+ private readonly Asn1OctetString keyidentifier;
+ private readonly GeneralNames certissuer;
+ private readonly DerInteger certserno;
+
+ protected internal AuthorityKeyIdentifier(
+ Asn1Sequence seq)
+ {
+ foreach (Asn1Encodable element in seq)
+ {
+ Asn1TaggedObject obj = Asn1TaggedObject.GetInstance(element);
+
+ switch (obj.TagNo)
+ {
+ case 0:
+ this.keyidentifier = Asn1OctetString.GetInstance(obj, false);
+ break;
+ case 1:
+ this.certissuer = GeneralNames.GetInstance(obj, false);
+ break;
+ case 2:
+ this.certserno = DerInteger.GetInstance(obj, false);
+ break;
+ default:
+ throw new ArgumentException("illegal tag");
+ }
+ }
+ }
+
+ /**
+ *
+ * Calulates the keyidentifier using a SHA1 hash over the BIT STRING
+ * from SubjectPublicKeyInfo as defined in RFC2459.
+ *
+ * Example of making a AuthorityKeyIdentifier:
+ *
+ * SubjectPublicKeyInfo apki = new SubjectPublicKeyInfo((ASN1Sequence)new ASN1InputStream(
+ * publicKey.getEncoded()).readObject());
+ * AuthorityKeyIdentifier aki = new AuthorityKeyIdentifier(apki);
+ *
+ *
+ **/
+ public AuthorityKeyIdentifier(
+ SubjectPublicKeyInfo spki)
+ : this(spki, null, null)
+ {
+ }
+
+ /**
+ * create an AuthorityKeyIdentifier with the GeneralNames tag and
+ * the serial number provided as well.
+ */
+ public AuthorityKeyIdentifier(
+ SubjectPublicKeyInfo spki,
+ GeneralNames name,
+ BigInteger serialNumber)
+ {
+ IDigest digest = new Sha1Digest();
+ byte[] resBuf = new byte[digest.GetDigestSize()];
+ byte[] bytes = spki.PublicKeyData.GetBytes();
+ digest.BlockUpdate(bytes, 0, bytes.Length);
+ digest.DoFinal(resBuf, 0);
+
+ this.keyidentifier = new DerOctetString(resBuf);
+ this.certissuer = name;
+ this.certserno = serialNumber == null ? null : new DerInteger(serialNumber);
+ }
+
+ /**
+ * create an AuthorityKeyIdentifier with the GeneralNames tag and
+ * the serial number provided.
+ */
+ public AuthorityKeyIdentifier(
+ GeneralNames name,
+ BigInteger serialNumber)
+ : this((byte[])null, name, serialNumber)
+ {
+ }
+
+ /**
+ * create an AuthorityKeyIdentifier with a precomputed key identifier
+ */
+ public AuthorityKeyIdentifier(
+ byte[] keyIdentifier)
+ : this(keyIdentifier, null, null)
+ {
+ }
+
+ /**
+ * create an AuthorityKeyIdentifier with a precomupted key identifier
+ * and the GeneralNames tag and the serial number provided as well.
+ */
+ public AuthorityKeyIdentifier(
+ byte[] keyIdentifier,
+ GeneralNames name,
+ BigInteger serialNumber)
+ {
+ this.keyidentifier = keyIdentifier == null ? null : new DerOctetString(keyIdentifier);
+ this.certissuer = name;
+ this.certserno = serialNumber == null ? null : new DerInteger(serialNumber);
+ }
+
+ public byte[] GetKeyIdentifier()
+ {
+ return keyidentifier == null ? null : keyidentifier.GetOctets();
+ }
+
+ public GeneralNames AuthorityCertIssuer
+ {
+ get { return certissuer; }
+ }
+
+ public BigInteger AuthorityCertSerialNumber
+ {
+ get { return certserno == null ? null : certserno.Value; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(false, 0, keyidentifier);
+ v.AddOptionalTagged(false, 1, certissuer);
+ v.AddOptionalTagged(false, 2, certserno);
+ return new DerSequence(v);
+ }
+
+ public override string ToString()
+ {
+ string keyID = (keyidentifier != null) ? Hex.ToHexString(keyidentifier.GetOctets()) : "null";
+
+ return "AuthorityKeyIdentifier: KeyID(" + keyID + ")";
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityKeyIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityKeyIdentifier.cs.meta
new file mode 100644
index 00000000..27beac59
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/AuthorityKeyIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7af7f9bc1136f524b82aab10b4d1a5af
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/BasicConstraints.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/BasicConstraints.cs
new file mode 100644
index 00000000..9c27deff
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/BasicConstraints.cs
@@ -0,0 +1,121 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class BasicConstraints
+ : Asn1Encodable
+ {
+ public static BasicConstraints GetInstance(Asn1TaggedObject obj, bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static BasicConstraints GetInstance(object obj)
+ {
+ if (obj is BasicConstraints)
+ return (BasicConstraints)obj;
+ if (obj is X509Extension)
+ return GetInstance(X509Extension.ConvertValueToObject((X509Extension)obj));
+ if (obj == null)
+ return null;
+ return new BasicConstraints(Asn1Sequence.GetInstance(obj));
+ }
+
+ public static BasicConstraints FromExtensions(X509Extensions extensions)
+ {
+ return GetInstance(X509Extensions.GetExtensionParsedValue(extensions, X509Extensions.BasicConstraints));
+ }
+
+ private readonly DerBoolean cA;
+ private readonly DerInteger pathLenConstraint;
+
+ private BasicConstraints(
+ Asn1Sequence seq)
+ {
+ if (seq.Count > 0)
+ {
+ if (seq[0] is DerBoolean)
+ {
+ this.cA = DerBoolean.GetInstance(seq[0]);
+ }
+ else
+ {
+ this.pathLenConstraint = DerInteger.GetInstance(seq[0]);
+ }
+
+ if (seq.Count > 1)
+ {
+ if (this.cA == null)
+ throw new ArgumentException("wrong sequence in constructor", "seq");
+
+ this.pathLenConstraint = DerInteger.GetInstance(seq[1]);
+ }
+ }
+ }
+
+ public BasicConstraints(
+ bool cA)
+ {
+ if (cA)
+ {
+ this.cA = DerBoolean.True;
+ }
+ }
+
+ /**
+ * create a cA=true object for the given path length constraint.
+ *
+ * @param pathLenConstraint
+ */
+ public BasicConstraints(
+ int pathLenConstraint)
+ {
+ this.cA = DerBoolean.True;
+ this.pathLenConstraint = new DerInteger(pathLenConstraint);
+ }
+
+ public bool IsCA()
+ {
+ return cA != null && cA.IsTrue;
+ }
+
+ public BigInteger PathLenConstraint
+ {
+ get { return pathLenConstraint == null ? null : pathLenConstraint.Value; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * BasicConstraints := Sequence {
+ * cA Boolean DEFAULT FALSE,
+ * pathLenConstraint Integer (0..MAX) OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(2);
+ v.AddOptional(cA,
+ pathLenConstraint); // yes some people actually do this when cA is false...
+ return new DerSequence(v);
+ }
+
+ public override string ToString()
+ {
+ if (pathLenConstraint == null)
+ {
+ return "BasicConstraints: isCa(" + this.IsCA() + ")";
+ }
+
+ return "BasicConstraints: isCa(" + this.IsCA() + "), pathLenConstraint = " + pathLenConstraint.Value;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/BasicConstraints.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/BasicConstraints.cs.meta
new file mode 100644
index 00000000..05059b85
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/BasicConstraints.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 787b8a9978024a34096c163bb28d54a2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLDistPoint.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLDistPoint.cs
new file mode 100644
index 00000000..03aeedeb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLDistPoint.cs
@@ -0,0 +1,89 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class CrlDistPoint
+ : Asn1Encodable
+ {
+ public static CrlDistPoint GetInstance(Asn1TaggedObject obj, bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static CrlDistPoint GetInstance(object obj)
+ {
+ if (obj is CrlDistPoint)
+ return (CrlDistPoint)obj;
+ if (obj == null)
+ return null;
+ return new CrlDistPoint(Asn1Sequence.GetInstance(obj));
+ }
+
+ public static CrlDistPoint FromExtensions(X509Extensions extensions)
+ {
+ return GetInstance(X509Extensions.GetExtensionParsedValue(extensions, X509Extensions.CrlDistributionPoints));
+ }
+
+ internal readonly Asn1Sequence seq;
+
+ private CrlDistPoint(
+ Asn1Sequence seq)
+ {
+ this.seq = seq;
+ }
+
+ public CrlDistPoint(
+ DistributionPoint[] points)
+ {
+ seq = new DerSequence(points);
+ }
+
+ /**
+ * Return the distribution points making up the sequence.
+ *
+ * @return DistributionPoint[]
+ */
+ public DistributionPoint[] GetDistributionPoints()
+ {
+ DistributionPoint[] dp = new DistributionPoint[seq.Count];
+
+ for (int i = 0; i != seq.Count; ++i)
+ {
+ dp[i] = DistributionPoint.GetInstance(seq[i]);
+ }
+
+ return dp;
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * CrlDistPoint ::= Sequence SIZE {1..MAX} OF DistributionPoint
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return seq;
+ }
+
+ public override string ToString()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.AppendLine("CRLDistPoint:");
+ foreach (DistributionPoint dp in GetDistributionPoints())
+ {
+ buf.Append(" ")
+ .Append(dp)
+ .AppendLine();
+ }
+ return buf.ToString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLDistPoint.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLDistPoint.cs.meta
new file mode 100644
index 00000000..f3ae037f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLDistPoint.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 66ab97eed8aa93248a3aead3651345f3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLNumber.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLNumber.cs
new file mode 100644
index 00000000..c7d31188
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLNumber.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The CRLNumber object.
+ *
+ * CRLNumber::= Integer(0..MAX)
+ *
+ */
+ public class CrlNumber
+ : DerInteger
+ {
+ public CrlNumber(
+ BigInteger number)
+ : base(number)
+ {
+ }
+
+ public BigInteger Number
+ {
+ get { return PositiveValue; }
+ }
+
+ public override string ToString()
+ {
+ return "CRLNumber: " + Number;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLNumber.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLNumber.cs.meta
new file mode 100644
index 00000000..455063c6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLNumber.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2aeadd31e511fd243b3812ae888042e5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLReason.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLReason.cs
new file mode 100644
index 00000000..0fc1f934
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLReason.cs
@@ -0,0 +1,64 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The CRLReason enumeration.
+ *
+ * CRLReason ::= Enumerated {
+ * unspecified (0),
+ * keyCompromise (1),
+ * cACompromise (2),
+ * affiliationChanged (3),
+ * superseded (4),
+ * cessationOfOperation (5),
+ * certificateHold (6),
+ * removeFromCRL (8),
+ * privilegeWithdrawn (9),
+ * aACompromise (10)
+ * }
+ *
+ */
+ public class CrlReason
+ : DerEnumerated
+ {
+ public const int Unspecified = 0;
+ public const int KeyCompromise = 1;
+ public const int CACompromise = 2;
+ public const int AffiliationChanged = 3;
+ public const int Superseded = 4;
+ public const int CessationOfOperation = 5;
+ public const int CertificateHold = 6;
+ // 7 -> Unknown
+ public const int RemoveFromCrl = 8;
+ public const int PrivilegeWithdrawn = 9;
+ public const int AACompromise = 10;
+
+ private static readonly string[] ReasonString = new string[]
+ {
+ "Unspecified", "KeyCompromise", "CACompromise", "AffiliationChanged",
+ "Superseded", "CessationOfOperation", "CertificateHold", "Unknown",
+ "RemoveFromCrl", "PrivilegeWithdrawn", "AACompromise"
+ };
+
+ public CrlReason(
+ int reason)
+ : base(reason)
+ {
+ }
+
+ public CrlReason(DerEnumerated reason)
+ : base(reason.IntValueExact)
+ {
+ }
+
+ public override string ToString()
+ {
+ int reason = IntValueExact;
+ string str = (reason < 0 || reason > 10) ? "Invalid" : ReasonString[reason];
+ return "CrlReason: " + str;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLReason.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLReason.cs.meta
new file mode 100644
index 00000000..efec9565
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CRLReason.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 56f50d8d8cd7a9d429273a7af62d9268
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertPolicyId.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertPolicyId.cs
new file mode 100644
index 00000000..88efb5d9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertPolicyId.cs
@@ -0,0 +1,24 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * CertPolicyId, used in the CertificatePolicies and PolicyMappings
+ * X509V3 Extensions.
+ *
+ *
+ * CertPolicyId ::= OBJECT IDENTIFIER
+ *
+ */
+ public class CertPolicyID
+ : DerObjectIdentifier
+ {
+ public CertPolicyID(
+ string id)
+ : base(id)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertPolicyId.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertPolicyId.cs.meta
new file mode 100644
index 00000000..a1121b6c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertPolicyId.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 43004b73691902a4aa4115eb853a654d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificateList.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificateList.cs
new file mode 100644
index 00000000..45299692
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificateList.cs
@@ -0,0 +1,115 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * PKIX RFC-2459
+ *
+ * The X.509 v2 CRL syntax is as follows. For signature calculation,
+ * the data that is to be signed is ASN.1 Der encoded.
+ *
+ *
+ * CertificateList ::= Sequence {
+ * tbsCertList TbsCertList,
+ * signatureAlgorithm AlgorithmIdentifier,
+ * signatureValue BIT STRING }
+ *
+ */
+ public class CertificateList
+ : Asn1Encodable
+ {
+ private readonly TbsCertificateList tbsCertList;
+ private readonly AlgorithmIdentifier sigAlgID;
+ private readonly DerBitString sig;
+
+ public static CertificateList GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static CertificateList GetInstance(
+ object obj)
+ {
+ if (obj is CertificateList)
+ return (CertificateList) obj;
+
+ if (obj != null)
+ return new CertificateList(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ private CertificateList(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 3)
+ throw new ArgumentException("sequence wrong size for CertificateList", "seq");
+
+ tbsCertList = TbsCertificateList.GetInstance(seq[0]);
+ sigAlgID = AlgorithmIdentifier.GetInstance(seq[1]);
+ sig = DerBitString.GetInstance(seq[2]);
+ }
+
+ public TbsCertificateList TbsCertList
+ {
+ get { return tbsCertList; }
+ }
+
+ public CrlEntry[] GetRevokedCertificates()
+ {
+ return tbsCertList.GetRevokedCertificates();
+ }
+
+ public IEnumerable GetRevokedCertificateEnumeration()
+ {
+ return tbsCertList.GetRevokedCertificateEnumeration();
+ }
+
+ public AlgorithmIdentifier SignatureAlgorithm
+ {
+ get { return sigAlgID; }
+ }
+
+ public DerBitString Signature
+ {
+ get { return sig; }
+ }
+
+ public byte[] GetSignatureOctets()
+ {
+ return sig.GetOctets();
+ }
+
+ public int Version
+ {
+ get { return tbsCertList.Version; }
+ }
+
+ public X509Name Issuer
+ {
+ get { return tbsCertList.Issuer; }
+ }
+
+ public Time ThisUpdate
+ {
+ get { return tbsCertList.ThisUpdate; }
+ }
+
+ public Time NextUpdate
+ {
+ get { return tbsCertList.NextUpdate; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(tbsCertList, sigAlgID, sig);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificateList.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificateList.cs.meta
new file mode 100644
index 00000000..b3ae2fa0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificateList.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c53a73fa90f59cb42bab3d969bb427e5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePair.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePair.cs
new file mode 100644
index 00000000..2e3fc4d3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePair.cs
@@ -0,0 +1,157 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * This class helps to support crossCerfificatePairs in a LDAP directory
+ * according RFC 2587
+ *
+ *
+ * crossCertificatePairATTRIBUTE::={
+ * WITH SYNTAX CertificatePair
+ * EQUALITY MATCHING RULE certificatePairExactMatch
+ * ID joint-iso-ccitt(2) ds(5) attributeType(4) crossCertificatePair(40)}
+ *
+ *
+ * The forward elements of the crossCertificatePair attribute of a
+ * CA's directory entry shall be used to store all, except self-issued
+ * certificates issued to this CA. Optionally, the reverse elements of the
+ * crossCertificatePair attribute, of a CA's directory entry may contain a
+ * subset of certificates issued by this CA to other CAs. When both the forward
+ * and the reverse elements are present in a single attribute value, issuer name
+ * in one certificate shall match the subject name in the other and vice versa,
+ * and the subject public key in one certificate shall be capable of verifying
+ * the digital signature on the other certificate and vice versa.
+ *
+ * When a reverse element is present, the forward element value and the reverse
+ * element value need not be stored in the same attribute value; in other words,
+ * they can be stored in either a single attribute value or two attribute
+ * values.
+ *
+ *
+ * CertificatePair ::= SEQUENCE {
+ * forward [0] Certificate OPTIONAL,
+ * reverse [1] Certificate OPTIONAL,
+ * -- at least one of the pair shall be present -- }
+ *
+ */
+ public class CertificatePair
+ : Asn1Encodable
+ {
+ private X509CertificateStructure forward, reverse;
+
+ public static CertificatePair GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is CertificatePair)
+ {
+ return (CertificatePair) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new CertificatePair((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * The sequence is of type CertificatePair:
+ *
+ *
+ * CertificatePair ::= SEQUENCE {
+ * forward [0] Certificate OPTIONAL,
+ * reverse [1] Certificate OPTIONAL,
+ * -- at least one of the pair shall be present -- }
+ *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private CertificatePair(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 1 && seq.Count != 2)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+ }
+
+ foreach (object obj in seq)
+ {
+ Asn1TaggedObject o = Asn1TaggedObject.GetInstance(obj);
+ if (o.TagNo == 0)
+ {
+ forward = X509CertificateStructure.GetInstance(o, true);
+ }
+ else if (o.TagNo == 1)
+ {
+ reverse = X509CertificateStructure.GetInstance(o, true);
+ }
+ else
+ {
+ throw new ArgumentException("Bad tag number: " + o.TagNo);
+ }
+ }
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * @param forward Certificates issued to this CA.
+ * @param reverse Certificates issued by this CA to other CAs.
+ */
+ public CertificatePair(
+ X509CertificateStructure forward,
+ X509CertificateStructure reverse)
+ {
+ this.forward = forward;
+ this.reverse = reverse;
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * CertificatePair ::= SEQUENCE {
+ * forward [0] Certificate OPTIONAL,
+ * reverse [1] Certificate OPTIONAL,
+ * -- at least one of the pair shall be present -- }
+ *
+ *
+ * @return a DERObject
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, forward);
+ v.AddOptionalTagged(true, 1, reverse);
+ return new DerSequence(v);
+ }
+
+ /**
+ * @return Returns the forward.
+ */
+ public X509CertificateStructure Forward
+ {
+ get { return forward; }
+ }
+
+ /**
+ * @return Returns the reverse.
+ */
+ public X509CertificateStructure Reverse
+ {
+ get { return reverse; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePair.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePair.cs.meta
new file mode 100644
index 00000000..34c08ac8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePair.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2f3cfe718f865494c83c11c3102faa73
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePolicies.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePolicies.cs
new file mode 100644
index 00000000..7306f82e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePolicies.cs
@@ -0,0 +1,109 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class CertificatePolicies
+ : Asn1Encodable
+ {
+ private static PolicyInformation[] Copy(PolicyInformation[] policyInfo)
+ {
+ return (PolicyInformation[])policyInfo.Clone();
+ }
+
+ public static CertificatePolicies GetInstance(object obj)
+ {
+ if (obj is CertificatePolicies)
+ return (CertificatePolicies)obj;
+ if (obj == null)
+ return null;
+ return new CertificatePolicies(Asn1Sequence.GetInstance(obj));
+ }
+
+ public static CertificatePolicies GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ public static CertificatePolicies FromExtensions(X509Extensions extensions)
+ {
+ return GetInstance(X509Extensions.GetExtensionParsedValue(extensions, X509Extensions.CertificatePolicies));
+ }
+
+ private readonly PolicyInformation[] policyInformation;
+
+ /**
+ * Construct a CertificatePolicies object containing one PolicyInformation.
+ *
+ * @param name the name to be contained.
+ */
+ public CertificatePolicies(PolicyInformation name)
+ {
+ this.policyInformation = new PolicyInformation[] { name };
+ }
+
+ public CertificatePolicies(PolicyInformation[] policyInformation)
+ {
+ this.policyInformation = Copy(policyInformation);
+ }
+
+ private CertificatePolicies(Asn1Sequence seq)
+ {
+ this.policyInformation = new PolicyInformation[seq.Count];
+
+ for (int i = 0; i < seq.Count; ++i)
+ {
+ policyInformation[i] = PolicyInformation.GetInstance(seq[i]);
+ }
+ }
+
+ public virtual PolicyInformation[] GetPolicyInformation()
+ {
+ return Copy(policyInformation);
+ }
+
+ public virtual PolicyInformation GetPolicyInformation(DerObjectIdentifier policyIdentifier)
+ {
+ for (int i = 0; i != policyInformation.Length; i++)
+ {
+ if (policyIdentifier.Equals(policyInformation[i].PolicyIdentifier))
+ {
+ return policyInformation[i];
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Produce an object suitable for an ASN1OutputStream.
+ *
+ * CertificatePolicies ::= SEQUENCE SIZE {1..MAX} OF PolicyInformation
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(policyInformation);
+ }
+
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder("CertificatePolicies:");
+ if (policyInformation != null && policyInformation.Length > 0)
+ {
+ sb.Append(' ');
+ sb.Append(policyInformation[0]);
+ for (int i = 1; i < policyInformation.Length; ++i)
+ {
+ sb.Append(", ");
+ sb.Append(policyInformation[i]);
+ }
+ }
+ return sb.ToString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePolicies.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePolicies.cs.meta
new file mode 100644
index 00000000..e8c89bad
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/CertificatePolicies.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ba4f8c889517a9f479e56b776d1a1d91
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DSAParameter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DSAParameter.cs
new file mode 100644
index 00000000..66e3ffa7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DSAParameter.cs
@@ -0,0 +1,81 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class DsaParameter
+ : Asn1Encodable
+ {
+ internal readonly DerInteger p, q, g;
+
+ public static DsaParameter GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static DsaParameter GetInstance(
+ object obj)
+ {
+ if(obj == null || obj is DsaParameter)
+ {
+ return (DsaParameter) obj;
+ }
+
+ if(obj is Asn1Sequence)
+ {
+ return new DsaParameter((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Invalid DsaParameter: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public DsaParameter(
+ BigInteger p,
+ BigInteger q,
+ BigInteger g)
+ {
+ this.p = new DerInteger(p);
+ this.q = new DerInteger(q);
+ this.g = new DerInteger(g);
+ }
+
+ private DsaParameter(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.p = DerInteger.GetInstance(seq[0]);
+ this.q = DerInteger.GetInstance(seq[1]);
+ this.g = DerInteger.GetInstance(seq[2]);
+ }
+
+ public BigInteger P
+ {
+ get { return p.PositiveValue; }
+ }
+
+ public BigInteger Q
+ {
+ get { return q.PositiveValue; }
+ }
+
+ public BigInteger G
+ {
+ get { return g.PositiveValue; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(p, q, g);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DSAParameter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DSAParameter.cs.meta
new file mode 100644
index 00000000..688cbd27
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DSAParameter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0df53db1cbafa134987d7c3f98d2eac1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DigestInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DigestInfo.cs
new file mode 100644
index 00000000..1c699f41
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DigestInfo.cs
@@ -0,0 +1,81 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The DigestInfo object.
+ *
+ * DigestInfo::=Sequence{
+ * digestAlgorithm AlgorithmIdentifier,
+ * digest OCTET STRING }
+ *
+ */
+ public class DigestInfo
+ : Asn1Encodable
+ {
+ private readonly byte[] digest;
+ private readonly AlgorithmIdentifier algID;
+
+ public static DigestInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static DigestInfo GetInstance(
+ object obj)
+ {
+ if (obj is DigestInfo)
+ {
+ return (DigestInfo) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new DigestInfo((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public DigestInfo(
+ AlgorithmIdentifier algID,
+ byte[] digest)
+ {
+ this.digest = digest;
+ this.algID = algID;
+ }
+
+ private DigestInfo(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Wrong number of elements in sequence", "seq");
+
+ algID = AlgorithmIdentifier.GetInstance(seq[0]);
+ digest = Asn1OctetString.GetInstance(seq[1]).GetOctets();
+ }
+
+ public AlgorithmIdentifier AlgorithmID
+ {
+ get { return algID; }
+ }
+
+ public byte[] GetDigest()
+ {
+ return digest;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(algID, new DerOctetString(digest));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DigestInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DigestInfo.cs.meta
new file mode 100644
index 00000000..af8217d6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DigestInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 689c30e3590b6d140b51038ff73c8c69
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DisplayText.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DisplayText.cs
new file mode 100644
index 00000000..607af44d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DisplayText.cs
@@ -0,0 +1,178 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * DisplayText class, used in
+ * CertificatePolicies X509 V3 extensions (in policy qualifiers).
+ *
+ * It stores a string in a chosen encoding.
+ *
+ * DisplayText ::= CHOICE {
+ * ia5String IA5String (SIZE (1..200)),
+ * visibleString VisibleString (SIZE (1..200)),
+ * bmpString BMPString (SIZE (1..200)),
+ * utf8String UTF8String (SIZE (1..200)) }
+ *
+ * @see PolicyQualifierInfo
+ * @see PolicyInformation
+ */
+ public class DisplayText
+ : Asn1Encodable, IAsn1Choice
+ {
+ /**
+ * Constant corresponding to ia5String encoding.
+ *
+ */
+ public const int ContentTypeIA5String = 0;
+ /**
+ * Constant corresponding to bmpString encoding.
+ *
+ */
+ public const int ContentTypeBmpString = 1;
+ /**
+ * Constant corresponding to utf8String encoding.
+ *
+ */
+ public const int ContentTypeUtf8String = 2;
+ /**
+ * Constant corresponding to visibleString encoding.
+ *
+ */
+ public const int ContentTypeVisibleString = 3;
+ /**
+ * Describe constant DisplayTextMaximumSize here.
+ *
+ */
+ public const int DisplayTextMaximumSize = 200;
+
+ internal readonly int contentType;
+ internal readonly IAsn1String contents;
+
+ /**
+ * Creates a new DisplayText instance.
+ *
+ * @param type the desired encoding type for the text.
+ * @param text the text to store. Strings longer than 200
+ * characters are truncated.
+ */
+ public DisplayText(
+ int type,
+ string text)
+ {
+ if (text.Length > DisplayTextMaximumSize)
+ {
+ // RFC3280 limits these strings to 200 chars
+ // truncate the string
+ text = text.Substring(0, DisplayTextMaximumSize);
+ }
+
+ contentType = type;
+ switch (type)
+ {
+ case ContentTypeIA5String:
+ contents = (IAsn1String)new DerIA5String (text);
+ break;
+ case ContentTypeUtf8String:
+ contents = (IAsn1String)new DerUtf8String(text);
+ break;
+ case ContentTypeVisibleString:
+ contents = (IAsn1String)new DerVisibleString(text);
+ break;
+ case ContentTypeBmpString:
+ contents = (IAsn1String)new DerBmpString(text);
+ break;
+ default:
+ contents = (IAsn1String)new DerUtf8String(text);
+ break;
+ }
+ }
+
+// /**
+// * return true if the passed in string can be represented without
+// * loss as a PrintableString, false otherwise.
+// */
+// private bool CanBePrintable(
+// string str)
+// {
+// for (int i = str.Length - 1; i >= 0; i--)
+// {
+// if (str[i] > 0x007f)
+// {
+// return false;
+// }
+// }
+//
+// return true;
+// }
+
+ /**
+ * Creates a new DisplayText instance.
+ *
+ * @param text the text to encapsulate. Strings longer than 200
+ * characters are truncated.
+ */
+ public DisplayText(
+ string text)
+ {
+ // by default use UTF8String
+ if (text.Length > DisplayTextMaximumSize)
+ {
+ text = text.Substring(0, DisplayTextMaximumSize);
+ }
+
+ contentType = ContentTypeUtf8String;
+ contents = new DerUtf8String(text);
+ }
+
+ /**
+ * Creates a new DisplayText instance.
+ * Useful when reading back a DisplayText class
+ * from it's Asn1Encodable form.
+ *
+ * @param contents an Asn1Encodable instance.
+ */
+ public DisplayText(
+ IAsn1String contents)
+ {
+ this.contents = contents;
+ }
+
+ public static DisplayText GetInstance(
+ object obj)
+ {
+ if (obj is IAsn1String)
+ {
+ return new DisplayText((IAsn1String) obj);
+ }
+
+ if (obj is DisplayText)
+ {
+ return (DisplayText) obj;
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return (Asn1Object) contents;
+ }
+
+ /**
+ * Returns the stored string object.
+ *
+ * @return the stored text as a string.
+ */
+ public string GetString()
+ {
+ return contents.GetString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DisplayText.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DisplayText.cs.meta
new file mode 100644
index 00000000..99eec415
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DisplayText.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 344ca49bedc8874459e689116ee08f35
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPoint.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPoint.cs
new file mode 100644
index 00000000..cbc84268
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPoint.cs
@@ -0,0 +1,143 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The DistributionPoint object.
+ *
+ * DistributionPoint ::= Sequence {
+ * distributionPoint [0] DistributionPointName OPTIONAL,
+ * reasons [1] ReasonFlags OPTIONAL,
+ * cRLIssuer [2] GeneralNames OPTIONAL
+ * }
+ *
+ */
+ public class DistributionPoint
+ : Asn1Encodable
+ {
+ internal readonly DistributionPointName distributionPoint;
+ internal readonly ReasonFlags reasons;
+ internal readonly GeneralNames cRLIssuer;
+
+ public static DistributionPoint GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static DistributionPoint GetInstance(
+ object obj)
+ {
+ if(obj == null || obj is DistributionPoint)
+ {
+ return (DistributionPoint) obj;
+ }
+
+ if(obj is Asn1Sequence)
+ {
+ return new DistributionPoint((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Invalid DistributionPoint: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ private DistributionPoint(
+ Asn1Sequence seq)
+ {
+ for (int i = 0; i != seq.Count; i++)
+ {
+ Asn1TaggedObject t = Asn1TaggedObject.GetInstance(seq[i]);
+
+ switch (t.TagNo)
+ {
+ case 0:
+ distributionPoint = DistributionPointName.GetInstance(t, true);
+ break;
+ case 1:
+ reasons = new ReasonFlags(DerBitString.GetInstance(t, false));
+ break;
+ case 2:
+ cRLIssuer = GeneralNames.GetInstance(t, false);
+ break;
+ }
+ }
+ }
+
+ public DistributionPoint(
+ DistributionPointName distributionPointName,
+ ReasonFlags reasons,
+ GeneralNames crlIssuer)
+ {
+ this.distributionPoint = distributionPointName;
+ this.reasons = reasons;
+ this.cRLIssuer = crlIssuer;
+ }
+
+ public DistributionPointName DistributionPointName
+ {
+ get { return distributionPoint; }
+ }
+
+ public ReasonFlags Reasons
+ {
+ get { return reasons; }
+ }
+
+ public GeneralNames CrlIssuer
+ {
+ get { return cRLIssuer; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ // As this is a CHOICE it must be explicitly tagged
+ v.AddOptionalTagged(true, 0, distributionPoint);
+
+ v.AddOptionalTagged(false, 1, reasons);
+ v.AddOptionalTagged(false, 2, cRLIssuer);
+ return new DerSequence(v);
+ }
+
+ public override string ToString()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.AppendLine("DistributionPoint: [");
+ if (distributionPoint != null)
+ {
+ AppendObject(buf, "distributionPoint", distributionPoint.ToString());
+ }
+ if (reasons != null)
+ {
+ AppendObject(buf, "reasons", reasons.ToString());
+ }
+ if (cRLIssuer != null)
+ {
+ AppendObject(buf, "cRLIssuer", cRLIssuer.ToString());
+ }
+ buf.AppendLine("]");
+ return buf.ToString();
+ }
+
+ private void AppendObject(StringBuilder buf, string name, string val)
+ {
+ string indent = " ";
+ buf.Append(indent);
+ buf.Append(name);
+ buf.AppendLine(":");
+ buf.Append(indent);
+ buf.Append(indent);
+ buf.Append(val);
+ buf.AppendLine();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPoint.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPoint.cs.meta
new file mode 100644
index 00000000..0eee0215
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPoint.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e885999cc3e152947ab893f8f57a8e0f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPointName.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPointName.cs
new file mode 100644
index 00000000..b915a479
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPointName.cs
@@ -0,0 +1,125 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The DistributionPointName object.
+ *
+ * DistributionPointName ::= CHOICE {
+ * fullName [0] GeneralNames,
+ * nameRelativeToCRLIssuer [1] RDN
+ * }
+ *
+ */
+ public class DistributionPointName
+ : Asn1Encodable, IAsn1Choice
+ {
+ internal readonly Asn1Encodable name;
+ internal readonly int type;
+
+ public const int FullName = 0;
+ public const int NameRelativeToCrlIssuer = 1;
+
+ public static DistributionPointName GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1TaggedObject.GetInstance(obj, true));
+ }
+
+ public static DistributionPointName GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is DistributionPointName)
+ {
+ return (DistributionPointName) obj;
+ }
+
+ if (obj is Asn1TaggedObject)
+ {
+ return new DistributionPointName((Asn1TaggedObject) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public DistributionPointName(
+ int type,
+ Asn1Encodable name)
+ {
+ this.type = type;
+ this.name = name;
+ }
+
+ public DistributionPointName(
+ GeneralNames name)
+ : this(FullName, name)
+ {
+ }
+
+ public int PointType
+ {
+ get { return type; }
+ }
+
+ public Asn1Encodable Name
+ {
+ get { return name; }
+ }
+
+ public DistributionPointName(
+ Asn1TaggedObject obj)
+ {
+ this.type = obj.TagNo;
+
+ if (type == FullName)
+ {
+ this.name = GeneralNames.GetInstance(obj, false);
+ }
+ else
+ {
+ this.name = Asn1Set.GetInstance(obj, false);
+ }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerTaggedObject(false, type, name);
+ }
+
+ public override string ToString()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.AppendLine("DistributionPointName: [");
+ if (type == FullName)
+ {
+ AppendObject(buf, "fullName", name.ToString());
+ }
+ else
+ {
+ AppendObject(buf, "nameRelativeToCRLIssuer", name.ToString());
+ }
+ buf.AppendLine("]");
+ return buf.ToString();
+ }
+
+ private void AppendObject(StringBuilder buf, string name, string val)
+ {
+ string indent = " ";
+ buf.Append(indent);
+ buf.Append(name);
+ buf.AppendLine(":");
+ buf.Append(indent);
+ buf.Append(indent);
+ buf.Append(val);
+ buf.AppendLine();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPointName.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPointName.cs.meta
new file mode 100644
index 00000000..0a1ed999
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/DistributionPointName.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f9c30e3e050194f438209cb9f2513aef
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ExtendedKeyUsage.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ExtendedKeyUsage.cs
new file mode 100644
index 00000000..a287fccd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ExtendedKeyUsage.cs
@@ -0,0 +1,110 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The extendedKeyUsage object.
+ *
+ * extendedKeyUsage ::= Sequence SIZE (1..MAX) OF KeyPurposeId
+ *
+ */
+ public class ExtendedKeyUsage
+ : Asn1Encodable
+ {
+ public static ExtendedKeyUsage GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static ExtendedKeyUsage GetInstance(
+ object obj)
+ {
+ if (obj is ExtendedKeyUsage)
+ return (ExtendedKeyUsage)obj;
+ if (obj is X509Extension)
+ return GetInstance(X509Extension.ConvertValueToObject((X509Extension)obj));
+ if (obj == null)
+ return null;
+ return new ExtendedKeyUsage(Asn1Sequence.GetInstance(obj));
+ }
+
+ public static ExtendedKeyUsage FromExtensions(X509Extensions extensions)
+ {
+ return GetInstance(X509Extensions.GetExtensionParsedValue(extensions, X509Extensions.ExtendedKeyUsage));
+ }
+
+ internal readonly ISet m_usageTable = new HashSet();
+ internal readonly Asn1Sequence seq;
+
+ private ExtendedKeyUsage(Asn1Sequence seq)
+ {
+ this.seq = seq;
+
+ foreach (Asn1Encodable element in seq)
+ {
+ DerObjectIdentifier oid = DerObjectIdentifier.GetInstance(element);
+
+ m_usageTable.Add(oid);
+ }
+ }
+
+ public ExtendedKeyUsage(params KeyPurposeID[] usages)
+ {
+ this.seq = new DerSequence(usages);
+
+ foreach (KeyPurposeID usage in usages)
+ {
+ m_usageTable.Add(usage);
+ }
+ }
+
+ public ExtendedKeyUsage(IEnumerable usages)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ foreach (object usage in usages)
+ {
+ DerObjectIdentifier oid = DerObjectIdentifier.GetInstance(usage);
+
+ v.Add(oid);
+ m_usageTable.Add(oid);
+ }
+
+ this.seq = new DerSequence(v);
+ }
+
+ public bool HasKeyPurposeId(KeyPurposeID keyPurposeId)
+ {
+ return m_usageTable.Contains(keyPurposeId);
+ }
+
+ /**
+ * Returns all extended key usages.
+ * The returned ArrayList contains DerObjectIdentifier instances.
+ * @return An ArrayList with all key purposes.
+ */
+ public IList GetAllUsages()
+ {
+ return new List(m_usageTable);
+ }
+
+ public int Count
+ {
+ get { return m_usageTable.Count; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return seq;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ExtendedKeyUsage.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ExtendedKeyUsage.cs.meta
new file mode 100644
index 00000000..d6e6acdd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ExtendedKeyUsage.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e1913c7df77aefb428f36b84750ec38d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralName.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralName.cs
new file mode 100644
index 00000000..8974ac84
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralName.cs
@@ -0,0 +1,427 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using NetUtils = Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Net;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The GeneralName object.
+ *
+ * GeneralName ::= CHOICE {
+ * otherName [0] OtherName,
+ * rfc822Name [1] IA5String,
+ * dNSName [2] IA5String,
+ * x400Address [3] ORAddress,
+ * directoryName [4] Name,
+ * ediPartyName [5] EDIPartyName,
+ * uniformResourceIdentifier [6] IA5String,
+ * iPAddress [7] OCTET STRING,
+ * registeredID [8] OBJECT IDENTIFIER}
+ *
+ * OtherName ::= Sequence {
+ * type-id OBJECT IDENTIFIER,
+ * value [0] EXPLICIT ANY DEFINED BY type-id }
+ *
+ * EDIPartyName ::= Sequence {
+ * nameAssigner [0] DirectoryString OPTIONAL,
+ * partyName [1] DirectoryString }
+ *
+ */
+ public class GeneralName
+ : Asn1Encodable, IAsn1Choice
+ {
+ public const int OtherName = 0;
+ public const int Rfc822Name = 1;
+ public const int DnsName = 2;
+ public const int X400Address = 3;
+ public const int DirectoryName = 4;
+ public const int EdiPartyName = 5;
+ public const int UniformResourceIdentifier = 6;
+ public const int IPAddress = 7;
+ public const int RegisteredID = 8;
+
+ internal readonly Asn1Encodable obj;
+ internal readonly int tag;
+
+ public GeneralName(
+ X509Name directoryName)
+ {
+ this.obj = directoryName;
+ this.tag = 4;
+ }
+
+ /**
+ * When the subjectAltName extension contains an Internet mail address,
+ * the address MUST be included as an rfc822Name. The format of an
+ * rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822].
+ *
+ * When the subjectAltName extension contains a domain name service
+ * label, the domain name MUST be stored in the dNSName (an IA5String).
+ * The name MUST be in the "preferred name syntax," as specified by RFC
+ * 1034 [RFC 1034].
+ *
+ * When the subjectAltName extension contains a URI, the name MUST be
+ * stored in the uniformResourceIdentifier (an IA5String). The name MUST
+ * be a non-relative URL, and MUST follow the URL syntax and encoding
+ * rules specified in [RFC 1738]. The name must include both a scheme
+ * (e.g., "http" or "ftp") and a scheme-specific-part. The scheme-
+ * specific-part must include a fully qualified domain name or IP
+ * address as the host.
+ *
+ * When the subjectAltName extension contains a iPAddress, the address
+ * MUST be stored in the octet string in "network byte order," as
+ * specified in RFC 791 [RFC 791]. The least significant bit (LSB) of
+ * each octet is the LSB of the corresponding byte in the network
+ * address. For IP Version 4, as specified in RFC 791, the octet string
+ * MUST contain exactly four octets. For IP Version 6, as specified in
+ * RFC 1883, the octet string MUST contain exactly sixteen octets [RFC
+ * 1883].
+ */
+ public GeneralName(
+ Asn1Object name,
+ int tag)
+ {
+ this.obj = name;
+ this.tag = tag;
+ }
+
+ public GeneralName(
+ int tag,
+ Asn1Encodable name)
+ {
+ this.obj = name;
+ this.tag = tag;
+ }
+
+ /**
+ * Create a GeneralName for the given tag from the passed in string.
+ *
+ * This constructor can handle:
+ *
+ * rfc822Name
+ * iPAddress
+ * directoryName
+ * dNSName
+ * uniformResourceIdentifier
+ * registeredID
+ *
+ * For x400Address, otherName and ediPartyName there is no common string
+ * format defined.
+ *
+ * Note: A directory name can be encoded in different ways into a byte
+ * representation. Be aware of this if the byte representation is used for
+ * comparing results.
+ *
+ *
+ * @param tag tag number
+ * @param name string representation of name
+ * @throws ArgumentException if the string encoding is not correct or
+ * not supported.
+ */
+ public GeneralName(
+ int tag,
+ string name)
+ {
+ this.tag = tag;
+
+ if (tag == Rfc822Name || tag == DnsName || tag == UniformResourceIdentifier)
+ {
+ this.obj = new DerIA5String(name);
+ }
+ else if (tag == RegisteredID)
+ {
+ this.obj = new DerObjectIdentifier(name);
+ }
+ else if (tag == DirectoryName)
+ {
+ this.obj = new X509Name(name);
+ }
+ else if (tag == IPAddress)
+ {
+ byte[] enc = toGeneralNameEncoding(name);
+ if (enc == null)
+ throw new ArgumentException("IP Address is invalid", "name");
+
+ this.obj = new DerOctetString(enc);
+ }
+ else
+ {
+ throw new ArgumentException("can't process string for tag: " + tag, "tag");
+ }
+ }
+
+ public static GeneralName GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is GeneralName)
+ {
+ return (GeneralName) obj;
+ }
+
+ if (obj is Asn1TaggedObject)
+ {
+ Asn1TaggedObject tagObj = (Asn1TaggedObject) obj;
+ int tag = tagObj.TagNo;
+
+ switch (tag)
+ {
+ case EdiPartyName:
+ case OtherName:
+ case X400Address:
+ return new GeneralName(tag, Asn1Sequence.GetInstance(tagObj, false));
+
+ case DnsName:
+ case Rfc822Name:
+ case UniformResourceIdentifier:
+ return new GeneralName(tag, DerIA5String.GetInstance(tagObj, false));
+
+ case DirectoryName:
+ return new GeneralName(tag, X509Name.GetInstance(tagObj, true));
+ case IPAddress:
+ return new GeneralName(tag, Asn1OctetString.GetInstance(tagObj, false));
+ case RegisteredID:
+ return new GeneralName(tag, DerObjectIdentifier.GetInstance(tagObj, false));
+
+ default:
+ throw new ArgumentException("unknown tag: " + tag);
+ }
+ }
+
+ if (obj is byte[])
+ {
+ try
+ {
+ return GetInstance(Asn1Object.FromByteArray((byte[])obj));
+ }
+ catch (IOException)
+ {
+ throw new ArgumentException("unable to parse encoded general name");
+ }
+ }
+
+ throw new ArgumentException("unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static GeneralName GetInstance(
+ Asn1TaggedObject tagObj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1TaggedObject.GetInstance(tagObj, true));
+ }
+
+ public int TagNo
+ {
+ get { return tag; }
+ }
+
+ public Asn1Encodable Name
+ {
+ get { return obj; }
+ }
+
+ public override string ToString()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.Append(tag);
+ buf.Append(": ");
+
+ switch (tag)
+ {
+ case Rfc822Name:
+ case DnsName:
+ case UniformResourceIdentifier:
+ buf.Append(DerIA5String.GetInstance(obj).GetString());
+ break;
+ case DirectoryName:
+ buf.Append(X509Name.GetInstance(obj).ToString());
+ break;
+ default:
+ buf.Append(obj.ToString());
+ break;
+ }
+
+ return buf.ToString();
+ }
+
+ private byte[] toGeneralNameEncoding(
+ string ip)
+ {
+ if (NetUtils.IPAddress.IsValidIPv6WithNetmask(ip) || NetUtils.IPAddress.IsValidIPv6(ip))
+ {
+ int slashIndex = ip.IndexOf('/');
+
+ if (slashIndex < 0)
+ {
+ byte[] addr = new byte[16];
+ int[] parsedIp = parseIPv6(ip);
+ copyInts(parsedIp, addr, 0);
+
+ return addr;
+ }
+ else
+ {
+ byte[] addr = new byte[32];
+ int[] parsedIp = parseIPv6(ip.Substring(0, slashIndex));
+ copyInts(parsedIp, addr, 0);
+ string mask = ip.Substring(slashIndex + 1);
+ if (mask.IndexOf(':') > 0)
+ {
+ parsedIp = parseIPv6(mask);
+ }
+ else
+ {
+ parsedIp = parseMask(mask);
+ }
+ copyInts(parsedIp, addr, 16);
+
+ return addr;
+ }
+ }
+ else if (NetUtils.IPAddress.IsValidIPv4WithNetmask(ip) || NetUtils.IPAddress.IsValidIPv4(ip))
+ {
+ int slashIndex = ip.IndexOf('/');
+
+ if (slashIndex < 0)
+ {
+ byte[] addr = new byte[4];
+
+ parseIPv4(ip, addr, 0);
+
+ return addr;
+ }
+ else
+ {
+ byte[] addr = new byte[8];
+
+ parseIPv4(ip.Substring(0, slashIndex), addr, 0);
+
+ string mask = ip.Substring(slashIndex + 1);
+ if (mask.IndexOf('.') > 0)
+ {
+ parseIPv4(mask, addr, 4);
+ }
+ else
+ {
+ parseIPv4Mask(mask, addr, 4);
+ }
+
+ return addr;
+ }
+ }
+
+ return null;
+ }
+
+ private void parseIPv4Mask(string mask, byte[] addr, int offset)
+ {
+ int maskVal = int.Parse(mask);
+
+ for (int i = 0; i != maskVal; i++)
+ {
+ addr[(i / 8) + offset] |= (byte)(1 << (i % 8));
+ }
+ }
+
+ private void parseIPv4(string ip, byte[] addr, int offset)
+ {
+ foreach (string token in ip.Split('.', '/'))
+ {
+ addr[offset++] = (byte)int.Parse(token);
+ }
+ }
+
+ private int[] parseMask(string mask)
+ {
+ int[] res = new int[8];
+ int maskVal = int.Parse(mask);
+
+ for (int i = 0; i != maskVal; i++)
+ {
+ res[i / 16] |= 1 << (i % 16);
+ }
+ return res;
+ }
+
+ private void copyInts(int[] parsedIp, byte[] addr, int offSet)
+ {
+ for (int i = 0; i != parsedIp.Length; i++)
+ {
+ addr[(i * 2) + offSet] = (byte)(parsedIp[i] >> 8);
+ addr[(i * 2 + 1) + offSet] = (byte)parsedIp[i];
+ }
+ }
+
+ private int[] parseIPv6(string ip)
+ {
+ if (Org.BouncyCastle.Utilities.Platform.StartsWith(ip, "::"))
+ {
+ ip = ip.Substring(1);
+ }
+ else if (Org.BouncyCastle.Utilities.Platform.EndsWith(ip, "::"))
+ {
+ ip = ip.Substring(0, ip.Length - 1);
+ }
+
+ IEnumerable split = ip.Split(':');
+ var sEnum = split.GetEnumerator();
+
+ int index = 0;
+ int[] val = new int[8];
+
+ int doubleColon = -1;
+
+ while (sEnum.MoveNext())
+ {
+ string e = sEnum.Current;
+
+ if (e.Length == 0)
+ {
+ doubleColon = index;
+ val[index++] = 0;
+ }
+ else
+ {
+ if (e.IndexOf('.') < 0)
+ {
+ val[index++] = int.Parse(e, NumberStyles.AllowHexSpecifier);
+ }
+ else
+ {
+ string[] tokens = e.Split('.');
+
+ val[index++] = (int.Parse(tokens[0]) << 8) | int.Parse(tokens[1]);
+ val[index++] = (int.Parse(tokens[2]) << 8) | int.Parse(tokens[3]);
+ }
+ }
+ }
+
+ if (index != val.Length)
+ {
+ Array.Copy(val, doubleColon, val, val.Length - (index - doubleColon), index - doubleColon);
+ for (int i = doubleColon; i != val.Length - (index - doubleColon); i++)
+ {
+ val[i] = 0;
+ }
+ }
+
+ return val;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ // directoryName is explicitly tagged as it is a CHOICE
+ bool isExplicit = (tag == DirectoryName);
+
+ return new DerTaggedObject(isExplicit, tag, obj);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralName.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralName.cs.meta
new file mode 100644
index 00000000..70fa89fb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralName.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f4b6d66f1447ffc478cc6d4c16a67b06
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralNames.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralNames.cs
new file mode 100644
index 00000000..3535b29e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralNames.cs
@@ -0,0 +1,95 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class GeneralNames
+ : Asn1Encodable
+ {
+ private static GeneralName[] Copy(GeneralName[] names)
+ {
+ return (GeneralName[])names.Clone();
+ }
+
+ public static GeneralNames GetInstance(object obj)
+ {
+ if (obj is GeneralNames)
+ return (GeneralNames)obj;
+ if (obj == null)
+ return null;
+ return new GeneralNames(Asn1Sequence.GetInstance(obj));
+ }
+
+ public static GeneralNames GetInstance(Asn1TaggedObject obj, bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static GeneralNames FromExtensions(X509Extensions extensions, DerObjectIdentifier extOid)
+ {
+ return GetInstance(X509Extensions.GetExtensionParsedValue(extensions, extOid));
+ }
+
+ private readonly GeneralName[] names;
+
+ /// Construct a GeneralNames object containing one GeneralName.
+ /// The name to be contained.
+ public GeneralNames(
+ GeneralName name)
+ {
+ names = new GeneralName[]{ name };
+ }
+
+ public GeneralNames(
+ GeneralName[] names)
+ {
+ this.names = Copy(names);
+ }
+
+ private GeneralNames(
+ Asn1Sequence seq)
+ {
+ this.names = new GeneralName[seq.Count];
+
+ for (int i = 0; i != seq.Count; i++)
+ {
+ names[i] = GeneralName.GetInstance(seq[i]);
+ }
+ }
+
+ public GeneralName[] GetNames()
+ {
+ return Copy(names);
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * GeneralNames ::= Sequence SIZE {1..MAX} OF GeneralName
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(names);
+ }
+
+ public override string ToString()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.AppendLine("GeneralNames:");
+ foreach (GeneralName name in names)
+ {
+ buf.Append(" ")
+ .Append(name)
+ .AppendLine();
+ }
+ return buf.ToString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralNames.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralNames.cs.meta
new file mode 100644
index 00000000..9ecc6d75
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralNames.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 62b8cbb97ae194e4d95690a4f7e9d87d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralSubtree.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralSubtree.cs
new file mode 100644
index 00000000..4f2eeac6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralSubtree.cs
@@ -0,0 +1,189 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Class for containing a restriction object subtrees in NameConstraints. See
+ * RFC 3280.
+ *
+ *
+ *
+ * GeneralSubtree ::= SEQUENCE
+ * {
+ * baseName GeneralName,
+ * minimum [0] BaseDistance DEFAULT 0,
+ * maximum [1] BaseDistance OPTIONAL
+ * }
+ *
+ *
+ * @see org.bouncycastle.asn1.x509.NameConstraints
+ *
+ */
+ public class GeneralSubtree
+ : Asn1Encodable
+ {
+ private readonly GeneralName baseName;
+ private readonly DerInteger minimum;
+ private readonly DerInteger maximum;
+
+ private GeneralSubtree(
+ Asn1Sequence seq)
+ {
+ baseName = GeneralName.GetInstance(seq[0]);
+
+ switch (seq.Count)
+ {
+ case 1:
+ break;
+ case 2:
+ {
+ Asn1TaggedObject o = Asn1TaggedObject.GetInstance(seq[1]);
+ switch (o.TagNo)
+ {
+ case 0:
+ minimum = DerInteger.GetInstance(o, false);
+ break;
+ case 1:
+ maximum = DerInteger.GetInstance(o, false);
+ break;
+ default:
+ throw new ArgumentException("Bad tag number: " + o.TagNo);
+ }
+ break;
+ }
+ case 3:
+ {
+ {
+ Asn1TaggedObject oMin = Asn1TaggedObject.GetInstance(seq[1]);
+ if (oMin.TagNo != 0)
+ throw new ArgumentException("Bad tag number for 'minimum': " + oMin.TagNo);
+ minimum = DerInteger.GetInstance(oMin, false);
+ }
+
+ {
+ Asn1TaggedObject oMax = Asn1TaggedObject.GetInstance(seq[2]);
+ if (oMax.TagNo != 1)
+ throw new ArgumentException("Bad tag number for 'maximum': " + oMax.TagNo);
+ maximum = DerInteger.GetInstance(oMax, false);
+ }
+
+ break;
+ }
+ default:
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * According RFC 3280, the minimum and maximum fields are not used with any
+ * name forms, thus minimum MUST be zero, and maximum MUST be absent.
+ *
+ * If minimum is null, zero is assumed, if
+ * maximum is null, maximum is absent.
+ *
+ * @param baseName
+ * A restriction.
+ * @param minimum
+ * Minimum
+ *
+ * @param maximum
+ * Maximum
+ */
+ public GeneralSubtree(
+ GeneralName baseName,
+ BigInteger minimum,
+ BigInteger maximum)
+ {
+ this.baseName = baseName;
+ if (minimum != null)
+ {
+ this.minimum = new DerInteger(minimum);
+ }
+ if (maximum != null)
+ {
+ this.maximum = new DerInteger(maximum);
+ }
+ }
+
+ public GeneralSubtree(
+ GeneralName baseName)
+ : this(baseName, null, null)
+ {
+ }
+
+ public static GeneralSubtree GetInstance(
+ Asn1TaggedObject o,
+ bool isExplicit)
+ {
+ return new GeneralSubtree(Asn1Sequence.GetInstance(o, isExplicit));
+ }
+
+ public static GeneralSubtree GetInstance(
+ object obj)
+ {
+ if (obj == null)
+ {
+ return null;
+ }
+
+ if (obj is GeneralSubtree)
+ {
+ return (GeneralSubtree) obj;
+ }
+
+ return new GeneralSubtree(Asn1Sequence.GetInstance(obj));
+ }
+
+ public GeneralName Base
+ {
+ get { return baseName; }
+ }
+
+ public BigInteger Minimum
+ {
+ get { return minimum == null ? BigInteger.Zero : minimum.Value; }
+ }
+
+ public BigInteger Maximum
+ {
+ get { return maximum == null ? null : maximum.Value; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * GeneralSubtree ::= SEQUENCE
+ * {
+ * baseName GeneralName,
+ * minimum [0] BaseDistance DEFAULT 0,
+ * maximum [1] BaseDistance OPTIONAL
+ * }
+ *
+ *
+ * @return a DERObject
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(baseName);
+
+ if (minimum != null && !minimum.HasValue(0))
+ {
+ v.Add(new DerTaggedObject(false, 0, minimum));
+ }
+
+ v.AddOptionalTagged(false, 1, maximum);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralSubtree.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralSubtree.cs.meta
new file mode 100644
index 00000000..872a4ad0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/GeneralSubtree.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 26ba6b294d0437245a0732c51a1ea924
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Holder.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Holder.cs
new file mode 100644
index 00000000..784b3dc0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Holder.cs
@@ -0,0 +1,250 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The Holder object.
+ *
+ * For an v2 attribute certificate this is:
+ *
+ *
+ * Holder ::= SEQUENCE {
+ * baseCertificateID [0] IssuerSerial OPTIONAL,
+ * -- the issuer and serial number of
+ * -- the holder's Public Key Certificate
+ * entityName [1] GeneralNames OPTIONAL,
+ * -- the name of the claimant or role
+ * objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ * -- used to directly authenticate the holder,
+ * -- for example, an executable
+ * }
+ *
+ *
+ *
+ * For an v1 attribute certificate this is:
+ *
+ *
+ * subject CHOICE {
+ * baseCertificateID [0] EXPLICIT IssuerSerial,
+ * -- associated with a Public Key Certificate
+ * subjectName [1] EXPLICIT GeneralNames },
+ * -- associated with a name
+ *
+ *
+ */
+ public class Holder
+ : Asn1Encodable
+ {
+ internal readonly IssuerSerial baseCertificateID;
+ internal readonly GeneralNames entityName;
+ internal readonly ObjectDigestInfo objectDigestInfo;
+ private readonly int version;
+
+ public static Holder GetInstance(
+ object obj)
+ {
+ if (obj is Holder)
+ {
+ return (Holder) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new Holder((Asn1Sequence) obj);
+ }
+
+ if (obj is Asn1TaggedObject)
+ {
+ return new Holder((Asn1TaggedObject) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor for a holder for an v1 attribute certificate.
+ *
+ * @param tagObj The ASN.1 tagged holder object.
+ */
+ public Holder(
+ Asn1TaggedObject tagObj)
+ {
+ switch (tagObj.TagNo)
+ {
+ case 0:
+ baseCertificateID = IssuerSerial.GetInstance(tagObj, true);
+ break;
+ case 1:
+ entityName = GeneralNames.GetInstance(tagObj, true);
+ break;
+ default:
+ throw new ArgumentException("unknown tag in Holder");
+ }
+
+ this.version = 0;
+ }
+
+ /**
+ * Constructor for a holder for an v2 attribute certificate. *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private Holder(
+ Asn1Sequence seq)
+ {
+ if (seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ for (int i = 0; i != seq.Count; i++)
+ {
+ Asn1TaggedObject tObj = Asn1TaggedObject.GetInstance(seq[i]);
+
+ switch (tObj.TagNo)
+ {
+ case 0:
+ baseCertificateID = IssuerSerial.GetInstance(tObj, false);
+ break;
+ case 1:
+ entityName = GeneralNames.GetInstance(tObj, false);
+ break;
+ case 2:
+ objectDigestInfo = ObjectDigestInfo.GetInstance(tObj, false);
+ break;
+ default:
+ throw new ArgumentException("unknown tag in Holder");
+ }
+ }
+
+ this.version = 1;
+ }
+
+ public Holder(
+ IssuerSerial baseCertificateID)
+ : this(baseCertificateID, 1)
+ {
+ }
+
+ /**
+ * Constructs a holder from a IssuerSerial.
+ * @param baseCertificateID The IssuerSerial.
+ * @param version The version of the attribute certificate.
+ */
+ public Holder(
+ IssuerSerial baseCertificateID,
+ int version)
+ {
+ this.baseCertificateID = baseCertificateID;
+ this.version = version;
+ }
+
+ /**
+ * Returns 1 for v2 attribute certificates or 0 for v1 attribute
+ * certificates.
+ * @return The version of the attribute certificate.
+ */
+ public int Version
+ {
+ get { return version; }
+ }
+
+ /**
+ * Constructs a holder with an entityName for v2 attribute certificates or
+ * with a subjectName for v1 attribute certificates.
+ *
+ * @param entityName The entity or subject name.
+ */
+ public Holder(
+ GeneralNames entityName)
+ : this(entityName, 1)
+ {
+ }
+
+ /**
+ * Constructs a holder with an entityName for v2 attribute certificates or
+ * with a subjectName for v1 attribute certificates.
+ *
+ * @param entityName The entity or subject name.
+ * @param version The version of the attribute certificate.
+ */
+ public Holder(
+ GeneralNames entityName,
+ int version)
+ {
+ this.entityName = entityName;
+ this.version = version;
+ }
+
+ /**
+ * Constructs a holder from an object digest info.
+ *
+ * @param objectDigestInfo The object digest info object.
+ */
+ public Holder(
+ ObjectDigestInfo objectDigestInfo)
+ {
+ this.objectDigestInfo = objectDigestInfo;
+ this.version = 1;
+ }
+
+ public IssuerSerial BaseCertificateID
+ {
+ get { return baseCertificateID; }
+ }
+
+ /**
+ * Returns the entityName for an v2 attribute certificate or the subjectName
+ * for an v1 attribute certificate.
+ *
+ * @return The entityname or subjectname.
+ */
+ public GeneralNames EntityName
+ {
+ get { return entityName; }
+ }
+
+ public ObjectDigestInfo ObjectDigestInfo
+ {
+ get { return objectDigestInfo; }
+ }
+
+ /**
+ * The Holder object.
+ *
+ * Holder ::= Sequence {
+ * baseCertificateID [0] IssuerSerial OPTIONAL,
+ * -- the issuer and serial number of
+ * -- the holder's Public Key Certificate
+ * entityName [1] GeneralNames OPTIONAL,
+ * -- the name of the claimant or role
+ * objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ * -- used to directly authenticate the holder,
+ * -- for example, an executable
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (version == 1)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(3);
+ v.AddOptionalTagged(false, 0, baseCertificateID);
+ v.AddOptionalTagged(false, 1, entityName);
+ v.AddOptionalTagged(false, 2, objectDigestInfo);
+ return new DerSequence(v);
+ }
+
+ if (entityName != null)
+ {
+ return new DerTaggedObject(true, 1, entityName);
+ }
+
+ return new DerTaggedObject(true, 0, baseCertificateID);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Holder.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Holder.cs.meta
new file mode 100644
index 00000000..b9986b70
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Holder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 87729a565cf00014a8d55f27e4fdd8c4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IetfAttrSyntax.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IetfAttrSyntax.cs
new file mode 100644
index 00000000..675ff437
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IetfAttrSyntax.cs
@@ -0,0 +1,156 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Implementation of IetfAttrSyntax as specified by RFC3281.
+ */
+ public class IetfAttrSyntax
+ : Asn1Encodable
+ {
+ public const int ValueOctets = 1;
+ public const int ValueOid = 2;
+ public const int ValueUtf8 = 3;
+
+ internal readonly GeneralNames policyAuthority;
+ internal readonly Asn1EncodableVector values = new Asn1EncodableVector();
+
+ internal int valueChoice = -1;
+
+ /**
+ *
+ */
+ public IetfAttrSyntax(
+ Asn1Sequence seq)
+ {
+ int i = 0;
+
+ if (seq[0] is Asn1TaggedObject)
+ {
+ policyAuthority = GeneralNames.GetInstance(((Asn1TaggedObject)seq[0]), false);
+ i++;
+ }
+ else if (seq.Count == 2)
+ { // VOMS fix
+ policyAuthority = GeneralNames.GetInstance(seq[0]);
+ i++;
+ }
+
+ if (!(seq[i] is Asn1Sequence))
+ {
+ throw new ArgumentException("Non-IetfAttrSyntax encoding");
+ }
+
+ seq = (Asn1Sequence) seq[i];
+
+ foreach (Asn1Object obj in seq)
+ {
+ int type;
+
+ if (obj is DerObjectIdentifier)
+ {
+ type = ValueOid;
+ }
+ else if (obj is DerUtf8String)
+ {
+ type = ValueUtf8;
+ }
+ else if (obj is DerOctetString)
+ {
+ type = ValueOctets;
+ }
+ else
+ {
+ throw new ArgumentException("Bad value type encoding IetfAttrSyntax");
+ }
+
+ if (valueChoice < 0)
+ {
+ valueChoice = type;
+ }
+
+ if (type != valueChoice)
+ {
+ throw new ArgumentException("Mix of value types in IetfAttrSyntax");
+ }
+
+ values.Add(obj);
+ }
+ }
+
+ public GeneralNames PolicyAuthority
+ {
+ get { return policyAuthority; }
+ }
+
+ public int ValueType
+ {
+ get { return valueChoice; }
+ }
+
+ public object[] GetValues()
+ {
+ if (this.ValueType == ValueOctets)
+ {
+ Asn1OctetString[] tmp = new Asn1OctetString[values.Count];
+
+ for (int i = 0; i != tmp.Length; i++)
+ {
+ tmp[i] = (Asn1OctetString) values[i];
+ }
+
+ return tmp;
+ }
+
+ if (this.ValueType == ValueOid)
+ {
+ DerObjectIdentifier[] tmp = new DerObjectIdentifier[values.Count];
+
+ for (int i = 0; i != tmp.Length; i++)
+ {
+ tmp[i] = (DerObjectIdentifier) values[i];
+ }
+
+ return tmp;
+ }
+
+ {
+ DerUtf8String[] tmp = new DerUtf8String[values.Count];
+
+ for (int i = 0; i != tmp.Length; i++)
+ {
+ tmp[i] = (DerUtf8String) values[i];
+ }
+
+ return tmp;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * IetfAttrSyntax ::= Sequence {
+ * policyAuthority [0] GeneralNames OPTIONAL,
+ * values Sequence OF CHOICE {
+ * octets OCTET STRING,
+ * oid OBJECT IDENTIFIER,
+ * string UTF8String
+ * }
+ * }
+ *
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(true, 0, policyAuthority);
+ v.Add(new DerSequence(values));
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IetfAttrSyntax.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IetfAttrSyntax.cs.meta
new file mode 100644
index 00000000..8ae54f9f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IetfAttrSyntax.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8fd2111883da7e247add4fa9224dd419
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuerSerial.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuerSerial.cs
new file mode 100644
index 00000000..77279907
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuerSerial.cs
@@ -0,0 +1,98 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class IssuerSerial
+ : Asn1Encodable
+ {
+ internal readonly GeneralNames issuer;
+ internal readonly DerInteger serial;
+ internal readonly DerBitString issuerUid;
+
+ public static IssuerSerial GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is IssuerSerial)
+ {
+ return (IssuerSerial) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new IssuerSerial((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static IssuerSerial GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ private IssuerSerial(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2 && seq.Count != 3)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+
+ issuer = GeneralNames.GetInstance(seq[0]);
+ serial = DerInteger.GetInstance(seq[1]);
+
+ if (seq.Count == 3)
+ {
+ issuerUid = DerBitString.GetInstance(seq[2]);
+ }
+ }
+
+ public IssuerSerial(
+ GeneralNames issuer,
+ DerInteger serial)
+ {
+ this.issuer = issuer;
+ this.serial = serial;
+ }
+
+ public GeneralNames Issuer
+ {
+ get { return issuer; }
+ }
+
+ public DerInteger Serial
+ {
+ get { return serial; }
+ }
+
+ public DerBitString IssuerUid
+ {
+ get { return issuerUid; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * IssuerSerial ::= Sequence {
+ * issuer GeneralNames,
+ * serial CertificateSerialNumber,
+ * issuerUid UniqueIdentifier OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(issuer, serial);
+ v.AddOptional(issuerUid);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuerSerial.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuerSerial.cs.meta
new file mode 100644
index 00000000..875ed8df
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuerSerial.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9309f0a3bd9c834479ae668b0b8d31a7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuingDistributionPoint.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuingDistributionPoint.cs
new file mode 100644
index 00000000..49bdafa8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuingDistributionPoint.cs
@@ -0,0 +1,241 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ *
+ * IssuingDistributionPoint ::= SEQUENCE {
+ * distributionPoint [0] DistributionPointName OPTIONAL,
+ * onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE,
+ * onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE,
+ * onlySomeReasons [3] ReasonFlags OPTIONAL,
+ * indirectCRL [4] BOOLEAN DEFAULT FALSE,
+ * onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE }
+ *
+ */
+ public class IssuingDistributionPoint
+ : Asn1Encodable
+ {
+ private readonly DistributionPointName _distributionPoint;
+ private readonly bool _onlyContainsUserCerts;
+ private readonly bool _onlyContainsCACerts;
+ private readonly ReasonFlags _onlySomeReasons;
+ private readonly bool _indirectCRL;
+ private readonly bool _onlyContainsAttributeCerts;
+
+ private readonly Asn1Sequence seq;
+
+ public static IssuingDistributionPoint GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static IssuingDistributionPoint GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is IssuingDistributionPoint)
+ {
+ return (IssuingDistributionPoint) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new IssuingDistributionPoint((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from given details.
+ *
+ * @param distributionPoint
+ * May contain an URI as pointer to most current CRL.
+ * @param onlyContainsUserCerts Covers revocation information for end certificates.
+ * @param onlyContainsCACerts Covers revocation information for CA certificates.
+ *
+ * @param onlySomeReasons
+ * Which revocation reasons does this point cover.
+ * @param indirectCRL
+ * If true then the CRL contains revocation
+ * information about certificates ssued by other CAs.
+ * @param onlyContainsAttributeCerts Covers revocation information for attribute certificates.
+ */
+ public IssuingDistributionPoint(
+ DistributionPointName distributionPoint,
+ bool onlyContainsUserCerts,
+ bool onlyContainsCACerts,
+ ReasonFlags onlySomeReasons,
+ bool indirectCRL,
+ bool onlyContainsAttributeCerts)
+ {
+ this._distributionPoint = distributionPoint;
+ this._indirectCRL = indirectCRL;
+ this._onlyContainsAttributeCerts = onlyContainsAttributeCerts;
+ this._onlyContainsCACerts = onlyContainsCACerts;
+ this._onlyContainsUserCerts = onlyContainsUserCerts;
+ this._onlySomeReasons = onlySomeReasons;
+
+ Asn1EncodableVector vec = new Asn1EncodableVector();
+ if (distributionPoint != null)
+ { // CHOICE item so explicitly tagged
+ vec.Add(new DerTaggedObject(true, 0, distributionPoint));
+ }
+ if (onlyContainsUserCerts)
+ {
+ vec.Add(new DerTaggedObject(false, 1, DerBoolean.True));
+ }
+ if (onlyContainsCACerts)
+ {
+ vec.Add(new DerTaggedObject(false, 2, DerBoolean.True));
+ }
+ if (onlySomeReasons != null)
+ {
+ vec.Add(new DerTaggedObject(false, 3, onlySomeReasons));
+ }
+ if (indirectCRL)
+ {
+ vec.Add(new DerTaggedObject(false, 4, DerBoolean.True));
+ }
+ if (onlyContainsAttributeCerts)
+ {
+ vec.Add(new DerTaggedObject(false, 5, DerBoolean.True));
+ }
+
+ seq = new DerSequence(vec);
+ }
+
+ /**
+ * Constructor from Asn1Sequence
+ */
+ private IssuingDistributionPoint(
+ Asn1Sequence seq)
+ {
+ this.seq = seq;
+
+ for (int i = 0; i != seq.Count; i++)
+ {
+ Asn1TaggedObject o = Asn1TaggedObject.GetInstance(seq[i]);
+
+ switch (o.TagNo)
+ {
+ case 0:
+ // CHOICE so explicit
+ _distributionPoint = DistributionPointName.GetInstance(o, true);
+ break;
+ case 1:
+ _onlyContainsUserCerts = DerBoolean.GetInstance(o, false).IsTrue;
+ break;
+ case 2:
+ _onlyContainsCACerts = DerBoolean.GetInstance(o, false).IsTrue;
+ break;
+ case 3:
+ _onlySomeReasons = new ReasonFlags(ReasonFlags.GetInstance(o, false));
+ break;
+ case 4:
+ _indirectCRL = DerBoolean.GetInstance(o, false).IsTrue;
+ break;
+ case 5:
+ _onlyContainsAttributeCerts = DerBoolean.GetInstance(o, false).IsTrue;
+ break;
+ default:
+ throw new ArgumentException("unknown tag in IssuingDistributionPoint");
+ }
+ }
+ }
+
+ public bool OnlyContainsUserCerts
+ {
+ get { return _onlyContainsUserCerts; }
+ }
+
+ public bool OnlyContainsCACerts
+ {
+ get { return _onlyContainsCACerts; }
+ }
+
+ public bool IsIndirectCrl
+ {
+ get { return _indirectCRL; }
+ }
+
+ public bool OnlyContainsAttributeCerts
+ {
+ get { return _onlyContainsAttributeCerts; }
+ }
+
+ /**
+ * @return Returns the distributionPoint.
+ */
+ public DistributionPointName DistributionPoint
+ {
+ get { return _distributionPoint; }
+ }
+
+ /**
+ * @return Returns the onlySomeReasons.
+ */
+ public ReasonFlags OnlySomeReasons
+ {
+ get { return _onlySomeReasons; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return seq;
+ }
+
+ public override string ToString()
+ {
+ StringBuilder buf = new StringBuilder();
+ buf.AppendLine("IssuingDistributionPoint: [");
+ if (_distributionPoint != null)
+ {
+ AppendObject(buf, "distributionPoint", _distributionPoint.ToString());
+ }
+ if (_onlyContainsUserCerts)
+ {
+ AppendObject(buf, "onlyContainsUserCerts", _onlyContainsUserCerts.ToString());
+ }
+ if (_onlyContainsCACerts)
+ {
+ AppendObject(buf, "onlyContainsCACerts", _onlyContainsCACerts.ToString());
+ }
+ if (_onlySomeReasons != null)
+ {
+ AppendObject(buf, "onlySomeReasons", _onlySomeReasons.ToString());
+ }
+ if (_onlyContainsAttributeCerts)
+ {
+ AppendObject(buf, "onlyContainsAttributeCerts", _onlyContainsAttributeCerts.ToString());
+ }
+ if (_indirectCRL)
+ {
+ AppendObject(buf, "indirectCRL", _indirectCRL.ToString());
+ }
+ buf.AppendLine("]");
+ return buf.ToString();
+ }
+
+ private void AppendObject(StringBuilder buf, string name, string val)
+ {
+ string indent = " ";
+ buf.Append(indent);
+ buf.Append(name);
+ buf.AppendLine(":");
+ buf.Append(indent);
+ buf.Append(indent);
+ buf.Append(val);
+ buf.AppendLine();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuingDistributionPoint.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuingDistributionPoint.cs.meta
new file mode 100644
index 00000000..8253052d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/IssuingDistributionPoint.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3c820e26e3cf663498bd64c4625d8a44
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyPurposeId.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyPurposeId.cs
new file mode 100644
index 00000000..a938edb6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyPurposeId.cs
@@ -0,0 +1,100 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The KeyPurposeID object.
+ *
+ * KeyPurposeID ::= OBJECT IDENTIFIER
+ *
+ */
+ public sealed class KeyPurposeID
+ : DerObjectIdentifier
+ {
+ private const string id_kp = "1.3.6.1.5.5.7.3";
+
+ private KeyPurposeID(string id)
+ : base(id)
+ {
+ }
+
+ public static readonly KeyPurposeID AnyExtendedKeyUsage = new KeyPurposeID(X509Extensions.ExtendedKeyUsage.Id + ".0");
+
+ public static readonly KeyPurposeID id_kp_serverAuth = new KeyPurposeID(id_kp + ".1");
+ public static readonly KeyPurposeID id_kp_clientAuth = new KeyPurposeID(id_kp + ".2");
+ public static readonly KeyPurposeID id_kp_codeSigning = new KeyPurposeID(id_kp + ".3");
+ public static readonly KeyPurposeID id_kp_emailProtection = new KeyPurposeID(id_kp + ".4");
+ public static readonly KeyPurposeID id_kp_ipsecEndSystem = new KeyPurposeID(id_kp + ".5");
+ public static readonly KeyPurposeID id_kp_ipsecTunnel = new KeyPurposeID(id_kp + ".6");
+ public static readonly KeyPurposeID id_kp_ipsecUser = new KeyPurposeID(id_kp + ".7");
+ public static readonly KeyPurposeID id_kp_timeStamping = new KeyPurposeID(id_kp + ".8");
+ public static readonly KeyPurposeID id_kp_OCSPSigning = new KeyPurposeID(id_kp + ".9");
+ public static readonly KeyPurposeID id_kp_dvcs = new KeyPurposeID(id_kp + ".10");
+ public static readonly KeyPurposeID id_kp_sbgpCertAAServerAuth = new KeyPurposeID(id_kp + ".11");
+ public static readonly KeyPurposeID id_kp_scvp_responder = new KeyPurposeID(id_kp + ".12");
+ public static readonly KeyPurposeID id_kp_eapOverPPP = new KeyPurposeID(id_kp + ".13");
+ public static readonly KeyPurposeID id_kp_eapOverLAN = new KeyPurposeID(id_kp + ".14");
+ public static readonly KeyPurposeID id_kp_scvpServer = new KeyPurposeID(id_kp + ".15");
+ public static readonly KeyPurposeID id_kp_scvpClient = new KeyPurposeID(id_kp + ".16");
+ public static readonly KeyPurposeID id_kp_ipsecIKE = new KeyPurposeID(id_kp + ".17");
+ public static readonly KeyPurposeID id_kp_capwapAC = new KeyPurposeID(id_kp + ".18");
+ public static readonly KeyPurposeID id_kp_capwapWTP = new KeyPurposeID(id_kp + ".19");
+
+ public static readonly KeyPurposeID id_kp_cmcCA = new KeyPurposeID(id_kp + ".27");
+ public static readonly KeyPurposeID id_kp_cmcRA = new KeyPurposeID(id_kp + ".28");
+ public static readonly KeyPurposeID id_kp_cmKGA = new KeyPurposeID(id_kp + ".32");
+
+ //
+ // microsoft key purpose ids
+ //
+ public static readonly KeyPurposeID id_kp_smartcardlogon = new KeyPurposeID("1.3.6.1.4.1.311.20.2.2");
+
+ public static readonly KeyPurposeID id_kp_macAddress = new KeyPurposeID("1.3.6.1.1.1.1.22");
+
+ /// Microsoft Server Gated Crypto (msSGC).
+ /// see https://www.alvestrand.no/objectid/1.3.6.1.4.1.311.10.3.3.html
+ public static readonly KeyPurposeID id_kp_msSGC = new KeyPurposeID("1.3.6.1.4.1.311.10.3.3");
+
+ private const string id_pkinit = "1.3.6.1.5.2.3";
+
+ public static readonly KeyPurposeID scSysNodeNumber = new KeyPurposeID(id_pkinit + ".0");
+ public static readonly KeyPurposeID id_pkinit_authData = new KeyPurposeID(id_pkinit + ".1");
+ public static readonly KeyPurposeID id_pkinit_DHKeyData = new KeyPurposeID(id_pkinit + ".2");
+ public static readonly KeyPurposeID id_pkinit_rkeyData = new KeyPurposeID(id_pkinit + ".3");
+ public static readonly KeyPurposeID keyPurposeClientAuth = new KeyPurposeID(id_pkinit + ".4");
+ public static readonly KeyPurposeID keyPurposeKdc = new KeyPurposeID(id_pkinit + ".5");
+
+ /// Netscape Server Gated Crypto (nsSGC).
+ /// see https://www.alvestrand.no/objectid/2.16.840.1.113730.4.1.html
+ public static readonly KeyPurposeID id_kp_nsSGC = new KeyPurposeID("2.16.840.1.113730.4.1");
+
+
+ public static readonly KeyPurposeID IdKPServerAuth = id_kp_serverAuth;
+
+ public static readonly KeyPurposeID IdKPClientAuth = id_kp_clientAuth;
+
+ public static readonly KeyPurposeID IdKPCodeSigning = id_kp_codeSigning;
+
+ public static readonly KeyPurposeID IdKPEmailProtection = id_kp_emailProtection;
+
+ public static readonly KeyPurposeID IdKPIpsecEndSystem = id_kp_ipsecEndSystem;
+
+ public static readonly KeyPurposeID IdKPIpsecTunnel = id_kp_ipsecTunnel;
+
+ public static readonly KeyPurposeID IdKPIpsecUser = id_kp_ipsecUser;
+
+ public static readonly KeyPurposeID IdKPTimeStamping = id_kp_timeStamping;
+
+ public static readonly KeyPurposeID IdKPOcspSigning = id_kp_OCSPSigning;
+
+
+ public static readonly KeyPurposeID IdKPSmartCardLogon = id_kp_smartcardlogon;
+
+
+ public static readonly KeyPurposeID IdKPMacAddress = id_kp_macAddress;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyPurposeId.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyPurposeId.cs.meta
new file mode 100644
index 00000000..17acdd97
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyPurposeId.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 794f2c0ca74648a4e9adf54c1c131ee0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyUsage.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyUsage.cs
new file mode 100644
index 00000000..be965674
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyUsage.cs
@@ -0,0 +1,82 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The KeyUsage object.
+ *
+ * id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
+ *
+ * KeyUsage ::= BIT STRING {
+ * digitalSignature (0),
+ * nonRepudiation (1),
+ * keyEncipherment (2),
+ * dataEncipherment (3),
+ * keyAgreement (4),
+ * keyCertSign (5),
+ * cRLSign (6),
+ * encipherOnly (7),
+ * decipherOnly (8) }
+ *
+ */
+ public class KeyUsage
+ : DerBitString
+ {
+ public const int DigitalSignature = (1 << 7);
+ public const int NonRepudiation = (1 << 6);
+ public const int KeyEncipherment = (1 << 5);
+ public const int DataEncipherment = (1 << 4);
+ public const int KeyAgreement = (1 << 3);
+ public const int KeyCertSign = (1 << 2);
+ public const int CrlSign = (1 << 1);
+ public const int EncipherOnly = (1 << 0);
+ public const int DecipherOnly = (1 << 15);
+
+ public static new KeyUsage GetInstance(object obj)
+ {
+ if (obj is KeyUsage)
+ return (KeyUsage)obj;
+ if (obj is X509Extension)
+ return GetInstance(X509Extension.ConvertValueToObject((X509Extension)obj));
+ if (obj == null)
+ return null;
+ return new KeyUsage(DerBitString.GetInstance(obj));
+ }
+
+ public static KeyUsage FromExtensions(X509Extensions extensions)
+ {
+ return GetInstance(X509Extensions.GetExtensionParsedValue(extensions, X509Extensions.KeyUsage));
+ }
+
+ /**
+ * Basic constructor.
+ *
+ * @param usage - the bitwise OR of the Key Usage flags giving the
+ * allowed uses for the key.
+ * e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment)
+ */
+ public KeyUsage(int usage)
+ : base(usage)
+ {
+ }
+
+ private KeyUsage(
+ DerBitString usage)
+ : base(usage.GetBytes(), usage.PadBits)
+ {
+ }
+
+ public override string ToString()
+ {
+ byte[] data = GetBytes();
+ if (data.Length == 1)
+ {
+ return "KeyUsage: 0x" + (data[0] & 0xff).ToString("X");
+ }
+
+ return "KeyUsage: 0x" + ((data[1] & 0xff) << 8 | (data[0] & 0xff)).ToString("X");
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyUsage.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyUsage.cs.meta
new file mode 100644
index 00000000..b26f7b18
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/KeyUsage.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 109e5f5c22da9a645b078b26ac284d8b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NameConstraints.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NameConstraints.cs
new file mode 100644
index 00000000..9cac4813
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NameConstraints.cs
@@ -0,0 +1,105 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class NameConstraints
+ : Asn1Encodable
+ {
+ private Asn1Sequence permitted, excluded;
+
+ public static NameConstraints GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is NameConstraints)
+ {
+ return (NameConstraints) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new NameConstraints((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public NameConstraints(
+ Asn1Sequence seq)
+ {
+ foreach (Asn1TaggedObject o in seq)
+ {
+ switch (o.TagNo)
+ {
+ case 0:
+ permitted = Asn1Sequence.GetInstance(o, false);
+ break;
+ case 1:
+ excluded = Asn1Sequence.GetInstance(o, false);
+ break;
+ }
+ }
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * permitted and excluded are Vectors of GeneralSubtree objects.
+ *
+ * @param permitted Permitted subtrees
+ * @param excluded Excluded subtrees
+ */
+ public NameConstraints(
+ IList permitted,
+ IList excluded)
+ {
+ if (permitted != null)
+ {
+ this.permitted = CreateSequence(permitted);
+ }
+
+ if (excluded != null)
+ {
+ this.excluded = CreateSequence(excluded);
+ }
+ }
+
+ private DerSequence CreateSequence(IList subtrees)
+ {
+ GeneralSubtree[] gsts = new GeneralSubtree[subtrees.Count];
+ for (int i = 0; i < subtrees.Count; ++i)
+ {
+ gsts[i] = subtrees[i];
+ }
+ return new DerSequence(gsts);
+ }
+
+ public Asn1Sequence PermittedSubtrees
+ {
+ get { return permitted; }
+ }
+
+ public Asn1Sequence ExcludedSubtrees
+ {
+ get { return excluded; }
+ }
+
+ /*
+ * NameConstraints ::= SEQUENCE { permittedSubtrees [0] GeneralSubtrees
+ * OPTIONAL, excludedSubtrees [1] GeneralSubtrees OPTIONAL }
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(false, 0, permitted);
+ v.AddOptionalTagged(false, 1, excluded);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NameConstraints.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NameConstraints.cs.meta
new file mode 100644
index 00000000..228a27a8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NameConstraints.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1742cc96c071e6f4098f85e6da1a8a6e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NoticeReference.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NoticeReference.cs
new file mode 100644
index 00000000..ce0ef26e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NoticeReference.cs
@@ -0,0 +1,147 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * NoticeReference class, used in
+ * CertificatePolicies X509 V3 extensions
+ * (in policy qualifiers).
+ *
+ *
+ * NoticeReference ::= Sequence {
+ * organization DisplayText,
+ * noticeNumbers Sequence OF Integer }
+ *
+ *
+ *
+ * @see PolicyQualifierInfo
+ * @see PolicyInformation
+ */
+ public class NoticeReference
+ : Asn1Encodable
+ {
+ private readonly DisplayText organization;
+ private readonly Asn1Sequence noticeNumbers;
+
+ private static Asn1EncodableVector ConvertVector(IList numbers)
+ {
+ Asn1EncodableVector av = new Asn1EncodableVector();
+
+ foreach (object o in numbers)
+ {
+ DerInteger di;
+
+ if (o is BigInteger)
+ {
+ di = new DerInteger((BigInteger)o);
+ }
+ else if (o is int)
+ {
+ di = new DerInteger((int)o);
+ }
+ else
+ {
+ throw new ArgumentException();
+ }
+
+ av.Add(di);
+ }
+ return av;
+ }
+
+ /**
+ * Creates a new NoticeReference instance.
+ *
+ * @param organization a String value
+ * @param numbers a Vector value
+ */
+ public NoticeReference(string organization, IList numbers)
+ : this(organization, ConvertVector(numbers))
+ {
+ }
+
+ /**
+ * Creates a new NoticeReference instance.
+ *
+ * @param organization a String value
+ * @param noticeNumbers an ASN1EncodableVector value
+ */
+ public NoticeReference(string organization, Asn1EncodableVector noticeNumbers)
+ : this(new DisplayText(organization), noticeNumbers)
+ {
+ }
+
+ /**
+ * Creates a new NoticeReference instance.
+ *
+ * @param organization displayText
+ * @param noticeNumbers an ASN1EncodableVector value
+ */
+ public NoticeReference(DisplayText organization, Asn1EncodableVector noticeNumbers)
+ {
+ this.organization = organization;
+ this.noticeNumbers = new DerSequence(noticeNumbers);
+ }
+
+ /**
+ * Creates a new NoticeReference instance.
+ * Useful for reconstructing a NoticeReference
+ * instance from its encodable/encoded form.
+ *
+ * @param as an Asn1Sequence value obtained from either
+ * calling @{link ToAsn1Object()} for a NoticeReference
+ * instance or from parsing it from a Der-encoded stream.
+ */
+ private NoticeReference(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ organization = DisplayText.GetInstance(seq[0]);
+ noticeNumbers = Asn1Sequence.GetInstance(seq[1]);
+ }
+
+ public static NoticeReference GetInstance(object obj)
+ {
+ if (obj is NoticeReference)
+ return (NoticeReference)obj;
+ if (obj == null)
+ return null;
+ return new NoticeReference(Asn1Sequence.GetInstance(obj));
+ }
+
+ public virtual DisplayText Organization
+ {
+ get { return organization; }
+ }
+
+ public virtual DerInteger[] GetNoticeNumbers()
+ {
+ DerInteger[] tmp = new DerInteger[noticeNumbers.Count];
+
+ for (int i = 0; i != noticeNumbers.Count; ++i)
+ {
+ tmp[i] = DerInteger.GetInstance(noticeNumbers[i]);
+ }
+
+ return tmp;
+ }
+
+ /**
+ * Describe ToAsn1Object method here.
+ *
+ * @return a Asn1Object value
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(organization, noticeNumbers);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NoticeReference.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NoticeReference.cs.meta
new file mode 100644
index 00000000..e70630e5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/NoticeReference.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 877f7a64335a78a43a721cf38f293056
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ObjectDigestInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ObjectDigestInfo.cs
new file mode 100644
index 00000000..68d4ef5c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ObjectDigestInfo.cs
@@ -0,0 +1,177 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * ObjectDigestInfo ASN.1 structure used in v2 attribute certificates.
+ *
+ *
+ *
+ * ObjectDigestInfo ::= SEQUENCE {
+ * digestedObjectType ENUMERATED {
+ * publicKey (0),
+ * publicKeyCert (1),
+ * otherObjectTypes (2) },
+ * -- otherObjectTypes MUST NOT
+ * -- be used in this profile
+ * otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ * digestAlgorithm AlgorithmIdentifier,
+ * objectDigest BIT STRING
+ * }
+ *
+ *
+ *
+ */
+ public class ObjectDigestInfo
+ : Asn1Encodable
+ {
+ /**
+ * The public key is hashed.
+ */
+ public const int PublicKey = 0;
+
+ /**
+ * The public key certificate is hashed.
+ */
+ public const int PublicKeyCert = 1;
+
+ /**
+ * An other object is hashed.
+ */
+ public const int OtherObjectDigest = 2;
+
+ internal readonly DerEnumerated digestedObjectType;
+ internal readonly DerObjectIdentifier otherObjectTypeID;
+ internal readonly AlgorithmIdentifier digestAlgorithm;
+ internal readonly DerBitString objectDigest;
+
+ public static ObjectDigestInfo GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is ObjectDigestInfo)
+ {
+ return (ObjectDigestInfo) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new ObjectDigestInfo((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public static ObjectDigestInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ /**
+ * Constructor from given details.
+ *
+ * If digestedObjectType is not {@link #publicKeyCert} or
+ * {@link #publicKey} otherObjectTypeID must be given,
+ * otherwise it is ignored.
+ *
+ * @param digestedObjectType The digest object type.
+ * @param otherObjectTypeID The object type ID for
+ * otherObjectDigest.
+ * @param digestAlgorithm The algorithm identifier for the hash.
+ * @param objectDigest The hash value.
+ */
+ public ObjectDigestInfo(
+ int digestedObjectType,
+ string otherObjectTypeID,
+ AlgorithmIdentifier digestAlgorithm,
+ byte[] objectDigest)
+ {
+ this.digestedObjectType = new DerEnumerated(digestedObjectType);
+
+ if (digestedObjectType == OtherObjectDigest)
+ {
+ this.otherObjectTypeID = new DerObjectIdentifier(otherObjectTypeID);
+ }
+
+ this.digestAlgorithm = digestAlgorithm;
+
+ this.objectDigest = new DerBitString(objectDigest);
+ }
+
+ private ObjectDigestInfo(
+ Asn1Sequence seq)
+ {
+ if (seq.Count > 4 || seq.Count < 3)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+
+ digestedObjectType = DerEnumerated.GetInstance(seq[0]);
+
+ int offset = 0;
+
+ if (seq.Count == 4)
+ {
+ otherObjectTypeID = DerObjectIdentifier.GetInstance(seq[1]);
+ offset++;
+ }
+
+ digestAlgorithm = AlgorithmIdentifier.GetInstance(seq[1 + offset]);
+ objectDigest = DerBitString.GetInstance(seq[2 + offset]);
+ }
+
+ public DerEnumerated DigestedObjectType
+ {
+ get { return digestedObjectType; }
+ }
+
+ public DerObjectIdentifier OtherObjectTypeID
+ {
+ get { return otherObjectTypeID; }
+ }
+
+ public AlgorithmIdentifier DigestAlgorithm
+ {
+ get { return digestAlgorithm; }
+ }
+
+ public DerBitString ObjectDigest
+ {
+ get { return objectDigest; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ *
+ *
+ * ObjectDigestInfo ::= SEQUENCE {
+ * digestedObjectType ENUMERATED {
+ * publicKey (0),
+ * publicKeyCert (1),
+ * otherObjectTypes (2) },
+ * -- otherObjectTypes MUST NOT
+ * -- be used in this profile
+ * otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ * digestAlgorithm AlgorithmIdentifier,
+ * objectDigest BIT STRING
+ * }
+ *
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(digestedObjectType);
+ v.AddOptional(otherObjectTypeID);
+ v.Add(digestAlgorithm, objectDigest);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ObjectDigestInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ObjectDigestInfo.cs.meta
new file mode 100644
index 00000000..804a6074
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ObjectDigestInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a9bb1fd989a68b6419e3961c4ef4aba8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/OtherName.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/OtherName.cs
new file mode 100644
index 00000000..6749743b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/OtherName.cs
@@ -0,0 +1,75 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The OtherName object.
+ *
+ * OtherName ::= SEQUENCE {
+ * type-id OBJECT IDENTIFIER,
+ * value [0] EXPLICIT ANY DEFINED BY type-id }
+ *
+ */
+ public class OtherName
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier typeID;
+ private readonly Asn1Encodable value;
+
+ /**
+ * OtherName factory method.
+ * @param obj the object used to construct an instance of
+ * OtherName. It must be an instance of OtherName
+ * or ASN1Sequence.
+ * @return the instance of OtherName built from the
+ * supplied object.
+ * @throws java.lang.IllegalArgumentException if the object passed
+ * to the factory is not an instance of OtherName or something that
+ * can be converted into an appropriate ASN1Sequence.
+ */
+ public static OtherName GetInstance(object obj)
+ {
+ if (obj is OtherName)
+ return (OtherName)obj;
+ if (obj == null)
+ return null;
+ return new OtherName(Asn1Sequence.GetInstance(obj));
+ }
+
+ /**
+ * Base constructor.
+ * @param typeID the type of the other name.
+ * @param value the ANY object that represents the value.
+ */
+ public OtherName(DerObjectIdentifier typeID, Asn1Encodable value)
+ {
+ this.typeID = typeID;
+ this.value = value;
+ }
+
+ private OtherName(Asn1Sequence seq)
+ {
+ this.typeID = DerObjectIdentifier.GetInstance(seq[0]);
+ this.value = DerTaggedObject.GetInstance(seq[1]).GetObject(); // explicitly tagged
+ }
+
+ public virtual DerObjectIdentifier TypeID
+ {
+ get { return typeID; }
+ }
+
+ public Asn1Encodable Value
+ {
+ get { return value; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(typeID, new DerTaggedObject(true, 0, value));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/OtherName.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/OtherName.cs.meta
new file mode 100644
index 00000000..2083a9b9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/OtherName.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4029718e1f966e34ab87198e9729d02e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyInformation.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyInformation.cs
new file mode 100644
index 00000000..19dfefc3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyInformation.cs
@@ -0,0 +1,79 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class PolicyInformation
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier policyIdentifier;
+ private readonly Asn1Sequence policyQualifiers;
+
+ private PolicyInformation(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 1 || seq.Count > 2)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+
+ policyIdentifier = DerObjectIdentifier.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ policyQualifiers = Asn1Sequence.GetInstance(seq[1]);
+ }
+ }
+
+ public PolicyInformation(
+ DerObjectIdentifier policyIdentifier)
+ {
+ this.policyIdentifier = policyIdentifier;
+ }
+
+ public PolicyInformation(
+ DerObjectIdentifier policyIdentifier,
+ Asn1Sequence policyQualifiers)
+ {
+ this.policyIdentifier = policyIdentifier;
+ this.policyQualifiers = policyQualifiers;
+ }
+
+ public static PolicyInformation GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is PolicyInformation)
+ {
+ return (PolicyInformation) obj;
+ }
+
+ return new PolicyInformation(Asn1Sequence.GetInstance(obj));
+ }
+
+ public DerObjectIdentifier PolicyIdentifier
+ {
+ get { return policyIdentifier; }
+ }
+
+ public Asn1Sequence PolicyQualifiers
+ {
+ get { return policyQualifiers; }
+ }
+
+ /*
+ * PolicyInformation ::= Sequence {
+ * policyIdentifier CertPolicyId,
+ * policyQualifiers Sequence SIZE (1..MAX) OF
+ * PolicyQualifierInfo OPTIONAL }
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(policyIdentifier);
+ v.AddOptional(policyQualifiers);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyInformation.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyInformation.cs.meta
new file mode 100644
index 00000000..f16a7f6a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyInformation.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4fde026e7283aaf469e8ffa39f27a34e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyMappings.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyMappings.cs
new file mode 100644
index 00000000..891d2541
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyMappings.cs
@@ -0,0 +1,66 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.Collections.Generic;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * PolicyMappings V3 extension, described in RFC3280.
+ *
+ * PolicyMappings ::= Sequence SIZE (1..MAX) OF Sequence {
+ * issuerDomainPolicy CertPolicyId,
+ * subjectDomainPolicy CertPolicyId }
+ *
+ *
+ * @see RFC 3280, section 4.2.1.6
+ */
+ public class PolicyMappings
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence seq;
+
+ /**
+ * Creates a new PolicyMappings instance.
+ *
+ * @param seq an Asn1Sequence constructed as specified
+ * in RFC 3280
+ */
+ public PolicyMappings(
+ Asn1Sequence seq)
+ {
+ this.seq = seq;
+ }
+
+ /**
+ * Creates a new PolicyMappings instance.
+ *
+ * @param mappings a HashMap value that maps
+ * string oids
+ * to other string oids.
+ */
+ public PolicyMappings(IDictionary mappings)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ foreach (var entry in mappings)
+ {
+ string idp = entry.Key;
+ string sdp = entry.Value;
+
+ v.Add(
+ new DerSequence(
+ new DerObjectIdentifier(idp),
+ new DerObjectIdentifier(sdp)));
+ }
+
+ seq = new DerSequence(v);
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return seq;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyMappings.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyMappings.cs.meta
new file mode 100644
index 00000000..7a68a486
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyMappings.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 79e3f73ba2740c14b84ce885cb40a4ed
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierId.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierId.cs
new file mode 100644
index 00000000..a401f3bb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierId.cs
@@ -0,0 +1,32 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * PolicyQualifierId, used in the CertificatePolicies
+ * X509V3 extension.
+ *
+ *
+ * id-qt OBJECT IDENTIFIER ::= { id-pkix 2 }
+ * id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 }
+ * id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 }
+ * PolicyQualifierId ::=
+ * OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
+ *
+ */
+ public sealed class PolicyQualifierID : DerObjectIdentifier
+ {
+ private const string IdQt = "1.3.6.1.5.5.7.2";
+
+ private PolicyQualifierID(
+ string id)
+ : base(id)
+ {
+ }
+
+ public static readonly PolicyQualifierID IdQtCps = new PolicyQualifierID(IdQt + ".1");
+ public static readonly PolicyQualifierID IdQtUnotice = new PolicyQualifierID(IdQt + ".2");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierId.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierId.cs.meta
new file mode 100644
index 00000000..a5f66740
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierId.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 603b3a74f16f32d45aa6e6343fae7e51
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierInfo.cs
new file mode 100644
index 00000000..d39eff1b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierInfo.cs
@@ -0,0 +1,99 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Policy qualifiers, used in the X509V3 CertificatePolicies
+ * extension.
+ *
+ *
+ * PolicyQualifierInfo ::= Sequence {
+ * policyQualifierId PolicyQualifierId,
+ * qualifier ANY DEFINED BY policyQualifierId }
+ *
+ */
+ public class PolicyQualifierInfo
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier policyQualifierId;
+ private readonly Asn1Encodable qualifier;
+
+ /**
+ * Creates a new PolicyQualifierInfo instance.
+ *
+ * @param policyQualifierId a PolicyQualifierId value
+ * @param qualifier the qualifier, defined by the above field.
+ */
+ public PolicyQualifierInfo(
+ DerObjectIdentifier policyQualifierId,
+ Asn1Encodable qualifier)
+ {
+ this.policyQualifierId = policyQualifierId;
+ this.qualifier = qualifier;
+ }
+
+ /**
+ * Creates a new PolicyQualifierInfo containing a
+ * cPSuri qualifier.
+ *
+ * @param cps the CPS (certification practice statement) uri as a
+ * string.
+ */
+ public PolicyQualifierInfo(
+ string cps)
+ {
+ policyQualifierId = PolicyQualifierID.IdQtCps;
+ qualifier = new DerIA5String(cps);
+ }
+
+ /**
+ * Creates a new PolicyQualifierInfo instance.
+ *
+ * @param as PolicyQualifierInfo X509 structure
+ * encoded as an Asn1Sequence.
+ */
+ private PolicyQualifierInfo(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ policyQualifierId = DerObjectIdentifier.GetInstance(seq[0]);
+ qualifier = seq[1];
+ }
+
+ public static PolicyQualifierInfo GetInstance(
+ object obj)
+ {
+ if (obj is PolicyQualifierInfo)
+ return (PolicyQualifierInfo)obj;
+ if (obj == null)
+ return null;
+ return new PolicyQualifierInfo(Asn1Sequence.GetInstance(obj));
+ }
+
+ public virtual DerObjectIdentifier PolicyQualifierId
+ {
+ get { return policyQualifierId; }
+ }
+
+ public virtual Asn1Encodable Qualifier
+ {
+ get { return qualifier; }
+ }
+
+ /**
+ * Returns a Der-encodable representation of this instance.
+ *
+ * @return a Asn1Object value
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(policyQualifierId, qualifier);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierInfo.cs.meta
new file mode 100644
index 00000000..b2021b8f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PolicyQualifierInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5432c3ce43f6ca34bac84a4b39169d19
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PrivateKeyUsagePeriod.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PrivateKeyUsagePeriod.cs
new file mode 100644
index 00000000..a709c694
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PrivateKeyUsagePeriod.cs
@@ -0,0 +1,79 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ ///
+ ///
+ /// PrivateKeyUsagePeriod ::= SEQUENCE
+ /// {
+ /// notBefore [0] GeneralizedTime OPTIONAL,
+ /// notAfter [1] GeneralizedTime OPTIONAL }
+ ///
+ ///
+ public class PrivateKeyUsagePeriod
+ : Asn1Encodable
+ {
+ public static PrivateKeyUsagePeriod GetInstance(
+ object obj)
+ {
+ if (obj is PrivateKeyUsagePeriod)
+ {
+ return (PrivateKeyUsagePeriod) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new PrivateKeyUsagePeriod((Asn1Sequence) obj);
+ }
+
+ if (obj is X509Extension)
+ {
+ return GetInstance(X509Extension.ConvertValueToObject((X509Extension) obj));
+ }
+
+ throw new ArgumentException("unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private Asn1GeneralizedTime _notBefore, _notAfter;
+
+ private PrivateKeyUsagePeriod(
+ Asn1Sequence seq)
+ {
+ foreach (Asn1TaggedObject tObj in seq)
+ {
+ if (tObj.TagNo == 0)
+ {
+ _notBefore = Asn1GeneralizedTime.GetInstance(tObj, false);
+ }
+ else if (tObj.TagNo == 1)
+ {
+ _notAfter = Asn1GeneralizedTime.GetInstance(tObj, false);
+ }
+ }
+ }
+
+ public Asn1GeneralizedTime NotBefore
+ {
+ get { return _notBefore; }
+ }
+
+ public Asn1GeneralizedTime NotAfter
+ {
+ get { return _notAfter; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(false, 0, _notBefore);
+ v.AddOptionalTagged(false, 1, _notAfter);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PrivateKeyUsagePeriod.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PrivateKeyUsagePeriod.cs.meta
new file mode 100644
index 00000000..04901764
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/PrivateKeyUsagePeriod.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f8dfe6e64c057fd42a93d7bd397946e9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RSAPublicKeyStructure.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RSAPublicKeyStructure.cs
new file mode 100644
index 00000000..b848e00a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RSAPublicKeyStructure.cs
@@ -0,0 +1,95 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class RsaPublicKeyStructure
+ : Asn1Encodable
+ {
+ private BigInteger modulus;
+ private BigInteger publicExponent;
+
+ public static RsaPublicKeyStructure GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static RsaPublicKeyStructure GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is RsaPublicKeyStructure)
+ {
+ return (RsaPublicKeyStructure) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new RsaPublicKeyStructure((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("Invalid RsaPublicKeyStructure: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj));
+ }
+
+ public RsaPublicKeyStructure(
+ BigInteger modulus,
+ BigInteger publicExponent)
+ {
+ if (modulus == null)
+ throw new ArgumentNullException("modulus");
+ if (publicExponent == null)
+ throw new ArgumentNullException("publicExponent");
+ if (modulus.SignValue <= 0)
+ throw new ArgumentException("Not a valid RSA modulus", "modulus");
+ if (publicExponent.SignValue <= 0)
+ throw new ArgumentException("Not a valid RSA public exponent", "publicExponent");
+
+ this.modulus = modulus;
+ this.publicExponent = publicExponent;
+ }
+
+ private RsaPublicKeyStructure(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ // Note: we are accepting technically incorrect (i.e. negative) values here
+ modulus = DerInteger.GetInstance(seq[0]).PositiveValue;
+ publicExponent = DerInteger.GetInstance(seq[1]).PositiveValue;
+ }
+
+ public BigInteger Modulus
+ {
+ get { return modulus; }
+ }
+
+ public BigInteger PublicExponent
+ {
+ get { return publicExponent; }
+ }
+
+ /**
+ * This outputs the key in Pkcs1v2 format.
+ *
+ * RSAPublicKey ::= Sequence {
+ * modulus Integer, -- n
+ * publicExponent Integer, -- e
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(
+ new DerInteger(Modulus),
+ new DerInteger(PublicExponent));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RSAPublicKeyStructure.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RSAPublicKeyStructure.cs.meta
new file mode 100644
index 00000000..d4cbc318
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RSAPublicKeyStructure.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2e69185bf5672f942bc90bd2fd5c8dcc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ReasonFlags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ReasonFlags.cs
new file mode 100644
index 00000000..ea756ef2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ReasonFlags.cs
@@ -0,0 +1,49 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The ReasonFlags object.
+ *
+ * ReasonFlags ::= BIT STRING {
+ * unused(0),
+ * keyCompromise(1),
+ * cACompromise(2),
+ * affiliationChanged(3),
+ * superseded(4),
+ * cessationOfOperation(5),
+ * certficateHold(6)
+ * }
+ *
+ */
+ public class ReasonFlags
+ : DerBitString
+ {
+ public const int Unused = (1 << 7);
+ public const int KeyCompromise = (1 << 6);
+ public const int CACompromise = (1 << 5);
+ public const int AffiliationChanged = (1 << 4);
+ public const int Superseded = (1 << 3);
+ public const int CessationOfOperation = (1 << 2);
+ public const int CertificateHold = (1 << 1);
+ public const int PrivilegeWithdrawn = (1 << 0);
+ public const int AACompromise = (1 << 15);
+
+ /**
+ * @param reasons - the bitwise OR of the Key Reason flags giving the
+ * allowed uses for the key.
+ */
+ public ReasonFlags(int reasons)
+ : base(reasons)
+ {
+ }
+
+ public ReasonFlags(
+ DerBitString reasons)
+ : base(reasons.GetBytes(), reasons.PadBits)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ReasonFlags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ReasonFlags.cs.meta
new file mode 100644
index 00000000..aff060cd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/ReasonFlags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2a7df27c00f970a4abf5b2d0a8b87f42
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RoleSyntax.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RoleSyntax.cs
new file mode 100644
index 00000000..46c6e0e8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RoleSyntax.cs
@@ -0,0 +1,228 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Implementation of the RoleSyntax object as specified by the RFC3281.
+ *
+ *
+ * RoleSyntax ::= SEQUENCE {
+ * roleAuthority [0] GeneralNames OPTIONAL,
+ * roleName [1] GeneralName
+ * }
+ *
+ */
+ public class RoleSyntax
+ : Asn1Encodable
+ {
+ private readonly GeneralNames roleAuthority;
+ private readonly GeneralName roleName;
+
+ /**
+ * RoleSyntax factory method.
+ * @param obj the object used to construct an instance of
+ * RoleSyntax. It must be an instance of RoleSyntax
+ * or Asn1Sequence.
+ * @return the instance of RoleSyntax built from the
+ * supplied object.
+ * @throws java.lang.ArgumentException if the object passed
+ * to the factory is not an instance of RoleSyntax or
+ * Asn1Sequence.
+ */
+ public static RoleSyntax GetInstance(
+ object obj)
+ {
+ if (obj is RoleSyntax)
+ return (RoleSyntax)obj;
+
+ if (obj != null)
+ return new RoleSyntax(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ /**
+ * Constructor.
+ * @param roleAuthority the role authority of this RoleSyntax.
+ * @param roleName the role name of this RoleSyntax.
+ */
+ public RoleSyntax(
+ GeneralNames roleAuthority,
+ GeneralName roleName)
+ {
+ if (roleName == null
+ || roleName.TagNo != GeneralName.UniformResourceIdentifier
+ || ((IAsn1String) roleName.Name).GetString().Equals(""))
+ {
+ throw new ArgumentException("the role name MUST be non empty and MUST " +
+ "use the URI option of GeneralName");
+ }
+
+ this.roleAuthority = roleAuthority;
+ this.roleName = roleName;
+ }
+
+ /**
+ * Constructor. Invoking this constructor is the same as invoking
+ * new RoleSyntax(null, roleName).
+ * @param roleName the role name of this RoleSyntax.
+ */
+ public RoleSyntax(
+ GeneralName roleName)
+ : this(null, roleName)
+ {
+ }
+
+ /**
+ * Utility constructor. Takes a string argument representing
+ * the role name, builds a GeneralName to hold the role name
+ * and calls the constructor that takes a GeneralName.
+ * @param roleName
+ */
+ public RoleSyntax(
+ string roleName)
+ : this(new GeneralName(GeneralName.UniformResourceIdentifier,
+ (roleName == null)? "": roleName))
+ {
+ }
+
+ /**
+ * Constructor that builds an instance of RoleSyntax by
+ * extracting the encoded elements from the Asn1Sequence
+ * object supplied.
+ * @param seq an instance of Asn1Sequence that holds
+ * the encoded elements used to build this RoleSyntax.
+ */
+ private RoleSyntax(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 1 || seq.Count > 2)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+
+ for (int i = 0; i != seq.Count; i++)
+ {
+ Asn1TaggedObject taggedObject = Asn1TaggedObject.GetInstance(seq[i]);
+ switch (taggedObject.TagNo)
+ {
+ case 0:
+ roleAuthority = GeneralNames.GetInstance(taggedObject, false);
+ break;
+ case 1:
+ roleName = GeneralName.GetInstance(taggedObject, true);
+ break;
+ default:
+ throw new ArgumentException("Unknown tag in RoleSyntax");
+ }
+ }
+ }
+
+ /**
+ * Gets the role authority of this RoleSyntax.
+ * @return an instance of GeneralNames holding the
+ * role authority of this RoleSyntax.
+ */
+ public GeneralNames RoleAuthority
+ {
+ get { return this.roleAuthority; }
+ }
+
+ /**
+ * Gets the role name of this RoleSyntax.
+ * @return an instance of GeneralName holding the
+ * role name of this RoleSyntax.
+ */
+ public GeneralName RoleName
+ {
+ get { return this.roleName; }
+ }
+
+ /**
+ * Gets the role name as a java.lang.string object.
+ * @return the role name of this RoleSyntax represented as a
+ * string object.
+ */
+ public string GetRoleNameAsString()
+ {
+ return ((IAsn1String) this.roleName.Name).GetString();
+ }
+
+ /**
+ * Gets the role authority as a string[] object.
+ * @return the role authority of this RoleSyntax represented as a
+ * string[] array.
+ */
+ public string[] GetRoleAuthorityAsString()
+ {
+ if (roleAuthority == null)
+ {
+ return new string[0];
+ }
+
+ GeneralName[] names = roleAuthority.GetNames();
+ string[] namesString = new string[names.Length];
+ for(int i = 0; i < names.Length; i++)
+ {
+ Asn1Encodable asn1Value = names[i].Name;
+ if (asn1Value is IAsn1String)
+ {
+ namesString[i] = ((IAsn1String) asn1Value).GetString();
+ }
+ else
+ {
+ namesString[i] = asn1Value.ToString();
+ }
+ }
+
+ return namesString;
+ }
+
+ /**
+ * Implementation of the method ToAsn1Object as
+ * required by the superclass ASN1Encodable.
+ *
+ *
+ * RoleSyntax ::= SEQUENCE {
+ * roleAuthority [0] GeneralNames OPTIONAL,
+ * roleName [1] GeneralName
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptionalTagged(false, 0, roleAuthority);
+ v.Add(new DerTaggedObject(true, 1, roleName));
+ return new DerSequence(v);
+ }
+
+ public override string ToString()
+ {
+ StringBuilder buff = new StringBuilder("Name: " + this.GetRoleNameAsString() +
+ " - Auth: ");
+
+ if (this.roleAuthority == null || roleAuthority.GetNames().Length == 0)
+ {
+ buff.Append("N/A");
+ }
+ else
+ {
+ string[] names = this.GetRoleAuthorityAsString();
+ buff.Append('[').Append(names[0]);
+ for(int i = 1; i < names.Length; i++)
+ {
+ buff.Append(", ").Append(names[i]);
+ }
+ buff.Append(']');
+ }
+
+ return buff.ToString();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RoleSyntax.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RoleSyntax.cs.meta
new file mode 100644
index 00000000..191fcca1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/RoleSyntax.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d84b92d4f55d51d4cbba5f4886693fe8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectDirectoryAttributes.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectDirectoryAttributes.cs
new file mode 100644
index 00000000..1f266610
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectDirectoryAttributes.cs
@@ -0,0 +1,137 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * This extension may contain further X.500 attributes of the subject. See also
+ * RFC 3039.
+ *
+ *
+ * SubjectDirectoryAttributes ::= Attributes
+ * Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ * Attribute ::= SEQUENCE
+ * {
+ * type AttributeType
+ * values SET OF AttributeValue
+ * }
+ *
+ * AttributeType ::= OBJECT IDENTIFIER
+ * AttributeValue ::= ANY DEFINED BY AttributeType
+ *
+ *
+ * @see org.bouncycastle.asn1.x509.X509Name for AttributeType ObjectIdentifiers.
+ */
+ public class SubjectDirectoryAttributes
+ : Asn1Encodable
+ {
+ private readonly IList m_attributes;
+
+ public static SubjectDirectoryAttributes GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is SubjectDirectoryAttributes)
+ {
+ return (SubjectDirectoryAttributes) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new SubjectDirectoryAttributes((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * The sequence is of type SubjectDirectoryAttributes:
+ *
+ *
+ * SubjectDirectoryAttributes ::= Attributes
+ * Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ * Attribute ::= SEQUENCE
+ * {
+ * type AttributeType
+ * values SET OF AttributeValue
+ * }
+ *
+ * AttributeType ::= OBJECT IDENTIFIER
+ * AttributeValue ::= ANY DEFINED BY AttributeType
+ *
+ *
+ * @param seq
+ * The ASN.1 sequence.
+ */
+ private SubjectDirectoryAttributes(
+ Asn1Sequence seq)
+ {
+ m_attributes = new List();
+
+ foreach (object o in seq)
+ {
+ Asn1Sequence s = Asn1Sequence.GetInstance(o);
+ m_attributes.Add(AttributeX509.GetInstance(s));
+ }
+ }
+
+ /**
+ * Constructor from an ArrayList of attributes.
+ *
+ * The ArrayList consists of attributes of type {@link Attribute Attribute}
+ *
+ * @param attributes The attributes.
+ *
+ */
+ public SubjectDirectoryAttributes(IList attributes)
+ {
+ m_attributes = new List(attributes);
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * SubjectDirectoryAttributes ::= Attributes
+ * Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ * Attribute ::= SEQUENCE
+ * {
+ * type AttributeType
+ * values SET OF AttributeValue
+ * }
+ *
+ * AttributeType ::= OBJECT IDENTIFIER
+ * AttributeValue ::= ANY DEFINED BY AttributeType
+ *
+ *
+ * @return a DERObject
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ AttributeX509[] v = new AttributeX509[m_attributes.Count];
+ for (int i = 0; i < m_attributes.Count; ++i)
+ {
+ v[i] = m_attributes[i];
+ }
+ return new DerSequence(v);
+ }
+
+ /**
+ * @return Returns the attributes.
+ */
+ public IEnumerable Attributes
+ {
+ get { return CollectionUtilities.Proxy(m_attributes); }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectDirectoryAttributes.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectDirectoryAttributes.cs.meta
new file mode 100644
index 00000000..0fb62311
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectDirectoryAttributes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e63f3e4524e010544b8d379637ab3a11
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectKeyIdentifier.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectKeyIdentifier.cs
new file mode 100644
index 00000000..13818cab
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectKeyIdentifier.cs
@@ -0,0 +1,136 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The SubjectKeyIdentifier object.
+ *
+ * SubjectKeyIdentifier::= OCTET STRING
+ *
+ */
+ public class SubjectKeyIdentifier
+ : Asn1Encodable
+ {
+ public static SubjectKeyIdentifier GetInstance(Asn1TaggedObject obj, bool explicitly)
+ {
+ return GetInstance(Asn1OctetString.GetInstance(obj, explicitly));
+ }
+
+ public static SubjectKeyIdentifier GetInstance(object obj)
+ {
+ if (obj is SubjectKeyIdentifier)
+ return (SubjectKeyIdentifier)obj;
+ if (obj is SubjectPublicKeyInfo)
+ return new SubjectKeyIdentifier((SubjectPublicKeyInfo)obj);
+ if (obj is X509Extension)
+ return GetInstance(X509Extension.ConvertValueToObject((X509Extension)obj));
+ if (obj == null)
+ return null;
+ return new SubjectKeyIdentifier(Asn1OctetString.GetInstance(obj));
+ }
+
+ public static SubjectKeyIdentifier FromExtensions(X509Extensions extensions)
+ {
+ return GetInstance(X509Extensions.GetExtensionParsedValue(extensions, X509Extensions.SubjectKeyIdentifier));
+ }
+
+ private readonly byte[] keyIdentifier;
+
+ public SubjectKeyIdentifier(
+ byte[] keyID)
+ {
+ if (keyID == null)
+ throw new ArgumentNullException("keyID");
+
+ this.keyIdentifier = Arrays.Clone(keyID);
+ }
+
+ public SubjectKeyIdentifier(
+ Asn1OctetString keyID)
+ : this(keyID.GetOctets())
+ {
+ }
+
+ /**
+ * Calculates the keyIdentifier using a SHA1 hash over the BIT STRING
+ * from SubjectPublicKeyInfo as defined in RFC3280.
+ *
+ * @param spki the subject public key info.
+ */
+ public SubjectKeyIdentifier(
+ SubjectPublicKeyInfo spki)
+ {
+ this.keyIdentifier = GetDigest(spki);
+ }
+
+ public byte[] GetKeyIdentifier()
+ {
+ return Arrays.Clone(keyIdentifier);
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerOctetString(GetKeyIdentifier());
+ }
+
+ /**
+ * Return a RFC 3280 type 1 key identifier. As in:
+ *
+ * (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the
+ * value of the BIT STRING subjectPublicKey (excluding the tag,
+ * length, and number of unused bits).
+ *
+ * @param keyInfo the key info object containing the subjectPublicKey field.
+ * @return the key identifier.
+ */
+ public static SubjectKeyIdentifier CreateSha1KeyIdentifier(
+ SubjectPublicKeyInfo keyInfo)
+ {
+ return new SubjectKeyIdentifier(keyInfo);
+ }
+
+ /**
+ * Return a RFC 3280 type 2 key identifier. As in:
+ *
+ * (2) The keyIdentifier is composed of a four bit type field with
+ * the value 0100 followed by the least significant 60 bits of the
+ * SHA-1 hash of the value of the BIT STRING subjectPublicKey.
+ *
+ * @param keyInfo the key info object containing the subjectPublicKey field.
+ * @return the key identifier.
+ */
+ public static SubjectKeyIdentifier CreateTruncatedSha1KeyIdentifier(
+ SubjectPublicKeyInfo keyInfo)
+ {
+ byte[] dig = GetDigest(keyInfo);
+ byte[] id = new byte[8];
+
+ Array.Copy(dig, dig.Length - 8, id, 0, id.Length);
+
+ id[0] &= 0x0f;
+ id[0] |= 0x40;
+
+ return new SubjectKeyIdentifier(id);
+ }
+
+ private static byte[] GetDigest(
+ SubjectPublicKeyInfo spki)
+ {
+ IDigest digest = new Sha1Digest();
+ byte[] resBuf = new byte[digest.GetDigestSize()];
+
+ byte[] bytes = spki.PublicKeyData.GetBytes();
+ digest.BlockUpdate(bytes, 0, bytes.Length);
+ digest.DoFinal(resBuf, 0);
+ return resBuf;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectKeyIdentifier.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectKeyIdentifier.cs.meta
new file mode 100644
index 00000000..0be1a064
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectKeyIdentifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 10e4966ea65e15f488280b6f40d23903
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectPublicKeyInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectPublicKeyInfo.cs
new file mode 100644
index 00000000..26c90d76
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectPublicKeyInfo.cs
@@ -0,0 +1,105 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The object that contains the public key stored in a certficate.
+ *
+ * The GetEncoded() method in the public keys in the JCE produces a DER
+ * encoded one of these.
+ */
+ public class SubjectPublicKeyInfo
+ : Asn1Encodable
+ {
+ private readonly AlgorithmIdentifier algID;
+ private readonly DerBitString keyData;
+
+ public static SubjectPublicKeyInfo GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static SubjectPublicKeyInfo GetInstance(
+ object obj)
+ {
+ if (obj is SubjectPublicKeyInfo)
+ return (SubjectPublicKeyInfo) obj;
+
+ if (obj != null)
+ return new SubjectPublicKeyInfo(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public SubjectPublicKeyInfo(
+ AlgorithmIdentifier algID,
+ Asn1Encodable publicKey)
+ {
+ this.keyData = new DerBitString(publicKey);
+ this.algID = algID;
+ }
+
+ public SubjectPublicKeyInfo(
+ AlgorithmIdentifier algID,
+ byte[] publicKey)
+ {
+ this.keyData = new DerBitString(publicKey);
+ this.algID = algID;
+ }
+
+ private SubjectPublicKeyInfo(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.algID = AlgorithmIdentifier.GetInstance(seq[0]);
+ this.keyData = DerBitString.GetInstance(seq[1]);
+ }
+
+ public AlgorithmIdentifier AlgorithmID
+ {
+ get { return algID; }
+ }
+
+ /**
+ * for when the public key is an encoded object - if the bitstring
+ * can't be decoded this routine raises an IOException.
+ *
+ * @exception IOException - if the bit string doesn't represent a Der
+ * encoded object.
+ */
+ public Asn1Object ParsePublicKey()
+ {
+ return Asn1Object.FromByteArray(keyData.GetOctets());
+ }
+
+ /**
+ * for when the public key is raw bits...
+ */
+ public DerBitString PublicKeyData
+ {
+ get { return keyData; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * SubjectPublicKeyInfo ::= Sequence {
+ * algorithm AlgorithmIdentifier,
+ * publicKey BIT STRING }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(algID, keyData);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectPublicKeyInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectPublicKeyInfo.cs.meta
new file mode 100644
index 00000000..9e38ba35
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/SubjectPublicKeyInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dbbb93bf96759c44c9a717aeae4fdd73
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertList.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertList.cs
new file mode 100644
index 00000000..37178d25
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertList.cs
@@ -0,0 +1,285 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class CrlEntry
+ : Asn1Encodable
+ {
+ internal Asn1Sequence seq;
+ internal DerInteger userCertificate;
+ internal Time revocationDate;
+ internal X509Extensions crlEntryExtensions;
+
+ public CrlEntry(Asn1Sequence seq)
+ {
+ if (seq.Count < 2 || seq.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ this.seq = seq;
+
+ userCertificate = DerInteger.GetInstance(seq[0]);
+ revocationDate = Time.GetInstance(seq[1]);
+ }
+
+ public DerInteger UserCertificate
+ {
+ get { return userCertificate; }
+ }
+
+ public Time RevocationDate
+ {
+ get { return revocationDate; }
+ }
+
+ public X509Extensions Extensions
+ {
+ get
+ {
+ if (crlEntryExtensions == null && seq.Count == 3)
+ {
+ crlEntryExtensions = X509Extensions.GetInstance(seq[2]);
+ }
+
+ return crlEntryExtensions;
+ }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return seq;
+ }
+ }
+
+ /**
+ * PKIX RFC-2459 - TbsCertList object.
+ *
+ * TbsCertList ::= Sequence {
+ * version Version OPTIONAL,
+ * -- if present, shall be v2
+ * signature AlgorithmIdentifier,
+ * issuer Name,
+ * thisUpdate Time,
+ * nextUpdate Time OPTIONAL,
+ * revokedCertificates Sequence OF Sequence {
+ * userCertificate CertificateSerialNumber,
+ * revocationDate Time,
+ * crlEntryExtensions Extensions OPTIONAL
+ * -- if present, shall be v2
+ * } OPTIONAL,
+ * crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ * -- if present, shall be v2
+ * }
+ *
+ */
+ public class TbsCertificateList
+ : Asn1Encodable
+ {
+ private class RevokedCertificatesEnumeration
+ : IEnumerable
+ {
+ private readonly IEnumerable en;
+
+ internal RevokedCertificatesEnumeration(IEnumerable en)
+ {
+ this.en = en;
+ }
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ return new RevokedCertificatesEnumerator(en.GetEnumerator());
+ }
+
+ private class RevokedCertificatesEnumerator
+ : IEnumerator
+ {
+ private readonly IEnumerator e;
+
+ internal RevokedCertificatesEnumerator(IEnumerator e)
+ {
+ this.e = e;
+ }
+
+ public virtual void Dispose()
+ {
+ }
+
+ public bool MoveNext()
+ {
+ return e.MoveNext();
+ }
+
+ public void Reset()
+ {
+ e.Reset();
+ }
+
+ object System.Collections.IEnumerator.Current
+ {
+ get { return Current; }
+ }
+
+ public CrlEntry Current
+ {
+ get { return new CrlEntry(Asn1Sequence.GetInstance(e.Current)); }
+ }
+ }
+ }
+
+ internal Asn1Sequence seq;
+ internal DerInteger version;
+ internal AlgorithmIdentifier signature;
+ internal X509Name issuer;
+ internal Time thisUpdate;
+ internal Time nextUpdate;
+ internal Asn1Sequence revokedCertificates;
+ internal X509Extensions crlExtensions;
+
+ public static TbsCertificateList GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static TbsCertificateList GetInstance(
+ object obj)
+ {
+ TbsCertificateList list = obj as TbsCertificateList;
+
+ if (obj == null || list != null)
+ {
+ return list;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new TbsCertificateList((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ internal TbsCertificateList(
+ Asn1Sequence seq)
+ {
+ if (seq.Count < 3 || seq.Count > 7)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+
+ int seqPos = 0;
+
+ this.seq = seq;
+
+ if (seq[seqPos] is DerInteger)
+ {
+ version = DerInteger.GetInstance(seq[seqPos++]);
+ }
+ else
+ {
+ version = new DerInteger(0);
+ }
+
+ signature = AlgorithmIdentifier.GetInstance(seq[seqPos++]);
+ issuer = X509Name.GetInstance(seq[seqPos++]);
+ thisUpdate = Time.GetInstance(seq[seqPos++]);
+
+ if (seqPos < seq.Count
+ && (seq[seqPos] is Asn1UtcTime
+ || seq[seqPos] is Asn1GeneralizedTime
+ || seq[seqPos] is Time))
+ {
+ nextUpdate = Time.GetInstance(seq[seqPos++]);
+ }
+
+ if (seqPos < seq.Count
+ && !(seq[seqPos] is Asn1TaggedObject))
+ {
+ revokedCertificates = Asn1Sequence.GetInstance(seq[seqPos++]);
+ }
+
+ if (seqPos < seq.Count
+ && seq[seqPos] is Asn1TaggedObject)
+ {
+ crlExtensions = X509Extensions.GetInstance(seq[seqPos]);
+ }
+ }
+
+ public int Version
+ {
+ get { return version.IntValueExact + 1; }
+ }
+
+ public DerInteger VersionNumber
+ {
+ get { return version; }
+ }
+
+ public AlgorithmIdentifier Signature
+ {
+ get { return signature; }
+ }
+
+ public X509Name Issuer
+ {
+ get { return issuer; }
+ }
+
+ public Time ThisUpdate
+ {
+ get { return thisUpdate; }
+ }
+
+ public Time NextUpdate
+ {
+ get { return nextUpdate; }
+ }
+
+ public CrlEntry[] GetRevokedCertificates()
+ {
+ if (revokedCertificates == null)
+ {
+ return new CrlEntry[0];
+ }
+
+ CrlEntry[] entries = new CrlEntry[revokedCertificates.Count];
+
+ for (int i = 0; i < entries.Length; i++)
+ {
+ entries[i] = new CrlEntry(Asn1Sequence.GetInstance(revokedCertificates[i]));
+ }
+
+ return entries;
+ }
+
+ public IEnumerable GetRevokedCertificateEnumeration()
+ {
+ if (revokedCertificates == null)
+ return new List(0);
+
+ return new RevokedCertificatesEnumeration(revokedCertificates);
+ }
+
+ public X509Extensions Extensions
+ {
+ get { return crlExtensions; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return seq;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertList.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertList.cs.meta
new file mode 100644
index 00000000..80147da2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertList.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c1511051cab8c684f8babf210ce65f01
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertificateStructure.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertificateStructure.cs
new file mode 100644
index 00000000..05e3c87c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertificateStructure.cs
@@ -0,0 +1,260 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The TbsCertificate object.
+ *
+ * TbsCertificate ::= Sequence {
+ * version [ 0 ] Version DEFAULT v1(0),
+ * serialNumber CertificateSerialNumber,
+ * signature AlgorithmIdentifier,
+ * issuer Name,
+ * validity Validity,
+ * subject Name,
+ * subjectPublicKeyInfo SubjectPublicKeyInfo,
+ * issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ * subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ * extensions [ 3 ] Extensions OPTIONAL
+ * }
+ *
+ *
+ * Note: issuerUniqueID and subjectUniqueID are both deprecated by the IETF. This class
+ * will parse them, but you really shouldn't be creating new ones.
+ */
+ public class TbsCertificateStructure
+ : Asn1Encodable
+ {
+ internal Asn1Sequence seq;
+ internal DerInteger version;
+ internal DerInteger serialNumber;
+ internal AlgorithmIdentifier signature;
+ internal X509Name issuer;
+ internal Time startDate, endDate;
+ internal X509Name subject;
+ internal SubjectPublicKeyInfo subjectPublicKeyInfo;
+ internal DerBitString issuerUniqueID;
+ internal DerBitString subjectUniqueID;
+ internal X509Extensions extensions;
+
+ public static TbsCertificateStructure GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static TbsCertificateStructure GetInstance(
+ object obj)
+ {
+ if (obj is TbsCertificateStructure)
+ return (TbsCertificateStructure) obj;
+
+ if (obj != null)
+ return new TbsCertificateStructure(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ internal TbsCertificateStructure(
+ Asn1Sequence seq)
+ {
+ int seqStart = 0;
+
+ this.seq = seq;
+
+ //
+ // some certficates don't include a version number - we assume v1
+ //
+ if (seq[0] is Asn1TaggedObject)
+ {
+ version = DerInteger.GetInstance((Asn1TaggedObject)seq[0], true);
+ }
+ else
+ {
+ seqStart = -1; // field 0 is missing!
+ version = new DerInteger(0);
+ }
+
+ bool isV1 = false;
+ bool isV2 = false;
+
+ if (version.HasValue(0))
+ {
+ isV1 = true;
+ }
+ else if (version.HasValue(1))
+ {
+ isV2 = true;
+ }
+ else if (!version.HasValue(2))
+ {
+ throw new ArgumentException("version number not recognised");
+ }
+
+ serialNumber = DerInteger.GetInstance(seq[seqStart + 1]);
+
+ signature = AlgorithmIdentifier.GetInstance(seq[seqStart + 2]);
+ issuer = X509Name.GetInstance(seq[seqStart + 3]);
+
+ //
+ // before and after dates
+ //
+ Asn1Sequence dates = (Asn1Sequence)seq[seqStart + 4];
+
+ startDate = Time.GetInstance(dates[0]);
+ endDate = Time.GetInstance(dates[1]);
+
+ subject = X509Name.GetInstance(seq[seqStart + 5]);
+
+ //
+ // public key info.
+ //
+ subjectPublicKeyInfo = SubjectPublicKeyInfo.GetInstance(seq[seqStart + 6]);
+
+ int extras = seq.Count - (seqStart + 6) - 1;
+ if (extras != 0 && isV1)
+ throw new ArgumentException("version 1 certificate contains extra data");
+
+ while (extras > 0)
+ {
+ Asn1TaggedObject extra = Asn1TaggedObject.GetInstance(seq[seqStart + 6 + extras]);
+ switch (extra.TagNo)
+ {
+ case 1:
+ {
+ issuerUniqueID = DerBitString.GetInstance(extra, false);
+ break;
+ }
+ case 2:
+ {
+ subjectUniqueID = DerBitString.GetInstance(extra, false);
+ break;
+ }
+ case 3:
+ {
+ if (isV2)
+ throw new ArgumentException("version 2 certificate cannot contain extensions");
+
+ extensions = X509Extensions.GetInstance(Asn1Sequence.GetInstance(extra, true));
+ break;
+ }
+ default:
+ {
+ throw new ArgumentException("Unknown tag encountered in structure: " + extra.TagNo);
+ }
+ }
+ extras--;
+ }
+ }
+
+ public int Version
+ {
+ get { return version.IntValueExact + 1; }
+ }
+
+ public DerInteger VersionNumber
+ {
+ get { return version; }
+ }
+
+ public DerInteger SerialNumber
+ {
+ get { return serialNumber; }
+ }
+
+ public AlgorithmIdentifier Signature
+ {
+ get { return signature; }
+ }
+
+ public X509Name Issuer
+ {
+ get { return issuer; }
+ }
+
+ public Time StartDate
+ {
+ get { return startDate; }
+ }
+
+ public Time EndDate
+ {
+ get { return endDate; }
+ }
+
+ public X509Name Subject
+ {
+ get { return subject; }
+ }
+
+ public SubjectPublicKeyInfo SubjectPublicKeyInfo
+ {
+ get { return subjectPublicKeyInfo; }
+ }
+
+ public DerBitString IssuerUniqueID
+ {
+ get { return issuerUniqueID; }
+ }
+
+ public DerBitString SubjectUniqueID
+ {
+ get { return subjectUniqueID; }
+ }
+
+ public X509Extensions Extensions
+ {
+ get { return extensions; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ string property = Org.BouncyCastle.Utilities.Platform.GetEnvironmentVariable("Best.HTTP.SecureProtocol.Org.BouncyCastle.X509.Allow_Non-DER_TBSCert");
+ if (null == property || Org.BouncyCastle.Utilities.Platform.EqualsIgnoreCase("true", property))
+ return seq;
+
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ // DEFAULT Zero
+ if (!version.HasValue(0))
+ {
+ v.Add(new DerTaggedObject(true, 0, version));
+ }
+
+ v.Add(serialNumber, signature, issuer);
+
+ //
+ // before and after dates
+ //
+ v.Add(new DerSequence(startDate, endDate));
+
+ if (subject != null)
+ {
+ v.Add(subject);
+ }
+ else
+ {
+ v.Add(DerSequence.Empty);
+ }
+
+ v.Add(subjectPublicKeyInfo);
+
+ // Note: implicit tag
+ v.AddOptionalTagged(false, 1, issuerUniqueID);
+
+ // Note: implicit tag
+ v.AddOptionalTagged(false, 2, subjectUniqueID);
+
+ v.AddOptionalTagged(true, 3, extensions);
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertificateStructure.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertificateStructure.cs.meta
new file mode 100644
index 00000000..c8974d1c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TBSCertificateStructure.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d3e198666d87c8f40baffa2ebdc1bcfc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Target.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Target.cs
new file mode 100644
index 00000000..ff481fe1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Target.cs
@@ -0,0 +1,145 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Target structure used in target information extension for attribute
+ * certificates from RFC 3281.
+ *
+ *
+ * Target ::= CHOICE {
+ * targetName [0] GeneralName,
+ * targetGroup [1] GeneralName,
+ * targetCert [2] TargetCert
+ * }
+ *
+ *
+ *
+ * The targetCert field is currently not supported and must not be used
+ * according to RFC 3281.
+ */
+ public class Target
+ : Asn1Encodable, IAsn1Choice
+ {
+ public enum Choice
+ {
+ Name = 0,
+ Group = 1
+ };
+
+ private readonly GeneralName targetName;
+ private readonly GeneralName targetGroup;
+
+ /**
+ * Creates an instance of a Target from the given object.
+ *
+ * obj can be a Target or a {@link Asn1TaggedObject}
+ *
+ * @param obj The object.
+ * @return A Target instance.
+ * @throws ArgumentException if the given object cannot be
+ * interpreted as Target.
+ */
+ public static Target GetInstance(
+ object obj)
+ {
+ if (obj is Target)
+ {
+ return (Target) obj;
+ }
+
+ if (obj is Asn1TaggedObject)
+ {
+ return new Target((Asn1TaggedObject) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1TaggedObject.
+ *
+ * @param tagObj The tagged object.
+ * @throws ArgumentException if the encoding is wrong.
+ */
+ private Target(
+ Asn1TaggedObject tagObj)
+ {
+ switch ((Choice) tagObj.TagNo)
+ {
+ case Choice.Name: // GeneralName is already a choice so explicit
+ targetName = GeneralName.GetInstance(tagObj, true);
+ break;
+ case Choice.Group:
+ targetGroup = GeneralName.GetInstance(tagObj, true);
+ break;
+ default:
+ throw new ArgumentException("unknown tag: " + tagObj.TagNo);
+ }
+ }
+
+ /**
+ * Constructor from given details.
+ *
+ * Exactly one of the parameters must be not null.
+ *
+ * @param type the choice type to apply to the name.
+ * @param name the general name.
+ * @throws ArgumentException if type is invalid.
+ */
+ public Target(
+ Choice type,
+ GeneralName name)
+ : this(new DerTaggedObject((int) type, name))
+ {
+ }
+
+ /**
+ * @return Returns the targetGroup.
+ */
+ public virtual GeneralName TargetGroup
+ {
+ get { return targetGroup; }
+ }
+
+ /**
+ * @return Returns the targetName.
+ */
+ public virtual GeneralName TargetName
+ {
+ get { return targetName; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * Target ::= CHOICE {
+ * targetName [0] GeneralName,
+ * targetGroup [1] GeneralName,
+ * targetCert [2] TargetCert
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ // GeneralName is a choice already so most be explicitly tagged
+ if (targetName != null)
+ {
+ return new DerTaggedObject(true, 0, targetName);
+ }
+
+ return new DerTaggedObject(true, 1, targetGroup);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Target.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Target.cs.meta
new file mode 100644
index 00000000..673a6be0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Target.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7141fee3cd8dc574aa45fc18314aca83
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TargetInformation.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TargetInformation.cs
new file mode 100644
index 00000000..df7bb9a7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TargetInformation.cs
@@ -0,0 +1,129 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Target information extension for attributes certificates according to RFC
+ * 3281.
+ *
+ *
+ * SEQUENCE OF Targets
+ *
+ *
+ */
+ public class TargetInformation
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence targets;
+
+ /**
+ * Creates an instance of a TargetInformation from the given object.
+ *
+ * obj can be a TargetInformation or a {@link Asn1Sequence}
+ *
+ * @param obj The object.
+ * @return A TargetInformation instance.
+ * @throws ArgumentException if the given object cannot be interpreted as TargetInformation.
+ */
+ public static TargetInformation GetInstance(
+ object obj)
+ {
+ if (obj is TargetInformation)
+ {
+ return (TargetInformation) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new TargetInformation((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from a Asn1Sequence.
+ *
+ * @param seq The Asn1Sequence.
+ * @throws ArgumentException if the sequence does not contain
+ * correctly encoded Targets elements.
+ */
+ private TargetInformation(
+ Asn1Sequence targets)
+ {
+ this.targets = targets;
+ }
+
+ /**
+ * Returns the targets in this target information extension.
+ *
+ * The ArrayList is cloned before it is returned.
+ *
+ * @return Returns the targets.
+ */
+ public virtual Targets[] GetTargetsObjects()
+ {
+ Targets[] result = new Targets[targets.Count];
+
+ for (int i = 0; i < targets.Count; ++i)
+ {
+ result[i] = Targets.GetInstance(targets[i]);
+ }
+
+ return result;
+ }
+
+ /**
+ * Constructs a target information from a single targets element.
+ * According to RFC 3281 only one targets element must be produced.
+ *
+ * @param targets A Targets instance.
+ */
+ public TargetInformation(
+ Targets targets)
+ {
+ this.targets = new DerSequence(targets);
+ }
+
+ /**
+ * According to RFC 3281 only one targets element must be produced. If
+ * multiple targets are given they must be merged in
+ * into one targets element.
+ *
+ * @param targets An array with {@link Targets}.
+ */
+ public TargetInformation(
+ Target[] targets)
+ : this(new Targets(targets))
+ {
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * SEQUENCE OF Targets
+ *
+ *
+ *
+ * According to RFC 3281 only one targets element must be produced. If
+ * multiple targets are given in the constructor they are merged into one
+ * targets element. If this was produced from a
+ * {@link Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Sequence} the encoding is kept.
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return targets;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TargetInformation.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TargetInformation.cs.meta
new file mode 100644
index 00000000..ea57e7b5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/TargetInformation.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 60045f003b5ce444f98ac7ba555a1a24
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Targets.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Targets.cs
new file mode 100644
index 00000000..c30754b3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Targets.cs
@@ -0,0 +1,127 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Targets structure used in target information extension for attribute
+ * certificates from RFC 3281.
+ *
+ *
+ * Targets ::= SEQUENCE OF Target
+ *
+ * Target ::= CHOICE {
+ * targetName [0] GeneralName,
+ * targetGroup [1] GeneralName,
+ * targetCert [2] TargetCert
+ * }
+ *
+ * TargetCert ::= SEQUENCE {
+ * targetCertificate IssuerSerial,
+ * targetName GeneralName OPTIONAL,
+ * certDigestInfo ObjectDigestInfo OPTIONAL
+ * }
+ *
+ *
+ * @see org.bouncycastle.asn1.x509.Target
+ * @see org.bouncycastle.asn1.x509.TargetInformation
+ */
+ public class Targets
+ : Asn1Encodable
+ {
+ private readonly Asn1Sequence targets;
+
+ /**
+ * Creates an instance of a Targets from the given object.
+ *
+ * obj can be a Targets or a {@link Asn1Sequence}
+ *
+ * @param obj The object.
+ * @return A Targets instance.
+ * @throws ArgumentException if the given object cannot be interpreted as Target.
+ */
+ public static Targets GetInstance(
+ object obj)
+ {
+ if (obj is Targets)
+ {
+ return (Targets) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new Targets((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * @param targets The ASN.1 SEQUENCE.
+ * @throws ArgumentException if the contents of the sequence are
+ * invalid.
+ */
+ private Targets(
+ Asn1Sequence targets)
+ {
+ this.targets = targets;
+ }
+
+ /**
+ * Constructor from given targets.
+ *
+ * The ArrayList is copied.
+ *
+ * @param targets An ArrayList of {@link Target}s.
+ * @see Target
+ * @throws ArgumentException if the ArrayList contains not only Targets.
+ */
+ public Targets(
+ Target[] targets)
+ {
+ this.targets = new DerSequence(targets);
+ }
+
+ /**
+ * Returns the targets in an ArrayList.
+ *
+ * The ArrayList is cloned before it is returned.
+ *
+ * @return Returns the targets.
+ */
+ public virtual Target[] GetTargets()
+ {
+ Target[] result = new Target[targets.Count];
+
+ for (int i = 0; i < targets.Count; ++i)
+ {
+ result[i] = Target.GetInstance(targets[i]);
+ }
+
+ return result;
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * Targets ::= SEQUENCE OF Target
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return targets;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Targets.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Targets.cs.meta
new file mode 100644
index 00000000..3b5bbc9a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Targets.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0cbe878092175ba47acf851f396ef177
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Time.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Time.cs
new file mode 100644
index 00000000..d7b063ff
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Time.cs
@@ -0,0 +1,115 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Globalization;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class Time
+ : Asn1Encodable, IAsn1Choice
+ {
+ public static Time GetInstance(object obj)
+ {
+ if (obj == null)
+ return null;
+ if (obj is Time time)
+ return time;
+ if (obj is Asn1UtcTime utcTime)
+ return new Time(utcTime);
+ if (obj is Asn1GeneralizedTime generalizedTime)
+ return new Time(generalizedTime);
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
+ }
+
+ public static Time GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return GetInstance(taggedObject.GetObject());
+ }
+
+ private readonly Asn1Object m_timeObject;
+
+ public Time(Asn1GeneralizedTime generalizedTime)
+ {
+ this.m_timeObject = generalizedTime ?? throw new ArgumentNullException(nameof(generalizedTime));
+ }
+
+ public Time(Asn1UtcTime utcTime)
+ {
+ if (utcTime == null)
+ throw new ArgumentNullException(nameof(utcTime));
+
+ // Validate utcTime is in the appropriate year range
+ utcTime.ToDateTime(2049);
+
+ this.m_timeObject = utcTime;
+ }
+
+ /**
+ * creates a time object from a given date - if the date is between 1950
+ * and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ * is used.
+ */
+ public Time(DateTime date)
+ {
+ DateTime utc = date.ToUniversalTime();
+
+ if (utc.Year < 1950 || utc.Year > 2049)
+ {
+ m_timeObject = new DerGeneralizedTime(utc);
+ }
+ else
+ {
+ m_timeObject = new DerUtcTime(utc, 2049);
+ }
+ }
+
+ ///
+ /// Return our time as DateTime.
+ ///
+ /// A date time.
+ public DateTime ToDateTime()
+ {
+ try
+ {
+ if (m_timeObject is Asn1UtcTime utcTime)
+ return utcTime.ToDateTime(2049);
+
+ return ((Asn1GeneralizedTime)m_timeObject).ToDateTime();
+ }
+ catch (FormatException e)
+ {
+ // this should never happen
+ throw new InvalidOperationException("invalid date string: " + e.Message);
+ }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Time ::= CHOICE {
+ * utcTime UTCTime,
+ * generalTime GeneralizedTime }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return m_timeObject;
+ }
+
+ public override string ToString()
+ {
+ if (m_timeObject is Asn1UtcTime utcTime)
+ return utcTime.ToDateTime(2049).ToString(@"yyyyMMddHHmmssK", DateTimeFormatInfo.InvariantInfo);
+
+ if (m_timeObject is Asn1GeneralizedTime generalizedTime)
+ return generalizedTime.ToDateTime().ToString(@"yyyyMMddHHmmss.FFFFFFFK", DateTimeFormatInfo.InvariantInfo);
+
+ throw new InvalidOperationException();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Time.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Time.cs.meta
new file mode 100644
index 00000000..2d63cda8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/Time.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7661a3e009296174483a3aefb74dffd4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/UserNotice.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/UserNotice.cs
new file mode 100644
index 00000000..b65f677f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/UserNotice.cs
@@ -0,0 +1,113 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * UserNotice class, used in
+ * CertificatePolicies X509 extensions (in policy
+ * qualifiers).
+ *
+ * UserNotice ::= Sequence {
+ * noticeRef NoticeReference OPTIONAL,
+ * explicitText DisplayText OPTIONAL}
+ *
+ *
+ *
+ * @see PolicyQualifierId
+ * @see PolicyInformation
+ */
+ public class UserNotice
+ : Asn1Encodable
+ {
+ private readonly NoticeReference noticeRef;
+ private readonly DisplayText explicitText;
+
+ /**
+ * Creates a new UserNotice instance.
+ *
+ * @param noticeRef a NoticeReference value
+ * @param explicitText a DisplayText value
+ */
+ public UserNotice(
+ NoticeReference noticeRef,
+ DisplayText explicitText)
+ {
+ this.noticeRef = noticeRef;
+ this.explicitText = explicitText;
+ }
+
+ /**
+ * Creates a new UserNotice instance.
+ *
+ * @param noticeRef a NoticeReference value
+ * @param str the explicitText field as a string.
+ */
+ public UserNotice(
+ NoticeReference noticeRef,
+ string str)
+ : this(noticeRef, new DisplayText(str))
+ {
+ }
+
+ private UserNotice(Asn1Sequence seq)
+ {
+ if (seq.Count == 2)
+ {
+ noticeRef = NoticeReference.GetInstance(seq[0]);
+ explicitText = DisplayText.GetInstance(seq[1]);
+ }
+ else if (seq.Count == 1)
+ {
+ if (seq[0].ToAsn1Object() is Asn1Sequence)
+ {
+ noticeRef = NoticeReference.GetInstance(seq[0]);
+ explicitText = null;
+ }
+ else
+ {
+ noticeRef = null;
+ explicitText = DisplayText.GetInstance(seq[0]);
+ }
+ }
+ else if (seq.Count == 0)
+ {
+ noticeRef = null; // neither field set!
+ explicitText = null;
+ }
+ else
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+ }
+
+ public static UserNotice GetInstance(object obj)
+ {
+ if (obj is UserNotice)
+ return (UserNotice)obj;
+ if (obj == null)
+ return null;
+ return new UserNotice(Asn1Sequence.GetInstance(obj));
+ }
+
+ public virtual NoticeReference NoticeRef
+ {
+ get { return noticeRef; }
+ }
+
+ public virtual DisplayText ExplicitText
+ {
+ get { return explicitText; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(noticeRef, explicitText);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/UserNotice.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/UserNotice.cs.meta
new file mode 100644
index 00000000..40be039e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/UserNotice.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ed355fb2578b781478b5022c8c8d232d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V1TBSCertificateGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V1TBSCertificateGenerator.cs
new file mode 100644
index 00000000..400eaed0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V1TBSCertificateGenerator.cs
@@ -0,0 +1,112 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Generator for Version 1 TbsCertificateStructures.
+ *
+ * TbsCertificate ::= Sequence {
+ * version [ 0 ] Version DEFAULT v1(0),
+ * serialNumber CertificateSerialNumber,
+ * signature AlgorithmIdentifier,
+ * issuer Name,
+ * validity Validity,
+ * subject Name,
+ * subjectPublicKeyInfo SubjectPublicKeyInfo,
+ * }
+ *
+ *
+ */
+ public class V1TbsCertificateGenerator
+ {
+ internal DerTaggedObject version = new DerTaggedObject(0, new DerInteger(0));
+ internal DerInteger serialNumber;
+ internal AlgorithmIdentifier signature;
+ internal X509Name issuer;
+ internal Time startDate, endDate;
+ internal X509Name subject;
+ internal SubjectPublicKeyInfo subjectPublicKeyInfo;
+
+ public V1TbsCertificateGenerator()
+ {
+ }
+
+ public void SetSerialNumber(
+ DerInteger serialNumber)
+ {
+ this.serialNumber = serialNumber;
+ }
+
+ public void SetSignature(
+ AlgorithmIdentifier signature)
+ {
+ this.signature = signature;
+ }
+
+ public void SetIssuer(
+ X509Name issuer)
+ {
+ this.issuer = issuer;
+ }
+
+ public void SetStartDate(
+ Time startDate)
+ {
+ this.startDate = startDate;
+ }
+
+ public void SetStartDate(
+ Asn1UtcTime startDate)
+ {
+ this.startDate = new Time(startDate);
+ }
+
+ public void SetEndDate(
+ Time endDate)
+ {
+ this.endDate = endDate;
+ }
+
+ public void SetEndDate(
+ Asn1UtcTime endDate)
+ {
+ this.endDate = new Time(endDate);
+ }
+
+ public void SetSubject(
+ X509Name subject)
+ {
+ this.subject = subject;
+ }
+
+ public void SetSubjectPublicKeyInfo(
+ SubjectPublicKeyInfo pubKeyInfo)
+ {
+ this.subjectPublicKeyInfo = pubKeyInfo;
+ }
+
+ public TbsCertificateStructure GenerateTbsCertificate()
+ {
+ if ((serialNumber == null) || (signature == null)
+ || (issuer == null) || (startDate == null) || (endDate == null)
+ || (subject == null) || (subjectPublicKeyInfo == null))
+ {
+ throw new InvalidOperationException("not all mandatory fields set in V1 TBScertificate generator");
+ }
+
+ return new TbsCertificateStructure(
+ new DerSequence(
+ //version, - not required as default value
+ serialNumber,
+ signature,
+ issuer,
+ new DerSequence(startDate, endDate), // before and after dates
+ subject,
+ subjectPublicKeyInfo));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V1TBSCertificateGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V1TBSCertificateGenerator.cs.meta
new file mode 100644
index 00000000..b354e39f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V1TBSCertificateGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 66dd8d3eaa645fe4ca5723179f994b8e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2AttributeCertificateInfoGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2AttributeCertificateInfoGenerator.cs
new file mode 100644
index 00000000..1e31ba19
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2AttributeCertificateInfoGenerator.cs
@@ -0,0 +1,143 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Generator for Version 2 AttributeCertificateInfo
+ *
+ * AttributeCertificateInfo ::= Sequence {
+ * version AttCertVersion -- version is v2,
+ * holder Holder,
+ * issuer AttCertIssuer,
+ * signature AlgorithmIdentifier,
+ * serialNumber CertificateSerialNumber,
+ * attrCertValidityPeriod AttCertValidityPeriod,
+ * attributes Sequence OF Attr,
+ * issuerUniqueID UniqueIdentifier OPTIONAL,
+ * extensions Extensions OPTIONAL
+ * }
+ *
+ *
+ */
+ public class V2AttributeCertificateInfoGenerator
+ {
+ internal DerInteger version;
+ internal Holder holder;
+ internal AttCertIssuer issuer;
+ internal AlgorithmIdentifier signature;
+ internal DerInteger serialNumber;
+ internal Asn1EncodableVector attributes;
+ internal DerBitString issuerUniqueID;
+ internal X509Extensions extensions;
+
+ // Note: validity period start/end dates stored directly
+ //internal AttCertValidityPeriod attrCertValidityPeriod;
+ internal Asn1GeneralizedTime startDate, endDate;
+
+ public V2AttributeCertificateInfoGenerator()
+ {
+ this.version = new DerInteger(1);
+ attributes = new Asn1EncodableVector();
+ }
+
+ public void SetHolder(
+ Holder holder)
+ {
+ this.holder = holder;
+ }
+
+ public void AddAttribute(
+ string oid,
+ Asn1Encodable value)
+ {
+ attributes.Add(new AttributeX509(new DerObjectIdentifier(oid), new DerSet(value)));
+ }
+
+ /**
+ * @param attribute
+ */
+ public void AddAttribute(AttributeX509 attribute)
+ {
+ attributes.Add(attribute);
+ }
+
+ public void SetSerialNumber(
+ DerInteger serialNumber)
+ {
+ this.serialNumber = serialNumber;
+ }
+
+ public void SetSignature(
+ AlgorithmIdentifier signature)
+ {
+ this.signature = signature;
+ }
+
+ public void SetIssuer(
+ AttCertIssuer issuer)
+ {
+ this.issuer = issuer;
+ }
+
+ public void SetStartDate(
+ Asn1GeneralizedTime startDate)
+ {
+ this.startDate = startDate;
+ }
+
+ public void SetEndDate(
+ Asn1GeneralizedTime endDate)
+ {
+ this.endDate = endDate;
+ }
+
+ public void SetIssuerUniqueID(
+ DerBitString issuerUniqueID)
+ {
+ this.issuerUniqueID = issuerUniqueID;
+ }
+
+ public void SetExtensions(
+ X509Extensions extensions)
+ {
+ this.extensions = extensions;
+ }
+
+ public AttributeCertificateInfo GenerateAttributeCertificateInfo()
+ {
+ if ((serialNumber == null) || (signature == null)
+ || (issuer == null) || (startDate == null) || (endDate == null)
+ || (holder == null) || (attributes == null))
+ {
+ throw new InvalidOperationException("not all mandatory fields set in V2 AttributeCertificateInfo generator");
+ }
+
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ version, holder, issuer, signature, serialNumber);
+
+ //
+ // before and after dates => AttCertValidityPeriod
+ //
+ v.Add(new AttCertValidityPeriod(startDate, endDate));
+
+ // Attributes
+ v.Add(new DerSequence(attributes));
+
+ if (issuerUniqueID != null)
+ {
+ v.Add(issuerUniqueID);
+ }
+
+ if (extensions != null)
+ {
+ v.Add(extensions);
+ }
+
+ return AttributeCertificateInfo.GetInstance(new DerSequence(v));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2AttributeCertificateInfoGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2AttributeCertificateInfoGenerator.cs.meta
new file mode 100644
index 00000000..968bf917
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2AttributeCertificateInfoGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0574b095a71a78f4dafa86f5a7656927
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2Form.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2Form.cs
new file mode 100644
index 00000000..2b0ddfd4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2Form.cs
@@ -0,0 +1,128 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class V2Form
+ : Asn1Encodable
+ {
+ internal GeneralNames issuerName;
+ internal IssuerSerial baseCertificateID;
+ internal ObjectDigestInfo objectDigestInfo;
+
+ public static V2Form GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static V2Form GetInstance(object obj)
+ {
+ if (obj is V2Form)
+ return (V2Form)obj;
+ if (obj != null)
+ return new V2Form(Asn1Sequence.GetInstance(obj));
+ return null;
+ }
+
+ public V2Form(GeneralNames issuerName)
+ : this(issuerName, null, null)
+ {
+ }
+
+ public V2Form(GeneralNames issuerName, IssuerSerial baseCertificateID)
+ : this(issuerName, baseCertificateID, null)
+ {
+ }
+
+ public V2Form(GeneralNames issuerName, ObjectDigestInfo objectDigestInfo)
+ : this(issuerName, null, objectDigestInfo)
+ {
+ }
+
+ public V2Form(
+ GeneralNames issuerName,
+ IssuerSerial baseCertificateID,
+ ObjectDigestInfo objectDigestInfo)
+ {
+ this.issuerName = issuerName;
+ this.baseCertificateID = baseCertificateID;
+ this.objectDigestInfo = objectDigestInfo;
+ }
+
+ private V2Form(
+ Asn1Sequence seq)
+ {
+ if (seq.Count > 3)
+ {
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+ }
+
+ int index = 0;
+
+ if (!(seq[0] is Asn1TaggedObject))
+ {
+ index++;
+ this.issuerName = GeneralNames.GetInstance(seq[0]);
+ }
+
+ for (int i = index; i != seq.Count; i++)
+ {
+ Asn1TaggedObject o = Asn1TaggedObject.GetInstance(seq[i]);
+ if (o.TagNo == 0)
+ {
+ baseCertificateID = IssuerSerial.GetInstance(o, false);
+ }
+ else if (o.TagNo == 1)
+ {
+ objectDigestInfo = ObjectDigestInfo.GetInstance(o, false);
+ }
+ else
+ {
+ throw new ArgumentException("Bad tag number: " + o.TagNo);
+ }
+ }
+ }
+
+ public GeneralNames IssuerName
+ {
+ get { return issuerName; }
+ }
+
+ public IssuerSerial BaseCertificateID
+ {
+ get { return baseCertificateID; }
+ }
+
+ public ObjectDigestInfo ObjectDigestInfo
+ {
+ get { return objectDigestInfo; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * V2Form ::= Sequence {
+ * issuerName GeneralNames OPTIONAL,
+ * baseCertificateID [0] IssuerSerial OPTIONAL,
+ * objectDigestInfo [1] ObjectDigestInfo OPTIONAL
+ * -- issuerName MUST be present in this profile
+ * -- baseCertificateID and objectDigestInfo MUST NOT
+ * -- be present in this profile
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(issuerName);
+ v.AddOptionalTagged(false, 0, baseCertificateID);
+ v.AddOptionalTagged(false, 1, objectDigestInfo);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2Form.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2Form.cs.meta
new file mode 100644
index 00000000..d021fea2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2Form.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 49b4c62e22194cd48b7dc576bf0aa814
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2TBSCertListGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2TBSCertListGenerator.cs
new file mode 100644
index 00000000..08207e81
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2TBSCertListGenerator.cs
@@ -0,0 +1,198 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Generator for Version 2 TbsCertList structures.
+ *
+ * TbsCertList ::= Sequence {
+ * version Version OPTIONAL,
+ * -- if present, shall be v2
+ * signature AlgorithmIdentifier,
+ * issuer Name,
+ * thisUpdate Time,
+ * nextUpdate Time OPTIONAL,
+ * revokedCertificates Sequence OF Sequence {
+ * userCertificate CertificateSerialNumber,
+ * revocationDate Time,
+ * crlEntryExtensions Extensions OPTIONAL
+ * -- if present, shall be v2
+ * } OPTIONAL,
+ * crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ * -- if present, shall be v2
+ * }
+ *
+ *
+ * Note: This class may be subject to change
+ */
+ public class V2TbsCertListGenerator
+ {
+ private DerInteger version = new DerInteger(1);
+ private AlgorithmIdentifier signature;
+ private X509Name issuer;
+ private Time thisUpdate, nextUpdate;
+ private X509Extensions extensions;
+ private List crlEntries;
+
+ public V2TbsCertListGenerator()
+ {
+ }
+
+ public void SetSignature(
+ AlgorithmIdentifier signature)
+ {
+ this.signature = signature;
+ }
+
+ public void SetIssuer(
+ X509Name issuer)
+ {
+ this.issuer = issuer;
+ }
+
+ public void SetThisUpdate(
+ Asn1UtcTime thisUpdate)
+ {
+ this.thisUpdate = new Time(thisUpdate);
+ }
+
+ public void SetNextUpdate(
+ Asn1UtcTime nextUpdate)
+ {
+ this.nextUpdate = (nextUpdate != null)
+ ? new Time(nextUpdate)
+ : null;
+ }
+
+ public void SetThisUpdate(
+ Time thisUpdate)
+ {
+ this.thisUpdate = thisUpdate;
+ }
+
+ public void SetNextUpdate(
+ Time nextUpdate)
+ {
+ this.nextUpdate = nextUpdate;
+ }
+
+ public void AddCrlEntry(Asn1Sequence crlEntry)
+ {
+ if (crlEntries == null)
+ {
+ crlEntries = new List();
+ }
+
+ crlEntries.Add(crlEntry);
+ }
+
+ public void AddCrlEntry(DerInteger userCertificate, Asn1UtcTime revocationDate, int reason)
+ {
+ AddCrlEntry(userCertificate, new Time(revocationDate), reason);
+ }
+
+ public void AddCrlEntry(DerInteger userCertificate, Time revocationDate, int reason)
+ {
+ AddCrlEntry(userCertificate, revocationDate, reason, null);
+ }
+
+ public void AddCrlEntry(DerInteger userCertificate, Time revocationDate, int reason,
+ Asn1GeneralizedTime invalidityDate)
+ {
+ var extOids = new List();
+ var extValues = new List();
+
+ if (reason != 0)
+ {
+ CrlReason crlReason = new CrlReason(reason);
+
+ try
+ {
+ extOids.Add(X509Extensions.ReasonCode);
+ extValues.Add(new X509Extension(false, new DerOctetString(crlReason.GetEncoded())));
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("error encoding reason: " + e);
+ }
+ }
+
+ if (invalidityDate != null)
+ {
+ try
+ {
+ extOids.Add(X509Extensions.InvalidityDate);
+ extValues.Add(new X509Extension(false, new DerOctetString(invalidityDate.GetEncoded())));
+ }
+ catch (IOException e)
+ {
+ throw new ArgumentException("error encoding invalidityDate: " + e);
+ }
+ }
+
+ if (extOids.Count != 0)
+ {
+ AddCrlEntry(userCertificate, revocationDate, new X509Extensions(extOids, extValues));
+ }
+ else
+ {
+ AddCrlEntry(userCertificate, revocationDate, null);
+ }
+ }
+
+ public void AddCrlEntry(DerInteger userCertificate, Time revocationDate, X509Extensions extensions)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(userCertificate, revocationDate);
+
+ if (extensions != null)
+ {
+ v.Add(extensions);
+ }
+
+ AddCrlEntry(new DerSequence(v));
+ }
+
+ public void SetExtensions(
+ X509Extensions extensions)
+ {
+ this.extensions = extensions;
+ }
+
+ public TbsCertificateList GenerateTbsCertList()
+ {
+ if ((signature == null) || (issuer == null) || (thisUpdate == null))
+ {
+ throw new InvalidOperationException("Not all mandatory fields set in V2 TbsCertList generator.");
+ }
+
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ version, signature, issuer, thisUpdate);
+
+ if (nextUpdate != null)
+ {
+ v.Add(nextUpdate);
+ }
+
+ // Add CRLEntries if they exist
+ if (crlEntries != null)
+ {
+ v.Add(new DerSequence(crlEntries.ToArray()));
+ }
+
+ if (extensions != null)
+ {
+ v.Add(new DerTaggedObject(0, extensions));
+ }
+
+ return new TbsCertificateList(new DerSequence(v));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2TBSCertListGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2TBSCertListGenerator.cs.meta
new file mode 100644
index 00000000..9e1ec6be
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V2TBSCertListGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8a7ca53cfbe95c048baef0e7bcbc29c2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V3TBSCertificateGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V3TBSCertificateGenerator.cs
new file mode 100644
index 00000000..9d893857
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V3TBSCertificateGenerator.cs
@@ -0,0 +1,172 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * Generator for Version 3 TbsCertificateStructures.
+ *
+ * TbsCertificate ::= Sequence {
+ * version [ 0 ] Version DEFAULT v1(0),
+ * serialNumber CertificateSerialNumber,
+ * signature AlgorithmIdentifier,
+ * issuer Name,
+ * validity Validity,
+ * subject Name,
+ * subjectPublicKeyInfo SubjectPublicKeyInfo,
+ * issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ * subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ * extensions [ 3 ] Extensions OPTIONAL
+ * }
+ *
+ *
+ */
+ public class V3TbsCertificateGenerator
+ {
+ internal DerTaggedObject version = new DerTaggedObject(0, new DerInteger(2));
+ internal DerInteger serialNumber;
+ internal AlgorithmIdentifier signature;
+ internal X509Name issuer;
+ internal Time startDate, endDate;
+ internal X509Name subject;
+ internal SubjectPublicKeyInfo subjectPublicKeyInfo;
+ internal X509Extensions extensions;
+
+ private bool altNamePresentAndCritical;
+ private DerBitString issuerUniqueID;
+ private DerBitString subjectUniqueID;
+
+ public V3TbsCertificateGenerator()
+ {
+ }
+
+ public void SetSerialNumber(
+ DerInteger serialNumber)
+ {
+ this.serialNumber = serialNumber;
+ }
+
+ public void SetSignature(
+ AlgorithmIdentifier signature)
+ {
+ this.signature = signature;
+ }
+
+ public void SetIssuer(
+ X509Name issuer)
+ {
+ this.issuer = issuer;
+ }
+
+ public void SetStartDate(
+ Asn1UtcTime startDate)
+ {
+ this.startDate = new Time(startDate);
+ }
+
+ public void SetStartDate(
+ Time startDate)
+ {
+ this.startDate = startDate;
+ }
+
+ public void SetEndDate(
+ Asn1UtcTime endDate)
+ {
+ this.endDate = new Time(endDate);
+ }
+
+ public void SetEndDate(
+ Time endDate)
+ {
+ this.endDate = endDate;
+ }
+
+ public void SetSubject(
+ X509Name subject)
+ {
+ this.subject = subject;
+ }
+
+ public void SetIssuerUniqueID(
+ DerBitString uniqueID)
+ {
+ this.issuerUniqueID = uniqueID;
+ }
+
+ public void SetSubjectUniqueID(
+ DerBitString uniqueID)
+ {
+ this.subjectUniqueID = uniqueID;
+ }
+
+ public void SetSubjectPublicKeyInfo(
+ SubjectPublicKeyInfo pubKeyInfo)
+ {
+ this.subjectPublicKeyInfo = pubKeyInfo;
+ }
+
+ public void SetExtensions(
+ X509Extensions extensions)
+ {
+ this.extensions = extensions;
+
+ if (extensions != null)
+ {
+ X509Extension altName = extensions.GetExtension(X509Extensions.SubjectAlternativeName);
+
+ if (altName != null && altName.IsCritical)
+ {
+ altNamePresentAndCritical = true;
+ }
+ }
+ }
+
+ public TbsCertificateStructure GenerateTbsCertificate()
+ {
+ if ((serialNumber == null) || (signature == null)
+ || (issuer == null) || (startDate == null) || (endDate == null)
+ || (subject == null && !altNamePresentAndCritical)
+ || (subjectPublicKeyInfo == null))
+ {
+ throw new InvalidOperationException("not all mandatory fields set in V3 TBScertificate generator");
+ }
+
+ DerSequence validity = new DerSequence(startDate, endDate); // before and after dates
+
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ version, serialNumber, signature, issuer, validity);
+
+ if (subject != null)
+ {
+ v.Add(subject);
+ }
+ else
+ {
+ v.Add(DerSequence.Empty);
+ }
+
+ v.Add(subjectPublicKeyInfo);
+
+ if (issuerUniqueID != null)
+ {
+ v.Add(new DerTaggedObject(false, 1, issuerUniqueID));
+ }
+
+ if (subjectUniqueID != null)
+ {
+ v.Add(new DerTaggedObject(false, 2, subjectUniqueID));
+ }
+
+ if (extensions != null)
+ {
+ v.Add(new DerTaggedObject(3, extensions));
+ }
+
+ return new TbsCertificateStructure(new DerSequence(v));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V3TBSCertificateGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V3TBSCertificateGenerator.cs.meta
new file mode 100644
index 00000000..d808e43a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/V3TBSCertificateGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c7ed4aecf1b1dfb469a950c561665b5f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Attributes.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Attributes.cs
new file mode 100644
index 00000000..27cdc3ea
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Attributes.cs
@@ -0,0 +1,13 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class X509Attributes
+ {
+ public static readonly DerObjectIdentifier RoleSyntax = new DerObjectIdentifier("2.5.4.72");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Attributes.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Attributes.cs.meta
new file mode 100644
index 00000000..40b5153b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Attributes.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a77ebbd08f8b65249ba6c9226337ec4c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509CertificateStructure.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509CertificateStructure.cs
new file mode 100644
index 00000000..64fb07c7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509CertificateStructure.cs
@@ -0,0 +1,136 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * an X509Certificate structure.
+ *
+ * Certificate ::= Sequence {
+ * tbsCertificate TbsCertificate,
+ * signatureAlgorithm AlgorithmIdentifier,
+ * signature BIT STRING
+ * }
+ *
+ */
+ public class X509CertificateStructure
+ : Asn1Encodable
+ {
+ private readonly TbsCertificateStructure tbsCert;
+ private readonly AlgorithmIdentifier sigAlgID;
+ private readonly DerBitString sig;
+
+ public static X509CertificateStructure GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static X509CertificateStructure GetInstance(
+ object obj)
+ {
+ if (obj is X509CertificateStructure)
+ return (X509CertificateStructure)obj;
+ if (obj == null)
+ return null;
+ return new X509CertificateStructure(Asn1Sequence.GetInstance(obj));
+ }
+
+ public X509CertificateStructure(
+ TbsCertificateStructure tbsCert,
+ AlgorithmIdentifier sigAlgID,
+ DerBitString sig)
+ {
+ if (tbsCert == null)
+ throw new ArgumentNullException("tbsCert");
+ if (sigAlgID == null)
+ throw new ArgumentNullException("sigAlgID");
+ if (sig == null)
+ throw new ArgumentNullException("sig");
+
+ this.tbsCert = tbsCert;
+ this.sigAlgID = sigAlgID;
+ this.sig = sig;
+ }
+
+ private X509CertificateStructure(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 3)
+ throw new ArgumentException("sequence wrong size for a certificate", "seq");
+
+ //
+ // correct x509 certficate
+ //
+ tbsCert = TbsCertificateStructure.GetInstance(seq[0]);
+ sigAlgID = AlgorithmIdentifier.GetInstance(seq[1]);
+ sig = DerBitString.GetInstance(seq[2]);
+ }
+
+ public TbsCertificateStructure TbsCertificate
+ {
+ get { return tbsCert; }
+ }
+
+ public int Version
+ {
+ get { return tbsCert.Version; }
+ }
+
+ public DerInteger SerialNumber
+ {
+ get { return tbsCert.SerialNumber; }
+ }
+
+ public X509Name Issuer
+ {
+ get { return tbsCert.Issuer; }
+ }
+
+ public Time StartDate
+ {
+ get { return tbsCert.StartDate; }
+ }
+
+ public Time EndDate
+ {
+ get { return tbsCert.EndDate; }
+ }
+
+ public X509Name Subject
+ {
+ get { return tbsCert.Subject; }
+ }
+
+ public SubjectPublicKeyInfo SubjectPublicKeyInfo
+ {
+ get { return tbsCert.SubjectPublicKeyInfo; }
+ }
+
+ public AlgorithmIdentifier SignatureAlgorithm
+ {
+ get { return sigAlgID; }
+ }
+
+ public DerBitString Signature
+ {
+ get { return sig; }
+ }
+
+ public byte[] GetSignatureOctets()
+ {
+ return sig.GetOctets();
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(tbsCert, sigAlgID, sig);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509CertificateStructure.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509CertificateStructure.cs.meta
new file mode 100644
index 00000000..d47af7dc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509CertificateStructure.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a1b7ba340db0eab4c853597fdf44f32a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509DefaultEntryConverter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509DefaultEntryConverter.cs
new file mode 100644
index 00000000..e54256ec
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509DefaultEntryConverter.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * The default converter for X509 DN entries when going from their
+ * string value to ASN.1 strings.
+ */
+ public class X509DefaultEntryConverter
+ : X509NameEntryConverter
+ {
+ /**
+ * Apply default conversion for the given value depending on the oid
+ * and the character range of the value.
+ *
+ * @param oid the object identifier for the DN entry
+ * @param value the value associated with it
+ * @return the ASN.1 equivalent for the string value.
+ */
+ public override Asn1Object GetConvertedValue(
+ DerObjectIdentifier oid,
+ string value)
+ {
+ if (value.Length != 0 && value[0] == '#')
+ {
+ try
+ {
+ return ConvertHexEncoded(value, 1);
+ }
+ catch (IOException)
+ {
+ throw new Exception("can't recode value for oid " + oid.Id);
+ }
+ }
+
+ if (value.Length != 0 && value[0] == '\\')
+ {
+ value = value.Substring(1);
+ }
+
+ if (oid.Equals(X509Name.EmailAddress) || oid.Equals(X509Name.DC))
+ {
+ return new DerIA5String(value);
+ }
+
+ if (oid.Equals(X509Name.DateOfBirth)) // accept time string as well as # (for compatibility)
+ {
+ return new Asn1GeneralizedTime(value);
+ }
+
+ if (oid.Equals(X509Name.C)
+ || oid.Equals(X509Name.SerialNumber)
+ || oid.Equals(X509Name.DnQualifier)
+ || oid.Equals(X509Name.TelephoneNumber))
+ {
+ return new DerPrintableString(value);
+ }
+
+ return new DerUtf8String(value);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509DefaultEntryConverter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509DefaultEntryConverter.cs.meta
new file mode 100644
index 00000000..9f7f30ef
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509DefaultEntryConverter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9ba516d10fcdab542bd987b4599c2036
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extension.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extension.cs
new file mode 100644
index 00000000..2eaa9565
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extension.cs
@@ -0,0 +1,83 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * an object for the elements in the X.509 V3 extension block.
+ */
+ public class X509Extension
+ {
+ internal bool critical;
+ internal Asn1OctetString value;
+
+ public X509Extension(
+ DerBoolean critical,
+ Asn1OctetString value)
+ {
+ if (critical == null)
+ {
+ throw new ArgumentNullException("critical");
+ }
+
+ this.critical = critical.IsTrue;
+ this.value = value;
+ }
+
+ public X509Extension(
+ bool critical,
+ Asn1OctetString value)
+ {
+ this.critical = critical;
+ this.value = value;
+ }
+
+ public bool IsCritical { get { return critical; } }
+
+ public Asn1OctetString Value { get { return value; } }
+
+ public Asn1Encodable GetParsedValue()
+ {
+ return ConvertValueToObject(this);
+ }
+
+ public override int GetHashCode()
+ {
+ int vh = this.Value.GetHashCode();
+
+ return IsCritical ? vh : ~vh;
+ }
+
+ public override bool Equals(
+ object obj)
+ {
+ X509Extension other = obj as X509Extension;
+ if (other == null)
+ {
+ return false;
+ }
+
+ return Value.Equals(other.Value) && IsCritical == other.IsCritical;
+ }
+
+ /// Convert the value of the passed in extension to an object.
+ /// The extension to parse.
+ /// The object the value string contains.
+ /// If conversion is not possible.
+ public static Asn1Object ConvertValueToObject(
+ X509Extension ext)
+ {
+ try
+ {
+ return Asn1Object.FromByteArray(ext.Value.GetOctets());
+ }
+ catch (Exception e)
+ {
+ throw new ArgumentException("can't convert extension", e);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extension.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extension.cs.meta
new file mode 100644
index 00000000..88e10cfe
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extension.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d0552081f622a68459b9f814ce8d2e84
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extensions.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extensions.cs
new file mode 100644
index 00000000..8dc388fc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extensions.cs
@@ -0,0 +1,401 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public class X509Extensions
+ : Asn1Encodable
+ {
+ /**
+ * Subject Directory Attributes
+ */
+ public static readonly DerObjectIdentifier SubjectDirectoryAttributes = new DerObjectIdentifier("2.5.29.9");
+
+ /**
+ * Subject Key Identifier
+ */
+ public static readonly DerObjectIdentifier SubjectKeyIdentifier = new DerObjectIdentifier("2.5.29.14");
+
+ /**
+ * Key Usage
+ */
+ public static readonly DerObjectIdentifier KeyUsage = new DerObjectIdentifier("2.5.29.15");
+
+ /**
+ * Private Key Usage Period
+ */
+ public static readonly DerObjectIdentifier PrivateKeyUsagePeriod = new DerObjectIdentifier("2.5.29.16");
+
+ /**
+ * Subject Alternative Name
+ */
+ public static readonly DerObjectIdentifier SubjectAlternativeName = new DerObjectIdentifier("2.5.29.17");
+
+ /**
+ * Issuer Alternative Name
+ */
+ public static readonly DerObjectIdentifier IssuerAlternativeName = new DerObjectIdentifier("2.5.29.18");
+
+ /**
+ * Basic Constraints
+ */
+ public static readonly DerObjectIdentifier BasicConstraints = new DerObjectIdentifier("2.5.29.19");
+
+ /**
+ * CRL Number
+ */
+ public static readonly DerObjectIdentifier CrlNumber = new DerObjectIdentifier("2.5.29.20");
+
+ /**
+ * Reason code
+ */
+ public static readonly DerObjectIdentifier ReasonCode = new DerObjectIdentifier("2.5.29.21");
+
+ /**
+ * Hold Instruction Code
+ */
+ public static readonly DerObjectIdentifier InstructionCode = new DerObjectIdentifier("2.5.29.23");
+
+ /**
+ * Invalidity Date
+ */
+ public static readonly DerObjectIdentifier InvalidityDate = new DerObjectIdentifier("2.5.29.24");
+
+ /**
+ * Delta CRL indicator
+ */
+ public static readonly DerObjectIdentifier DeltaCrlIndicator = new DerObjectIdentifier("2.5.29.27");
+
+ /**
+ * Issuing Distribution Point
+ */
+ public static readonly DerObjectIdentifier IssuingDistributionPoint = new DerObjectIdentifier("2.5.29.28");
+
+ /**
+ * Certificate Issuer
+ */
+ public static readonly DerObjectIdentifier CertificateIssuer = new DerObjectIdentifier("2.5.29.29");
+
+ /**
+ * Name Constraints
+ */
+ public static readonly DerObjectIdentifier NameConstraints = new DerObjectIdentifier("2.5.29.30");
+
+ /**
+ * CRL Distribution Points
+ */
+ public static readonly DerObjectIdentifier CrlDistributionPoints = new DerObjectIdentifier("2.5.29.31");
+
+ /**
+ * Certificate Policies
+ */
+ public static readonly DerObjectIdentifier CertificatePolicies = new DerObjectIdentifier("2.5.29.32");
+
+ /**
+ * Policy Mappings
+ */
+ public static readonly DerObjectIdentifier PolicyMappings = new DerObjectIdentifier("2.5.29.33");
+
+ /**
+ * Authority Key Identifier
+ */
+ public static readonly DerObjectIdentifier AuthorityKeyIdentifier = new DerObjectIdentifier("2.5.29.35");
+
+ /**
+ * Policy Constraints
+ */
+ public static readonly DerObjectIdentifier PolicyConstraints = new DerObjectIdentifier("2.5.29.36");
+
+ /**
+ * Extended Key Usage
+ */
+ public static readonly DerObjectIdentifier ExtendedKeyUsage = new DerObjectIdentifier("2.5.29.37");
+
+ /**
+ * Freshest CRL
+ */
+ public static readonly DerObjectIdentifier FreshestCrl = new DerObjectIdentifier("2.5.29.46");
+
+ /**
+ * Inhibit Any Policy
+ */
+ public static readonly DerObjectIdentifier InhibitAnyPolicy = new DerObjectIdentifier("2.5.29.54");
+
+ /**
+ * Authority Info Access
+ */
+ public static readonly DerObjectIdentifier AuthorityInfoAccess = new DerObjectIdentifier("1.3.6.1.5.5.7.1.1");
+
+ /**
+ * Subject Info Access
+ */
+ public static readonly DerObjectIdentifier SubjectInfoAccess = new DerObjectIdentifier("1.3.6.1.5.5.7.1.11");
+
+ /**
+ * Logo Type
+ */
+ public static readonly DerObjectIdentifier LogoType = new DerObjectIdentifier("1.3.6.1.5.5.7.1.12");
+
+ /**
+ * BiometricInfo
+ */
+ public static readonly DerObjectIdentifier BiometricInfo = new DerObjectIdentifier("1.3.6.1.5.5.7.1.2");
+
+ /**
+ * QCStatements
+ */
+ public static readonly DerObjectIdentifier QCStatements = new DerObjectIdentifier("1.3.6.1.5.5.7.1.3");
+
+ /**
+ * Audit identity extension in attribute certificates.
+ */
+ public static readonly DerObjectIdentifier AuditIdentity = new DerObjectIdentifier("1.3.6.1.5.5.7.1.4");
+
+ /**
+ * NoRevAvail extension in attribute certificates.
+ */
+ public static readonly DerObjectIdentifier NoRevAvail = new DerObjectIdentifier("2.5.29.56");
+
+ /**
+ * TargetInformation extension in attribute certificates.
+ */
+ public static readonly DerObjectIdentifier TargetInformation = new DerObjectIdentifier("2.5.29.55");
+
+ /**
+ * Expired Certificates on CRL extension
+ */
+ public static readonly DerObjectIdentifier ExpiredCertsOnCrl = new DerObjectIdentifier("2.5.29.60");
+
+ private readonly Dictionary m_extensions =
+ new Dictionary();
+ private readonly List m_ordering;
+
+ public static X509Extension GetExtension(X509Extensions extensions, DerObjectIdentifier oid)
+ {
+ return null == extensions ? null : extensions.GetExtension(oid);
+ }
+
+ public static Asn1Encodable GetExtensionParsedValue(X509Extensions extensions, DerObjectIdentifier oid)
+ {
+ return null == extensions ? null : extensions.GetExtensionParsedValue(oid);
+ }
+
+ public static X509Extensions GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
+ }
+
+ public static X509Extensions GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is X509Extensions)
+ {
+ return (X509Extensions) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new X509Extensions((Asn1Sequence) obj);
+ }
+
+ if (obj is Asn1TaggedObject)
+ {
+ return GetInstance(((Asn1TaggedObject) obj).GetObject());
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * the extensions are a list of constructed sequences, either with (Oid, OctetString) or (Oid, Boolean, OctetString)
+ */
+ private X509Extensions(Asn1Sequence seq)
+ {
+ m_ordering = new List();
+
+ foreach (Asn1Encodable ae in seq)
+ {
+ Asn1Sequence s = Asn1Sequence.GetInstance(ae.ToAsn1Object());
+
+ if (s.Count < 2 || s.Count > 3)
+ throw new ArgumentException("Bad sequence size: " + s.Count);
+
+ DerObjectIdentifier oid = DerObjectIdentifier.GetInstance(s[0].ToAsn1Object());
+
+ bool isCritical = s.Count == 3
+ && DerBoolean.GetInstance(s[1].ToAsn1Object()).IsTrue;
+
+ Asn1OctetString octets = Asn1OctetString.GetInstance(s[s.Count - 1].ToAsn1Object());
+
+ if (m_extensions.ContainsKey(oid))
+ throw new ArgumentException("repeated extension found: " + oid);
+
+ m_extensions.Add(oid, new X509Extension(isCritical, octets));
+ m_ordering.Add(oid);
+ }
+ }
+
+ /**
+ * constructor from a table of extensions.
+ *
+ * it's is assumed the table contains Oid/string pairs.
+ */
+ public X509Extensions(IDictionary extensions)
+ : this(null, extensions)
+ {
+ }
+
+ /**
+ * Constructor from a table of extensions with ordering.
+ *
+ * It's is assumed the table contains Oid/string pairs.
+ */
+ public X509Extensions(IList ordering,
+ IDictionary extensions)
+ {
+ if (ordering == null)
+ {
+ m_ordering = new List(extensions.Keys);
+ }
+ else
+ {
+ m_ordering = new List(ordering);
+ }
+
+ foreach (DerObjectIdentifier oid in m_ordering)
+ {
+ m_extensions.Add(oid, extensions[oid]);
+ }
+ }
+
+ /**
+ * Constructor from two vectors
+ *
+ * @param objectIDs an ArrayList of the object identifiers.
+ * @param values an ArrayList of the extension values.
+ */
+ public X509Extensions(IList oids, IList values)
+ {
+ m_ordering = new List(oids);
+
+ int count = 0;
+ foreach (DerObjectIdentifier oid in m_ordering)
+ {
+ m_extensions.Add(oid, values[count++]);
+ }
+ }
+
+ /**
+ * return an Enumeration of the extension field's object ids.
+ */
+ public IEnumerable ExtensionOids
+ {
+ get { return CollectionUtilities.Proxy(m_ordering); }
+ }
+
+ /**
+ * return the extension represented by the object identifier
+ * passed in.
+ *
+ * @return the extension if it's present, null otherwise.
+ */
+ public X509Extension GetExtension(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(m_extensions, oid);
+ }
+
+ /**
+ * return the parsed value of the extension represented by the object identifier
+ * passed in.
+ *
+ * @return the parsed value of the extension if it's present, null otherwise.
+ */
+ public Asn1Encodable GetExtensionParsedValue(DerObjectIdentifier oid)
+ {
+ return GetExtension(oid)?.GetParsedValue();
+ }
+
+ /**
+ *
+ * Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
+ *
+ * Extension ::= SEQUENCE {
+ * extnId EXTENSION.&id ({ExtensionSet}),
+ * critical BOOLEAN DEFAULT FALSE,
+ * extnValue OCTET STRING }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(m_ordering.Count);
+
+ foreach (DerObjectIdentifier oid in m_ordering)
+ {
+ X509Extension ext = m_extensions[oid];
+ if (ext.IsCritical)
+ {
+ v.Add(new DerSequence(oid, DerBoolean.True, ext.Value));
+ }
+ else
+ {
+ v.Add(new DerSequence(oid, ext.Value));
+ }
+ }
+
+ return new DerSequence(v);
+ }
+
+ public bool Equivalent(X509Extensions other)
+ {
+ if (m_extensions.Count != other.m_extensions.Count)
+ return false;
+
+ foreach (var entry in m_extensions)
+ {
+ if (!entry.Value.Equals(other.GetExtension(entry.Key)))
+ return false;
+ }
+
+ return true;
+ }
+
+ public DerObjectIdentifier[] GetExtensionOids()
+ {
+ return m_ordering.ToArray();
+ }
+
+ public DerObjectIdentifier[] GetNonCriticalExtensionOids()
+ {
+ return GetExtensionOids(false);
+ }
+
+ public DerObjectIdentifier[] GetCriticalExtensionOids()
+ {
+ return GetExtensionOids(true);
+ }
+
+ private DerObjectIdentifier[] GetExtensionOids(bool isCritical)
+ {
+ var oids = new List();
+
+ foreach (DerObjectIdentifier oid in m_ordering)
+ {
+ if (m_extensions[oid].IsCritical == isCritical)
+ {
+ oids.Add(oid);
+ }
+ }
+
+ return oids.ToArray();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extensions.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extensions.cs.meta
new file mode 100644
index 00000000..ccc77127
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Extensions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 446fac1bb12ed14439cb65d7c6f8b9cf
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ExtensionsGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ExtensionsGenerator.cs
new file mode 100644
index 00000000..ce1568db
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ExtensionsGenerator.cs
@@ -0,0 +1,122 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /// Generator for X.509 extensions
+ public class X509ExtensionsGenerator
+ {
+ private Dictionary m_extensions =
+ new Dictionary();
+ private List m_ordering = new List();
+
+ private static readonly ISet m_dupsAllowed = new HashSet()
+ {
+ X509Extensions.SubjectAlternativeName,
+ X509Extensions.IssuerAlternativeName,
+ X509Extensions.SubjectDirectoryAttributes,
+ X509Extensions.CertificateIssuer
+ };
+
+ /// Reset the generator
+ public void Reset()
+ {
+ m_extensions = new Dictionary();
+ m_ordering = new List();
+ }
+
+ ///
+ /// Add an extension with the given oid and the passed in value to be included
+ /// in the OCTET STRING associated with the extension.
+ ///
+ /// OID for the extension.
+ /// True if critical, false otherwise.
+ /// The ASN.1 object to be included in the extension.
+ public void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extValue)
+ {
+ byte[] encoded;
+ try
+ {
+ encoded = extValue.GetDerEncoded();
+ }
+ catch (Exception e)
+ {
+ throw new ArgumentException("error encoding value: " + e);
+ }
+
+ this.AddExtension(oid, critical, encoded);
+ }
+
+ ///
+ /// Add an extension with the given oid and the passed in byte array to be wrapped
+ /// in the OCTET STRING associated with the extension.
+ ///
+ /// OID for the extension.
+ /// True if critical, false otherwise.
+ /// The byte array to be wrapped.
+ public void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extValue)
+ {
+ if (m_extensions.TryGetValue(oid, out X509Extension existingExtension))
+ {
+ if (!m_dupsAllowed.Contains(oid))
+ throw new ArgumentException("extension " + oid + " already added");
+
+ Asn1Sequence seq1 = Asn1Sequence.GetInstance(
+ Asn1OctetString.GetInstance(existingExtension.Value).GetOctets());
+ Asn1EncodableVector items = Asn1EncodableVector.FromEnumerable(seq1);
+ Asn1Sequence seq2 = Asn1Sequence.GetInstance(extValue);
+
+ foreach (Asn1Encodable enc in seq2)
+ {
+ items.Add(enc);
+ }
+
+ m_extensions[oid] = new X509Extension(existingExtension.IsCritical,
+ new DerOctetString(new DerSequence(items).GetEncoded()));
+ }
+ else
+ {
+ m_ordering.Add(oid);
+ m_extensions.Add(oid, new X509Extension(critical, new DerOctetString(extValue)));
+ }
+ }
+
+ public void AddExtensions(X509Extensions extensions)
+ {
+ foreach (DerObjectIdentifier ident in extensions.ExtensionOids)
+ {
+ X509Extension ext = extensions.GetExtension(ident);
+ AddExtension(ident, ext.critical, ext.Value.GetOctets());
+ }
+ }
+
+
+
+ /// Return true if there are no extension present in this generator.
+ /// True if empty, false otherwise
+ public bool IsEmpty
+ {
+ get { return m_ordering.Count < 1; }
+ }
+
+ /// Generate an X509Extensions object based on the current state of the generator.
+ /// An X509Extensions object
+ public X509Extensions Generate()
+ {
+ return new X509Extensions(m_ordering, m_extensions);
+ }
+
+ internal void AddExtension(DerObjectIdentifier oid, X509Extension x509Extension)
+ {
+ if (m_extensions.ContainsKey(oid))
+ throw new ArgumentException("extension " + oid + " already added");
+
+ m_ordering.Add(oid);
+ m_extensions.Add(oid, x509Extension);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ExtensionsGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ExtensionsGenerator.cs.meta
new file mode 100644
index 00000000..03d8c1fd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ExtensionsGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3dcba2e7590f6024fa685d94dd0fd19b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Name.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Name.cs
new file mode 100644
index 00000000..1d7d6091
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Name.cs
@@ -0,0 +1,1024 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.Shared.PlatformSupport.Text;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ *
+ * RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
+ *
+ * RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
+ *
+ * AttributeTypeAndValue ::= SEQUENCE {
+ * type OBJECT IDENTIFIER,
+ * value ANY }
+ *
+ */
+ public class X509Name
+ : Asn1Encodable
+ {
+ /**
+ * country code - StringType(SIZE(2))
+ */
+ public static readonly DerObjectIdentifier C = new DerObjectIdentifier("2.5.4.6");
+
+ /**
+ * organization - StringType(SIZE(1..64))
+ */
+ public static readonly DerObjectIdentifier O = new DerObjectIdentifier("2.5.4.10");
+
+ /**
+ * organizational unit name - StringType(SIZE(1..64))
+ */
+ public static readonly DerObjectIdentifier OU = new DerObjectIdentifier("2.5.4.11");
+
+ /**
+ * Title
+ */
+ public static readonly DerObjectIdentifier T = new DerObjectIdentifier("2.5.4.12");
+
+ /**
+ * common name - StringType(SIZE(1..64))
+ */
+ public static readonly DerObjectIdentifier CN = new DerObjectIdentifier("2.5.4.3");
+
+ /**
+ * street - StringType(SIZE(1..64))
+ */
+ public static readonly DerObjectIdentifier Street = new DerObjectIdentifier("2.5.4.9");
+
+ /**
+ * device serial number name - StringType(SIZE(1..64))
+ */
+ public static readonly DerObjectIdentifier SerialNumber = new DerObjectIdentifier("2.5.4.5");
+
+ /**
+ * locality name - StringType(SIZE(1..64))
+ */
+ public static readonly DerObjectIdentifier L = new DerObjectIdentifier("2.5.4.7");
+
+ /**
+ * state, or province name - StringType(SIZE(1..64))
+ */
+ public static readonly DerObjectIdentifier ST = new DerObjectIdentifier("2.5.4.8");
+
+ /**
+ * Naming attributes of type X520name
+ */
+ public static readonly DerObjectIdentifier Surname = new DerObjectIdentifier("2.5.4.4");
+ public static readonly DerObjectIdentifier GivenName = new DerObjectIdentifier("2.5.4.42");
+ public static readonly DerObjectIdentifier Initials = new DerObjectIdentifier("2.5.4.43");
+ public static readonly DerObjectIdentifier Generation = new DerObjectIdentifier("2.5.4.44");
+ public static readonly DerObjectIdentifier UniqueIdentifier = new DerObjectIdentifier("2.5.4.45");
+
+ /**
+ * businessCategory - DirectoryString(SIZE(1..128)
+ */
+ public static readonly DerObjectIdentifier BusinessCategory = new DerObjectIdentifier(
+ "2.5.4.15");
+
+ /**
+ * postalCode - DirectoryString(SIZE(1..40)
+ */
+ public static readonly DerObjectIdentifier PostalCode = new DerObjectIdentifier(
+ "2.5.4.17");
+
+ /**
+ * dnQualifier - DirectoryString(SIZE(1..64)
+ */
+ public static readonly DerObjectIdentifier DnQualifier = new DerObjectIdentifier(
+ "2.5.4.46");
+
+ /**
+ * RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)
+ */
+ public static readonly DerObjectIdentifier Pseudonym = new DerObjectIdentifier(
+ "2.5.4.65");
+
+ /**
+ * RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z
+ */
+ public static readonly DerObjectIdentifier DateOfBirth = new DerObjectIdentifier(
+ "1.3.6.1.5.5.7.9.1");
+
+ /**
+ * RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)
+ */
+ public static readonly DerObjectIdentifier PlaceOfBirth = new DerObjectIdentifier(
+ "1.3.6.1.5.5.7.9.2");
+
+ /**
+ * RFC 3039 DateOfBirth - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"
+ */
+ public static readonly DerObjectIdentifier Gender = new DerObjectIdentifier(
+ "1.3.6.1.5.5.7.9.3");
+
+ /**
+ * RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ * codes only
+ */
+ public static readonly DerObjectIdentifier CountryOfCitizenship = new DerObjectIdentifier(
+ "1.3.6.1.5.5.7.9.4");
+
+ /**
+ * RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ * codes only
+ */
+ public static readonly DerObjectIdentifier CountryOfResidence = new DerObjectIdentifier(
+ "1.3.6.1.5.5.7.9.5");
+
+ /**
+ * ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)
+ */
+ public static readonly DerObjectIdentifier NameAtBirth = new DerObjectIdentifier("1.3.36.8.3.14");
+
+ /**
+ * RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF
+ * DirectoryString(SIZE(1..30))
+ */
+ public static readonly DerObjectIdentifier PostalAddress = new DerObjectIdentifier("2.5.4.16");
+
+ /**
+ * RFC 2256 dmdName
+ */
+ public static readonly DerObjectIdentifier DmdName = new DerObjectIdentifier("2.5.4.54");
+
+ /**
+ * id-at-telephoneNumber
+ */
+ public static readonly DerObjectIdentifier TelephoneNumber = X509ObjectIdentifiers.id_at_telephoneNumber;
+
+ /**
+ * id-at-organizationIdentifier
+ */
+ public static readonly DerObjectIdentifier OrganizationIdentifier = X509ObjectIdentifiers.id_at_organizationIdentifier;
+
+ /**
+ * id-at-name
+ */
+ public static readonly DerObjectIdentifier Name = X509ObjectIdentifiers.id_at_name;
+
+ /**
+ * Email address (RSA PKCS#9 extension) - IA5String.
+ * Note: if you're trying to be ultra orthodox, don't use this! It shouldn't be in here.
+ */
+ public static readonly DerObjectIdentifier EmailAddress = PkcsObjectIdentifiers.Pkcs9AtEmailAddress;
+
+ /**
+ * more from PKCS#9
+ */
+ public static readonly DerObjectIdentifier UnstructuredName = PkcsObjectIdentifiers.Pkcs9AtUnstructuredName;
+ public static readonly DerObjectIdentifier UnstructuredAddress = PkcsObjectIdentifiers.Pkcs9AtUnstructuredAddress;
+
+ /**
+ * email address in Verisign certificates
+ */
+ public static readonly DerObjectIdentifier E = EmailAddress;
+
+ /*
+ * others...
+ */
+ public static readonly DerObjectIdentifier DC = new DerObjectIdentifier("0.9.2342.19200300.100.1.25");
+
+ /**
+ * LDAP User id.
+ */
+ public static readonly DerObjectIdentifier UID = new DerObjectIdentifier("0.9.2342.19200300.100.1.1");
+
+ /**
+ * determines whether or not strings should be processed and printed
+ * from back to front.
+ */
+ public static bool DefaultReverse
+ {
+ get { lock (defaultReverse) return defaultReverse[0]; }
+ set { lock (defaultReverse) defaultReverse[0] = value; }
+ }
+
+ private static readonly bool[] defaultReverse = { false };
+
+ /**
+ * default look up table translating OID values into their common symbols following
+ * the convention in RFC 2253 with a few extras
+ */
+ private static readonly IDictionary DefaultSymbolsInternal =
+ new Dictionary();
+ public static readonly IDictionary DefaultSymbols =
+ CollectionUtilities.ReadOnly(DefaultSymbolsInternal);
+
+ /**
+ * look up table translating OID values into their common symbols following the convention in RFC 2253
+ */
+ private static readonly IDictionary RFC2253SymbolsInternal =
+ new Dictionary();
+ public static readonly IDictionary RFC2253Symbols =
+ CollectionUtilities.ReadOnly(RFC2253SymbolsInternal);
+
+ /**
+ * look up table translating OID values into their common symbols following the convention in RFC 1779
+ *
+ */
+ private static readonly IDictionary RFC1779SymbolsInternal =
+ new Dictionary();
+ public static readonly IDictionary RFC1779Symbols =
+ CollectionUtilities.ReadOnly(RFC1779SymbolsInternal);
+
+ /**
+ * look up table translating common symbols into their OIDS.
+ */
+ private static readonly IDictionary DefaultLookupInternal =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ public static readonly IDictionary DefaultLookup =
+ CollectionUtilities.ReadOnly(DefaultLookupInternal);
+
+ static X509Name()
+ {
+ DefaultSymbolsInternal.Add(C, "C");
+ DefaultSymbolsInternal.Add(O, "O");
+ DefaultSymbolsInternal.Add(T, "T");
+ DefaultSymbolsInternal.Add(OU, "OU");
+ DefaultSymbolsInternal.Add(CN, "CN");
+ DefaultSymbolsInternal.Add(L, "L");
+ DefaultSymbolsInternal.Add(ST, "ST");
+ DefaultSymbolsInternal.Add(SerialNumber, "SERIALNUMBER");
+ DefaultSymbolsInternal.Add(EmailAddress, "E");
+ DefaultSymbolsInternal.Add(DC, "DC");
+ DefaultSymbolsInternal.Add(UID, "UID");
+ DefaultSymbolsInternal.Add(Street, "STREET");
+ DefaultSymbolsInternal.Add(Surname, "SURNAME");
+ DefaultSymbolsInternal.Add(GivenName, "GIVENNAME");
+ DefaultSymbolsInternal.Add(Initials, "INITIALS");
+ DefaultSymbolsInternal.Add(Generation, "GENERATION");
+ DefaultSymbolsInternal.Add(UnstructuredAddress, "unstructuredAddress");
+ DefaultSymbolsInternal.Add(UnstructuredName, "unstructuredName");
+ DefaultSymbolsInternal.Add(UniqueIdentifier, "UniqueIdentifier");
+ DefaultSymbolsInternal.Add(DnQualifier, "DN");
+ DefaultSymbolsInternal.Add(Pseudonym, "Pseudonym");
+ DefaultSymbolsInternal.Add(PostalAddress, "PostalAddress");
+ DefaultSymbolsInternal.Add(NameAtBirth, "NameAtBirth");
+ DefaultSymbolsInternal.Add(CountryOfCitizenship, "CountryOfCitizenship");
+ DefaultSymbolsInternal.Add(CountryOfResidence, "CountryOfResidence");
+ DefaultSymbolsInternal.Add(Gender, "Gender");
+ DefaultSymbolsInternal.Add(PlaceOfBirth, "PlaceOfBirth");
+ DefaultSymbolsInternal.Add(DateOfBirth, "DateOfBirth");
+ DefaultSymbolsInternal.Add(PostalCode, "PostalCode");
+ DefaultSymbolsInternal.Add(BusinessCategory, "BusinessCategory");
+ DefaultSymbolsInternal.Add(TelephoneNumber, "TelephoneNumber");
+
+ RFC2253SymbolsInternal.Add(C, "C");
+ RFC2253SymbolsInternal.Add(O, "O");
+ RFC2253SymbolsInternal.Add(OU, "OU");
+ RFC2253SymbolsInternal.Add(CN, "CN");
+ RFC2253SymbolsInternal.Add(L, "L");
+ RFC2253SymbolsInternal.Add(ST, "ST");
+ RFC2253SymbolsInternal.Add(Street, "STREET");
+ RFC2253SymbolsInternal.Add(DC, "DC");
+ RFC2253SymbolsInternal.Add(UID, "UID");
+
+ RFC1779SymbolsInternal.Add(C, "C");
+ RFC1779SymbolsInternal.Add(O, "O");
+ RFC1779SymbolsInternal.Add(OU, "OU");
+ RFC1779SymbolsInternal.Add(CN, "CN");
+ RFC1779SymbolsInternal.Add(L, "L");
+ RFC1779SymbolsInternal.Add(ST, "ST");
+ RFC1779SymbolsInternal.Add(Street, "STREET");
+
+ DefaultLookupInternal.Add("c", C);
+ DefaultLookupInternal.Add("o", O);
+ DefaultLookupInternal.Add("t", T);
+ DefaultLookupInternal.Add("ou", OU);
+ DefaultLookupInternal.Add("cn", CN);
+ DefaultLookupInternal.Add("l", L);
+ DefaultLookupInternal.Add("st", ST);
+ DefaultLookupInternal.Add("serialnumber", SerialNumber);
+ DefaultLookupInternal.Add("street", Street);
+ DefaultLookupInternal.Add("emailaddress", E);
+ DefaultLookupInternal.Add("dc", DC);
+ DefaultLookupInternal.Add("e", E);
+ DefaultLookupInternal.Add("uid", UID);
+ DefaultLookupInternal.Add("surname", Surname);
+ DefaultLookupInternal.Add("givenname", GivenName);
+ DefaultLookupInternal.Add("initials", Initials);
+ DefaultLookupInternal.Add("generation", Generation);
+ DefaultLookupInternal.Add("unstructuredaddress", UnstructuredAddress);
+ DefaultLookupInternal.Add("unstructuredname", UnstructuredName);
+ DefaultLookupInternal.Add("uniqueidentifier", UniqueIdentifier);
+ DefaultLookupInternal.Add("dn", DnQualifier);
+ DefaultLookupInternal.Add("pseudonym", Pseudonym);
+ DefaultLookupInternal.Add("postaladdress", PostalAddress);
+ DefaultLookupInternal.Add("nameofbirth", NameAtBirth);
+ DefaultLookupInternal.Add("countryofcitizenship", CountryOfCitizenship);
+ DefaultLookupInternal.Add("countryofresidence", CountryOfResidence);
+ DefaultLookupInternal.Add("gender", Gender);
+ DefaultLookupInternal.Add("placeofbirth", PlaceOfBirth);
+ DefaultLookupInternal.Add("dateofbirth", DateOfBirth);
+ DefaultLookupInternal.Add("postalcode", PostalCode);
+ DefaultLookupInternal.Add("businesscategory", BusinessCategory);
+ DefaultLookupInternal.Add("telephonenumber", TelephoneNumber);
+ }
+
+ private readonly List ordering = new List();
+ private readonly X509NameEntryConverter converter;
+
+ private IList values = new List();
+ private IList added = new List();
+ private Asn1Sequence seq;
+
+ /**
+ * Return a X509Name based on the passed in tagged object.
+ *
+ * @param obj tag object holding name.
+ * @param explicitly true if explicitly tagged false otherwise.
+ * @return the X509Name
+ */
+ public static X509Name GetInstance(
+ Asn1TaggedObject obj,
+ bool explicitly)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
+ }
+
+ public static X509Name GetInstance(
+ object obj)
+ {
+ if (obj is X509Name)
+ return (X509Name)obj;
+ if (obj == null)
+ return null;
+ return new X509Name(Asn1Sequence.GetInstance(obj));
+ }
+
+ protected X509Name()
+ {
+ }
+
+ /**
+ * Constructor from Asn1Sequence
+ *
+ * the principal will be a list of constructed sets, each containing an (OID, string) pair.
+ */
+ protected X509Name(Asn1Sequence seq)
+ {
+ this.seq = seq;
+
+ foreach (Asn1Encodable asn1Obj in seq)
+ {
+ Asn1Set asn1Set = Asn1Set.GetInstance(asn1Obj.ToAsn1Object());
+
+ for (int i = 0; i < asn1Set.Count; i++)
+ {
+ Asn1Sequence s = Asn1Sequence.GetInstance(asn1Set[i].ToAsn1Object());
+
+ if (s.Count != 2)
+ throw new ArgumentException("badly sized pair");
+
+ ordering.Add(DerObjectIdentifier.GetInstance(s[0].ToAsn1Object()));
+
+ Asn1Object derValue = s[1].ToAsn1Object();
+ if (derValue is IAsn1String && !(derValue is DerUniversalString))
+ {
+ string v = ((IAsn1String)derValue).GetString();
+#if NET_STANDARD_2_1
+ if (v.StartsWith('#'))
+#else
+ if (v.StartsWith("#"))
+#endif
+ {
+ v = "\\" + v;
+ }
+
+ values.Add(v);
+ }
+ else
+ {
+ values.Add("#" + Hex.ToHexString(derValue.GetEncoded()));
+ }
+
+ added.Add(i != 0);
+ }
+ }
+ }
+
+ /**
+ * Constructor from a table of attributes with ordering.
+ *
+ * it's is assumed the table contains OID/string pairs, and the contents
+ * of the table are copied into an internal table as part of the
+ * construction process. The ordering ArrayList should contain the OIDs
+ * in the order they are meant to be encoded or printed in ToString.
+ */
+ public X509Name(
+ IList ordering,
+ IDictionary attributes)
+ : this(ordering, attributes, new X509DefaultEntryConverter())
+ {
+ }
+
+ /**
+ * Constructor from a table of attributes with ordering.
+ *
+ * it's is assumed the table contains OID/string pairs, and the contents
+ * of the table are copied into an internal table as part of the
+ * construction process. The ordering ArrayList should contain the OIDs
+ * in the order they are meant to be encoded or printed in ToString.
+ *
+ * The passed in converter will be used to convert the strings into their
+ * ASN.1 counterparts.
+ */
+ public X509Name(
+ IList ordering,
+ IDictionary attributes,
+ X509NameEntryConverter converter)
+ {
+ this.converter = converter;
+
+ foreach (DerObjectIdentifier oid in ordering)
+ {
+ if (!attributes.TryGetValue(oid, out var attribute))
+ throw new ArgumentException("No attribute for object id - " + oid + " - passed to distinguished name");
+
+ //object attribute = attributes[oid];
+ //if (attribute == null)
+ //{
+ // throw new ArgumentException("No attribute for object id - " + oid + " - passed to distinguished name");
+ //}
+
+ this.ordering.Add(oid);
+ this.added.Add(false);
+ this.values.Add(attribute); // copy the hash table
+ }
+ }
+
+ /**
+ * Takes two vectors one of the oids and the other of the values.
+ */
+ public X509Name(IList oids, IList values)
+ : this(oids, values, new X509DefaultEntryConverter())
+ {
+ }
+
+ /**
+ * Takes two vectors one of the oids and the other of the values.
+ *
+ * The passed in converter will be used to convert the strings into their
+ * ASN.1 counterparts.
+ */
+ public X509Name(IList oids, IList values, X509NameEntryConverter converter)
+ {
+ this.converter = converter;
+
+ if (oids.Count != values.Count)
+ throw new ArgumentException("'oids' must be same length as 'values'.");
+
+ for (int i = 0; i < oids.Count; i++)
+ {
+ this.ordering.Add(oids[i]);
+ this.values.Add(values[i]);
+ this.added.Add(false);
+ }
+ }
+
+ /**
+ * Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ * some such, converting it into an ordered set of name attributes.
+ */
+ public X509Name(string dirName)
+ : this(DefaultReverse, DefaultLookup, dirName)
+ {
+ }
+
+ /**
+ * Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ * some such, converting it into an ordered set of name attributes with each
+ * string value being converted to its associated ASN.1 type using the passed
+ * in converter.
+ */
+ public X509Name(string dirName, X509NameEntryConverter converter)
+ : this(DefaultReverse, DefaultLookup, dirName, converter)
+ {
+ }
+
+ /**
+ * Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ * some such, converting it into an ordered set of name attributes. If reverse
+ * is true, create the encoded version of the sequence starting from the
+ * last element in the string.
+ */
+ public X509Name(bool reverse, string dirName)
+ : this(reverse, DefaultLookup, dirName)
+ {
+ }
+
+ /**
+ * Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ * some such, converting it into an ordered set of name attributes with each
+ * string value being converted to its associated ASN.1 type using the passed
+ * in converter. If reverse is true the ASN.1 sequence representing the DN will
+ * be built by starting at the end of the string, rather than the start.
+ */
+ public X509Name(bool reverse, string dirName, X509NameEntryConverter converter)
+ : this(reverse, DefaultLookup, dirName, converter)
+ {
+ }
+
+ /**
+ * Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ * some such, converting it into an ordered set of name attributes. lookUp
+ * should provide a table of lookups, indexed by lowercase only strings and
+ * yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ * will be processed automatically.
+ *
+ * If reverse is true, create the encoded version of the sequence
+ * starting from the last element in the string.
+ * @param reverse true if we should start scanning from the end (RFC 2553).
+ * @param lookUp table of names and their oids.
+ * @param dirName the X.500 string to be parsed.
+ */
+ public X509Name(bool reverse, IDictionary lookup, string dirName)
+ : this(reverse, lookup, dirName, new X509DefaultEntryConverter())
+ {
+ }
+
+ private DerObjectIdentifier DecodeOid(string name, IDictionary lookup)
+ {
+ if (name.StartsWith("OID.", StringComparison.OrdinalIgnoreCase))
+ return new DerObjectIdentifier(name.Substring("OID.".Length));
+
+ if (name[0] >= '0' && name[0] <= '9')
+ return new DerObjectIdentifier(name);
+
+ if (lookup.TryGetValue(name, out var oid))
+ return oid;
+
+ throw new ArgumentException("Unknown object id - " + name + " - passed to distinguished name");
+ }
+
+ /**
+ * Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ * some such, converting it into an ordered set of name attributes. lookUp
+ * should provide a table of lookups, indexed by lowercase only strings and
+ * yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ * will be processed automatically. The passed in converter is used to convert the
+ * string values to the right of each equals sign to their ASN.1 counterparts.
+ *
+ * @param reverse true if we should start scanning from the end, false otherwise.
+ * @param lookUp table of names and oids.
+ * @param dirName the string dirName
+ * @param converter the converter to convert string values into their ASN.1 equivalents
+ */
+ public X509Name(bool reverse, IDictionary lookup, string dirName,
+ X509NameEntryConverter converter)
+ {
+ this.converter = converter;
+ X509NameTokenizer nTok = new X509NameTokenizer(dirName);
+
+ while (nTok.HasMoreTokens())
+ {
+ string token = nTok.NextToken();
+ int index = token.IndexOf('=');
+
+ if (index == -1)
+ throw new ArgumentException("badly formated directory string");
+
+ string name = token.Substring(0, index);
+ string value = token.Substring(index + 1);
+ DerObjectIdentifier oid = DecodeOid(name, lookup);
+
+ if (value.IndexOf('+') > 0)
+ {
+ X509NameTokenizer vTok = new X509NameTokenizer(value, '+');
+ string v = vTok.NextToken();
+
+ this.ordering.Add(oid);
+ this.values.Add(v);
+ this.added.Add(false);
+
+ while (vTok.HasMoreTokens())
+ {
+ string sv = vTok.NextToken();
+ int ndx = sv.IndexOf('=');
+
+ string nm = sv.Substring(0, ndx);
+ string vl = sv.Substring(ndx + 1);
+ this.ordering.Add(DecodeOid(nm, lookup));
+ this.values.Add(vl);
+ this.added.Add(true);
+ }
+ }
+ else
+ {
+ this.ordering.Add(oid);
+ this.values.Add(value);
+ this.added.Add(false);
+ }
+ }
+
+ if (reverse)
+ {
+// this.ordering.Reverse();
+// this.values.Reverse();
+// this.added.Reverse();
+ var o = new List();
+ var v = new List();
+ var a = new List();
+ int count = 1;
+
+ for (int i = 0; i < this.ordering.Count; i++)
+ {
+ if (!((bool) this.added[i]))
+ {
+ count = 0;
+ }
+
+ int index = count++;
+
+ o.Insert(index, this.ordering[i]);
+ v.Insert(index, this.values[i]);
+ a.Insert(index, this.added[i]);
+ }
+
+ this.ordering = o;
+ this.values = v;
+ this.added = a;
+ }
+ }
+
+ /**
+ * return an IList of the oids in the name, in the order they were found.
+ */
+ public IList GetOidList()
+ {
+ return new List(ordering);
+ }
+
+ /**
+ * return an IList of the values found in the name, in the order they
+ * were found.
+ */
+ public IList GetValueList()
+ {
+ return GetValueList(null);
+ }
+
+ /**
+ * return an IList of the values found in the name, in the order they
+ * were found, with the DN label corresponding to passed in oid.
+ */
+ public IList GetValueList(DerObjectIdentifier oid)
+ {
+ var v = new List();
+ for (int i = 0; i != values.Count; i++)
+ {
+ if (null == oid || oid.Equals(ordering[i]))
+ {
+ string val = (string)values[i];
+ if (val.StartsWith("\\#", StringComparison.OrdinalIgnoreCase))
+ {
+ val = val.Substring(1);
+ }
+
+ v.Add(val);
+ }
+ }
+ return v;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ if (seq == null)
+ {
+ Asn1EncodableVector vec = new Asn1EncodableVector();
+ Asn1EncodableVector sVec = new Asn1EncodableVector();
+ DerObjectIdentifier lstOid = null;
+
+ for (int i = 0; i != ordering.Count; i++)
+ {
+ DerObjectIdentifier oid = (DerObjectIdentifier)ordering[i];
+ string str = (string)values[i];
+
+ if (lstOid == null
+ || ((bool)this.added[i]))
+ {
+ }
+ else
+ {
+ vec.Add(new DerSet(sVec));
+ sVec = new Asn1EncodableVector();
+ }
+
+ sVec.Add(
+ new DerSequence(
+ oid,
+ converter.GetConvertedValue(oid, str)));
+
+ lstOid = oid;
+ }
+
+ vec.Add(new DerSet(sVec));
+
+ seq = new DerSequence(vec);
+ }
+
+ return seq;
+ }
+
+ /// The X509Name object to test equivalency against.
+ /// If true, the order of elements must be the same,
+ /// as well as the values associated with each element.
+ public bool Equivalent(
+ X509Name other,
+ bool inOrder)
+ {
+ if (!inOrder)
+ return this.Equivalent(other);
+
+ if (other == null)
+ return false;
+
+ if (other == this)
+ return true;
+
+ int orderingSize = ordering.Count;
+
+ if (orderingSize != other.ordering.Count)
+ return false;
+
+ for (int i = 0; i < orderingSize; i++)
+ {
+ DerObjectIdentifier oid = (DerObjectIdentifier) ordering[i];
+ DerObjectIdentifier oOid = (DerObjectIdentifier) other.ordering[i];
+
+ if (!oid.Equals(oOid))
+ return false;
+
+ string val = (string) values[i];
+ string oVal = (string) other.values[i];
+
+ if (!EquivalentStrings(val, oVal))
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * test for equivalence - note: case is ignored.
+ */
+ public bool Equivalent(
+ X509Name other)
+ {
+ if (other == null)
+ return false;
+
+ if (other == this)
+ return true;
+
+ int orderingSize = ordering.Count;
+
+ if (orderingSize != other.ordering.Count)
+ {
+ return false;
+ }
+
+ bool[] indexes = new bool[orderingSize];
+ int start, end, delta;
+
+ if (ordering[0].Equals(other.ordering[0])) // guess forward
+ {
+ start = 0;
+ end = orderingSize;
+ delta = 1;
+ }
+ else // guess reversed - most common problem
+ {
+ start = orderingSize - 1;
+ end = -1;
+ delta = -1;
+ }
+
+ for (int i = start; i != end; i += delta)
+ {
+ bool found = false;
+ DerObjectIdentifier oid = (DerObjectIdentifier)ordering[i];
+ string value = (string)values[i];
+
+ for (int j = 0; j < orderingSize; j++)
+ {
+ if (indexes[j])
+ {
+ continue;
+ }
+
+ DerObjectIdentifier oOid = (DerObjectIdentifier)other.ordering[j];
+
+ if (oid.Equals(oOid))
+ {
+ string oValue = (string)other.values[j];
+
+ if (EquivalentStrings(value, oValue))
+ {
+ indexes[j] = true;
+ found = true;
+ break;
+ }
+ }
+ }
+
+ if (!found)
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private static bool EquivalentStrings(string s1, string s2)
+ {
+ string v1 = Canonicalize(s1);
+ string v2 = Canonicalize(s2);
+
+ if (!v1.Equals(v2))
+ {
+ v1 = StripInternalSpaces(v1);
+ v2 = StripInternalSpaces(v2);
+
+ if (!v1.Equals(v2))
+ return false;
+ }
+
+ return true;
+ }
+
+ private static string Canonicalize(string s)
+ {
+ string v = s.ToLowerInvariant().Trim();
+
+#if NET_STANDARD_2_1
+ if (v.StartsWith('#'))
+#else
+ if (v.StartsWith("#"))
+#endif
+ {
+ Asn1Object obj = DecodeObject(v);
+ if (obj is IAsn1String str)
+ {
+ v = str.GetString().ToLowerInvariant().Trim();
+ }
+ }
+
+ return v;
+ }
+
+ private static Asn1Object DecodeObject(string v)
+ {
+ try
+ {
+ return Asn1Object.FromByteArray(Hex.DecodeStrict(v, 1, v.Length - 1));
+ }
+ catch (IOException e)
+ {
+ throw new InvalidOperationException("unknown encoding in name: " + e.Message, e);
+ }
+ }
+
+ private static string StripInternalSpaces(string str)
+ {
+ StringBuilder res = new StringBuilder();
+
+ if (str.Length != 0)
+ {
+ char c1 = str[0];
+
+ res.Append(c1);
+
+ for (int k = 1; k < str.Length; k++)
+ {
+ char c2 = str[k];
+ if (!(c1 == ' ' && c2 == ' '))
+ {
+ res.Append(c2);
+ }
+ c1 = c2;
+ }
+ }
+
+ return res.ToString();
+ }
+
+ private void AppendValue(StringBuilder buf, IDictionary oidSymbols,
+ DerObjectIdentifier oid, string val)
+ {
+ if (oidSymbols.TryGetValue(oid, out var sym))
+ {
+ buf.Append(sym);
+ }
+ else
+ {
+ buf.Append(oid.Id);
+ }
+
+ buf.Append('=');
+
+ int index = buf.Length;
+
+ buf.Append(val);
+
+ int end = buf.Length;
+
+ if (val.StartsWith("\\#", StringComparison.OrdinalIgnoreCase))
+ {
+ index += 2;
+ }
+
+ while (index != end)
+ {
+ if ((buf[index] == ',')
+ || (buf[index] == '"')
+ || (buf[index] == '\\')
+ || (buf[index] == '+')
+ || (buf[index] == '=')
+ || (buf[index] == '<')
+ || (buf[index] == '>')
+ || (buf[index] == ';'))
+ {
+ buf.Insert(index++, "\\");
+ end++;
+ }
+
+ index++;
+ }
+ }
+
+ /**
+ * convert the structure to a string - if reverse is true the
+ * oids and values are listed out starting with the last element
+ * in the sequence (ala RFC 2253), otherwise the string will begin
+ * with the first element of the structure. If no string definition
+ * for the oid is found in oidSymbols the string value of the oid is
+ * added. Two standard symbol tables are provided DefaultSymbols, and
+ * RFC2253Symbols as part of this class.
+ *
+ * @param reverse if true start at the end of the sequence and work back.
+ * @param oidSymbols look up table strings for oids.
+ */
+ public string ToString(bool reverse, IDictionary oidSymbols)
+ {
+ var components = new List();
+
+ StringBuilder ava = null;
+
+ for (int i = 0; i < ordering.Count; i++)
+ {
+ if (added[i])
+ {
+ ava.Append('+');
+ AppendValue(ava, oidSymbols, ordering[i], values[i]);
+ }
+ else
+ {
+ ava = StringBuilderPool.Get(0); //new StringBuilder();
+ AppendValue(ava, oidSymbols, ordering[i], values[i]);
+ components.Add(ava);
+ }
+ }
+
+ if (reverse)
+ {
+ components.Reverse();
+ }
+
+ StringBuilder buf = StringBuilderPool.Get(components.Count); //new StringBuilder();
+
+ if (components.Count > 0)
+ {
+ buf.Append(StringBuilderPool.ReleaseAndGrab(components[0]));
+
+ for (int i = 1; i < components.Count; ++i)
+ {
+ buf.Append(',');
+ buf.Append(StringBuilderPool.ReleaseAndGrab(components[i]));
+ }
+ }
+
+ return StringBuilderPool.ReleaseAndGrab(buf);
+ }
+
+ string cachedStrRepresentation = null;
+ public override string ToString()
+ {
+ return cachedStrRepresentation ?? (cachedStrRepresentation = ToString(DefaultReverse, DefaultSymbols));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Name.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Name.cs.meta
new file mode 100644
index 00000000..4e4eb6c5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509Name.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6bd851c7853c88a468bc4a70c5ea30a1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameEntryConverter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameEntryConverter.cs
new file mode 100644
index 00000000..62856f1e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameEntryConverter.cs
@@ -0,0 +1,91 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Globalization;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * It turns out that the number of standard ways the fields in a DN should be
+ * encoded into their ASN.1 counterparts is rapidly approaching the
+ * number of machines on the internet. By default the X509Name class
+ * will produce UTF8Strings in line with the current recommendations (RFC 3280).
+ *
+ * An example of an encoder look like below:
+ *
+ * public class X509DirEntryConverter
+ * : X509NameEntryConverter
+ * {
+ * public Asn1Object GetConvertedValue(
+ * DerObjectIdentifier oid,
+ * string value)
+ * {
+ * if (str.Length() != 0 && str.charAt(0) == '#')
+ * {
+ * return ConvertHexEncoded(str, 1);
+ * }
+ * if (oid.Equals(EmailAddress))
+ * {
+ * return new DerIA5String(str);
+ * }
+ * else if (CanBePrintable(str))
+ * {
+ * return new DerPrintableString(str);
+ * }
+ * else if (CanBeUTF8(str))
+ * {
+ * return new DerUtf8String(str);
+ * }
+ * else
+ * {
+ * return new DerBmpString(str);
+ * }
+ * }
+ * }
+ *
+ *
+ */
+ public abstract class X509NameEntryConverter
+ {
+ /**
+ * Convert an inline encoded hex string rendition of an ASN.1
+ * object back into its corresponding ASN.1 object.
+ *
+ * @param str the hex encoded object
+ * @param off the index at which the encoding starts
+ * @return the decoded object
+ */
+ protected Asn1Object ConvertHexEncoded(
+ string hexString,
+ int offset)
+ {
+ return Asn1Object.FromByteArray(Hex.DecodeStrict(hexString, offset, hexString.Length - offset));
+ }
+
+ /**
+ * return true if the passed in string can be represented without
+ * loss as a PrintableString, false otherwise.
+ */
+ protected bool CanBePrintable(
+ string str)
+ {
+ return DerPrintableString.IsPrintableString(str);
+ }
+
+ /**
+ * Convert the passed in string value into the appropriate ASN.1
+ * encoded object.
+ *
+ * @param oid the oid associated with the value in the DN.
+ * @param value the value of the particular DN component.
+ * @return the ASN.1 equivalent for the value.
+ */
+ public abstract Asn1Object GetConvertedValue(DerObjectIdentifier oid, string value);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameEntryConverter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameEntryConverter.cs.meta
new file mode 100644
index 00000000..84eef804
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameEntryConverter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7a20f605828dc624ca5c51be8147130c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameTokenizer.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameTokenizer.cs
new file mode 100644
index 00000000..8356435d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameTokenizer.cs
@@ -0,0 +1,108 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.Text;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ /**
+ * class for breaking up an X500 Name into it's component tokens, ala
+ * java.util.StringTokenizer. We need this class as some of the
+ * lightweight Java environment don't support classes like
+ * StringTokenizer.
+ */
+ public class X509NameTokenizer
+ {
+ private string value;
+ private int index;
+ private char separator;
+ private StringBuilder buffer = new StringBuilder();
+
+ public X509NameTokenizer(
+ string oid)
+ : this(oid, ',')
+ {
+ }
+
+ public X509NameTokenizer(
+ string oid,
+ char separator)
+ {
+ this.value = oid;
+ this.index = -1;
+ this.separator = separator;
+ }
+
+ public bool HasMoreTokens()
+ {
+ return index != value.Length;
+ }
+
+ public string NextToken()
+ {
+ if (index == value.Length)
+ {
+ return null;
+ }
+
+ int end = index + 1;
+ bool quoted = false;
+ bool escaped = false;
+
+ buffer.Remove(0, buffer.Length);
+
+ while (end != value.Length)
+ {
+ char c = value[end];
+
+ if (c == '"')
+ {
+ if (!escaped)
+ {
+ quoted = !quoted;
+ }
+ else
+ {
+ buffer.Append(c);
+ escaped = false;
+ }
+ }
+ else
+ {
+ if (escaped || quoted)
+ {
+ if (c == '#' && buffer[buffer.Length - 1] == '=')
+ {
+ buffer.Append('\\');
+ }
+ else if (c == '+' && separator != '+')
+ {
+ buffer.Append('\\');
+ }
+ buffer.Append(c);
+ escaped = false;
+ }
+ else if (c == '\\')
+ {
+ escaped = true;
+ }
+ else if (c == separator)
+ {
+ break;
+ }
+ else
+ {
+ buffer.Append(c);
+ }
+ }
+
+ end++;
+ }
+
+ index = end;
+
+ return buffer.ToString().Trim();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameTokenizer.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameTokenizer.cs.meta
new file mode 100644
index 00000000..d42025d3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509NameTokenizer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2ce038e76e5511145b67464ee68cfb09
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ObjectIdentifiers.cs
new file mode 100644
index 00000000..e37f0be1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ObjectIdentifiers.cs
@@ -0,0 +1,65 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
+{
+ public abstract class X509ObjectIdentifiers
+ {
+ //
+ // base id
+ //
+ internal const string ID = "2.5.4";
+
+ public static readonly DerObjectIdentifier CommonName = new DerObjectIdentifier(ID + ".3");
+ public static readonly DerObjectIdentifier CountryName = new DerObjectIdentifier(ID + ".6");
+ public static readonly DerObjectIdentifier LocalityName = new DerObjectIdentifier(ID + ".7");
+ public static readonly DerObjectIdentifier StateOrProvinceName = new DerObjectIdentifier(ID + ".8");
+ public static readonly DerObjectIdentifier Organization = new DerObjectIdentifier(ID + ".10");
+ public static readonly DerObjectIdentifier OrganizationalUnitName = new DerObjectIdentifier(ID + ".11");
+
+ public static readonly DerObjectIdentifier id_at_telephoneNumber = new DerObjectIdentifier(ID + ".20");
+ public static readonly DerObjectIdentifier id_at_name = new DerObjectIdentifier(ID + ".41");
+
+ public static readonly DerObjectIdentifier id_at_organizationIdentifier = new DerObjectIdentifier("2.5.4.97");
+
+ // id-SHA1 OBJECT IDENTIFIER ::=
+ // {iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) 26 } //
+ public static readonly DerObjectIdentifier IdSha1 = new DerObjectIdentifier("1.3.14.3.2.26");
+
+ //
+ // ripemd160 OBJECT IDENTIFIER ::=
+ // {iso(1) identified-organization(3) TeleTrust(36) algorithm(3) hashAlgorithm(2) RipeMD-160(1)}
+ //
+ public static readonly DerObjectIdentifier RipeMD160 = new DerObjectIdentifier("1.3.36.3.2.1");
+
+ //
+ // ripemd160WithRSAEncryption OBJECT IDENTIFIER ::=
+ // {iso(1) identified-organization(3) TeleTrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) rsaSignatureWithripemd160(2) }
+ //
+ public static readonly DerObjectIdentifier RipeMD160WithRsaEncryption = new DerObjectIdentifier("1.3.36.3.3.1.2");
+
+ public static readonly DerObjectIdentifier IdEARsa = new DerObjectIdentifier("2.5.8.1.1");
+
+ // id-pkix
+ public static readonly DerObjectIdentifier IdPkix = new DerObjectIdentifier("1.3.6.1.5.5.7");
+
+ //
+ // private internet extensions
+ //
+ public static readonly DerObjectIdentifier IdPE = new DerObjectIdentifier(IdPkix + ".1");
+
+ //
+ // authority information access
+ //
+ public static readonly DerObjectIdentifier IdAD = new DerObjectIdentifier(IdPkix + ".48");
+ public static readonly DerObjectIdentifier IdADCAIssuers = new DerObjectIdentifier(IdAD + ".2");
+ public static readonly DerObjectIdentifier IdADOcsp = new DerObjectIdentifier(IdAD + ".1");
+
+ //
+ // OID for ocsp and crl uri in AuthorityInformationAccess extension
+ //
+ public static readonly DerObjectIdentifier OcspAccessMethod = IdADOcsp;
+ public static readonly DerObjectIdentifier CrlAccessMethod = IdADCAIssuers;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..4413a043
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/X509ObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8eacb57f0a2c51a4190b15e89c7932b1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified.meta
new file mode 100644
index 00000000..714e4c0d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9007b8e3f3e77524798fb96616406909
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/BiometricData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/BiometricData.cs
new file mode 100644
index 00000000..46695be0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/BiometricData.cs
@@ -0,0 +1,108 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Qualified
+{
+ /**
+ * The BiometricData object.
+ *
+ * BiometricData ::= SEQUENCE {
+ * typeOfBiometricData TypeOfBiometricData,
+ * hashAlgorithm AlgorithmIdentifier,
+ * biometricDataHash OCTET STRING,
+ * sourceDataUri IA5String OPTIONAL }
+ *
+ */
+ public class BiometricData
+ : Asn1Encodable
+ {
+ private readonly TypeOfBiometricData typeOfBiometricData;
+ private readonly AlgorithmIdentifier hashAlgorithm;
+ private readonly Asn1OctetString biometricDataHash;
+ private readonly DerIA5String sourceDataUri;
+
+ public static BiometricData GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is BiometricData)
+ {
+ return (BiometricData)obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new BiometricData(Asn1Sequence.GetInstance(obj));
+ }
+
+ throw new ArgumentException("unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private BiometricData(
+ Asn1Sequence seq)
+ {
+ typeOfBiometricData = TypeOfBiometricData.GetInstance(seq[0]);
+ hashAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
+ biometricDataHash = Asn1OctetString.GetInstance(seq[2]);
+
+ if (seq.Count > 3)
+ {
+ sourceDataUri = DerIA5String.GetInstance(seq[3]);
+ }
+ }
+
+ public BiometricData(
+ TypeOfBiometricData typeOfBiometricData,
+ AlgorithmIdentifier hashAlgorithm,
+ Asn1OctetString biometricDataHash,
+ DerIA5String sourceDataUri)
+ {
+ this.typeOfBiometricData = typeOfBiometricData;
+ this.hashAlgorithm = hashAlgorithm;
+ this.biometricDataHash = biometricDataHash;
+ this.sourceDataUri = sourceDataUri;
+ }
+
+ public BiometricData(
+ TypeOfBiometricData typeOfBiometricData,
+ AlgorithmIdentifier hashAlgorithm,
+ Asn1OctetString biometricDataHash)
+ {
+ this.typeOfBiometricData = typeOfBiometricData;
+ this.hashAlgorithm = hashAlgorithm;
+ this.biometricDataHash = biometricDataHash;
+ this.sourceDataUri = null;
+ }
+
+ public TypeOfBiometricData TypeOfBiometricData
+ {
+ get { return typeOfBiometricData; }
+ }
+
+ public AlgorithmIdentifier HashAlgorithm
+ {
+ get { return hashAlgorithm; }
+ }
+
+ public Asn1OctetString BiometricDataHash
+ {
+ get { return biometricDataHash; }
+ }
+
+ public DerIA5String SourceDataUri
+ {
+ get { return sourceDataUri; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(typeOfBiometricData, hashAlgorithm, biometricDataHash);
+ v.AddOptional(sourceDataUri);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/BiometricData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/BiometricData.cs.meta
new file mode 100644
index 00000000..8ee97c02
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/BiometricData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c6a8793459291904c8ecd9efafd0e7ef
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.cs
new file mode 100644
index 00000000..6e80966a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.cs
@@ -0,0 +1,23 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Qualified
+{
+ public abstract class EtsiQCObjectIdentifiers
+ {
+ //
+ // base id
+ //
+ public static readonly DerObjectIdentifier IdEtsiQcs = new DerObjectIdentifier("0.4.0.1862.1");
+
+ public static readonly DerObjectIdentifier IdEtsiQcsQcCompliance = new DerObjectIdentifier(IdEtsiQcs+".1");
+ public static readonly DerObjectIdentifier IdEtsiQcsLimitValue = new DerObjectIdentifier(IdEtsiQcs+".2");
+ public static readonly DerObjectIdentifier IdEtsiQcsRetentionPeriod = new DerObjectIdentifier(IdEtsiQcs+".3");
+ public static readonly DerObjectIdentifier IdEtsiQcsQcSscd = new DerObjectIdentifier(IdEtsiQcs+".4");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..277a5886
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: da4f80eaa524cd34c932b9932eda0969
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/Iso4217CurrencyCode.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/Iso4217CurrencyCode.cs
new file mode 100644
index 00000000..166da759
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/Iso4217CurrencyCode.cs
@@ -0,0 +1,88 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Qualified
+{
+ /**
+ * The Iso4217CurrencyCode object.
+ *
+ * Iso4217CurrencyCode ::= CHOICE {
+ * alphabetic PrintableString (SIZE 3), --Recommended
+ * numeric INTEGER (1..999) }
+ * -- Alphabetic or numeric currency code as defined in ISO 4217
+ * -- It is recommended that the Alphabetic form is used
+ *
+ */
+ public class Iso4217CurrencyCode
+ : Asn1Encodable, IAsn1Choice
+ {
+ internal const int AlphabeticMaxSize = 3;
+ internal const int NumericMinSize = 1;
+ internal const int NumericMaxSize = 999;
+
+ internal Asn1Encodable obj;
+// internal int numeric;
+
+ public static Iso4217CurrencyCode GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is Iso4217CurrencyCode)
+ {
+ return (Iso4217CurrencyCode) obj;
+ }
+
+ if (obj is DerInteger)
+ {
+ DerInteger numericobj = DerInteger.GetInstance(obj);
+ int numeric = numericobj.IntValueExact;
+ return new Iso4217CurrencyCode(numeric);
+ }
+
+ if (obj is DerPrintableString)
+ {
+ DerPrintableString alphabetic = DerPrintableString.GetInstance(obj);
+ return new Iso4217CurrencyCode(alphabetic.GetString());
+ }
+
+ throw new ArgumentException("unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public Iso4217CurrencyCode(
+ int numeric)
+ {
+ if (numeric > NumericMaxSize || numeric < NumericMinSize)
+ {
+ throw new ArgumentException("wrong size in numeric code : not in (" + NumericMinSize + ".." + NumericMaxSize + ")");
+ }
+
+ obj = new DerInteger(numeric);
+ }
+
+ public Iso4217CurrencyCode(
+ string alphabetic)
+ {
+ if (alphabetic.Length > AlphabeticMaxSize)
+ {
+ throw new ArgumentException("wrong size in alphabetic code : max size is " + AlphabeticMaxSize);
+ }
+
+ obj = new DerPrintableString(alphabetic);
+ }
+
+ public bool IsAlphabetic { get { return obj is DerPrintableString; } }
+
+ public string Alphabetic { get { return ((DerPrintableString) obj).GetString(); } }
+
+ public int Numeric { get { return ((DerInteger)obj).IntValueExact; } }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return obj.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/Iso4217CurrencyCode.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/Iso4217CurrencyCode.cs.meta
new file mode 100644
index 00000000..885e1b97
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/Iso4217CurrencyCode.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ddb09902663cdcd40bcd66ff40319dbe
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/MonetaryValue.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/MonetaryValue.cs
new file mode 100644
index 00000000..98664ffa
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/MonetaryValue.cs
@@ -0,0 +1,86 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Qualified
+{
+ /**
+ * The MonetaryValue object.
+ *
+ * MonetaryValue ::= SEQUENCE {
+ * currency Iso4217CurrencyCode,
+ * amount INTEGER,
+ * exponent INTEGER }
+ * -- value = amount * 10^exponent
+ *
+ */
+ public class MonetaryValue
+ : Asn1Encodable
+ {
+ internal Iso4217CurrencyCode currency;
+ internal DerInteger amount;
+ internal DerInteger exponent;
+
+ public static MonetaryValue GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is MonetaryValue)
+ {
+ return (MonetaryValue) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new MonetaryValue(Asn1Sequence.GetInstance(obj));
+ }
+
+ throw new ArgumentException("unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private MonetaryValue(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 3)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ currency = Iso4217CurrencyCode.GetInstance(seq[0]);
+ amount = DerInteger.GetInstance(seq[1]);
+ exponent = DerInteger.GetInstance(seq[2]);
+ }
+
+ public MonetaryValue(
+ Iso4217CurrencyCode currency,
+ int amount,
+ int exponent)
+ {
+ this.currency = currency;
+ this.amount = new DerInteger(amount);
+ this.exponent = new DerInteger(exponent);
+ }
+
+ public Iso4217CurrencyCode Currency
+ {
+ get { return currency; }
+ }
+
+ public BigInteger Amount
+ {
+ get { return amount.Value; }
+ }
+
+ public BigInteger Exponent
+ {
+ get { return exponent.Value; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(currency, amount, exponent);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/MonetaryValue.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/MonetaryValue.cs.meta
new file mode 100644
index 00000000..da02ca1e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/MonetaryValue.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 05abe8d6890993045b707154d57aadf3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/QCStatement.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/QCStatement.cs
new file mode 100644
index 00000000..f748b803
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/QCStatement.cs
@@ -0,0 +1,83 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Qualified
+{
+ /**
+ * The QCStatement object.
+ *
+ * QCStatement ::= SEQUENCE {
+ * statementId OBJECT IDENTIFIER,
+ * statementInfo ANY DEFINED BY statementId OPTIONAL}
+ *
+ */
+ public class QCStatement
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier qcStatementId;
+ private readonly Asn1Encodable qcStatementInfo;
+
+ public static QCStatement GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is QCStatement)
+ {
+ return (QCStatement) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new QCStatement(Asn1Sequence.GetInstance(obj));
+ }
+
+ throw new ArgumentException("unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ private QCStatement(
+ Asn1Sequence seq)
+ {
+ qcStatementId = DerObjectIdentifier.GetInstance(seq[0]);
+
+ if (seq.Count > 1)
+ {
+ qcStatementInfo = seq[1];
+ }
+ }
+
+ public QCStatement(
+ DerObjectIdentifier qcStatementId)
+ {
+ this.qcStatementId = qcStatementId;
+ }
+
+ public QCStatement(
+ DerObjectIdentifier qcStatementId,
+ Asn1Encodable qcStatementInfo)
+ {
+ this.qcStatementId = qcStatementId;
+ this.qcStatementInfo = qcStatementInfo;
+ }
+
+ public DerObjectIdentifier StatementId
+ {
+ get { return qcStatementId; }
+ }
+
+ public Asn1Encodable StatementInfo
+ {
+ get { return qcStatementInfo; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(qcStatementId);
+ v.AddOptional(qcStatementInfo);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/QCStatement.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/QCStatement.cs.meta
new file mode 100644
index 00000000..4dbf6f82
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/QCStatement.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 41a0d27afe0848742a7c80f859960316
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.cs
new file mode 100644
index 00000000..4d805128
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.cs
@@ -0,0 +1,25 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Qualified
+{
+ public sealed class Rfc3739QCObjectIdentifiers
+ {
+ private Rfc3739QCObjectIdentifiers()
+ {
+ }
+
+ //
+ // base id
+ //
+ public static readonly DerObjectIdentifier IdQcs = new DerObjectIdentifier("1.3.6.1.5.5.7.11");
+
+ public static readonly DerObjectIdentifier IdQcsPkixQCSyntaxV1 = new DerObjectIdentifier(IdQcs+".1");
+ public static readonly DerObjectIdentifier IdQcsPkixQCSyntaxV2 = new DerObjectIdentifier(IdQcs+".2");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..3685df73
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f985485487d36054ca5b6aff696d9355
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/SemanticsInformation.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/SemanticsInformation.cs
new file mode 100644
index 00000000..b9586475
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/SemanticsInformation.cs
@@ -0,0 +1,122 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Qualified
+{
+ /**
+ * The SemanticsInformation object.
+ *
+ * SemanticsInformation ::= SEQUENCE {
+ * semanticsIdentifier OBJECT IDENTIFIER OPTIONAL,
+ * nameRegistrationAuthorities NameRegistrationAuthorities
+ * OPTIONAL }
+ * (WITH COMPONENTS {..., semanticsIdentifier PRESENT}|
+ * WITH COMPONENTS {..., nameRegistrationAuthorities PRESENT})
+ *
+ * NameRegistrationAuthorities ::= SEQUENCE SIZE (1..MAX) OF
+ * GeneralName
+ *
+ */
+ public class SemanticsInformation
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier semanticsIdentifier;
+ private readonly GeneralName[] nameRegistrationAuthorities;
+
+ public static SemanticsInformation GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is SemanticsInformation)
+ {
+ return (SemanticsInformation) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new SemanticsInformation(Asn1Sequence.GetInstance(obj));
+ }
+
+ throw new ArgumentException("unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public SemanticsInformation(Asn1Sequence seq)
+ {
+ if (seq.Count < 1)
+ throw new ArgumentException("no objects in SemanticsInformation");
+
+ var e = seq.GetEnumerator();
+ e.MoveNext();
+ var obj = e.Current;
+ if (obj is DerObjectIdentifier oid)
+ {
+ semanticsIdentifier = oid;
+ if (e.MoveNext())
+ {
+ obj = e.Current;
+ }
+ else
+ {
+ obj = null;
+ }
+ }
+
+ if (obj != null)
+ {
+ Asn1Sequence generalNameSeq = Asn1Sequence.GetInstance(obj);
+ nameRegistrationAuthorities = new GeneralName[generalNameSeq.Count];
+ for (int i= 0; i < generalNameSeq.Count; i++)
+ {
+ nameRegistrationAuthorities[i] = GeneralName.GetInstance(generalNameSeq[i]);
+ }
+ }
+ }
+
+ public SemanticsInformation(
+ DerObjectIdentifier semanticsIdentifier,
+ GeneralName[] generalNames)
+ {
+ this.semanticsIdentifier = semanticsIdentifier;
+ this.nameRegistrationAuthorities = generalNames;
+ }
+
+ public SemanticsInformation(
+ DerObjectIdentifier semanticsIdentifier)
+ {
+ this.semanticsIdentifier = semanticsIdentifier;
+ }
+
+ public SemanticsInformation(
+ GeneralName[] generalNames)
+ {
+ this.nameRegistrationAuthorities = generalNames;
+ }
+
+ public DerObjectIdentifier SemanticsIdentifier
+ {
+ get { return semanticsIdentifier; }
+ }
+
+ public GeneralName[] GetNameRegistrationAuthorities()
+ {
+ return nameRegistrationAuthorities;
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ v.AddOptional(semanticsIdentifier);
+
+ if (null != nameRegistrationAuthorities)
+ {
+ v.Add(new DerSequence(nameRegistrationAuthorities));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/SemanticsInformation.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/SemanticsInformation.cs.meta
new file mode 100644
index 00000000..6f262688
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/SemanticsInformation.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d1a5f3c1135d04c4384ff3698fbcfdb5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/TypeOfBiometricData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/TypeOfBiometricData.cs
new file mode 100644
index 00000000..a8768123
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/TypeOfBiometricData.cs
@@ -0,0 +1,95 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Qualified
+{
+ /**
+ * The TypeOfBiometricData object.
+ *
+ * TypeOfBiometricData ::= CHOICE {
+ * predefinedBiometricType PredefinedBiometricType,
+ * biometricDataOid OBJECT IDENTIFIER }
+ *
+ * PredefinedBiometricType ::= INTEGER {
+ * picture(0),handwritten-signature(1)}
+ * (picture|handwritten-signature)
+ *
+ */
+ public class TypeOfBiometricData
+ : Asn1Encodable, IAsn1Choice
+ {
+ public const int Picture = 0;
+ public const int HandwrittenSignature = 1;
+
+ internal Asn1Encodable obj;
+
+ public static TypeOfBiometricData GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is TypeOfBiometricData)
+ {
+ return (TypeOfBiometricData) obj;
+ }
+
+ if (obj is DerInteger)
+ {
+ DerInteger predefinedBiometricTypeObj = DerInteger.GetInstance(obj);
+ int predefinedBiometricType = predefinedBiometricTypeObj.IntValueExact;
+
+ return new TypeOfBiometricData(predefinedBiometricType);
+ }
+
+ if (obj is DerObjectIdentifier)
+ {
+ DerObjectIdentifier BiometricDataOid = DerObjectIdentifier.GetInstance(obj);
+ return new TypeOfBiometricData(BiometricDataOid);
+ }
+
+ throw new ArgumentException("unknown object in GetInstance: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public TypeOfBiometricData(
+ int predefinedBiometricType)
+ {
+ if (predefinedBiometricType == Picture || predefinedBiometricType == HandwrittenSignature)
+ {
+ obj = new DerInteger(predefinedBiometricType);
+ }
+ else
+ {
+ throw new ArgumentException("unknow PredefinedBiometricType : " + predefinedBiometricType);
+ }
+ }
+
+ public TypeOfBiometricData(
+ DerObjectIdentifier biometricDataOid)
+ {
+ obj = biometricDataOid;
+ }
+
+ public bool IsPredefined
+ {
+ get { return obj is DerInteger; }
+ }
+
+ public int PredefinedBiometricType
+ {
+ get { return ((DerInteger)obj).IntValueExact; }
+ }
+
+ public DerObjectIdentifier BiometricDataOid
+ {
+ get { return (DerObjectIdentifier) obj; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return obj.ToAsn1Object();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/TypeOfBiometricData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/TypeOfBiometricData.cs.meta
new file mode 100644
index 00000000..cb607aae
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/qualified/TypeOfBiometricData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0848196121a8fe64c8e774c5e762c232
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi.meta
new file mode 100644
index 00000000..ff1bcd31
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 82ee6990e8783a642a7603bac2a1be5c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/NameOrPseudonym.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/NameOrPseudonym.cs
new file mode 100644
index 00000000..26af19fb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/NameOrPseudonym.cs
@@ -0,0 +1,181 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SigI
+{
+ /**
+ * Structure for a name or pseudonym.
+ *
+ *
+ * NameOrPseudonym ::= CHOICE {
+ * surAndGivenName SEQUENCE {
+ * surName DirectoryString,
+ * givenName SEQUENCE OF DirectoryString
+ * },
+ * pseudonym DirectoryString
+ * }
+ *
+ *
+ * @see org.bouncycastle.asn1.x509.sigi.PersonalData
+ *
+ */
+ public class NameOrPseudonym
+ : Asn1Encodable, IAsn1Choice
+ {
+ private readonly DirectoryString pseudonym;
+ private readonly DirectoryString surname;
+ private readonly Asn1Sequence givenName;
+
+ public static NameOrPseudonym GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is NameOrPseudonym)
+ {
+ return (NameOrPseudonym)obj;
+ }
+
+ if (obj is IAsn1String)
+ {
+ return new NameOrPseudonym(DirectoryString.GetInstance(obj));
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new NameOrPseudonym((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from DERString.
+ *
+ * The sequence is of type NameOrPseudonym:
+ *
+ *
+ * NameOrPseudonym ::= CHOICE {
+ * surAndGivenName SEQUENCE {
+ * surName DirectoryString,
+ * givenName SEQUENCE OF DirectoryString
+ * },
+ * pseudonym DirectoryString
+ * }
+ *
+ * @param pseudonym pseudonym value to use.
+ */
+ public NameOrPseudonym(
+ DirectoryString pseudonym)
+ {
+ this.pseudonym = pseudonym;
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * The sequence is of type NameOrPseudonym:
+ *
+ *
+ * NameOrPseudonym ::= CHOICE {
+ * surAndGivenName SEQUENCE {
+ * surName DirectoryString,
+ * givenName SEQUENCE OF DirectoryString
+ * },
+ * pseudonym DirectoryString
+ * }
+ *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private NameOrPseudonym(
+ Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ if (!(seq[0] is IAsn1String))
+ throw new ArgumentException("Bad object encountered: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(seq[0]));
+
+ surname = DirectoryString.GetInstance(seq[0]);
+ givenName = Asn1Sequence.GetInstance(seq[1]);
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * @param pseudonym The pseudonym.
+ */
+ public NameOrPseudonym(
+ string pseudonym)
+ : this(new DirectoryString(pseudonym))
+ {
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * @param surname The surname.
+ * @param givenName A sequence of directory strings making up the givenName
+ */
+ public NameOrPseudonym(
+ DirectoryString surname,
+ Asn1Sequence givenName)
+ {
+ this.surname = surname;
+ this.givenName = givenName;
+ }
+
+ public DirectoryString Pseudonym
+ {
+ get { return pseudonym; }
+ }
+
+ public DirectoryString Surname
+ {
+ get { return surname; }
+ }
+
+ public DirectoryString[] GetGivenName()
+ {
+ DirectoryString[] items = new DirectoryString[givenName.Count];
+ int count = 0;
+ foreach (object o in givenName)
+ {
+ items[count++] = DirectoryString.GetInstance(o);
+ }
+ return items;
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * NameOrPseudonym ::= CHOICE {
+ * surAndGivenName SEQUENCE {
+ * surName DirectoryString,
+ * givenName SEQUENCE OF DirectoryString
+ * },
+ * pseudonym DirectoryString
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ if (pseudonym != null)
+ {
+ return pseudonym.ToAsn1Object();
+ }
+
+ return new DerSequence(surname, givenName);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/NameOrPseudonym.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/NameOrPseudonym.cs.meta
new file mode 100644
index 00000000..162cd5c3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/NameOrPseudonym.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f6ab8cce8fbab2247afdf6cb57a1ac37
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/PersonalData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/PersonalData.cs
new file mode 100644
index 00000000..e6e86eb2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/PersonalData.cs
@@ -0,0 +1,207 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X500;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SigI
+{
+ /**
+ * Contains personal data for the otherName field in the subjectAltNames
+ * extension.
+ *
+ *
+ * PersonalData ::= SEQUENCE {
+ * nameOrPseudonym NameOrPseudonym,
+ * nameDistinguisher [0] INTEGER OPTIONAL,
+ * dateOfBirth [1] GeneralizedTime OPTIONAL,
+ * placeOfBirth [2] DirectoryString OPTIONAL,
+ * gender [3] PrintableString OPTIONAL,
+ * postalAddress [4] DirectoryString OPTIONAL
+ * }
+ *
+ *
+ * @see org.bouncycastle.asn1.x509.sigi.NameOrPseudonym
+ * @see org.bouncycastle.asn1.x509.sigi.SigIObjectIdentifiers
+ */
+ public class PersonalData
+ : Asn1Encodable
+ {
+ private readonly NameOrPseudonym nameOrPseudonym;
+ private readonly BigInteger nameDistinguisher;
+ private readonly Asn1GeneralizedTime dateOfBirth;
+ private readonly DirectoryString placeOfBirth;
+ private readonly string gender;
+ private readonly DirectoryString postalAddress;
+
+ public static PersonalData GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is PersonalData)
+ {
+ return (PersonalData) obj;
+ }
+
+ if (obj is Asn1Sequence)
+ {
+ return new PersonalData((Asn1Sequence) obj);
+ }
+
+ throw new ArgumentException("unknown object in factory: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ /**
+ * Constructor from Asn1Sequence.
+ *
+ * The sequence is of type NameOrPseudonym:
+ *
+ *
+ * PersonalData ::= SEQUENCE {
+ * nameOrPseudonym NameOrPseudonym,
+ * nameDistinguisher [0] INTEGER OPTIONAL,
+ * dateOfBirth [1] GeneralizedTime OPTIONAL,
+ * placeOfBirth [2] DirectoryString OPTIONAL,
+ * gender [3] PrintableString OPTIONAL,
+ * postalAddress [4] DirectoryString OPTIONAL
+ * }
+ *
+ *
+ * @param seq The ASN.1 sequence.
+ */
+ private PersonalData(Asn1Sequence seq)
+ {
+ if (seq.Count < 1)
+ throw new ArgumentException("Bad sequence size: " + seq.Count);
+
+ var e = seq.GetEnumerator();
+ e.MoveNext();
+
+ nameOrPseudonym = NameOrPseudonym.GetInstance(e.Current);
+
+ while (e.MoveNext())
+ {
+ Asn1TaggedObject o = Asn1TaggedObject.GetInstance(e.Current);
+ int tag = o.TagNo;
+ switch (tag)
+ {
+ case 0:
+ nameDistinguisher = DerInteger.GetInstance(o, false).Value;
+ break;
+ case 1:
+ dateOfBirth = Asn1GeneralizedTime.GetInstance(o, false);
+ break;
+ case 2:
+ placeOfBirth = DirectoryString.GetInstance(o, true);
+ break;
+ case 3:
+ gender = DerPrintableString.GetInstance(o, false).GetString();
+ break;
+ case 4:
+ postalAddress = DirectoryString.GetInstance(o, true);
+ break;
+ default:
+ throw new ArgumentException("Bad tag number: " + o.TagNo);
+ }
+ }
+ }
+
+ /**
+ * Constructor from a given details.
+ *
+ * @param nameOrPseudonym Name or pseudonym.
+ * @param nameDistinguisher Name distinguisher.
+ * @param dateOfBirth Date of birth.
+ * @param placeOfBirth Place of birth.
+ * @param gender Gender.
+ * @param postalAddress Postal Address.
+ */
+ public PersonalData(
+ NameOrPseudonym nameOrPseudonym,
+ BigInteger nameDistinguisher,
+ Asn1GeneralizedTime dateOfBirth,
+ DirectoryString placeOfBirth,
+ string gender,
+ DirectoryString postalAddress)
+ {
+ this.nameOrPseudonym = nameOrPseudonym;
+ this.dateOfBirth = dateOfBirth;
+ this.gender = gender;
+ this.nameDistinguisher = nameDistinguisher;
+ this.postalAddress = postalAddress;
+ this.placeOfBirth = placeOfBirth;
+ }
+
+ public NameOrPseudonym NameOrPseudonym
+ {
+ get { return nameOrPseudonym; }
+ }
+
+ public BigInteger NameDistinguisher
+ {
+ get { return nameDistinguisher; }
+ }
+
+ public Asn1GeneralizedTime DateOfBirth
+ {
+ get { return dateOfBirth; }
+ }
+
+ public DirectoryString PlaceOfBirth
+ {
+ get { return placeOfBirth; }
+ }
+
+ public string Gender
+ {
+ get { return gender; }
+ }
+
+ public DirectoryString PostalAddress
+ {
+ get { return postalAddress; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Returns:
+ *
+ *
+ * PersonalData ::= SEQUENCE {
+ * nameOrPseudonym NameOrPseudonym,
+ * nameDistinguisher [0] INTEGER OPTIONAL,
+ * dateOfBirth [1] GeneralizedTime OPTIONAL,
+ * placeOfBirth [2] DirectoryString OPTIONAL,
+ * gender [3] PrintableString OPTIONAL,
+ * postalAddress [4] DirectoryString OPTIONAL
+ * }
+ *
+ *
+ * @return an Asn1Object
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(nameOrPseudonym);
+
+ if (null != nameDistinguisher)
+ {
+ v.Add(new DerTaggedObject(false, 0, new DerInteger(nameDistinguisher)));
+ }
+
+ v.AddOptionalTagged(false, 1, dateOfBirth);
+ v.AddOptionalTagged(true, 2, placeOfBirth);
+
+ if (null != gender)
+ {
+ v.Add(new DerTaggedObject(false, 3, new DerPrintableString(gender, true)));
+ }
+
+ v.AddOptionalTagged(true, 4, postalAddress);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/PersonalData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/PersonalData.cs.meta
new file mode 100644
index 00000000..92d29d42
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/PersonalData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fb40b2cdcd82538449afb5bf1df67cf1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/SigIObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/SigIObjectIdentifiers.cs
new file mode 100644
index 00000000..2f65ad3b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/SigIObjectIdentifiers.cs
@@ -0,0 +1,53 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SigI
+{
+ /**
+ * Object Identifiers of SigI specifciation (German Signature Law
+ * Interoperability specification).
+ */
+ public sealed class SigIObjectIdentifiers
+ {
+ private SigIObjectIdentifiers()
+ {
+ }
+
+ public readonly static DerObjectIdentifier IdSigI = new DerObjectIdentifier("1.3.36.8");
+
+ /**
+ * Key purpose IDs for German SigI (Signature Interoperability
+ * Specification)
+ */
+ public readonly static DerObjectIdentifier IdSigIKP = new DerObjectIdentifier(IdSigI + ".2");
+
+ /**
+ * Certificate policy IDs for German SigI (Signature Interoperability
+ * Specification)
+ */
+ public readonly static DerObjectIdentifier IdSigICP = new DerObjectIdentifier(IdSigI + ".1");
+
+ /**
+ * Other Name IDs for German SigI (Signature Interoperability Specification)
+ */
+ public readonly static DerObjectIdentifier IdSigION = new DerObjectIdentifier(IdSigI + ".4");
+
+ /**
+ * To be used for for the generation of directory service certificates.
+ */
+ public static readonly DerObjectIdentifier IdSigIKPDirectoryService = new DerObjectIdentifier(IdSigIKP + ".1");
+
+ /**
+ * ID for PersonalData
+ */
+ public static readonly DerObjectIdentifier IdSigIONPersonalData = new DerObjectIdentifier(IdSigION + ".1");
+
+ /**
+ * Certificate is conform to german signature law.
+ */
+ public static readonly DerObjectIdentifier IdSigICPSigConform = new DerObjectIdentifier(IdSigICP + ".1");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/SigIObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/SigIObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..1d5d1881
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x509/sigi/SigIObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 67cf617aa948be344a1413e290314180
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9.meta
new file mode 100644
index 00000000..d92de059
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8f387346e4cb2d1478f0304ac7cf4c63
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHDomainParameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHDomainParameters.cs
new file mode 100644
index 00000000..26708aee
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHDomainParameters.cs
@@ -0,0 +1,112 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ public class DHDomainParameters
+ : Asn1Encodable
+ {
+ private readonly DerInteger p, g, q, j;
+ private readonly DHValidationParms validationParms;
+
+ public static DHDomainParameters GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ public static DHDomainParameters GetInstance(object obj)
+ {
+ if (obj == null || obj is DHDomainParameters)
+ return (DHDomainParameters)obj;
+
+ if (obj is Asn1Sequence)
+ return new DHDomainParameters((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid DHDomainParameters: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public DHDomainParameters(DerInteger p, DerInteger g, DerInteger q, DerInteger j,
+ DHValidationParms validationParms)
+ {
+ if (p == null)
+ throw new ArgumentNullException("p");
+ if (g == null)
+ throw new ArgumentNullException("g");
+ if (q == null)
+ throw new ArgumentNullException("q");
+
+ this.p = p;
+ this.g = g;
+ this.q = q;
+ this.j = j;
+ this.validationParms = validationParms;
+ }
+
+ private DHDomainParameters(Asn1Sequence seq)
+ {
+ if (seq.Count < 3 || seq.Count > 5)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ var e = seq.GetEnumerator();
+ this.p = DerInteger.GetInstance(GetNext(e));
+ this.g = DerInteger.GetInstance(GetNext(e));
+ this.q = DerInteger.GetInstance(GetNext(e));
+
+ Asn1Encodable next = GetNext(e);
+
+ if (next != null && next is DerInteger)
+ {
+ this.j = DerInteger.GetInstance(next);
+ next = GetNext(e);
+ }
+
+ if (next != null)
+ {
+ this.validationParms = DHValidationParms.GetInstance(next.ToAsn1Object());
+ }
+ }
+
+ private static Asn1Encodable GetNext(IEnumerator e)
+ {
+ return e.MoveNext() ? (Asn1Encodable)e.Current : null;
+ }
+
+ public DerInteger P
+ {
+ get { return this.p; }
+ }
+
+ public DerInteger G
+ {
+ get { return this.g; }
+ }
+
+ public DerInteger Q
+ {
+ get { return this.q; }
+ }
+
+ public DerInteger J
+ {
+ get { return this.j; }
+ }
+
+ public DHValidationParms ValidationParms
+ {
+ get { return this.validationParms; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(p, g, q);
+ v.AddOptional(j, validationParms);
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHDomainParameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHDomainParameters.cs.meta
new file mode 100644
index 00000000..2b151efc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHDomainParameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8abddd5c60d99094c97eb6a91e6f4722
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHPublicKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHPublicKey.cs
new file mode 100644
index 00000000..0160326d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHPublicKey.cs
@@ -0,0 +1,50 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ public class DHPublicKey
+ : Asn1Encodable
+ {
+ private readonly DerInteger y;
+
+ public static DHPublicKey GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(DerInteger.GetInstance(obj, isExplicit));
+ }
+
+ public static DHPublicKey GetInstance(object obj)
+ {
+ if (obj == null || obj is DHPublicKey)
+ return (DHPublicKey)obj;
+
+ if (obj is DerInteger)
+ return new DHPublicKey((DerInteger)obj);
+
+ throw new ArgumentException("Invalid DHPublicKey: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public DHPublicKey(DerInteger y)
+ {
+ if (y == null)
+ throw new ArgumentNullException("y");
+
+ this.y = y;
+ }
+
+ public DerInteger Y
+ {
+ get { return this.y; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return this.y;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHPublicKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHPublicKey.cs.meta
new file mode 100644
index 00000000..8fef7f6d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHPublicKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6ca804dc18294264b91512f870334b63
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHValidationParms.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHValidationParms.cs
new file mode 100644
index 00000000..39208542
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHValidationParms.cs
@@ -0,0 +1,68 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ public class DHValidationParms
+ : Asn1Encodable
+ {
+ private readonly DerBitString seed;
+ private readonly DerInteger pgenCounter;
+
+ public static DHValidationParms GetInstance(Asn1TaggedObject obj, bool isExplicit)
+ {
+ return GetInstance(Asn1Sequence.GetInstance(obj, isExplicit));
+ }
+
+ public static DHValidationParms GetInstance(object obj)
+ {
+ if (obj == null || obj is DHValidationParms)
+ return (DHValidationParms)obj;
+
+ if (obj is Asn1Sequence)
+ return new DHValidationParms((Asn1Sequence)obj);
+
+ throw new ArgumentException("Invalid DHValidationParms: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), "obj");
+ }
+
+ public DHValidationParms(DerBitString seed, DerInteger pgenCounter)
+ {
+ if (seed == null)
+ throw new ArgumentNullException("seed");
+ if (pgenCounter == null)
+ throw new ArgumentNullException("pgenCounter");
+
+ this.seed = seed;
+ this.pgenCounter = pgenCounter;
+ }
+
+ private DHValidationParms(Asn1Sequence seq)
+ {
+ if (seq.Count != 2)
+ throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
+
+ this.seed = DerBitString.GetInstance(seq[0]);
+ this.pgenCounter = DerInteger.GetInstance(seq[1]);
+ }
+
+ public DerBitString Seed
+ {
+ get { return this.seed; }
+ }
+
+ public DerInteger PgenCounter
+ {
+ get { return this.pgenCounter; }
+ }
+
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(seed, pgenCounter);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHValidationParms.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHValidationParms.cs.meta
new file mode 100644
index 00000000..08ab52ff
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/DHValidationParms.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7b9d7fbb7b559f64789c0233158c7d80
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/ECNamedCurveTable.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/ECNamedCurveTable.cs
new file mode 100644
index 00000000..5725b390
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/ECNamedCurveTable.cs
@@ -0,0 +1,237 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Anssi;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.GM;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Sec;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ /// A unified elliptic curve registry of the various standard-specific registries.
+ public class ECNamedCurveTable
+ {
+ /// Look up the for the curve with the given name.
+ /// The name of the curve.
+ public static X9ECParameters GetByName(string name)
+ {
+ X9ECParameters ecP = X962NamedCurves.GetByName(name);
+ if (ecP == null)
+ {
+ ecP = SecNamedCurves.GetByName(name);
+ }
+ if (ecP == null)
+ {
+ ecP = NistNamedCurves.GetByName(name);
+ }
+ if (ecP == null)
+ {
+ ecP = TeleTrusTNamedCurves.GetByName(name);
+ }
+ if (ecP == null)
+ {
+ ecP = AnssiNamedCurves.GetByName(name);
+ }
+ if (ecP == null)
+ {
+ ecP = ECGost3410NamedCurves.GetByName(name);
+ }
+ if (ecP == null)
+ {
+ ecP = GMNamedCurves.GetByName(name);
+ }
+ return ecP;
+ }
+
+ /// Look up an for the curve with the given name.
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of
+ /// the full .
+ ///
+ /// The name of the curve.
+ public static X9ECParametersHolder GetByNameLazy(string name)
+ {
+ X9ECParametersHolder holder = X962NamedCurves.GetByNameLazy(name);
+ if (null == holder)
+ {
+ holder = SecNamedCurves.GetByNameLazy(name);
+ }
+ if (null == holder)
+ {
+ holder = NistNamedCurves.GetByNameLazy(name);
+ }
+ if (null == holder)
+ {
+ holder = TeleTrusTNamedCurves.GetByNameLazy(name);
+ }
+ if (null == holder)
+ {
+ holder = AnssiNamedCurves.GetByNameLazy(name);
+ }
+ if (null == holder)
+ {
+ holder = ECGost3410NamedCurves.GetByNameLazy(name);
+ }
+ if (null == holder)
+ {
+ holder = GMNamedCurves.GetByNameLazy(name);
+ }
+ return holder;
+ }
+
+ /// Look up the for the curve with the given
+ /// OID .
+ /// The OID for the curve.
+ public static X9ECParameters GetByOid(DerObjectIdentifier oid)
+ {
+ X9ECParameters ecP = X962NamedCurves.GetByOid(oid);
+ if (ecP == null)
+ {
+ ecP = SecNamedCurves.GetByOid(oid);
+ }
+
+ // NOTE: All the NIST curves are currently from SEC, so no point in redundant OID lookup
+
+ if (ecP == null)
+ {
+ ecP = TeleTrusTNamedCurves.GetByOid(oid);
+ }
+ if (ecP == null)
+ {
+ ecP = AnssiNamedCurves.GetByOid(oid);
+ }
+ if (ecP == null)
+ {
+ ecP = ECGost3410NamedCurves.GetByOid(oid);
+ }
+ if (ecP == null)
+ {
+ ecP = GMNamedCurves.GetByOid(oid);
+ }
+ return ecP;
+ }
+
+ /// Look up an for the curve with the given
+ /// OID .
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of
+ /// the full .
+ ///
+ /// The OID for the curve.
+ public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid)
+ {
+ X9ECParametersHolder holder = X962NamedCurves.GetByOidLazy(oid);
+ if (null == holder)
+ {
+ holder = SecNamedCurves.GetByOidLazy(oid);
+ }
+
+ // NOTE: All the NIST curves are currently from SEC, so no point in redundant OID lookup
+
+ if (null == holder)
+ {
+ holder = TeleTrusTNamedCurves.GetByOidLazy(oid);
+ }
+ if (null == holder)
+ {
+ holder = AnssiNamedCurves.GetByOidLazy(oid);
+ }
+ if (null == holder)
+ {
+ holder = ECGost3410NamedCurves.GetByOidLazy(oid);
+ }
+ if (null == holder)
+ {
+ holder = GMNamedCurves.GetByOidLazy(oid);
+ }
+ return holder;
+ }
+
+ /// Look up the name of the curve with the given OID .
+ /// The OID for the curve.
+ public static string GetName(DerObjectIdentifier oid)
+ {
+ string name = X962NamedCurves.GetName(oid);
+ if (name == null)
+ {
+ name = SecNamedCurves.GetName(oid);
+ }
+ if (name == null)
+ {
+ name = NistNamedCurves.GetName(oid);
+ }
+ if (name == null)
+ {
+ name = TeleTrusTNamedCurves.GetName(oid);
+ }
+ if (name == null)
+ {
+ name = AnssiNamedCurves.GetName(oid);
+ }
+ if (name == null)
+ {
+ name = ECGost3410NamedCurves.GetName(oid);
+ }
+ if (name == null)
+ {
+ name = GMNamedCurves.GetName(oid);
+ }
+ return name;
+ }
+
+ /// Look up the OID of the curve with the given name.
+ /// The name of the curve.
+ public static DerObjectIdentifier GetOid(string name)
+ {
+ DerObjectIdentifier oid = X962NamedCurves.GetOid(name);
+ if (oid == null)
+ {
+ oid = SecNamedCurves.GetOid(name);
+ }
+ if (oid == null)
+ {
+ oid = NistNamedCurves.GetOid(name);
+ }
+ if (oid == null)
+ {
+ oid = TeleTrusTNamedCurves.GetOid(name);
+ }
+ if (oid == null)
+ {
+ oid = AnssiNamedCurves.GetOid(name);
+ }
+ if (oid == null)
+ {
+ oid = ECGost3410NamedCurves.GetOid(name);
+ }
+ if (oid == null)
+ {
+ oid = GMNamedCurves.GetOid(name);
+ }
+ return oid;
+ }
+
+ /// Enumerate the available curve names in all the registries.
+ public static IEnumerable Names
+ {
+ get
+ {
+ var result = new List();
+ result.AddRange(X962NamedCurves.Names);
+ result.AddRange(SecNamedCurves.Names);
+ result.AddRange(NistNamedCurves.Names);
+ result.AddRange(TeleTrusTNamedCurves.Names);
+ result.AddRange(AnssiNamedCurves.Names);
+ result.AddRange(ECGost3410NamedCurves.Names);
+ result.AddRange(GMNamedCurves.Names);
+ return result;
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/ECNamedCurveTable.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/ECNamedCurveTable.cs.meta
new file mode 100644
index 00000000..1bd9f941
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/ECNamedCurveTable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7ef707e98faa62d4b9ff0a2661d09be2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/KeySpecificInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/KeySpecificInfo.cs
new file mode 100644
index 00000000..27631560
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/KeySpecificInfo.cs
@@ -0,0 +1,59 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ /**
+ * ASN.1 def for Diffie-Hellman key exchange KeySpecificInfo structure. See
+ * RFC 2631, or X9.42, for further details.
+ */
+ public class KeySpecificInfo
+ : Asn1Encodable
+ {
+ private DerObjectIdentifier algorithm;
+ private Asn1OctetString counter;
+
+ public KeySpecificInfo(
+ DerObjectIdentifier algorithm,
+ Asn1OctetString counter)
+ {
+ this.algorithm = algorithm;
+ this.counter = counter;
+ }
+
+ public KeySpecificInfo(Asn1Sequence seq)
+ {
+ var e = seq.GetEnumerator();
+
+ e.MoveNext();
+ algorithm = (DerObjectIdentifier)e.Current;
+ e.MoveNext();
+ counter = (Asn1OctetString)e.Current;
+ }
+
+ public DerObjectIdentifier Algorithm
+ {
+ get { return algorithm; }
+ }
+
+ public Asn1OctetString Counter
+ {
+ get { return counter; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KeySpecificInfo ::= Sequence {
+ * algorithm OBJECT IDENTIFIER,
+ * counter OCTET STRING SIZE (4..4)
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(algorithm, counter);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/KeySpecificInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/KeySpecificInfo.cs.meta
new file mode 100644
index 00000000..750dd3d2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/KeySpecificInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ae2146f35a96e774182e1e3ac7aecc34
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/OtherInfo.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/OtherInfo.cs
new file mode 100644
index 00000000..224fe71f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/OtherInfo.cs
@@ -0,0 +1,83 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ /**
+ * ANS.1 def for Diffie-Hellman key exchange OtherInfo structure. See
+ * RFC 2631, or X9.42, for further details.
+ */
+ public class OtherInfo
+ : Asn1Encodable
+ {
+ private KeySpecificInfo keyInfo;
+ private Asn1OctetString partyAInfo;
+ private Asn1OctetString suppPubInfo;
+
+ public OtherInfo(
+ KeySpecificInfo keyInfo,
+ Asn1OctetString partyAInfo,
+ Asn1OctetString suppPubInfo)
+ {
+ this.keyInfo = keyInfo;
+ this.partyAInfo = partyAInfo;
+ this.suppPubInfo = suppPubInfo;
+ }
+
+ public OtherInfo(Asn1Sequence seq)
+ {
+ var e = seq.GetEnumerator();
+
+ e.MoveNext();
+ keyInfo = new KeySpecificInfo((Asn1Sequence)e.Current);
+
+ while (e.MoveNext())
+ {
+ Asn1TaggedObject o = (Asn1TaggedObject)e.Current;
+
+ if (o.TagNo == 0)
+ {
+ partyAInfo = (Asn1OctetString)o.GetObject();
+ }
+ else if ((int) o.TagNo == 2)
+ {
+ suppPubInfo = (Asn1OctetString)o.GetObject();
+ }
+ }
+ }
+
+ public KeySpecificInfo KeyInfo
+ {
+ get { return keyInfo; }
+ }
+
+ public Asn1OctetString PartyAInfo
+ {
+ get { return partyAInfo; }
+ }
+
+ public Asn1OctetString SuppPubInfo
+ {
+ get { return suppPubInfo; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * OtherInfo ::= Sequence {
+ * keyInfo KeySpecificInfo,
+ * partyAInfo [0] OCTET STRING OPTIONAL,
+ * suppPubInfo [2] OCTET STRING
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(keyInfo);
+ v.AddOptionalTagged(true, 0, partyAInfo);
+ v.Add(new DerTaggedObject(2, suppPubInfo));
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/OtherInfo.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/OtherInfo.cs.meta
new file mode 100644
index 00000000..a8c8a33a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/OtherInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 04bfdb3f609c0ef45b4d49bdde370acb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962NamedCurves.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962NamedCurves.cs
new file mode 100644
index 00000000..8e526510
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962NamedCurves.cs
@@ -0,0 +1,866 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Multiplier;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ /// Elliptic curve registry for the curves defined in X.962 EC-DSA.
+ public static class X962NamedCurves
+ {
+ private static X9ECPoint ConfigureBasepoint(ECCurve curve, string encoding)
+ {
+ X9ECPoint G = new X9ECPoint(curve, Hex.DecodeStrict(encoding));
+ WNafUtilities.ConfigureBasepoint(G.Point);
+ return G;
+ }
+
+ private static ECCurve ConfigureCurve(ECCurve curve)
+ {
+ return curve;
+ }
+
+ private static BigInteger FromHex(string hex)
+ {
+ return new BigInteger(1, Hex.DecodeStrict(hex));
+ }
+
+ internal class Prime192v1Holder
+ : X9ECParametersHolder
+ {
+ private Prime192v1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Prime192v1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("ffffffffffffffffffffffff99def836146bc9b1b4d22831");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"),
+ FromHex("fffffffffffffffffffffffffffffffefffffffffffffffc"),
+ FromHex("64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1"),
+ n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("3045AE6FC8422f64ED579528D38120EAE12196D5");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "03188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Prime192v2Holder
+ : X9ECParametersHolder
+ {
+ private Prime192v2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Prime192v2Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("fffffffffffffffffffffffe5fb1a724dc80418648d8dd31");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"),
+ FromHex("fffffffffffffffffffffffffffffffefffffffffffffffc"),
+ FromHex("cc22d6dfb95c6b25e49c0d6364a4e5980c393aa21668d953"),
+ n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("31a92ee2029fd10d901b113e990710f0d21ac6b6");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "03eea2bae7e1497842f2de7769cfe9c989c072ad696f48034a");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Prime192v3Holder
+ : X9ECParametersHolder
+ {
+ private Prime192v3Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Prime192v3Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("ffffffffffffffffffffffff7a62d031c83f4294f640ec13");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ FromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"),
+ FromHex("fffffffffffffffffffffffffffffffefffffffffffffffc"),
+ FromHex("22123dc2395a05caa7423daeccc94760a7d462256bd56916"),
+ n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("c469684435deb378c4b65ca9591e2a5763059a2e");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "027d29778100c65a1da1783716588dce2b8b4aee8e228f1896");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Prime239v1Holder
+ : X9ECParametersHolder
+ {
+ private Prime239v1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Prime239v1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("7fffffffffffffffffffffff7fffff9e5e9a9f5d9071fbd1522688909d0b");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ new BigInteger("883423532389192164791648750360308885314476597252960362792450860609699839"),
+ FromHex("7fffffffffffffffffffffff7fffffffffff8000000000007ffffffffffc"),
+ FromHex("6b016c3bdcf18941d0d654921475ca71a9db2fb27d1d37796185c2942c0a"),
+ n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("e43bb460f0b80cc0c0b075798e948060f8321b7d");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "020ffa963cdca8816ccc33b8642bedf905c3d358573d3f27fbbd3b3cb9aaaf");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Prime239v2Holder
+ : X9ECParametersHolder
+ {
+ private Prime239v2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Prime239v2Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("7fffffffffffffffffffffff800000cfa7e8594377d414c03821bc582063");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ new BigInteger("883423532389192164791648750360308885314476597252960362792450860609699839"),
+ FromHex("7fffffffffffffffffffffff7fffffffffff8000000000007ffffffffffc"),
+ FromHex("617fab6832576cbbfed50d99f0249c3fee58b94ba0038c7ae84c8c832f2c"),
+ n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("e8b4011604095303ca3b8099982be09fcb9ae616");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0238af09d98727705120c921bb5e9e26296a3cdcf2f35757a0eafd87b830e7");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Prime239v3Holder
+ : X9ECParametersHolder
+ {
+ private Prime239v3Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Prime239v3Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("7fffffffffffffffffffffff7fffff975deb41b3a6057c3c432146526551");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ new BigInteger("883423532389192164791648750360308885314476597252960362792450860609699839"),
+ FromHex("7fffffffffffffffffffffff7fffffffffff8000000000007ffffffffffc"),
+ FromHex("255705fa2a306654b1f4cb03d6a750a30c250102d4988717d9ba15ab6d3e"),
+ n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("7d7374168ffe3471b60a857686a19475d3bfa2ff");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "036768ae8e18bb92cfcf005c949aa2c6d94853d0e660bbf854b1c9505fe95a");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class Prime256v1Holder
+ : X9ECParametersHolder
+ {
+ private Prime256v1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new Prime256v1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551");
+ BigInteger h = BigInteger.One;
+
+ return ConfigureCurve(new FpCurve(
+ new BigInteger("115792089210356248762697446949407573530086143415290314195533631308867097853951"),
+ FromHex("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),
+ FromHex("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),
+ n, h, true));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("c49d360886e704936a6678e1139d26b7819f7e90");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "036b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2pnb163v1Holder
+ : X9ECParametersHolder
+ {
+ private C2pnb163v1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2pnb163v1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("0400000000000000000001E60FC8821CC74DAEAFC1");
+ BigInteger h = BigInteger.Two;
+
+ return ConfigureCurve(new F2mCurve(
+ 163,
+ 1, 2, 8,
+ FromHex("072546B5435234A422E0789675F432C89435DE5242"),
+ FromHex("00C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("D2C0FB15760860DEF1EEF4D696E6768756151754");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0307AF69989546103D79329FCC3D74880F33BBE803CB");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2pnb163v2Holder
+ : X9ECParametersHolder
+ {
+ private C2pnb163v2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2pnb163v2Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7");
+ BigInteger h = BigInteger.Two;
+
+ return ConfigureCurve(new F2mCurve(
+ 163,
+ 1, 2, 8,
+ FromHex("0108B39E77C4B108BED981ED0E890E117C511CF072"),
+ FromHex("0667ACEB38AF4E488C407433FFAE4F1C811638DF20"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "030024266E4EB5106D0A964D92C4860E2671DB9B6CC5");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2pnb163v3Holder
+ : X9ECParametersHolder
+ {
+ private C2pnb163v3Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2pnb163v3Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309");
+ BigInteger h = BigInteger.Two;
+
+ return ConfigureCurve(new F2mCurve(
+ 163,
+ 1, 2, 8,
+ FromHex("07A526C63D3E25A256A007699F5447E32AE456B50E"),
+ FromHex("03F7061798EB99E238FD6F1BF95B48FEEB4854252B"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0202F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2pnb176w1Holder
+ : X9ECParametersHolder
+ {
+ private C2pnb176w1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2pnb176w1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("010092537397ECA4F6145799D62B0A19CE06FE26AD");
+ BigInteger h = BigInteger.ValueOf(0xFF6E);
+
+ return ConfigureCurve(new F2mCurve(
+ 176,
+ 1, 2, 43,
+ FromHex("E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B"),
+ FromHex("5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "038D16C2866798B600F9F08BB4A8E860F3298CE04A5798");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2tnb191v1Holder
+ : X9ECParametersHolder
+ {
+ private C2tnb191v1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2tnb191v1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("40000000000000000000000004A20E90C39067C893BBB9A5");
+ BigInteger h = BigInteger.Two;
+
+ return ConfigureCurve(new F2mCurve(
+ 191,
+ 9,
+ FromHex("2866537B676752636A68F56554E12640276B649EF7526267"),
+ FromHex("2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = Hex.DecodeStrict("4E13CA542744D696E67687561517552F279A8C84");
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0236B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2tnb191v2Holder
+ : X9ECParametersHolder
+ {
+ private C2tnb191v2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2tnb191v2Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("20000000000000000000000050508CB89F652824E06B8173");
+ BigInteger h = BigInteger.ValueOf(4);
+
+ return ConfigureCurve(new F2mCurve(
+ 191,
+ 9,
+ FromHex("401028774D7777C7B7666D1366EA432071274F89FF01E718"),
+ FromHex("0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "023809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2tnb191v3Holder
+ : X9ECParametersHolder
+ {
+ private C2tnb191v3Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2tnb191v3Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("155555555555555555555555610C0B196812BFB6288A3EA3");
+ BigInteger h = BigInteger.ValueOf(6);
+
+ return ConfigureCurve(new F2mCurve(
+ 191,
+ 9,
+ FromHex("6C01074756099122221056911C77D77E77A777E7E7E77FCB"),
+ FromHex("71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "03375D4CE24FDE434489DE8746E71786015009E66E38A926DD");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2pnb208w1Holder
+ : X9ECParametersHolder
+ {
+ private C2pnb208w1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2pnb208w1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("0101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D");
+ BigInteger h = BigInteger.ValueOf(0xFE48);
+
+ return ConfigureCurve(new F2mCurve(
+ 208,
+ 1, 2, 83,
+ BigInteger.Zero,
+ FromHex("C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0289FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2tnb239v1Holder
+ : X9ECParametersHolder
+ {
+ private C2tnb239v1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2tnb239v1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447");
+ BigInteger h = BigInteger.ValueOf(4);
+
+ return ConfigureCurve(new F2mCurve(
+ 239,
+ 36,
+ FromHex("32010857077C5431123A46B808906756F543423E8D27877578125778AC76"),
+ FromHex("790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0257927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2tnb239v2Holder
+ : X9ECParametersHolder
+ {
+ private C2tnb239v2Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2tnb239v2Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("1555555555555555555555555555553C6F2885259C31E3FCDF154624522D");
+ BigInteger h = BigInteger.ValueOf(6);
+
+ return ConfigureCurve(new F2mCurve(
+ 239,
+ 36,
+ FromHex("4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F"),
+ FromHex("5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0228F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2tnb239v3Holder
+ : X9ECParametersHolder
+ {
+ private C2tnb239v3Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2tnb239v3Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF");
+ BigInteger h = BigInteger.ValueOf(10);
+
+ return ConfigureCurve(new F2mCurve(
+ 239,
+ 36,
+ FromHex("01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F"),
+ FromHex("6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "0370F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2pnb272w1Holder
+ : X9ECParametersHolder
+ {
+ private C2pnb272w1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2pnb272w1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("0100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E629521");
+ BigInteger h = BigInteger.ValueOf(0xFF06);
+
+ return ConfigureCurve(new F2mCurve(
+ 272,
+ 1, 3, 56,
+ FromHex("91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586FB20"),
+ FromHex("7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E540F7"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "026108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171DD8D");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2pnb304w1Holder
+ : X9ECParametersHolder
+ {
+ private C2pnb304w1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2pnb304w1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("0101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899164443051D");
+ BigInteger h = BigInteger.ValueOf(0xFE2E);
+
+ return ConfigureCurve(new F2mCurve(
+ 304,
+ 1, 2, 11,
+ FromHex("FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C1288078365A0396C8E681"),
+ FromHex("BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C14039601E55827340BE"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "02197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A644F740A2614");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2tnb359v1Holder
+ : X9ECParametersHolder
+ {
+ private C2tnb359v1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2tnb359v1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20A7EB964FE7719E74F490758D3B");
+ BigInteger h = BigInteger.ValueOf(0x4C);
+
+ return ConfigureCurve(new F2mCurve(
+ 359,
+ 68,
+ FromHex("5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223A5E05656FB549016A96656A557"),
+ FromHex("2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626089687742B6329E70680231988"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "033C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6BDCDE98E8E707C07A2239B1B097");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2pnb368w1Holder
+ : X9ECParametersHolder
+ {
+ private C2pnb368w1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2pnb368w1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87E909AE40A6F131E9CFCE5BD967");
+ BigInteger h = BigInteger.ValueOf(0xFF70);
+
+ return ConfigureCurve(new F2mCurve(
+ 368,
+ 1, 2, 85,
+ FromHex("E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C576D62F0AB7519CCD2A1A906AE30D"),
+ FromHex("FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1C2112D84D164F444F8F74786046A"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "021085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22E7E789E927BE216F02E1FB136A5F");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ internal class C2tnb431r1Holder
+ : X9ECParametersHolder
+ {
+ private C2tnb431r1Holder() {}
+
+ internal static readonly X9ECParametersHolder Instance = new C2tnb431r1Holder();
+
+ protected override ECCurve CreateCurve()
+ {
+ BigInteger n = FromHex("0340340340340340340340340340340340340340340340340340340323C313FAB50589703B5EC68D3587FEC60D161CC149C1AD4A91");
+ BigInteger h = BigInteger.ValueOf(0x2760);
+
+ return ConfigureCurve(new F2mCurve(
+ 431,
+ 120,
+ FromHex("1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF620B0EB9906D0957F6C6FEACD615468DF104DE296CD8F"),
+ FromHex("10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A919B626D4E50A8DD731B107A9962381FB5D807BF2618"),
+ n, h));
+ }
+
+ protected override X9ECParameters CreateParameters()
+ {
+ byte[] S = null;
+ ECCurve curve = Curve;
+
+ X9ECPoint G = ConfigureBasepoint(curve,
+ "02120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7");
+
+ return new X9ECParameters(curve, G, curve.Order, curve.Cofactor, S);
+ }
+ }
+
+ private static readonly Dictionary objIds =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly Dictionary curves =
+ new Dictionary();
+ private static readonly Dictionary names =
+ new Dictionary();
+
+ private static void DefineCurve(string name, DerObjectIdentifier oid, X9ECParametersHolder holder)
+ {
+ objIds.Add(name, oid);
+ names.Add(oid, name);
+ curves.Add(oid, holder);
+ }
+
+ static X962NamedCurves()
+ {
+ DefineCurve("prime192v1", X9ObjectIdentifiers.Prime192v1, Prime192v1Holder.Instance);
+ DefineCurve("prime192v2", X9ObjectIdentifiers.Prime192v2, Prime192v2Holder.Instance);
+ DefineCurve("prime192v3", X9ObjectIdentifiers.Prime192v3, Prime192v3Holder.Instance);
+ DefineCurve("prime239v1", X9ObjectIdentifiers.Prime239v1, Prime239v1Holder.Instance);
+ DefineCurve("prime239v2", X9ObjectIdentifiers.Prime239v2, Prime239v2Holder.Instance);
+ DefineCurve("prime239v3", X9ObjectIdentifiers.Prime239v3, Prime239v3Holder.Instance);
+ DefineCurve("prime256v1", X9ObjectIdentifiers.Prime256v1, Prime256v1Holder.Instance);
+ DefineCurve("c2pnb163v1", X9ObjectIdentifiers.C2Pnb163v1, C2pnb163v1Holder.Instance);
+ DefineCurve("c2pnb163v2", X9ObjectIdentifiers.C2Pnb163v2, C2pnb163v2Holder.Instance);
+ DefineCurve("c2pnb163v3", X9ObjectIdentifiers.C2Pnb163v3, C2pnb163v3Holder.Instance);
+ DefineCurve("c2pnb176w1", X9ObjectIdentifiers.C2Pnb176w1, C2pnb176w1Holder.Instance);
+ DefineCurve("c2tnb191v1", X9ObjectIdentifiers.C2Tnb191v1, C2tnb191v1Holder.Instance);
+ DefineCurve("c2tnb191v2", X9ObjectIdentifiers.C2Tnb191v2, C2tnb191v2Holder.Instance);
+ DefineCurve("c2tnb191v3", X9ObjectIdentifiers.C2Tnb191v3, C2tnb191v3Holder.Instance);
+ DefineCurve("c2pnb208w1", X9ObjectIdentifiers.C2Pnb208w1, C2pnb208w1Holder.Instance);
+ DefineCurve("c2tnb239v1", X9ObjectIdentifiers.C2Tnb239v1, C2tnb239v1Holder.Instance);
+ DefineCurve("c2tnb239v2", X9ObjectIdentifiers.C2Tnb239v2, C2tnb239v2Holder.Instance);
+ DefineCurve("c2tnb239v3", X9ObjectIdentifiers.C2Tnb239v3, C2tnb239v3Holder.Instance);
+ DefineCurve("c2pnb272w1", X9ObjectIdentifiers.C2Pnb272w1, C2pnb272w1Holder.Instance);
+ DefineCurve("c2pnb304w1", X9ObjectIdentifiers.C2Pnb304w1, C2pnb304w1Holder.Instance);
+ DefineCurve("c2tnb359v1", X9ObjectIdentifiers.C2Tnb359v1, C2tnb359v1Holder.Instance);
+ DefineCurve("c2pnb368w1", X9ObjectIdentifiers.C2Pnb368w1, C2pnb368w1Holder.Instance);
+ DefineCurve("c2tnb431r1", X9ObjectIdentifiers.C2Tnb431r1, C2tnb431r1Holder.Instance);
+ }
+
+ /// Look up the for the curve with the given name.
+ /// The name of the curve.
+ public static X9ECParameters GetByName(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOid(oid);
+ }
+
+ /// Look up an for the curve with the given name.
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The name of the curve.
+ public static X9ECParametersHolder GetByNameLazy(string name)
+ {
+ DerObjectIdentifier oid = GetOid(name);
+ return oid == null ? null : GetByOidLazy(oid);
+ }
+
+ /// Look up the for the curve with the given
+ /// OID .
+ /// The OID for the curve.
+ public static X9ECParameters GetByOid(DerObjectIdentifier oid)
+ {
+ return GetByOidLazy(oid)?.Parameters;
+ }
+
+ /// Look up an for the curve with the given
+ /// OID .
+ ///
+ /// Allows accessing the curve without necessarily triggering the creation of the
+ /// full .
+ ///
+ /// The OID for the curve.
+ public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(curves, oid);
+ }
+
+ /// Look up the name of the curve with the given OID .
+ /// The OID for the curve.
+ public static string GetName(DerObjectIdentifier oid)
+ {
+ return CollectionUtilities.GetValueOrNull(names, oid);
+ }
+
+ /// Look up the OID of the curve with the given name.
+ /// The name of the curve.
+ public static DerObjectIdentifier GetOid(string name)
+ {
+ return CollectionUtilities.GetValueOrNull(objIds, name);
+ }
+
+ /// Enumerate the available curve names in this registry.
+ public static IEnumerable Names
+ {
+ get { return CollectionUtilities.Proxy(objIds.Keys); }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962NamedCurves.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962NamedCurves.cs.meta
new file mode 100644
index 00000000..5e4a7bd1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962NamedCurves.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f0521d3266cf319469437cb894183b5c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962Parameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962Parameters.cs
new file mode 100644
index 00000000..11a63a2d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962Parameters.cs
@@ -0,0 +1,97 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ public class X962Parameters
+ : Asn1Encodable, IAsn1Choice
+ {
+ private readonly Asn1Object _params;
+
+ public static X962Parameters GetInstance(
+ object obj)
+ {
+ if (obj == null || obj is X962Parameters)
+ {
+ return (X962Parameters)obj;
+ }
+
+ if (obj is Asn1Object)
+ {
+ return new X962Parameters((Asn1Object)obj);
+ }
+
+ if (obj is byte[])
+ {
+ try
+ {
+ return new X962Parameters(Asn1Object.FromByteArray((byte[])obj));
+ }
+ catch (Exception e)
+ {
+ throw new ArgumentException("unable to parse encoded data: " + e.Message, e);
+ }
+ }
+
+ throw new ArgumentException("unknown object in getInstance()");
+ }
+
+ public X962Parameters(
+ X9ECParameters ecParameters)
+ {
+ this._params = ecParameters.ToAsn1Object();
+ }
+
+ public X962Parameters(
+ DerObjectIdentifier namedCurve)
+ {
+ this._params = namedCurve;
+ }
+
+ public X962Parameters(
+ Asn1Null obj)
+ {
+ this._params = obj;
+ }
+
+ private X962Parameters(Asn1Object obj)
+ {
+ this._params = obj;
+ }
+
+ public bool IsNamedCurve
+ {
+ get { return (_params is DerObjectIdentifier); }
+ }
+
+ public bool IsImplicitlyCA
+ {
+ get { return (_params is Asn1Null); }
+ }
+
+ public Asn1Object Parameters
+ {
+ get { return _params; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Parameters ::= CHOICE {
+ * ecParameters ECParameters,
+ * namedCurve CURVES.&id({CurveNames}),
+ * implicitlyCA Null
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return _params;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962Parameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962Parameters.cs.meta
new file mode 100644
index 00000000..199c0f8f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X962Parameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8e60703378e65eb4b8964d7c819ddbd2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9Curve.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9Curve.cs
new file mode 100644
index 00000000..c6c045bd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9Curve.cs
@@ -0,0 +1,151 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ /**
+ * ASN.1 def for Elliptic-Curve Curve structure. See
+ * X9.62, for further details.
+ */
+ public class X9Curve
+ : Asn1Encodable
+ {
+ private readonly ECCurve curve;
+ private readonly byte[] seed;
+ private readonly DerObjectIdentifier fieldIdentifier;
+
+ public X9Curve(
+ ECCurve curve)
+ : this(curve, null)
+ {
+ }
+
+ public X9Curve(
+ ECCurve curve,
+ byte[] seed)
+ {
+ if (curve == null)
+ throw new ArgumentNullException("curve");
+
+ this.curve = curve;
+ this.seed = Arrays.Clone(seed);
+
+ if (ECAlgorithms.IsFpCurve(curve))
+ {
+ this.fieldIdentifier = X9ObjectIdentifiers.PrimeField;
+ }
+ else if (ECAlgorithms.IsF2mCurve(curve))
+ {
+ this.fieldIdentifier = X9ObjectIdentifiers.CharacteristicTwoField;
+ }
+ else
+ {
+ throw new ArgumentException("This type of ECCurve is not implemented");
+ }
+ }
+
+ public X9Curve(
+ X9FieldID fieldID,
+ BigInteger order,
+ BigInteger cofactor,
+ Asn1Sequence seq)
+ {
+ if (fieldID == null)
+ throw new ArgumentNullException("fieldID");
+ if (seq == null)
+ throw new ArgumentNullException("seq");
+
+ this.fieldIdentifier = fieldID.Identifier;
+
+ if (fieldIdentifier.Equals(X9ObjectIdentifiers.PrimeField))
+ {
+ BigInteger p = ((DerInteger)fieldID.Parameters).Value;
+ BigInteger A = new BigInteger(1, Asn1OctetString.GetInstance(seq[0]).GetOctets());
+ BigInteger B = new BigInteger(1, Asn1OctetString.GetInstance(seq[1]).GetOctets());
+ curve = new FpCurve(p, A, B, order, cofactor);
+ }
+ else if (fieldIdentifier.Equals(X9ObjectIdentifiers.CharacteristicTwoField))
+ {
+ // Characteristic two field
+ DerSequence parameters = (DerSequence)fieldID.Parameters;
+ int m = ((DerInteger)parameters[0]).IntValueExact;
+ DerObjectIdentifier representation = (DerObjectIdentifier)parameters[1];
+
+ int k1 = 0;
+ int k2 = 0;
+ int k3 = 0;
+ if (representation.Equals(X9ObjectIdentifiers.TPBasis))
+ {
+ // Trinomial basis representation
+ k1 = ((DerInteger)parameters[2]).IntValueExact;
+ }
+ else
+ {
+ // Pentanomial basis representation
+ DerSequence pentanomial = (DerSequence) parameters[2];
+ k1 = ((DerInteger)pentanomial[0]).IntValueExact;
+ k2 = ((DerInteger)pentanomial[1]).IntValueExact;
+ k3 = ((DerInteger)pentanomial[2]).IntValueExact;
+ }
+ BigInteger A = new BigInteger(1, Asn1OctetString.GetInstance(seq[0]).GetOctets());
+ BigInteger B = new BigInteger(1, Asn1OctetString.GetInstance(seq[1]).GetOctets());
+ curve = new F2mCurve(m, k1, k2, k3, A, B, order, cofactor);
+ }
+ else
+ {
+ throw new ArgumentException("This type of ECCurve is not implemented");
+ }
+
+ if (seq.Count == 3)
+ {
+ seed = ((DerBitString)seq[2]).GetBytes();
+ }
+ }
+
+ public ECCurve Curve
+ {
+ get { return curve; }
+ }
+
+ public byte[] GetSeed()
+ {
+ return Arrays.Clone(seed);
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * Curve ::= Sequence {
+ * a FieldElement,
+ * b FieldElement,
+ * seed BIT STRING OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ if (fieldIdentifier.Equals(X9ObjectIdentifiers.PrimeField)
+ || fieldIdentifier.Equals(X9ObjectIdentifiers.CharacteristicTwoField))
+ {
+ v.Add(new X9FieldElement(curve.A).ToAsn1Object());
+ v.Add(new X9FieldElement(curve.B).ToAsn1Object());
+ }
+
+ if (seed != null)
+ {
+ v.Add(new DerBitString(seed));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9Curve.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9Curve.cs.meta
new file mode 100644
index 00000000..0136e324
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9Curve.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 43714f898930c7f4d849ef473c1358fd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParameters.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParameters.cs
new file mode 100644
index 00000000..316d79b5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParameters.cs
@@ -0,0 +1,215 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.Field;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ /**
+ * ASN.1 def for Elliptic-Curve ECParameters structure. See
+ * X9.62, for further details.
+ */
+ public class X9ECParameters
+ : Asn1Encodable
+ {
+ private X9FieldID fieldID;
+ private ECCurve curve;
+ private X9ECPoint g;
+ private BigInteger n;
+ private BigInteger h;
+ private byte[] seed;
+
+ public static X9ECParameters GetInstance(object obj)
+ {
+ if (obj is X9ECParameters)
+ return (X9ECParameters)obj;
+
+ if (obj != null)
+ return new X9ECParameters(Asn1Sequence.GetInstance(obj));
+
+ return null;
+ }
+
+ public X9ECParameters(
+ Asn1Sequence seq)
+ {
+ if (!(seq[0] is DerInteger)
+ || !((DerInteger)seq[0]).HasValue(1))
+ {
+ throw new ArgumentException("bad version in X9ECParameters");
+ }
+
+ this.n = ((DerInteger)seq[4]).Value;
+
+ if (seq.Count == 6)
+ {
+ this.h = ((DerInteger)seq[5]).Value;
+ }
+
+ X9Curve x9c = new X9Curve(
+ X9FieldID.GetInstance(seq[1]), n, h,
+ Asn1Sequence.GetInstance(seq[2]));
+
+ this.curve = x9c.Curve;
+ object p = seq[3];
+
+ if (p is X9ECPoint)
+ {
+ this.g = (X9ECPoint)p;
+ }
+ else
+ {
+ this.g = new X9ECPoint(curve, (Asn1OctetString)p);
+ }
+
+ this.seed = x9c.GetSeed();
+ }
+
+ public X9ECParameters(
+ ECCurve curve,
+ X9ECPoint g,
+ BigInteger n)
+ : this(curve, g, n, null, null)
+ {
+ }
+
+ public X9ECParameters(
+ ECCurve curve,
+ X9ECPoint g,
+ BigInteger n,
+ BigInteger h)
+ : this(curve, g, n, h, null)
+ {
+ }
+
+ public X9ECParameters(
+ ECCurve curve,
+ X9ECPoint g,
+ BigInteger n,
+ BigInteger h,
+ byte[] seed)
+ {
+ this.curve = curve;
+ this.g = g;
+ this.n = n;
+ this.h = h;
+ this.seed = seed;
+
+ if (ECAlgorithms.IsFpCurve(curve))
+ {
+ this.fieldID = new X9FieldID(curve.Field.Characteristic);
+ }
+ else if (ECAlgorithms.IsF2mCurve(curve))
+ {
+ IPolynomialExtensionField field = (IPolynomialExtensionField)curve.Field;
+ int[] exponents = field.MinimalPolynomial.GetExponentsPresent();
+ if (exponents.Length == 3)
+ {
+ this.fieldID = new X9FieldID(exponents[2], exponents[1]);
+ }
+ else if (exponents.Length == 5)
+ {
+ this.fieldID = new X9FieldID(exponents[4], exponents[1], exponents[2], exponents[3]);
+ }
+ else
+ {
+ throw new ArgumentException("Only trinomial and pentomial curves are supported");
+ }
+ }
+ else
+ {
+ throw new ArgumentException("'curve' is of an unsupported type");
+ }
+ }
+
+ public ECCurve Curve
+ {
+ get { return curve; }
+ }
+
+ public ECPoint G
+ {
+ get { return g.Point; }
+ }
+
+ public BigInteger N
+ {
+ get { return n; }
+ }
+
+ public BigInteger H
+ {
+ get { return h; }
+ }
+
+ public byte[] GetSeed()
+ {
+ return seed;
+ }
+
+ /**
+ * Return the ASN.1 entry representing the Curve.
+ *
+ * @return the X9Curve for the curve in these parameters.
+ */
+ public X9Curve CurveEntry
+ {
+ get { return new X9Curve(curve, seed); }
+ }
+
+ /**
+ * Return the ASN.1 entry representing the FieldID.
+ *
+ * @return the X9FieldID for the FieldID in these parameters.
+ */
+ public X9FieldID FieldIDEntry
+ {
+ get { return fieldID; }
+ }
+
+ /**
+ * Return the ASN.1 entry representing the base point G.
+ *
+ * @return the X9ECPoint for the base point in these parameters.
+ */
+ public X9ECPoint BaseEntry
+ {
+ get { return g; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * ECParameters ::= Sequence {
+ * version Integer { ecpVer1(1) } (ecpVer1),
+ * fieldID FieldID {{FieldTypes}},
+ * curve X9Curve,
+ * base X9ECPoint,
+ * order Integer,
+ * cofactor Integer OPTIONAL
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector(
+ new DerInteger(BigInteger.One),
+ fieldID,
+ new X9Curve(curve, seed),
+ g,
+ new DerInteger(n));
+
+ if (h != null)
+ {
+ v.Add(new DerInteger(h));
+ }
+
+ return new DerSequence(v);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParameters.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParameters.cs.meta
new file mode 100644
index 00000000..96e717fe
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParameters.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3d36db2fddc293f448a749a23a74b090
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParametersHolder.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParametersHolder.cs
new file mode 100644
index 00000000..4d5b7b5e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParametersHolder.cs
@@ -0,0 +1,53 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ public abstract class X9ECParametersHolder
+ {
+ private ECCurve m_curve;
+ private X9ECParameters m_parameters;
+
+ public ECCurve Curve
+ {
+ get
+ {
+ lock (this)
+ {
+ if (m_curve == null)
+ {
+ m_curve = CreateCurve();
+ }
+
+ return m_curve;
+ }
+ }
+ }
+
+ public X9ECParameters Parameters
+ {
+ get
+ {
+ lock (this)
+ {
+ if (m_parameters == null)
+ {
+ m_parameters = CreateParameters();
+ }
+
+ return m_parameters;
+ }
+ }
+ }
+
+ protected virtual ECCurve CreateCurve()
+ {
+ return CreateParameters().Curve;
+ }
+
+ protected abstract X9ECParameters CreateParameters();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParametersHolder.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParametersHolder.cs.meta
new file mode 100644
index 00000000..c6e00bd1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECParametersHolder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f9087f34f38c5e344bcb031600c3e7b1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECPoint.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECPoint.cs
new file mode 100644
index 00000000..660546f8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECPoint.cs
@@ -0,0 +1,79 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ /**
+ * class for describing an ECPoint as a Der object.
+ */
+ public class X9ECPoint
+ : Asn1Encodable
+ {
+ private readonly Asn1OctetString encoding;
+
+ private ECCurve c;
+ private ECPoint p;
+
+ public X9ECPoint(ECPoint p, bool compressed)
+ {
+ this.p = p.Normalize();
+ this.encoding = new DerOctetString(p.GetEncoded(compressed));
+ }
+
+ public X9ECPoint(ECCurve c, byte[] encoding)
+ {
+ this.c = c;
+ this.encoding = new DerOctetString(Arrays.Clone(encoding));
+ }
+
+ public X9ECPoint(ECCurve c, Asn1OctetString s)
+ : this(c, s.GetOctets())
+ {
+ }
+
+ public byte[] GetPointEncoding()
+ {
+ return Arrays.Clone(encoding.GetOctets());
+ }
+
+ public ECPoint Point
+ {
+ get
+ {
+ if (p == null)
+ {
+ p = c.DecodePoint(encoding.GetOctets()).Normalize();
+ }
+
+ return p;
+ }
+ }
+
+ public bool IsPointCompressed
+ {
+ get
+ {
+ byte[] octets = encoding.GetOctets();
+ return octets != null && octets.Length > 0 && (octets[0] == 2 || octets[0] == 3);
+ }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * ECPoint ::= OCTET STRING
+ *
+ *
+ * Octet string produced using ECPoint.GetEncoded().
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return encoding;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECPoint.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECPoint.cs.meta
new file mode 100644
index 00000000..199054c2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ECPoint.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fb799dd6e0a957945b44491bdc9d1e23
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldElement.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldElement.cs
new file mode 100644
index 00000000..6ca4885d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldElement.cs
@@ -0,0 +1,56 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ /**
+ * Class for processing an ECFieldElement as a DER object.
+ */
+ public class X9FieldElement
+ : Asn1Encodable
+ {
+ private ECFieldElement f;
+
+ public X9FieldElement(
+ ECFieldElement f)
+ {
+ this.f = f;
+ }
+
+ public ECFieldElement Value
+ {
+ get { return f; }
+ }
+
+ /**
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * FieldElement ::= OCTET STRING
+ *
+ *
+ *
+ * if q is an odd prime then the field element is
+ * processed as an Integer and converted to an octet string
+ * according to x 9.62 4.3.1.
+ * if q is 2m then the bit string
+ * contained in the field element is converted into an octet
+ * string with the same ordering padded at the front if necessary.
+ *
+ *
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ int byteCount = X9IntegerConverter.GetByteLength(f);
+ byte[] paddedBigInteger = X9IntegerConverter.IntegerToBytes(f.ToBigInteger(), byteCount);
+
+ return new DerOctetString(paddedBigInteger);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldElement.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldElement.cs.meta
new file mode 100644
index 00000000..aae1f7c2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldElement.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0314589f21ded704b8eed94852256818
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldID.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldID.cs
new file mode 100644
index 00000000..450a52ea
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldID.cs
@@ -0,0 +1,136 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ /**
+ * ASN.1 def for Elliptic-Curve Field ID structure. See
+ * X9.62, for further details.
+ */
+ public class X9FieldID
+ : Asn1Encodable
+ {
+ private readonly DerObjectIdentifier id;
+ private readonly Asn1Object parameters;
+
+ /**
+ * Constructor for elliptic curves over prime fields
+ * F2 .
+ * @param primeP The prime p defining the prime field.
+ */
+ public X9FieldID(
+ BigInteger primeP)
+ {
+ this.id = X9ObjectIdentifiers.PrimeField;
+ this.parameters = new DerInteger(primeP);
+ }
+
+ /**
+ * Constructor for elliptic curves over binary fields
+ * F2m .
+ * @param m The exponent m of
+ * F2m .
+ * @param k1 The integer k1 where xm +
+ * xk1 + 1
+ * represents the reduction polynomial f(z).
+ */
+ public X9FieldID(int m, int k1)
+ : this(m, k1, 0, 0)
+ {
+ }
+
+ /**
+ * Constructor for elliptic curves over binary fields
+ * F2m .
+ * @param m The exponent m of
+ * F2m .
+ * @param k1 The integer k1 where xm +
+ * xk3 + xk2 + xk1 + 1
+ * represents the reduction polynomial f(z).
+ * @param k2 The integer k2 where xm +
+ * xk3 + xk2 + xk1 + 1
+ * represents the reduction polynomial f(z).
+ * @param k3 The integer k3 where xm +
+ * xk3 + xk2 + xk1 + 1
+ * represents the reduction polynomial f(z)..
+ */
+ public X9FieldID(
+ int m,
+ int k1,
+ int k2,
+ int k3)
+ {
+ this.id = X9ObjectIdentifiers.CharacteristicTwoField;
+
+ Asn1EncodableVector fieldIdParams = new Asn1EncodableVector(new DerInteger(m));
+
+ if (k2 == 0)
+ {
+ if (k3 != 0)
+ throw new ArgumentException("inconsistent k values");
+
+ fieldIdParams.Add(
+ X9ObjectIdentifiers.TPBasis,
+ new DerInteger(k1));
+ }
+ else
+ {
+ if (k2 <= k1 || k3 <= k2)
+ throw new ArgumentException("inconsistent k values");
+
+ fieldIdParams.Add(
+ X9ObjectIdentifiers.PPBasis,
+ new DerSequence(
+ new DerInteger(k1),
+ new DerInteger(k2),
+ new DerInteger(k3)));
+ }
+
+ this.parameters = new DerSequence(fieldIdParams);
+ }
+
+ private X9FieldID(Asn1Sequence seq)
+ {
+ this.id = DerObjectIdentifier.GetInstance(seq[0]);
+ this.parameters = seq[1].ToAsn1Object();
+ }
+
+ public static X9FieldID GetInstance(object obj)
+ {
+ if (obj is X9FieldID)
+ return (X9FieldID)obj;
+ if (obj == null)
+ return null;
+ return new X9FieldID(Asn1Sequence.GetInstance(obj));
+ }
+
+ public DerObjectIdentifier Identifier
+ {
+ get { return id; }
+ }
+
+ public Asn1Object Parameters
+ {
+ get { return parameters; }
+ }
+
+ /**
+ * Produce a Der encoding of the following structure.
+ *
+ * FieldID ::= Sequence {
+ * fieldType FIELD-ID.&id({IOSet}),
+ * parameters FIELD-ID.&Type({IOSet}{@fieldType})
+ * }
+ *
+ */
+ public override Asn1Object ToAsn1Object()
+ {
+ return new DerSequence(id, parameters);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldID.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldID.cs.meta
new file mode 100644
index 00000000..56ae617e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9FieldID.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 95a5e4d382eb29b45b39b6da740a4fc3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9IntegerConverter.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9IntegerConverter.cs
new file mode 100644
index 00000000..ff4895fd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9IntegerConverter.cs
@@ -0,0 +1,44 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ public abstract class X9IntegerConverter
+ {
+ public static int GetByteLength(ECFieldElement fe)
+ {
+ return (fe.FieldSize + 7) / 8;
+ }
+
+ public static int GetByteLength(ECCurve c)
+ {
+ return (c.FieldSize + 7) / 8;
+ }
+
+ public static byte[] IntegerToBytes(BigInteger s, int qLength)
+ {
+ byte[] bytes = s.ToByteArrayUnsigned();
+
+ if (qLength < bytes.Length)
+ {
+ byte[] tmp = new byte[qLength];
+ Array.Copy(bytes, bytes.Length - tmp.Length, tmp, 0, tmp.Length);
+ return tmp;
+ }
+ else if (qLength > bytes.Length)
+ {
+ byte[] tmp = new byte[qLength];
+ Array.Copy(bytes, 0, tmp, tmp.Length - bytes.Length, bytes.Length);
+ return tmp;
+ }
+
+ return bytes;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9IntegerConverter.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9IntegerConverter.cs.meta
new file mode 100644
index 00000000..18b44dcd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9IntegerConverter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c8d8bbe58cf32c041bb340c35ccb68ef
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ObjectIdentifiers.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ObjectIdentifiers.cs
new file mode 100644
index 00000000..312db164
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ObjectIdentifiers.cs
@@ -0,0 +1,135 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
+{
+ public abstract class X9ObjectIdentifiers
+ {
+ //
+ // X9.62
+ //
+ // ansi-X9-62 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ // us(840) ansi-x962(10045) }
+ //
+
+ public static readonly DerObjectIdentifier ansi_X9_62 = new DerObjectIdentifier("1.2.840.10045");
+
+ public static readonly DerObjectIdentifier IdFieldType = ansi_X9_62.Branch("1");
+
+ public static readonly DerObjectIdentifier PrimeField = IdFieldType.Branch("1");
+ public static readonly DerObjectIdentifier CharacteristicTwoField = IdFieldType.Branch("2");
+
+ public static readonly DerObjectIdentifier GNBasis = CharacteristicTwoField.Branch("3.1");
+ public static readonly DerObjectIdentifier TPBasis = CharacteristicTwoField.Branch("3.2");
+ public static readonly DerObjectIdentifier PPBasis = CharacteristicTwoField.Branch("3.3");
+
+ public static readonly DerObjectIdentifier id_ecSigType = ansi_X9_62.Branch("4");
+
+ public static readonly DerObjectIdentifier ECDsaWithSha1 = id_ecSigType.Branch("1");
+
+ public static readonly DerObjectIdentifier id_publicKeyType = ansi_X9_62.Branch("2");
+
+ public static readonly DerObjectIdentifier IdECPublicKey = id_publicKeyType.Branch("1");
+
+ public static readonly DerObjectIdentifier ECDsaWithSha2 = id_ecSigType.Branch("3");
+
+ public static readonly DerObjectIdentifier ECDsaWithSha224 = ECDsaWithSha2.Branch("1");
+ public static readonly DerObjectIdentifier ECDsaWithSha256 = ECDsaWithSha2.Branch("2");
+ public static readonly DerObjectIdentifier ECDsaWithSha384 = ECDsaWithSha2.Branch("3");
+ public static readonly DerObjectIdentifier ECDsaWithSha512 = ECDsaWithSha2.Branch("4");
+
+
+ //
+ // named curves
+ //
+ public static readonly DerObjectIdentifier EllipticCurve = ansi_X9_62.Branch("3");
+
+ //
+ // Two Curves
+ //
+ public static readonly DerObjectIdentifier CTwoCurve = EllipticCurve.Branch("0");
+
+ public static readonly DerObjectIdentifier C2Pnb163v1 = CTwoCurve.Branch("1");
+ public static readonly DerObjectIdentifier C2Pnb163v2 = CTwoCurve.Branch("2");
+ public static readonly DerObjectIdentifier C2Pnb163v3 = CTwoCurve.Branch("3");
+ public static readonly DerObjectIdentifier C2Pnb176w1 = CTwoCurve.Branch("4");
+ public static readonly DerObjectIdentifier C2Tnb191v1 = CTwoCurve.Branch("5");
+ public static readonly DerObjectIdentifier C2Tnb191v2 = CTwoCurve.Branch("6");
+ public static readonly DerObjectIdentifier C2Tnb191v3 = CTwoCurve.Branch("7");
+ public static readonly DerObjectIdentifier C2Onb191v4 = CTwoCurve.Branch("8");
+ public static readonly DerObjectIdentifier C2Onb191v5 = CTwoCurve.Branch("9");
+ public static readonly DerObjectIdentifier C2Pnb208w1 = CTwoCurve.Branch("10");
+ public static readonly DerObjectIdentifier C2Tnb239v1 = CTwoCurve.Branch("11");
+ public static readonly DerObjectIdentifier C2Tnb239v2 = CTwoCurve.Branch("12");
+ public static readonly DerObjectIdentifier C2Tnb239v3 = CTwoCurve.Branch("13");
+ public static readonly DerObjectIdentifier C2Onb239v4 = CTwoCurve.Branch("14");
+ public static readonly DerObjectIdentifier C2Onb239v5 = CTwoCurve.Branch("15");
+ public static readonly DerObjectIdentifier C2Pnb272w1 = CTwoCurve.Branch("16");
+ public static readonly DerObjectIdentifier C2Pnb304w1 = CTwoCurve.Branch("17");
+ public static readonly DerObjectIdentifier C2Tnb359v1 = CTwoCurve.Branch("18");
+ public static readonly DerObjectIdentifier C2Pnb368w1 = CTwoCurve.Branch("19");
+ public static readonly DerObjectIdentifier C2Tnb431r1 = CTwoCurve.Branch("20");
+
+ //
+ // Prime
+ //
+ public static readonly DerObjectIdentifier PrimeCurve = EllipticCurve.Branch("1");
+
+ public static readonly DerObjectIdentifier Prime192v1 = PrimeCurve.Branch("1");
+ public static readonly DerObjectIdentifier Prime192v2 = PrimeCurve.Branch("2");
+ public static readonly DerObjectIdentifier Prime192v3 = PrimeCurve.Branch("3");
+ public static readonly DerObjectIdentifier Prime239v1 = PrimeCurve.Branch("4");
+ public static readonly DerObjectIdentifier Prime239v2 = PrimeCurve.Branch("5");
+ public static readonly DerObjectIdentifier Prime239v3 = PrimeCurve.Branch("6");
+ public static readonly DerObjectIdentifier Prime256v1 = PrimeCurve.Branch("7");
+
+ //
+ // DSA
+ //
+ // dsapublicnumber OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ // us(840) ansi-x957(10040) number-type(4) 1 }
+ public static readonly DerObjectIdentifier IdDsa = new DerObjectIdentifier("1.2.840.10040.4.1");
+
+ /**
+ * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ * us(840) x9-57 (10040) x9cm(4) 3 }
+ */
+ public static readonly DerObjectIdentifier IdDsaWithSha1 = new DerObjectIdentifier("1.2.840.10040.4.3");
+
+ /**
+ * X9.63
+ */
+ public static readonly DerObjectIdentifier X9x63Scheme = new DerObjectIdentifier("1.3.133.16.840.63.0");
+ public static readonly DerObjectIdentifier DHSinglePassStdDHSha1KdfScheme = X9x63Scheme.Branch("2");
+ public static readonly DerObjectIdentifier DHSinglePassCofactorDHSha1KdfScheme = X9x63Scheme.Branch("3");
+ public static readonly DerObjectIdentifier MqvSinglePassSha1KdfScheme = X9x63Scheme.Branch("16");
+
+ /**
+ * X9.42
+ */
+
+ public static readonly DerObjectIdentifier ansi_x9_42 = new DerObjectIdentifier("1.2.840.10046");
+
+ //
+ // Diffie-Hellman
+ //
+ // dhpublicnumber OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ // us(840) ansi-x942(10046) number-type(2) 1 }
+ //
+ public static readonly DerObjectIdentifier DHPublicNumber = ansi_x9_42.Branch("2.1");
+
+ public static readonly DerObjectIdentifier X9x42Schemes = ansi_x9_42.Branch("2.3");
+
+ public static readonly DerObjectIdentifier DHStatic = X9x42Schemes.Branch("1");
+ public static readonly DerObjectIdentifier DHEphem = X9x42Schemes.Branch("2");
+ public static readonly DerObjectIdentifier DHOneFlow = X9x42Schemes.Branch("3");
+ public static readonly DerObjectIdentifier DHHybrid1 = X9x42Schemes.Branch("4");
+ public static readonly DerObjectIdentifier DHHybrid2 = X9x42Schemes.Branch("5");
+ public static readonly DerObjectIdentifier DHHybridOneFlow = X9x42Schemes.Branch("6");
+ public static readonly DerObjectIdentifier Mqv2 = X9x42Schemes.Branch("7");
+ public static readonly DerObjectIdentifier Mqv1 = X9x42Schemes.Branch("8");
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ObjectIdentifiers.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ObjectIdentifiers.cs.meta
new file mode 100644
index 00000000..4e465068
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/asn1/x9/X9ObjectIdentifiers.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 670f9d39edf0d194887b3dc5dbe03827
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg.meta
new file mode 100644
index 00000000..9f41e9de
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: eefc7a37e9c6c8348a9ca1c5aa7986f2
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredInputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredInputStream.cs
new file mode 100644
index 00000000..27b93e88
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredInputStream.cs
@@ -0,0 +1,531 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * reader for Base64 armored objects - read the headers and then start returning
+ * bytes when the data is reached. An IOException is thrown if the CRC check
+ * is detected and fails.
+ *
+ * By default a missing CRC will not cause an exception. To force CRC detection use:
+ *
+ * ArmoredInputStream aIn = ...
+ *
+ * aIn.setDetectMissingCRC(true);
+ *
+ *
+ */
+ public class ArmoredInputStream
+ : BaseInputStream
+ {
+ /*
+ * set up the decoding table.
+ */
+ private readonly static byte[] decodingTable;
+ static ArmoredInputStream()
+ {
+ decodingTable = new byte[128];
+ Arrays.Fill(decodingTable, 0xff);
+ for (int i = 'A'; i <= 'Z'; i++)
+ {
+ decodingTable[i] = (byte)(i - 'A');
+ }
+ for (int i = 'a'; i <= 'z'; i++)
+ {
+ decodingTable[i] = (byte)(i - 'a' + 26);
+ }
+ for (int i = '0'; i <= '9'; i++)
+ {
+ decodingTable[i] = (byte)(i - '0' + 52);
+ }
+ decodingTable['+'] = 62;
+ decodingTable['/'] = 63;
+ }
+
+ /**
+ * decode the base 64 encoded input data.
+ *
+ * @return the offset the data starts in out.
+ */
+ private static int Decode(int in0, int in1, int in2, int in3, int[] result)
+ {
+ if (in3 < 0)
+ throw new EndOfStreamException("unexpected end of file in armored stream.");
+
+ int b1, b2, b3, b4;
+ if (in2 == '=')
+ {
+ b1 = decodingTable[in0];
+ b2 = decodingTable[in1];
+ if ((b1 | b2) >= 128)
+ throw new IOException("invalid armor");
+
+ result[2] = ((b1 << 2) | (b2 >> 4)) & 0xff;
+ return 2;
+ }
+ else if (in3 == '=')
+ {
+ b1 = decodingTable[in0];
+ b2 = decodingTable[in1];
+ b3 = decodingTable[in2];
+ if ((b1 | b2 | b3) >= 128)
+ throw new IOException("invalid armor");
+
+ result[1] = ((b1 << 2) | (b2 >> 4)) & 0xff;
+ result[2] = ((b2 << 4) | (b3 >> 2)) & 0xff;
+ return 1;
+ }
+ else
+ {
+ b1 = decodingTable[in0];
+ b2 = decodingTable[in1];
+ b3 = decodingTable[in2];
+ b4 = decodingTable[in3];
+ if ((b1 | b2 | b3 | b4) >= 128)
+ throw new IOException("invalid armor");
+
+ result[0] = ((b1 << 2) | (b2 >> 4)) & 0xff;
+ result[1] = ((b2 << 4) | (b3 >> 2)) & 0xff;
+ result[2] = ((b3 << 6) | b4) & 0xff;
+ return 0;
+ }
+ }
+
+ /*
+ * Ignore missing CRC checksums.
+ * https://tests.sequoia-pgp.org/#ASCII_Armor suggests that missing CRC sums do not invalidate the message.
+ */
+ private bool detectMissingChecksum = false;
+
+ Stream input;
+ bool start = true;
+ int[] outBuf = new int[3];
+ int bufPtr = 3;
+ Crc24 crc = new Crc24();
+ bool crcFound = false;
+ bool hasHeaders = true;
+ string header = null;
+ bool newLineFound = false;
+ bool clearText = false;
+ bool restart = false;
+ IList headerList = new List();
+ int lastC = 0;
+ bool isEndOfStream;
+
+ /**
+ * Create a stream for reading a PGP armoured message, parsing up to a header
+ * and then reading the data that follows.
+ *
+ * @param input
+ */
+ public ArmoredInputStream(Stream input)
+ : this(input, true)
+ {
+ }
+
+ /**
+ * Create an armoured input stream which will assume the data starts
+ * straight away, or parse for headers first depending on the value of
+ * hasHeaders.
+ *
+ * @param input
+ * @param hasHeaders true if headers are to be looked for, false otherwise.
+ */
+ public ArmoredInputStream(Stream input, bool hasHeaders)
+ {
+ this.input = input;
+ this.hasHeaders = hasHeaders;
+
+ if (hasHeaders)
+ {
+ ParseHeaders();
+ }
+
+ start = false;
+ }
+
+ private bool ParseHeaders()
+ {
+ header = null;
+
+ int c;
+ int last = 0;
+ bool headerFound = false;
+
+ headerList = new List();
+
+ //
+ // if restart we already have a header
+ //
+ if (restart)
+ {
+ headerFound = true;
+ }
+ else
+ {
+ while ((c = input.ReadByte()) >= 0)
+ {
+ if (c == '-' && (last == 0 || last == '\n' || last == '\r'))
+ {
+ headerFound = true;
+ break;
+ }
+
+ last = c;
+ }
+ }
+
+ if (headerFound)
+ {
+ StringBuilder buf = new StringBuilder("-");
+ bool eolReached = false;
+ bool crLf = false;
+
+ if (restart) // we've had to look ahead two '-'
+ {
+ buf.Append('-');
+ }
+
+ while ((c = input.ReadByte()) >= 0)
+ {
+ if (last == '\r' && c == '\n')
+ {
+ crLf = true;
+ }
+ if (eolReached && (last != '\r' && c == '\n'))
+ {
+ break;
+ }
+ if (eolReached && c == '\r')
+ {
+ break;
+ }
+ if (c == '\r' || (last != '\r' && c == '\n'))
+ {
+ string line = buf.ToString();
+ if (line.Trim().Length < 1)
+ break;
+
+ if (headerList.Count > 0 && line.IndexOf(':') < 0)
+ throw new IOException("invalid armor header");
+
+ headerList.Add(line);
+ buf.Length = 0;
+ }
+
+ if (c != '\n' && c != '\r')
+ {
+ buf.Append((char)c);
+ eolReached = false;
+ }
+ else
+ {
+ if (c == '\r' || (last != '\r' && c == '\n'))
+ {
+ eolReached = true;
+ }
+ }
+
+ last = c;
+ }
+
+ if (crLf)
+ {
+ input.ReadByte(); // skip last \n
+ }
+ }
+
+ if (headerList.Count > 0)
+ {
+ header = (string)headerList[0];
+ }
+
+ clearText = "-----BEGIN PGP SIGNED MESSAGE-----".Equals(header);
+ newLineFound = true;
+
+ return headerFound;
+ }
+
+ /**
+ * @return true if we are inside the clear text section of a PGP
+ * signed message.
+ */
+ public bool IsClearText()
+ {
+ return clearText;
+ }
+
+ /**
+ * @return true if the stream is actually at end of file.
+ */
+ public bool IsEndOfStream()
+ {
+ return isEndOfStream;
+ }
+
+ /**
+ * Return the armor header line (if there is one)
+ * @return the armor header line, null if none present.
+ */
+ public string GetArmorHeaderLine()
+ {
+ return header;
+ }
+
+ /**
+ * Return the armor headers (the lines after the armor header line),
+ * @return an array of armor headers, null if there aren't any.
+ */
+ public string[] GetArmorHeaders()
+ {
+ if (headerList.Count <= 1)
+ return null;
+
+ string[] hdrs = new string[headerList.Count - 1];
+ for (int i = 0; i != hdrs.Length; i++)
+ {
+ hdrs[i] = (string)headerList[i + 1];
+ }
+
+ return hdrs;
+ }
+
+ private int ReadIgnoreSpace()
+ {
+ int c;
+ do
+ {
+ c = input.ReadByte();
+ }
+ while (c == ' ' || c == '\t' || c == '\f' || c == '\u000B') ; // \u000B ~ \v
+
+ if (c >= 128)
+ throw new IOException("invalid armor");
+
+ return c;
+ }
+
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ Streams.ValidateBufferArguments(buffer, offset, count);
+
+ /*
+ * TODO Currently can't return partial data when exception thrown (breaking test case), so we don't inherit
+ * the base class implementation. Probably the reason is that throws don't mark this instance as 'failed'.
+ */
+ int pos = 0;
+ while (pos < count)
+ {
+ int b = ReadByte();
+ if (b < 0)
+ break;
+
+ buffer[offset + pos++] = (byte)b;
+ }
+ return pos;
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override int Read(Span buffer)
+ {
+ /*
+ * TODO Currently can't return partial data when exception thrown (breaking test case), so we don't inherit
+ * the base class implementation. Probably the reason is that throws don't mark this instance as 'failed'.
+ */
+ int pos = 0;
+ while (pos < buffer.Length)
+ {
+ int b = ReadByte();
+ if (b < 0)
+ break;
+
+ buffer[pos++] = (byte)b;
+ }
+ return pos;
+ }
+#endif
+
+ public override int ReadByte()
+ {
+ if (start)
+ {
+ if (hasHeaders)
+ {
+ ParseHeaders();
+ }
+
+ crc.Reset();
+ start = false;
+ }
+
+ int c;
+
+ if (clearText)
+ {
+ c = input.ReadByte();
+
+ if (c == '\r' || (c == '\n' && lastC != '\r'))
+ {
+ newLineFound = true;
+ }
+ else if (newLineFound && c == '-')
+ {
+ c = input.ReadByte();
+ if (c == '-') // a header, not dash escaped
+ {
+ clearText = false;
+ start = true;
+ restart = true;
+ }
+ else // a space - must be a dash escape
+ {
+ c = input.ReadByte();
+ }
+ newLineFound = false;
+ }
+ else
+ {
+ if (c != '\n' && lastC != '\r')
+ {
+ newLineFound = false;
+ }
+ }
+
+ lastC = c;
+
+ if (c < 0)
+ {
+ isEndOfStream = true;
+ }
+
+ return c;
+ }
+
+ if (bufPtr > 2 || crcFound)
+ {
+ c = ReadIgnoreSpace();
+
+ if (c == '\r' || c == '\n')
+ {
+ c = ReadIgnoreSpace();
+
+ while (c == '\n' || c == '\r')
+ {
+ c = ReadIgnoreSpace();
+ }
+
+ if (c < 0) // EOF
+ {
+ isEndOfStream = true;
+ return -1;
+ }
+
+ if (c == '=') // crc reached
+ {
+ bufPtr = Decode(ReadIgnoreSpace(), ReadIgnoreSpace(), ReadIgnoreSpace(), ReadIgnoreSpace(), outBuf);
+ if (bufPtr == 0)
+ {
+ int i = ((outBuf[0] & 0xff) << 16)
+ | ((outBuf[1] & 0xff) << 8)
+ | (outBuf[2] & 0xff);
+
+ crcFound = true;
+
+ if (i != crc.Value)
+ {
+ throw new IOException("crc check failed in armored message.");
+ }
+ return ReadByte();
+ }
+ else
+ {
+ if (detectMissingChecksum)
+ {
+ throw new IOException("no crc found in armored message");
+ }
+ }
+ }
+ else if (c == '-') // end of record reached
+ {
+ while ((c = input.ReadByte()) >= 0)
+ {
+ if (c == '\n' || c == '\r')
+ {
+ break;
+ }
+ }
+
+ if (!crcFound && detectMissingChecksum)
+ {
+ throw new IOException("crc check not found");
+ }
+
+ crcFound = false;
+ start = true;
+ bufPtr = 3;
+
+ if (c < 0)
+ {
+ isEndOfStream = true;
+ }
+
+ return -1;
+ }
+ else // data
+ {
+ bufPtr = Decode(c, ReadIgnoreSpace(), ReadIgnoreSpace(), ReadIgnoreSpace(), outBuf);
+ }
+ }
+ else
+ {
+ if (c >= 0)
+ {
+ bufPtr = Decode(c, ReadIgnoreSpace(), ReadIgnoreSpace(), ReadIgnoreSpace(), outBuf);
+ }
+ else
+ {
+ isEndOfStream = true;
+ return -1;
+ }
+ }
+ }
+
+ c = outBuf[bufPtr++];
+
+ crc.Update(c);
+
+ return c;
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ input.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ /**
+ * Change how the stream should react if it encounters missing CRC checksum.
+ * The default value is false (ignore missing CRC checksums). If the behavior is set to true,
+ * an {@link IOException} will be thrown if a missing CRC checksum is encountered.
+ *
+ * @param detectMissing ignore missing CRC sums
+ */
+ public virtual void SetDetectMissingCrc(bool detectMissing)
+ {
+ this.detectMissingChecksum = detectMissing;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredInputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredInputStream.cs.meta
new file mode 100644
index 00000000..9714d379
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredInputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4f854216f212a344e9c4cad23e971ad5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredOutputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredOutputStream.cs
new file mode 100644
index 00000000..64905758
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredOutputStream.cs
@@ -0,0 +1,402 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Reflection;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * Basic output stream.
+ */
+ public class ArmoredOutputStream
+ : BaseOutputStream
+ {
+ public static readonly string HeaderVersion = "Version";
+
+ private static readonly byte[] encodingTable =
+ {
+ (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',
+ (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',
+ (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U',
+ (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
+ (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
+ (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',
+ (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u',
+ (byte)'v',
+ (byte)'w', (byte)'x', (byte)'y', (byte)'z',
+ (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', (byte)'6',
+ (byte)'7', (byte)'8', (byte)'9',
+ (byte)'+', (byte)'/'
+ };
+
+ /**
+ * encode the input data producing a base 64 encoded byte array.
+ */
+ private static void Encode(
+ Stream outStream,
+ int[] data,
+ int len)
+ {
+ Debug.Assert(len > 0);
+ Debug.Assert(len < 4);
+
+ byte[] bs = new byte[4];
+ int d1 = data[0];
+ bs[0] = encodingTable[(d1 >> 2) & 0x3f];
+
+ switch (len)
+ {
+ case 1:
+ {
+ bs[1] = encodingTable[(d1 << 4) & 0x3f];
+ bs[2] = (byte)'=';
+ bs[3] = (byte)'=';
+ break;
+ }
+ case 2:
+ {
+ int d2 = data[1];
+ bs[1] = encodingTable[((d1 << 4) | (d2 >> 4)) & 0x3f];
+ bs[2] = encodingTable[(d2 << 2) & 0x3f];
+ bs[3] = (byte)'=';
+ break;
+ }
+ case 3:
+ {
+ int d2 = data[1];
+ int d3 = data[2];
+ bs[1] = encodingTable[((d1 << 4) | (d2 >> 4)) & 0x3f];
+ bs[2] = encodingTable[((d2 << 2) | (d3 >> 6)) & 0x3f];
+ bs[3] = encodingTable[d3 & 0x3f];
+ break;
+ }
+ }
+
+ outStream.Write(bs, 0, bs.Length);
+ }
+
+ private readonly Stream outStream;
+ private int[] buf = new int[3];
+ private int bufPtr = 0;
+ private Crc24 crc = new Crc24();
+ private int chunkCount = 0;
+ private int lastb;
+
+ private bool start = true;
+ private bool clearText = false;
+ private bool newLine = false;
+
+ private string type;
+
+ private static readonly string NewLine = Environment.NewLine;
+ private static readonly string headerStart = "-----BEGIN PGP ";
+ private static readonly string headerTail = "-----";
+ private static readonly string footerStart = "-----END PGP ";
+ private static readonly string footerTail = "-----";
+
+ private static string CreateVersion()
+ {
+ var assembly = Assembly.GetExecutingAssembly();
+ var title = assembly.GetCustomAttribute().Title;
+ var version = assembly.GetCustomAttribute().InformationalVersion;
+ return title + " v" + version;
+ }
+
+ private static readonly string Version = CreateVersion();
+
+ private readonly IDictionary> m_headers;
+
+ public ArmoredOutputStream(Stream outStream)
+ {
+ this.outStream = outStream;
+ this.m_headers = new Dictionary>(1);
+ SetHeader(HeaderVersion, Version);
+ }
+
+ public ArmoredOutputStream(Stream outStream, IDictionary headers)
+ : this(outStream)
+ {
+ foreach (var header in headers)
+ {
+ var headerList = new List(1);
+ headerList.Add(header.Value);
+
+ m_headers[header.Key] = headerList;
+ }
+ }
+
+ /**
+ * Set an additional header entry. Any current value(s) under the same name will be
+ * replaced by the new one. A null value will clear the entry for name. *
+ * @param name the name of the header entry.
+ * @param v the value of the header entry.
+ */
+ public void SetHeader(string name, string val)
+ {
+ if (val == null)
+ {
+ this.m_headers.Remove(name);
+ return;
+ }
+
+ if (m_headers.TryGetValue(name, out var valueList))
+ {
+ valueList.Clear();
+ }
+ else
+ {
+ valueList = new List(1);
+ m_headers[name] = valueList;
+ }
+
+ valueList.Add(val);
+ }
+
+ /**
+ * Set an additional header entry. The current value(s) will continue to exist together
+ * with the new one. Adding a null value has no effect.
+ *
+ * @param name the name of the header entry.
+ * @param value the value of the header entry.
+ */
+ public void AddHeader(string name, string val)
+ {
+ if (val == null || name == null)
+ return;
+
+ if (!m_headers.TryGetValue(name, out var valueList))
+ {
+ valueList = new List(1);
+ m_headers[name] = valueList;
+ }
+
+ valueList.Add(val);
+ }
+
+ /**
+ * Reset the headers to only contain a Version string (if one is present).
+ */
+ public void ResetHeaders()
+ {
+ var versions = CollectionUtilities.GetValueOrNull(m_headers, HeaderVersion);
+
+ m_headers.Clear();
+
+ if (versions != null)
+ {
+ m_headers[HeaderVersion] = versions;
+ }
+ }
+
+ /**
+ * Start a clear text signed message.
+ * @param hashAlgorithm
+ */
+ public void BeginClearText(
+ HashAlgorithmTag hashAlgorithm)
+ {
+ string hash;
+
+ switch (hashAlgorithm)
+ {
+ case HashAlgorithmTag.Sha1:
+ hash = "SHA1";
+ break;
+ case HashAlgorithmTag.Sha256:
+ hash = "SHA256";
+ break;
+ case HashAlgorithmTag.Sha384:
+ hash = "SHA384";
+ break;
+ case HashAlgorithmTag.Sha512:
+ hash = "SHA512";
+ break;
+ case HashAlgorithmTag.MD2:
+ hash = "MD2";
+ break;
+ case HashAlgorithmTag.MD5:
+ hash = "MD5";
+ break;
+ case HashAlgorithmTag.RipeMD160:
+ hash = "RIPEMD160";
+ break;
+ default:
+ throw new IOException("unknown hash algorithm tag in beginClearText: " + hashAlgorithm);
+ }
+
+ DoWrite("-----BEGIN PGP SIGNED MESSAGE-----" + NewLine);
+ DoWrite("Hash: " + hash + NewLine + NewLine);
+
+ clearText = true;
+ newLine = true;
+ lastb = 0;
+ }
+
+ public void EndClearText()
+ {
+ clearText = false;
+ }
+
+ public override void WriteByte(byte value)
+ {
+ if (clearText)
+ {
+ outStream.WriteByte(value);
+
+ if (newLine)
+ {
+ if (!(value == '\n' && lastb == '\r'))
+ {
+ newLine = false;
+ }
+ if (value == '-')
+ {
+ outStream.WriteByte((byte)' ');
+ outStream.WriteByte((byte)'-'); // dash escape
+ }
+ }
+ if (value == '\r' || (value == '\n' && lastb != '\r'))
+ {
+ newLine = true;
+ }
+ lastb = value;
+ return;
+ }
+
+ if (start)
+ {
+ bool newPacket = (value & 0x40) != 0;
+
+ int tag;
+ if (newPacket)
+ {
+ tag = value & 0x3f;
+ }
+ else
+ {
+ tag = (value & 0x3f) >> 2;
+ }
+
+ switch ((PacketTag)tag)
+ {
+ case PacketTag.PublicKey:
+ type = "PUBLIC KEY BLOCK";
+ break;
+ case PacketTag.SecretKey:
+ type = "PRIVATE KEY BLOCK";
+ break;
+ case PacketTag.Signature:
+ type = "SIGNATURE";
+ break;
+ default:
+ type = "MESSAGE";
+ break;
+ }
+
+ DoWrite(headerStart + type + headerTail + NewLine);
+
+ if (m_headers.TryGetValue(HeaderVersion, out var versionHeaders))
+ {
+ WriteHeaderEntry(HeaderVersion, versionHeaders[0]);
+ }
+
+ foreach (var de in m_headers)
+ {
+ string k = de.Key;
+ if (k != HeaderVersion)
+ {
+ foreach (string v in de.Value)
+ {
+ WriteHeaderEntry(k, v);
+ }
+ }
+ }
+
+ DoWrite(NewLine);
+
+ start = false;
+ }
+
+ if (bufPtr == 3)
+ {
+ Encode(outStream, buf, bufPtr);
+ bufPtr = 0;
+ if ((++chunkCount & 0xf) == 0)
+ {
+ DoWrite(NewLine);
+ }
+ }
+
+ crc.Update(value);
+ buf[bufPtr++] = value & 0xff;
+ }
+
+ /**
+ * Note : Close() does not close the underlying stream. So it is possible to write
+ * multiple objects using armoring to a single stream.
+ */
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ if (type != null)
+ {
+ DoClose();
+
+ type = null;
+ start = true;
+ }
+ }
+ base.Dispose(disposing);
+ }
+
+ private void DoClose()
+ {
+ if (bufPtr > 0)
+ {
+ Encode(outStream, buf, bufPtr);
+ }
+
+ DoWrite(NewLine + '=');
+
+ int crcV = crc.Value;
+
+ buf[0] = ((crcV >> 16) & 0xff);
+ buf[1] = ((crcV >> 8) & 0xff);
+ buf[2] = (crcV & 0xff);
+
+ Encode(outStream, buf, 3);
+
+ DoWrite(NewLine);
+ DoWrite(footerStart);
+ DoWrite(type);
+ DoWrite(footerTail);
+ DoWrite(NewLine);
+
+ outStream.Flush();
+ }
+
+ private void WriteHeaderEntry(
+ string name,
+ string v)
+ {
+ DoWrite(name + ": " + v + NewLine);
+ }
+
+ private void DoWrite(
+ string s)
+ {
+ byte[] bs = Strings.ToAsciiByteArray(s);
+ outStream.Write(bs, 0, bs.Length);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredOutputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredOutputStream.cs.meta
new file mode 100644
index 00000000..e8fed8a2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ArmoredOutputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8fed80424e08ad04da99e5334edd57b8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgInputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgInputStream.cs
new file mode 100644
index 00000000..40a2977b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgInputStream.cs
@@ -0,0 +1,402 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Reader for PGP objects.
+ public class BcpgInputStream
+ : BaseInputStream
+ {
+ private Stream m_in;
+ private bool next = false;
+ private int nextB;
+
+ internal static BcpgInputStream Wrap(
+ Stream inStr)
+ {
+ if (inStr is BcpgInputStream)
+ {
+ return (BcpgInputStream) inStr;
+ }
+
+ return new BcpgInputStream(inStr);
+ }
+
+ private BcpgInputStream(
+ Stream inputStream)
+ {
+ this.m_in = inputStream;
+ }
+
+ public override int ReadByte()
+ {
+ if (next)
+ {
+ next = false;
+ return nextB;
+ }
+
+ return m_in.ReadByte();
+ }
+
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ if (!next)
+ return m_in.Read(buffer, offset, count);
+
+ Streams.ValidateBufferArguments(buffer, offset, count);
+
+ if (nextB < 0)
+ return 0;
+
+ buffer[offset] = (byte)nextB;
+ next = false;
+ return 1;
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override int Read(Span buffer)
+ {
+ if (!next)
+ return m_in.Read(buffer);
+
+ if (nextB < 0)
+ return 0;
+
+ buffer[0] = (byte)nextB;
+ next = false;
+ return 1;
+ }
+#endif
+
+ public byte[] ReadAll()
+ {
+ return Streams.ReadAll(this);
+ }
+
+ public void ReadFully(byte[] buffer, int offset, int count)
+ {
+ if (Streams.ReadFully(this, buffer, offset, count) < count)
+ throw new EndOfStreamException();
+ }
+
+ public void ReadFully(byte[] buffer)
+ {
+ ReadFully(buffer, 0, buffer.Length);
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public void ReadFully(Span buffer)
+ {
+ if (Streams.ReadFully(this, buffer) < buffer.Length)
+ throw new EndOfStreamException();
+ }
+#endif
+
+ /// Returns the next packet tag in the stream.
+ public PacketTag NextPacketTag()
+ {
+ if (!next)
+ {
+ try
+ {
+ nextB = m_in.ReadByte();
+ }
+ catch (EndOfStreamException)
+ {
+ nextB = -1;
+ }
+
+ next = true;
+ }
+
+ if (nextB < 0)
+ return (PacketTag)nextB;
+
+ int maskB = nextB & 0x3f;
+ if ((nextB & 0x40) == 0) // old
+ {
+ maskB >>= 2;
+ }
+ return (PacketTag)maskB;
+ }
+
+ public Packet ReadPacket()
+ {
+ int hdr = this.ReadByte();
+
+ if (hdr < 0)
+ {
+ return null;
+ }
+
+ if ((hdr & 0x80) == 0)
+ {
+ throw new IOException("invalid header encountered");
+ }
+
+ bool newPacket = (hdr & 0x40) != 0;
+ PacketTag tag = 0;
+ int bodyLen = 0;
+ bool partial = false;
+
+ if (newPacket)
+ {
+ tag = (PacketTag)(hdr & 0x3f);
+
+ int l = this.ReadByte();
+
+ if (l < 192)
+ {
+ bodyLen = l;
+ }
+ else if (l <= 223)
+ {
+ int b = m_in.ReadByte();
+ bodyLen = ((l - 192) << 8) + (b) + 192;
+ }
+ else if (l == 255)
+ {
+ bodyLen = (m_in.ReadByte() << 24) | (m_in.ReadByte() << 16)
+ | (m_in.ReadByte() << 8) | m_in.ReadByte();
+ }
+ else
+ {
+ partial = true;
+ bodyLen = 1 << (l & 0x1f);
+ }
+ }
+ else
+ {
+ int lengthType = hdr & 0x3;
+
+ tag = (PacketTag)((hdr & 0x3f) >> 2);
+
+ switch (lengthType)
+ {
+ case 0:
+ bodyLen = this.ReadByte();
+ break;
+ case 1:
+ bodyLen = (this.ReadByte() << 8) | this.ReadByte();
+ break;
+ case 2:
+ bodyLen = (this.ReadByte() << 24) | (this.ReadByte() << 16)
+ | (this.ReadByte() << 8) | this.ReadByte();
+ break;
+ case 3:
+ partial = true;
+ break;
+ default:
+ throw new IOException("unknown length type encountered");
+ }
+ }
+
+ BcpgInputStream objStream;
+ if (bodyLen == 0 && partial)
+ {
+ objStream = this;
+ }
+ else
+ {
+ PartialInputStream pis = new PartialInputStream(this, partial, bodyLen);
+ Stream buf = new BufferedStream(pis);
+ objStream = new BcpgInputStream(buf);
+ }
+
+ switch (tag)
+ {
+ case PacketTag.Reserved:
+ return new InputStreamPacket(objStream);
+ case PacketTag.PublicKeyEncryptedSession:
+ return new PublicKeyEncSessionPacket(objStream);
+ case PacketTag.Signature:
+ return new SignaturePacket(objStream);
+ case PacketTag.SymmetricKeyEncryptedSessionKey:
+ return new SymmetricKeyEncSessionPacket(objStream);
+ case PacketTag.OnePassSignature:
+ return new OnePassSignaturePacket(objStream);
+ case PacketTag.SecretKey:
+ return new SecretKeyPacket(objStream);
+ case PacketTag.PublicKey:
+ return new PublicKeyPacket(objStream);
+ case PacketTag.SecretSubkey:
+ return new SecretSubkeyPacket(objStream);
+ case PacketTag.CompressedData:
+ return new CompressedDataPacket(objStream);
+ case PacketTag.SymmetricKeyEncrypted:
+ return new SymmetricEncDataPacket(objStream);
+ case PacketTag.Marker:
+ return new MarkerPacket(objStream);
+ case PacketTag.LiteralData:
+ return new LiteralDataPacket(objStream);
+ case PacketTag.Trust:
+ return new TrustPacket(objStream);
+ case PacketTag.UserId:
+ return new UserIdPacket(objStream);
+ case PacketTag.UserAttribute:
+ return new UserAttributePacket(objStream);
+ case PacketTag.PublicSubkey:
+ return new PublicSubkeyPacket(objStream);
+ case PacketTag.SymmetricEncryptedIntegrityProtected:
+ return new SymmetricEncIntegrityPacket(objStream);
+ case PacketTag.ModificationDetectionCode:
+ return new ModDetectionCodePacket(objStream);
+ case PacketTag.Experimental1:
+ case PacketTag.Experimental2:
+ case PacketTag.Experimental3:
+ case PacketTag.Experimental4:
+ return new ExperimentalPacket(tag, objStream);
+ default:
+ throw new IOException("unknown packet type encountered: " + tag);
+ }
+ }
+
+ public PacketTag SkipMarkerPackets()
+ {
+ PacketTag tag;
+ while ((tag = NextPacketTag()) == PacketTag.Marker)
+ {
+ ReadPacket();
+ }
+
+ return tag;
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ m_in.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ ///
+ /// A stream that overlays our input stream, allowing the user to only read a segment of it.
+ /// NB: dataLength will be negative if the segment length is in the upper range above 2**31.
+ ///
+ private class PartialInputStream
+ : BaseInputStream
+ {
+ private BcpgInputStream m_in;
+ private bool partial;
+ private int dataLength;
+
+ internal PartialInputStream(
+ BcpgInputStream bcpgIn,
+ bool partial,
+ int dataLength)
+ {
+ this.m_in = bcpgIn;
+ this.partial = partial;
+ this.dataLength = dataLength;
+ }
+
+ public override int ReadByte()
+ {
+ do
+ {
+ if (dataLength != 0)
+ {
+ int ch = m_in.ReadByte();
+ if (ch < 0)
+ {
+ throw new EndOfStreamException("Premature end of stream in PartialInputStream");
+ }
+ dataLength--;
+ return ch;
+ }
+ }
+ while (partial && ReadPartialDataLength() >= 0);
+
+ return -1;
+ }
+
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ Streams.ValidateBufferArguments(buffer, offset, count);
+
+ do
+ {
+ if (dataLength != 0)
+ {
+ int readLen = (dataLength > count || dataLength < 0) ? count : dataLength;
+ int len = m_in.Read(buffer, offset, readLen);
+ if (len < 1)
+ throw new EndOfStreamException("Premature end of stream in PartialInputStream");
+
+ dataLength -= len;
+ return len;
+ }
+ }
+ while (partial && ReadPartialDataLength() >= 0);
+
+ return 0;
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override int Read(Span buffer)
+ {
+ do
+ {
+ if (dataLength != 0)
+ {
+ int count = buffer.Length;
+ int readLen = (dataLength > count || dataLength < 0) ? count : dataLength;
+ int len = m_in.Read(buffer[..readLen]);
+ if (len < 1)
+ throw new EndOfStreamException("Premature end of stream in PartialInputStream");
+
+ dataLength -= len;
+ return len;
+ }
+ }
+ while (partial && ReadPartialDataLength() >= 0);
+
+ return 0;
+ }
+#endif
+
+ private int ReadPartialDataLength()
+ {
+ int l = m_in.ReadByte();
+
+ if (l < 0)
+ {
+ return -1;
+ }
+
+ partial = false;
+
+ if (l < 192)
+ {
+ dataLength = l;
+ }
+ else if (l <= 223)
+ {
+ dataLength = ((l - 192) << 8) + (m_in.ReadByte()) + 192;
+ }
+ else if (l == 255)
+ {
+ dataLength = (m_in.ReadByte() << 24) | (m_in.ReadByte() << 16)
+ | (m_in.ReadByte() << 8) | m_in.ReadByte();
+ }
+ else
+ {
+ partial = true;
+ dataLength = 1 << (l & 0x1f);
+ }
+
+ return 0;
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgInputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgInputStream.cs.meta
new file mode 100644
index 00000000..3c814047
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgInputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e95c8e5704bee9b479c7e9004e8549a8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgObject.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgObject.cs
new file mode 100644
index 00000000..d75bcafc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgObject.cs
@@ -0,0 +1,26 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for a PGP object.
+ public abstract class BcpgObject
+ {
+ public virtual byte[] GetEncoded()
+ {
+ MemoryStream bOut = new MemoryStream();
+ BcpgOutputStream pOut = new BcpgOutputStream(bOut);
+
+ pOut.WriteObject(this);
+
+ return bOut.ToArray();
+ }
+
+ public abstract void Encode(BcpgOutputStream bcpgOut);
+ }
+}
+
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgObject.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgObject.cs.meta
new file mode 100644
index 00000000..25867d5b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6db13f919dfa07b4ba1dc034bc4dab83
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgOutputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgOutputStream.cs
new file mode 100644
index 00000000..51489f45
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgOutputStream.cs
@@ -0,0 +1,446 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic output stream.
+ public class BcpgOutputStream
+ : BaseOutputStream
+ {
+ internal static BcpgOutputStream Wrap(
+ Stream outStr)
+ {
+ if (outStr is BcpgOutputStream)
+ {
+ return (BcpgOutputStream) outStr;
+ }
+
+ return new BcpgOutputStream(outStr);
+ }
+
+ private Stream outStr;
+ private byte[] partialBuffer;
+ private int partialBufferLength;
+ private int partialPower;
+ private int partialOffset;
+ private const int BufferSizePower = 16; // 2^16 size buffer on long files
+
+ /// Create a stream representing a general packet.
+ /// Output stream to write to.
+ public BcpgOutputStream(
+ Stream outStr)
+ {
+ if (outStr == null)
+ throw new ArgumentNullException("outStr");
+
+ this.outStr = outStr;
+ }
+
+ /// Create a stream representing an old style partial object.
+ /// Output stream to write to.
+ /// The packet tag for the object.
+ public BcpgOutputStream(
+ Stream outStr,
+ PacketTag tag)
+ {
+ if (outStr == null)
+ throw new ArgumentNullException("outStr");
+
+ this.outStr = outStr;
+ this.WriteHeader(tag, true, true, 0);
+ }
+
+ /// Create a stream representing a general packet.
+ /// Output stream to write to.
+ /// Packet tag.
+ /// Size of chunks making up the packet.
+ /// If true, the header is written out in old format.
+ public BcpgOutputStream(
+ Stream outStr,
+ PacketTag tag,
+ long length,
+ bool oldFormat)
+ {
+ if (outStr == null)
+ throw new ArgumentNullException("outStr");
+
+ this.outStr = outStr;
+
+ if (length > 0xFFFFFFFFL)
+ {
+ this.WriteHeader(tag, false, true, 0);
+ this.partialBufferLength = 1 << BufferSizePower;
+ this.partialBuffer = new byte[partialBufferLength];
+ this.partialPower = BufferSizePower;
+ this.partialOffset = 0;
+ }
+ else
+ {
+ this.WriteHeader(tag, oldFormat, false, length);
+ }
+ }
+
+ /// Create a new style partial input stream buffered into chunks.
+ /// Output stream to write to.
+ /// Packet tag.
+ /// Size of chunks making up the packet.
+ public BcpgOutputStream(
+ Stream outStr,
+ PacketTag tag,
+ long length)
+ {
+ if (outStr == null)
+ throw new ArgumentNullException("outStr");
+
+ this.outStr = outStr;
+ this.WriteHeader(tag, false, false, length);
+ }
+
+ /// Create a new style partial input stream buffered into chunks.
+ /// Output stream to write to.
+ /// Packet tag.
+ /// Buffer to use for collecting chunks.
+ public BcpgOutputStream(
+ Stream outStr,
+ PacketTag tag,
+ byte[] buffer)
+ {
+ if (outStr == null)
+ throw new ArgumentNullException("outStr");
+
+ this.outStr = outStr;
+ this.WriteHeader(tag, false, true, 0);
+
+ this.partialBuffer = buffer;
+
+ uint length = (uint) partialBuffer.Length;
+ for (partialPower = 0; length != 1; partialPower++)
+ {
+ length >>= 1;
+ }
+
+ if (partialPower > 30)
+ {
+ throw new IOException("Buffer cannot be greater than 2^30 in length.");
+ }
+ this.partialBufferLength = 1 << partialPower;
+ this.partialOffset = 0;
+ }
+
+ private void WriteNewPacketLength(
+ long bodyLen)
+ {
+ if (bodyLen < 192)
+ {
+ outStr.WriteByte((byte)bodyLen);
+ }
+ else if (bodyLen <= 8383)
+ {
+ bodyLen -= 192;
+
+ outStr.WriteByte((byte)(((bodyLen >> 8) & 0xff) + 192));
+ outStr.WriteByte((byte)bodyLen);
+ }
+ else
+ {
+ outStr.WriteByte(0xff);
+ outStr.WriteByte((byte)(bodyLen >> 24));
+ outStr.WriteByte((byte)(bodyLen >> 16));
+ outStr.WriteByte((byte)(bodyLen >> 8));
+ outStr.WriteByte((byte)bodyLen);
+ }
+ }
+
+ private void WriteHeader(
+ PacketTag tag,
+ bool oldPackets,
+ bool partial,
+ long bodyLen)
+ {
+ int hdr = 0x80;
+
+ if (partialBuffer != null)
+ {
+ PartialFlushLast();
+ partialBuffer = null;
+ }
+
+ if (oldPackets)
+ {
+ hdr |= ((int) tag) << 2;
+
+ if (partial)
+ {
+ this.WriteByte((byte)(hdr | 0x03));
+ }
+ else
+ {
+ if (bodyLen <= 0xff)
+ {
+ this.WriteByte((byte) hdr);
+ this.WriteByte((byte)bodyLen);
+ }
+ else if (bodyLen <= 0xffff)
+ {
+ this.WriteByte((byte)(hdr | 0x01));
+ this.WriteByte((byte)(bodyLen >> 8));
+ this.WriteByte((byte)(bodyLen));
+ }
+ else
+ {
+ this.WriteByte((byte)(hdr | 0x02));
+ this.WriteByte((byte)(bodyLen >> 24));
+ this.WriteByte((byte)(bodyLen >> 16));
+ this.WriteByte((byte)(bodyLen >> 8));
+ this.WriteByte((byte)bodyLen);
+ }
+ }
+ }
+ else
+ {
+ hdr |= 0x40 | (int) tag;
+ this.WriteByte((byte) hdr);
+
+ if (partial)
+ {
+ partialOffset = 0;
+ }
+ else
+ {
+ this.WriteNewPacketLength(bodyLen);
+ }
+ }
+ }
+
+ private void PartialFlush()
+ {
+ outStr.WriteByte((byte)(0xE0 | partialPower));
+ outStr.Write(partialBuffer, 0, partialBufferLength);
+ partialOffset = 0;
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ private void PartialFlush(ref ReadOnlySpan buffer)
+ {
+ outStr.WriteByte((byte)(0xE0 | partialPower));
+ outStr.Write(buffer[..partialBufferLength]);
+ buffer = buffer[partialBufferLength..];
+ }
+#endif
+
+ private void PartialFlushLast()
+ {
+ WriteNewPacketLength(partialOffset);
+ outStr.Write(partialBuffer, 0, partialOffset);
+ partialOffset = 0;
+ }
+
+ private void PartialWrite(byte[] buffer, int offset, int count)
+ {
+ Streams.ValidateBufferArguments(buffer, offset, count);
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ PartialWrite(buffer.AsSpan(offset, count));
+#else
+ if (partialOffset == partialBufferLength)
+ {
+ PartialFlush();
+ }
+
+ if (count <= (partialBufferLength - partialOffset))
+ {
+ Array.Copy(buffer, offset, partialBuffer, partialOffset, count);
+ partialOffset += count;
+ return;
+ }
+
+ int diff = partialBufferLength - partialOffset;
+ Array.Copy(buffer, offset, partialBuffer, partialOffset, diff);
+ offset += diff;
+ count -= diff;
+ PartialFlush();
+ while (count > partialBufferLength)
+ {
+ Array.Copy(buffer, offset, partialBuffer, 0, partialBufferLength);
+ offset += partialBufferLength;
+ count -= partialBufferLength;
+ PartialFlush();
+ }
+ Array.Copy(buffer, offset, partialBuffer, 0, count);
+ partialOffset = count;
+#endif
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ private void PartialWrite(ReadOnlySpan buffer)
+ {
+ if (partialOffset == partialBufferLength)
+ {
+ PartialFlush();
+ }
+
+ if (buffer.Length <= (partialBufferLength - partialOffset))
+ {
+ buffer.CopyTo(partialBuffer.AsSpan(partialOffset));
+ partialOffset += buffer.Length;
+ return;
+ }
+
+ int diff = partialBufferLength - partialOffset;
+ buffer[..diff].CopyTo(partialBuffer.AsSpan(partialOffset));
+ buffer = buffer[diff..];
+ PartialFlush();
+ while (buffer.Length > partialBufferLength)
+ {
+ PartialFlush(ref buffer);
+ }
+ buffer.CopyTo(partialBuffer);
+ partialOffset = buffer.Length;
+ }
+#endif
+
+ private void PartialWriteByte(byte value)
+ {
+ if (partialOffset == partialBufferLength)
+ {
+ PartialFlush();
+ }
+
+ partialBuffer[partialOffset++] = value;
+ }
+
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ if (partialBuffer != null)
+ {
+ PartialWrite(buffer, offset, count);
+ }
+ else
+ {
+ outStr.Write(buffer, offset, count);
+ }
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override void Write(ReadOnlySpan buffer)
+ {
+ if (partialBuffer != null)
+ {
+ PartialWrite(buffer);
+ }
+ else
+ {
+ outStr.Write(buffer);
+ }
+ }
+#endif
+
+ public override void WriteByte(byte value)
+ {
+ if (partialBuffer != null)
+ {
+ PartialWriteByte(value);
+ }
+ else
+ {
+ outStr.WriteByte(value);
+ }
+ }
+
+ // Additional helper methods to write primitive types
+ internal virtual void WriteShort(
+ short n)
+ {
+ this.Write(
+ (byte)(n >> 8),
+ (byte)n);
+ }
+ internal virtual void WriteInt(
+ int n)
+ {
+ this.Write(
+ (byte)(n >> 24),
+ (byte)(n >> 16),
+ (byte)(n >> 8),
+ (byte)n);
+ }
+ internal virtual void WriteLong(
+ long n)
+ {
+ this.Write(
+ (byte)(n >> 56),
+ (byte)(n >> 48),
+ (byte)(n >> 40),
+ (byte)(n >> 32),
+ (byte)(n >> 24),
+ (byte)(n >> 16),
+ (byte)(n >> 8),
+ (byte)n);
+ }
+
+ public void WritePacket(
+ ContainedPacket p)
+ {
+ p.Encode(this);
+ }
+
+ internal void WritePacket(
+ PacketTag tag,
+ byte[] body,
+ bool oldFormat)
+ {
+ this.WriteHeader(tag, oldFormat, false, body.Length);
+ this.Write(body);
+ }
+
+ public void WriteObject(
+ BcpgObject bcpgObject)
+ {
+ bcpgObject.Encode(this);
+ }
+
+ public void WriteObjects(
+ params BcpgObject[] v)
+ {
+ foreach (BcpgObject o in v)
+ {
+ o.Encode(this);
+ }
+ }
+
+ /// Flush the underlying stream.
+ public override void Flush()
+ {
+ outStr.Flush();
+ }
+
+ /// Finish writing out the current packet without closing the underlying stream.
+ public void Finish()
+ {
+ if (partialBuffer != null)
+ {
+ PartialFlushLast();
+ Array.Clear(partialBuffer, 0, partialBuffer.Length);
+ partialBuffer = null;
+ }
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ this.Finish();
+ outStr.Flush();
+ outStr.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgOutputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgOutputStream.cs.meta
new file mode 100644
index 00000000..fbf498e5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/BcpgOutputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ad3f23730b822694fbd2acdfc5d002cd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressedDataPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressedDataPacket.cs
new file mode 100644
index 00000000..df139061
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressedDataPacket.cs
@@ -0,0 +1,28 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Generic compressed data object.
+ public class CompressedDataPacket
+ : InputStreamPacket
+ {
+ private readonly CompressionAlgorithmTag algorithm;
+
+ internal CompressedDataPacket(
+ BcpgInputStream bcpgIn)
+ : base(bcpgIn)
+ {
+ this.algorithm = (CompressionAlgorithmTag) bcpgIn.ReadByte();
+ }
+
+ /// The algorithm tag value.
+ public CompressionAlgorithmTag Algorithm
+ {
+ get { return algorithm; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressedDataPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressedDataPacket.cs.meta
new file mode 100644
index 00000000..e6ab9c1e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressedDataPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6a458ffe5901b8d4b8f38f11460abe45
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressionAlgorithmTags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressionAlgorithmTags.cs
new file mode 100644
index 00000000..d90636ad
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressionAlgorithmTags.cs
@@ -0,0 +1,15 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic tags for compression algorithms.
+ public enum CompressionAlgorithmTag
+ {
+ Uncompressed = 0, // Uncompressed
+ Zip = 1, // ZIP (RFC 1951)
+ ZLib = 2, // ZLIB (RFC 1950)
+ BZip2 = 3, // BZ2
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressionAlgorithmTags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressionAlgorithmTags.cs.meta
new file mode 100644
index 00000000..65addd9e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/CompressionAlgorithmTags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a01318b463e16f74eb1466a80b6217c3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ContainedPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ContainedPacket.cs
new file mode 100644
index 00000000..7653bb70
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ContainedPacket.cs
@@ -0,0 +1,26 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic type for a PGP packet.
+ public abstract class ContainedPacket
+ : Packet
+ {
+ public byte[] GetEncoded()
+ {
+ MemoryStream bOut = new MemoryStream();
+ BcpgOutputStream pOut = new BcpgOutputStream(bOut);
+
+ pOut.WritePacket(this);
+
+ return bOut.ToArray();
+ }
+
+ public abstract void Encode(BcpgOutputStream bcpgOut);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ContainedPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ContainedPacket.cs.meta
new file mode 100644
index 00000000..c3b93253
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ContainedPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e4db8b93d06f008459a950dec7a51129
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Crc24.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Crc24.cs
new file mode 100644
index 00000000..a99b840c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Crc24.cs
@@ -0,0 +1,44 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ public class Crc24
+ {
+ private const int Crc24Init = 0x0b704ce;
+ private const int Crc24Poly = 0x1864cfb;
+
+ private int crc = Crc24Init;
+
+ public Crc24()
+ {
+ }
+
+ public void Update(
+ int b)
+ {
+ crc ^= b << 16;
+ for (int i = 0; i < 8; i++)
+ {
+ crc <<= 1;
+ if ((crc & 0x1000000) != 0)
+ {
+ crc ^= Crc24Poly;
+ }
+ }
+ }
+
+ public int Value
+ {
+ get { return crc; }
+ }
+
+ public void Reset()
+ {
+ crc = Crc24Init;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Crc24.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Crc24.cs.meta
new file mode 100644
index 00000000..d47d5cce
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Crc24.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2e046176ec3927c4cb0a8d7c03e6d182
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaPublicBcpgKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaPublicBcpgKey.cs
new file mode 100644
index 00000000..b59cb1dd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaPublicBcpgKey.cs
@@ -0,0 +1,84 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for a DSA public key.
+ public class DsaPublicBcpgKey
+ : BcpgObject, IBcpgKey
+ {
+ private readonly MPInteger p, q, g, y;
+
+ /// The stream to read the packet from.
+ public DsaPublicBcpgKey(
+ BcpgInputStream bcpgIn)
+ {
+ this.p = new MPInteger(bcpgIn);
+ this.q = new MPInteger(bcpgIn);
+ this.g = new MPInteger(bcpgIn);
+ this.y = new MPInteger(bcpgIn);
+ }
+
+ public DsaPublicBcpgKey(
+ BigInteger p,
+ BigInteger q,
+ BigInteger g,
+ BigInteger y)
+ {
+ this.p = new MPInteger(p);
+ this.q = new MPInteger(q);
+ this.g = new MPInteger(g);
+ this.y = new MPInteger(y);
+ }
+
+ /// The format, as a string, always "PGP".
+ public string Format
+ {
+ get { return "PGP"; }
+ }
+
+ /// Return the standard PGP encoding of the key.
+ public override byte[] GetEncoded()
+ {
+ try
+ {
+ return base.GetEncoded();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteObjects(p, q, g, y);
+ }
+
+ public BigInteger G
+ {
+ get { return g.Value; }
+ }
+
+ public BigInteger P
+ {
+ get { return p.Value; }
+ }
+
+ public BigInteger Q
+ {
+ get { return q.Value; }
+ }
+
+ public BigInteger Y
+ {
+ get { return y.Value; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaPublicBcpgKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaPublicBcpgKey.cs.meta
new file mode 100644
index 00000000..8f9b3acb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaPublicBcpgKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c5da13fa2e61d6143bdaf8f70a4cfa69
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaSecretBcpgKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaSecretBcpgKey.cs
new file mode 100644
index 00000000..69941562
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaSecretBcpgKey.cs
@@ -0,0 +1,65 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for a DSA secret key.
+ public class DsaSecretBcpgKey
+ : BcpgObject, IBcpgKey
+ {
+ internal MPInteger x;
+
+ /**
+ * @param in
+ */
+ public DsaSecretBcpgKey(
+ BcpgInputStream bcpgIn)
+ {
+ this.x = new MPInteger(bcpgIn);
+ }
+
+ public DsaSecretBcpgKey(
+ BigInteger x)
+ {
+ this.x = new MPInteger(x);
+ }
+
+ /// The format, as a string, always "PGP".
+ public string Format
+ {
+ get { return "PGP"; }
+ }
+
+ /// Return the standard PGP encoding of the key.
+ public override byte[] GetEncoded()
+ {
+ try
+ {
+ return base.GetEncoded();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteObject(x);
+ }
+
+ /**
+ * @return x
+ */
+ public BigInteger X
+ {
+ get { return x.Value; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaSecretBcpgKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaSecretBcpgKey.cs.meta
new file mode 100644
index 00000000..3000b717
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/DsaSecretBcpgKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 277f88a9a00aa1d48b7b952ecc615e65
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDHPublicBCPGKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDHPublicBCPGKey.cs
new file mode 100644
index 00000000..0d51f863
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDHPublicBCPGKey.cs
@@ -0,0 +1,125 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for an ECDH Public Key.
+ public class ECDHPublicBcpgKey
+ : ECPublicBcpgKey
+ {
+ private byte reserved;
+ private HashAlgorithmTag hashFunctionId;
+ private SymmetricKeyAlgorithmTag symAlgorithmId;
+
+ /// The stream to read the packet from.
+ public ECDHPublicBcpgKey(BcpgInputStream bcpgIn)
+ : base(bcpgIn)
+ {
+ int length = bcpgIn.ReadByte();
+ if (length != 3)
+ throw new InvalidOperationException("KDF parameters size of 3 expected.");
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ Span kdfParameters = stackalloc byte[3];
+#else
+ byte[] kdfParameters = new byte[3];
+#endif
+ bcpgIn.ReadFully(kdfParameters);
+
+ reserved = kdfParameters[0];
+ hashFunctionId = (HashAlgorithmTag)kdfParameters[1];
+ symAlgorithmId = (SymmetricKeyAlgorithmTag)kdfParameters[2];
+
+ VerifyHashAlgorithm();
+ VerifySymmetricKeyAlgorithm();
+ }
+
+ public ECDHPublicBcpgKey(
+ DerObjectIdentifier oid,
+ ECPoint point,
+ HashAlgorithmTag hashAlgorithm,
+ SymmetricKeyAlgorithmTag symmetricKeyAlgorithm)
+ : base(oid, point)
+ {
+ reserved = 1;
+ hashFunctionId = hashAlgorithm;
+ symAlgorithmId = symmetricKeyAlgorithm;
+
+ VerifyHashAlgorithm();
+ VerifySymmetricKeyAlgorithm();
+ }
+
+ public ECDHPublicBcpgKey(
+ DerObjectIdentifier oid,
+ BigInteger point,
+ HashAlgorithmTag hashAlgorithm,
+ SymmetricKeyAlgorithmTag symmetricKeyAlgorithm)
+ : base(oid, point)
+ {
+ reserved = 1;
+ hashFunctionId = hashAlgorithm;
+ symAlgorithmId = symmetricKeyAlgorithm;
+
+ VerifyHashAlgorithm();
+ VerifySymmetricKeyAlgorithm();
+ }
+
+ public virtual byte Reserved
+ {
+ get { return reserved; }
+ }
+
+ public virtual HashAlgorithmTag HashAlgorithm
+ {
+ get { return hashFunctionId; }
+ }
+
+ public virtual SymmetricKeyAlgorithmTag SymmetricKeyAlgorithm
+ {
+ get { return symAlgorithmId; }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ base.Encode(bcpgOut);
+ bcpgOut.WriteByte(0x3);
+ bcpgOut.WriteByte(reserved);
+ bcpgOut.WriteByte((byte)hashFunctionId);
+ bcpgOut.WriteByte((byte)symAlgorithmId);
+ }
+
+ private void VerifyHashAlgorithm()
+ {
+ switch (hashFunctionId)
+ {
+ case HashAlgorithmTag.Sha256:
+ case HashAlgorithmTag.Sha384:
+ case HashAlgorithmTag.Sha512:
+ break;
+ default:
+ throw new InvalidOperationException("Hash algorithm must be SHA-256 or stronger.");
+ }
+ }
+
+ private void VerifySymmetricKeyAlgorithm()
+ {
+ switch (symAlgorithmId)
+ {
+ case SymmetricKeyAlgorithmTag.Aes128:
+ case SymmetricKeyAlgorithmTag.Aes192:
+ case SymmetricKeyAlgorithmTag.Aes256:
+ break;
+ default:
+ throw new InvalidOperationException("Symmetric key algorithm must be AES-128 or stronger.");
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDHPublicBCPGKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDHPublicBCPGKey.cs.meta
new file mode 100644
index 00000000..a5b761ac
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDHPublicBCPGKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 48f95fe26306d6b45bbd3899d4c609e5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDsaPublicBCPGKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDsaPublicBCPGKey.cs
new file mode 100644
index 00000000..18444d40
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDsaPublicBCPGKey.cs
@@ -0,0 +1,38 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for an ECDSA Public Key.
+ public class ECDsaPublicBcpgKey
+ : ECPublicBcpgKey
+ {
+ /// The stream to read the packet from.
+ protected internal ECDsaPublicBcpgKey(
+ BcpgInputStream bcpgIn)
+ : base(bcpgIn)
+ {
+ }
+
+ public ECDsaPublicBcpgKey(
+ DerObjectIdentifier oid,
+ ECPoint point)
+ : base(oid, point)
+ {
+ }
+
+ public ECDsaPublicBcpgKey(
+ DerObjectIdentifier oid,
+ BigInteger encodedPoint)
+ : base(oid, encodedPoint)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDsaPublicBCPGKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDsaPublicBCPGKey.cs.meta
new file mode 100644
index 00000000..7edf6cb0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECDsaPublicBCPGKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: df337537e86460f4f86d35cacf8ea369
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECPublicBCPGKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECPublicBCPGKey.cs
new file mode 100644
index 00000000..6eaef22f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECPublicBCPGKey.cs
@@ -0,0 +1,103 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for an EC Public Key.
+ public abstract class ECPublicBcpgKey
+ : BcpgObject, IBcpgKey
+ {
+ internal DerObjectIdentifier oid;
+ internal BigInteger point;
+
+ /// The stream to read the packet from.
+ protected ECPublicBcpgKey(
+ BcpgInputStream bcpgIn)
+ {
+ this.oid = DerObjectIdentifier.GetInstance(Asn1Object.FromByteArray(ReadBytesOfEncodedLength(bcpgIn)));
+ this.point = new MPInteger(bcpgIn).Value;
+ }
+
+ protected ECPublicBcpgKey(
+ DerObjectIdentifier oid,
+ ECPoint point)
+ {
+ this.point = MPInteger.ToMpiBigInteger(point);
+ this.oid = oid;
+ }
+
+ protected ECPublicBcpgKey(
+ DerObjectIdentifier oid,
+ BigInteger encodedPoint)
+ {
+ this.point = encodedPoint;
+ this.oid = oid;
+ }
+
+ /// The format, as a string, always "PGP".
+ public string Format
+ {
+ get { return "PGP"; }
+ }
+
+ /// Return the standard PGP encoding of the key.
+ public override byte[] GetEncoded()
+ {
+ try
+ {
+ return base.GetEncoded();
+ }
+ catch (IOException)
+ {
+ return null;
+ }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ byte[] oid = this.oid.GetEncoded();
+ bcpgOut.Write(oid, 1, oid.Length - 1);
+
+ MPInteger point = new MPInteger(this.point);
+ bcpgOut.WriteObject(point);
+ }
+
+ public virtual BigInteger EncodedPoint
+ {
+ get { return point; }
+ }
+
+ public virtual DerObjectIdentifier CurveOid
+ {
+ get { return oid; }
+ }
+
+ protected static byte[] ReadBytesOfEncodedLength(
+ BcpgInputStream bcpgIn)
+ {
+ int length = bcpgIn.ReadByte();
+ if (length < 0)
+ throw new EndOfStreamException();
+ if (length == 0 || length == 0xFF)
+ throw new IOException("future extensions not yet implemented");
+ if (length > 127)
+ throw new IOException("unsupported OID");
+
+ byte[] buffer = new byte[length + 2];
+ bcpgIn.ReadFully(buffer, 2, buffer.Length - 2);
+ buffer[0] = (byte)0x06;
+ buffer[1] = (byte)length;
+
+ return buffer;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECPublicBCPGKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECPublicBCPGKey.cs.meta
new file mode 100644
index 00000000..812fddc6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECPublicBCPGKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9152380635704394a9d5f55bd5542690
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECSecretBCPGKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECSecretBCPGKey.cs
new file mode 100644
index 00000000..d7402ba6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECSecretBCPGKey.cs
@@ -0,0 +1,59 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for an EC Secret Key.
+ public class ECSecretBcpgKey
+ : BcpgObject, IBcpgKey
+ {
+ internal readonly MPInteger m_x;
+
+ public ECSecretBcpgKey(
+ BcpgInputStream bcpgIn)
+ {
+ m_x = new MPInteger(bcpgIn);
+ }
+
+ public ECSecretBcpgKey(
+ BigInteger x)
+ {
+ m_x = new MPInteger(x);
+ }
+
+ /// The format, as a string, always "PGP".
+ public string Format
+ {
+ get { return "PGP"; }
+ }
+
+ /// Return the standard PGP encoding of the key.
+ public override byte[] GetEncoded()
+ {
+ try
+ {
+ return base.GetEncoded();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteObject(m_x);
+ }
+
+ public virtual BigInteger X
+ {
+ get { return m_x.Value; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECSecretBCPGKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECSecretBCPGKey.cs.meta
new file mode 100644
index 00000000..0f87b85a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ECSecretBCPGKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8852ae292af4645488b2914fcf6b6896
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdDsaPublicBcpgKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdDsaPublicBcpgKey.cs
new file mode 100644
index 00000000..44b664ed
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdDsaPublicBcpgKey.cs
@@ -0,0 +1,29 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ public sealed class EdDsaPublicBcpgKey
+ : ECPublicBcpgKey
+ {
+ internal EdDsaPublicBcpgKey(BcpgInputStream bcpgIn)
+ : base(bcpgIn)
+ {
+ }
+
+ public EdDsaPublicBcpgKey(DerObjectIdentifier oid, ECPoint point)
+ : base(oid, point)
+ {
+ }
+
+ public EdDsaPublicBcpgKey(DerObjectIdentifier oid, BigInteger encodedPoint)
+ : base(oid, encodedPoint)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdDsaPublicBcpgKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdDsaPublicBcpgKey.cs.meta
new file mode 100644
index 00000000..d2e258dc
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdDsaPublicBcpgKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7b4f71b110466fa448eea3e9eede364b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdSecretBcpgKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdSecretBcpgKey.cs
new file mode 100644
index 00000000..714414f3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdSecretBcpgKey.cs
@@ -0,0 +1,47 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ public sealed class EdSecretBcpgKey
+ : BcpgObject, IBcpgKey
+ {
+ internal readonly MPInteger m_x;
+
+ public EdSecretBcpgKey(BcpgInputStream bcpgIn)
+ {
+ m_x = new MPInteger(bcpgIn);
+ }
+
+ public EdSecretBcpgKey(BigInteger x)
+ {
+ m_x = new MPInteger(x);
+ }
+
+ public string Format => "PGP";
+
+ public override byte[] GetEncoded()
+ {
+ try
+ {
+ return base.GetEncoded();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ public override void Encode(BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteObject(m_x);
+ }
+
+ public BigInteger X => m_x.Value;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdSecretBcpgKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdSecretBcpgKey.cs.meta
new file mode 100644
index 00000000..132a1c9f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/EdSecretBcpgKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2994b77f4235fb245afa99febf1c75f9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalPublicBcpgKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalPublicBcpgKey.cs
new file mode 100644
index 00000000..306ba589
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalPublicBcpgKey.cs
@@ -0,0 +1,75 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for an ElGamal public key.
+ public class ElGamalPublicBcpgKey
+ : BcpgObject, IBcpgKey
+ {
+ internal MPInteger p, g, y;
+
+ public ElGamalPublicBcpgKey(
+ BcpgInputStream bcpgIn)
+ {
+ this.p = new MPInteger(bcpgIn);
+ this.g = new MPInteger(bcpgIn);
+ this.y = new MPInteger(bcpgIn);
+ }
+
+ public ElGamalPublicBcpgKey(
+ BigInteger p,
+ BigInteger g,
+ BigInteger y)
+ {
+ this.p = new MPInteger(p);
+ this.g = new MPInteger(g);
+ this.y = new MPInteger(y);
+ }
+
+ /// The format, as a string, always "PGP".
+ public string Format
+ {
+ get { return "PGP"; }
+ }
+
+ /// Return the standard PGP encoding of the key.
+ public override byte[] GetEncoded()
+ {
+ try
+ {
+ return base.GetEncoded();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ public BigInteger P
+ {
+ get { return p.Value; }
+ }
+
+ public BigInteger G
+ {
+ get { return g.Value; }
+ }
+
+ public BigInteger Y
+ {
+ get { return y.Value; }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteObjects(p, g, y);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalPublicBcpgKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalPublicBcpgKey.cs.meta
new file mode 100644
index 00000000..8834a2d7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalPublicBcpgKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 646b30dce331c0542b449d70077f6efb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalSecretBcpgKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalSecretBcpgKey.cs
new file mode 100644
index 00000000..6c6a3d3e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalSecretBcpgKey.cs
@@ -0,0 +1,65 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for an ElGamal secret key.
+ public class ElGamalSecretBcpgKey
+ : BcpgObject, IBcpgKey
+ {
+ internal MPInteger x;
+
+ /**
+ * @param in
+ */
+ public ElGamalSecretBcpgKey(
+ BcpgInputStream bcpgIn)
+ {
+ this.x = new MPInteger(bcpgIn);
+ }
+
+ /**
+ * @param x
+ */
+ public ElGamalSecretBcpgKey(
+ BigInteger x)
+ {
+ this.x = new MPInteger(x);
+ }
+
+ /// The format, as a string, always "PGP".
+ public string Format
+ {
+ get { return "PGP"; }
+ }
+
+ public BigInteger X
+ {
+ get { return x.Value; }
+ }
+
+ /// Return the standard PGP encoding of the key.
+ public override byte[] GetEncoded()
+ {
+ try
+ {
+ return base.GetEncoded();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteObject(x);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalSecretBcpgKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalSecretBcpgKey.cs.meta
new file mode 100644
index 00000000..874483f8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ElGamalSecretBcpgKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a9388c1980e6b084ea3925333a6f8202
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs
new file mode 100644
index 00000000..84a5c0a1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs
@@ -0,0 +1,42 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic packet for an experimental packet.
+ public class ExperimentalPacket
+ : ContainedPacket //, PublicKeyAlgorithmTag
+ {
+ private readonly PacketTag tag;
+ private readonly byte[] contents;
+
+ internal ExperimentalPacket(
+ PacketTag tag,
+ BcpgInputStream bcpgIn)
+ {
+ this.tag = tag;
+
+ this.contents = bcpgIn.ReadAll();
+ }
+
+ public PacketTag Tag
+ {
+ get { return tag; }
+ }
+
+ public byte[] GetContents()
+ {
+ return (byte[]) contents.Clone();
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WritePacket(tag, contents, true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs.meta
new file mode 100644
index 00000000..d88a0998
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ExperimentalPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9825d8b263536d64a9eedfeacd96fb4c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/HashAlgorithmTags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/HashAlgorithmTags.cs
new file mode 100644
index 00000000..7d953dd7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/HashAlgorithmTags.cs
@@ -0,0 +1,23 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic tags for hash algorithms.
+ public enum HashAlgorithmTag
+ {
+ MD5 = 1, // MD5
+ Sha1 = 2, // SHA-1
+ RipeMD160 = 3, // RIPE-MD/160
+ DoubleSha = 4, // Reserved for double-width SHA (experimental)
+ MD2 = 5, // MD2
+ Tiger192 = 6, // Reserved for TIGER/192
+ Haval5pass160 = 7, // Reserved for HAVAL (5 pass, 160-bit)
+
+ Sha256 = 8, // SHA-256
+ Sha384 = 9, // SHA-384
+ Sha512 = 10, // SHA-512
+ Sha224 = 11, // SHA-224
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/HashAlgorithmTags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/HashAlgorithmTags.cs.meta
new file mode 100644
index 00000000..2163722e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/HashAlgorithmTags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 89f7d4dd018e75449b51a41b8196971c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/IBcpgKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/IBcpgKey.cs
new file mode 100644
index 00000000..bf135a15
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/IBcpgKey.cs
@@ -0,0 +1,20 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base interface for a PGP key.
+ public interface IBcpgKey
+ {
+ ///
+ /// The base format for this key - in the case of the symmetric keys it will generally
+ /// be raw indicating that the key is just a straight byte representation, for an asymmetric
+ /// key the format will be PGP, indicating the key is a string of MPIs encoded in PGP format.
+ ///
+ /// "RAW" or "PGP".
+ string Format { get; }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/IBcpgKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/IBcpgKey.cs.meta
new file mode 100644
index 00000000..c376a80a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/IBcpgKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 08ef0211bbbb6fa43a9303ecd1615b44
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/InputStreamPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/InputStreamPacket.cs
new file mode 100644
index 00000000..f04abe62
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/InputStreamPacket.cs
@@ -0,0 +1,24 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ public class InputStreamPacket
+ : Packet
+ {
+ private readonly BcpgInputStream bcpgIn;
+
+ public InputStreamPacket(
+ BcpgInputStream bcpgIn)
+ {
+ this.bcpgIn = bcpgIn;
+ }
+
+ /// Note: you can only read from this once...
+ public BcpgInputStream GetInputStream()
+ {
+ return bcpgIn;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/InputStreamPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/InputStreamPacket.cs.meta
new file mode 100644
index 00000000..eed2c45d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/InputStreamPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 92d44224faa00ce428599f2d34ebd8cd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/LiteralDataPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/LiteralDataPacket.cs
new file mode 100644
index 00000000..24844437
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/LiteralDataPacket.cs
@@ -0,0 +1,65 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Generic literal data packet.
+ public class LiteralDataPacket
+ : InputStreamPacket
+ {
+ private int format;
+ private byte[] fileName;
+ private long modDate;
+
+ internal LiteralDataPacket(
+ BcpgInputStream bcpgIn)
+ : base(bcpgIn)
+ {
+ format = bcpgIn.ReadByte();
+ int len = bcpgIn.ReadByte();
+
+ fileName = new byte[len];
+ for (int i = 0; i != len; ++i)
+ {
+ int ch = bcpgIn.ReadByte();
+ if (ch < 0)
+ throw new IOException("literal data truncated in header");
+
+ fileName[i] = (byte)ch;
+ }
+
+ modDate = (((uint)bcpgIn.ReadByte() << 24)
+ | ((uint)bcpgIn.ReadByte() << 16)
+ | ((uint)bcpgIn.ReadByte() << 8)
+ | (uint)bcpgIn.ReadByte()) * 1000L;
+ }
+
+ /// The format tag value.
+ public int Format
+ {
+ get { return format; }
+ }
+
+ /// The modification time of the file in milli-seconds (since Jan 1, 1970 UTC)
+ public long ModificationTime
+ {
+ get { return modDate; }
+ }
+
+ public string FileName
+ {
+ get { return Strings.FromUtf8ByteArray(fileName); }
+ }
+
+ public byte[] GetRawFileName()
+ {
+ return Arrays.Clone(fileName);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/LiteralDataPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/LiteralDataPacket.cs.meta
new file mode 100644
index 00000000..5ecc1bed
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/LiteralDataPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a6bfdfd1329a25246b1620d14e42847d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MPInteger.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MPInteger.cs
new file mode 100644
index 00000000..ac43e623
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MPInteger.cs
@@ -0,0 +1,70 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// A multiple precision integer
+ public sealed class MPInteger
+ : BcpgObject
+ {
+ private readonly BigInteger m_val;
+
+ public MPInteger(BcpgInputStream bcpgIn)
+ {
+ if (bcpgIn == null)
+ throw new ArgumentNullException(nameof(bcpgIn));
+
+ int lengthInBits = (bcpgIn.ReadByte() << 8) | bcpgIn.ReadByte();
+ int lengthInBytes = (lengthInBits + 7) / 8;
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ Span bytes = lengthInBytes <= 512
+ ? stackalloc byte[lengthInBytes]
+ : new byte[lengthInBytes];
+#else
+ byte[] bytes = new byte[lengthInBytes];
+#endif
+
+ bcpgIn.ReadFully(bytes);
+ m_val = new BigInteger(1, bytes);
+ }
+
+ public MPInteger(BigInteger val)
+ {
+ if (val == null)
+ throw new ArgumentNullException(nameof(val));
+ if (val.SignValue < 0)
+ throw new ArgumentException("Values must be positive", nameof(val));
+
+ m_val = val;
+ }
+
+ public BigInteger Value => m_val;
+
+ public override void Encode(BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteShort((short)m_val.BitLength);
+ bcpgOut.Write(m_val.ToByteArrayUnsigned());
+ }
+
+ internal static BigInteger ToMpiBigInteger(ECPoint point)
+ {
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ int encodedLength = point.GetEncodedLength(false);
+ Span encoding = encodedLength <= 512
+ ? stackalloc byte[encodedLength]
+ : new byte[encodedLength];
+ point.EncodeTo(false, encoding);
+#else
+ byte[] encoding = point.GetEncoded(false);
+#endif
+ return new BigInteger(1, encoding);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MPInteger.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MPInteger.cs.meta
new file mode 100644
index 00000000..b125ba23
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MPInteger.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 737dcd1ffc625d444b47620d9f795737
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MarkerPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MarkerPacket.cs
new file mode 100644
index 00000000..ed727dd2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MarkerPacket.cs
@@ -0,0 +1,28 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic type for a marker packet.
+ public class MarkerPacket
+ : ContainedPacket
+ {
+ // "PGP"
+ byte[] marker = { (byte)0x50, (byte)0x47, (byte)0x50 };
+
+ public MarkerPacket(
+ BcpgInputStream bcpgIn)
+ {
+ bcpgIn.ReadFully(marker);
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WritePacket(PacketTag.Marker, marker, true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MarkerPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MarkerPacket.cs.meta
new file mode 100644
index 00000000..e47e8a4f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/MarkerPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6e3235a18c73c3a439eb8851044ccd88
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ModDetectionCodePacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ModDetectionCodePacket.cs
new file mode 100644
index 00000000..03df24cf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ModDetectionCodePacket.cs
@@ -0,0 +1,46 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic packet for a modification detection code packet.
+ public class ModDetectionCodePacket
+ : ContainedPacket
+ {
+ private readonly byte[] digest;
+
+ internal ModDetectionCodePacket(
+ BcpgInputStream bcpgIn)
+ {
+ if (bcpgIn == null)
+ throw new ArgumentNullException("bcpgIn");
+
+ this.digest = new byte[20];
+ bcpgIn.ReadFully(this.digest);
+ }
+
+ public ModDetectionCodePacket(
+ byte[] digest)
+ {
+ if (digest == null)
+ throw new ArgumentNullException("digest");
+
+ this.digest = (byte[]) digest.Clone();
+ }
+
+ public byte[] GetDigest()
+ {
+ return (byte[]) digest.Clone();
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WritePacket(PacketTag.ModificationDetectionCode, digest, false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ModDetectionCodePacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ModDetectionCodePacket.cs.meta
new file mode 100644
index 00000000..377afb40
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/ModDetectionCodePacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bf4d8a9df12618e4f8b3c70281158477
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OnePassSignaturePacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OnePassSignaturePacket.cs
new file mode 100644
index 00000000..45b6582c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OnePassSignaturePacket.cs
@@ -0,0 +1,91 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Generic signature object
+ public class OnePassSignaturePacket
+ : ContainedPacket
+ {
+ private int version;
+ private int sigType;
+ private HashAlgorithmTag hashAlgorithm;
+ private PublicKeyAlgorithmTag keyAlgorithm;
+ private long keyId;
+ private int nested;
+
+ internal OnePassSignaturePacket(
+ BcpgInputStream bcpgIn)
+ {
+ version = bcpgIn.ReadByte();
+ sigType = bcpgIn.ReadByte();
+ hashAlgorithm = (HashAlgorithmTag) bcpgIn.ReadByte();
+ keyAlgorithm = (PublicKeyAlgorithmTag) bcpgIn.ReadByte();
+
+ keyId |= (long)bcpgIn.ReadByte() << 56;
+ keyId |= (long)bcpgIn.ReadByte() << 48;
+ keyId |= (long)bcpgIn.ReadByte() << 40;
+ keyId |= (long)bcpgIn.ReadByte() << 32;
+ keyId |= (long)bcpgIn.ReadByte() << 24;
+ keyId |= (long)bcpgIn.ReadByte() << 16;
+ keyId |= (long)bcpgIn.ReadByte() << 8;
+ keyId |= (uint)bcpgIn.ReadByte();
+
+ nested = bcpgIn.ReadByte();
+ }
+
+ public OnePassSignaturePacket(
+ int sigType,
+ HashAlgorithmTag hashAlgorithm,
+ PublicKeyAlgorithmTag keyAlgorithm,
+ long keyId,
+ bool isNested)
+ {
+ this.version = 3;
+ this.sigType = sigType;
+ this.hashAlgorithm = hashAlgorithm;
+ this.keyAlgorithm = keyAlgorithm;
+ this.keyId = keyId;
+ this.nested = (isNested) ? 0 : 1;
+ }
+
+ public int SignatureType
+ {
+ get { return sigType; }
+ }
+
+ /// The encryption algorithm tag.
+ public PublicKeyAlgorithmTag KeyAlgorithm
+ {
+ get { return keyAlgorithm; }
+ }
+
+ /// The hash algorithm tag.
+ public HashAlgorithmTag HashAlgorithm
+ {
+ get { return hashAlgorithm; }
+ }
+
+ public long KeyId
+ {
+ get { return keyId; }
+ }
+
+ public override void Encode(BcpgOutputStream bcpgOut)
+ {
+ MemoryStream bOut = new MemoryStream();
+ using (var pOut = new BcpgOutputStream(bOut))
+ {
+ pOut.Write((byte)version, (byte)sigType, (byte)hashAlgorithm, (byte)keyAlgorithm);
+ pOut.WriteLong(keyId);
+ pOut.WriteByte((byte)nested);
+ }
+
+ bcpgOut.WritePacket(PacketTag.OnePassSignature, bOut.ToArray(), true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OnePassSignaturePacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OnePassSignaturePacket.cs.meta
new file mode 100644
index 00000000..947c2c19
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OnePassSignaturePacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f97afbe97bff78b43bf951a9bef26c8a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OutputStreamPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OutputStreamPacket.cs
new file mode 100644
index 00000000..f32366c9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OutputStreamPacket.cs
@@ -0,0 +1,28 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ public abstract class OutputStreamPacket
+ {
+ private readonly BcpgOutputStream bcpgOut;
+
+ internal OutputStreamPacket(
+ BcpgOutputStream bcpgOut)
+ {
+ if (bcpgOut == null)
+ throw new ArgumentNullException("bcpgOut");
+
+ this.bcpgOut = bcpgOut;
+ }
+
+ public abstract BcpgOutputStream Open();
+
+ public abstract void Close();
+ }
+}
+
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OutputStreamPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OutputStreamPacket.cs.meta
new file mode 100644
index 00000000..c64d7aeb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/OutputStreamPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d6dbe852f2e343d45b606409fd4b9dcb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Packet.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Packet.cs
new file mode 100644
index 00000000..bc751825
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Packet.cs
@@ -0,0 +1,11 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ public class Packet
+ //: PacketTag
+ {
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Packet.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Packet.cs.meta
new file mode 100644
index 00000000..4d155a6d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/Packet.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 80bf5f849e9569745b0273e7afdfb04d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PacketTags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PacketTags.cs
new file mode 100644
index 00000000..c1f56c93
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PacketTags.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic PGP packet tag types.
+ public enum PacketTag
+ {
+ Reserved = 0, // Reserved - a packet tag must not have this value
+ PublicKeyEncryptedSession = 1, // Public-Key Encrypted Session Key Packet
+ Signature = 2, // Signature Packet
+ SymmetricKeyEncryptedSessionKey = 3, // Symmetric-Key Encrypted Session Key Packet
+ OnePassSignature = 4, // One-Pass Signature Packet
+ SecretKey = 5, // Secret Key Packet
+ PublicKey = 6, // Public Key Packet
+ SecretSubkey = 7, // Secret Subkey Packet
+ CompressedData = 8, // Compressed Data Packet
+ SymmetricKeyEncrypted = 9, // Symmetrically Encrypted Data Packet
+ Marker = 10, // Marker Packet
+ LiteralData = 11, // Literal Data Packet
+ Trust = 12, // Trust Packet
+ UserId = 13, // User ID Packet
+ PublicSubkey = 14, // Public Subkey Packet
+ UserAttribute = 17, // User attribute
+ SymmetricEncryptedIntegrityProtected = 18, // Symmetric encrypted, integrity protected
+ ModificationDetectionCode = 19, // Modification detection code
+
+ Experimental1 = 60, // Private or Experimental Values
+ Experimental2 = 61,
+ Experimental3 = 62,
+ Experimental4 = 63
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PacketTags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PacketTags.cs.meta
new file mode 100644
index 00000000..9fb53ada
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PacketTags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 30eb025740057cb45acf3197d4f2006d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyAlgorithmTags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyAlgorithmTags.cs
new file mode 100644
index 00000000..8d5ee3fb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyAlgorithmTags.cs
@@ -0,0 +1,35 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Public Key Algorithm tag numbers.
+ public enum PublicKeyAlgorithmTag
+ {
+ RsaGeneral = 1, // RSA (Encrypt or Sign)
+ RsaEncrypt = 2, // RSA Encrypt-Only
+ RsaSign = 3, // RSA Sign-Only
+ ElGamalEncrypt = 16, // Elgamal (Encrypt-Only), see [ELGAMAL]
+ Dsa = 17, // DSA (Digital Signature Standard)
+ ECDH = 18, // Reserved for Elliptic Curve (actual algorithm name)
+ ECDsa = 19, // Reserved for ECDSA
+ ElGamalGeneral = 20, // Elgamal (Encrypt or Sign)
+ DiffieHellman = 21, // Reserved for Diffie-Hellman (X9.42, as defined for IETF-S/MIME)
+ EdDsa = 22, // EdDSA - (internet draft, but appearing in use)
+
+ Experimental_1 = 100,
+ Experimental_2 = 101,
+ Experimental_3 = 102,
+ Experimental_4 = 103,
+ Experimental_5 = 104,
+ Experimental_6 = 105,
+ Experimental_7 = 106,
+ Experimental_8 = 107,
+ Experimental_9 = 108,
+ Experimental_10 = 109,
+ Experimental_11 = 110,
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyAlgorithmTags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyAlgorithmTags.cs.meta
new file mode 100644
index 00000000..79c9b331
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyAlgorithmTags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c3aaeffc9a873f14ab42a1c9cf9021b9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyEncSessionPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyEncSessionPacket.cs
new file mode 100644
index 00000000..6a3af73c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyEncSessionPacket.cs
@@ -0,0 +1,115 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic packet for a PGP public key.
+ public class PublicKeyEncSessionPacket
+ : ContainedPacket //, PublicKeyAlgorithmTag
+ {
+ private int version;
+ private long keyId;
+ private PublicKeyAlgorithmTag algorithm;
+ private byte[][] data;
+
+ internal PublicKeyEncSessionPacket(
+ BcpgInputStream bcpgIn)
+ {
+ version = bcpgIn.ReadByte();
+
+ keyId |= (long)bcpgIn.ReadByte() << 56;
+ keyId |= (long)bcpgIn.ReadByte() << 48;
+ keyId |= (long)bcpgIn.ReadByte() << 40;
+ keyId |= (long)bcpgIn.ReadByte() << 32;
+ keyId |= (long)bcpgIn.ReadByte() << 24;
+ keyId |= (long)bcpgIn.ReadByte() << 16;
+ keyId |= (long)bcpgIn.ReadByte() << 8;
+ keyId |= (uint)bcpgIn.ReadByte();
+
+ algorithm = (PublicKeyAlgorithmTag) bcpgIn.ReadByte();
+
+ switch ((PublicKeyAlgorithmTag) algorithm)
+ {
+ case PublicKeyAlgorithmTag.RsaEncrypt:
+ case PublicKeyAlgorithmTag.RsaGeneral:
+ data = new byte[][]{ new MPInteger(bcpgIn).GetEncoded() };
+ break;
+ case PublicKeyAlgorithmTag.ElGamalEncrypt:
+ case PublicKeyAlgorithmTag.ElGamalGeneral:
+ MPInteger p = new MPInteger(bcpgIn);
+ MPInteger g = new MPInteger(bcpgIn);
+ data = new byte[][]{
+ p.GetEncoded(),
+ g.GetEncoded(),
+ };
+ break;
+ case PublicKeyAlgorithmTag.ECDH:
+ data = new byte[][]{ Streams.ReadAll(bcpgIn) };
+ break;
+ default:
+ throw new IOException("unknown PGP public key algorithm encountered");
+ }
+ }
+
+ public PublicKeyEncSessionPacket(
+ long keyId,
+ PublicKeyAlgorithmTag algorithm,
+ byte[][] data)
+ {
+ this.version = 3;
+ this.keyId = keyId;
+ this.algorithm = algorithm;
+ this.data = new byte[data.Length][];
+ for (int i = 0; i < data.Length; ++i)
+ {
+ this.data[i] = Arrays.Clone(data[i]);
+ }
+ }
+
+ public int Version
+ {
+ get { return version; }
+ }
+
+ public long KeyId
+ {
+ get { return keyId; }
+ }
+
+ public PublicKeyAlgorithmTag Algorithm
+ {
+ get { return algorithm; }
+ }
+
+ public byte[][] GetEncSessionKey()
+ {
+ return data;
+ }
+
+ public override void Encode(BcpgOutputStream bcpgOut)
+ {
+ MemoryStream bOut = new MemoryStream();
+ using (var pOut = new BcpgOutputStream(bOut))
+ {
+ pOut.WriteByte((byte)version);
+ pOut.WriteLong(keyId);
+ pOut.WriteByte((byte)algorithm);
+
+ for (int i = 0; i < data.Length; ++i)
+ {
+ pOut.Write(data[i]);
+ }
+ }
+
+ bcpgOut.WritePacket(PacketTag.PublicKeyEncryptedSession, bOut.ToArray(), true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyEncSessionPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyEncSessionPacket.cs.meta
new file mode 100644
index 00000000..d39f2ded
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyEncSessionPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: aaf75d3e9e7860b48a6584841d4dfeed
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyPacket.cs
new file mode 100644
index 00000000..00ceb610
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyPacket.cs
@@ -0,0 +1,128 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic packet for a PGP public key.
+ public class PublicKeyPacket
+ : ContainedPacket //, PublicKeyAlgorithmTag
+ {
+ private int version;
+ private long time;
+ private int validDays;
+ private PublicKeyAlgorithmTag algorithm;
+ private IBcpgKey key;
+
+ internal PublicKeyPacket(
+ BcpgInputStream bcpgIn)
+ {
+ version = bcpgIn.ReadByte();
+
+ time = ((uint)bcpgIn.ReadByte() << 24) | ((uint)bcpgIn.ReadByte() << 16)
+ | ((uint)bcpgIn.ReadByte() << 8) | (uint)bcpgIn.ReadByte();
+
+ if (version <= 3)
+ {
+ validDays = (bcpgIn.ReadByte() << 8) | bcpgIn.ReadByte();
+ }
+
+ algorithm = (PublicKeyAlgorithmTag)bcpgIn.ReadByte();
+
+ switch (algorithm)
+ {
+ case PublicKeyAlgorithmTag.RsaEncrypt:
+ case PublicKeyAlgorithmTag.RsaGeneral:
+ case PublicKeyAlgorithmTag.RsaSign:
+ key = new RsaPublicBcpgKey(bcpgIn);
+ break;
+ case PublicKeyAlgorithmTag.Dsa:
+ key = new DsaPublicBcpgKey(bcpgIn);
+ break;
+ case PublicKeyAlgorithmTag.ElGamalEncrypt:
+ case PublicKeyAlgorithmTag.ElGamalGeneral:
+ key = new ElGamalPublicBcpgKey(bcpgIn);
+ break;
+ case PublicKeyAlgorithmTag.ECDH:
+ key = new ECDHPublicBcpgKey(bcpgIn);
+ break;
+ case PublicKeyAlgorithmTag.ECDsa:
+ key = new ECDsaPublicBcpgKey(bcpgIn);
+ break;
+ case PublicKeyAlgorithmTag.EdDsa:
+ key = new EdDsaPublicBcpgKey(bcpgIn);
+ break;
+ default:
+ throw new IOException("unknown PGP public key algorithm encountered");
+ }
+ }
+
+ /// Construct a version 4 public key packet.
+ public PublicKeyPacket(
+ PublicKeyAlgorithmTag algorithm,
+ DateTime time,
+ IBcpgKey key)
+ {
+ this.version = 4;
+ this.time = DateTimeUtilities.DateTimeToUnixMs(time) / 1000L;
+ this.algorithm = algorithm;
+ this.key = key;
+ }
+
+ public virtual int Version
+ {
+ get { return version; }
+ }
+
+ public virtual PublicKeyAlgorithmTag Algorithm
+ {
+ get { return algorithm; }
+ }
+
+ public virtual int ValidDays
+ {
+ get { return validDays; }
+ }
+
+ public virtual DateTime GetTime()
+ {
+ return DateTimeUtilities.UnixMsToDateTime(time * 1000L);
+ }
+
+ public virtual IBcpgKey Key
+ {
+ get { return key; }
+ }
+
+ public virtual byte[] GetEncodedContents()
+ {
+ MemoryStream bOut = new MemoryStream();
+ BcpgOutputStream pOut = new BcpgOutputStream(bOut);
+
+ pOut.WriteByte((byte) version);
+ pOut.WriteInt((int) time);
+
+ if (version <= 3)
+ {
+ pOut.WriteShort((short) validDays);
+ }
+
+ pOut.WriteByte((byte) algorithm);
+
+ pOut.WriteObject((BcpgObject)key);
+
+ return bOut.ToArray();
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WritePacket(PacketTag.PublicKey, GetEncodedContents(), true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyPacket.cs.meta
new file mode 100644
index 00000000..01419017
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicKeyPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3a04c4e2840f831408de91bd773329b1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicSubkeyPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicSubkeyPacket.cs
new file mode 100644
index 00000000..29308cb9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicSubkeyPacket.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic packet for a PGP public subkey
+ public class PublicSubkeyPacket
+ : PublicKeyPacket
+ {
+ internal PublicSubkeyPacket(
+ BcpgInputStream bcpgIn)
+ : base(bcpgIn)
+ {
+ }
+
+ /// Construct a version 4 public subkey packet.
+ public PublicSubkeyPacket(
+ PublicKeyAlgorithmTag algorithm,
+ DateTime time,
+ IBcpgKey key)
+ : base(algorithm, time, key)
+ {
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WritePacket(PacketTag.PublicSubkey, GetEncodedContents(), true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicSubkeyPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicSubkeyPacket.cs.meta
new file mode 100644
index 00000000..416923fe
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/PublicSubkeyPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: db6a16a0801baca45bdfc41795b48d55
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaPublicBcpgKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaPublicBcpgKey.cs
new file mode 100644
index 00000000..da5c2ff2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaPublicBcpgKey.cs
@@ -0,0 +1,70 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for an RSA public key.
+ public class RsaPublicBcpgKey
+ : BcpgObject, IBcpgKey
+ {
+ private readonly MPInteger n, e;
+
+ /// Construct an RSA public key from the passed in stream.
+ public RsaPublicBcpgKey(
+ BcpgInputStream bcpgIn)
+ {
+ this.n = new MPInteger(bcpgIn);
+ this.e = new MPInteger(bcpgIn);
+ }
+
+ /// The modulus.
+ /// The public exponent.
+ public RsaPublicBcpgKey(
+ BigInteger n,
+ BigInteger e)
+ {
+ this.n = new MPInteger(n);
+ this.e = new MPInteger(e);
+ }
+
+ public BigInteger PublicExponent
+ {
+ get { return e.Value; }
+ }
+
+ public BigInteger Modulus
+ {
+ get { return n.Value; }
+ }
+
+ /// The format, as a string, always "PGP".
+ public string Format
+ {
+ get { return "PGP"; }
+ }
+
+ /// Return the standard PGP encoding of the key.
+ public override byte[] GetEncoded()
+ {
+ try
+ {
+ return base.GetEncoded();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteObjects(n, e);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaPublicBcpgKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaPublicBcpgKey.cs.meta
new file mode 100644
index 00000000..327d3455
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaPublicBcpgKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5af2d3c3d0700d74bbf0dd31e59dfe95
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaSecretBcpgKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaSecretBcpgKey.cs
new file mode 100644
index 00000000..3db66df7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaSecretBcpgKey.cs
@@ -0,0 +1,119 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Base class for an RSA secret (or priate) key.
+ public class RsaSecretBcpgKey
+ : BcpgObject, IBcpgKey
+ {
+ private readonly MPInteger d, p, q, u;
+ private readonly BigInteger expP, expQ, crt;
+
+ public RsaSecretBcpgKey(
+ BcpgInputStream bcpgIn)
+ {
+ this.d = new MPInteger(bcpgIn);
+ this.p = new MPInteger(bcpgIn);
+ this.q = new MPInteger(bcpgIn);
+ this.u = new MPInteger(bcpgIn);
+
+ this.expP = d.Value.Remainder(p.Value.Subtract(BigInteger.One));
+ this.expQ = d.Value.Remainder(q.Value.Subtract(BigInteger.One));
+ this.crt = BigIntegers.ModOddInverse(p.Value, q.Value);
+ }
+
+ public RsaSecretBcpgKey(
+ BigInteger d,
+ BigInteger p,
+ BigInteger q)
+ {
+ // PGP requires (p < q)
+ int cmp = p.CompareTo(q);
+ if (cmp >= 0)
+ {
+ if (cmp == 0)
+ throw new ArgumentException("p and q cannot be equal");
+
+ BigInteger tmp = p;
+ p = q;
+ q = tmp;
+ }
+
+ this.d = new MPInteger(d);
+ this.p = new MPInteger(p);
+ this.q = new MPInteger(q);
+ this.u = new MPInteger(BigIntegers.ModOddInverse(q, p));
+
+ this.expP = d.Remainder(p.Subtract(BigInteger.One));
+ this.expQ = d.Remainder(q.Subtract(BigInteger.One));
+ this.crt = BigIntegers.ModOddInverse(p, q);
+ }
+
+ public BigInteger Modulus
+ {
+ get { return p.Value.Multiply(q.Value); }
+ }
+
+ public BigInteger PrivateExponent
+ {
+ get { return d.Value; }
+ }
+
+ public BigInteger PrimeP
+ {
+ get { return p.Value; }
+ }
+
+ public BigInteger PrimeQ
+ {
+ get { return q.Value; }
+ }
+
+ public BigInteger PrimeExponentP
+ {
+ get { return expP; }
+ }
+
+ public BigInteger PrimeExponentQ
+ {
+ get { return expQ; }
+ }
+
+ public BigInteger CrtCoefficient
+ {
+ get { return crt; }
+ }
+
+ /// The format, as a string, always "PGP".
+ public string Format
+ {
+ get { return "PGP"; }
+ }
+
+ /// Return the standard PGP encoding of the key.
+ public override byte[] GetEncoded()
+ {
+ try
+ {
+ return base.GetEncoded();
+ }
+ catch (Exception)
+ {
+ return null;
+ }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteObjects(d, p, q, u);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaSecretBcpgKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaSecretBcpgKey.cs.meta
new file mode 100644
index 00000000..13a77469
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/RsaSecretBcpgKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 663613503a8b47f4aa45ad4be5ad1274
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/S2k.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/S2k.cs
new file mode 100644
index 00000000..a9c0816a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/S2k.cs
@@ -0,0 +1,147 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// The string to key specifier class.
+ public class S2k
+ : BcpgObject
+ {
+ private const int ExpBias = 6;
+
+ public const int Simple = 0;
+ public const int Salted = 1;
+ public const int SaltedAndIterated = 3;
+ public const int GnuDummyS2K = 101;
+ public const int GnuProtectionModeNoPrivateKey = 1;
+ public const int GnuProtectionModeDivertToCard = 2;
+
+ internal int type;
+ internal HashAlgorithmTag algorithm;
+ internal byte[] iv;
+ internal int itCount = -1;
+ internal int protectionMode = -1;
+
+ internal S2k(
+ Stream inStr)
+ {
+ type = inStr.ReadByte();
+ algorithm = (HashAlgorithmTag) inStr.ReadByte();
+
+ //
+ // if this happens we have a dummy-S2k packet.
+ //
+ if (type != GnuDummyS2K)
+ {
+ if (type != 0)
+ {
+ iv = new byte[8];
+ if (Streams.ReadFully(inStr, iv, 0, iv.Length) < iv.Length)
+ throw new EndOfStreamException();
+
+ if (type == 3)
+ {
+ itCount = inStr.ReadByte();
+ }
+ }
+ }
+ else
+ {
+ inStr.ReadByte(); // G
+ inStr.ReadByte(); // N
+ inStr.ReadByte(); // U
+ protectionMode = inStr.ReadByte(); // protection mode
+ }
+ }
+
+ public S2k(
+ HashAlgorithmTag algorithm)
+ {
+ this.type = 0;
+ this.algorithm = algorithm;
+ }
+
+ public S2k(
+ HashAlgorithmTag algorithm,
+ byte[] iv)
+ {
+ this.type = 1;
+ this.algorithm = algorithm;
+ this.iv = iv;
+ }
+
+ public S2k(
+ HashAlgorithmTag algorithm,
+ byte[] iv,
+ int itCount)
+ {
+ this.type = 3;
+ this.algorithm = algorithm;
+ this.iv = iv;
+ this.itCount = itCount;
+ }
+
+ public virtual int Type
+ {
+ get { return type; }
+ }
+
+ /// The hash algorithm.
+ public virtual HashAlgorithmTag HashAlgorithm
+ {
+ get { return algorithm; }
+ }
+
+ /// The IV for the key generation algorithm.
+ public virtual byte[] GetIV()
+ {
+ return Arrays.Clone(iv);
+ }
+
+ /// The iteration count
+ public virtual long IterationCount
+ {
+ get { return (16 + (itCount & 15)) << ((itCount >> 4) + ExpBias); }
+ }
+
+ /// The protection mode - only if GnuDummyS2K
+ public virtual int ProtectionMode
+ {
+ get { return protectionMode; }
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WriteByte((byte) type);
+ bcpgOut.WriteByte((byte) algorithm);
+
+ if (type != GnuDummyS2K)
+ {
+ if (type != 0)
+ {
+ bcpgOut.Write(iv);
+ }
+
+ if (type == 3)
+ {
+ bcpgOut.WriteByte((byte) itCount);
+ }
+ }
+ else
+ {
+ bcpgOut.WriteByte((byte) 'G');
+ bcpgOut.WriteByte((byte) 'N');
+ bcpgOut.WriteByte((byte) 'U');
+ bcpgOut.WriteByte((byte) protectionMode);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/S2k.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/S2k.cs.meta
new file mode 100644
index 00000000..28a67d3e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/S2k.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5622a8ea224edd149aa89c841326803c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretKeyPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretKeyPacket.cs
new file mode 100644
index 00000000..bcd2c341
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretKeyPacket.cs
@@ -0,0 +1,174 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic packet for a PGP secret key.
+ public class SecretKeyPacket
+ : ContainedPacket //, PublicKeyAlgorithmTag
+ {
+ public const int UsageNone = 0x00;
+ public const int UsageChecksum = 0xff;
+ public const int UsageSha1 = 0xfe;
+
+ private PublicKeyPacket pubKeyPacket;
+ private readonly byte[] secKeyData;
+ private int s2kUsage;
+ private SymmetricKeyAlgorithmTag encAlgorithm;
+ private S2k s2k;
+ private byte[] iv;
+
+ internal SecretKeyPacket(
+ BcpgInputStream bcpgIn)
+ {
+ if (this is SecretSubkeyPacket)
+ {
+ pubKeyPacket = new PublicSubkeyPacket(bcpgIn);
+ }
+ else
+ {
+ pubKeyPacket = new PublicKeyPacket(bcpgIn);
+ }
+
+ s2kUsage = bcpgIn.ReadByte();
+
+ if (s2kUsage == UsageChecksum || s2kUsage == UsageSha1)
+ {
+ encAlgorithm = (SymmetricKeyAlgorithmTag) bcpgIn.ReadByte();
+ s2k = new S2k(bcpgIn);
+ }
+ else
+ {
+ encAlgorithm = (SymmetricKeyAlgorithmTag) s2kUsage;
+ }
+
+ if (!(s2k != null && s2k.Type == S2k.GnuDummyS2K && s2k.ProtectionMode == 0x01))
+ {
+ if (s2kUsage != 0)
+ {
+ if (((int) encAlgorithm) < 7)
+ {
+ iv = new byte[8];
+ }
+ else
+ {
+ iv = new byte[16];
+ }
+ bcpgIn.ReadFully(iv);
+ }
+ }
+
+ secKeyData = bcpgIn.ReadAll();
+ }
+
+ public SecretKeyPacket(
+ PublicKeyPacket pubKeyPacket,
+ SymmetricKeyAlgorithmTag encAlgorithm,
+ S2k s2k,
+ byte[] iv,
+ byte[] secKeyData)
+ {
+ this.pubKeyPacket = pubKeyPacket;
+ this.encAlgorithm = encAlgorithm;
+
+ if (encAlgorithm != SymmetricKeyAlgorithmTag.Null)
+ {
+ this.s2kUsage = UsageChecksum;
+ }
+ else
+ {
+ this.s2kUsage = UsageNone;
+ }
+
+ this.s2k = s2k;
+ this.iv = Arrays.Clone(iv);
+ this.secKeyData = secKeyData;
+ }
+
+ public SecretKeyPacket(
+ PublicKeyPacket pubKeyPacket,
+ SymmetricKeyAlgorithmTag encAlgorithm,
+ int s2kUsage,
+ S2k s2k,
+ byte[] iv,
+ byte[] secKeyData)
+ {
+ this.pubKeyPacket = pubKeyPacket;
+ this.encAlgorithm = encAlgorithm;
+ this.s2kUsage = s2kUsage;
+ this.s2k = s2k;
+ this.iv = Arrays.Clone(iv);
+ this.secKeyData = secKeyData;
+ }
+
+ public SymmetricKeyAlgorithmTag EncAlgorithm
+ {
+ get { return encAlgorithm; }
+ }
+
+ public int S2kUsage
+ {
+ get { return s2kUsage; }
+ }
+
+ public byte[] GetIV()
+ {
+ return Arrays.Clone(iv);
+ }
+
+ public S2k S2k
+ {
+ get { return s2k; }
+ }
+
+ public PublicKeyPacket PublicKeyPacket
+ {
+ get { return pubKeyPacket; }
+ }
+
+ public byte[] GetSecretKeyData()
+ {
+ return secKeyData;
+ }
+
+ public byte[] GetEncodedContents()
+ {
+ MemoryStream bOut = new MemoryStream();
+ BcpgOutputStream pOut = new BcpgOutputStream(bOut);
+
+ pOut.Write(pubKeyPacket.GetEncodedContents());
+
+ pOut.WriteByte((byte) s2kUsage);
+
+ if (s2kUsage == UsageChecksum || s2kUsage == UsageSha1)
+ {
+ pOut.WriteByte((byte) encAlgorithm);
+ pOut.WriteObject(s2k);
+ }
+
+ if (iv != null)
+ {
+ pOut.Write(iv);
+ }
+
+ if (secKeyData != null && secKeyData.Length > 0)
+ {
+ pOut.Write(secKeyData);
+ }
+
+ return bOut.ToArray();
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WritePacket(PacketTag.SecretKey, GetEncodedContents(), true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretKeyPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretKeyPacket.cs.meta
new file mode 100644
index 00000000..7d5924e5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretKeyPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c1ae9ad4dbd8e4c419c88ce46a7f58a8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretSubkeyPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretSubkeyPacket.cs
new file mode 100644
index 00000000..0077d35c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretSubkeyPacket.cs
@@ -0,0 +1,47 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic packet for a PGP secret key.
+ public class SecretSubkeyPacket
+ : SecretKeyPacket
+ {
+ internal SecretSubkeyPacket(
+ BcpgInputStream bcpgIn)
+ : base(bcpgIn)
+ {
+ }
+
+ public SecretSubkeyPacket(
+ PublicKeyPacket pubKeyPacket,
+ SymmetricKeyAlgorithmTag encAlgorithm,
+ S2k s2k,
+ byte[] iv,
+ byte[] secKeyData)
+ : base(pubKeyPacket, encAlgorithm, s2k, iv, secKeyData)
+ {
+ }
+
+ public SecretSubkeyPacket(
+ PublicKeyPacket pubKeyPacket,
+ SymmetricKeyAlgorithmTag encAlgorithm,
+ int s2kUsage,
+ S2k s2k,
+ byte[] iv,
+ byte[] secKeyData)
+ : base(pubKeyPacket, encAlgorithm, s2kUsage, s2k, iv, secKeyData)
+ {
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WritePacket(PacketTag.SecretSubkey, GetEncodedContents(), true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretSubkeyPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretSubkeyPacket.cs.meta
new file mode 100644
index 00000000..bc737d7b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SecretSubkeyPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6d6c5dd2f6ba2b54ca9ef9eaf6938d9b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignaturePacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignaturePacket.cs
new file mode 100644
index 00000000..c8008011
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignaturePacket.cs
@@ -0,0 +1,466 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Generic signature packet.
+ public class SignaturePacket
+ : ContainedPacket
+ {
+ private int version;
+ private int signatureType;
+ private long creationTime;
+ private long keyId;
+ private PublicKeyAlgorithmTag keyAlgorithm;
+ private HashAlgorithmTag hashAlgorithm;
+ private MPInteger[] signature;
+ private byte[] fingerprint;
+ private SignatureSubpacket[] hashedData;
+ private SignatureSubpacket[] unhashedData;
+ private byte[] signatureEncoding;
+
+ internal SignaturePacket(
+ BcpgInputStream bcpgIn)
+ {
+ version = bcpgIn.ReadByte();
+
+ if (version == 3 || version == 2)
+ {
+// int l =
+ bcpgIn.ReadByte();
+
+ signatureType = bcpgIn.ReadByte();
+ creationTime = (((long)bcpgIn.ReadByte() << 24) | ((long)bcpgIn.ReadByte() << 16)
+ | ((long)bcpgIn.ReadByte() << 8) | (uint)bcpgIn.ReadByte()) * 1000L;
+
+ keyId |= (long)bcpgIn.ReadByte() << 56;
+ keyId |= (long)bcpgIn.ReadByte() << 48;
+ keyId |= (long)bcpgIn.ReadByte() << 40;
+ keyId |= (long)bcpgIn.ReadByte() << 32;
+ keyId |= (long)bcpgIn.ReadByte() << 24;
+ keyId |= (long)bcpgIn.ReadByte() << 16;
+ keyId |= (long)bcpgIn.ReadByte() << 8;
+ keyId |= (uint)bcpgIn.ReadByte();
+
+ keyAlgorithm = (PublicKeyAlgorithmTag) bcpgIn.ReadByte();
+ hashAlgorithm = (HashAlgorithmTag) bcpgIn.ReadByte();
+ }
+ else if (version == 4)
+ {
+ signatureType = bcpgIn.ReadByte();
+ keyAlgorithm = (PublicKeyAlgorithmTag) bcpgIn.ReadByte();
+ hashAlgorithm = (HashAlgorithmTag) bcpgIn.ReadByte();
+
+ int hashedLength = (bcpgIn.ReadByte() << 8) | bcpgIn.ReadByte();
+ byte[] hashed = new byte[hashedLength];
+
+ bcpgIn.ReadFully(hashed);
+
+ //
+ // read the signature sub packet data.
+ //
+ SignatureSubpacketsParser sIn = new SignatureSubpacketsParser(
+ new MemoryStream(hashed, false));
+
+ var v = new List();
+
+ SignatureSubpacket sub;
+ while ((sub = sIn.ReadPacket()) != null)
+ {
+ v.Add(sub);
+ }
+
+ hashedData = v.ToArray();
+
+ foreach (var p in hashedData)
+ {
+ if (p is IssuerKeyId issuerKeyId)
+ {
+ keyId = issuerKeyId.KeyId;
+ }
+ else if (p is SignatureCreationTime sigCreationTime)
+ {
+ creationTime = DateTimeUtilities.DateTimeToUnixMs(sigCreationTime.GetTime());
+ }
+ }
+
+ int unhashedLength = (bcpgIn.ReadByte() << 8) | bcpgIn.ReadByte();
+ byte[] unhashed = new byte[unhashedLength];
+
+ bcpgIn.ReadFully(unhashed);
+
+ sIn = new SignatureSubpacketsParser(new MemoryStream(unhashed, false));
+
+ v.Clear();
+
+ while ((sub = sIn.ReadPacket()) != null)
+ {
+ v.Add(sub);
+ }
+
+ unhashedData = v.ToArray();
+
+ foreach (var p in unhashedData)
+ {
+ if (p is IssuerKeyId issuerKeyId)
+ {
+ keyId = issuerKeyId.KeyId;
+ }
+ }
+ }
+ else
+ {
+ Streams.Drain(bcpgIn);
+
+ throw new UnsupportedPacketVersionException("unsupported version: " + version);
+ }
+
+ fingerprint = new byte[2];
+ bcpgIn.ReadFully(fingerprint);
+
+ switch (keyAlgorithm)
+ {
+ case PublicKeyAlgorithmTag.RsaGeneral:
+ case PublicKeyAlgorithmTag.RsaSign:
+ MPInteger v = new MPInteger(bcpgIn);
+ signature = new MPInteger[1]{ v };
+ break;
+ case PublicKeyAlgorithmTag.Dsa:
+ MPInteger r = new MPInteger(bcpgIn);
+ MPInteger s = new MPInteger(bcpgIn);
+ signature = new MPInteger[2]{ r, s };
+ break;
+ case PublicKeyAlgorithmTag.ElGamalEncrypt: // yep, this really does happen sometimes.
+ case PublicKeyAlgorithmTag.ElGamalGeneral:
+ MPInteger p = new MPInteger(bcpgIn);
+ MPInteger g = new MPInteger(bcpgIn);
+ MPInteger y = new MPInteger(bcpgIn);
+ signature = new MPInteger[3]{ p, g, y };
+ break;
+ case PublicKeyAlgorithmTag.ECDsa:
+ case PublicKeyAlgorithmTag.EdDsa:
+ MPInteger ecR = new MPInteger(bcpgIn);
+ MPInteger ecS = new MPInteger(bcpgIn);
+ signature = new MPInteger[2]{ ecR, ecS };
+ break;
+ default:
+ if (keyAlgorithm < PublicKeyAlgorithmTag.Experimental_1 || keyAlgorithm > PublicKeyAlgorithmTag.Experimental_11)
+ throw new IOException("unknown signature key algorithm: " + keyAlgorithm);
+
+ signature = null;
+ MemoryStream bOut = new MemoryStream();
+ int ch;
+ while ((ch = bcpgIn.ReadByte()) >= 0)
+ {
+ bOut.WriteByte((byte) ch);
+ }
+ signatureEncoding = bOut.ToArray();
+ break;
+ }
+ }
+
+ /**
+ * Generate a version 4 signature packet.
+ *
+ * @param signatureType
+ * @param keyAlgorithm
+ * @param hashAlgorithm
+ * @param hashedData
+ * @param unhashedData
+ * @param fingerprint
+ * @param signature
+ */
+ public SignaturePacket(
+ int signatureType,
+ long keyId,
+ PublicKeyAlgorithmTag keyAlgorithm,
+ HashAlgorithmTag hashAlgorithm,
+ SignatureSubpacket[] hashedData,
+ SignatureSubpacket[] unhashedData,
+ byte[] fingerprint,
+ MPInteger[] signature)
+ : this(4, signatureType, keyId, keyAlgorithm, hashAlgorithm, hashedData, unhashedData, fingerprint, signature)
+ {
+ }
+
+ /**
+ * Generate a version 2/3 signature packet.
+ *
+ * @param signatureType
+ * @param keyAlgorithm
+ * @param hashAlgorithm
+ * @param fingerprint
+ * @param signature
+ */
+ public SignaturePacket(
+ int version,
+ int signatureType,
+ long keyId,
+ PublicKeyAlgorithmTag keyAlgorithm,
+ HashAlgorithmTag hashAlgorithm,
+ long creationTime,
+ byte[] fingerprint,
+ MPInteger[] signature)
+ : this(version, signatureType, keyId, keyAlgorithm, hashAlgorithm, null, null, fingerprint, signature)
+ {
+ this.creationTime = creationTime;
+ }
+
+ public SignaturePacket(
+ int version,
+ int signatureType,
+ long keyId,
+ PublicKeyAlgorithmTag keyAlgorithm,
+ HashAlgorithmTag hashAlgorithm,
+ SignatureSubpacket[] hashedData,
+ SignatureSubpacket[] unhashedData,
+ byte[] fingerprint,
+ MPInteger[] signature)
+ {
+ this.version = version;
+ this.signatureType = signatureType;
+ this.keyId = keyId;
+ this.keyAlgorithm = keyAlgorithm;
+ this.hashAlgorithm = hashAlgorithm;
+ this.hashedData = hashedData;
+ this.unhashedData = unhashedData;
+ this.fingerprint = fingerprint;
+ this.signature = signature;
+
+ if (hashedData != null)
+ {
+ SetCreationTime();
+ }
+ }
+
+ public int Version
+ {
+ get { return version; }
+ }
+
+ public int SignatureType
+ {
+ get { return signatureType; }
+ }
+
+ /**
+ * return the keyId
+ * @return the keyId that created the signature.
+ */
+ public long KeyId
+ {
+ get { return keyId; }
+ }
+
+ /**
+ * return the signature trailer that must be included with the data
+ * to reconstruct the signature
+ *
+ * @return byte[]
+ */
+ public byte[] GetSignatureTrailer()
+ {
+ if (version == 3)
+ {
+ long time = creationTime / 1000L;
+
+ byte[] trailer = new byte[5];
+ trailer[0] = (byte)signatureType;
+ trailer[1] = (byte)(time >> 24);
+ trailer[2] = (byte)(time >> 16);
+ trailer[3] = (byte)(time >> 8);
+ trailer[4] = (byte)(time );
+ return trailer;
+ }
+
+ MemoryStream sOut = new MemoryStream();
+
+ sOut.WriteByte((byte)Version);
+ sOut.WriteByte((byte)SignatureType);
+ sOut.WriteByte((byte)KeyAlgorithm);
+ sOut.WriteByte((byte)HashAlgorithm);
+
+ // Mark position an reserve two bytes for length
+ long lengthPosition = sOut.Position;
+ sOut.WriteByte(0x00);
+ sOut.WriteByte(0x00);
+
+ SignatureSubpacket[] hashed = GetHashedSubPackets();
+ for (int i = 0; i != hashed.Length; i++)
+ {
+ hashed[i].Encode(sOut);
+ }
+
+ ushort dataLength = Convert.ToUInt16(sOut.Position - lengthPosition - 2);
+ uint hDataLength = Convert.ToUInt32(sOut.Position);
+
+ sOut.WriteByte((byte)Version);
+ sOut.WriteByte(0xff);
+ sOut.WriteByte((byte)(hDataLength >> 24));
+ sOut.WriteByte((byte)(hDataLength >> 16));
+ sOut.WriteByte((byte)(hDataLength >> 8));
+ sOut.WriteByte((byte)(hDataLength ));
+
+ // Reset position and fill in length
+ sOut.Position = lengthPosition;
+ sOut.WriteByte((byte)(dataLength >> 8));
+ sOut.WriteByte((byte)(dataLength ));
+
+ return sOut.ToArray();
+ }
+
+ public PublicKeyAlgorithmTag KeyAlgorithm
+ {
+ get { return keyAlgorithm; }
+ }
+
+ public HashAlgorithmTag HashAlgorithm
+ {
+ get { return hashAlgorithm; }
+ }
+
+ /**
+ * return the signature as a set of integers - note this is normalised to be the
+ * ASN.1 encoding of what appears in the signature packet.
+ */
+ public MPInteger[] GetSignature()
+ {
+ return signature;
+ }
+
+ /**
+ * Return the byte encoding of the signature section.
+ * @return uninterpreted signature bytes.
+ */
+ public byte[] GetSignatureBytes()
+ {
+ if (signatureEncoding != null)
+ {
+ return (byte[]) signatureEncoding.Clone();
+ }
+
+ MemoryStream bOut = new MemoryStream();
+ BcpgOutputStream bcOut = new BcpgOutputStream(bOut);
+
+ foreach (MPInteger sigObj in signature)
+ {
+ try
+ {
+ bcOut.WriteObject(sigObj);
+ }
+ catch (IOException e)
+ {
+ throw new Exception("internal error: " + e);
+ }
+ }
+
+ return bOut.ToArray();
+ }
+
+ public SignatureSubpacket[] GetHashedSubPackets()
+ {
+ return hashedData;
+ }
+
+ public SignatureSubpacket[] GetUnhashedSubPackets()
+ {
+ return unhashedData;
+ }
+
+ /// Return the creation time in milliseconds since 1 Jan., 1970 UTC.
+ public long CreationTime
+ {
+ get { return creationTime; }
+ }
+
+ public override void Encode(BcpgOutputStream bcpgOut)
+ {
+ MemoryStream bOut = new MemoryStream();
+ using (var pOut = new BcpgOutputStream(bOut))
+ {
+ pOut.WriteByte((byte)version);
+
+ if (version == 3 || version == 2)
+ {
+ byte nextBlockLength = 5;
+ pOut.Write(nextBlockLength, (byte)signatureType);
+ pOut.WriteInt((int)(creationTime / 1000L));
+ pOut.WriteLong(keyId);
+ pOut.Write((byte)keyAlgorithm, (byte)hashAlgorithm);
+ }
+ else if (version == 4)
+ {
+ pOut.Write((byte)signatureType, (byte)keyAlgorithm, (byte)hashAlgorithm);
+ EncodeLengthAndData(pOut, GetEncodedSubpackets(hashedData));
+ EncodeLengthAndData(pOut, GetEncodedSubpackets(unhashedData));
+ }
+ else
+ {
+ throw new IOException("unknown version: " + version);
+ }
+
+ pOut.Write(fingerprint);
+
+ if (signature != null)
+ {
+ pOut.WriteObjects(signature);
+ }
+ else
+ {
+ pOut.Write(signatureEncoding);
+ }
+ }
+
+ bcpgOut.WritePacket(PacketTag.Signature, bOut.ToArray(), true);
+ }
+
+ private static void EncodeLengthAndData(
+ BcpgOutputStream pOut,
+ byte[] data)
+ {
+ pOut.WriteShort((short) data.Length);
+ pOut.Write(data);
+ }
+
+ private static byte[] GetEncodedSubpackets(
+ SignatureSubpacket[] ps)
+ {
+ MemoryStream sOut = new MemoryStream();
+
+ foreach (SignatureSubpacket p in ps)
+ {
+ p.Encode(sOut);
+ }
+
+ return sOut.ToArray();
+ }
+
+ private void SetCreationTime()
+ {
+ foreach (SignatureSubpacket p in hashedData)
+ {
+ if (p is SignatureCreationTime signatureCreationTime)
+ {
+ creationTime = DateTimeUtilities.DateTimeToUnixMs(signatureCreationTime.GetTime());
+ break;
+ }
+ }
+ }
+
+ public static SignaturePacket FromByteArray(byte[] data)
+ {
+ BcpgInputStream input = BcpgInputStream.Wrap(new MemoryStream(data));
+
+ return new SignaturePacket(input);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignaturePacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignaturePacket.cs.meta
new file mode 100644
index 00000000..61a3f44d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignaturePacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 01fea7fe290c18b44a44318b802b517e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacket.cs
new file mode 100644
index 00000000..a610e81a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacket.cs
@@ -0,0 +1,119 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic type for a PGP Signature sub-packet.
+ public class SignatureSubpacket
+ {
+ private readonly SignatureSubpacketTag type;
+ private readonly bool critical;
+ private readonly bool isLongLength;
+ internal byte[] data;
+
+ protected internal SignatureSubpacket(
+ SignatureSubpacketTag type,
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ {
+ this.type = type;
+ this.critical = critical;
+ this.isLongLength = isLongLength;
+ this.data = data;
+ }
+
+ public SignatureSubpacketTag SubpacketType
+ {
+ get { return type; }
+ }
+
+ public bool IsCritical()
+ {
+ return critical;
+ }
+
+ public bool IsLongLength()
+ {
+ return isLongLength;
+ }
+
+ /// Return the generic data making up the packet.
+ public byte[] GetData()
+ {
+ return (byte[]) data.Clone();
+ }
+
+ public void Encode(
+ Stream os)
+ {
+ int bodyLen = data.Length + 1;
+
+ if (isLongLength)
+ {
+ os.WriteByte(0xff);
+ os.WriteByte((byte)(bodyLen >> 24));
+ os.WriteByte((byte)(bodyLen >> 16));
+ os.WriteByte((byte)(bodyLen >> 8));
+ os.WriteByte((byte)bodyLen);
+ }
+ else
+ {
+ if (bodyLen < 192)
+ {
+ os.WriteByte((byte)bodyLen);
+ }
+ else if (bodyLen <= 8383)
+ {
+ bodyLen -= 192;
+
+ os.WriteByte((byte)(((bodyLen >> 8) & 0xff) + 192));
+ os.WriteByte((byte)bodyLen);
+ }
+ else
+ {
+ os.WriteByte(0xff);
+ os.WriteByte((byte)(bodyLen >> 24));
+ os.WriteByte((byte)(bodyLen >> 16));
+ os.WriteByte((byte)(bodyLen >> 8));
+ os.WriteByte((byte)bodyLen);
+ }
+ }
+
+ if (critical)
+ {
+ os.WriteByte((byte)(0x80 | (int) type));
+ }
+ else
+ {
+ os.WriteByte((byte) type);
+ }
+
+ os.Write(data, 0, data.Length);
+ }
+
+ public override int GetHashCode()
+ {
+ return (critical ? 1 : 0) + 7 * (int)type + 49 * Arrays.GetHashCode(data);
+ }
+
+ public override bool Equals(object obj)
+ {
+ if (obj == this)
+ return true;
+
+ SignatureSubpacket other = obj as SignatureSubpacket;
+ if (null == other)
+ return false;
+
+ return this.type == other.type
+ && this.critical == other.critical
+ && Arrays.AreEqual(this.data, other.data);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacket.cs.meta
new file mode 100644
index 00000000..def40dfa
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2d4ca6b5e61584a49925b22db4611d5f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketTags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketTags.cs
new file mode 100644
index 00000000..260f5a98
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketTags.cs
@@ -0,0 +1,37 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * Basic PGP signature sub-packet tag types.
+ */
+ public enum SignatureSubpacketTag
+ {
+ CreationTime = 2, // signature creation time
+ ExpireTime = 3, // signature expiration time
+ Exportable = 4, // exportable certification
+ TrustSig = 5, // trust signature
+ RegExp = 6, // regular expression
+ Revocable = 7, // revocable
+ KeyExpireTime = 9, // key expiration time
+ Placeholder = 10, // placeholder for backward compatibility
+ PreferredSymmetricAlgorithms = 11, // preferred symmetric algorithms
+ RevocationKey = 12, // revocation key
+ IssuerKeyId = 16, // issuer key ID
+ NotationData = 20, // notation data
+ PreferredHashAlgorithms = 21, // preferred hash algorithms
+ PreferredCompressionAlgorithms = 22, // preferred compression algorithms
+ KeyServerPreferences = 23, // key server preferences
+ PreferredKeyServer = 24, // preferred key server
+ PrimaryUserId = 25, // primary user id
+ PolicyUrl = 26, // policy URL
+ KeyFlags = 27, // key flags
+ SignerUserId = 28, // signer's user id
+ RevocationReason = 29, // reason for revocation
+ Features = 30, // features
+ SignatureTarget = 31, // signature target
+ EmbeddedSignature = 32 // embedded signature
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketTags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketTags.cs.meta
new file mode 100644
index 00000000..ec618395
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketTags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e4761e1348659584395f45b598fb12a0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketsReader.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketsReader.cs
new file mode 100644
index 00000000..c2ac7451
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketsReader.cs
@@ -0,0 +1,139 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * reader for signature sub-packets
+ */
+ public class SignatureSubpacketsParser
+ {
+ private readonly Stream input;
+
+ public SignatureSubpacketsParser(
+ Stream input)
+ {
+ this.input = input;
+ }
+
+ public SignatureSubpacket ReadPacket()
+ {
+ int l = input.ReadByte();
+ if (l < 0)
+ return null;
+
+ int bodyLen = 0;
+ bool isLongLength = false;
+
+ if (l < 192)
+ {
+ bodyLen = l;
+ }
+ else if (l <= 223)
+ {
+ bodyLen = ((l - 192) << 8) + (input.ReadByte()) + 192;
+ }
+ else if (l == 255)
+ {
+ isLongLength = true;
+ bodyLen = (input.ReadByte() << 24) | (input.ReadByte() << 16)
+ | (input.ReadByte() << 8) | input.ReadByte();
+ }
+ else
+ {
+ throw new IOException("unexpected length header");
+ }
+
+ int tag = input.ReadByte();
+ if (tag < 0)
+ throw new EndOfStreamException("unexpected EOF reading signature sub packet");
+
+ if (bodyLen <= 0)
+ throw new EndOfStreamException("out of range data found in signature sub packet");
+
+ byte[] data = new byte[bodyLen - 1];
+
+ //
+ // this may seem a bit strange but it turns out some applications miscode the length
+ // in fixed length fields, so we check the length we do get, only throwing an exception if
+ // we really cannot continue
+ //
+ int bytesRead = Streams.ReadFully(input, data);
+
+ bool isCritical = ((tag & 0x80) != 0);
+ SignatureSubpacketTag type = (SignatureSubpacketTag)(tag & 0x7f);
+
+ if (bytesRead != data.Length)
+ {
+ switch (type)
+ {
+ case SignatureSubpacketTag.CreationTime:
+ data = CheckData(data, 4, bytesRead, "Signature Creation Time");
+ break;
+ case SignatureSubpacketTag.IssuerKeyId:
+ data = CheckData(data, 8, bytesRead, "Issuer");
+ break;
+ case SignatureSubpacketTag.KeyExpireTime:
+ data = CheckData(data, 4, bytesRead, "Signature Key Expiration Time");
+ break;
+ case SignatureSubpacketTag.ExpireTime:
+ data = CheckData(data, 4, bytesRead, "Signature Expiration Time");
+ break;
+ default:
+ throw new EndOfStreamException("truncated subpacket data.");
+ }
+ }
+
+ switch (type)
+ {
+ case SignatureSubpacketTag.CreationTime:
+ return new SignatureCreationTime(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.KeyExpireTime:
+ return new KeyExpirationTime(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.ExpireTime:
+ return new SignatureExpirationTime(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.Revocable:
+ return new Revocable(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.Exportable:
+ return new Exportable(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.IssuerKeyId:
+ return new IssuerKeyId(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.TrustSig:
+ return new TrustSignature(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.PreferredCompressionAlgorithms:
+ case SignatureSubpacketTag.PreferredHashAlgorithms:
+ case SignatureSubpacketTag.PreferredSymmetricAlgorithms:
+ return new PreferredAlgorithms(type, isCritical, isLongLength, data);
+ case SignatureSubpacketTag.KeyFlags:
+ return new KeyFlags(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.PrimaryUserId:
+ return new PrimaryUserId(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.SignerUserId:
+ return new SignerUserId(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.NotationData:
+ return new NotationData(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.RevocationReason:
+ return new RevocationReason(isCritical, isLongLength, data);
+ case SignatureSubpacketTag.RevocationKey:
+ return new RevocationKey(isCritical, isLongLength, data);
+ }
+ return new SignatureSubpacket(type, isCritical, isLongLength, data);
+ }
+
+ private byte[] CheckData(byte[] data, int expected, int bytesRead, string name)
+ {
+ if (bytesRead != expected)
+ throw new EndOfStreamException("truncated " + name + " subpacket data.");
+
+ return Arrays.CopyOfRange(data, 0, expected);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketsReader.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketsReader.cs.meta
new file mode 100644
index 00000000..57a33cb1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SignatureSubpacketsReader.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1bb70575f3b10d64a96f7e3ba7c0a18b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncDataPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncDataPacket.cs
new file mode 100644
index 00000000..307d6ca0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncDataPacket.cs
@@ -0,0 +1,19 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic type for a symmetric key encrypted packet.
+ public class SymmetricEncDataPacket
+ : InputStreamPacket
+ {
+ public SymmetricEncDataPacket(
+ BcpgInputStream bcpgIn)
+ : base(bcpgIn)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncDataPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncDataPacket.cs.meta
new file mode 100644
index 00000000..44fecb34
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncDataPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a53de8170e2074e42a01b497d0930150
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncIntegrityPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncIntegrityPacket.cs
new file mode 100644
index 00000000..874a4a74
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncIntegrityPacket.cs
@@ -0,0 +1,22 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ public class SymmetricEncIntegrityPacket
+ : InputStreamPacket
+ {
+ internal readonly int version;
+
+ internal SymmetricEncIntegrityPacket(
+ BcpgInputStream bcpgIn)
+ : base(bcpgIn)
+ {
+ version = bcpgIn.ReadByte();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncIntegrityPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncIntegrityPacket.cs.meta
new file mode 100644
index 00000000..7db05539
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricEncIntegrityPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1dee308a32afd3045bb9d8f6d67fcac2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyAlgorithmTags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyAlgorithmTags.cs
new file mode 100644
index 00000000..2c121be1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyAlgorithmTags.cs
@@ -0,0 +1,27 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * Basic tags for symmetric key algorithms
+ */
+ public enum SymmetricKeyAlgorithmTag
+ {
+ Null = 0, // Plaintext or unencrypted data
+ Idea = 1, // IDEA [IDEA]
+ TripleDes = 2, // Triple-DES (DES-EDE, as per spec -168 bit key derived from 192)
+ Cast5 = 3, // Cast5 (128 bit key, as per RFC 2144)
+ Blowfish = 4, // Blowfish (128 bit key, 16 rounds) [Blowfish]
+ Safer = 5, // Safer-SK128 (13 rounds) [Safer]
+ Des = 6, // Reserved for DES/SK
+ Aes128 = 7, // Reserved for AES with 128-bit key
+ Aes192 = 8, // Reserved for AES with 192-bit key
+ Aes256 = 9, // Reserved for AES with 256-bit key
+ Twofish = 10, // Reserved for Twofish
+ Camellia128 = 11, // Reserved for AES with 128-bit key
+ Camellia192 = 12, // Reserved for AES with 192-bit key
+ Camellia256 = 13 // Reserved for AES with 256-bit key
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyAlgorithmTags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyAlgorithmTags.cs.meta
new file mode 100644
index 00000000..db6e8bc3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyAlgorithmTags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 559ac8492fe031947b8d156f323da164
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyEncSessionPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyEncSessionPacket.cs
new file mode 100644
index 00000000..76deae3d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyEncSessionPacket.cs
@@ -0,0 +1,92 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * Basic type for a symmetric encrypted session key packet
+ */
+ public class SymmetricKeyEncSessionPacket
+ : ContainedPacket
+ {
+ private int version;
+ private SymmetricKeyAlgorithmTag encAlgorithm;
+ private S2k s2k;
+ private readonly byte[] secKeyData;
+
+ public SymmetricKeyEncSessionPacket(
+ BcpgInputStream bcpgIn)
+ {
+ version = bcpgIn.ReadByte();
+ encAlgorithm = (SymmetricKeyAlgorithmTag) bcpgIn.ReadByte();
+
+ s2k = new S2k(bcpgIn);
+
+ secKeyData = bcpgIn.ReadAll();
+ }
+
+ public SymmetricKeyEncSessionPacket(
+ SymmetricKeyAlgorithmTag encAlgorithm,
+ S2k s2k,
+ byte[] secKeyData)
+ {
+ this.version = 4;
+ this.encAlgorithm = encAlgorithm;
+ this.s2k = s2k;
+ this.secKeyData = secKeyData;
+ }
+
+ /**
+ * @return int
+ */
+ public SymmetricKeyAlgorithmTag EncAlgorithm
+ {
+ get { return encAlgorithm; }
+ }
+
+ /**
+ * @return S2k
+ */
+ public S2k S2k
+ {
+ get { return s2k; }
+ }
+
+ /**
+ * @return byte[]
+ */
+ public byte[] GetSecKeyData()
+ {
+ return secKeyData;
+ }
+
+ /**
+ * @return int
+ */
+ public int Version
+ {
+ get { return version; }
+ }
+
+ public override void Encode(BcpgOutputStream bcpgOut)
+ {
+ MemoryStream bOut = new MemoryStream();
+ using (var pOut = new BcpgOutputStream(bOut))
+ {
+ pOut.Write((byte)version, (byte)encAlgorithm);
+ pOut.WriteObject(s2k);
+
+ if (secKeyData != null && secKeyData.Length > 0)
+ {
+ pOut.Write(secKeyData);
+ }
+ }
+
+ bcpgOut.WritePacket(PacketTag.SymmetricKeyEncryptedSessionKey, bOut.ToArray(), true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyEncSessionPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyEncSessionPacket.cs.meta
new file mode 100644
index 00000000..19791886
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/SymmetricKeyEncSessionPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3eda3480061c500408c28492110bf9f2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/TrustPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/TrustPacket.cs
new file mode 100644
index 00000000..43f04bd0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/TrustPacket.cs
@@ -0,0 +1,47 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /// Basic type for a trust packet.
+ public class TrustPacket
+ : ContainedPacket
+ {
+ private readonly byte[] levelAndTrustAmount;
+
+ public TrustPacket(
+ BcpgInputStream bcpgIn)
+ {
+ MemoryStream bOut = new MemoryStream();
+
+ int ch;
+ while ((ch = bcpgIn.ReadByte()) >= 0)
+ {
+ bOut.WriteByte((byte) ch);
+ }
+
+ levelAndTrustAmount = bOut.ToArray();
+ }
+
+ public TrustPacket(
+ int trustCode)
+ {
+ this.levelAndTrustAmount = new byte[]{ (byte) trustCode };
+ }
+
+ public byte[] GetLevelAndTrustAmount()
+ {
+ return (byte[]) levelAndTrustAmount.Clone();
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WritePacket(PacketTag.Trust, levelAndTrustAmount, true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/TrustPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/TrustPacket.cs.meta
new file mode 100644
index 00000000..6557aa9a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/TrustPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 35d75de07bce12c4dbaaccfa0286cea2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UnsupportedPacketVersionException.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UnsupportedPacketVersionException.cs
new file mode 100644
index 00000000..f1f3bf21
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UnsupportedPacketVersionException.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Runtime.Serialization;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ [Serializable]
+ public class UnsupportedPacketVersionException
+ : Exception
+ {
+ public UnsupportedPacketVersionException()
+ : base()
+ {
+ }
+
+ public UnsupportedPacketVersionException(string message)
+ : base(message)
+ {
+ }
+
+ public UnsupportedPacketVersionException(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ }
+
+ protected UnsupportedPacketVersionException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UnsupportedPacketVersionException.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UnsupportedPacketVersionException.cs.meta
new file mode 100644
index 00000000..84675491
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UnsupportedPacketVersionException.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a7673f24a0a7b96449cbed2749525aa0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributePacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributePacket.cs
new file mode 100644
index 00000000..829dcbbd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributePacket.cs
@@ -0,0 +1,57 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.Collections.Generic;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * Basic type for a user attribute packet.
+ */
+ public class UserAttributePacket
+ : ContainedPacket
+ {
+ private readonly UserAttributeSubpacket[] subpackets;
+
+ public UserAttributePacket(
+ BcpgInputStream bcpgIn)
+ {
+ UserAttributeSubpacketsParser sIn = new UserAttributeSubpacketsParser(bcpgIn);
+ UserAttributeSubpacket sub;
+
+ var v = new List();
+ while ((sub = sIn.ReadPacket()) != null)
+ {
+ v.Add(sub);
+ }
+
+ subpackets = v.ToArray();
+ }
+
+ public UserAttributePacket(
+ UserAttributeSubpacket[] subpackets)
+ {
+ this.subpackets = subpackets;
+ }
+
+ public UserAttributeSubpacket[] GetSubpackets()
+ {
+ return subpackets;
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ MemoryStream bOut = new MemoryStream();
+
+ for (int i = 0; i != subpackets.Length; i++)
+ {
+ subpackets[i].Encode(bOut);
+ }
+
+ bcpgOut.WritePacket(PacketTag.UserAttribute, bOut.ToArray(), false);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributePacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributePacket.cs.meta
new file mode 100644
index 00000000..52d1cf6f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributePacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f196fde1153e6ce4d9ed71483d5badb1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacket.cs
new file mode 100644
index 00000000..cc14b632
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacket.cs
@@ -0,0 +1,94 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * Basic type for a user attribute sub-packet.
+ */
+ public class UserAttributeSubpacket
+ {
+ internal readonly UserAttributeSubpacketTag type;
+ private readonly bool longLength; // we preserve this as not everyone encodes length properly.
+ protected readonly byte[] data;
+
+ protected internal UserAttributeSubpacket(UserAttributeSubpacketTag type, byte[] data)
+ : this(type, false, data)
+ {
+ }
+
+ protected internal UserAttributeSubpacket(UserAttributeSubpacketTag type, bool forceLongLength, byte[] data)
+ {
+ this.type = type;
+ this.longLength = forceLongLength;
+ this.data = data;
+ }
+
+ public virtual UserAttributeSubpacketTag SubpacketType
+ {
+ get { return type; }
+ }
+
+ /**
+ * return the generic data making up the packet.
+ */
+ public virtual byte[] GetData()
+ {
+ return data;
+ }
+
+ public virtual void Encode(Stream os)
+ {
+ int bodyLen = data.Length + 1;
+
+ if (bodyLen < 192 && !longLength)
+ {
+ os.WriteByte((byte)bodyLen);
+ }
+ else if (bodyLen <= 8383 && !longLength)
+ {
+ bodyLen -= 192;
+
+ os.WriteByte((byte)(((bodyLen >> 8) & 0xff) + 192));
+ os.WriteByte((byte)bodyLen);
+ }
+ else
+ {
+ os.WriteByte(0xff);
+ os.WriteByte((byte)(bodyLen >> 24));
+ os.WriteByte((byte)(bodyLen >> 16));
+ os.WriteByte((byte)(bodyLen >> 8));
+ os.WriteByte((byte)bodyLen);
+ }
+
+ os.WriteByte((byte) type);
+ os.Write(data, 0, data.Length);
+ }
+
+ public override bool Equals(
+ object obj)
+ {
+ if (obj == this)
+ return true;
+
+ UserAttributeSubpacket other = obj as UserAttributeSubpacket;
+
+ if (other == null)
+ return false;
+
+ return type == other.type
+ && Arrays.AreEqual(data, other.data);
+ }
+
+ public override int GetHashCode()
+ {
+ return type.GetHashCode() ^ Arrays.GetHashCode(data);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacket.cs.meta
new file mode 100644
index 00000000..c7a65a10
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 05f1693521fe2e9478a664609ddc18d3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketTags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketTags.cs
new file mode 100644
index 00000000..0b084f99
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketTags.cs
@@ -0,0 +1,14 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * Basic PGP user attribute sub-packet tag types.
+ */
+ public enum UserAttributeSubpacketTag
+ {
+ ImageAttribute = 1
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketTags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketTags.cs.meta
new file mode 100644
index 00000000..0e65e186
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketTags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d123c060383f9cc48af34adcdebf375b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketsReader.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketsReader.cs
new file mode 100644
index 00000000..d0e4b9fd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketsReader.cs
@@ -0,0 +1,69 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Attr;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * reader for user attribute sub-packets
+ */
+ public class UserAttributeSubpacketsParser
+ {
+ private readonly Stream input;
+
+ public UserAttributeSubpacketsParser(
+ Stream input)
+ {
+ this.input = input;
+ }
+
+ public virtual UserAttributeSubpacket ReadPacket()
+ {
+ int l = input.ReadByte();
+ if (l < 0)
+ return null;
+
+ int bodyLen = 0;
+ bool longLength = false;
+ if (l < 192)
+ {
+ bodyLen = l;
+ }
+ else if (l <= 223)
+ {
+ bodyLen = ((l - 192) << 8) + (input.ReadByte()) + 192;
+ }
+ else if (l == 255)
+ {
+ bodyLen = (input.ReadByte() << 24) | (input.ReadByte() << 16)
+ | (input.ReadByte() << 8) | input.ReadByte();
+ longLength = true;
+ }
+ else
+ {
+ throw new IOException("unrecognised length reading user attribute sub packet");
+ }
+
+ int tag = input.ReadByte();
+ if (tag < 0)
+ throw new EndOfStreamException("unexpected EOF reading user attribute sub packet");
+
+ byte[] data = new byte[bodyLen - 1];
+ if (Streams.ReadFully(input, data) < data.Length)
+ throw new EndOfStreamException();
+
+ UserAttributeSubpacketTag type = (UserAttributeSubpacketTag) tag;
+ switch (type)
+ {
+ case UserAttributeSubpacketTag.ImageAttribute:
+ return new ImageAttrib(longLength, data);
+ }
+ return new UserAttributeSubpacket(type, longLength, data);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketsReader.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketsReader.cs.meta
new file mode 100644
index 00000000..3344c241
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserAttributeSubpacketsReader.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 61f1b231b7fcc9641b148b386ca02927
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserIdPacket.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserIdPacket.cs
new file mode 100644
index 00000000..84c799f3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserIdPacket.cs
@@ -0,0 +1,41 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ /**
+ * Basic type for a user ID packet.
+ */
+ public class UserIdPacket
+ : ContainedPacket
+ {
+ private readonly byte[] idData;
+
+ public UserIdPacket(
+ BcpgInputStream bcpgIn)
+ {
+ this.idData = bcpgIn.ReadAll();
+ }
+
+ public UserIdPacket(
+ string id)
+ {
+ this.idData = Encoding.UTF8.GetBytes(id);
+ }
+
+ public string GetId()
+ {
+ return Encoding.UTF8.GetString(idData, 0, idData.Length);
+ }
+
+ public override void Encode(
+ BcpgOutputStream bcpgOut)
+ {
+ bcpgOut.WritePacket(PacketTag.UserId, idData, true);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserIdPacket.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserIdPacket.cs.meta
new file mode 100644
index 00000000..088fa85f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/UserIdPacket.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 25f95cc8864f6e04188a279b78a44f39
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr.meta
new file mode 100644
index 00000000..037f3f82
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8a2eb9bf6275a5a4d92c84a3a3e1d676
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr/ImageAttrib.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr/ImageAttrib.cs
new file mode 100644
index 00000000..c2c959ed
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr/ImageAttrib.cs
@@ -0,0 +1,76 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Attr
+{
+ /// Basic type for a image attribute packet.
+ public class ImageAttrib
+ : UserAttributeSubpacket
+ {
+ public enum Format : byte
+ {
+ Jpeg = 1
+ }
+
+ private static readonly byte[] Zeroes = new byte[12];
+
+ private int hdrLength;
+ private int _version;
+ private int _encoding;
+ private byte[] imageData;
+
+ public ImageAttrib(byte[] data)
+ : this(false, data)
+ {
+ }
+
+ public ImageAttrib(bool forceLongLength, byte[] data)
+ : base(UserAttributeSubpacketTag.ImageAttribute, forceLongLength, data)
+ {
+ hdrLength = ((data[1] & 0xff) << 8) | (data[0] & 0xff);
+ _version = data[2] & 0xff;
+ _encoding = data[3] & 0xff;
+
+ imageData = new byte[data.Length - hdrLength];
+ Array.Copy(data, hdrLength, imageData, 0, imageData.Length);
+ }
+
+ public ImageAttrib(
+ Format imageType,
+ byte[] imageData)
+ : this(ToByteArray(imageType, imageData))
+ {
+ }
+
+ private static byte[] ToByteArray(
+ Format imageType,
+ byte[] imageData)
+ {
+ MemoryStream bOut = new MemoryStream();
+ bOut.WriteByte(0x10); bOut.WriteByte(0x00); bOut.WriteByte(0x01);
+ bOut.WriteByte((byte) imageType);
+ bOut.Write(Zeroes, 0, Zeroes.Length);
+ bOut.Write(imageData, 0, imageData.Length);
+ return bOut.ToArray();
+ }
+
+ public virtual int Version
+ {
+ get { return _version; }
+ }
+
+ public virtual int Encoding
+ {
+ get { return _encoding; }
+ }
+
+ public virtual byte[] GetImageData()
+ {
+ return imageData;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr/ImageAttrib.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr/ImageAttrib.cs.meta
new file mode 100644
index 00000000..996aee2a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/attr/ImageAttrib.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 69861bbe2f76e164e92119b90586e67f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig.meta
new file mode 100644
index 00000000..496488f7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e817b1e6d6079c9438c31bf392d37b86
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/EmbeddedSignature.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/EmbeddedSignature.cs
new file mode 100644
index 00000000..4b126837
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/EmbeddedSignature.cs
@@ -0,0 +1,23 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * Packet embedded signature
+ */
+ public class EmbeddedSignature
+ : SignatureSubpacket
+ {
+ public EmbeddedSignature(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.EmbeddedSignature, critical, isLongLength, data)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/EmbeddedSignature.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/EmbeddedSignature.cs.meta
new file mode 100644
index 00000000..8ce0e50e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/EmbeddedSignature.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 826ff03cd85cf9e48ae06cb9dc9aff70
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Exportable.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Exportable.cs
new file mode 100644
index 00000000..2ee4ee19
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Exportable.cs
@@ -0,0 +1,40 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving signature creation time.
+ */
+ public class Exportable
+ : SignatureSubpacket
+ {
+ private static byte[] BooleanToByteArray(bool val)
+ {
+ return new byte[1]{ Convert.ToByte(val) };
+ }
+
+ public Exportable(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.Exportable, critical, isLongLength, data)
+ {
+ }
+
+ public Exportable(
+ bool critical,
+ bool isExportable)
+ : base(SignatureSubpacketTag.Exportable, critical, false, BooleanToByteArray(isExportable))
+ {
+ }
+
+ public bool IsExportable()
+ {
+ return data[0] != 0;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Exportable.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Exportable.cs.meta
new file mode 100644
index 00000000..78230b8d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Exportable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 581fe417e1b5a0a45ac67acb2e0efecd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Features.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Features.cs
new file mode 100644
index 00000000..b8498481
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Features.cs
@@ -0,0 +1,63 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving signature expiration time.
+ */
+ public class Features
+ : SignatureSubpacket
+ {
+ /** Identifier for the Modification Detection (packets 18 and 19) */
+ public static readonly byte FEATURE_MODIFICATION_DETECTION = 0x01;
+ /** Identifier for the AEAD Encrypted Data Packet (packet 20) and version 5
+ Symmetric-Key Encrypted Session Key Packets (packet 3) */
+ public static readonly byte FEATURE_AEAD_ENCRYPTED_DATA = 0x02;
+ /** Identifier for the Version 5 Public-Key Packet format and corresponding new
+ fingerprint format */
+ public static readonly byte FEATURE_VERSION_5_PUBLIC_KEY = 0x04;
+
+ private static byte[] FeatureToByteArray(byte feature)
+ {
+ return new byte[1]{ feature };
+ }
+
+ public Features(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.Features, critical, isLongLength, data)
+ {
+ }
+
+ public Features(bool critical, byte features): this(critical, false, FeatureToByteArray(features))
+ {
+ }
+
+ public Features(bool critical, int features): this(critical, false, FeatureToByteArray((byte)features))
+ {
+ }
+
+ /**
+ * Returns if modification detection is supported.
+ */
+ public bool SupportsModificationDetection
+ {
+ get { return SupportsFeature(FEATURE_MODIFICATION_DETECTION); }
+ }
+
+ /**
+ * Returns if a particular feature is supported.
+ */
+ public bool SupportsFeature(byte feature)
+ {
+ return (data[0] & feature) != 0;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Features.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Features.cs.meta
new file mode 100644
index 00000000..612cad61
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Features.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2696c28036ba71a44a5bd4b7c8a9a4d2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/IssuerKeyId.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/IssuerKeyId.cs
new file mode 100644
index 00000000..0fe23a2a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/IssuerKeyId.cs
@@ -0,0 +1,37 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving signature creation time.
+ */
+ public class IssuerKeyId
+ : SignatureSubpacket
+ {
+ protected static byte[] KeyIdToBytes(long keyId)
+ {
+ return Pack.UInt64_To_BE((ulong)keyId);
+ }
+
+ public IssuerKeyId(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.IssuerKeyId, critical, isLongLength, data)
+ {
+ }
+
+ public IssuerKeyId(
+ bool critical,
+ long keyId)
+ : base(SignatureSubpacketTag.IssuerKeyId, critical, false, KeyIdToBytes(keyId))
+ {
+ }
+
+ public long KeyId => (long)Pack.BE_To_UInt64(data);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/IssuerKeyId.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/IssuerKeyId.cs.meta
new file mode 100644
index 00000000..c1ad0dd0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/IssuerKeyId.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 694260a3c3a2414409ca33e092da7b6a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyExpirationTime.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyExpirationTime.cs
new file mode 100644
index 00000000..36a3a4bd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyExpirationTime.cs
@@ -0,0 +1,42 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving time after creation at which the key expires.
+ */
+ public class KeyExpirationTime
+ : SignatureSubpacket
+ {
+ protected static byte[] TimeToBytes(long t)
+ {
+ return Pack.UInt32_To_BE((uint)t);
+ }
+
+ public KeyExpirationTime(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.KeyExpireTime, critical, isLongLength, data)
+ {
+ }
+
+ public KeyExpirationTime(
+ bool critical,
+ long seconds)
+ : base(SignatureSubpacketTag.KeyExpireTime, critical, false, TimeToBytes(seconds))
+ {
+ }
+
+ /**
+ * Return the number of seconds after creation time a key is valid for.
+ *
+ * @return second count for key validity.
+ */
+ public long Time => (long)Pack.BE_To_UInt32(data);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyExpirationTime.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyExpirationTime.cs.meta
new file mode 100644
index 00000000..22bef7b0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyExpirationTime.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5549f1242cf947640b8fb17e7a0be5f0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyFlags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyFlags.cs
new file mode 100644
index 00000000..72be5b7e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyFlags.cs
@@ -0,0 +1,79 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * Packet holding the key flag values.
+ */
+ public class KeyFlags
+ : SignatureSubpacket
+ {
+ public const int CertifyOther = 0x01;
+ public const int SignData = 0x02;
+ public const int EncryptComms = 0x04;
+ public const int EncryptStorage = 0x08;
+ public const int Split = 0x10;
+ public const int Authentication = 0x20;
+ public const int Shared = 0x80;
+
+ private static byte[] IntToByteArray(
+ int v)
+ {
+ byte[] tmp = new byte[4];
+ int size = 0;
+
+ for (int i = 0; i != 4; i++)
+ {
+ tmp[i] = (byte)(v >> (i * 8));
+ if (tmp[i] != 0)
+ {
+ size = i;
+ }
+ }
+
+ byte[] data = new byte[size + 1];
+ Array.Copy(tmp, 0, data, 0, data.Length);
+ return data;
+ }
+
+ public KeyFlags(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.KeyFlags, critical, isLongLength, data)
+ {
+ }
+
+ public KeyFlags(
+ bool critical,
+ int flags)
+ : base(SignatureSubpacketTag.KeyFlags, critical, false, IntToByteArray(flags))
+ {
+ }
+
+ ///
+ /// Return the flag values contained in the first 4 octets (note: at the moment
+ /// the standard only uses the first one).
+ ///
+ public int Flags
+ {
+ get
+ {
+ int flags = 0;
+
+ for (int i = 0; i != data.Length; i++)
+ {
+ flags |= (data[i] & 0xff) << (i * 8);
+ }
+
+ return flags;
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyFlags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyFlags.cs.meta
new file mode 100644
index 00000000..e4926d4b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/KeyFlags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6e84bad17972773488dbe07547a99912
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/NotationData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/NotationData.cs
new file mode 100644
index 00000000..fec7c546
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/NotationData.cs
@@ -0,0 +1,117 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+using System.Text;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * Class provided a NotationData object according to
+ * RFC2440, Chapter 5.2.3.15. Notation Data
+ */
+ public class NotationData
+ : SignatureSubpacket
+ {
+ public const int HeaderFlagLength = 4;
+ public const int HeaderNameLength = 2;
+ public const int HeaderValueLength = 2;
+
+ public NotationData(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.NotationData, critical, isLongLength, data)
+ {
+ }
+
+ public NotationData(
+ bool critical,
+ bool humanReadable,
+ string notationName,
+ string notationValue)
+ : base(SignatureSubpacketTag.NotationData, critical, false,
+ CreateData(humanReadable, notationName, notationValue))
+ {
+ }
+
+ private static byte[] CreateData(
+ bool humanReadable,
+ string notationName,
+ string notationValue)
+ {
+ MemoryStream os = new MemoryStream();
+
+ // (4 octets of flags, 2 octets of name length (M),
+ // 2 octets of value length (N),
+ // M octets of name data,
+ // N octets of value data)
+
+ // flags
+ os.WriteByte(humanReadable ? (byte)0x80 : (byte)0x00);
+ os.WriteByte(0x0);
+ os.WriteByte(0x0);
+ os.WriteByte(0x0);
+
+ byte[] nameData, valueData = null;
+ int nameLength, valueLength;
+
+ nameData = Encoding.UTF8.GetBytes(notationName);
+ nameLength = System.Math.Min(nameData.Length, 0xFF);
+
+ valueData = Encoding.UTF8.GetBytes(notationValue);
+ valueLength = System.Math.Min(valueData.Length, 0xFF);
+
+ // name length
+ os.WriteByte((byte)(nameLength >> 8));
+ os.WriteByte((byte)(nameLength >> 0));
+
+ // value length
+ os.WriteByte((byte)(valueLength >> 8));
+ os.WriteByte((byte)(valueLength >> 0));
+
+ // name
+ os.Write(nameData, 0, nameLength);
+
+ // value
+ os.Write(valueData, 0, valueLength);
+
+ return os.ToArray();
+ }
+
+ public bool IsHumanReadable
+ {
+ get { return data[0] == 0x80; }
+ }
+
+ public string GetNotationName()
+ {
+ int nameLength = ((data[HeaderFlagLength] << 8) + (data[HeaderFlagLength + 1] << 0));
+ int namePos = HeaderFlagLength + HeaderNameLength + HeaderValueLength;
+
+ return Encoding.UTF8.GetString(data, namePos, nameLength);
+ }
+
+ public string GetNotationValue()
+ {
+ int nameLength = ((data[HeaderFlagLength] << 8) + (data[HeaderFlagLength + 1] << 0));
+ int valueLength = ((data[HeaderFlagLength + HeaderNameLength] << 8) + (data[HeaderFlagLength + HeaderNameLength + 1] << 0));
+ int valuePos = HeaderFlagLength + HeaderNameLength + HeaderValueLength + nameLength;
+
+ return Encoding.UTF8.GetString(data, valuePos, valueLength);
+ }
+
+ public byte[] GetNotationValueBytes()
+ {
+ int nameLength = ((data[HeaderFlagLength] << 8) + (data[HeaderFlagLength + 1] << 0));
+ int valueLength = ((data[HeaderFlagLength + HeaderNameLength] << 8) + (data[HeaderFlagLength + HeaderNameLength + 1] << 0));
+ int valuePos = HeaderFlagLength + HeaderNameLength + HeaderValueLength + nameLength;
+
+ byte[] bytes = new byte[valueLength];
+ Array.Copy(data, valuePos, bytes, 0, valueLength);
+ return bytes;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/NotationData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/NotationData.cs.meta
new file mode 100644
index 00000000..3bf50ec1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/NotationData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 81ad0e2ea94abef40a6e574dfbe58cb5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PreferredAlgorithms.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PreferredAlgorithms.cs
new file mode 100644
index 00000000..d4c9b6cf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PreferredAlgorithms.cs
@@ -0,0 +1,57 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving signature creation time.
+ */
+ public class PreferredAlgorithms
+ : SignatureSubpacket
+ {
+ private static byte[] IntToByteArray(
+ int[] v)
+ {
+ byte[] data = new byte[v.Length];
+
+ for (int i = 0; i != v.Length; i++)
+ {
+ data[i] = (byte)v[i];
+ }
+
+ return data;
+ }
+
+ public PreferredAlgorithms(
+ SignatureSubpacketTag type,
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(type, critical, isLongLength, data)
+ {
+ }
+
+ public PreferredAlgorithms(
+ SignatureSubpacketTag type,
+ bool critical,
+ int[] preferences)
+ : base(type, critical, false, IntToByteArray(preferences))
+ {
+ }
+
+ public int[] GetPreferences()
+ {
+ int[] v = new int[data.Length];
+
+ for (int i = 0; i != v.Length; i++)
+ {
+ v[i] = data[i] & 0xff;
+ }
+
+ return v;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PreferredAlgorithms.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PreferredAlgorithms.cs.meta
new file mode 100644
index 00000000..d9e784e1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PreferredAlgorithms.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7ff240d30792bb948baa99025e3a8e45
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PrimaryUserId.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PrimaryUserId.cs
new file mode 100644
index 00000000..ae411d70
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PrimaryUserId.cs
@@ -0,0 +1,40 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving whether or not the signature is signed using the primary user ID for the key.
+ */
+ public class PrimaryUserId
+ : SignatureSubpacket
+ {
+ private static byte[] BooleanToByteArray(bool val)
+ {
+ return new byte[1]{ Convert.ToByte(val) };
+ }
+
+ public PrimaryUserId(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.PrimaryUserId, critical, isLongLength, data)
+ {
+ }
+
+ public PrimaryUserId(
+ bool critical,
+ bool isPrimaryUserId)
+ : base(SignatureSubpacketTag.PrimaryUserId, critical, false, BooleanToByteArray(isPrimaryUserId))
+ {
+ }
+
+ public bool IsPrimaryUserId()
+ {
+ return data[0] != 0;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PrimaryUserId.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PrimaryUserId.cs.meta
new file mode 100644
index 00000000..d6decfb2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/PrimaryUserId.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 02f54dbba8c88794cac57757f58388d5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Revocable.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Revocable.cs
new file mode 100644
index 00000000..1fd103f4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Revocable.cs
@@ -0,0 +1,40 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving whether or not is revocable.
+ */
+ public class Revocable
+ : SignatureSubpacket
+ {
+ private static byte[] BooleanToByteArray(bool value)
+ {
+ return new byte[1]{ Convert.ToByte(value) };
+ }
+
+ public Revocable(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.Revocable, critical, isLongLength, data)
+ {
+ }
+
+ public Revocable(
+ bool critical,
+ bool isRevocable)
+ : base(SignatureSubpacketTag.Revocable, critical, false, BooleanToByteArray(isRevocable))
+ {
+ }
+
+ public bool IsRevocable()
+ {
+ return data[0] != 0;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Revocable.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Revocable.cs.meta
new file mode 100644
index 00000000..b2490a6d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/Revocable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d1c5e4322da8e984d8ceddeadafde509
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKey.cs
new file mode 100644
index 00000000..fd3e6e42
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKey.cs
@@ -0,0 +1,67 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ ///
+ /// Represents revocation key OpenPGP signature sub packet.
+ ///
+ public class RevocationKey
+ : SignatureSubpacket
+ {
+ // 1 octet of class,
+ // 1 octet of public-key algorithm ID,
+ // 20 octets of fingerprint
+ public RevocationKey(
+ bool isCritical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.RevocationKey, isCritical, isLongLength, data)
+ {
+ }
+
+ public RevocationKey(
+ bool isCritical,
+ RevocationKeyTag signatureClass,
+ PublicKeyAlgorithmTag keyAlgorithm,
+ byte[] fingerprint)
+ : base(SignatureSubpacketTag.RevocationKey, isCritical, false,
+ CreateData(signatureClass, keyAlgorithm, fingerprint))
+ {
+ }
+
+ private static byte[] CreateData(
+ RevocationKeyTag signatureClass,
+ PublicKeyAlgorithmTag keyAlgorithm,
+ byte[] fingerprint)
+ {
+ byte[] data = new byte[2 + fingerprint.Length];
+ data[0] = (byte)signatureClass;
+ data[1] = (byte)keyAlgorithm;
+ Array.Copy(fingerprint, 0, data, 2, fingerprint.Length);
+ return data;
+ }
+
+ public virtual RevocationKeyTag SignatureClass
+ {
+ get { return (RevocationKeyTag)this.GetData()[0]; }
+ }
+
+ public virtual PublicKeyAlgorithmTag Algorithm
+ {
+ get { return (PublicKeyAlgorithmTag)this.GetData()[1]; }
+ }
+
+ public virtual byte[] GetFingerprint()
+ {
+ byte[] data = this.GetData();
+ byte[] fingerprint = new byte[data.Length - 2];
+ Array.Copy(data, 2, fingerprint, 0, fingerprint.Length);
+ return fingerprint;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKey.cs.meta
new file mode 100644
index 00000000..49018261
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f9eaf5618aa97844784334746109bbae
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKeyTags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKeyTags.cs
new file mode 100644
index 00000000..45c0fbda
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKeyTags.cs
@@ -0,0 +1,13 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ public enum RevocationKeyTag
+ : byte
+ {
+ ClassDefault = 0x80,
+ ClassSensitive = 0x40
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKeyTags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKeyTags.cs.meta
new file mode 100644
index 00000000..ea7cf518
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationKeyTags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2e1338967dd169249b5b7bc5386e27f2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReason.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReason.cs
new file mode 100644
index 00000000..1db5d5ac
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReason.cs
@@ -0,0 +1,61 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Text;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ ///
+ /// Represents revocation reason OpenPGP signature sub packet.
+ ///
+ public class RevocationReason
+ : SignatureSubpacket
+ {
+ public RevocationReason(bool isCritical, bool isLongLength, byte[] data)
+ : base(SignatureSubpacketTag.RevocationReason, isCritical, isLongLength, data)
+ {
+ }
+
+ public RevocationReason(
+ bool isCritical,
+ RevocationReasonTag reason,
+ string description)
+ : base(SignatureSubpacketTag.RevocationReason, isCritical, false, CreateData(reason, description))
+ {
+ }
+
+ private static byte[] CreateData(
+ RevocationReasonTag reason,
+ string description)
+ {
+ byte[] descriptionBytes = Strings.ToUtf8ByteArray(description);
+ byte[] data = new byte[1 + descriptionBytes.Length];
+
+ data[0] = (byte)reason;
+ Array.Copy(descriptionBytes, 0, data, 1, descriptionBytes.Length);
+
+ return data;
+ }
+
+ public virtual RevocationReasonTag GetRevocationReason()
+ {
+ return (RevocationReasonTag)GetData()[0];
+ }
+
+ public virtual string GetRevocationDescription()
+ {
+ byte[] data = GetData();
+ if (data.Length == 1)
+ return string.Empty;
+
+ byte[] description = new byte[data.Length - 1];
+ Array.Copy(data, 1, description, 0, description.Length);
+
+ return Strings.FromUtf8ByteArray(description);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReason.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReason.cs.meta
new file mode 100644
index 00000000..692f52e2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReason.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c90f793064eac8c49b88ec465e9e4801
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReasonTags.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReasonTags.cs
new file mode 100644
index 00000000..19ee4e4f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReasonTags.cs
@@ -0,0 +1,18 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg
+{
+ public enum RevocationReasonTag
+ : byte
+ {
+ NoReason = 0, // No reason specified (key revocations or cert revocations)
+ KeySuperseded = 1, // Key is superseded (key revocations)
+ KeyCompromised = 2, // Key material has been compromised (key revocations)
+ KeyRetired = 3, // Key is retired and no longer used (key revocations)
+ UserNoLongerValid = 32, // User ID information is no longer valid (cert revocations)
+
+ // 100-110 - Private Use
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReasonTags.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReasonTags.cs.meta
new file mode 100644
index 00000000..69429153
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/RevocationReasonTags.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2cef5753ad3f65047a1b282c84764d3a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureCreationTime.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureCreationTime.cs
new file mode 100644
index 00000000..9e3c9d62
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureCreationTime.cs
@@ -0,0 +1,40 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving signature creation time.
+ */
+ public class SignatureCreationTime
+ : SignatureSubpacket
+ {
+ protected static byte[] TimeToBytes(DateTime time)
+ {
+ long t = DateTimeUtilities.DateTimeToUnixMs(time) / 1000L;
+ return Pack.UInt32_To_BE((uint)t);
+ }
+
+ public SignatureCreationTime(bool critical, bool isLongLength, byte[] data)
+ : base(SignatureSubpacketTag.CreationTime, critical, isLongLength, data)
+ {
+ }
+
+ public SignatureCreationTime(bool critical, DateTime date)
+ : base(SignatureSubpacketTag.CreationTime, critical, false, TimeToBytes(date))
+ {
+ }
+
+ public DateTime GetTime()
+ {
+ uint time = Pack.BE_To_UInt32(data, 0);
+ return DateTimeUtilities.UnixMsToDateTime(time * 1000L);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureCreationTime.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureCreationTime.cs.meta
new file mode 100644
index 00000000..a7469d84
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureCreationTime.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cc33b36b4be60784aa69a717fa1cec23
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureExpirationTime.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureExpirationTime.cs
new file mode 100644
index 00000000..fde2a445
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureExpirationTime.cs
@@ -0,0 +1,35 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving signature expiration time.
+ */
+ public class SignatureExpirationTime
+ : SignatureSubpacket
+ {
+ protected static byte[] TimeToBytes(long t)
+ {
+ return Pack.UInt32_To_BE((uint)t);
+ }
+
+ public SignatureExpirationTime(bool critical, bool isLongLength, byte[] data)
+ : base(SignatureSubpacketTag.ExpireTime, critical, isLongLength, data)
+ {
+ }
+
+ public SignatureExpirationTime(bool critical, long seconds)
+ : base(SignatureSubpacketTag.ExpireTime, critical, false, TimeToBytes(seconds))
+ {
+ }
+
+ /**
+ * return time in seconds before signature expires after creation time.
+ */
+ public long Time => Pack.BE_To_UInt32(data, 0);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureExpirationTime.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureExpirationTime.cs.meta
new file mode 100644
index 00000000..d91e8116
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignatureExpirationTime.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e5470a08723646a4ebe1b4dddb7af999
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignerUserId.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignerUserId.cs
new file mode 100644
index 00000000..556e1c48
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignerUserId.cs
@@ -0,0 +1,53 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving the User ID of the signer.
+ */
+ public class SignerUserId
+ : SignatureSubpacket
+ {
+ private static byte[] UserIdToBytes(
+ string id)
+ {
+ byte[] idData = new byte[id.Length];
+
+ for (int i = 0; i != id.Length; i++)
+ {
+ idData[i] = (byte)id[i];
+ }
+
+ return idData;
+ }
+
+ public SignerUserId(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.SignerUserId, critical, isLongLength, data)
+ {
+ }
+
+ public SignerUserId(
+ bool critical,
+ string userId)
+ : base(SignatureSubpacketTag.SignerUserId, critical, false, UserIdToBytes(userId))
+ {
+ }
+
+ public string GetId()
+ {
+ char[] chars = new char[data.Length];
+
+ for (int i = 0; i != chars.Length; i++)
+ {
+ chars[i] = (char)(data[i] & 0xff);
+ }
+
+ return new string(chars);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignerUserId.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignerUserId.cs.meta
new file mode 100644
index 00000000..e1d07bf7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/SignerUserId.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9f72fc08b5dfd3e4b99640a0365a108a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/TrustSignature.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/TrustSignature.cs
new file mode 100644
index 00000000..b6fd7a2b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/TrustSignature.cs
@@ -0,0 +1,48 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Bcpg.Sig
+{
+ /**
+ * packet giving trust.
+ */
+ public class TrustSignature
+ : SignatureSubpacket
+ {
+ private static byte[] IntToByteArray(
+ int v1,
+ int v2)
+ {
+ return new byte[]{ (byte)v1, (byte)v2 };
+ }
+
+ public TrustSignature(
+ bool critical,
+ bool isLongLength,
+ byte[] data)
+ : base(SignatureSubpacketTag.TrustSig, critical, isLongLength, data)
+ {
+ }
+
+ public TrustSignature(
+ bool critical,
+ int depth,
+ int trustAmount)
+ : base(SignatureSubpacketTag.TrustSig, critical, false, IntToByteArray(depth, trustAmount))
+ {
+ }
+
+ public int Depth
+ {
+ get { return data[0] & 0xff; }
+ }
+
+ public int TrustAmount
+ {
+ get { return data[1] & 0xff; }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/TrustSignature.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/TrustSignature.cs.meta
new file mode 100644
index 00000000..3c521a6d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/bcpg/sig/TrustSignature.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 25abbc01b4edc0440a4b6ef04b9ba858
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp.meta
new file mode 100644
index 00000000..8840baa1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 343736f8718a3894e83955651210ce80
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContent.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContent.cs
new file mode 100644
index 00000000..98d65da5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContent.cs
@@ -0,0 +1,46 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cmp
+{
+ public class CertificateConfirmationContent
+ {
+ private readonly DefaultDigestAlgorithmIdentifierFinder m_digestAlgFinder;
+ private readonly CertConfirmContent m_content;
+
+ public CertificateConfirmationContent(CertConfirmContent content)
+ {
+ this.m_content = content;
+ }
+
+ public CertificateConfirmationContent(CertConfirmContent content,
+ DefaultDigestAlgorithmIdentifierFinder digestAlgFinder)
+ {
+ this.m_content = content;
+ this.m_digestAlgFinder = digestAlgFinder;
+ }
+
+ public CertConfirmContent ToAsn1Structure()
+ {
+ return m_content;
+ }
+
+ public CertificateStatus[] GetStatusMessages()
+ {
+ CertStatus[] statusArray = m_content.ToCertStatusArray();
+ CertificateStatus[] ret = new CertificateStatus[statusArray.Length];
+ for (int i = 0; i != ret.Length; i++)
+ {
+ ret[i] = new CertificateStatus(m_digestAlgFinder, statusArray[i]);
+ }
+
+ return ret;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContent.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContent.cs.meta
new file mode 100644
index 00000000..517e4ce5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2788473a184b6ce42814d5edb36f2c3b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContentBuilder.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContentBuilder.cs
new file mode 100644
index 00000000..7817be57
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContentBuilder.cs
@@ -0,0 +1,69 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cmp
+{
+ public sealed class CertificateConfirmationContentBuilder
+ {
+ private static readonly DefaultSignatureAlgorithmIdentifierFinder SigAlgFinder =
+ new DefaultSignatureAlgorithmIdentifierFinder();
+
+ private readonly DefaultDigestAlgorithmIdentifierFinder m_digestAlgFinder;
+ private readonly IList m_acceptedCerts = new List();
+ private readonly IList m_acceptedReqIDs = new List();
+
+ public CertificateConfirmationContentBuilder()
+ : this(new DefaultDigestAlgorithmIdentifierFinder())
+ {
+ }
+
+ public CertificateConfirmationContentBuilder(DefaultDigestAlgorithmIdentifierFinder digestAlgFinder)
+ {
+ this.m_digestAlgFinder = digestAlgFinder;
+ }
+
+ public CertificateConfirmationContentBuilder AddAcceptedCertificate(X509Certificate certHolder,
+ BigInteger certReqId)
+ {
+ m_acceptedCerts.Add(certHolder);
+ m_acceptedReqIDs.Add(certReqId);
+ return this;
+ }
+
+ public CertificateConfirmationContent Build()
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ for (int i = 0; i != m_acceptedCerts.Count; i++)
+ {
+ X509Certificate cert = m_acceptedCerts[i];
+ BigInteger reqID = m_acceptedReqIDs[i];
+
+ AlgorithmIdentifier algorithmIdentifier = SigAlgFinder.Find(cert.SigAlgName);
+ if (null == algorithmIdentifier)
+ throw new CmpException("cannot find algorithm identifier for signature name");
+
+ AlgorithmIdentifier digAlg = m_digestAlgFinder.Find(algorithmIdentifier);
+ if (null == digAlg)
+ throw new CmpException("cannot find algorithm for digest from signature");
+
+ byte[] digest = DigestUtilities.CalculateDigest(digAlg.Algorithm, cert.GetEncoded());
+
+ v.Add(new CertStatus(digest, reqID));
+ }
+
+ return new CertificateConfirmationContent(CertConfirmContent.GetInstance(new DerSequence(v)),
+ m_digestAlgFinder);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContentBuilder.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContentBuilder.cs.meta
new file mode 100644
index 00000000..4a0f4ec0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateConfirmationContentBuilder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 398e30ef376af0a44b34abe52c7c77a9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateStatus.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateStatus.cs
new file mode 100644
index 00000000..de54ebb9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateStatus.cs
@@ -0,0 +1,46 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cmp
+{
+ public class CertificateStatus
+ {
+ private static readonly DefaultSignatureAlgorithmIdentifierFinder sigAlgFinder = new DefaultSignatureAlgorithmIdentifierFinder();
+
+ private readonly DefaultDigestAlgorithmIdentifierFinder digestAlgFinder;
+ private readonly CertStatus certStatus;
+
+ public CertificateStatus(DefaultDigestAlgorithmIdentifierFinder digestAlgFinder, CertStatus certStatus)
+ {
+ this.digestAlgFinder = digestAlgFinder;
+ this.certStatus = certStatus;
+ }
+
+ public virtual PkiStatusInfo StatusInfo => certStatus.StatusInfo;
+
+ public virtual BigInteger CertRequestID => certStatus.CertReqID.Value;
+
+ public virtual bool IsVerified(X509Certificate cert)
+ {
+ AlgorithmIdentifier digAlg = digestAlgFinder.Find(sigAlgFinder.Find(cert.SigAlgName));
+ if (null == digAlg)
+ throw new CmpException("cannot find algorithm for digest from signature " + cert.SigAlgName);
+
+ byte[] digest = DigestUtilities.CalculateDigest(digAlg.Algorithm, cert.GetEncoded());
+
+ return Arrays.ConstantTimeAreEqual(certStatus.CertHash.GetOctets(), digest);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateStatus.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateStatus.cs.meta
new file mode 100644
index 00000000..526cfc49
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CertificateStatus.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 098228ed45f1a3b4daaca3d1bfa19cd7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CmpException.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CmpException.cs
new file mode 100644
index 00000000..0e088230
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CmpException.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Runtime.Serialization;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cmp
+{
+ [Serializable]
+ public class CmpException
+ : Exception
+ {
+ public CmpException()
+ : base()
+ {
+ }
+
+ public CmpException(string message)
+ : base(message)
+ {
+ }
+
+ public CmpException(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ }
+
+ protected CmpException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CmpException.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CmpException.cs.meta
new file mode 100644
index 00000000..0fdc1819
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/CmpException.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: beb021ea72727bd4cb72ab1f465f5e69
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/GeneralPkiMessage.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/GeneralPkiMessage.cs
new file mode 100644
index 00000000..0f810700
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/GeneralPkiMessage.cs
@@ -0,0 +1,49 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cmp
+{
+ public class GeneralPkiMessage
+ {
+ private readonly PkiMessage m_pkiMessage;
+
+ private static PkiMessage ParseBytes(byte[] encoding)
+ {
+ return PkiMessage.GetInstance(Asn1Object.FromByteArray(encoding));
+ }
+
+ ///
+ /// Wrap a PKIMessage ASN.1 structure.
+ ///
+ /// PKI message.
+ public GeneralPkiMessage(PkiMessage pkiMessage)
+ {
+ this.m_pkiMessage = pkiMessage;
+ }
+
+ ///
+ /// Create a PKIMessage from the passed in bytes.
+ ///
+ /// BER/DER encoding of the PKIMessage
+ public GeneralPkiMessage(byte[] encoding)
+ : this(ParseBytes(encoding))
+ {
+ }
+
+ public virtual PkiHeader Header => m_pkiMessage.Header;
+
+ public virtual PkiBody Body => m_pkiMessage.Body;
+
+ ///
+ /// Return true if this message has protection bits on it. A return value of true
+ /// indicates the message can be used to construct a ProtectedPKIMessage.
+ ///
+ public virtual bool HasProtection => m_pkiMessage.Protection != null;
+
+ public virtual PkiMessage ToAsn1Structure() => m_pkiMessage;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/GeneralPkiMessage.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/GeneralPkiMessage.cs.meta
new file mode 100644
index 00000000..b9c858e3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/GeneralPkiMessage.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 205b2017d47f7384db6a5cbbf4ea48a8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessage.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessage.cs
new file mode 100644
index 00000000..5c828f3b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessage.cs
@@ -0,0 +1,141 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crmf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cmp
+{
+ ///
+ /// Wrapper for a PKIMessage with protection attached to it.
+ ///
+ public class ProtectedPkiMessage
+ {
+ private readonly PkiMessage m_pkiMessage;
+
+ ///
+ /// Wrap a general message.
+ ///
+ /// If the general message does not have protection.
+ /// The General message
+ public ProtectedPkiMessage(GeneralPkiMessage pkiMessage)
+ {
+ if (!pkiMessage.HasProtection)
+ throw new ArgumentException("GeneralPkiMessage not protected");
+
+ this.m_pkiMessage = pkiMessage.ToAsn1Structure();
+ }
+
+ // TODO[cmp] Make internal? (Has test that uses it)
+ ///
+ /// Wrap a PKI message.
+ ///
+ /// If the PKI message does not have protection.
+ /// The PKI message
+ public ProtectedPkiMessage(PkiMessage pkiMessage)
+ {
+ if (null == pkiMessage.Header.ProtectionAlg)
+ throw new ArgumentException("PkiMessage not protected");
+
+ this.m_pkiMessage = pkiMessage;
+ }
+
+ /// Message header
+ public virtual PkiHeader Header => m_pkiMessage.Header;
+
+ /// Message body
+ public virtual PkiBody Body => m_pkiMessage.Body;
+
+ ///
+ /// Return the underlying ASN.1 structure contained in this object.
+ ///
+ /// PkiMessage structure
+ public virtual PkiMessage ToAsn1Message() => m_pkiMessage;
+
+ ///
+ /// Determine whether the message is protected by a password based MAC. Use verify(PKMACBuilder, char[])
+ /// to verify the message if this method returns true.
+ ///
+ /// true if protection MAC PBE based, false otherwise.
+ public virtual bool HasPasswordBasedMacProtected
+ {
+ get { return CmpObjectIdentifiers.passwordBasedMac.Equals(Header.ProtectionAlg.Algorithm); }
+ }
+
+ ///
+ /// Return the extra certificates associated with this message.
+ ///
+ /// an array of extra certificates, zero length if none present.
+ public virtual X509Certificate[] GetCertificates()
+ {
+ CmpCertificate[] certs = m_pkiMessage.GetExtraCerts();
+ if (null == certs)
+ return new X509Certificate[0];
+
+ X509Certificate[] result = new X509Certificate[certs.Length];
+ for (int t = 0; t < certs.Length; t++)
+ {
+ result[t] = new X509Certificate(certs[t].X509v3PKCert);
+ }
+ return result;
+ }
+
+ ///
+ /// Verify a message with a public key based signature attached.
+ ///
+ /// a factory of signature verifiers.
+ /// true if the provider is able to create a verifier that validates the signature, false otherwise.
+ public virtual bool Verify(IVerifierFactory verifierFactory)
+ {
+ IStreamCalculator streamCalculator = verifierFactory.CreateCalculator();
+
+ IVerifier result = Process(streamCalculator);
+
+ return result.IsVerified(m_pkiMessage.Protection.GetBytes());
+ }
+
+ ///
+ /// Verify a message with password based MAC protection.
+ ///
+ /// MAC builder that can be used to construct the appropriate MacCalculator
+ /// the MAC password
+ /// true if the passed in password and MAC builder verify the message, false otherwise.
+ /// if algorithm not MAC based, or an exception is thrown verifying the MAC.
+ public virtual bool Verify(PKMacBuilder pkMacBuilder, char[] password)
+ {
+ if (!CmpObjectIdentifiers.passwordBasedMac.Equals(m_pkiMessage.Header.ProtectionAlg.Algorithm))
+ throw new InvalidOperationException("protection algorithm is not mac based");
+
+ PbmParameter parameter = PbmParameter.GetInstance(m_pkiMessage.Header.ProtectionAlg.Parameters);
+
+ pkMacBuilder.SetParameters(parameter);
+
+ IBlockResult result = Process(pkMacBuilder.Build(password).CreateCalculator());
+
+ return Arrays.ConstantTimeAreEqual(result.Collect(), m_pkiMessage.Protection.GetBytes());
+ }
+
+ private TResult Process(IStreamCalculator streamCalculator)
+ {
+ Asn1EncodableVector avec = new Asn1EncodableVector();
+ avec.Add(m_pkiMessage.Header);
+ avec.Add(m_pkiMessage.Body);
+ byte[] enc = new DerSequence(avec).GetDerEncoded();
+
+ using (var stream = streamCalculator.Stream)
+ {
+ stream.Write(enc, 0, enc.Length);
+ }
+
+ return streamCalculator.GetResult();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessage.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessage.cs.meta
new file mode 100644
index 00000000..933999d8
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessage.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c178fd8d77199344db95c59459b20470
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessageBuilder.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessageBuilder.cs
new file mode 100644
index 00000000..d9779570
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessageBuilder.cs
@@ -0,0 +1,161 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cmp
+{
+ public sealed class ProtectedPkiMessageBuilder
+ {
+ private readonly PkiHeaderBuilder m_hdrBuilder;
+ private PkiBody body;
+ private readonly List generalInfos = new List();
+ private readonly List extraCerts = new List();
+
+ public ProtectedPkiMessageBuilder(GeneralName sender, GeneralName recipient)
+ : this(PkiHeader.CMP_2000, sender, recipient)
+ {
+ }
+
+ public ProtectedPkiMessageBuilder(int pvno, GeneralName sender, GeneralName recipient)
+ {
+ m_hdrBuilder = new PkiHeaderBuilder(pvno, sender, recipient);
+ }
+
+ public ProtectedPkiMessageBuilder SetTransactionId(byte[] tid)
+ {
+ m_hdrBuilder.SetTransactionID(tid);
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder SetFreeText(PkiFreeText freeText)
+ {
+ m_hdrBuilder.SetFreeText(freeText);
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder AddGeneralInfo(InfoTypeAndValue genInfo)
+ {
+ generalInfos.Add(genInfo);
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder SetMessageTime(DateTime time)
+ {
+ m_hdrBuilder.SetMessageTime(new Asn1GeneralizedTime(time));
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder SetMessageTime(Asn1GeneralizedTime generalizedTime)
+ {
+ m_hdrBuilder.SetMessageTime(generalizedTime);
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder SetRecipKID(byte[] id)
+ {
+ m_hdrBuilder.SetRecipKID(id);
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder SetRecipNonce(byte[] nonce)
+ {
+ m_hdrBuilder.SetRecipNonce(nonce);
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder SetSenderKID(byte[] id)
+ {
+ m_hdrBuilder.SetSenderKID(id);
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder SetSenderNonce(byte[] nonce)
+ {
+ m_hdrBuilder.SetSenderNonce(nonce);
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder SetBody(PkiBody body)
+ {
+ this.body = body;
+ return this;
+ }
+
+ public ProtectedPkiMessageBuilder AddCmpCertificate(X509Certificate certificate)
+ {
+ extraCerts.Add(certificate);
+ return this;
+ }
+
+ public ProtectedPkiMessage Build(ISignatureFactory signatureFactory)
+ {
+ if (null == body)
+ throw new InvalidOperationException("body must be set before building");
+
+ IStreamCalculator calculator = signatureFactory.CreateCalculator();
+
+ if (!(signatureFactory.AlgorithmDetails is AlgorithmIdentifier algorithmDetails))
+ throw new ArgumentException("AlgorithmDetails is not AlgorithmIdentifier");
+
+ FinalizeHeader(algorithmDetails);
+ PkiHeader header = m_hdrBuilder.Build();
+ DerBitString protection = new DerBitString(CalculateSignature(calculator, header, body));
+ return FinalizeMessage(header, protection);
+ }
+
+ public ProtectedPkiMessage Build(IMacFactory macFactory)
+ {
+ if (null == body)
+ throw new InvalidOperationException("body must be set before building");
+
+ IStreamCalculator calculator = macFactory.CreateCalculator();
+
+ if (!(macFactory.AlgorithmDetails is AlgorithmIdentifier algorithmDetails))
+ throw new ArgumentException("AlgorithmDetails is not AlgorithmIdentifier");
+
+ FinalizeHeader(algorithmDetails);
+ PkiHeader header = m_hdrBuilder.Build();
+ DerBitString protection = new DerBitString(CalculateSignature(calculator, header, body));
+ return FinalizeMessage(header, protection);
+ }
+
+ private void FinalizeHeader(AlgorithmIdentifier algorithmIdentifier)
+ {
+ m_hdrBuilder.SetProtectionAlg(algorithmIdentifier);
+ if (generalInfos.Count > 0)
+ {
+ m_hdrBuilder.SetGeneralInfo(generalInfos.ToArray());
+ }
+ }
+
+ private ProtectedPkiMessage FinalizeMessage(PkiHeader header, DerBitString protection)
+ {
+ if (extraCerts.Count < 1)
+ return new ProtectedPkiMessage(new PkiMessage(header, body, protection));
+
+ CmpCertificate[] cmpCertificates = new CmpCertificate[extraCerts.Count];
+ for (int i = 0; i < cmpCertificates.Length; i++)
+ {
+ cmpCertificates[i] = new CmpCertificate(extraCerts[i].CertificateStructure);
+ }
+
+ return new ProtectedPkiMessage(new PkiMessage(header, body, protection, cmpCertificates));
+ }
+
+ private byte[] CalculateSignature(IStreamCalculator signer, PkiHeader header, PkiBody body)
+ {
+ new DerSequence(header, body).EncodeTo(signer.Stream);
+ return signer.GetResult().Collect();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessageBuilder.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessageBuilder.cs.meta
new file mode 100644
index 00000000..5aaf3d97
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/ProtectedPkiMessageBuilder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e845f0c5f946f5c4a963c1248a54d4e9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetails.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetails.cs
new file mode 100644
index 00000000..beb018e2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetails.cs
@@ -0,0 +1,28 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cmp
+{
+ public struct RevocationDetails
+ {
+ private readonly RevDetails m_revDetails;
+
+ public RevocationDetails(RevDetails revDetails)
+ {
+ m_revDetails = revDetails;
+ }
+
+ public X509Name Subject => m_revDetails.CertDetails.Subject;
+
+ public X509Name Issuer => m_revDetails.CertDetails.Issuer;
+
+ public BigInteger SerialNumber => m_revDetails.CertDetails.SerialNumber.Value;
+
+ public RevDetails ToASN1Structure() => m_revDetails;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetails.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetails.cs.meta
new file mode 100644
index 00000000..db9c34cb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetails.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3d0c2445323acf640a683170c1ebfca9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetailsBuilder.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetailsBuilder.cs
new file mode 100644
index 00000000..c8c13494
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetailsBuilder.cs
@@ -0,0 +1,62 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Math;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cmp
+{
+ public sealed class RevocationDetailsBuilder
+ {
+ private readonly CertTemplateBuilder m_templateBuilder = new CertTemplateBuilder();
+
+ public RevocationDetailsBuilder SetPublicKey(SubjectPublicKeyInfo publicKey)
+ {
+ if (publicKey != null)
+ {
+ m_templateBuilder.SetPublicKey(publicKey);
+ }
+
+ return this;
+ }
+
+ public RevocationDetailsBuilder SetIssuer(X509Name issuer)
+ {
+ if (issuer != null)
+ {
+ m_templateBuilder.SetIssuer(issuer);
+ }
+
+ return this;
+ }
+
+ public RevocationDetailsBuilder SetSerialNumber(BigInteger serialNumber)
+ {
+ if (serialNumber != null)
+ {
+ m_templateBuilder.SetSerialNumber(new DerInteger(serialNumber));
+ }
+
+ return this;
+ }
+
+ public RevocationDetailsBuilder SetSubject(X509Name subject)
+ {
+ if (subject != null)
+ {
+ m_templateBuilder.SetSubject(subject);
+ }
+
+ return this;
+ }
+
+ public RevocationDetails Build()
+ {
+ return new RevocationDetails(new RevDetails(m_templateBuilder.Build()));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetailsBuilder.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetailsBuilder.cs.meta
new file mode 100644
index 00000000..ef5418bb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cmp/RevocationDetailsBuilder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d14c516adf92b364b97f4dddf11682f7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms.meta
new file mode 100644
index 00000000..d95a753b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e75b247d29b8e864c871bad07686a49a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/BaseDigestCalculator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/BaseDigestCalculator.cs
new file mode 100644
index 00000000..2fe1c58d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/BaseDigestCalculator.cs
@@ -0,0 +1,27 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ internal class BaseDigestCalculator
+ : IDigestCalculator
+ {
+ private readonly byte[] digest;
+
+ internal BaseDigestCalculator(
+ byte[] digest)
+ {
+ this.digest = digest;
+ }
+
+ public byte[] GetDigest()
+ {
+ return Arrays.Clone(digest);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/BaseDigestCalculator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/BaseDigestCalculator.cs.meta
new file mode 100644
index 00000000..af673d5a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/BaseDigestCalculator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 25b797bbb5f0cec4b9424af88238f8a9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerationException.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerationException.cs
new file mode 100644
index 00000000..4fcf5111
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerationException.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Runtime.Serialization;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ [Serializable]
+ public class CmsAttributeTableGenerationException
+ : CmsException
+ {
+ public CmsAttributeTableGenerationException()
+ : base()
+ {
+ }
+
+ public CmsAttributeTableGenerationException(string message)
+ : base(message)
+ {
+ }
+
+ public CmsAttributeTableGenerationException(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ }
+
+ protected CmsAttributeTableGenerationException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerationException.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerationException.cs.meta
new file mode 100644
index 00000000..ab97f991
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerationException.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 46626ac766c635e45bd283536f377deb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerator.cs
new file mode 100644
index 00000000..6d7d040a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerator.cs
@@ -0,0 +1,28 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ ///
+ /// The 'Signature' parameter is only available when generating unsigned attributes.
+ ///
+ public enum CmsAttributeTableParameter
+ {
+// const string ContentType = "contentType";
+// const string Digest = "digest";
+// const string Signature = "encryptedDigest";
+// const string DigestAlgorithmIdentifier = "digestAlgID";
+
+ ContentType, Digest, Signature, DigestAlgorithmIdentifier
+ }
+
+ public interface CmsAttributeTableGenerator
+ {
+ AttributeTable GetAttributes(IDictionary parameters);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerator.cs.meta
new file mode 100644
index 00000000..02ab5fc3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAttributeTableGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 45919a9f8c14ac2469ff35536c71e341
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedData.cs
new file mode 100644
index 00000000..23a1e1c0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedData.cs
@@ -0,0 +1,115 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * containing class for an CMS AuthEnveloped Data object
+ */
+ internal class CmsAuthEnvelopedData
+ {
+ internal RecipientInformationStore recipientInfoStore;
+ internal ContentInfo contentInfo;
+
+ private OriginatorInfo originator;
+ private AlgorithmIdentifier authEncAlg;
+ private Asn1Set authAttrs;
+ private byte[] mac;
+ private Asn1Set unauthAttrs;
+
+ public CmsAuthEnvelopedData(
+ byte[] authEnvData)
+ : this(CmsUtilities.ReadContentInfo(authEnvData))
+ {
+ }
+
+ public CmsAuthEnvelopedData(
+ Stream authEnvData)
+ : this(CmsUtilities.ReadContentInfo(authEnvData))
+ {
+ }
+
+ public CmsAuthEnvelopedData(
+ ContentInfo contentInfo)
+ {
+ this.contentInfo = contentInfo;
+
+ AuthEnvelopedData authEnvData = AuthEnvelopedData.GetInstance(contentInfo.Content);
+
+ this.originator = authEnvData.OriginatorInfo;
+
+ //
+ // read the recipients
+ //
+ Asn1Set recipientInfos = authEnvData.RecipientInfos;
+
+ //
+ // read the auth-encrypted content info
+ //
+ EncryptedContentInfo authEncInfo = authEnvData.AuthEncryptedContentInfo;
+ this.authEncAlg = authEncInfo.ContentEncryptionAlgorithm;
+ CmsSecureReadable secureReadable = new AuthEnvelopedSecureReadable(this);
+
+ //
+ // build the RecipientInformationStore
+ //
+ this.recipientInfoStore = CmsEnvelopedHelper.BuildRecipientInformationStore(
+ recipientInfos, secureReadable);
+
+ // FIXME These need to be passed to the AEAD cipher as AAD (Additional Authenticated Data)
+ this.authAttrs = authEnvData.AuthAttrs;
+ this.mac = authEnvData.Mac.GetOctets();
+ this.unauthAttrs = authEnvData.UnauthAttrs;
+ }
+
+ private class AuthEnvelopedSecureReadable : CmsSecureReadable
+ {
+ private readonly CmsAuthEnvelopedData parent;
+
+ internal AuthEnvelopedSecureReadable(CmsAuthEnvelopedData parent)
+ {
+ this.parent = parent;
+ }
+
+ public AlgorithmIdentifier Algorithm
+ {
+ get { return parent.authEncAlg; }
+ }
+
+ public object CryptoObject
+ {
+ get { return null; }
+ }
+
+ public CmsReadable GetReadable(KeyParameter key)
+ {
+ // TODO Create AEAD cipher instance to decrypt and calculate tag ( MAC)
+ throw new CmsException("AuthEnveloped data decryption not yet implemented");
+
+// RFC 5084 ASN.1 Module
+// -- Parameters for AlgorithmIdentifier
+//
+// CCMParameters ::= SEQUENCE {
+// aes-nonce OCTET STRING (SIZE(7..13)),
+// aes-ICVlen AES-CCM-ICVlen DEFAULT 12 }
+//
+// AES-CCM-ICVlen ::= INTEGER (4 | 6 | 8 | 10 | 12 | 14 | 16)
+//
+// GCMParameters ::= SEQUENCE {
+// aes-nonce OCTET STRING, -- recommended size is 12 octets
+// aes-ICVlen AES-GCM-ICVlen DEFAULT 12 }
+//
+// AES-GCM-ICVlen ::= INTEGER (12 | 13 | 14 | 15 | 16)
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedData.cs.meta
new file mode 100644
index 00000000..c7832686
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4c03cf7a4f84a0446950125453eda54f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedGenerator.cs
new file mode 100644
index 00000000..e7ed3820
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedGenerator.cs
@@ -0,0 +1,20 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ internal class CmsAuthEnvelopedGenerator
+ {
+ public static readonly string Aes128Ccm = NistObjectIdentifiers.IdAes128Ccm.Id;
+ public static readonly string Aes192Ccm = NistObjectIdentifiers.IdAes192Ccm.Id;
+ public static readonly string Aes256Ccm = NistObjectIdentifiers.IdAes256Ccm.Id;
+ public static readonly string Aes128Gcm = NistObjectIdentifiers.IdAes128Gcm.Id;
+ public static readonly string Aes192Gcm = NistObjectIdentifiers.IdAes192Gcm.Id;
+ public static readonly string Aes256Gcm = NistObjectIdentifiers.IdAes256Gcm.Id;
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedGenerator.cs.meta
new file mode 100644
index 00000000..27b0f06d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthEnvelopedGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3e3c9aa2fd5925b40960a8b8312f78db
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedData.cs
new file mode 100644
index 00000000..468b6773
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedData.cs
@@ -0,0 +1,140 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * containing class for an CMS Authenticated Data object
+ */
+ public class CmsAuthenticatedData
+ {
+ internal RecipientInformationStore recipientInfoStore;
+ internal ContentInfo contentInfo;
+
+ private AlgorithmIdentifier macAlg;
+ private Asn1Set authAttrs;
+ private Asn1Set unauthAttrs;
+ private byte[] mac;
+
+ public CmsAuthenticatedData(
+ byte[] authData)
+ : this(CmsUtilities.ReadContentInfo(authData))
+ {
+ }
+
+ public CmsAuthenticatedData(
+ Stream authData)
+ : this(CmsUtilities.ReadContentInfo(authData))
+ {
+ }
+
+ public CmsAuthenticatedData(
+ ContentInfo contentInfo)
+ {
+ this.contentInfo = contentInfo;
+
+ AuthenticatedData authData = AuthenticatedData.GetInstance(contentInfo.Content);
+
+ //
+ // read the recipients
+ //
+ Asn1Set recipientInfos = authData.RecipientInfos;
+
+ this.macAlg = authData.MacAlgorithm;
+
+ //
+ // read the authenticated content info
+ //
+ ContentInfo encInfo = authData.EncapsulatedContentInfo;
+ CmsReadable readable = new CmsProcessableByteArray(
+ Asn1OctetString.GetInstance(encInfo.Content).GetOctets());
+ CmsSecureReadable secureReadable = new CmsEnvelopedHelper.CmsAuthenticatedSecureReadable(
+ this.macAlg, readable);
+
+ //
+ // build the RecipientInformationStore
+ //
+ this.recipientInfoStore = CmsEnvelopedHelper.BuildRecipientInformationStore(
+ recipientInfos, secureReadable);
+
+ this.authAttrs = authData.AuthAttrs;
+ this.mac = authData.Mac.GetOctets();
+ this.unauthAttrs = authData.UnauthAttrs;
+ }
+
+ public byte[] GetMac()
+ {
+ return Arrays.Clone(mac);
+ }
+
+ public AlgorithmIdentifier MacAlgorithmID
+ {
+ get { return macAlg; }
+ }
+
+ /**
+ * return the object identifier for the content MAC algorithm.
+ */
+ public string MacAlgOid
+ {
+ get { return macAlg.Algorithm.Id; }
+ }
+
+ /**
+ * return a store of the intended recipients for this message
+ */
+ public RecipientInformationStore GetRecipientInfos()
+ {
+ return recipientInfoStore;
+ }
+
+ /**
+ * return the ContentInfo
+ */
+ public ContentInfo ContentInfo
+ {
+ get { return contentInfo; }
+ }
+
+ /**
+ * return a table of the digested attributes indexed by
+ * the OID of the attribute.
+ */
+ public Asn1.Cms.AttributeTable GetAuthAttrs()
+ {
+ if (authAttrs == null)
+ return null;
+
+ return new Asn1.Cms.AttributeTable(authAttrs);
+ }
+
+ /**
+ * return a table of the undigested attributes indexed by
+ * the OID of the attribute.
+ */
+ public Asn1.Cms.AttributeTable GetUnauthAttrs()
+ {
+ if (unauthAttrs == null)
+ return null;
+
+ return new Asn1.Cms.AttributeTable(unauthAttrs);
+ }
+
+ /**
+ * return the ASN.1 encoded representation of this object.
+ */
+ public byte[] GetEncoded()
+ {
+ return contentInfo.GetEncoded();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedData.cs.meta
new file mode 100644
index 00000000..87dd3621
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fece474f8ec8d75459c46825516c7b72
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataGenerator.cs
new file mode 100644
index 00000000..7da47df9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataGenerator.cs
@@ -0,0 +1,150 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * General class for generating a CMS authenticated-data message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * CMSAuthenticatedDataGenerator fact = new CMSAuthenticatedDataGenerator();
+ *
+ * fact.addKeyTransRecipient(cert);
+ *
+ * CMSAuthenticatedData data = fact.generate(content, algorithm, "BC");
+ *
+ */
+ public class CmsAuthenticatedDataGenerator
+ : CmsAuthenticatedGenerator
+ {
+ public CmsAuthenticatedDataGenerator()
+ {
+ }
+
+ /// Constructor allowing specific source of randomness
+ /// Instance of SecureRandom to use.
+ public CmsAuthenticatedDataGenerator(SecureRandom random)
+ : base(random)
+ {
+ }
+
+ /**
+ * generate an enveloped object that contains an CMS Enveloped Data
+ * object using the given provider and the passed in key generator.
+ */
+ private CmsAuthenticatedData Generate(
+ CmsProcessable content,
+ string macOid,
+ CipherKeyGenerator keyGen)
+ {
+ AlgorithmIdentifier macAlgId;
+ KeyParameter encKey;
+ Asn1OctetString encContent;
+ Asn1OctetString macResult;
+
+ try
+ {
+ // FIXME Will this work for macs?
+ byte[] encKeyBytes = keyGen.GenerateKey();
+ encKey = ParameterUtilities.CreateKeyParameter(macOid, encKeyBytes);
+
+ Asn1Encodable asn1Params = GenerateAsn1Parameters(macOid, encKeyBytes);
+
+ macAlgId = GetAlgorithmIdentifier(macOid, encKey, asn1Params, out var cipherParameters);
+
+ IMac mac = MacUtilities.GetMac(macOid);
+ // TODO Confirm no ParametersWithRandom needed
+ // FIXME Only passing key at the moment
+// mac.Init(cipherParameters);
+ mac.Init(encKey);
+
+ var bOut = new MemoryStream();
+ using (var mOut = new TeeOutputStream(bOut, new MacSink(mac)))
+ {
+ content.Write(mOut);
+ }
+
+ encContent = new BerOctetString(bOut.ToArray());
+
+ byte[] macOctets = MacUtilities.DoFinal(mac);
+ macResult = new DerOctetString(macOctets);
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("couldn't create cipher.", e);
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key invalid in message.", e);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("exception decoding algorithm parameters.", e);
+ }
+
+ var recipientInfos = new Asn1EncodableVector();
+
+ foreach (RecipientInfoGenerator rig in recipientInfoGenerators)
+ {
+ try
+ {
+ recipientInfos.Add(rig.Generate(encKey, m_random));
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key inappropriate for algorithm.", e);
+ }
+ catch (GeneralSecurityException e)
+ {
+ throw new CmsException("error making encrypted content.", e);
+ }
+ }
+
+ var eci = new ContentInfo(CmsObjectIdentifiers.Data, encContent);
+
+ var contentInfo = new ContentInfo(
+ CmsObjectIdentifiers.AuthenticatedData,
+ new AuthenticatedData(null, new DerSet(recipientInfos), macAlgId, null, eci, null, macResult, null));
+
+ return new CmsAuthenticatedData(contentInfo);
+ }
+
+ /**
+ * generate an authenticated object that contains an CMS Authenticated Data object
+ */
+ public CmsAuthenticatedData Generate(
+ CmsProcessable content,
+ string encryptionOid)
+ {
+ try
+ {
+ // FIXME Will this work for macs?
+ CipherKeyGenerator keyGen = GeneratorUtilities.GetKeyGenerator(encryptionOid);
+
+ keyGen.Init(new KeyGenerationParameters(m_random, keyGen.DefaultStrength));
+
+ return Generate(content, encryptionOid, keyGen);
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("can't find key generation algorithm.", e);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataGenerator.cs.meta
new file mode 100644
index 00000000..981e9bf4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 25d23bbd7823f1e42a742e064f9050b0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataParser.cs
new file mode 100644
index 00000000..f2b4a0ef
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataParser.cs
@@ -0,0 +1,217 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * Parsing class for an CMS Authenticated Data object from an input stream.
+ *
+ * Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ * that the methods on the parser are called in the appropriate order.
+ *
+ *
+ * Example of use - assuming the first recipient matches the private key we have.
+ *
+ * CMSAuthenticatedDataParser ad = new CMSAuthenticatedDataParser(inputStream);
+ *
+ * RecipientInformationStore recipients = ad.getRecipientInfos();
+ *
+ * Collection c = recipients.getRecipients();
+ * Iterator it = c.iterator();
+ *
+ * if (it.hasNext())
+ * {
+ * RecipientInformation recipient = (RecipientInformation)it.next();
+ *
+ * CMSTypedStream recData = recipient.getContentStream(privateKey, "BC");
+ *
+ * processDataStream(recData.getContentStream());
+ *
+ * if (!Arrays.equals(ad.getMac(), recipient.getMac())
+ * {
+ * System.err.println("Data corrupted!!!!");
+ * }
+ * }
+ *
+ * Note: this class does not introduce buffering - if you are processing large files you should create
+ * the parser with:
+ *
+ * CMSAuthenticatedDataParser ep = new CMSAuthenticatedDataParser(new BufferedInputStream(inputStream, bufSize));
+ *
+ * where bufSize is a suitably large buffer size.
+ *
+ */
+ public class CmsAuthenticatedDataParser
+ : CmsContentInfoParser
+ {
+ internal RecipientInformationStore _recipientInfoStore;
+ internal AuthenticatedDataParser authData;
+
+ private AlgorithmIdentifier macAlg;
+ private byte[] mac;
+ private Asn1.Cms.AttributeTable authAttrs;
+ private Asn1.Cms.AttributeTable unauthAttrs;
+
+ private bool authAttrNotRead;
+ private bool unauthAttrNotRead;
+
+ public CmsAuthenticatedDataParser(
+ byte[] envelopedData)
+ : this(new MemoryStream(envelopedData, false))
+ {
+ }
+
+ public CmsAuthenticatedDataParser(
+ Stream envelopedData)
+ : base(envelopedData)
+ {
+ this.authAttrNotRead = true;
+ this.authData = new AuthenticatedDataParser(
+ (Asn1SequenceParser)contentInfo.GetContent(Asn1Tags.Sequence));
+
+ // TODO Validate version?
+ //DerInteger version = this.authData.getVersion();
+
+ //
+ // read the recipients
+ //
+ Asn1Set recipientInfos = Asn1Set.GetInstance(authData.GetRecipientInfos().ToAsn1Object());
+
+ this.macAlg = authData.GetMacAlgorithm();
+
+ //
+ // read the authenticated content info
+ //
+ ContentInfoParser data = authData.GetEnapsulatedContentInfo();
+ CmsReadable readable = new CmsProcessableInputStream(
+ ((Asn1OctetStringParser)data.GetContent(Asn1Tags.OctetString)).GetOctetStream());
+ CmsSecureReadable secureReadable = new CmsEnvelopedHelper.CmsAuthenticatedSecureReadable(
+ this.macAlg, readable);
+
+ //
+ // build the RecipientInformationStore
+ //
+ this._recipientInfoStore = CmsEnvelopedHelper.BuildRecipientInformationStore(
+ recipientInfos, secureReadable);
+ }
+
+ public AlgorithmIdentifier MacAlgorithmID
+ {
+ get { return macAlg; }
+ }
+
+ /**
+ * return the object identifier for the mac algorithm.
+ */
+ public string MacAlgOid
+ {
+ get { return macAlg.Algorithm.Id; }
+ }
+
+
+ /**
+ * return the ASN.1 encoded encryption algorithm parameters, or null if
+ * there aren't any.
+ */
+ public Asn1Object MacAlgParams
+ {
+ get
+ {
+ Asn1Encodable ae = macAlg.Parameters;
+
+ return ae == null ? null : ae.ToAsn1Object();
+ }
+ }
+
+ /**
+ * return a store of the intended recipients for this message
+ */
+ public RecipientInformationStore GetRecipientInfos()
+ {
+ return _recipientInfoStore;
+ }
+
+ public byte[] GetMac()
+ {
+ if (mac == null)
+ {
+ GetAuthAttrs();
+ mac = authData.GetMac().GetOctets();
+ }
+ return Arrays.Clone(mac);
+ }
+
+ /**
+ * return a table of the unauthenticated attributes indexed by
+ * the OID of the attribute.
+ * @exception java.io.IOException
+ */
+ public Asn1.Cms.AttributeTable GetAuthAttrs()
+ {
+ if (authAttrs == null && authAttrNotRead)
+ {
+ Asn1SetParser s = authData.GetAuthAttrs();
+
+ authAttrNotRead = false;
+
+ if (s != null)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ IAsn1Convertible o;
+ while ((o = s.ReadObject()) != null)
+ {
+ Asn1SequenceParser seq = (Asn1SequenceParser)o;
+
+ v.Add(seq.ToAsn1Object());
+ }
+
+ authAttrs = new Asn1.Cms.AttributeTable(new DerSet(v));
+ }
+ }
+
+ return authAttrs;
+ }
+
+ /**
+ * return a table of the unauthenticated attributes indexed by
+ * the OID of the attribute.
+ * @exception java.io.IOException
+ */
+ public Asn1.Cms.AttributeTable GetUnauthAttrs()
+ {
+ if (unauthAttrs == null && unauthAttrNotRead)
+ {
+ Asn1SetParser s = authData.GetUnauthAttrs();
+
+ unauthAttrNotRead = false;
+
+ if (s != null)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+
+ IAsn1Convertible o;
+ while ((o = s.ReadObject()) != null)
+ {
+ Asn1SequenceParser seq = (Asn1SequenceParser)o;
+
+ v.Add(seq.ToAsn1Object());
+ }
+
+ unauthAttrs = new Asn1.Cms.AttributeTable(new DerSet(v));
+ }
+ }
+
+ return unauthAttrs;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataParser.cs.meta
new file mode 100644
index 00000000..58842960
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 95648b9b5236b4b4aa03f9b0c3a75f88
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataStreamGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataStreamGenerator.cs
new file mode 100644
index 00000000..72d1346f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataStreamGenerator.cs
@@ -0,0 +1,278 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Generators;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * General class for generating a CMS authenticated-data message stream.
+ *
+ * A simple example of usage.
+ *
+ * CMSAuthenticatedDataStreamGenerator edGen = new CMSAuthenticatedDataStreamGenerator();
+ *
+ * edGen.addKeyTransRecipient(cert);
+ *
+ * ByteArrayOutputStream bOut = new ByteArrayOutputStream();
+ *
+ * OutputStream out = edGen.open(
+ * bOut, CMSAuthenticatedDataGenerator.AES128_CBC, "BC");*
+ * out.write(data);
+ *
+ * out.close();
+ *
+ *
+ */
+ public class CmsAuthenticatedDataStreamGenerator
+ : CmsAuthenticatedGenerator
+ {
+ // TODO Add support
+// private object _originatorInfo = null;
+// private object _unprotectedAttributes = null;
+ private int _bufferSize;
+ private bool _berEncodeRecipientSet;
+
+ public CmsAuthenticatedDataStreamGenerator()
+ {
+ }
+
+ /// Constructor allowing specific source of randomness
+ /// Instance of SecureRandom to use.
+ public CmsAuthenticatedDataStreamGenerator(SecureRandom random)
+ : base(random)
+ {
+ }
+
+ /**
+ * Set the underlying string size for encapsulated data
+ *
+ * @param bufferSize length of octet strings to buffer the data.
+ */
+ public void SetBufferSize(
+ int bufferSize)
+ {
+ _bufferSize = bufferSize;
+ }
+
+ /**
+ * Use a BER Set to store the recipient information
+ */
+ public void SetBerEncodeRecipients(
+ bool berEncodeRecipientSet)
+ {
+ _berEncodeRecipientSet = berEncodeRecipientSet;
+ }
+
+ /**
+ * generate an enveloped object that contains an CMS Enveloped Data
+ * object using the given provider and the passed in key generator.
+ * @throws java.io.IOException
+ */
+ private Stream Open(
+ Stream outStr,
+ string macOid,
+ CipherKeyGenerator keyGen)
+ {
+ // FIXME Will this work for macs?
+ byte[] encKeyBytes = keyGen.GenerateKey();
+ KeyParameter encKey = ParameterUtilities.CreateKeyParameter(macOid, encKeyBytes);
+
+ Asn1Encodable asn1Params = GenerateAsn1Parameters(macOid, encKeyBytes);
+
+ ICipherParameters cipherParameters;
+ AlgorithmIdentifier macAlgId = GetAlgorithmIdentifier(
+ macOid, encKey, asn1Params, out cipherParameters);
+
+ Asn1EncodableVector recipientInfos = new Asn1EncodableVector();
+
+ foreach (RecipientInfoGenerator rig in recipientInfoGenerators)
+ {
+ try
+ {
+ recipientInfos.Add(rig.Generate(encKey, m_random));
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key inappropriate for algorithm.", e);
+ }
+ catch (GeneralSecurityException e)
+ {
+ throw new CmsException("error making encrypted content.", e);
+ }
+ }
+
+ // FIXME Only passing key at the moment
+// return Open(outStr, macAlgId, cipherParameters, recipientInfos);
+ return Open(outStr, macAlgId, encKey, recipientInfos);
+ }
+
+ protected Stream Open(
+ Stream outStr,
+ AlgorithmIdentifier macAlgId,
+ ICipherParameters cipherParameters,
+ Asn1EncodableVector recipientInfos)
+ {
+ try
+ {
+ //
+ // ContentInfo
+ //
+ BerSequenceGenerator cGen = new BerSequenceGenerator(outStr);
+
+ cGen.AddObject(CmsObjectIdentifiers.AuthenticatedData);
+
+ //
+ // Authenticated Data
+ //
+ BerSequenceGenerator authGen = new BerSequenceGenerator(
+ cGen.GetRawOutputStream(), 0, true);
+
+ authGen.AddObject(new DerInteger(AuthenticatedData.CalculateVersion(null)));
+
+ Stream authRaw = authGen.GetRawOutputStream();
+ Asn1Generator recipGen = _berEncodeRecipientSet
+ ? (Asn1Generator) new BerSetGenerator(authRaw)
+ : new DerSetGenerator(authRaw);
+
+ foreach (Asn1Encodable ae in recipientInfos)
+ {
+ recipGen.AddObject(ae);
+ }
+
+ recipGen.Close();
+
+ authGen.AddObject(macAlgId);
+
+ BerSequenceGenerator eiGen = new BerSequenceGenerator(authRaw);
+ eiGen.AddObject(CmsObjectIdentifiers.Data);
+
+ Stream octetOutputStream = CmsUtilities.CreateBerOctetOutputStream(
+ eiGen.GetRawOutputStream(), 0, true, _bufferSize);
+
+ IMac mac = MacUtilities.GetMac(macAlgId.Algorithm);
+ // TODO Confirm no ParametersWithRandom needed
+ mac.Init(cipherParameters);
+ Stream mOut = new TeeOutputStream(octetOutputStream, new MacSink(mac));
+
+ return new CmsAuthenticatedDataOutputStream(mOut, mac, cGen, authGen, eiGen);
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("couldn't create cipher.", e);
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key invalid in message.", e);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("exception decoding algorithm parameters.", e);
+ }
+ }
+
+ /**
+ * generate an enveloped object that contains an CMS Enveloped Data object
+ */
+ public Stream Open(
+ Stream outStr,
+ string encryptionOid)
+ {
+ CipherKeyGenerator keyGen = GeneratorUtilities.GetKeyGenerator(encryptionOid);
+
+ keyGen.Init(new KeyGenerationParameters(m_random, keyGen.DefaultStrength));
+
+ return Open(outStr, encryptionOid, keyGen);
+ }
+
+ /**
+ * generate an enveloped object that contains an CMS Enveloped Data object
+ */
+ public Stream Open(
+ Stream outStr,
+ string encryptionOid,
+ int keySize)
+ {
+ CipherKeyGenerator keyGen = GeneratorUtilities.GetKeyGenerator(encryptionOid);
+
+ keyGen.Init(new KeyGenerationParameters(m_random, keySize));
+
+ return Open(outStr, encryptionOid, keyGen);
+ }
+
+ private class CmsAuthenticatedDataOutputStream
+ : BaseOutputStream
+ {
+ private readonly Stream macStream;
+ private readonly IMac mac;
+ private readonly BerSequenceGenerator cGen;
+ private readonly BerSequenceGenerator authGen;
+ private readonly BerSequenceGenerator eiGen;
+
+ public CmsAuthenticatedDataOutputStream(
+ Stream macStream,
+ IMac mac,
+ BerSequenceGenerator cGen,
+ BerSequenceGenerator authGen,
+ BerSequenceGenerator eiGen)
+ {
+ this.macStream = macStream;
+ this.mac = mac;
+ this.cGen = cGen;
+ this.authGen = authGen;
+ this.eiGen = eiGen;
+ }
+
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ macStream.Write(buffer, offset, count);
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override void Write(ReadOnlySpan buffer)
+ {
+ macStream.Write(buffer);
+ }
+#endif
+
+ public override void WriteByte(byte value)
+ {
+ macStream.WriteByte(value);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ macStream.Dispose();
+
+ // TODO Parent context(s) should really be be closed explicitly
+
+ eiGen.Close();
+
+ // [TODO] auth attributes go here
+ byte[] macOctets = MacUtilities.DoFinal(mac);
+ authGen.AddObject(new DerOctetString(macOctets));
+ // [TODO] unauth attributes go here
+
+ authGen.Close();
+ cGen.Close();
+ }
+ base.Dispose(disposing);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataStreamGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataStreamGenerator.cs.meta
new file mode 100644
index 00000000..aadba0f7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedDataStreamGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6fb5b483ab0440249a2819f3563513cd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedGenerator.cs
new file mode 100644
index 00000000..fa34c7cb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedGenerator.cs
@@ -0,0 +1,32 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Date;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ public class CmsAuthenticatedGenerator
+ : CmsEnvelopedGenerator
+ {
+ public CmsAuthenticatedGenerator()
+ {
+ }
+
+ /// Constructor allowing specific source of randomness
+ /// Instance of SecureRandom to use.
+ public CmsAuthenticatedGenerator(SecureRandom random)
+ : base(random)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedGenerator.cs.meta
new file mode 100644
index 00000000..6564691d
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSAuthenticatedGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 53a33dbe3f29a674d874fd853b9f018a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedData.cs
new file mode 100644
index 00000000..6b102536
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedData.cs
@@ -0,0 +1,110 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO.Compression;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * containing class for an CMS Compressed Data object
+ */
+ public class CmsCompressedData
+ {
+ internal ContentInfo contentInfo;
+
+ public CmsCompressedData(
+ byte[] compressedData)
+ : this(CmsUtilities.ReadContentInfo(compressedData))
+ {
+ }
+
+ public CmsCompressedData(
+ Stream compressedDataStream)
+ : this(CmsUtilities.ReadContentInfo(compressedDataStream))
+ {
+ }
+
+ public CmsCompressedData(
+ ContentInfo contentInfo)
+ {
+ this.contentInfo = contentInfo;
+ }
+
+ /**
+ * Return the uncompressed content.
+ *
+ * @return the uncompressed content
+ * @throws CmsException if there is an exception uncompressing the data.
+ */
+ public byte[] GetContent()
+ {
+ CompressedData comData = CompressedData.GetInstance(contentInfo.Content);
+ ContentInfo content = comData.EncapContentInfo;
+
+ Asn1OctetString bytes = (Asn1OctetString) content.Content;
+ Stream zIn = ZLib.DecompressInput(bytes.GetOctetStream());
+
+ try
+ {
+ return CmsUtilities.StreamToByteArray(zIn);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("exception reading compressed stream.", e);
+ }
+ finally
+ {
+ zIn.Dispose();
+ }
+ }
+
+ /**
+ * Return the uncompressed content, throwing an exception if the data size
+ * is greater than the passed in limit. If the content is exceeded getCause()
+ * on the CMSException will contain a StreamOverflowException
+ *
+ * @param limit maximum number of bytes to read
+ * @return the content read
+ * @throws CMSException if there is an exception uncompressing the data.
+ */
+ public byte[] GetContent(int limit)
+ {
+ CompressedData comData = CompressedData.GetInstance(contentInfo.Content);
+ ContentInfo content = comData.EncapContentInfo;
+
+ Asn1OctetString bytes = (Asn1OctetString)content.Content;
+ Stream zIn = ZLib.DecompressInput(bytes.GetOctetStream());
+
+ try
+ {
+ return CmsUtilities.StreamToByteArray(zIn, limit);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("exception reading compressed stream.", e);
+ }
+ }
+
+ /**
+ * return the ContentInfo
+ */
+ public ContentInfo ContentInfo
+ {
+ get { return contentInfo; }
+ }
+
+ /**
+ * return the ASN.1 encoded representation of this object.
+ */
+ public byte[] GetEncoded()
+ {
+ return contentInfo.GetEncoded();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedData.cs.meta
new file mode 100644
index 00000000..85af25d9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 10f6e517565a097428e368254f0aad47
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataGenerator.cs
new file mode 100644
index 00000000..7ea6d916
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataGenerator.cs
@@ -0,0 +1,71 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * General class for generating a compressed CMS message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * CMSCompressedDataGenerator fact = new CMSCompressedDataGenerator();
+ * CMSCompressedData data = fact.Generate(content, algorithm);
+ *
+ *
+ */
+ public class CmsCompressedDataGenerator
+ {
+ public static readonly string ZLib = CmsObjectIdentifiers.ZlibCompress.Id;
+
+ public CmsCompressedDataGenerator()
+ {
+ }
+
+ /**
+ * Generate an object that contains an CMS Compressed Data
+ */
+ public CmsCompressedData Generate(CmsProcessable content, string compressionOid)
+ {
+ if (ZLib != compressionOid)
+ throw new ArgumentException("Unsupported compression algorithm: " + compressionOid,
+ nameof(compressionOid));
+
+ AlgorithmIdentifier comAlgId;
+ Asn1OctetString comOcts;
+
+ try
+ {
+ MemoryStream bOut = new MemoryStream();
+
+ using (var zOut = Utilities.IO.Compression.ZLib.CompressOutput(bOut, -1))
+ {
+ content.Write(zOut);
+ }
+
+ comAlgId = new AlgorithmIdentifier(CmsObjectIdentifiers.ZlibCompress);
+ comOcts = new BerOctetString(bOut.ToArray());
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("exception encoding data.", e);
+ }
+
+ ContentInfo comContent = new ContentInfo(CmsObjectIdentifiers.Data, comOcts);
+ ContentInfo contentInfo = new ContentInfo(
+ CmsObjectIdentifiers.CompressedData,
+ new CompressedData(comAlgId, comContent));
+
+ return new CmsCompressedData(contentInfo);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataGenerator.cs.meta
new file mode 100644
index 00000000..6e2d9d5c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 158de0bc0c369f54b99e9d3e3f175d99
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataParser.cs
new file mode 100644
index 00000000..6ce9cef3
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataParser.cs
@@ -0,0 +1,61 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO.Compression;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * Class for reading a CMS Compressed Data stream.
+ *
+ * CMSCompressedDataParser cp = new CMSCompressedDataParser(inputStream);
+ *
+ * process(cp.GetContent().GetContentStream());
+ *
+ * Note: this class does not introduce buffering - if you are processing large files you should create
+ * the parser with:
+ *
+ * CMSCompressedDataParser ep = new CMSCompressedDataParser(new BufferedInputStream(inputStream, bufSize));
+ *
+ * where bufSize is a suitably large buffer size.
+ */
+ public class CmsCompressedDataParser
+ : CmsContentInfoParser
+ {
+ public CmsCompressedDataParser(
+ byte[] compressedData)
+ : this(new MemoryStream(compressedData, false))
+ {
+ }
+
+ public CmsCompressedDataParser(
+ Stream compressedData)
+ : base(compressedData)
+ {
+ }
+
+ public CmsTypedStream GetContent()
+ {
+ try
+ {
+ CompressedDataParser comData = new CompressedDataParser((Asn1SequenceParser)this.contentInfo.GetContent(Asn1Tags.Sequence));
+ ContentInfoParser content = comData.GetEncapContentInfo();
+
+ Asn1OctetStringParser bytes = (Asn1OctetStringParser)content.GetContent(Asn1Tags.OctetString);
+ Stream zIn = ZLib.DecompressInput(bytes.GetOctetStream());
+
+ return new CmsTypedStream(content.ContentType.ToString(), zIn);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("IOException reading compressed content.", e);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataParser.cs.meta
new file mode 100644
index 00000000..6932526f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: be730886476da2f49814420c94394e91
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataStreamGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataStreamGenerator.cs
new file mode 100644
index 00000000..3390410c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataStreamGenerator.cs
@@ -0,0 +1,154 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * General class for generating a compressed CMS message stream.
+ *
+ * A simple example of usage.
+ *
+ *
+ * CMSCompressedDataStreamGenerator gen = new CMSCompressedDataStreamGenerator();
+ *
+ * Stream cOut = gen.Open(outputStream, CMSCompressedDataStreamGenerator.ZLIB);
+ *
+ * cOut.Write(data);
+ *
+ * cOut.Close();
+ *
+ */
+ public class CmsCompressedDataStreamGenerator
+ {
+ public static readonly string ZLib = CmsObjectIdentifiers.ZlibCompress.Id;
+
+ private int _bufferSize;
+
+ /**
+ * base constructor
+ */
+ public CmsCompressedDataStreamGenerator()
+ {
+ }
+
+ /**
+ * Set the underlying string size for encapsulated data
+ *
+ * @param bufferSize length of octet strings to buffer the data.
+ */
+ public void SetBufferSize(int bufferSize)
+ {
+ _bufferSize = bufferSize;
+ }
+
+ public Stream Open(Stream outStream)
+ {
+ return Open(outStream, CmsObjectIdentifiers.Data.Id, ZLib);
+ }
+
+ public Stream Open(Stream outStream, string compressionOid)
+ {
+ return Open(outStream, CmsObjectIdentifiers.Data.Id, compressionOid);
+ }
+
+ public Stream Open(Stream outStream, string contentOid, string compressionOid)
+ {
+ if (ZLib != compressionOid)
+ throw new ArgumentException("Unsupported compression algorithm: " + compressionOid,
+ nameof(compressionOid));
+
+ BerSequenceGenerator sGen = new BerSequenceGenerator(outStream);
+
+ sGen.AddObject(CmsObjectIdentifiers.CompressedData);
+
+ //
+ // Compressed Data
+ //
+ BerSequenceGenerator cGen = new BerSequenceGenerator(
+ sGen.GetRawOutputStream(), 0, true);
+
+ // CMSVersion
+ cGen.AddObject(new DerInteger(0));
+
+ // CompressionAlgorithmIdentifier
+ cGen.AddObject(new AlgorithmIdentifier(CmsObjectIdentifiers.ZlibCompress));
+
+ //
+ // Encapsulated ContentInfo
+ //
+ BerSequenceGenerator eiGen = new BerSequenceGenerator(cGen.GetRawOutputStream());
+
+ eiGen.AddObject(new DerObjectIdentifier(contentOid));
+
+ Stream octetStream = CmsUtilities.CreateBerOctetOutputStream(
+ eiGen.GetRawOutputStream(), 0, true, _bufferSize);
+
+ return new CmsCompressedOutputStream(
+ Utilities.IO.Compression.ZLib.CompressOutput(octetStream, -1), sGen, cGen, eiGen);
+ }
+
+ private class CmsCompressedOutputStream
+ : BaseOutputStream
+ {
+ private Stream _out;
+ private BerSequenceGenerator _sGen;
+ private BerSequenceGenerator _cGen;
+ private BerSequenceGenerator _eiGen;
+
+ internal CmsCompressedOutputStream(
+ Stream outStream,
+ BerSequenceGenerator sGen,
+ BerSequenceGenerator cGen,
+ BerSequenceGenerator eiGen)
+ {
+ _out = outStream;
+ _sGen = sGen;
+ _cGen = cGen;
+ _eiGen = eiGen;
+ }
+
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ _out.Write(buffer, offset, count);
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override void Write(ReadOnlySpan buffer)
+ {
+ _out.Write(buffer);
+ }
+#endif
+
+ public override void WriteByte(byte value)
+ {
+ _out.WriteByte(value);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ _out.Dispose();
+
+ // TODO Parent context(s) should really be be closed explicitly
+
+ _eiGen.Close();
+ _cGen.Close();
+ _sGen.Close();
+ }
+ base.Dispose(disposing);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataStreamGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataStreamGenerator.cs.meta
new file mode 100644
index 00000000..4cef8db0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSCompressedDataStreamGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9facf6599405875498d185ce4a1100c3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSContentInfoParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSContentInfoParser.cs
new file mode 100644
index 00000000..51549c21
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSContentInfoParser.cs
@@ -0,0 +1,52 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ public class CmsContentInfoParser
+ {
+ protected ContentInfoParser contentInfo;
+ protected Stream data;
+
+ protected CmsContentInfoParser(
+ Stream data)
+ {
+ if (data == null)
+ throw new ArgumentNullException("data");
+
+ this.data = data;
+
+ try
+ {
+ Asn1StreamParser inStream = new Asn1StreamParser(data);
+
+ this.contentInfo = new ContentInfoParser((Asn1SequenceParser)inStream.ReadObject());
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("IOException reading content.", e);
+ }
+ catch (InvalidCastException e)
+ {
+ throw new CmsException("Unexpected object reading content.", e);
+ }
+ }
+
+ /**
+ * Close the underlying data stream.
+ * @throws IOException if the close fails.
+ */
+ public void Close()
+ {
+ data.Dispose();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSContentInfoParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSContentInfoParser.cs.meta
new file mode 100644
index 00000000..dbaf6e43
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSContentInfoParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 32f14f09031fe3e419292433deeebad6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedData.cs
new file mode 100644
index 00000000..c76d2b6f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedData.cs
@@ -0,0 +1,116 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * containing class for an CMS Enveloped Data object
+ */
+ public class CmsEnvelopedData
+ {
+ internal RecipientInformationStore recipientInfoStore;
+ internal ContentInfo contentInfo;
+
+ private AlgorithmIdentifier encAlg;
+ private Asn1Set unprotectedAttributes;
+
+ public CmsEnvelopedData(
+ byte[] envelopedData)
+ : this(CmsUtilities.ReadContentInfo(envelopedData))
+ {
+ }
+
+ public CmsEnvelopedData(
+ Stream envelopedData)
+ : this(CmsUtilities.ReadContentInfo(envelopedData))
+ {
+ }
+
+ public CmsEnvelopedData(
+ ContentInfo contentInfo)
+ {
+ this.contentInfo = contentInfo;
+
+ EnvelopedData envData = EnvelopedData.GetInstance(contentInfo.Content);
+
+ //
+ // read the recipients
+ //
+ Asn1Set recipientInfos = envData.RecipientInfos;
+
+ //
+ // read the encrypted content info
+ //
+ EncryptedContentInfo encInfo = envData.EncryptedContentInfo;
+ this.encAlg = encInfo.ContentEncryptionAlgorithm;
+ CmsReadable readable = new CmsProcessableByteArray(encInfo.EncryptedContent.GetOctets());
+ CmsSecureReadable secureReadable = new CmsEnvelopedHelper.CmsEnvelopedSecureReadable(
+ this.encAlg, readable);
+
+ //
+ // build the RecipientInformationStore
+ //
+ this.recipientInfoStore = CmsEnvelopedHelper.BuildRecipientInformationStore(
+ recipientInfos, secureReadable);
+
+ this.unprotectedAttributes = envData.UnprotectedAttrs;
+ }
+
+ public AlgorithmIdentifier EncryptionAlgorithmID
+ {
+ get { return encAlg; }
+ }
+
+ /**
+ * return the object identifier for the content encryption algorithm.
+ */
+ public string EncryptionAlgOid
+ {
+ get { return encAlg.Algorithm.Id; }
+ }
+
+ /**
+ * return a store of the intended recipients for this message
+ */
+ public RecipientInformationStore GetRecipientInfos()
+ {
+ return recipientInfoStore;
+ }
+
+ /**
+ * return the ContentInfo
+ */
+ public ContentInfo ContentInfo
+ {
+ get { return contentInfo; }
+ }
+
+ /**
+ * return a table of the unprotected attributes indexed by
+ * the OID of the attribute.
+ */
+ public Asn1.Cms.AttributeTable GetUnprotectedAttributes()
+ {
+ if (unprotectedAttributes == null)
+ return null;
+
+ return new Asn1.Cms.AttributeTable(unprotectedAttributes);
+ }
+
+ /**
+ * return the ASN.1 encoded representation of this object.
+ */
+ public byte[] GetEncoded()
+ {
+ return contentInfo.GetEncoded();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedData.cs.meta
new file mode 100644
index 00000000..69fd9f9a
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 79a5a0a284b681541ab4989a779016bf
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataGenerator.cs
new file mode 100644
index 00000000..ebfeaa04
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataGenerator.cs
@@ -0,0 +1,246 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ ///
+ /// General class for generating a CMS enveloped-data message.
+ ///
+ /// A simple example of usage.
+ ///
+ ///
+ /// CmsEnvelopedDataGenerator fact = new CmsEnvelopedDataGenerator();
+ ///
+ /// fact.AddKeyTransRecipient(cert);
+ ///
+ /// CmsEnvelopedData data = fact.Generate(content, algorithm);
+ ///
+ ///
+ public class CmsEnvelopedDataGenerator
+ : CmsEnvelopedGenerator
+ {
+ public CmsEnvelopedDataGenerator()
+ {
+ }
+
+ /// Constructor allowing specific source of randomness
+ /// Instance of SecureRandom to use.
+ public CmsEnvelopedDataGenerator(SecureRandom random)
+ : base(random)
+ {
+ }
+
+ ///
+ /// Generate an enveloped object that contains a CMS Enveloped Data
+ /// object using the passed in key generator.
+ ///
+ private CmsEnvelopedData Generate(
+ CmsProcessable content,
+ string encryptionOid,
+ CipherKeyGenerator keyGen)
+ {
+ AlgorithmIdentifier encAlgId = null;
+ KeyParameter encKey;
+ Asn1OctetString encContent;
+
+ try
+ {
+ byte[] encKeyBytes = keyGen.GenerateKey();
+ encKey = ParameterUtilities.CreateKeyParameter(encryptionOid, encKeyBytes);
+
+ Asn1Encodable asn1Params = GenerateAsn1Parameters(encryptionOid, encKeyBytes);
+
+ ICipherParameters cipherParameters;
+ encAlgId = GetAlgorithmIdentifier(
+ encryptionOid, encKey, asn1Params, out cipherParameters);
+
+ IBufferedCipher cipher = CipherUtilities.GetCipher(encryptionOid);
+ cipher.Init(true, new ParametersWithRandom(cipherParameters, m_random));
+
+ MemoryStream bOut = new MemoryStream();
+ using (var cOut = new CipherStream(bOut, null, cipher))
+ {
+ content.Write(cOut);
+ }
+
+ encContent = new BerOctetString(bOut.ToArray());
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("couldn't create cipher.", e);
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key invalid in message.", e);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("exception decoding algorithm parameters.", e);
+ }
+
+
+ Asn1EncodableVector recipientInfos = new Asn1EncodableVector();
+
+ foreach (RecipientInfoGenerator rig in recipientInfoGenerators)
+ {
+ try
+ {
+ recipientInfos.Add(rig.Generate(encKey, m_random));
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key inappropriate for algorithm.", e);
+ }
+ catch (GeneralSecurityException e)
+ {
+ throw new CmsException("error making encrypted content.", e);
+ }
+ }
+
+ EncryptedContentInfo eci = new EncryptedContentInfo(
+ CmsObjectIdentifiers.Data,
+ encAlgId,
+ encContent);
+
+ Asn1Set unprotectedAttrSet = null;
+ if (unprotectedAttributeGenerator != null)
+ {
+ Asn1.Cms.AttributeTable attrTable = unprotectedAttributeGenerator.GetAttributes(
+ new Dictionary());
+
+ unprotectedAttrSet = new BerSet(attrTable.ToAsn1EncodableVector());
+ }
+
+ ContentInfo contentInfo = new ContentInfo(
+ CmsObjectIdentifiers.EnvelopedData,
+ new EnvelopedData(null, new DerSet(recipientInfos), eci, unprotectedAttrSet));
+
+ return new CmsEnvelopedData(contentInfo);
+ }
+
+ /// Generate an enveloped object that contains an CMS Enveloped Data object.
+ public CmsEnvelopedData Generate(
+ CmsProcessable content,
+ string encryptionOid)
+ {
+ try
+ {
+ CipherKeyGenerator keyGen = GeneratorUtilities.GetKeyGenerator(encryptionOid);
+
+ keyGen.Init(new KeyGenerationParameters(m_random, keyGen.DefaultStrength));
+
+ return Generate(content, encryptionOid, keyGen);
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("can't find key generation algorithm.", e);
+ }
+ }
+
+
+ public CmsEnvelopedData Generate(CmsProcessable content, ICipherBuilderWithKey cipherBuilder)
+ {
+ //AlgorithmIdentifier encAlgId = null;
+ KeyParameter encKey;
+ Asn1OctetString encContent;
+
+ try
+ {
+ encKey = (KeyParameter) cipherBuilder.Key;
+
+ MemoryStream collector = new MemoryStream();
+ var cipher = cipherBuilder.BuildCipher(collector);
+ using (var bOut = cipher.Stream)
+ {
+ content.Write(bOut);
+ }
+
+ encContent = new BerOctetString(collector.ToArray());
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("couldn't create cipher.", e);
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key invalid in message.", e);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("exception decoding algorithm parameters.", e);
+ }
+
+
+ Asn1EncodableVector recipientInfos = new Asn1EncodableVector();
+
+ foreach (RecipientInfoGenerator rig in recipientInfoGenerators)
+ {
+ try
+ {
+ recipientInfos.Add(rig.Generate(encKey, m_random));
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key inappropriate for algorithm.", e);
+ }
+ catch (GeneralSecurityException e)
+ {
+ throw new CmsException("error making encrypted content.", e);
+ }
+ }
+
+ EncryptedContentInfo eci = new EncryptedContentInfo(
+ CmsObjectIdentifiers.Data,
+ (AlgorithmIdentifier) cipherBuilder.AlgorithmDetails,
+ encContent);
+
+ Asn1Set unprotectedAttrSet = null;
+ if (unprotectedAttributeGenerator != null)
+ {
+ Asn1.Cms.AttributeTable attrTable = unprotectedAttributeGenerator.GetAttributes(
+ new Dictionary());
+
+ unprotectedAttrSet = new BerSet(attrTable.ToAsn1EncodableVector());
+ }
+
+ ContentInfo contentInfo = new ContentInfo(
+ CmsObjectIdentifiers.EnvelopedData,
+ new EnvelopedData(null, new DerSet(recipientInfos), eci, unprotectedAttrSet));
+
+ return new CmsEnvelopedData(contentInfo);
+ }
+
+ /// Generate an enveloped object that contains an CMS Enveloped Data object.
+ public CmsEnvelopedData Generate(
+ CmsProcessable content,
+ string encryptionOid,
+ int keySize)
+ {
+ try
+ {
+ CipherKeyGenerator keyGen = GeneratorUtilities.GetKeyGenerator(encryptionOid);
+
+ keyGen.Init(new KeyGenerationParameters(m_random, keySize));
+
+ return Generate(content, encryptionOid, keyGen);
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("can't find key generation algorithm.", e);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataGenerator.cs.meta
new file mode 100644
index 00000000..61408bb6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 84cd9ec96847d5c4f955b9c64028b1c8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataParser.cs
new file mode 100644
index 00000000..03c054a2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataParser.cs
@@ -0,0 +1,163 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * Parsing class for an CMS Enveloped Data object from an input stream.
+ *
+ * Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ * that the methods on the parser are called in the appropriate order.
+ *
+ *
+ * Example of use - assuming the first recipient matches the private key we have.
+ *
+ * CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(inputStream);
+ *
+ * RecipientInformationStore recipients = ep.GetRecipientInfos();
+ *
+ * Collection c = recipients.getRecipients();
+ * Iterator it = c.iterator();
+ *
+ * if (it.hasNext())
+ * {
+ * RecipientInformation recipient = (RecipientInformation)it.next();
+ *
+ * CMSTypedStream recData = recipient.getContentStream(privateKey);
+ *
+ * processDataStream(recData.getContentStream());
+ * }
+ *
+ * Note: this class does not introduce buffering - if you are processing large files you should create
+ * the parser with:
+ *
+ * CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(new BufferedInputStream(inputStream, bufSize));
+ *
+ * where bufSize is a suitably large buffer size.
+ *
+ */
+ public class CmsEnvelopedDataParser
+ : CmsContentInfoParser
+ {
+ internal RecipientInformationStore recipientInfoStore;
+ internal EnvelopedDataParser envelopedData;
+
+ private AlgorithmIdentifier _encAlg;
+ private Asn1.Cms.AttributeTable _unprotectedAttributes;
+ private bool _attrNotRead;
+
+ public CmsEnvelopedDataParser(
+ byte[] envelopedData)
+ : this(new MemoryStream(envelopedData, false))
+ {
+ }
+
+ public CmsEnvelopedDataParser(
+ Stream envelopedData)
+ : base(envelopedData)
+ {
+ this._attrNotRead = true;
+ this.envelopedData = new EnvelopedDataParser(
+ (Asn1SequenceParser)this.contentInfo.GetContent(Asn1Tags.Sequence));
+
+ // TODO Validate version?
+ //DerInteger version = this.envelopedData.Version;
+
+ //
+ // read the recipients
+ //
+ Asn1Set recipientInfos = Asn1Set.GetInstance(this.envelopedData.GetRecipientInfos().ToAsn1Object());
+
+ //
+ // read the encrypted content info
+ //
+ EncryptedContentInfoParser encInfo = this.envelopedData.GetEncryptedContentInfo();
+ this._encAlg = encInfo.ContentEncryptionAlgorithm;
+ CmsReadable readable = new CmsProcessableInputStream(
+ ((Asn1OctetStringParser)encInfo.GetEncryptedContent(Asn1Tags.OctetString)).GetOctetStream());
+ CmsSecureReadable secureReadable = new CmsEnvelopedHelper.CmsEnvelopedSecureReadable(
+ this._encAlg, readable);
+
+ //
+ // build the RecipientInformationStore
+ //
+ this.recipientInfoStore = CmsEnvelopedHelper.BuildRecipientInformationStore(
+ recipientInfos, secureReadable);
+ }
+
+ public AlgorithmIdentifier EncryptionAlgorithmID
+ {
+ get { return _encAlg; }
+ }
+
+ /**
+ * return the object identifier for the content encryption algorithm.
+ */
+ public string EncryptionAlgOid
+ {
+ get { return _encAlg.Algorithm.Id; }
+ }
+
+ /**
+ * return the ASN.1 encoded encryption algorithm parameters, or null if
+ * there aren't any.
+ */
+ public Asn1Object EncryptionAlgParams
+ {
+ get
+ {
+ Asn1Encodable ae = _encAlg.Parameters;
+
+ return ae == null ? null : ae.ToAsn1Object();
+ }
+ }
+
+ /**
+ * return a store of the intended recipients for this message
+ */
+ public RecipientInformationStore GetRecipientInfos()
+ {
+ return this.recipientInfoStore;
+ }
+
+ /**
+ * return a table of the unprotected attributes indexed by
+ * the OID of the attribute.
+ * @throws IOException
+ */
+ public Asn1.Cms.AttributeTable GetUnprotectedAttributes()
+ {
+ if (_unprotectedAttributes == null && _attrNotRead)
+ {
+ Asn1SetParser asn1Set = this.envelopedData.GetUnprotectedAttrs();
+
+ _attrNotRead = false;
+
+ if (asn1Set != null)
+ {
+ Asn1EncodableVector v = new Asn1EncodableVector();
+ IAsn1Convertible o;
+
+ while ((o = asn1Set.ReadObject()) != null)
+ {
+ Asn1SequenceParser seq = (Asn1SequenceParser)o;
+
+ v.Add(seq.ToAsn1Object());
+ }
+
+ _unprotectedAttributes = new Asn1.Cms.AttributeTable(new DerSet(v));
+ }
+ }
+
+ return _unprotectedAttributes;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataParser.cs.meta
new file mode 100644
index 00000000..e4fa71d9
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: accc6770066b7214c803b0d593600a71
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataStreamGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataStreamGenerator.cs
new file mode 100644
index 00000000..ad4ecdb7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataStreamGenerator.cs
@@ -0,0 +1,286 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * General class for generating a CMS enveloped-data message stream.
+ *
+ * A simple example of usage.
+ *
+ * CmsEnvelopedDataStreamGenerator edGen = new CmsEnvelopedDataStreamGenerator();
+ *
+ * edGen.AddKeyTransRecipient(cert);
+ *
+ * MemoryStream bOut = new MemoryStream();
+ *
+ * Stream out = edGen.Open(
+ * bOut, CMSEnvelopedDataGenerator.AES128_CBC);*
+ * out.Write(data);
+ *
+ * out.Close();
+ *
+ *
+ */
+ public class CmsEnvelopedDataStreamGenerator
+ : CmsEnvelopedGenerator
+ {
+ private object _originatorInfo = null;
+ private object _unprotectedAttributes = null;
+ private int _bufferSize;
+ private bool _berEncodeRecipientSet;
+
+ public CmsEnvelopedDataStreamGenerator()
+ {
+ }
+
+ /// Constructor allowing specific source of randomness
+ /// Instance of SecureRandom to use.
+ public CmsEnvelopedDataStreamGenerator(SecureRandom random)
+ : base(random)
+ {
+ }
+
+ /// Set the underlying string size for encapsulated data.
+ /// Length of octet strings to buffer the data.
+ public void SetBufferSize(
+ int bufferSize)
+ {
+ _bufferSize = bufferSize;
+ }
+
+ /// Use a BER Set to store the recipient information.
+ public void SetBerEncodeRecipients(
+ bool berEncodeRecipientSet)
+ {
+ _berEncodeRecipientSet = berEncodeRecipientSet;
+ }
+
+ private DerInteger Version
+ {
+ get
+ {
+ int version = (_originatorInfo != null || _unprotectedAttributes != null)
+ ? 2
+ : 0;
+
+ return new DerInteger(version);
+ }
+ }
+
+ ///
+ /// Generate an enveloped object that contains an CMS Enveloped Data
+ /// object using the passed in key generator.
+ ///
+ private Stream Open(
+ Stream outStream,
+ string encryptionOid,
+ CipherKeyGenerator keyGen)
+ {
+ byte[] encKeyBytes = keyGen.GenerateKey();
+ KeyParameter encKey = ParameterUtilities.CreateKeyParameter(encryptionOid, encKeyBytes);
+
+ Asn1Encodable asn1Params = GenerateAsn1Parameters(encryptionOid, encKeyBytes);
+
+ ICipherParameters cipherParameters;
+ AlgorithmIdentifier encAlgID = GetAlgorithmIdentifier(
+ encryptionOid, encKey, asn1Params, out cipherParameters);
+
+ Asn1EncodableVector recipientInfos = new Asn1EncodableVector();
+
+ foreach (RecipientInfoGenerator rig in recipientInfoGenerators)
+ {
+ try
+ {
+ recipientInfos.Add(rig.Generate(encKey, m_random));
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key inappropriate for algorithm.", e);
+ }
+ catch (GeneralSecurityException e)
+ {
+ throw new CmsException("error making encrypted content.", e);
+ }
+ }
+
+ return Open(outStream, encAlgID, cipherParameters, recipientInfos);
+ }
+
+ private Stream Open(
+ Stream outStream,
+ AlgorithmIdentifier encAlgID,
+ ICipherParameters cipherParameters,
+ Asn1EncodableVector recipientInfos)
+ {
+ try
+ {
+ //
+ // ContentInfo
+ //
+ BerSequenceGenerator cGen = new BerSequenceGenerator(outStream);
+
+ cGen.AddObject(CmsObjectIdentifiers.EnvelopedData);
+
+ //
+ // Encrypted Data
+ //
+ BerSequenceGenerator envGen = new BerSequenceGenerator(
+ cGen.GetRawOutputStream(), 0, true);
+
+ envGen.AddObject(this.Version);
+
+ Stream envRaw = envGen.GetRawOutputStream();
+ Asn1Generator recipGen = _berEncodeRecipientSet
+ ? (Asn1Generator) new BerSetGenerator(envRaw)
+ : new DerSetGenerator(envRaw);
+
+ foreach (Asn1Encodable ae in recipientInfos)
+ {
+ recipGen.AddObject(ae);
+ }
+
+ recipGen.Close();
+
+ BerSequenceGenerator eiGen = new BerSequenceGenerator(envRaw);
+ eiGen.AddObject(CmsObjectIdentifiers.Data);
+ eiGen.AddObject(encAlgID);
+
+ Stream octetOutputStream = CmsUtilities.CreateBerOctetOutputStream(
+ eiGen.GetRawOutputStream(), 0, false, _bufferSize);
+
+ IBufferedCipher cipher = CipherUtilities.GetCipher(encAlgID.Algorithm);
+ cipher.Init(true, new ParametersWithRandom(cipherParameters, m_random));
+ CipherStream cOut = new CipherStream(octetOutputStream, null, cipher);
+
+ return new CmsEnvelopedDataOutputStream(this, cOut, cGen, envGen, eiGen);
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("couldn't create cipher.", e);
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key invalid in message.", e);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("exception decoding algorithm parameters.", e);
+ }
+ }
+
+ /**
+ * generate an enveloped object that contains an CMS Enveloped Data object
+ * @throws IOException
+ */
+ public Stream Open(
+ Stream outStream,
+ string encryptionOid)
+ {
+ CipherKeyGenerator keyGen = GeneratorUtilities.GetKeyGenerator(encryptionOid);
+
+ keyGen.Init(new KeyGenerationParameters(m_random, keyGen.DefaultStrength));
+
+ return Open(outStream, encryptionOid, keyGen);
+ }
+
+ /**
+ * generate an enveloped object that contains an CMS Enveloped Data object
+ * @throws IOException
+ */
+ public Stream Open(
+ Stream outStream,
+ string encryptionOid,
+ int keySize)
+ {
+ CipherKeyGenerator keyGen = GeneratorUtilities.GetKeyGenerator(encryptionOid);
+
+ keyGen.Init(new KeyGenerationParameters(m_random, keySize));
+
+ return Open(outStream, encryptionOid, keyGen);
+ }
+
+ private class CmsEnvelopedDataOutputStream
+ : BaseOutputStream
+ {
+ private readonly CmsEnvelopedGenerator _outer;
+
+ private readonly CipherStream _out;
+ private readonly BerSequenceGenerator _cGen;
+ private readonly BerSequenceGenerator _envGen;
+ private readonly BerSequenceGenerator _eiGen;
+
+ public CmsEnvelopedDataOutputStream(
+ CmsEnvelopedGenerator outer,
+ CipherStream outStream,
+ BerSequenceGenerator cGen,
+ BerSequenceGenerator envGen,
+ BerSequenceGenerator eiGen)
+ {
+ _outer = outer;
+ _out = outStream;
+ _cGen = cGen;
+ _envGen = envGen;
+ _eiGen = eiGen;
+ }
+
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ _out.Write(buffer, offset, count);
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override void Write(ReadOnlySpan buffer)
+ {
+ _out.Write(buffer);
+ }
+#endif
+
+ public override void WriteByte(byte value)
+ {
+ _out.WriteByte(value);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ _out.Dispose();
+
+ // TODO Parent context(s) should really be closed explicitly
+
+ _eiGen.Close();
+
+ if (_outer.unprotectedAttributeGenerator != null)
+ {
+ Asn1.Cms.AttributeTable attrTable = _outer.unprotectedAttributeGenerator.GetAttributes(
+ new Dictionary());
+
+ Asn1Set unprotectedAttrs = new BerSet(attrTable.ToAsn1EncodableVector());
+
+ _envGen.AddObject(new DerTaggedObject(false, 1, unprotectedAttrs));
+ }
+
+ _envGen.Close();
+ _cGen.Close();
+ }
+ base.Dispose(disposing);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataStreamGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataStreamGenerator.cs.meta
new file mode 100644
index 00000000..3c8cc80e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedDataStreamGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6a6f248b0ebc050428a4172e4f7a95b5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedGenerator.cs
new file mode 100644
index 00000000..d136ef4c
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedGenerator.cs
@@ -0,0 +1,343 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Kisa;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ntt;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Operators;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * General class for generating a CMS enveloped-data message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * CMSEnvelopedDataGenerator fact = new CMSEnvelopedDataGenerator();
+ *
+ * fact.addKeyTransRecipient(cert);
+ *
+ * CMSEnvelopedData data = fact.generate(content, algorithm, "BC");
+ *
+ */
+ public abstract class CmsEnvelopedGenerator
+ {
+ // Note: These tables are complementary: If rc2Table[i]==j, then rc2Ekb[j]==i
+ internal static readonly short[] rc2Table =
+ {
+ 0xbd, 0x56, 0xea, 0xf2, 0xa2, 0xf1, 0xac, 0x2a, 0xb0, 0x93, 0xd1, 0x9c, 0x1b, 0x33, 0xfd, 0xd0,
+ 0x30, 0x04, 0xb6, 0xdc, 0x7d, 0xdf, 0x32, 0x4b, 0xf7, 0xcb, 0x45, 0x9b, 0x31, 0xbb, 0x21, 0x5a,
+ 0x41, 0x9f, 0xe1, 0xd9, 0x4a, 0x4d, 0x9e, 0xda, 0xa0, 0x68, 0x2c, 0xc3, 0x27, 0x5f, 0x80, 0x36,
+ 0x3e, 0xee, 0xfb, 0x95, 0x1a, 0xfe, 0xce, 0xa8, 0x34, 0xa9, 0x13, 0xf0, 0xa6, 0x3f, 0xd8, 0x0c,
+ 0x78, 0x24, 0xaf, 0x23, 0x52, 0xc1, 0x67, 0x17, 0xf5, 0x66, 0x90, 0xe7, 0xe8, 0x07, 0xb8, 0x60,
+ 0x48, 0xe6, 0x1e, 0x53, 0xf3, 0x92, 0xa4, 0x72, 0x8c, 0x08, 0x15, 0x6e, 0x86, 0x00, 0x84, 0xfa,
+ 0xf4, 0x7f, 0x8a, 0x42, 0x19, 0xf6, 0xdb, 0xcd, 0x14, 0x8d, 0x50, 0x12, 0xba, 0x3c, 0x06, 0x4e,
+ 0xec, 0xb3, 0x35, 0x11, 0xa1, 0x88, 0x8e, 0x2b, 0x94, 0x99, 0xb7, 0x71, 0x74, 0xd3, 0xe4, 0xbf,
+ 0x3a, 0xde, 0x96, 0x0e, 0xbc, 0x0a, 0xed, 0x77, 0xfc, 0x37, 0x6b, 0x03, 0x79, 0x89, 0x62, 0xc6,
+ 0xd7, 0xc0, 0xd2, 0x7c, 0x6a, 0x8b, 0x22, 0xa3, 0x5b, 0x05, 0x5d, 0x02, 0x75, 0xd5, 0x61, 0xe3,
+ 0x18, 0x8f, 0x55, 0x51, 0xad, 0x1f, 0x0b, 0x5e, 0x85, 0xe5, 0xc2, 0x57, 0x63, 0xca, 0x3d, 0x6c,
+ 0xb4, 0xc5, 0xcc, 0x70, 0xb2, 0x91, 0x59, 0x0d, 0x47, 0x20, 0xc8, 0x4f, 0x58, 0xe0, 0x01, 0xe2,
+ 0x16, 0x38, 0xc4, 0x6f, 0x3b, 0x0f, 0x65, 0x46, 0xbe, 0x7e, 0x2d, 0x7b, 0x82, 0xf9, 0x40, 0xb5,
+ 0x1d, 0x73, 0xf8, 0xeb, 0x26, 0xc7, 0x87, 0x97, 0x25, 0x54, 0xb1, 0x28, 0xaa, 0x98, 0x9d, 0xa5,
+ 0x64, 0x6d, 0x7a, 0xd4, 0x10, 0x81, 0x44, 0xef, 0x49, 0xd6, 0xae, 0x2e, 0xdd, 0x76, 0x5c, 0x2f,
+ 0xa7, 0x1c, 0xc9, 0x09, 0x69, 0x9a, 0x83, 0xcf, 0x29, 0x39, 0xb9, 0xe9, 0x4c, 0xff, 0x43, 0xab
+ };
+
+// internal static readonly short[] rc2Ekb =
+// {
+// 0x5d, 0xbe, 0x9b, 0x8b, 0x11, 0x99, 0x6e, 0x4d, 0x59, 0xf3, 0x85, 0xa6, 0x3f, 0xb7, 0x83, 0xc5,
+// 0xe4, 0x73, 0x6b, 0x3a, 0x68, 0x5a, 0xc0, 0x47, 0xa0, 0x64, 0x34, 0x0c, 0xf1, 0xd0, 0x52, 0xa5,
+// 0xb9, 0x1e, 0x96, 0x43, 0x41, 0xd8, 0xd4, 0x2c, 0xdb, 0xf8, 0x07, 0x77, 0x2a, 0xca, 0xeb, 0xef,
+// 0x10, 0x1c, 0x16, 0x0d, 0x38, 0x72, 0x2f, 0x89, 0xc1, 0xf9, 0x80, 0xc4, 0x6d, 0xae, 0x30, 0x3d,
+// 0xce, 0x20, 0x63, 0xfe, 0xe6, 0x1a, 0xc7, 0xb8, 0x50, 0xe8, 0x24, 0x17, 0xfc, 0x25, 0x6f, 0xbb,
+// 0x6a, 0xa3, 0x44, 0x53, 0xd9, 0xa2, 0x01, 0xab, 0xbc, 0xb6, 0x1f, 0x98, 0xee, 0x9a, 0xa7, 0x2d,
+// 0x4f, 0x9e, 0x8e, 0xac, 0xe0, 0xc6, 0x49, 0x46, 0x29, 0xf4, 0x94, 0x8a, 0xaf, 0xe1, 0x5b, 0xc3,
+// 0xb3, 0x7b, 0x57, 0xd1, 0x7c, 0x9c, 0xed, 0x87, 0x40, 0x8c, 0xe2, 0xcb, 0x93, 0x14, 0xc9, 0x61,
+// 0x2e, 0xe5, 0xcc, 0xf6, 0x5e, 0xa8, 0x5c, 0xd6, 0x75, 0x8d, 0x62, 0x95, 0x58, 0x69, 0x76, 0xa1,
+// 0x4a, 0xb5, 0x55, 0x09, 0x78, 0x33, 0x82, 0xd7, 0xdd, 0x79, 0xf5, 0x1b, 0x0b, 0xde, 0x26, 0x21,
+// 0x28, 0x74, 0x04, 0x97, 0x56, 0xdf, 0x3c, 0xf0, 0x37, 0x39, 0xdc, 0xff, 0x06, 0xa4, 0xea, 0x42,
+// 0x08, 0xda, 0xb4, 0x71, 0xb0, 0xcf, 0x12, 0x7a, 0x4e, 0xfa, 0x6c, 0x1d, 0x84, 0x00, 0xc8, 0x7f,
+// 0x91, 0x45, 0xaa, 0x2b, 0xc2, 0xb1, 0x8f, 0xd5, 0xba, 0xf2, 0xad, 0x19, 0xb2, 0x67, 0x36, 0xf7,
+// 0x0f, 0x0a, 0x92, 0x7d, 0xe3, 0x9d, 0xe9, 0x90, 0x3e, 0x23, 0x27, 0x66, 0x13, 0xec, 0x81, 0x15,
+// 0xbd, 0x22, 0xbf, 0x9f, 0x7e, 0xa9, 0x51, 0x4b, 0x4c, 0xfb, 0x02, 0xd3, 0x70, 0x86, 0x31, 0xe7,
+// 0x3b, 0x05, 0x03, 0x54, 0x60, 0x48, 0x65, 0x18, 0xd2, 0xcd, 0x5f, 0x32, 0x88, 0x0e, 0x35, 0xfd
+// };
+
+
+ // TODO Create named constants for all of these
+ public static readonly string DesEde3Cbc = PkcsObjectIdentifiers.DesEde3Cbc.Id;
+ public static readonly string RC2Cbc = PkcsObjectIdentifiers.RC2Cbc.Id;
+ public const string IdeaCbc = "1.3.6.1.4.1.188.7.1.1.2";
+ public const string Cast5Cbc = "1.2.840.113533.7.66.10";
+ public static readonly string Aes128Cbc = NistObjectIdentifiers.IdAes128Cbc.Id;
+ public static readonly string Aes192Cbc = NistObjectIdentifiers.IdAes192Cbc.Id;
+ public static readonly string Aes256Cbc = NistObjectIdentifiers.IdAes256Cbc.Id;
+ public static readonly string Camellia128Cbc = NttObjectIdentifiers.IdCamellia128Cbc.Id;
+ public static readonly string Camellia192Cbc = NttObjectIdentifiers.IdCamellia192Cbc.Id;
+ public static readonly string Camellia256Cbc = NttObjectIdentifiers.IdCamellia256Cbc.Id;
+ public static readonly string SeedCbc = KisaObjectIdentifiers.IdSeedCbc.Id;
+
+ public static readonly string DesEde3Wrap = PkcsObjectIdentifiers.IdAlgCms3DesWrap.Id;
+ public static readonly string Aes128Wrap = NistObjectIdentifiers.IdAes128Wrap.Id;
+ public static readonly string Aes192Wrap = NistObjectIdentifiers.IdAes192Wrap.Id;
+ public static readonly string Aes256Wrap = NistObjectIdentifiers.IdAes256Wrap.Id;
+ public static readonly string Camellia128Wrap = NttObjectIdentifiers.IdCamellia128Wrap.Id;
+ public static readonly string Camellia192Wrap = NttObjectIdentifiers.IdCamellia192Wrap.Id;
+ public static readonly string Camellia256Wrap = NttObjectIdentifiers.IdCamellia256Wrap.Id;
+ public static readonly string SeedWrap = KisaObjectIdentifiers.IdNpkiAppCmsSeedWrap.Id;
+
+ public static readonly string ECDHSha1Kdf = X9ObjectIdentifiers.DHSinglePassStdDHSha1KdfScheme.Id;
+ public static readonly string ECMqvSha1Kdf = X9ObjectIdentifiers.MqvSinglePassSha1KdfScheme.Id;
+
+ internal readonly IList recipientInfoGenerators = new List();
+ internal readonly SecureRandom m_random;
+
+ internal CmsAttributeTableGenerator unprotectedAttributeGenerator = null;
+
+ protected CmsEnvelopedGenerator()
+ : this(CryptoServicesRegistrar.GetSecureRandom())
+ {
+ }
+
+ /// Constructor allowing specific source of randomness
+ /// Instance of SecureRandom to use.
+ protected CmsEnvelopedGenerator(SecureRandom random)
+ {
+ if (random == null)
+ throw new ArgumentNullException(nameof(random));
+
+ m_random = random;
+ }
+
+ public CmsAttributeTableGenerator UnprotectedAttributeGenerator
+ {
+ get { return this.unprotectedAttributeGenerator; }
+ set { this.unprotectedAttributeGenerator = value; }
+ }
+
+ /**
+ * add a recipient.
+ *
+ * @param cert recipient's public key certificate
+ * @exception ArgumentException if there is a problem with the certificate
+ */
+ public void AddKeyTransRecipient(
+ X509Certificate cert)
+ {
+ TbsCertificateStructure recipientTbsCert = CmsUtilities.GetTbsCertificateStructure(cert);
+ SubjectPublicKeyInfo info = recipientTbsCert.SubjectPublicKeyInfo;
+ this.AddRecipientInfoGenerator(new KeyTransRecipientInfoGenerator(cert, new Asn1KeyWrapper(info.AlgorithmID.Algorithm, info.AlgorithmID.Parameters, cert)));
+ }
+
+ /**
+ * add a recipient
+ *
+ * @param key the public key used by the recipient
+ * @param subKeyId the identifier for the recipient's public key
+ * @exception ArgumentException if there is a problem with the key
+ */
+ public void AddKeyTransRecipient(
+ AsymmetricKeyParameter pubKey,
+ byte[] subKeyId)
+ {
+ SubjectPublicKeyInfo info = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(pubKey);
+ this.AddRecipientInfoGenerator(new KeyTransRecipientInfoGenerator(subKeyId, new Asn1KeyWrapper(info.AlgorithmID.Algorithm, info.AlgorithmID.Parameters, pubKey)));
+ }
+
+ /**
+ * add a KEK recipient.
+ * @param key the secret key to use for wrapping
+ * @param keyIdentifier the byte string that identifies the key
+ */
+ public void AddKekRecipient(
+ string keyAlgorithm, // TODO Remove need for this parameter
+ KeyParameter key,
+ byte[] keyIdentifier)
+ {
+ AddKekRecipient(keyAlgorithm, key, new KekIdentifier(keyIdentifier, null, null));
+ }
+
+ /**
+ * add a KEK recipient.
+ * @param key the secret key to use for wrapping
+ * @param keyIdentifier the byte string that identifies the key
+ */
+ public void AddKekRecipient(
+ string keyAlgorithm, // TODO Remove need for this parameter
+ KeyParameter key,
+ KekIdentifier kekIdentifier)
+ {
+ KekRecipientInfoGenerator kekrig = new KekRecipientInfoGenerator();
+ kekrig.KekIdentifier = kekIdentifier;
+ kekrig.KeyEncryptionKeyOID = keyAlgorithm;
+ kekrig.KeyEncryptionKey = key;
+
+ recipientInfoGenerators.Add(kekrig);
+ }
+
+ public void AddPasswordRecipient(
+ CmsPbeKey pbeKey,
+ string kekAlgorithmOid)
+ {
+ Pbkdf2Params p = new Pbkdf2Params(pbeKey.Salt, pbeKey.IterationCount);
+
+ PasswordRecipientInfoGenerator prig = new PasswordRecipientInfoGenerator();
+ prig.KeyDerivationAlgorithm = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdPbkdf2, p);
+ prig.KeyEncryptionKeyOID = kekAlgorithmOid;
+ prig.KeyEncryptionKey = pbeKey.GetEncoded(kekAlgorithmOid);
+
+ recipientInfoGenerators.Add(prig);
+ }
+
+ /**
+ * Add a key agreement based recipient.
+ *
+ * @param agreementAlgorithm key agreement algorithm to use.
+ * @param senderPrivateKey private key to initialise sender side of agreement with.
+ * @param senderPublicKey sender public key to include with message.
+ * @param recipientCert recipient's public key certificate.
+ * @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ * @exception SecurityUtilityException if the algorithm requested cannot be found
+ * @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+ */
+ public void AddKeyAgreementRecipient(
+ string agreementAlgorithm,
+ AsymmetricKeyParameter senderPrivateKey,
+ AsymmetricKeyParameter senderPublicKey,
+ X509Certificate recipientCert,
+ string cekWrapAlgorithm)
+ {
+ var recipientCerts = new List(1);
+ recipientCerts.Add(recipientCert);
+
+ AddKeyAgreementRecipients(agreementAlgorithm, senderPrivateKey, senderPublicKey,
+ recipientCerts, cekWrapAlgorithm);
+ }
+
+ /**
+ * Add multiple key agreement based recipients (sharing a single KeyAgreeRecipientInfo structure).
+ *
+ * @param agreementAlgorithm key agreement algorithm to use.
+ * @param senderPrivateKey private key to initialise sender side of agreement with.
+ * @param senderPublicKey sender public key to include with message.
+ * @param recipientCerts recipients' public key certificates.
+ * @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ * @exception SecurityUtilityException if the algorithm requested cannot be found
+ * @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+ */
+ public void AddKeyAgreementRecipients(
+ string agreementAlgorithm,
+ AsymmetricKeyParameter senderPrivateKey,
+ AsymmetricKeyParameter senderPublicKey,
+ IEnumerable recipientCerts,
+ string cekWrapAlgorithm)
+ {
+ if (!senderPrivateKey.IsPrivate)
+ throw new ArgumentException("Expected private key", "senderPrivateKey");
+ if (senderPublicKey.IsPrivate)
+ throw new ArgumentException("Expected public key", "senderPublicKey");
+
+ /* TODO
+ * "a recipient X.509 version 3 certificate that contains a key usage extension MUST
+ * assert the keyAgreement bit."
+ */
+
+ KeyAgreeRecipientInfoGenerator karig = new KeyAgreeRecipientInfoGenerator();
+ karig.KeyAgreementOID = new DerObjectIdentifier(agreementAlgorithm);
+ karig.KeyEncryptionOID = new DerObjectIdentifier(cekWrapAlgorithm);
+ karig.RecipientCerts = new List(recipientCerts);
+ karig.SenderKeyPair = new AsymmetricCipherKeyPair(senderPublicKey, senderPrivateKey);
+
+ recipientInfoGenerators.Add(karig);
+ }
+
+ ///
+ /// Add a generator to produce the recipient info required.
+ ///
+ /// a generator of a recipient info object.
+ public void AddRecipientInfoGenerator(RecipientInfoGenerator recipientInfoGenerator)
+ {
+ recipientInfoGenerators.Add(recipientInfoGenerator);
+ }
+
+
+ protected internal virtual AlgorithmIdentifier GetAlgorithmIdentifier(
+ string encryptionOid,
+ KeyParameter encKey,
+ Asn1Encodable asn1Params,
+ out ICipherParameters cipherParameters)
+ {
+ Asn1Object asn1Object;
+ if (asn1Params != null)
+ {
+ asn1Object = asn1Params.ToAsn1Object();
+ cipherParameters = ParameterUtilities.GetCipherParameters(
+ encryptionOid, encKey, asn1Object);
+ }
+ else
+ {
+ asn1Object = DerNull.Instance;
+ cipherParameters = encKey;
+ }
+
+ return new AlgorithmIdentifier(
+ new DerObjectIdentifier(encryptionOid),
+ asn1Object);
+ }
+
+ protected internal virtual Asn1Encodable GenerateAsn1Parameters(
+ string encryptionOid,
+ byte[] encKeyBytes)
+ {
+ Asn1Encodable asn1Params = null;
+
+ try
+ {
+ if (encryptionOid.Equals(RC2Cbc))
+ {
+ byte[] iv = new byte[8];
+ m_random.NextBytes(iv);
+
+ // TODO Is this detailed repeat of Java version really necessary?
+ int effKeyBits = encKeyBytes.Length * 8;
+ int parameterVersion;
+
+ if (effKeyBits < 256)
+ {
+ parameterVersion = rc2Table[effKeyBits];
+ }
+ else
+ {
+ parameterVersion = effKeyBits;
+ }
+
+ asn1Params = new RC2CbcParameter(parameterVersion, iv);
+ }
+ else
+ {
+ asn1Params = ParameterUtilities.GenerateParameters(encryptionOid, m_random);
+ }
+ }
+ catch (SecurityUtilityException)
+ {
+ // No problem... no parameters generated
+ }
+
+ return asn1Params;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedGenerator.cs.meta
new file mode 100644
index 00000000..0efd7d45
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7791d23915f27c348bf8347b7f5d8461
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedHelper.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedHelper.cs
new file mode 100644
index 00000000..c971347b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedHelper.cs
@@ -0,0 +1,311 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ class CmsEnvelopedHelper
+ {
+ internal static readonly CmsEnvelopedHelper Instance = new CmsEnvelopedHelper();
+
+ private static readonly IDictionary KeySizes = new Dictionary();
+ private static readonly IDictionary BaseCipherNames = new Dictionary();
+
+ static CmsEnvelopedHelper()
+ {
+ KeySizes.Add(CmsEnvelopedGenerator.DesEde3Cbc, 192);
+ KeySizes.Add(CmsEnvelopedGenerator.Aes128Cbc, 128);
+ KeySizes.Add(CmsEnvelopedGenerator.Aes192Cbc, 192);
+ KeySizes.Add(CmsEnvelopedGenerator.Aes256Cbc, 256);
+
+ BaseCipherNames.Add(CmsEnvelopedGenerator.DesEde3Cbc, "DESEDE");
+ BaseCipherNames.Add(CmsEnvelopedGenerator.Aes128Cbc, "AES");
+ BaseCipherNames.Add(CmsEnvelopedGenerator.Aes192Cbc, "AES");
+ BaseCipherNames.Add(CmsEnvelopedGenerator.Aes256Cbc, "AES");
+ }
+
+ private string GetAsymmetricEncryptionAlgName(
+ string encryptionAlgOid)
+ {
+ if (Asn1.Pkcs.PkcsObjectIdentifiers.RsaEncryption.Id.Equals(encryptionAlgOid))
+ {
+ return "RSA/ECB/PKCS1Padding";
+ }
+
+ return encryptionAlgOid;
+ }
+
+ internal IBufferedCipher CreateAsymmetricCipher(
+ string encryptionOid)
+ {
+ string asymName = GetAsymmetricEncryptionAlgName(encryptionOid);
+ if (!asymName.Equals(encryptionOid))
+ {
+ try
+ {
+ return CipherUtilities.GetCipher(asymName);
+ }
+ catch (SecurityUtilityException)
+ {
+ // Ignore
+ }
+ }
+ return CipherUtilities.GetCipher(encryptionOid);
+ }
+
+ internal IWrapper CreateWrapper(
+ string encryptionOid)
+ {
+ try
+ {
+ return WrapperUtilities.GetWrapper(encryptionOid);
+ }
+ catch (SecurityUtilityException)
+ {
+ return WrapperUtilities.GetWrapper(GetAsymmetricEncryptionAlgName(encryptionOid));
+ }
+ }
+
+ internal string GetRfc3211WrapperName(string oid)
+ {
+ if (oid == null)
+ throw new ArgumentNullException(nameof(oid));
+
+ if (!BaseCipherNames.TryGetValue(oid, out var alg))
+ throw new ArgumentException("no name for " + oid, nameof(oid));
+
+ return alg + "RFC3211Wrap";
+ }
+
+ internal int GetKeySize(string oid)
+ {
+ if (oid == null)
+ throw new ArgumentNullException(nameof(oid));
+
+ if (!KeySizes.TryGetValue(oid, out var keySize))
+ throw new ArgumentException("no keysize for " + oid, "oid");
+
+ return keySize;
+ }
+
+ internal static RecipientInformationStore BuildRecipientInformationStore(
+ Asn1Set recipientInfos, CmsSecureReadable secureReadable)
+ {
+ var infos = new List();
+ for (int i = 0; i != recipientInfos.Count; i++)
+ {
+ RecipientInfo info = RecipientInfo.GetInstance(recipientInfos[i]);
+
+ ReadRecipientInfo(infos, info, secureReadable);
+ }
+ return new RecipientInformationStore(infos);
+ }
+
+ private static void ReadRecipientInfo(IList infos, RecipientInfo info,
+ CmsSecureReadable secureReadable)
+ {
+ Asn1Encodable recipInfo = info.Info;
+ if (recipInfo is KeyTransRecipientInfo keyTransRecipientInfo)
+ {
+ infos.Add(new KeyTransRecipientInformation(keyTransRecipientInfo, secureReadable));
+ }
+ else if (recipInfo is KekRecipientInfo kekRecipientInfo)
+ {
+ infos.Add(new KekRecipientInformation(kekRecipientInfo, secureReadable));
+ }
+ else if (recipInfo is KeyAgreeRecipientInfo keyAgreeRecipientInfo)
+ {
+ KeyAgreeRecipientInformation.ReadRecipientInfo(infos, keyAgreeRecipientInfo, secureReadable);
+ }
+ else if (recipInfo is PasswordRecipientInfo passwordRecipientInfo)
+ {
+ infos.Add(new PasswordRecipientInformation(passwordRecipientInfo, secureReadable));
+ }
+ }
+
+ internal class CmsAuthenticatedSecureReadable : CmsSecureReadable
+ {
+ private AlgorithmIdentifier algorithm;
+ private IMac mac;
+ private CmsReadable readable;
+
+ internal CmsAuthenticatedSecureReadable(AlgorithmIdentifier algorithm, CmsReadable readable)
+ {
+ this.algorithm = algorithm;
+ this.readable = readable;
+ }
+
+ public AlgorithmIdentifier Algorithm
+ {
+ get { return this.algorithm; }
+ }
+
+ public object CryptoObject
+ {
+ get { return this.mac; }
+ }
+
+ public CmsReadable GetReadable(KeyParameter sKey)
+ {
+ string macAlg = this.algorithm.Algorithm.Id;
+// Asn1Object sParams = this.algorithm.Parameters.ToAsn1Object();
+
+ try
+ {
+ this.mac = MacUtilities.GetMac(macAlg);
+
+ // FIXME Support for MAC algorithm parameters similar to cipher parameters
+// ASN1Object sParams = (ASN1Object)macAlg.getParameters();
+//
+// if (sParams != null && !(sParams instanceof ASN1Null))
+// {
+// AlgorithmParameters params = CMSEnvelopedHelper.INSTANCE.createAlgorithmParameters(macAlg.getObjectId().getId(), provider);
+//
+// params.init(sParams.getEncoded(), "ASN.1");
+//
+// mac.init(sKey, params.getParameterSpec(IvParameterSpec.class));
+// }
+// else
+ {
+ mac.Init(sKey);
+ }
+
+// Asn1Object asn1Params = asn1Enc == null ? null : asn1Enc.ToAsn1Object();
+//
+// ICipherParameters cipherParameters = sKey;
+//
+// if (asn1Params != null && !(asn1Params is Asn1Null))
+// {
+// cipherParameters = ParameterUtilities.GetCipherParameters(
+// macAlg.Algorithm, cipherParameters, asn1Params);
+// }
+// else
+// {
+// string alg = macAlg.Algorithm.Id;
+// if (alg.Equals(CmsEnvelopedDataGenerator.DesEde3Cbc)
+// || alg.Equals(CmsEnvelopedDataGenerator.IdeaCbc)
+// || alg.Equals(CmsEnvelopedDataGenerator.Cast5Cbc))
+// {
+// cipherParameters = new ParametersWithIV(cipherParameters, new byte[8]);
+// }
+// }
+//
+// mac.Init(cipherParameters);
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("couldn't create cipher.", e);
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key invalid in message.", e);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("error decoding algorithm parameters.", e);
+ }
+
+ try
+ {
+ return new CmsProcessableInputStream(
+ new TeeInputStream(
+ readable.GetInputStream(),
+ new MacSink(this.mac)));
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("error reading content.", e);
+ }
+ }
+ }
+
+ internal class CmsEnvelopedSecureReadable : CmsSecureReadable
+ {
+ private AlgorithmIdentifier algorithm;
+ private IBufferedCipher cipher;
+ private CmsReadable readable;
+
+ internal CmsEnvelopedSecureReadable(AlgorithmIdentifier algorithm, CmsReadable readable)
+ {
+ this.algorithm = algorithm;
+ this.readable = readable;
+ }
+
+ public AlgorithmIdentifier Algorithm
+ {
+ get { return this.algorithm; }
+ }
+
+ public object CryptoObject
+ {
+ get { return this.cipher; }
+ }
+
+ public CmsReadable GetReadable(KeyParameter sKey)
+ {
+ try
+ {
+ this.cipher = CipherUtilities.GetCipher(this.algorithm.Algorithm);
+
+ Asn1Encodable asn1Enc = this.algorithm.Parameters;
+ Asn1Object asn1Params = asn1Enc == null ? null : asn1Enc.ToAsn1Object();
+
+ ICipherParameters cipherParameters = sKey;
+
+ if (asn1Params != null && !(asn1Params is Asn1Null))
+ {
+ cipherParameters = ParameterUtilities.GetCipherParameters(
+ this.algorithm.Algorithm, cipherParameters, asn1Params);
+ }
+ else
+ {
+ string alg = this.algorithm.Algorithm.Id;
+ if (alg.Equals(CmsEnvelopedDataGenerator.DesEde3Cbc)
+ || alg.Equals(CmsEnvelopedDataGenerator.IdeaCbc)
+ || alg.Equals(CmsEnvelopedDataGenerator.Cast5Cbc))
+ {
+ cipherParameters = new ParametersWithIV(cipherParameters, new byte[8]);
+ }
+ }
+
+ cipher.Init(false, cipherParameters);
+ }
+ catch (SecurityUtilityException e)
+ {
+ throw new CmsException("couldn't create cipher.", e);
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key invalid in message.", e);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("error decoding algorithm parameters.", e);
+ }
+
+ try
+ {
+ return new CmsProcessableInputStream(
+ new CipherStream(readable.GetInputStream(), cipher, null));
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("error reading content.", e);
+ }
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedHelper.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedHelper.cs.meta
new file mode 100644
index 00000000..fc83892b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSEnvelopedHelper.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b5fd7830c09c36949974afa7f8e45572
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSException.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSException.cs
new file mode 100644
index 00000000..2fd19814
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSException.cs
@@ -0,0 +1,34 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Runtime.Serialization;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ [Serializable]
+ public class CmsException
+ : Exception
+ {
+ public CmsException()
+ : base()
+ {
+ }
+
+ public CmsException(string message)
+ : base(message)
+ {
+ }
+
+ public CmsException(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ }
+
+ protected CmsException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSException.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSException.cs.meta
new file mode 100644
index 00000000..53a8e974
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSException.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c2bc77783fed2ca45a91bd003c2b327d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSPBEKey.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSPBEKey.cs
new file mode 100644
index 00000000..1f2c5881
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSPBEKey.cs
@@ -0,0 +1,84 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+
+//import javax.crypto.interfaces.PBEKey;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ public abstract class CmsPbeKey
+ // TODO Create an equivalent interface somewhere?
+ // : PBEKey
+ : ICipherParameters
+ {
+ internal readonly char[] password;
+ internal readonly byte[] salt;
+ internal readonly int iterationCount;
+
+ public CmsPbeKey(
+ char[] password,
+ byte[] salt,
+ int iterationCount)
+ {
+ this.password = (char[])password.Clone();
+ this.salt = Arrays.Clone(salt);
+ this.iterationCount = iterationCount;
+ }
+
+ public CmsPbeKey(
+ char[] password,
+ AlgorithmIdentifier keyDerivationAlgorithm)
+ {
+ if (!keyDerivationAlgorithm.Algorithm.Equals(PkcsObjectIdentifiers.IdPbkdf2))
+ throw new ArgumentException("Unsupported key derivation algorithm: "
+ + keyDerivationAlgorithm.Algorithm);
+
+ Pbkdf2Params kdfParams = Pbkdf2Params.GetInstance(
+ keyDerivationAlgorithm.Parameters.ToAsn1Object());
+
+ this.password = (char[])password.Clone();
+ this.salt = kdfParams.GetSalt();
+ this.iterationCount = kdfParams.IterationCount.IntValue;
+ }
+
+ ~CmsPbeKey()
+ {
+ Array.Clear(this.password, 0, this.password.Length);
+ }
+
+ public byte[] Salt
+ {
+ get { return Arrays.Clone(salt); }
+ }
+
+ public int IterationCount
+ {
+ get { return iterationCount; }
+ }
+
+ public string Algorithm
+ {
+ get { return "PKCS5S2"; }
+ }
+
+ public string Format
+ {
+ get { return "RAW"; }
+ }
+
+ public byte[] GetEncoded()
+ {
+ return null;
+ }
+
+ internal abstract KeyParameter GetEncoded(string algorithmOid);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSPBEKey.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSPBEKey.cs.meta
new file mode 100644
index 00000000..09cfc072
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSPBEKey.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b05e45fedfaf80f4fa683646991ae9b9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessable.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessable.cs
new file mode 100644
index 00000000..d07e7cc1
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessable.cs
@@ -0,0 +1,20 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ public interface CmsProcessable
+ {
+ ///
+ /// Generic routine to copy out the data we want processed.
+ ///
+ ///
+ /// This routine may be called multiple times.
+ ///
+ void Write(Stream outStream);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessable.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessable.cs.meta
new file mode 100644
index 00000000..e4bdae60
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4358bc653572b7c4a82a0968ec3633bc
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableByteArray.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableByteArray.cs
new file mode 100644
index 00000000..997a27eb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableByteArray.cs
@@ -0,0 +1,49 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * a holding class for a byte array of data to be processed.
+ */
+ public class CmsProcessableByteArray
+ : CmsProcessable, CmsReadable
+ {
+ private readonly DerObjectIdentifier type;
+ private readonly byte[] bytes;
+
+ public CmsProcessableByteArray(byte[] bytes)
+ {
+ type = CmsObjectIdentifiers.Data;
+ this.bytes = bytes;
+ }
+
+ public CmsProcessableByteArray(DerObjectIdentifier type, byte[] bytes)
+ {
+ this.bytes = bytes;
+ this.type = type;
+ }
+
+ public DerObjectIdentifier Type
+ {
+ get { return type; }
+ }
+
+ public virtual Stream GetInputStream()
+ {
+ return new MemoryStream(bytes, false);
+ }
+
+ public virtual void Write(Stream zOut)
+ {
+ zOut.Write(bytes, 0, bytes.Length);
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableByteArray.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableByteArray.cs.meta
new file mode 100644
index 00000000..45892d7e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableByteArray.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 21a35a48c87e93345870416e086fd4f1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableFile.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableFile.cs
new file mode 100644
index 00000000..6c325e93
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableFile.cs
@@ -0,0 +1,47 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * a holding class for a file of data to be processed.
+ */
+ public class CmsProcessableFile
+ : CmsProcessable, CmsReadable
+ {
+ private const int DefaultBufSize = 32 * 1024;
+
+ private readonly FileInfo _file;
+ private readonly int _bufSize;
+
+ public CmsProcessableFile(FileInfo file)
+ : this(file, DefaultBufSize)
+ {
+ }
+
+ public CmsProcessableFile(FileInfo file, int bufSize)
+ {
+ _file = file;
+ _bufSize = bufSize;
+ }
+
+ public virtual Stream GetInputStream()
+ {
+ return new FileStream(_file.FullName, FileMode.Open, FileAccess.Read, FileShare.Read, _bufSize);
+ }
+
+ public virtual void Write(Stream zOut)
+ {
+ using (var inStr = _file.OpenRead())
+ {
+ Streams.PipeAll(inStr, zOut, _bufSize);
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableFile.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableFile.cs.meta
new file mode 100644
index 00000000..a00f18d0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableFile.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 79cc23ee91e127148885bc967538c814
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableInputStream.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableInputStream.cs
new file mode 100644
index 00000000..382bd948
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableInputStream.cs
@@ -0,0 +1,51 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ public class CmsProcessableInputStream
+ : CmsProcessable, CmsReadable
+ {
+ private readonly Stream input;
+
+ private bool used = false;
+
+ public CmsProcessableInputStream(Stream input)
+ {
+ this.input = input;
+ }
+
+ public virtual Stream GetInputStream()
+ {
+ CheckSingleUsage();
+
+ return input;
+ }
+
+ public virtual void Write(Stream output)
+ {
+ CheckSingleUsage();
+
+ Streams.PipeAll(input, output);
+ input.Dispose();
+ }
+
+ protected virtual void CheckSingleUsage()
+ {
+ lock (this)
+ {
+ if (used)
+ throw new InvalidOperationException("CmsProcessableInputStream can only be used once");
+
+ used = true;
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableInputStream.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableInputStream.cs.meta
new file mode 100644
index 00000000..e1454ffb
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSProcessableInputStream.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c67c8e6ccc2fd564fac66019e0aa1004
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSReadable.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSReadable.cs
new file mode 100644
index 00000000..84649f81
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSReadable.cs
@@ -0,0 +1,14 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.IO;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ public interface CmsReadable
+ {
+ Stream GetInputStream();
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSReadable.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSReadable.cs.meta
new file mode 100644
index 00000000..689cc56f
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSReadable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d8a564e36797c4d46b1acefec1b50471
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSecureReadable.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSecureReadable.cs
new file mode 100644
index 00000000..04b4d41b
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSecureReadable.cs
@@ -0,0 +1,18 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ internal interface CmsSecureReadable
+ {
+ AlgorithmIdentifier Algorithm { get; }
+ object CryptoObject { get; }
+ CmsReadable GetReadable(KeyParameter key);
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSecureReadable.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSecureReadable.cs.meta
new file mode 100644
index 00000000..47186b8e
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSecureReadable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 923dd0564294e6649b0ae0fd20b9396e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedData.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedData.cs
new file mode 100644
index 00000000..48667ba0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedData.cs
@@ -0,0 +1,415 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * general class for handling a pkcs7-signature message.
+ *
+ * A simple example of usage - note, in the example below the validity of
+ * the certificate isn't verified, just the fact that one of the certs
+ * matches the given signer...
+ *
+ *
+ * IX509Store certs = s.GetCertificates();
+ * SignerInformationStore signers = s.GetSignerInfos();
+ *
+ * foreach (SignerInformation signer in signers.GetSigners())
+ * {
+ * ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ * X509Certificate cert = (X509Certificate) certList[0];
+ *
+ * if (signer.Verify(cert.GetPublicKey()))
+ * {
+ * verified++;
+ * }
+ * }
+ *
+ */
+ public class CmsSignedData
+ {
+ private static readonly CmsSignedHelper Helper = CmsSignedHelper.Instance;
+
+ private readonly CmsProcessable signedContent;
+ private SignedData signedData;
+ private ContentInfo contentInfo;
+ private SignerInformationStore signerInfoStore;
+ private IDictionary m_hashes;
+
+ private CmsSignedData(CmsSignedData c)
+ {
+ this.signedData = c.signedData;
+ this.contentInfo = c.contentInfo;
+ this.signedContent = c.signedContent;
+ this.signerInfoStore = c.signerInfoStore;
+ }
+
+ public CmsSignedData(byte[] sigBlock)
+ : this(CmsUtilities.ReadContentInfo(new MemoryStream(sigBlock, false)))
+ {
+ }
+
+ public CmsSignedData(CmsProcessable signedContent, byte[] sigBlock)
+ : this(signedContent, CmsUtilities.ReadContentInfo(new MemoryStream(sigBlock, false)))
+ {
+ }
+
+ /**
+ * Content with detached signature, digests precomputed
+ *
+ * @param hashes a map of precomputed digests for content indexed by name of hash.
+ * @param sigBlock the signature object.
+ */
+ public CmsSignedData(IDictionary hashes, byte[] sigBlock)
+ : this(hashes, CmsUtilities.ReadContentInfo(sigBlock))
+ {
+ }
+
+ /**
+ * base constructor - content with detached signature.
+ *
+ * @param signedContent the content that was signed.
+ * @param sigData the signature object.
+ */
+ public CmsSignedData(CmsProcessable signedContent, Stream sigData)
+ : this(signedContent, CmsUtilities.ReadContentInfo(sigData))
+ {
+ }
+
+ /**
+ * base constructor - with encapsulated content
+ */
+ public CmsSignedData(Stream sigData)
+ : this(CmsUtilities.ReadContentInfo(sigData))
+ {
+ }
+
+ public CmsSignedData(CmsProcessable signedContent, ContentInfo sigData)
+ {
+ this.signedContent = signedContent;
+ this.contentInfo = sigData;
+ this.signedData = SignedData.GetInstance(contentInfo.Content);
+ }
+
+ public CmsSignedData(IDictionary hashes, ContentInfo sigData)
+ {
+ this.m_hashes = hashes;
+ this.contentInfo = sigData;
+ this.signedData = SignedData.GetInstance(contentInfo.Content);
+ }
+
+ public CmsSignedData(ContentInfo sigData)
+ {
+ this.contentInfo = sigData;
+ this.signedData = SignedData.GetInstance(contentInfo.Content);
+
+ //
+ // this can happen if the signed message is sent simply to send a
+ // certificate chain.
+ //
+ if (signedData.EncapContentInfo.Content != null)
+ {
+ this.signedContent = new CmsProcessableByteArray(
+ ((Asn1OctetString)(signedData.EncapContentInfo.Content)).GetOctets());
+ }
+// else
+// {
+// this.signedContent = null;
+// }
+ }
+
+ /// Return the version number for this object.
+ public int Version
+ {
+ get { return signedData.Version.IntValueExact; }
+ }
+
+ /**
+ * return the collection of signers that are associated with the
+ * signatures for the message.
+ */
+ public SignerInformationStore GetSignerInfos()
+ {
+ if (signerInfoStore == null)
+ {
+ var signerInfos = new List();
+ Asn1Set s = signedData.SignerInfos;
+
+ foreach (object obj in s)
+ {
+ SignerInfo info = SignerInfo.GetInstance(obj);
+ DerObjectIdentifier contentType = signedData.EncapContentInfo.ContentType;
+
+ if (m_hashes == null)
+ {
+ signerInfos.Add(new SignerInformation(info, contentType, signedContent, null));
+ }
+ else if (m_hashes.TryGetValue(info.DigestAlgorithm.Algorithm.Id, out var hash))
+ {
+ signerInfos.Add(new SignerInformation(info, contentType, null, new BaseDigestCalculator(hash)));
+ }
+ else
+ {
+ throw new InvalidOperationException();
+ }
+ }
+
+ signerInfoStore = new SignerInformationStore(signerInfos);
+ }
+
+ return signerInfoStore;
+ }
+
+ /**
+ * return a X509Store containing the attribute certificates, if any, contained
+ * in this message.
+ *
+ * @param type type of store to create
+ * @return a store of attribute certificates
+ * @exception NoSuchStoreException if the store type isn't available.
+ * @exception CmsException if a general exception prevents creation of the X509Store
+ */
+ public IStore GetAttributeCertificates()
+ {
+ return Helper.GetAttributeCertificates(signedData.Certificates);
+ }
+
+ /**
+ * return a X509Store containing the public key certificates, if any, contained in this message.
+ *
+ * @return a store of public key certificates
+ * @exception NoSuchStoreException if the store type isn't available.
+ * @exception CmsException if a general exception prevents creation of the X509Store
+ */
+ public IStore GetCertificates()
+ {
+ return Helper.GetCertificates(signedData.Certificates);
+ }
+
+ /**
+ * return a X509Store containing CRLs, if any, contained in this message.
+ *
+ * @return a store of CRLs
+ * @exception NoSuchStoreException if the store type isn't available.
+ * @exception CmsException if a general exception prevents creation of the X509Store
+ */
+ public IStore GetCrls()
+ {
+ return Helper.GetCrls(signedData.CRLs);
+ }
+
+ public IStore GetOtherRevInfos(DerObjectIdentifier otherRevInfoFormat)
+ {
+ return Helper.GetOtherRevInfos(signedData.CRLs, otherRevInfoFormat);
+ }
+
+ ///
+ /// Return the DerObjectIdentifier associated with the encapsulated
+ /// content info structure carried in the signed data.
+ ///
+ public DerObjectIdentifier SignedContentType
+ {
+ get { return signedData.EncapContentInfo.ContentType; }
+ }
+
+ public CmsProcessable SignedContent
+ {
+ get { return signedContent; }
+ }
+
+ /**
+ * return the ContentInfo
+ */
+ public ContentInfo ContentInfo
+ {
+ get { return contentInfo; }
+ }
+
+ /**
+ * return the ASN.1 encoded representation of this object.
+ */
+ public byte[] GetEncoded()
+ {
+ return contentInfo.GetEncoded();
+ }
+
+ /**
+ * return the ASN.1 encoded representation of this object using the specified encoding.
+ *
+ * @param encoding the ASN.1 encoding format to use ("BER" or "DER").
+ */
+ public byte[] GetEncoded(string encoding)
+ {
+ return contentInfo.GetEncoded(encoding);
+ }
+
+ /**
+ * Replace the signerinformation store associated with this
+ * CmsSignedData object with the new one passed in. You would
+ * probably only want to do this if you wanted to change the unsigned
+ * attributes associated with a signer, or perhaps delete one.
+ *
+ * @param signedData the signed data object to be used as a base.
+ * @param signerInformationStore the new signer information store to use.
+ * @return a new signed data object.
+ */
+ public static CmsSignedData ReplaceSigners(
+ CmsSignedData signedData,
+ SignerInformationStore signerInformationStore)
+ {
+ //
+ // copy
+ //
+ CmsSignedData cms = new CmsSignedData(signedData);
+
+ //
+ // replace the store
+ //
+ cms.signerInfoStore = signerInformationStore;
+
+ //
+ // replace the signers in the SignedData object
+ //
+ Asn1EncodableVector digestAlgs = new Asn1EncodableVector();
+ Asn1EncodableVector vec = new Asn1EncodableVector();
+
+ foreach (SignerInformation signer in signerInformationStore.GetSigners())
+ {
+ digestAlgs.Add(Helper.FixAlgID(signer.DigestAlgorithmID));
+ vec.Add(signer.ToSignerInfo());
+ }
+
+ Asn1Set digests = new DerSet(digestAlgs);
+ Asn1Set signers = new DerSet(vec);
+ Asn1Sequence sD = (Asn1Sequence)signedData.signedData.ToAsn1Object();
+
+ //
+ // signers are the last item in the sequence.
+ //
+ vec = new Asn1EncodableVector(
+ sD[0], // version
+ digests);
+
+ for (int i = 2; i != sD.Count - 1; i++)
+ {
+ vec.Add(sD[i]);
+ }
+
+ vec.Add(signers);
+
+ cms.signedData = SignedData.GetInstance(new BerSequence(vec));
+
+ //
+ // replace the contentInfo with the new one
+ //
+ cms.contentInfo = new ContentInfo(cms.contentInfo.ContentType, cms.signedData);
+
+ return cms;
+ }
+
+ /**
+ * Replace the certificate and CRL information associated with this
+ * CmsSignedData object with the new one passed in.
+ *
+ * @param signedData the signed data object to be used as a base.
+ * @param x509Certs the new certificates to be used.
+ * @param x509Crls the new CRLs to be used.
+ * @return a new signed data object.
+ * @exception CmsException if there is an error processing the stores
+ */
+ public static CmsSignedData ReplaceCertificatesAndCrls(CmsSignedData signedData,
+ IStore x509Certs, IStore x509Crls)
+ {
+ return ReplaceCertificatesAndRevocations(signedData, x509Certs, x509Crls, null, null);
+ }
+
+ public static CmsSignedData ReplaceCertificatesAndCrls(CmsSignedData signedData,
+ IStore x509Certs, IStore x509Crls,
+ IStore x509AttrCerts)
+ {
+ return ReplaceCertificatesAndRevocations(signedData, x509Certs, x509Crls, x509AttrCerts, null);
+ }
+
+ public static CmsSignedData ReplaceCertificatesAndRevocations(CmsSignedData signedData,
+ IStore x509Certs, IStore x509Crls,
+ IStore x509AttrCerts, IStore otherRevocationInfos)
+ {
+ //
+ // copy
+ //
+ CmsSignedData cms = new CmsSignedData(signedData);
+
+ //
+ // replace the certs and crls in the SignedData object
+ //
+ Asn1Set certSet = null;
+ Asn1Set revocationSet = null;
+
+ if (x509Certs != null || x509AttrCerts != null)
+ {
+ var certificates = new List();
+ if (x509Certs != null)
+ {
+ certificates.AddRange(CmsUtilities.GetCertificatesFromStore(x509Certs));
+ }
+ if (x509AttrCerts != null)
+ {
+ certificates.AddRange(CmsUtilities.GetAttributeCertificatesFromStore(x509AttrCerts));
+ }
+
+ Asn1Set berSet = CmsUtilities.CreateBerSetFromList(certificates);
+ if (berSet.Count > 0)
+ {
+ certSet = berSet;
+ }
+ }
+
+ if (x509Crls != null || otherRevocationInfos != null)
+ {
+ var revocations = new List();
+ if (x509Crls != null)
+ {
+ revocations.AddRange(CmsUtilities.GetCrlsFromStore(x509Crls));
+ }
+ if (otherRevocationInfos != null)
+ {
+ revocations.AddRange(CmsUtilities.GetOtherRevocationInfosFromStore(otherRevocationInfos));
+ }
+
+ Asn1Set berSet = CmsUtilities.CreateBerSetFromList(revocations);
+ if (berSet.Count > 0)
+ {
+ revocationSet = berSet;
+ }
+ }
+
+ //
+ // replace the CMS structure.
+ //
+ SignedData old = signedData.signedData;
+ cms.signedData = new SignedData(
+ old.DigestAlgorithms,
+ old.EncapContentInfo,
+ certSet,
+ revocationSet,
+ old.SignerInfos);
+
+ //
+ // replace the contentInfo with the new one
+ //
+ cms.contentInfo = new ContentInfo(cms.contentInfo.ContentType, cms.signedData);
+
+ return cms;
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedData.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedData.cs.meta
new file mode 100644
index 00000000..ffcd1dc5
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a562c0b42d3154640bbd1b68310b34eb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataGenerator.cs
new file mode 100644
index 00000000..79873be0
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataGenerator.cs
@@ -0,0 +1,581 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security.Certificates;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Operators;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * general class for generating a pkcs7-signature message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * IX509Store certs...
+ * IX509Store crls...
+ * CmsSignedDataGenerator gen = new CmsSignedDataGenerator();
+ *
+ * gen.AddSigner(privKey, cert, CmsSignedGenerator.DigestSha1);
+ * gen.AddCertificates(certs);
+ * gen.AddCrls(crls);
+ *
+ * CmsSignedData data = gen.Generate(content);
+ *
+ *
+ */
+ public class CmsSignedDataGenerator
+ : CmsSignedGenerator
+ {
+ private static readonly CmsSignedHelper Helper = CmsSignedHelper.Instance;
+
+ private readonly IList signerInfs = new List();
+
+ private class SignerInf
+ {
+ private readonly CmsSignedGenerator outer;
+
+ private readonly ISignatureFactory sigCalc;
+ private readonly SignerIdentifier signerIdentifier;
+ private readonly string digestOID;
+ private readonly string encOID;
+ private readonly CmsAttributeTableGenerator sAttr;
+ private readonly CmsAttributeTableGenerator unsAttr;
+ private readonly Asn1.Cms.AttributeTable baseSignedTable;
+
+ internal SignerInf(
+ CmsSignedGenerator outer,
+ AsymmetricKeyParameter key,
+ SecureRandom random,
+ SignerIdentifier signerIdentifier,
+ string digestOID,
+ string encOID,
+ CmsAttributeTableGenerator sAttr,
+ CmsAttributeTableGenerator unsAttr,
+ Asn1.Cms.AttributeTable baseSignedTable)
+ {
+ string digestName = Helper.GetDigestAlgName(digestOID);
+
+ string signatureName = digestName + "with" + Helper.GetEncryptionAlgName(encOID);
+
+ this.outer = outer;
+ this.sigCalc = new Asn1SignatureFactory(signatureName, key, random);
+ this.signerIdentifier = signerIdentifier;
+ this.digestOID = digestOID;
+ this.encOID = encOID;
+ this.sAttr = sAttr;
+ this.unsAttr = unsAttr;
+ this.baseSignedTable = baseSignedTable;
+ }
+
+ internal SignerInf(
+ CmsSignedGenerator outer,
+ ISignatureFactory sigCalc,
+ SignerIdentifier signerIdentifier,
+ CmsAttributeTableGenerator sAttr,
+ CmsAttributeTableGenerator unsAttr,
+ Asn1.Cms.AttributeTable baseSignedTable)
+ {
+ this.outer = outer;
+ this.sigCalc = sigCalc;
+ this.signerIdentifier = signerIdentifier;
+ this.digestOID = new DefaultDigestAlgorithmIdentifierFinder().Find(
+ (AlgorithmIdentifier)sigCalc.AlgorithmDetails).Algorithm.Id;
+ this.encOID = ((AlgorithmIdentifier)sigCalc.AlgorithmDetails).Algorithm.Id;
+ this.sAttr = sAttr;
+ this.unsAttr = unsAttr;
+ this.baseSignedTable = baseSignedTable;
+ }
+
+ internal AlgorithmIdentifier DigestAlgorithmID
+ {
+ get { return new AlgorithmIdentifier(new DerObjectIdentifier(digestOID), DerNull.Instance); }
+ }
+
+ internal CmsAttributeTableGenerator SignedAttributes
+ {
+ get { return sAttr; }
+ }
+
+ internal CmsAttributeTableGenerator UnsignedAttributes
+ {
+ get { return unsAttr; }
+ }
+
+ internal SignerInfo ToSignerInfo(DerObjectIdentifier contentType, CmsProcessable content)
+ {
+ AlgorithmIdentifier digAlgId = DigestAlgorithmID;
+ string digestName = Helper.GetDigestAlgName(digestOID);
+
+ string signatureName = digestName + "with" + Helper.GetEncryptionAlgName(encOID);
+
+ if (!outer.m_digests.TryGetValue(digestOID, out var hash))
+ {
+ IDigest dig = Helper.GetDigestInstance(digestName);
+ if (content != null)
+ {
+ content.Write(new DigestSink(dig));
+ }
+ hash = DigestUtilities.DoFinal(dig);
+ outer.m_digests.Add(digestOID, (byte[])hash.Clone());
+ }
+
+ Asn1Set signedAttr = null;
+
+ IStreamCalculator calculator = sigCalc.CreateCalculator();
+ using (Stream sigStr = calculator.Stream)
+ {
+ if (sAttr != null)
+ {
+ var parameters = outer.GetBaseParameters(contentType, digAlgId, hash);
+
+ //Asn1.Cms.AttributeTable signed = sAttr.GetAttributes(Collections.unmodifiableMap(parameters));
+ Asn1.Cms.AttributeTable signed = sAttr.GetAttributes(parameters);
+
+ if (contentType == null) //counter signature
+ {
+ if (signed != null && signed[CmsAttributes.ContentType] != null)
+ {
+ signed = signed.Remove(CmsAttributes.ContentType);
+ }
+ }
+
+ // TODO Validate proposed signed attributes
+
+ signedAttr = outer.GetAttributeSet(signed);
+
+ // sig must be composed from the DER encoding.
+ signedAttr.EncodeTo(sigStr, Asn1Encodable.Der);
+ }
+ else if (content != null)
+ {
+ // TODO Use raw signature of the hash value instead
+ content.Write(sigStr);
+ }
+ }
+
+ byte[] sigBytes = calculator.GetResult().Collect();
+
+ Asn1Set unsignedAttr = null;
+ if (unsAttr != null)
+ {
+ var baseParameters = outer.GetBaseParameters(contentType, digAlgId, hash);
+ baseParameters[CmsAttributeTableParameter.Signature] = sigBytes.Clone();
+
+// Asn1.Cms.AttributeTable unsigned = unsAttr.GetAttributes(Collections.unmodifiableMap(baseParameters));
+ Asn1.Cms.AttributeTable unsigned = unsAttr.GetAttributes(baseParameters);
+
+ // TODO Validate proposed unsigned attributes
+
+ unsignedAttr = outer.GetAttributeSet(unsigned);
+ }
+
+ // TODO[RSAPSS] Need the ability to specify non-default parameters
+ Asn1Encodable sigX509Parameters = SignerUtilities.GetDefaultX509Parameters(signatureName);
+ AlgorithmIdentifier encAlgId = Helper.GetEncAlgorithmIdentifier(
+ new DerObjectIdentifier(encOID), sigX509Parameters);
+
+ return new SignerInfo(signerIdentifier, digAlgId,
+ signedAttr, encAlgId, new DerOctetString(sigBytes), unsignedAttr);
+ }
+ }
+
+ public CmsSignedDataGenerator()
+ {
+ }
+
+ /// Constructor allowing specific source of randomness
+ /// Instance of SecureRandom to use.
+ public CmsSignedDataGenerator(SecureRandom random)
+ : base(random)
+ {
+ }
+
+ /**
+ * add a signer - no attributes other than the default ones will be
+ * provided here.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string digestOID)
+ {
+ AddSigner(privateKey, cert, Helper.GetEncOid(privateKey, digestOID), digestOID);
+ }
+
+ /**
+ * add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ * provided here.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param encryptionOID digest encryption algorithm OID
+ * @param digestOID digest algorithm OID
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string encryptionOID,
+ string digestOID)
+ {
+ doAddSigner(privateKey, GetSignerIdentifier(cert), encryptionOID, digestOID,
+ new DefaultSignedAttributeTableGenerator(), null, null);
+ }
+
+ /**
+ * add a signer - no attributes other than the default ones will be
+ * provided here.
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string digestOID)
+ {
+ AddSigner(privateKey, subjectKeyID, Helper.GetEncOid(privateKey, digestOID), digestOID);
+ }
+
+ /**
+ * add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ * provided here.
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string encryptionOID,
+ string digestOID)
+ {
+ doAddSigner(privateKey, GetSignerIdentifier(subjectKeyID), encryptionOID, digestOID,
+ new DefaultSignedAttributeTableGenerator(), null, null);
+ }
+
+ /**
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string digestOID,
+ Asn1.Cms.AttributeTable signedAttr,
+ Asn1.Cms.AttributeTable unsignedAttr)
+ {
+ AddSigner(privateKey, cert, Helper.GetEncOid(privateKey, digestOID), digestOID,
+ signedAttr, unsignedAttr);
+ }
+
+ /**
+ * add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param encryptionOID digest encryption algorithm OID
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string encryptionOID,
+ string digestOID,
+ Asn1.Cms.AttributeTable signedAttr,
+ Asn1.Cms.AttributeTable unsignedAttr)
+ {
+ doAddSigner(privateKey, GetSignerIdentifier(cert), encryptionOID, digestOID,
+ new DefaultSignedAttributeTableGenerator(signedAttr),
+ new SimpleAttributeTableGenerator(unsignedAttr),
+ signedAttr);
+ }
+
+ /**
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param subjectKeyID subjectKeyID of corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string digestOID,
+ Asn1.Cms.AttributeTable signedAttr,
+ Asn1.Cms.AttributeTable unsignedAttr)
+ {
+ AddSigner(privateKey, subjectKeyID, Helper.GetEncOid(privateKey, digestOID), digestOID,
+ signedAttr, unsignedAttr);
+ }
+
+ /**
+ * add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param subjectKeyID subjectKeyID of corresponding public key
+ * @param encryptionOID digest encryption algorithm OID
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string encryptionOID,
+ string digestOID,
+ Asn1.Cms.AttributeTable signedAttr,
+ Asn1.Cms.AttributeTable unsignedAttr)
+ {
+ doAddSigner(privateKey, GetSignerIdentifier(subjectKeyID), encryptionOID, digestOID,
+ new DefaultSignedAttributeTableGenerator(signedAttr),
+ new SimpleAttributeTableGenerator(unsignedAttr),
+ signedAttr);
+ }
+
+ /**
+ * add a signer with extra signed/unsigned attributes based on generators.
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string digestOID,
+ CmsAttributeTableGenerator signedAttrGen,
+ CmsAttributeTableGenerator unsignedAttrGen)
+ {
+ AddSigner(privateKey, cert, Helper.GetEncOid(privateKey, digestOID), digestOID,
+ signedAttrGen, unsignedAttrGen);
+ }
+
+ /**
+ * add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string encryptionOID,
+ string digestOID,
+ CmsAttributeTableGenerator signedAttrGen,
+ CmsAttributeTableGenerator unsignedAttrGen)
+ {
+ doAddSigner(privateKey, GetSignerIdentifier(cert), encryptionOID, digestOID, signedAttrGen,
+ unsignedAttrGen, null);
+ }
+
+ /**
+ * add a signer with extra signed/unsigned attributes based on generators.
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string digestOID,
+ CmsAttributeTableGenerator signedAttrGen,
+ CmsAttributeTableGenerator unsignedAttrGen)
+ {
+ AddSigner(privateKey, subjectKeyID, Helper.GetEncOid(privateKey, digestOID), digestOID,
+ signedAttrGen, unsignedAttrGen);
+ }
+
+ /**
+ * add a signer, including digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string encryptionOID,
+ string digestOID,
+ CmsAttributeTableGenerator signedAttrGen,
+ CmsAttributeTableGenerator unsignedAttrGen)
+ {
+ doAddSigner(privateKey, GetSignerIdentifier(subjectKeyID), encryptionOID, digestOID,
+ signedAttrGen, unsignedAttrGen, null);
+ }
+
+ public void AddSignerInfoGenerator(SignerInfoGenerator signerInfoGenerator)
+ {
+ signerInfs.Add(new SignerInf(this, signerInfoGenerator.contentSigner, signerInfoGenerator.sigId,
+ signerInfoGenerator.signedGen, signerInfoGenerator.unsignedGen, null));
+ }
+
+ private void doAddSigner(
+ AsymmetricKeyParameter privateKey,
+ SignerIdentifier signerIdentifier,
+ string encryptionOID,
+ string digestOID,
+ CmsAttributeTableGenerator signedAttrGen,
+ CmsAttributeTableGenerator unsignedAttrGen,
+ Asn1.Cms.AttributeTable baseSignedTable)
+ {
+ signerInfs.Add(new SignerInf(this, privateKey, m_random, signerIdentifier, digestOID, encryptionOID,
+ signedAttrGen, unsignedAttrGen, baseSignedTable));
+ }
+
+ /**
+ * generate a signed object that for a CMS Signed Data object
+ */
+ public CmsSignedData Generate(
+ CmsProcessable content)
+ {
+ return Generate(content, false);
+ }
+
+ /**
+ * generate a signed object that for a CMS Signed Data
+ * object - if encapsulate is true a copy
+ * of the message will be included in the signature. The content type
+ * is set according to the OID represented by the string signedContentType.
+ */
+ public CmsSignedData Generate(
+ string signedContentType,
+ // FIXME Avoid accessing more than once to support CmsProcessableInputStream
+ CmsProcessable content,
+ bool encapsulate)
+ {
+ Asn1EncodableVector digestAlgs = new Asn1EncodableVector();
+ Asn1EncodableVector signerInfos = new Asn1EncodableVector();
+
+ m_digests.Clear(); // clear the current preserved digest state
+
+ //
+ // add the precalculated SignerInfo objects.
+ //
+ foreach (SignerInformation signer in _signers)
+ {
+ digestAlgs.Add(Helper.FixAlgID(signer.DigestAlgorithmID));
+
+ // TODO Verify the content type and calculated digest match the precalculated SignerInfo
+ signerInfos.Add(signer.ToSignerInfo());
+ }
+
+ //
+ // add the SignerInfo objects
+ //
+ bool isCounterSignature = (signedContentType == null);
+
+ DerObjectIdentifier contentTypeOid = isCounterSignature
+ ? null
+ : new DerObjectIdentifier(signedContentType);
+
+ foreach (SignerInf signer in signerInfs)
+ {
+ try
+ {
+ digestAlgs.Add(signer.DigestAlgorithmID);
+ signerInfos.Add(signer.ToSignerInfo(contentTypeOid, content));
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("encoding error.", e);
+ }
+ catch (InvalidKeyException e)
+ {
+ throw new CmsException("key inappropriate for signature.", e);
+ }
+ catch (SignatureException e)
+ {
+ throw new CmsException("error creating signature.", e);
+ }
+ catch (CertificateEncodingException e)
+ {
+ throw new CmsException("error creating sid.", e);
+ }
+ }
+
+ Asn1Set certificates = null;
+
+ if (_certs.Count != 0)
+ {
+ certificates = UseDerForCerts
+ ? CmsUtilities.CreateDerSetFromList(_certs)
+ : CmsUtilities.CreateBerSetFromList(_certs);
+ }
+
+ Asn1Set certrevlist = null;
+
+ if (_crls.Count != 0)
+ {
+ certrevlist = UseDerForCrls
+ ? CmsUtilities.CreateDerSetFromList(_crls)
+ : CmsUtilities.CreateBerSetFromList(_crls);
+ }
+
+ Asn1OctetString octs = null;
+ if (encapsulate)
+ {
+ MemoryStream bOut = new MemoryStream();
+ if (content != null)
+ {
+ try
+ {
+ content.Write(bOut);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("encapsulation error.", e);
+ }
+ }
+ octs = new BerOctetString(bOut.ToArray());
+ }
+
+ ContentInfo encInfo = new ContentInfo(contentTypeOid, octs);
+
+ SignedData sd = new SignedData(
+ new DerSet(digestAlgs),
+ encInfo,
+ certificates,
+ certrevlist,
+ new DerSet(signerInfos));
+
+ ContentInfo contentInfo = new ContentInfo(CmsObjectIdentifiers.SignedData, sd);
+
+ return new CmsSignedData(content, contentInfo);
+ }
+
+ /**
+ * generate a signed object that for a CMS Signed Data
+ * object - if encapsulate is true a copy
+ * of the message will be included in the signature with the
+ * default content type "data".
+ */
+ public CmsSignedData Generate(
+ CmsProcessable content,
+ bool encapsulate)
+ {
+ return this.Generate(Data, content, encapsulate);
+ }
+
+ /**
+ * generate a set of one or more SignerInformation objects representing counter signatures on
+ * the passed in SignerInformation object.
+ *
+ * @param signer the signer to be countersigned
+ * @param sigProvider the provider to be used for counter signing.
+ * @return a store containing the signers.
+ */
+ public SignerInformationStore GenerateCounterSigners(
+ SignerInformation signer)
+ {
+ return this.Generate(null, new CmsProcessableByteArray(signer.GetSignature()), false).GetSignerInfos();
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataGenerator.cs.meta
new file mode 100644
index 00000000..90157a78
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 07bf1667fd94e7546831682ce07d3f91
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataParser.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataParser.cs
new file mode 100644
index 00000000..4f4e79b6
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataParser.cs
@@ -0,0 +1,435 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * Parsing class for an CMS Signed Data object from an input stream.
+ *
+ * Note: that because we are in a streaming mode only one signer can be tried and it is important
+ * that the methods on the parser are called in the appropriate order.
+ *
+ *
+ * A simple example of usage for an encapsulated signature.
+ *
+ *
+ * Two notes: first, in the example below the validity of
+ * the certificate isn't verified, just the fact that one of the certs
+ * matches the given signer, and, second, because we are in a streaming
+ * mode the order of the operations is important.
+ *
+ *
+ * CmsSignedDataParser sp = new CmsSignedDataParser(encapSigData);
+ *
+ * sp.GetSignedContent().Drain();
+ *
+ * IX509Store certs = sp.GetCertificates();
+ * SignerInformationStore signers = sp.GetSignerInfos();
+ *
+ * foreach (SignerInformation signer in signers.GetSigners())
+ * {
+ * ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ * X509Certificate cert = (X509Certificate) certList[0];
+ *
+ * Console.WriteLine("verify returns: " + signer.Verify(cert));
+ * }
+ *
+ * Note also: this class does not introduce buffering - if you are processing large files you should create
+ * the parser with:
+ *
+ * CmsSignedDataParser ep = new CmsSignedDataParser(new BufferedInputStream(encapSigData, bufSize));
+ *
+ * where bufSize is a suitably large buffer size.
+ */
+ public class CmsSignedDataParser
+ : CmsContentInfoParser
+ {
+ private static readonly CmsSignedHelper Helper = CmsSignedHelper.Instance;
+
+ private SignedDataParser _signedData;
+ private DerObjectIdentifier _signedContentType;
+ private CmsTypedStream _signedContent;
+ private IDictionary m_digests;
+ private HashSet _digestOids;
+
+ private SignerInformationStore _signerInfoStore;
+ private Asn1Set _certSet, _crlSet;
+ private bool _isCertCrlParsed;
+
+ public CmsSignedDataParser(
+ byte[] sigBlock)
+ : this(new MemoryStream(sigBlock, false))
+ {
+ }
+
+ public CmsSignedDataParser(
+ CmsTypedStream signedContent,
+ byte[] sigBlock)
+ : this(signedContent, new MemoryStream(sigBlock, false))
+ {
+ }
+
+ /**
+ * base constructor - with encapsulated content
+ */
+ public CmsSignedDataParser(
+ Stream sigData)
+ : this(null, sigData)
+ {
+ }
+
+ /**
+ * base constructor
+ *
+ * @param signedContent the content that was signed.
+ * @param sigData the signature object.
+ */
+ public CmsSignedDataParser(
+ CmsTypedStream signedContent,
+ Stream sigData)
+ : base(sigData)
+ {
+ try
+ {
+ this._signedContent = signedContent;
+ this._signedData = SignedDataParser.GetInstance(this.contentInfo.GetContent(Asn1Tags.Sequence));
+ this.m_digests = new Dictionary(StringComparer.OrdinalIgnoreCase);
+ this._digestOids = new HashSet();
+
+ Asn1SetParser digAlgs = _signedData.GetDigestAlgorithms();
+ IAsn1Convertible o;
+
+ while ((o = digAlgs.ReadObject()) != null)
+ {
+ AlgorithmIdentifier id = AlgorithmIdentifier.GetInstance(o.ToAsn1Object());
+
+ try
+ {
+ string digestOid = id.Algorithm.Id;
+ string digestName = Helper.GetDigestAlgName(digestOid);
+
+ if (!this.m_digests.ContainsKey(digestName))
+ {
+ this.m_digests[digestName] = Helper.GetDigestInstance(digestName);
+ this._digestOids.Add(digestOid);
+ }
+ }
+ catch (SecurityUtilityException)
+ {
+ // TODO Should do something other than ignore it
+ }
+ }
+
+ //
+ // If the message is simply a certificate chain message GetContent() may return null.
+ //
+ ContentInfoParser cont = _signedData.GetEncapContentInfo();
+ Asn1OctetStringParser octs = (Asn1OctetStringParser)
+ cont.GetContent(Asn1Tags.OctetString);
+
+ if (octs != null)
+ {
+ CmsTypedStream ctStr = new CmsTypedStream(
+ cont.ContentType.Id, octs.GetOctetStream());
+
+ if (_signedContent == null)
+ {
+ this._signedContent = ctStr;
+ }
+ else
+ {
+ //
+ // content passed in, need to read past empty encapsulated content info object if present
+ //
+ ctStr.Drain();
+ }
+ }
+
+ _signedContentType = _signedContent == null
+ ? cont.ContentType
+ : new DerObjectIdentifier(_signedContent.ContentType);
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("io exception: " + e.Message, e);
+ }
+ }
+
+ /**
+ * Return the version number for the SignedData object
+ *
+ * @return the version number
+ */
+ public int Version
+ {
+ get { return _signedData.Version.IntValueExact; }
+ }
+
+ public ISet DigestOids
+ {
+ get { return new HashSet(_digestOids); }
+ }
+
+ /**
+ * return the collection of signers that are associated with the
+ * signatures for the message.
+ * @throws CmsException
+ */
+ public SignerInformationStore GetSignerInfos()
+ {
+ if (_signerInfoStore == null)
+ {
+ PopulateCertCrlSets();
+
+ var signerInfos = new List();
+ var hashes = new Dictionary(StringComparer.OrdinalIgnoreCase);
+
+ foreach (var digest in m_digests)
+ {
+ hashes[digest.Key] = DigestUtilities.DoFinal(digest.Value);
+ }
+
+ try
+ {
+ Asn1SetParser s = _signedData.GetSignerInfos();
+ IAsn1Convertible o;
+
+ while ((o = s.ReadObject()) != null)
+ {
+ SignerInfo info = SignerInfo.GetInstance(o.ToAsn1Object());
+ string digestName = Helper.GetDigestAlgName(info.DigestAlgorithm.Algorithm.Id);
+
+ byte[] hash = hashes[digestName];
+
+ signerInfos.Add(new SignerInformation(info, _signedContentType, null, new BaseDigestCalculator(hash)));
+ }
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("io exception: " + e.Message, e);
+ }
+
+ _signerInfoStore = new SignerInformationStore(signerInfos);
+ }
+
+ return _signerInfoStore;
+ }
+
+ /**
+ * return a X509Store containing the attribute certificates, if any, contained
+ * in this message.
+ *
+ * @param type type of store to create
+ * @return a store of attribute certificates
+ * @exception org.bouncycastle.x509.NoSuchStoreException if the store type isn't available.
+ * @exception CmsException if a general exception prevents creation of the X509Store
+ */
+ public IStore GetAttributeCertificates()
+ {
+ PopulateCertCrlSets();
+
+ return Helper.GetAttributeCertificates(_certSet);
+ }
+
+ /**
+ * return a X509Store containing the public key certificates, if any, contained
+ * in this message.
+ *
+ * @param type type of store to create
+ * @return a store of public key certificates
+ * @exception NoSuchStoreException if the store type isn't available.
+ * @exception CmsException if a general exception prevents creation of the X509Store
+ */
+ public IStore GetCertificates()
+ {
+ PopulateCertCrlSets();
+
+ return Helper.GetCertificates(_certSet);
+ }
+
+ /**
+ * return a X509Store containing CRLs, if any, contained
+ * in this message.
+ *
+ * @param type type of store to create
+ * @return a store of CRLs
+ * @exception NoSuchStoreException if the store type isn't available.
+ * @exception CmsException if a general exception prevents creation of the X509Store
+ */
+ public IStore GetCrls()
+ {
+ PopulateCertCrlSets();
+
+ return Helper.GetCrls(_crlSet);
+ }
+
+ public IStore GetOtherRevInfos(DerObjectIdentifier otherRevInfoFormat)
+ {
+ PopulateCertCrlSets();
+
+ return Helper.GetOtherRevInfos(_crlSet, otherRevInfoFormat);
+ }
+
+ private void PopulateCertCrlSets()
+ {
+ if (_isCertCrlParsed)
+ return;
+
+ _isCertCrlParsed = true;
+
+ try
+ {
+ // care! Streaming - Must process the GetCertificates() result before calling GetCrls()
+ _certSet = GetAsn1Set(_signedData.GetCertificates());
+ _crlSet = GetAsn1Set(_signedData.GetCrls());
+ }
+ catch (IOException e)
+ {
+ throw new CmsException("problem parsing cert/crl sets", e);
+ }
+ }
+
+ ///
+ /// Return the DerObjectIdentifier associated with the encapsulated
+ /// content info structure carried in the signed data.
+ ///
+ public DerObjectIdentifier SignedContentType
+ {
+ get { return _signedContentType; }
+ }
+
+ public CmsTypedStream GetSignedContent()
+ {
+ if (_signedContent == null)
+ {
+ return null;
+ }
+
+ Stream digStream = _signedContent.ContentStream;
+
+ foreach (var digest in m_digests.Values)
+ {
+ digStream = new DigestStream(digStream, digest, null);
+ }
+
+ return new CmsTypedStream(_signedContent.ContentType, digStream);
+ }
+
+ /**
+ * Replace the signerinformation store associated with the passed
+ * in message contained in the stream original with the new one passed in.
+ * You would probably only want to do this if you wanted to change the unsigned
+ * attributes associated with a signer, or perhaps delete one.
+ *
+ * The output stream is returned unclosed.
+ *
+ * @param original the signed data stream to be used as a base.
+ * @param signerInformationStore the new signer information store to use.
+ * @param out the stream to Write the new signed data object to.
+ * @return out.
+ */
+ public static Stream ReplaceSigners(
+ Stream original,
+ SignerInformationStore signerInformationStore,
+ Stream outStr)
+ {
+ // NB: SecureRandom would be ignored since using existing signatures only
+ CmsSignedDataStreamGenerator gen = new CmsSignedDataStreamGenerator();
+ CmsSignedDataParser parser = new CmsSignedDataParser(original);
+
+// gen.AddDigests(parser.DigestOids);
+ gen.AddSigners(signerInformationStore);
+
+ CmsTypedStream signedContent = parser.GetSignedContent();
+ bool encapsulate = (signedContent != null);
+ Stream contentOut = gen.Open(outStr, parser.SignedContentType.Id, encapsulate);
+ if (encapsulate)
+ {
+ Streams.PipeAll(signedContent.ContentStream, contentOut);
+ }
+
+ gen.AddAttributeCertificates(parser.GetAttributeCertificates());
+ gen.AddCertificates(parser.GetCertificates());
+ gen.AddCrls(parser.GetCrls());
+
+// gen.AddSigners(parser.GetSignerInfos());
+
+ contentOut.Dispose();
+
+ return outStr;
+ }
+
+ /**
+ * Replace the certificate and CRL information associated with this
+ * CMSSignedData object with the new one passed in.
+ *
+ * The output stream is returned unclosed.
+ *
+ * @param original the signed data stream to be used as a base.
+ * @param certsAndCrls the new certificates and CRLs to be used.
+ * @param out the stream to Write the new signed data object to.
+ * @return out.
+ * @exception CmsException if there is an error processing the CertStore
+ */
+ public static Stream ReplaceCertificatesAndCrls(Stream original, IStore x509Certs,
+ IStore x509Crls, IStore x509AttrCerts, Stream outStr)
+ {
+ // NB: SecureRandom would be ignored since using existing signatures only
+ CmsSignedDataStreamGenerator gen = new CmsSignedDataStreamGenerator();
+ CmsSignedDataParser parser = new CmsSignedDataParser(original);
+
+ gen.AddDigests(parser.DigestOids);
+
+ CmsTypedStream signedContent = parser.GetSignedContent();
+ bool encapsulate = (signedContent != null);
+ Stream contentOut = gen.Open(outStr, parser.SignedContentType.Id, encapsulate);
+ if (encapsulate)
+ {
+ Streams.PipeAll(signedContent.ContentStream, contentOut);
+ }
+
+ if (x509AttrCerts != null)
+ {
+ gen.AddAttributeCertificates(x509AttrCerts);
+ }
+ if (x509Certs != null)
+ {
+ gen.AddCertificates(x509Certs);
+ }
+ if (x509Crls != null)
+ {
+ gen.AddCrls(x509Crls);
+ }
+
+ gen.AddSigners(parser.GetSignerInfos());
+
+ contentOut.Dispose();
+
+ return outStr;
+ }
+
+ private static Asn1Set GetAsn1Set(
+ Asn1SetParser asn1SetParser)
+ {
+ return asn1SetParser == null
+ ? null
+ : Asn1Set.GetInstance(asn1SetParser.ToAsn1Object());
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataParser.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataParser.cs.meta
new file mode 100644
index 00000000..bca69fc4
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataParser.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 03d2a1ea40fe43a42bd98d82936b65c3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataStreamGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataStreamGenerator.cs
new file mode 100644
index 00000000..69cbf8a7
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataStreamGenerator.cs
@@ -0,0 +1,913 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ /**
+ * General class for generating a pkcs7-signature message stream.
+ *
+ * A simple example of usage.
+ *
+ *
+ * IX509Store certs...
+ * CmsSignedDataStreamGenerator gen = new CmsSignedDataStreamGenerator();
+ *
+ * gen.AddSigner(privateKey, cert, CmsSignedDataStreamGenerator.DIGEST_SHA1);
+ *
+ * gen.AddCertificates(certs);
+ *
+ * Stream sigOut = gen.Open(bOut);
+ *
+ * sigOut.Write(Encoding.UTF8.GetBytes("Hello World!"));
+ *
+ * sigOut.Close();
+ *
+ */
+ public class CmsSignedDataStreamGenerator
+ : CmsSignedGenerator
+ {
+ private static readonly CmsSignedHelper Helper = CmsSignedHelper.Instance;
+
+ private readonly IList _signerInfs =
+ new List();
+ private readonly HashSet _messageDigestOids = new HashSet();
+ private readonly IDictionary m_messageDigests =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private readonly IDictionary m_messageHashes =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private bool _messageDigestsLocked;
+ private int _bufferSize;
+
+ private class DigestAndSignerInfoGeneratorHolder
+ {
+ internal readonly ISignerInfoGenerator signerInf;
+ internal readonly string digestOID;
+
+ internal DigestAndSignerInfoGeneratorHolder(ISignerInfoGenerator signerInf, string digestOID)
+ {
+ this.signerInf = signerInf;
+ this.digestOID = digestOID;
+ }
+
+ internal AlgorithmIdentifier DigestAlgorithm
+ {
+ get { return new AlgorithmIdentifier(new DerObjectIdentifier(this.digestOID), DerNull.Instance); }
+ }
+ }
+
+ private class SignerInfoGeneratorImpl : ISignerInfoGenerator
+ {
+ private readonly CmsSignedDataStreamGenerator outer;
+
+ private readonly SignerIdentifier _signerIdentifier;
+ private readonly string _digestOID;
+ private readonly string _encOID;
+ private readonly CmsAttributeTableGenerator _sAttr;
+ private readonly CmsAttributeTableGenerator _unsAttr;
+ private readonly string _encName;
+ private readonly ISigner _sig;
+
+ internal SignerInfoGeneratorImpl(
+ CmsSignedDataStreamGenerator outer,
+ AsymmetricKeyParameter key,
+ SignerIdentifier signerIdentifier,
+ string digestOID,
+ string encOID,
+ CmsAttributeTableGenerator sAttr,
+ CmsAttributeTableGenerator unsAttr)
+ {
+ this.outer = outer;
+
+ _signerIdentifier = signerIdentifier;
+ _digestOID = digestOID;
+ _encOID = encOID;
+ _sAttr = sAttr;
+ _unsAttr = unsAttr;
+ _encName = Helper.GetEncryptionAlgName(_encOID);
+
+ string digestName = Helper.GetDigestAlgName(_digestOID);
+ string signatureName = digestName + "with" + _encName;
+
+ if (_sAttr != null)
+ {
+ _sig = Helper.GetSignatureInstance(signatureName);
+ }
+ else
+ {
+ // Note: Need to use raw signatures here since we have already calculated the digest
+ if (_encName.Equals("RSA"))
+ {
+ _sig = Helper.GetSignatureInstance("RSA");
+ }
+ else if (_encName.Equals("DSA"))
+ {
+ _sig = Helper.GetSignatureInstance("NONEwithDSA");
+ }
+ // TODO Add support for raw PSS
+// else if (_encName.equals("RSAandMGF1"))
+// {
+// _sig = CMSSignedHelper.INSTANCE.getSignatureInstance("NONEWITHRSAPSS", _sigProvider);
+// try
+// {
+// // Init the params this way to avoid having a 'raw' version of each PSS algorithm
+// Signature sig2 = CMSSignedHelper.INSTANCE.getSignatureInstance(signatureName, _sigProvider);
+// PSSParameterSpec spec = (PSSParameterSpec)sig2.getParameters().getParameterSpec(PSSParameterSpec.class);
+// _sig.setParameter(spec);
+// }
+// catch (Exception e)
+// {
+// throw new SignatureException("algorithm: " + _encName + " could not be configured.");
+// }
+// }
+ else
+ {
+ throw new SignatureException("algorithm: " + _encName + " not supported in base signatures.");
+ }
+ }
+
+ _sig.Init(true, new ParametersWithRandom(key, outer.m_random));
+ }
+
+ public SignerInfo Generate(DerObjectIdentifier contentType, AlgorithmIdentifier digestAlgorithm,
+ byte[] calculatedDigest)
+ {
+ try
+ {
+ string digestName = Helper.GetDigestAlgName(_digestOID);
+ string signatureName = digestName + "with" + _encName;
+
+// AlgorithmIdentifier digAlgId = DigestAlgorithmID;
+//
+// byte[] hash = (byte[])outer._messageHashes[Helper.GetDigestAlgName(this._digestOID)];
+// outer._digests[_digestOID] = hash.Clone();
+
+ byte[] bytesToSign = calculatedDigest;
+
+ /* RFC 3852 5.4
+ * The result of the message digest calculation process depends on
+ * whether the signedAttrs field is present. When the field is absent,
+ * the result is just the message digest of the content as described
+ *
+ * above. When the field is present, however, the result is the message
+ * digest of the complete DER encoding of the SignedAttrs value
+ * contained in the signedAttrs field.
+ */
+ Asn1Set signedAttr = null;
+ if (_sAttr != null)
+ {
+ var parameters = outer.GetBaseParameters(contentType, digestAlgorithm, calculatedDigest);
+
+// Asn1.Cms.AttributeTable signed = _sAttr.GetAttributes(Collections.unmodifiableMap(parameters));
+ Asn1.Cms.AttributeTable signed = _sAttr.GetAttributes(parameters);
+
+ if (contentType == null) //counter signature
+ {
+ if (signed != null && signed[CmsAttributes.ContentType] != null)
+ {
+ signed = signed.Remove(CmsAttributes.ContentType);
+ }
+ }
+
+ signedAttr = outer.GetAttributeSet(signed);
+
+ // sig must be composed from the DER encoding.
+ bytesToSign = signedAttr.GetEncoded(Asn1Encodable.Der);
+ }
+ else
+ {
+ // Note: Need to use raw signatures here since we have already calculated the digest
+ if (_encName.Equals("RSA"))
+ {
+ DigestInfo dInfo = new DigestInfo(digestAlgorithm, calculatedDigest);
+ bytesToSign = dInfo.GetEncoded(Asn1Encodable.Der);
+ }
+ }
+
+ _sig.BlockUpdate(bytesToSign, 0, bytesToSign.Length);
+ byte[] sigBytes = _sig.GenerateSignature();
+
+ Asn1Set unsignedAttr = null;
+ if (_unsAttr != null)
+ {
+ var parameters = outer.GetBaseParameters(contentType, digestAlgorithm, calculatedDigest);
+ parameters[CmsAttributeTableParameter.Signature] = sigBytes.Clone();
+
+// Asn1.Cms.AttributeTable unsigned = _unsAttr.getAttributes(Collections.unmodifiableMap(parameters));
+ Asn1.Cms.AttributeTable unsigned = _unsAttr.GetAttributes(parameters);
+
+ unsignedAttr = outer.GetAttributeSet(unsigned);
+ }
+
+ // TODO[RSAPSS] Need the ability to specify non-default parameters
+ Asn1Encodable sigX509Parameters = SignerUtilities.GetDefaultX509Parameters(signatureName);
+ AlgorithmIdentifier digestEncryptionAlgorithm = Helper.GetEncAlgorithmIdentifier(
+ new DerObjectIdentifier(_encOID), sigX509Parameters);
+
+ return new SignerInfo(_signerIdentifier, digestAlgorithm,
+ signedAttr, digestEncryptionAlgorithm, new DerOctetString(sigBytes), unsignedAttr);
+ }
+ catch (IOException e)
+ {
+ throw new CmsStreamException("encoding error.", e);
+ }
+ catch (SignatureException e)
+ {
+ throw new CmsStreamException("error creating signature.", e);
+ }
+ }
+ }
+
+ public CmsSignedDataStreamGenerator()
+ {
+ }
+
+ /// Constructor allowing specific source of randomness
+ /// Instance of SecureRandom to use.
+ public CmsSignedDataStreamGenerator(SecureRandom random)
+ : base(random)
+ {
+ }
+
+ /**
+ * Set the underlying string size for encapsulated data
+ *
+ * @param bufferSize length of octet strings to buffer the data.
+ */
+ public void SetBufferSize(int bufferSize)
+ {
+ _bufferSize = bufferSize;
+ }
+
+ public void AddDigests(params string[] digestOids)
+ {
+ foreach (string digestOid in digestOids)
+ {
+ ConfigureDigest(digestOid);
+ }
+ }
+
+ public void AddDigests(IEnumerable digestOids)
+ {
+ foreach (string digestOid in digestOids)
+ {
+ ConfigureDigest(digestOid);
+ }
+ }
+
+ /**
+ * add a signer - no attributes other than the default ones will be
+ * provided here.
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidKeyException
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string digestOid)
+ {
+ AddSigner(privateKey, cert, digestOid,
+ new DefaultSignedAttributeTableGenerator(), null);
+ }
+
+ /**
+ * add a signer, specifying the digest encryption algorithm - no attributes other than the default ones will be
+ * provided here.
+ * @throws NoSuchProviderException
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidKeyException
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string encryptionOid,
+ string digestOid)
+ {
+ AddSigner(privateKey, cert, encryptionOid, digestOid,
+ new DefaultSignedAttributeTableGenerator(),
+ (CmsAttributeTableGenerator)null);
+ }
+
+ /**
+ * add a signer with extra signed/unsigned attributes.
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidKeyException
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string digestOid,
+ Asn1.Cms.AttributeTable signedAttr,
+ Asn1.Cms.AttributeTable unsignedAttr)
+ {
+ AddSigner(privateKey, cert, digestOid,
+ new DefaultSignedAttributeTableGenerator(signedAttr),
+ new SimpleAttributeTableGenerator(unsignedAttr));
+ }
+
+ /**
+ * add a signer with extra signed/unsigned attributes - specifying digest
+ * encryption algorithm.
+ * @throws NoSuchProviderException
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidKeyException
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string encryptionOid,
+ string digestOid,
+ Asn1.Cms.AttributeTable signedAttr,
+ Asn1.Cms.AttributeTable unsignedAttr)
+ {
+ AddSigner(privateKey, cert, encryptionOid, digestOid,
+ new DefaultSignedAttributeTableGenerator(signedAttr),
+ new SimpleAttributeTableGenerator(unsignedAttr));
+ }
+
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string digestOid,
+ CmsAttributeTableGenerator signedAttrGenerator,
+ CmsAttributeTableGenerator unsignedAttrGenerator)
+ {
+ AddSigner(privateKey, cert, Helper.GetEncOid(privateKey, digestOid), digestOid,
+ signedAttrGenerator, unsignedAttrGenerator);
+ }
+
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ X509Certificate cert,
+ string encryptionOid,
+ string digestOid,
+ CmsAttributeTableGenerator signedAttrGenerator,
+ CmsAttributeTableGenerator unsignedAttrGenerator)
+ {
+ DoAddSigner(privateKey, GetSignerIdentifier(cert), encryptionOid, digestOid,
+ signedAttrGenerator, unsignedAttrGenerator);
+ }
+
+ /**
+ * add a signer - no attributes other than the default ones will be
+ * provided here.
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidKeyException
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string digestOid)
+ {
+ AddSigner(privateKey, subjectKeyID, digestOid, new DefaultSignedAttributeTableGenerator(),
+ (CmsAttributeTableGenerator)null);
+ }
+
+ /**
+ * add a signer - no attributes other than the default ones will be
+ * provided here.
+ * @throws NoSuchProviderException
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidKeyException
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string encryptionOid,
+ string digestOid)
+ {
+ AddSigner(privateKey, subjectKeyID, encryptionOid, digestOid,
+ new DefaultSignedAttributeTableGenerator(),
+ (CmsAttributeTableGenerator)null);
+ }
+
+ /**
+ * add a signer with extra signed/unsigned attributes.
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidKeyException
+ */
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string digestOid,
+ Asn1.Cms.AttributeTable signedAttr,
+ Asn1.Cms.AttributeTable unsignedAttr)
+ {
+ AddSigner(privateKey, subjectKeyID, digestOid,
+ new DefaultSignedAttributeTableGenerator(signedAttr),
+ new SimpleAttributeTableGenerator(unsignedAttr));
+ }
+
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string digestOid,
+ CmsAttributeTableGenerator signedAttrGenerator,
+ CmsAttributeTableGenerator unsignedAttrGenerator)
+ {
+ AddSigner(privateKey, subjectKeyID, Helper.GetEncOid(privateKey, digestOid),
+ digestOid, signedAttrGenerator, unsignedAttrGenerator);
+ }
+
+ public void AddSigner(
+ AsymmetricKeyParameter privateKey,
+ byte[] subjectKeyID,
+ string encryptionOid,
+ string digestOid,
+ CmsAttributeTableGenerator signedAttrGenerator,
+ CmsAttributeTableGenerator unsignedAttrGenerator)
+ {
+ DoAddSigner(privateKey, GetSignerIdentifier(subjectKeyID), encryptionOid, digestOid,
+ signedAttrGenerator, unsignedAttrGenerator);
+ }
+
+ private void DoAddSigner(
+ AsymmetricKeyParameter privateKey,
+ SignerIdentifier signerIdentifier,
+ string encryptionOid,
+ string digestOid,
+ CmsAttributeTableGenerator signedAttrGenerator,
+ CmsAttributeTableGenerator unsignedAttrGenerator)
+ {
+ ConfigureDigest(digestOid);
+
+ SignerInfoGeneratorImpl signerInf = new SignerInfoGeneratorImpl(this, privateKey,
+ signerIdentifier, digestOid, encryptionOid, signedAttrGenerator, unsignedAttrGenerator);
+
+ _signerInfs.Add(new DigestAndSignerInfoGeneratorHolder(signerInf, digestOid));
+ }
+
+ internal override void AddSignerCallback(
+ SignerInformation si)
+ {
+ // FIXME If there were parameters in si.DigestAlgorithmID.Parameters, they are lost
+ // NB: Would need to call FixAlgID on the DigestAlgorithmID
+
+ // For precalculated signers, just need to register the algorithm, not configure a digest
+ RegisterDigestOid(si.DigestAlgorithmID.Algorithm.Id);
+ }
+
+ /**
+ * generate a signed object that for a CMS Signed Data object
+ */
+ public Stream Open(
+ Stream outStream)
+ {
+ return Open(outStream, false);
+ }
+
+ /**
+ * generate a signed object that for a CMS Signed Data
+ * object - if encapsulate is true a copy
+ * of the message will be included in the signature with the
+ * default content type "data".
+ */
+ public Stream Open(
+ Stream outStream,
+ bool encapsulate)
+ {
+ return Open(outStream, Data, encapsulate);
+ }
+
+ /**
+ * generate a signed object that for a CMS Signed Data
+ * object using the given provider - if encapsulate is true a copy
+ * of the message will be included in the signature with the
+ * default content type "data". If dataOutputStream is non null the data
+ * being signed will be written to the stream as it is processed.
+ * @param out stream the CMS object is to be written to.
+ * @param encapsulate true if data should be encapsulated.
+ * @param dataOutputStream output stream to copy the data being signed to.
+ */
+ public Stream Open(
+ Stream outStream,
+ bool encapsulate,
+ Stream dataOutputStream)
+ {
+ return Open(outStream, Data, encapsulate, dataOutputStream);
+ }
+
+ /**
+ * generate a signed object that for a CMS Signed Data
+ * object - if encapsulate is true a copy
+ * of the message will be included in the signature. The content type
+ * is set according to the OID represented by the string signedContentType.
+ */
+ public Stream Open(
+ Stream outStream,
+ string signedContentType,
+ bool encapsulate)
+ {
+ return Open(outStream, signedContentType, encapsulate, null);
+ }
+
+ /**
+ * generate a signed object that for a CMS Signed Data
+ * object using the given provider - if encapsulate is true a copy
+ * of the message will be included in the signature. The content type
+ * is set according to the OID represented by the string signedContentType.
+ * @param out stream the CMS object is to be written to.
+ * @param signedContentType OID for data to be signed.
+ * @param encapsulate true if data should be encapsulated.
+ * @param dataOutputStream output stream to copy the data being signed to.
+ */
+ public Stream Open(
+ Stream outStream,
+ string signedContentType,
+ bool encapsulate,
+ Stream dataOutputStream)
+ {
+ if (outStream == null)
+ throw new ArgumentNullException("outStream");
+ if (!outStream.CanWrite)
+ throw new ArgumentException("Expected writeable stream", "outStream");
+ if (dataOutputStream != null && !dataOutputStream.CanWrite)
+ throw new ArgumentException("Expected writeable stream", "dataOutputStream");
+
+ _messageDigestsLocked = true;
+
+ //
+ // ContentInfo
+ //
+ BerSequenceGenerator sGen = new BerSequenceGenerator(outStream);
+
+ sGen.AddObject(CmsObjectIdentifiers.SignedData);
+
+ //
+ // Signed Data
+ //
+ BerSequenceGenerator sigGen = new BerSequenceGenerator(
+ sGen.GetRawOutputStream(), 0, true);
+
+ bool isCounterSignature = (signedContentType == null);
+
+ DerObjectIdentifier contentTypeOid = isCounterSignature
+ ? null
+ : new DerObjectIdentifier(signedContentType);
+
+ sigGen.AddObject(CalculateVersion(contentTypeOid));
+
+ Asn1EncodableVector digestAlgs = new Asn1EncodableVector();
+
+ foreach (string digestOid in _messageDigestOids)
+ {
+ digestAlgs.Add(new AlgorithmIdentifier(new DerObjectIdentifier(digestOid), DerNull.Instance));
+ }
+
+ new DerSet(digestAlgs).EncodeTo(sigGen.GetRawOutputStream());
+
+ BerSequenceGenerator eiGen = new BerSequenceGenerator(sigGen.GetRawOutputStream());
+ eiGen.AddObject(contentTypeOid);
+
+ // If encapsulating, add the data as an octet string in the sequence
+ Stream encapStream = encapsulate
+ ? CmsUtilities.CreateBerOctetOutputStream(eiGen.GetRawOutputStream(), 0, true, _bufferSize)
+ : null;
+
+ // Also send the data to 'dataOutputStream' if necessary
+ Stream teeStream = GetSafeTeeOutputStream(dataOutputStream, encapStream);
+
+ // Let all the digests see the data as it is written
+ Stream digStream = AttachDigestsToOutputStream(m_messageDigests.Values, teeStream);
+
+ return new CmsSignedDataOutputStream(this, digStream, signedContentType, sGen, sigGen, eiGen);
+ }
+
+ private void RegisterDigestOid(
+ string digestOid)
+ {
+ if (_messageDigestsLocked)
+ {
+ if (!_messageDigestOids.Contains(digestOid))
+ throw new InvalidOperationException("Cannot register new digest OIDs after the data stream is opened");
+ }
+ else
+ {
+ _messageDigestOids.Add(digestOid);
+ }
+ }
+
+ private void ConfigureDigest(string digestOid)
+ {
+ RegisterDigestOid(digestOid);
+
+ string digestName = Helper.GetDigestAlgName(digestOid);
+
+ if (!m_messageDigests.ContainsKey(digestName))
+ {
+ if (_messageDigestsLocked)
+ throw new InvalidOperationException("Cannot configure new digests after the data stream is opened");
+
+ m_messageDigests[digestName] = Helper.GetDigestInstance(digestName);
+ }
+ }
+
+ // TODO Make public?
+ internal void Generate(
+ Stream outStream,
+ string eContentType,
+ bool encapsulate,
+ Stream dataOutputStream,
+ CmsProcessable content)
+ {
+ using (var signedOut = Open(outStream, eContentType, encapsulate, dataOutputStream))
+ {
+ if (content != null)
+ {
+ content.Write(signedOut);
+ }
+ }
+ }
+
+ // RFC3852, section 5.1:
+ // IF ((certificates is present) AND
+ // (any certificates with a type of other are present)) OR
+ // ((crls is present) AND
+ // (any crls with a type of other are present))
+ // THEN version MUST be 5
+ // ELSE
+ // IF (certificates is present) AND
+ // (any version 2 attribute certificates are present)
+ // THEN version MUST be 4
+ // ELSE
+ // IF ((certificates is present) AND
+ // (any version 1 attribute certificates are present)) OR
+ // (any SignerInfo structures are version 3) OR
+ // (encapContentInfo eContentType is other than id-data)
+ // THEN version MUST be 3
+ // ELSE version MUST be 1
+ //
+ private DerInteger CalculateVersion(
+ DerObjectIdentifier contentOid)
+ {
+ bool otherCert = false;
+ bool otherCrl = false;
+ bool attrCertV1Found = false;
+ bool attrCertV2Found = false;
+
+ if (_certs != null)
+ {
+ foreach (object obj in _certs)
+ {
+ if (obj is Asn1TaggedObject tagged)
+ {
+ if (tagged.TagNo == 1)
+ {
+ attrCertV1Found = true;
+ }
+ else if (tagged.TagNo == 2)
+ {
+ attrCertV2Found = true;
+ }
+ else if (tagged.TagNo == 3)
+ {
+ otherCert = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (otherCert)
+ {
+ return new DerInteger(5);
+ }
+
+ if (_crls != null)
+ {
+ foreach (object obj in _crls)
+ {
+ if (obj is Asn1TaggedObject)
+ {
+ otherCrl = true;
+ break;
+ }
+ }
+ }
+
+ if (otherCrl)
+ {
+ return new DerInteger(5);
+ }
+
+ if (attrCertV2Found)
+ {
+ return new DerInteger(4);
+ }
+
+ if (attrCertV1Found || !CmsObjectIdentifiers.Data.Equals(contentOid) || CheckForVersion3(_signers))
+ {
+ return new DerInteger(3);
+ }
+
+ return new DerInteger(1);
+ }
+
+ private bool CheckForVersion3(IList signerInfos)
+ {
+ foreach (SignerInformation si in signerInfos)
+ {
+ SignerInfo s = SignerInfo.GetInstance(si.ToSignerInfo());
+
+ if (s.Version.IntValueExact == 3)
+ return true;
+ }
+
+ return false;
+ }
+
+ private static Stream AttachDigestsToOutputStream(IEnumerable digests, Stream s)
+ {
+ Stream result = s;
+ foreach (IDigest digest in digests)
+ {
+ result = GetSafeTeeOutputStream(result, new DigestSink(digest));
+ }
+ return result;
+ }
+
+ private static Stream GetSafeOutputStream(Stream s)
+ {
+ return s ?? Stream.Null;
+ }
+
+ private static Stream GetSafeTeeOutputStream(Stream s1, Stream s2)
+ {
+ if (s1 == null)
+ return GetSafeOutputStream(s2);
+ if (s2 == null)
+ return GetSafeOutputStream(s1);
+ return new TeeOutputStream(s1, s2);
+ }
+
+ private class CmsSignedDataOutputStream
+ : BaseOutputStream
+ {
+ private readonly CmsSignedDataStreamGenerator outer;
+
+ private Stream _out;
+ private DerObjectIdentifier _contentOID;
+ private BerSequenceGenerator _sGen;
+ private BerSequenceGenerator _sigGen;
+ private BerSequenceGenerator _eiGen;
+
+ public CmsSignedDataOutputStream(
+ CmsSignedDataStreamGenerator outer,
+ Stream outStream,
+ string contentOID,
+ BerSequenceGenerator sGen,
+ BerSequenceGenerator sigGen,
+ BerSequenceGenerator eiGen)
+ {
+ this.outer = outer;
+
+ _out = outStream;
+ _contentOID = new DerObjectIdentifier(contentOID);
+ _sGen = sGen;
+ _sigGen = sigGen;
+ _eiGen = eiGen;
+ }
+
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ _out.Write(buffer, offset, count);
+ }
+
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || UNITY_2021_2_OR_NEWER
+ public override void Write(ReadOnlySpan buffer)
+ {
+ _out.Write(buffer);
+ }
+#endif
+
+ public override void WriteByte(byte value)
+ {
+ _out.WriteByte(value);
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ DoClose();
+ }
+ base.Dispose(disposing);
+ }
+
+ private void DoClose()
+ {
+ _out.Dispose();
+
+ // TODO Parent context(s) should really be be closed explicitly
+
+ _eiGen.Close();
+
+ outer.m_digests.Clear(); // clear the current preserved digest state
+
+ if (outer._certs.Count > 0)
+ {
+ Asn1Set certs = outer.UseDerForCerts
+ ? CmsUtilities.CreateDerSetFromList(outer._certs)
+ : CmsUtilities.CreateBerSetFromList(outer._certs);
+
+ WriteToGenerator(_sigGen, new BerTaggedObject(false, 0, certs));
+ }
+
+ if (outer._crls.Count > 0)
+ {
+ Asn1Set crls = outer.UseDerForCrls
+ ? CmsUtilities.CreateDerSetFromList(outer._crls)
+ : CmsUtilities.CreateBerSetFromList(outer._crls);
+
+ WriteToGenerator(_sigGen, new BerTaggedObject(false, 1, crls));
+ }
+
+ //
+ // Calculate the digest hashes
+ //
+ foreach (var de in outer.m_messageDigests)
+ {
+ outer.m_messageHashes.Add(de.Key, DigestUtilities.DoFinal(de.Value));
+ }
+
+ // TODO If the digest OIDs for precalculated signers weren't mixed in with
+ // the others, we could fill in outer._digests here, instead of SignerInfoGenerator.Generate
+
+ //
+ // collect all the SignerInfo objects
+ //
+ Asn1EncodableVector signerInfos = new Asn1EncodableVector();
+
+ //
+ // add the generated SignerInfo objects
+ //
+ {
+ foreach (DigestAndSignerInfoGeneratorHolder holder in outer._signerInfs)
+ {
+ AlgorithmIdentifier digestAlgorithm = holder.DigestAlgorithm;
+
+ byte[] calculatedDigest = outer.m_messageHashes[
+ Helper.GetDigestAlgName(holder.digestOID)];
+ outer.m_digests[holder.digestOID] = (byte[])calculatedDigest.Clone();
+
+ signerInfos.Add(holder.signerInf.Generate(_contentOID, digestAlgorithm, calculatedDigest));
+ }
+ }
+
+ //
+ // add the precalculated SignerInfo objects.
+ //
+ {
+ foreach (SignerInformation signer in outer._signers)
+ {
+ // TODO Verify the content type and calculated digest match the precalculated SignerInfo
+// if (!signer.ContentType.Equals(_contentOID))
+// {
+// // TODO The precalculated content type did not match - error?
+// }
+//
+// byte[] calculatedDigest = (byte[])outer._digests[signer.DigestAlgOid];
+// if (calculatedDigest == null)
+// {
+// // TODO We can't confirm this digest because we didn't calculate it - error?
+// }
+// else
+// {
+// if (!Arrays.AreEqual(signer.GetContentDigest(), calculatedDigest))
+// {
+// // TODO The precalculated digest did not match - error?
+// }
+// }
+
+ signerInfos.Add(signer.ToSignerInfo());
+ }
+ }
+
+ WriteToGenerator(_sigGen, new DerSet(signerInfos));
+
+ _sigGen.Close();
+ _sGen.Close();
+ }
+
+ private static void WriteToGenerator(Asn1Generator ag, Asn1Encodable ae)
+ {
+ ae.EncodeTo(ag.GetRawOutputStream());
+ }
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataStreamGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataStreamGenerator.cs.meta
new file mode 100644
index 00000000..c440d7cf
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedDataStreamGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d9d28396cf720f5459e6a61ff640cf8e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedGenerator.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedGenerator.cs
new file mode 100644
index 00000000..c3b7a130
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedGenerator.cs
@@ -0,0 +1,664 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.BC;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Bsi;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Eac;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.GM;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Rosstandart;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ public class DefaultSignatureAlgorithmIdentifierFinder
+ {
+ private static readonly IDictionary m_algorithms =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly HashSet noParams = new HashSet();
+ private static readonly IDictionary m_params =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ private static readonly HashSet pkcs15RsaEncryption = new HashSet();
+ private static readonly IDictionary m_digestOids =
+ new Dictionary();
+
+ //private static readonly DerObjectIdentifier ENCRYPTION_RSA = PkcsObjectIdentifiers.RsaEncryption;
+ //private static readonly DerObjectIdentifier ENCRYPTION_DSA = X9ObjectIdentifiers.IdDsaWithSha1;
+ //private static readonly DerObjectIdentifier ENCRYPTION_ECDSA = X9ObjectIdentifiers.ECDsaWithSha1;
+ //private static readonly DerObjectIdentifier ENCRYPTION_RSA_PSS = PkcsObjectIdentifiers.IdRsassaPss;
+ //private static readonly DerObjectIdentifier ENCRYPTION_GOST3410 = CryptoProObjectIdentifiers.GostR3410x94;
+ //private static readonly DerObjectIdentifier ENCRYPTION_ECGOST3410 = CryptoProObjectIdentifiers.GostR3410x2001;
+ //private static readonly DerObjectIdentifier ENCRYPTION_ECGOST3410_2012_256 = RosstandartObjectIdentifiers.id_tc26_gost_3410_12_256;
+ //private static readonly DerObjectIdentifier ENCRYPTION_ECGOST3410_2012_512 = RosstandartObjectIdentifiers.id_tc26_gost_3410_12_512;
+
+ static DefaultSignatureAlgorithmIdentifierFinder()
+ {
+ m_algorithms["MD2WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.MD2WithRsaEncryption;
+ m_algorithms["MD2WITHRSA"] = PkcsObjectIdentifiers.MD2WithRsaEncryption;
+ m_algorithms["MD5WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.MD5WithRsaEncryption;
+ m_algorithms["MD5WITHRSA"] = PkcsObjectIdentifiers.MD5WithRsaEncryption;
+ m_algorithms["SHA1WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
+ m_algorithms["SHA-1WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
+ m_algorithms["SHA1WITHRSA"] = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
+ m_algorithms["SHA-1WITHRSA"] = PkcsObjectIdentifiers.Sha1WithRsaEncryption;
+ m_algorithms["SHA224WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
+ m_algorithms["SHA-224WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
+ m_algorithms["SHA224WITHRSA"] = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
+ m_algorithms["SHA-224WITHRSA"] = PkcsObjectIdentifiers.Sha224WithRsaEncryption;
+ m_algorithms["SHA256WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
+ m_algorithms["SHA-256WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
+ m_algorithms["SHA256WITHRSA"] = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
+ m_algorithms["SHA-256WITHRSA"] = PkcsObjectIdentifiers.Sha256WithRsaEncryption;
+ m_algorithms["SHA384WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
+ m_algorithms["SHA-384WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
+ m_algorithms["SHA384WITHRSA"] = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
+ m_algorithms["SHA-384WITHRSA"] = PkcsObjectIdentifiers.Sha384WithRsaEncryption;
+ m_algorithms["SHA512WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
+ m_algorithms["SHA-512WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
+ m_algorithms["SHA512WITHRSA"] = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
+ m_algorithms["SHA-512WITHRSA"] = PkcsObjectIdentifiers.Sha512WithRsaEncryption;
+ m_algorithms["SHA512(224)WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha512_224WithRSAEncryption;
+ m_algorithms["SHA-512(224)WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha512_224WithRSAEncryption;
+ m_algorithms["SHA512(224)WITHRSA"] = PkcsObjectIdentifiers.Sha512_224WithRSAEncryption;
+ m_algorithms["SHA-512(224)WITHRSA"] = PkcsObjectIdentifiers.Sha512_224WithRSAEncryption;
+ m_algorithms["SHA512(256)WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha512_256WithRSAEncryption;
+ m_algorithms["SHA-512(256)WITHRSAENCRYPTION"] = PkcsObjectIdentifiers.Sha512_256WithRSAEncryption;
+ m_algorithms["SHA512(256)WITHRSA"] = PkcsObjectIdentifiers.Sha512_256WithRSAEncryption;
+ m_algorithms["SHA-512(256)WITHRSA"] = PkcsObjectIdentifiers.Sha512_256WithRSAEncryption;
+ m_algorithms["SHA1WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
+ m_algorithms["SHA224WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
+ m_algorithms["SHA256WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
+ m_algorithms["SHA384WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
+ m_algorithms["SHA512WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
+ m_algorithms["SHA3-224WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
+ m_algorithms["SHA3-256WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
+ m_algorithms["SHA3-384WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
+ m_algorithms["SHA3-512WITHRSAANDMGF1"] = PkcsObjectIdentifiers.IdRsassaPss;
+ m_algorithms["RIPEMD160WITHRSAENCRYPTION"] = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160;
+ m_algorithms["RIPEMD160WITHRSA"] = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160;
+ m_algorithms["RIPEMD128WITHRSAENCRYPTION"] = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128;
+ m_algorithms["RIPEMD128WITHRSA"] = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128;
+ m_algorithms["RIPEMD256WITHRSAENCRYPTION"] = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256;
+ m_algorithms["RIPEMD256WITHRSA"] = TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256;
+ m_algorithms["SHA1WITHDSA"] = X9ObjectIdentifiers.IdDsaWithSha1;
+ m_algorithms["SHA-1WITHDSA"] = X9ObjectIdentifiers.IdDsaWithSha1;
+ m_algorithms["DSAWITHSHA1"] = X9ObjectIdentifiers.IdDsaWithSha1;
+ m_algorithms["SHA224WITHDSA"] = NistObjectIdentifiers.DsaWithSha224;
+ m_algorithms["SHA256WITHDSA"] = NistObjectIdentifiers.DsaWithSha256;
+ m_algorithms["SHA384WITHDSA"] = NistObjectIdentifiers.DsaWithSha384;
+ m_algorithms["SHA512WITHDSA"] = NistObjectIdentifiers.DsaWithSha512;
+ m_algorithms["SHA3-224WITHDSA"] = NistObjectIdentifiers.IdDsaWithSha3_224;
+ m_algorithms["SHA3-256WITHDSA"] = NistObjectIdentifiers.IdDsaWithSha3_256;
+ m_algorithms["SHA3-384WITHDSA"] = NistObjectIdentifiers.IdDsaWithSha3_384;
+ m_algorithms["SHA3-512WITHDSA"] = NistObjectIdentifiers.IdDsaWithSha3_512;
+ m_algorithms["SHA3-224WITHECDSA"] = NistObjectIdentifiers.IdEcdsaWithSha3_224;
+ m_algorithms["SHA3-256WITHECDSA"] = NistObjectIdentifiers.IdEcdsaWithSha3_256;
+ m_algorithms["SHA3-384WITHECDSA"] = NistObjectIdentifiers.IdEcdsaWithSha3_384;
+ m_algorithms["SHA3-512WITHECDSA"] = NistObjectIdentifiers.IdEcdsaWithSha3_512;
+ m_algorithms["SHA3-224WITHRSA"] = NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_224;
+ m_algorithms["SHA3-256WITHRSA"] = NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_256;
+ m_algorithms["SHA3-384WITHRSA"] = NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_384;
+ m_algorithms["SHA3-512WITHRSA"] = NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_512;
+ m_algorithms["SHA3-224WITHRSAENCRYPTION"] = NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_224;
+ m_algorithms["SHA3-256WITHRSAENCRYPTION"] = NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_256;
+ m_algorithms["SHA3-384WITHRSAENCRYPTION"] = NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_384;
+ m_algorithms["SHA3-512WITHRSAENCRYPTION"] = NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_512;
+ m_algorithms["SHA1WITHECDSA"] = X9ObjectIdentifiers.ECDsaWithSha1;
+ m_algorithms["ECDSAWITHSHA1"] = X9ObjectIdentifiers.ECDsaWithSha1;
+ m_algorithms["SHA224WITHECDSA"] = X9ObjectIdentifiers.ECDsaWithSha224;
+ m_algorithms["SHA256WITHECDSA"] = X9ObjectIdentifiers.ECDsaWithSha256;
+ m_algorithms["SHA384WITHECDSA"] = X9ObjectIdentifiers.ECDsaWithSha384;
+ m_algorithms["SHA512WITHECDSA"] = X9ObjectIdentifiers.ECDsaWithSha512;
+
+
+ m_algorithms["GOST3411WITHGOST3410"] = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94;
+ m_algorithms["GOST3411WITHGOST3410-94"] = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94;
+ m_algorithms["GOST3411WITHECGOST3410"] = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001;
+ m_algorithms["GOST3411WITHECGOST3410-2001"] = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001;
+ m_algorithms["GOST3411WITHGOST3410-2001"] = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001;
+ m_algorithms["GOST3411WITHECGOST3410-2012-256"] = RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256;
+ m_algorithms["GOST3411WITHECGOST3410-2012-512"] = RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_512;
+ m_algorithms["GOST3411-2012-256WITHECGOST3410"] = RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256;
+ m_algorithms["GOST3411-2012-256WITHECGOST3410-2012-256"] = RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256;
+ m_algorithms["GOST3411-2012-512WITHECGOST3410"] = RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_512;
+ m_algorithms["GOST3411-2012-512WITHECGOST3410-2012-512"] = RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_512;
+ m_algorithms["SHA1WITHPLAIN-ECDSA"] = BsiObjectIdentifiers.ecdsa_plain_SHA1;
+ m_algorithms["SHA224WITHPLAIN-ECDSA"] = BsiObjectIdentifiers.ecdsa_plain_SHA224;
+ m_algorithms["SHA256WITHPLAIN-ECDSA"] = BsiObjectIdentifiers.ecdsa_plain_SHA256;
+ m_algorithms["SHA384WITHPLAIN-ECDSA"] = BsiObjectIdentifiers.ecdsa_plain_SHA384;
+ m_algorithms["SHA512WITHPLAIN-ECDSA"] = BsiObjectIdentifiers.ecdsa_plain_SHA512;
+ m_algorithms["RIPEMD160WITHPLAIN-ECDSA"] = BsiObjectIdentifiers.ecdsa_plain_RIPEMD160;
+ m_algorithms["SHA1WITHCVC-ECDSA"] = EacObjectIdentifiers.id_TA_ECDSA_SHA_1;
+ m_algorithms["SHA224WITHCVC-ECDSA"] = EacObjectIdentifiers.id_TA_ECDSA_SHA_224;
+ m_algorithms["SHA256WITHCVC-ECDSA"] = EacObjectIdentifiers.id_TA_ECDSA_SHA_256;
+ m_algorithms["SHA384WITHCVC-ECDSA"] = EacObjectIdentifiers.id_TA_ECDSA_SHA_384;
+ m_algorithms["SHA512WITHCVC-ECDSA"] = EacObjectIdentifiers.id_TA_ECDSA_SHA_512;
+ m_algorithms["SHA3-512WITHSPHINCS256"] = BCObjectIdentifiers.sphincs256_with_SHA3_512;
+ m_algorithms["SHA512WITHSPHINCS256"] = BCObjectIdentifiers.sphincs256_with_SHA512;
+
+ m_algorithms["SHA256WITHSM2"] = GMObjectIdentifiers.sm2sign_with_sha256;
+ m_algorithms["SM3WITHSM2"] = GMObjectIdentifiers.sm2sign_with_sm3;
+
+ m_algorithms["SHA256WITHXMSS"] = BCObjectIdentifiers.xmss_with_SHA256;
+ m_algorithms["SHA512WITHXMSS"] = BCObjectIdentifiers.xmss_with_SHA512;
+ m_algorithms["SHAKE128WITHXMSS"] = BCObjectIdentifiers.xmss_with_SHAKE128;
+ m_algorithms["SHAKE256WITHXMSS"] = BCObjectIdentifiers.xmss_with_SHAKE256;
+
+ m_algorithms["SHA256WITHXMSSMT"] = BCObjectIdentifiers.xmss_mt_with_SHA256;
+ m_algorithms["SHA512WITHXMSSMT"] = BCObjectIdentifiers.xmss_mt_with_SHA512;
+ m_algorithms["SHAKE128WITHXMSSMT"] = BCObjectIdentifiers.xmss_mt_with_SHAKE128;
+ m_algorithms["SHAKE256WITHXMSSMT"] = BCObjectIdentifiers.xmss_mt_with_SHAKE256;
+
+
+ //
+ // According to RFC 3279, the ASN.1 encoding SHALL (id-dsa-with-sha1) or MUST (ecdsa-with-SHA*) omit the parameters field.
+ // The parameters field SHALL be NULL for RSA based signature algorithms.
+ //
+ noParams.Add(X9ObjectIdentifiers.ECDsaWithSha1);
+ noParams.Add(X9ObjectIdentifiers.ECDsaWithSha224);
+ noParams.Add(X9ObjectIdentifiers.ECDsaWithSha256);
+ noParams.Add(X9ObjectIdentifiers.ECDsaWithSha384);
+ noParams.Add(X9ObjectIdentifiers.ECDsaWithSha512);
+ noParams.Add(X9ObjectIdentifiers.IdDsaWithSha1);
+ noParams.Add(NistObjectIdentifiers.DsaWithSha224);
+ noParams.Add(NistObjectIdentifiers.DsaWithSha256);
+ noParams.Add(NistObjectIdentifiers.DsaWithSha384);
+ noParams.Add(NistObjectIdentifiers.DsaWithSha512);
+ noParams.Add(NistObjectIdentifiers.IdDsaWithSha3_224);
+ noParams.Add(NistObjectIdentifiers.IdDsaWithSha3_256);
+ noParams.Add(NistObjectIdentifiers.IdDsaWithSha3_384);
+ noParams.Add(NistObjectIdentifiers.IdDsaWithSha3_512);
+ noParams.Add(NistObjectIdentifiers.IdEcdsaWithSha3_224);
+ noParams.Add(NistObjectIdentifiers.IdEcdsaWithSha3_256);
+ noParams.Add(NistObjectIdentifiers.IdEcdsaWithSha3_384);
+ noParams.Add(NistObjectIdentifiers.IdEcdsaWithSha3_512);
+
+
+ //
+ // RFC 4491
+ //
+ noParams.Add(CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94);
+ noParams.Add(CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001);
+ noParams.Add(RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256);
+ noParams.Add(RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_512);
+
+ //
+ // SPHINCS-256
+ //
+ noParams.Add(BCObjectIdentifiers.sphincs256_with_SHA512);
+ noParams.Add(BCObjectIdentifiers.sphincs256_with_SHA3_512);
+
+ //
+ // XMSS
+ //
+ noParams.Add(BCObjectIdentifiers.xmss_with_SHA256);
+ noParams.Add(BCObjectIdentifiers.xmss_with_SHA512);
+ noParams.Add(BCObjectIdentifiers.xmss_with_SHAKE128);
+ noParams.Add(BCObjectIdentifiers.xmss_with_SHAKE256);
+ noParams.Add(BCObjectIdentifiers.xmss_mt_with_SHA256);
+ noParams.Add(BCObjectIdentifiers.xmss_mt_with_SHA512);
+ noParams.Add(BCObjectIdentifiers.xmss_mt_with_SHAKE128);
+ noParams.Add(BCObjectIdentifiers.xmss_mt_with_SHAKE256);
+
+ //
+ // SM2
+ //
+ noParams.Add(GMObjectIdentifiers.sm2sign_with_sha256);
+ noParams.Add(GMObjectIdentifiers.sm2sign_with_sm3);
+
+ //
+ // PKCS 1.5 encrypted algorithms
+ //
+ pkcs15RsaEncryption.Add(PkcsObjectIdentifiers.Sha1WithRsaEncryption);
+ pkcs15RsaEncryption.Add(PkcsObjectIdentifiers.Sha224WithRsaEncryption);
+ pkcs15RsaEncryption.Add(PkcsObjectIdentifiers.Sha256WithRsaEncryption);
+ pkcs15RsaEncryption.Add(PkcsObjectIdentifiers.Sha384WithRsaEncryption);
+ pkcs15RsaEncryption.Add(PkcsObjectIdentifiers.Sha512WithRsaEncryption);
+ pkcs15RsaEncryption.Add(PkcsObjectIdentifiers.Sha512_224WithRSAEncryption);
+ pkcs15RsaEncryption.Add(PkcsObjectIdentifiers.Sha512_256WithRSAEncryption);
+ pkcs15RsaEncryption.Add(TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128);
+ pkcs15RsaEncryption.Add(TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160);
+ pkcs15RsaEncryption.Add(TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256);
+ pkcs15RsaEncryption.Add(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_224);
+ pkcs15RsaEncryption.Add(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_256);
+ pkcs15RsaEncryption.Add(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_384);
+ pkcs15RsaEncryption.Add(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_512);
+
+ //
+ // explicit params
+ //
+ AlgorithmIdentifier sha1AlgId = new AlgorithmIdentifier(OiwObjectIdentifiers.IdSha1, DerNull.Instance);
+ m_params["SHA1WITHRSAANDMGF1"] = CreatePssParams(sha1AlgId, 20);
+
+ AlgorithmIdentifier sha224AlgId = new AlgorithmIdentifier(NistObjectIdentifiers.IdSha224, DerNull.Instance);
+ m_params["SHA224WITHRSAANDMGF1"] = CreatePssParams(sha224AlgId, 28);
+
+ AlgorithmIdentifier sha256AlgId = new AlgorithmIdentifier(NistObjectIdentifiers.IdSha256, DerNull.Instance);
+ m_params["SHA256WITHRSAANDMGF1"] = CreatePssParams(sha256AlgId, 32);
+
+ AlgorithmIdentifier sha384AlgId = new AlgorithmIdentifier(NistObjectIdentifiers.IdSha384, DerNull.Instance);
+ m_params["SHA384WITHRSAANDMGF1"] = CreatePssParams(sha384AlgId, 48);
+
+ AlgorithmIdentifier sha512AlgId = new AlgorithmIdentifier(NistObjectIdentifiers.IdSha512, DerNull.Instance);
+ m_params["SHA512WITHRSAANDMGF1"] = CreatePssParams(sha512AlgId, 64);
+
+ AlgorithmIdentifier sha3_224AlgId = new AlgorithmIdentifier(NistObjectIdentifiers.IdSha3_224, DerNull.Instance);
+ m_params["SHA3-224WITHRSAANDMGF1"] = CreatePssParams(sha3_224AlgId, 28);
+
+ AlgorithmIdentifier sha3_256AlgId = new AlgorithmIdentifier(NistObjectIdentifiers.IdSha3_256, DerNull.Instance);
+ m_params["SHA3-256WITHRSAANDMGF1"] = CreatePssParams(sha3_256AlgId, 32);
+
+ AlgorithmIdentifier sha3_384AlgId = new AlgorithmIdentifier(NistObjectIdentifiers.IdSha3_384, DerNull.Instance);
+ m_params["SHA3-384WITHRSAANDMGF1"] = CreatePssParams(sha3_384AlgId, 48);
+
+ AlgorithmIdentifier sha3_512AlgId = new AlgorithmIdentifier(NistObjectIdentifiers.IdSha3_512, DerNull.Instance);
+ m_params["SHA3-512WITHRSAANDMGF1"] = CreatePssParams(sha3_512AlgId, 64);
+
+ //
+ // digests
+ //
+ m_digestOids[PkcsObjectIdentifiers.Sha224WithRsaEncryption] = NistObjectIdentifiers.IdSha224;
+ m_digestOids[PkcsObjectIdentifiers.Sha256WithRsaEncryption] = NistObjectIdentifiers.IdSha256;
+ m_digestOids[PkcsObjectIdentifiers.Sha384WithRsaEncryption] = NistObjectIdentifiers.IdSha384;
+ m_digestOids[PkcsObjectIdentifiers.Sha512WithRsaEncryption] = NistObjectIdentifiers.IdSha512;
+ m_digestOids[PkcsObjectIdentifiers.Sha512_224WithRSAEncryption] = NistObjectIdentifiers.IdSha512_224;
+ m_digestOids[PkcsObjectIdentifiers.Sha512_256WithRSAEncryption] = NistObjectIdentifiers.IdSha512_256;
+ m_digestOids[NistObjectIdentifiers.DsaWithSha224] = NistObjectIdentifiers.IdSha224;
+ m_digestOids[NistObjectIdentifiers.DsaWithSha256] = NistObjectIdentifiers.IdSha256;
+ m_digestOids[NistObjectIdentifiers.DsaWithSha384] = NistObjectIdentifiers.IdSha384;
+ m_digestOids[NistObjectIdentifiers.DsaWithSha512] = NistObjectIdentifiers.IdSha512;
+ m_digestOids[NistObjectIdentifiers.IdDsaWithSha3_224] = NistObjectIdentifiers.IdSha3_224;
+ m_digestOids[NistObjectIdentifiers.IdDsaWithSha3_256] = NistObjectIdentifiers.IdSha3_256;
+ m_digestOids[NistObjectIdentifiers.IdDsaWithSha3_384] = NistObjectIdentifiers.IdSha3_384;
+ m_digestOids[NistObjectIdentifiers.IdDsaWithSha3_512] = NistObjectIdentifiers.IdSha3_512;
+ m_digestOids[NistObjectIdentifiers.IdEcdsaWithSha3_224] = NistObjectIdentifiers.IdSha3_224;
+ m_digestOids[NistObjectIdentifiers.IdEcdsaWithSha3_256] = NistObjectIdentifiers.IdSha3_256;
+ m_digestOids[NistObjectIdentifiers.IdEcdsaWithSha3_384] = NistObjectIdentifiers.IdSha3_384;
+ m_digestOids[NistObjectIdentifiers.IdEcdsaWithSha3_512] = NistObjectIdentifiers.IdSha3_512;
+ m_digestOids[NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_224] = NistObjectIdentifiers.IdSha3_224;
+ m_digestOids[NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_256] = NistObjectIdentifiers.IdSha3_256;
+ m_digestOids[NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_384] = NistObjectIdentifiers.IdSha3_384;
+ m_digestOids[NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_512] = NistObjectIdentifiers.IdSha3_512;
+
+ m_digestOids[PkcsObjectIdentifiers.MD2WithRsaEncryption] = PkcsObjectIdentifiers.MD2;
+ m_digestOids[PkcsObjectIdentifiers.MD4WithRsaEncryption] = PkcsObjectIdentifiers.MD4;
+ m_digestOids[PkcsObjectIdentifiers.MD5WithRsaEncryption] = PkcsObjectIdentifiers.MD5;
+ m_digestOids[PkcsObjectIdentifiers.Sha1WithRsaEncryption] = OiwObjectIdentifiers.IdSha1;
+ m_digestOids[TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128] = TeleTrusTObjectIdentifiers.RipeMD128;
+ m_digestOids[TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160] = TeleTrusTObjectIdentifiers.RipeMD160;
+ m_digestOids[TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256] = TeleTrusTObjectIdentifiers.RipeMD256;
+ m_digestOids[CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94] = CryptoProObjectIdentifiers.GostR3411;
+ m_digestOids[CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001] = CryptoProObjectIdentifiers.GostR3411;
+ m_digestOids[RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256] = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256;
+ m_digestOids[RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_512] = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512;
+
+ m_digestOids[GMObjectIdentifiers.sm2sign_with_sha256] = NistObjectIdentifiers.IdSha256;
+ m_digestOids[GMObjectIdentifiers.sm2sign_with_sm3] = GMObjectIdentifiers.sm3;
+ }
+
+ private static AlgorithmIdentifier Generate(string signatureAlgorithm)
+ {
+ AlgorithmIdentifier sigAlgId;
+ //AlgorithmIdentifier encAlgId;
+ //AlgorithmIdentifier digAlgId;
+
+ if (!m_algorithms.TryGetValue(signatureAlgorithm, out var sigOid))
+ throw new ArgumentException("Unknown signature type requested: " + signatureAlgorithm);
+
+ if (noParams.Contains(sigOid))
+ {
+ sigAlgId = new AlgorithmIdentifier(sigOid);
+ }
+ else if (m_params.TryGetValue(signatureAlgorithm, out var explicitParameters))
+ {
+ sigAlgId = new AlgorithmIdentifier(sigOid, explicitParameters);
+ }
+ else
+ {
+ sigAlgId = new AlgorithmIdentifier(sigOid, DerNull.Instance);
+ }
+
+ //if (pkcs15RsaEncryption.Contains(sigOid))
+ //{
+ // encAlgId = new AlgorithmIdentifier(PkcsObjectIdentifiers.RsaEncryption, DerNull.Instance);
+ //}
+ //else
+ //{
+ // encAlgId = sigAlgId;
+ //}
+
+ //if (sigAlgId.Algorithm.Equals(PkcsObjectIdentifiers.IdRsassaPss))
+ //{
+ // digAlgId = ((RsassaPssParameters)sigAlgId.Parameters).HashAlgorithm;
+ //}
+ //else
+ //{
+ // digAlgId = new AlgorithmIdentifier(m_digestOids[sigOid], DerNull.Instance);
+ //}
+
+ return sigAlgId;
+ }
+
+ private static RsassaPssParameters CreatePssParams(AlgorithmIdentifier hashAlgId, int saltSize)
+ {
+ return new RsassaPssParameters(
+ hashAlgId,
+ new AlgorithmIdentifier(PkcsObjectIdentifiers.IdMgf1, hashAlgId),
+ new DerInteger(saltSize),
+ new DerInteger(1));
+ }
+
+ public AlgorithmIdentifier Find(string sigAlgName)
+ {
+ return Generate(sigAlgName);
+ }
+ }
+
+ public class DefaultDigestAlgorithmIdentifierFinder
+ {
+ private static readonly IDictionary m_digestOids =
+ new Dictionary();
+ private static readonly IDictionary m_digestNameToOids =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+
+ static DefaultDigestAlgorithmIdentifierFinder()
+ {
+ //
+ // digests
+ //
+ m_digestOids.Add(OiwObjectIdentifiers.MD4WithRsaEncryption, PkcsObjectIdentifiers.MD4);
+ m_digestOids.Add(OiwObjectIdentifiers.MD4WithRsa, PkcsObjectIdentifiers.MD4);
+ m_digestOids.Add(OiwObjectIdentifiers.MD5WithRsa, PkcsObjectIdentifiers.MD5);
+ m_digestOids.Add(OiwObjectIdentifiers.Sha1WithRsa, OiwObjectIdentifiers.IdSha1);
+ m_digestOids.Add(OiwObjectIdentifiers.DsaWithSha1, OiwObjectIdentifiers.IdSha1);
+
+ m_digestOids.Add(PkcsObjectIdentifiers.Sha224WithRsaEncryption, NistObjectIdentifiers.IdSha224);
+ m_digestOids.Add(PkcsObjectIdentifiers.Sha256WithRsaEncryption, NistObjectIdentifiers.IdSha256);
+ m_digestOids.Add(PkcsObjectIdentifiers.Sha384WithRsaEncryption, NistObjectIdentifiers.IdSha384);
+ m_digestOids.Add(PkcsObjectIdentifiers.Sha512WithRsaEncryption, NistObjectIdentifiers.IdSha512);
+ m_digestOids.Add(PkcsObjectIdentifiers.Sha512_224WithRSAEncryption, NistObjectIdentifiers.IdSha512_224);
+ m_digestOids.Add(PkcsObjectIdentifiers.Sha512_256WithRSAEncryption, NistObjectIdentifiers.IdSha512_256);
+
+ m_digestOids.Add(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_224, NistObjectIdentifiers.IdSha3_224);
+ m_digestOids.Add(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_256, NistObjectIdentifiers.IdSha3_256);
+ m_digestOids.Add(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_384, NistObjectIdentifiers.IdSha3_384);
+ m_digestOids.Add(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_512, NistObjectIdentifiers.IdSha3_512);
+
+ m_digestOids.Add(PkcsObjectIdentifiers.MD2WithRsaEncryption, PkcsObjectIdentifiers.MD2);
+ m_digestOids.Add(PkcsObjectIdentifiers.MD4WithRsaEncryption, PkcsObjectIdentifiers.MD4);
+ m_digestOids.Add(PkcsObjectIdentifiers.MD5WithRsaEncryption, PkcsObjectIdentifiers.MD5);
+ m_digestOids.Add(PkcsObjectIdentifiers.Sha1WithRsaEncryption, OiwObjectIdentifiers.IdSha1);
+
+ m_digestOids.Add(X9ObjectIdentifiers.ECDsaWithSha1, OiwObjectIdentifiers.IdSha1);
+ m_digestOids.Add(X9ObjectIdentifiers.ECDsaWithSha224, NistObjectIdentifiers.IdSha224);
+ m_digestOids.Add(X9ObjectIdentifiers.ECDsaWithSha256, NistObjectIdentifiers.IdSha256);
+ m_digestOids.Add(X9ObjectIdentifiers.ECDsaWithSha384, NistObjectIdentifiers.IdSha384);
+ m_digestOids.Add(X9ObjectIdentifiers.ECDsaWithSha512, NistObjectIdentifiers.IdSha512);
+ m_digestOids.Add(X9ObjectIdentifiers.IdDsaWithSha1, OiwObjectIdentifiers.IdSha1);
+
+ m_digestOids.Add(NistObjectIdentifiers.DsaWithSha224, NistObjectIdentifiers.IdSha224);
+ m_digestOids.Add(NistObjectIdentifiers.DsaWithSha256, NistObjectIdentifiers.IdSha256);
+ m_digestOids.Add(NistObjectIdentifiers.DsaWithSha384, NistObjectIdentifiers.IdSha384);
+ m_digestOids.Add(NistObjectIdentifiers.DsaWithSha512, NistObjectIdentifiers.IdSha512);
+
+ m_digestOids.Add(TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD128, TeleTrusTObjectIdentifiers.RipeMD128);
+ m_digestOids.Add(TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD160, TeleTrusTObjectIdentifiers.RipeMD160);
+ m_digestOids.Add(TeleTrusTObjectIdentifiers.RsaSignatureWithRipeMD256, TeleTrusTObjectIdentifiers.RipeMD256);
+
+ m_digestOids.Add(CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94, CryptoProObjectIdentifiers.GostR3411);
+ m_digestOids.Add(CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001, CryptoProObjectIdentifiers.GostR3411);
+
+ m_digestNameToOids.Add("SHA-1", OiwObjectIdentifiers.IdSha1);
+ m_digestNameToOids.Add("SHA-224", NistObjectIdentifiers.IdSha224);
+ m_digestNameToOids.Add("SHA-256", NistObjectIdentifiers.IdSha256);
+ m_digestNameToOids.Add("SHA-384", NistObjectIdentifiers.IdSha384);
+ m_digestNameToOids.Add("SHA-512", NistObjectIdentifiers.IdSha512);
+ m_digestNameToOids.Add("SHA-512/224", NistObjectIdentifiers.IdSha512_224);
+ m_digestNameToOids.Add("SHA-512(224)", NistObjectIdentifiers.IdSha512_224);
+ m_digestNameToOids.Add("SHA-512/256", NistObjectIdentifiers.IdSha512_256);
+ m_digestNameToOids.Add("SHA-512(256)", NistObjectIdentifiers.IdSha512_256);
+
+ m_digestNameToOids.Add("SHA1", OiwObjectIdentifiers.IdSha1);
+ m_digestNameToOids.Add("SHA224", NistObjectIdentifiers.IdSha224);
+ m_digestNameToOids.Add("SHA256", NistObjectIdentifiers.IdSha256);
+ m_digestNameToOids.Add("SHA384", NistObjectIdentifiers.IdSha384);
+ m_digestNameToOids.Add("SHA512", NistObjectIdentifiers.IdSha512);
+ m_digestNameToOids.Add("SHA512/224", NistObjectIdentifiers.IdSha512_224);
+ m_digestNameToOids.Add("SHA512(224)", NistObjectIdentifiers.IdSha512_224);
+ m_digestNameToOids.Add("SHA512/256", NistObjectIdentifiers.IdSha512_256);
+ m_digestNameToOids.Add("SHA512(256)", NistObjectIdentifiers.IdSha512_256);
+
+ m_digestNameToOids.Add("SHA3-224", NistObjectIdentifiers.IdSha3_224);
+ m_digestNameToOids.Add("SHA3-256", NistObjectIdentifiers.IdSha3_256);
+ m_digestNameToOids.Add("SHA3-384", NistObjectIdentifiers.IdSha3_384);
+ m_digestNameToOids.Add("SHA3-512", NistObjectIdentifiers.IdSha3_512);
+
+ m_digestNameToOids.Add("SHAKE-128", NistObjectIdentifiers.IdShake128);
+ m_digestNameToOids.Add("SHAKE-256", NistObjectIdentifiers.IdShake256);
+
+ m_digestNameToOids.Add("GOST3411", CryptoProObjectIdentifiers.GostR3411);
+
+ m_digestNameToOids.Add("MD2", PkcsObjectIdentifiers.MD2);
+ m_digestNameToOids.Add("MD4", PkcsObjectIdentifiers.MD4);
+ m_digestNameToOids.Add("MD5", PkcsObjectIdentifiers.MD5);
+
+ m_digestNameToOids.Add("RIPEMD128", TeleTrusTObjectIdentifiers.RipeMD128);
+ m_digestNameToOids.Add("RIPEMD160", TeleTrusTObjectIdentifiers.RipeMD160);
+ m_digestNameToOids.Add("RIPEMD256", TeleTrusTObjectIdentifiers.RipeMD256);
+ }
+
+ public AlgorithmIdentifier Find(AlgorithmIdentifier sigAlgId)
+ {
+ AlgorithmIdentifier digAlgId;
+
+ if (sigAlgId.Algorithm.Equals(PkcsObjectIdentifiers.IdRsassaPss))
+ {
+ digAlgId = RsassaPssParameters.GetInstance(sigAlgId.Parameters).HashAlgorithm;
+ }
+ else
+ {
+ digAlgId = new AlgorithmIdentifier(m_digestOids[sigAlgId.Algorithm], DerNull.Instance);
+ }
+
+ return digAlgId;
+ }
+
+ public AlgorithmIdentifier Find(string digAlgName)
+ {
+ return new AlgorithmIdentifier(m_digestNameToOids[digAlgName], DerNull.Instance);
+ }
+ }
+
+ public abstract class CmsSignedGenerator
+ {
+ /**
+ * Default type for the signed data.
+ */
+ public static readonly string Data = CmsObjectIdentifiers.Data.Id;
+
+ public static readonly string DigestSha1 = OiwObjectIdentifiers.IdSha1.Id;
+ public static readonly string DigestSha224 = NistObjectIdentifiers.IdSha224.Id;
+ public static readonly string DigestSha256 = NistObjectIdentifiers.IdSha256.Id;
+ public static readonly string DigestSha384 = NistObjectIdentifiers.IdSha384.Id;
+ public static readonly string DigestSha512 = NistObjectIdentifiers.IdSha512.Id;
+ public static readonly string DigestSha512_224 = NistObjectIdentifiers.IdSha512_224.Id;
+ public static readonly string DigestSha512_256 = NistObjectIdentifiers.IdSha512_256.Id;
+ public static readonly string DigestMD5 = PkcsObjectIdentifiers.MD5.Id;
+ public static readonly string DigestGost3411 = CryptoProObjectIdentifiers.GostR3411.Id;
+ public static readonly string DigestRipeMD128 = TeleTrusTObjectIdentifiers.RipeMD128.Id;
+ public static readonly string DigestRipeMD160 = TeleTrusTObjectIdentifiers.RipeMD160.Id;
+ public static readonly string DigestRipeMD256 = TeleTrusTObjectIdentifiers.RipeMD256.Id;
+
+ public static readonly string EncryptionRsa = PkcsObjectIdentifiers.RsaEncryption.Id;
+ public static readonly string EncryptionDsa = X9ObjectIdentifiers.IdDsaWithSha1.Id;
+ public static readonly string EncryptionECDsa = X9ObjectIdentifiers.ECDsaWithSha1.Id;
+ public static readonly string EncryptionRsaPss = PkcsObjectIdentifiers.IdRsassaPss.Id;
+ public static readonly string EncryptionGost3410 = CryptoProObjectIdentifiers.GostR3410x94.Id;
+ public static readonly string EncryptionECGost3410 = CryptoProObjectIdentifiers.GostR3410x2001.Id;
+ public static readonly string EncryptionECGost3410_2012_256 = RosstandartObjectIdentifiers.id_tc26_gost_3410_12_256.Id;
+ public static readonly string EncryptionECGost3410_2012_512 = RosstandartObjectIdentifiers.id_tc26_gost_3410_12_512.Id;
+
+ internal List _certs = new List();
+ internal List _crls = new List();
+ internal IList _signers = new List();
+ internal IDictionary m_digests =
+ new Dictionary(StringComparer.OrdinalIgnoreCase);
+ internal bool _useDerForCerts = false;
+ internal bool _useDerForCrls = false;
+
+ protected readonly SecureRandom m_random;
+
+ protected CmsSignedGenerator()
+ : this(CryptoServicesRegistrar.GetSecureRandom())
+ {
+ }
+
+ /// Constructor allowing specific source of randomness
+ /// Instance of SecureRandom to use.
+ protected CmsSignedGenerator(SecureRandom random)
+ {
+ if (random == null)
+ throw new ArgumentNullException(nameof(random));
+
+ m_random = random;
+ }
+
+ internal protected virtual IDictionary GetBaseParameters(
+ DerObjectIdentifier contentType, AlgorithmIdentifier digAlgId, byte[] hash)
+ {
+ var param = new Dictionary();
+
+ if (contentType != null)
+ {
+ param[CmsAttributeTableParameter.ContentType] = contentType;
+ }
+
+ param[CmsAttributeTableParameter.DigestAlgorithmIdentifier] = digAlgId;
+ param[CmsAttributeTableParameter.Digest] = hash.Clone();
+
+ return param;
+ }
+
+ internal protected virtual Asn1Set GetAttributeSet(
+ Asn1.Cms.AttributeTable attr)
+ {
+ return attr == null
+ ? null
+ : new DerSet(attr.ToAsn1EncodableVector());
+ }
+
+ public void AddAttributeCertificate(X509V2AttributeCertificate attrCert)
+ {
+ _certs.Add(new DerTaggedObject(false, 2, attrCert.AttributeCertificate));
+ }
+
+ public void AddAttributeCertificates(IStore attrCertStore)
+ {
+ _certs.AddRange(CmsUtilities.GetAttributeCertificatesFromStore(attrCertStore));
+ }
+
+ public void AddCertificate(X509Certificate cert)
+ {
+ _certs.Add(cert.CertificateStructure);
+ }
+
+ public void AddCertificates(IStore certStore)
+ {
+ _certs.AddRange(CmsUtilities.GetCertificatesFromStore(certStore));
+ }
+
+ public void AddCrl(X509Crl crl)
+ {
+ _crls.Add(crl.CertificateList);
+ }
+
+ public void AddCrls(IStore crlStore)
+ {
+ _crls.AddRange(CmsUtilities.GetCrlsFromStore(crlStore));
+ }
+
+ public void AddOtherRevocationInfo(OtherRevocationInfoFormat otherRevocationInfo)
+ {
+ CmsUtilities.ValidateOtherRevocationInfo(otherRevocationInfo);
+ _crls.Add(new DerTaggedObject(false, 1, otherRevocationInfo));
+ }
+
+ public void AddOtherRevocationInfos(IStore otherRevocationInfoStore)
+ {
+ _crls.AddRange(CmsUtilities.GetOtherRevocationInfosFromStore(otherRevocationInfoStore));
+ }
+
+ public void AddOtherRevocationInfos(DerObjectIdentifier otherRevInfoFormat,
+ IStore otherRevInfoStore)
+ {
+ _crls.AddRange(CmsUtilities.GetOtherRevocationInfosFromStore(otherRevInfoStore, otherRevInfoFormat));
+ }
+
+ /**
+ * Add a store of precalculated signers to the generator.
+ *
+ * @param signerStore store of signers
+ */
+ public void AddSigners(SignerInformationStore signerStore)
+ {
+ foreach (SignerInformation o in signerStore.GetSigners())
+ {
+ _signers.Add(o);
+ AddSignerCallback(o);
+ }
+ }
+
+ /**
+ * Return a map of oids and byte arrays representing the digests calculated on the content during
+ * the last generate.
+ *
+ * @return a map of oids (as string objects) and byte[] representing digests.
+ */
+ public IDictionary GetGeneratedDigests()
+ {
+ return new Dictionary(m_digests, StringComparer.OrdinalIgnoreCase);
+ }
+
+ public bool UseDerForCerts
+ {
+ get { return _useDerForCerts; }
+ set { this._useDerForCerts = value; }
+ }
+
+ public bool UseDerForCrls
+ {
+ get { return _useDerForCrls; }
+ set { this._useDerForCrls = value; }
+ }
+
+ internal virtual void AddSignerCallback(
+ SignerInformation si)
+ {
+ }
+
+ internal static SignerIdentifier GetSignerIdentifier(X509Certificate cert)
+ {
+ return new SignerIdentifier(CmsUtilities.GetIssuerAndSerialNumber(cert));
+ }
+
+ internal static SignerIdentifier GetSignerIdentifier(byte[] subjectKeyIdentifier)
+ {
+ return new SignerIdentifier(new DerOctetString(subjectKeyIdentifier));
+ }
+ }
+}
+#pragma warning restore
+#endif
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedGenerator.cs.meta b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedGenerator.cs.meta
new file mode 100644
index 00000000..041bbccd
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedGenerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6d7ef495bfe713f469f58b2b99f520c8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedHelper.cs b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedHelper.cs
new file mode 100644
index 00000000..af672da2
--- /dev/null
+++ b/Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/cms/CMSSignedHelper.cs
@@ -0,0 +1,382 @@
+#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
+#pragma warning disable
+using System;
+using System.Collections.Generic;
+
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Eac;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Esf;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Oiw;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Rosstandart;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
+using Best.HTTP.SecureProtocol.Org.BouncyCastle.X509;
+
+namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Cms
+{
+ internal class CmsSignedHelper
+ {
+ internal static readonly CmsSignedHelper Instance = new CmsSignedHelper();
+
+ private static readonly string EncryptionECDsaWithSha1 = X9ObjectIdentifiers.ECDsaWithSha1.Id;
+ private static readonly string EncryptionECDsaWithSha224 = X9ObjectIdentifiers.ECDsaWithSha224.Id;
+ private static readonly string EncryptionECDsaWithSha256 = X9ObjectIdentifiers.ECDsaWithSha256.Id;
+ private static readonly string EncryptionECDsaWithSha384 = X9ObjectIdentifiers.ECDsaWithSha384.Id;
+ private static readonly string EncryptionECDsaWithSha512 = X9ObjectIdentifiers.ECDsaWithSha512.Id;
+
+ private static readonly IDictionary m_encryptionAlgs = new Dictionary();
+ private static readonly IDictionary m_digestAlgs = new Dictionary();
+ private static readonly IDictionary m_digestAliases = new Dictionary();
+
+ private static readonly HashSet noParams = new HashSet();
+ private static readonly IDictionary m_ecAlgorithms = new Dictionary();
+
+ private static void AddEntries(DerObjectIdentifier oid, string digest, string encryption)
+ {
+ string alias = oid.Id;
+ m_digestAlgs.Add(alias, digest);
+ m_encryptionAlgs.Add(alias, encryption);
+ }
+
+ static CmsSignedHelper()
+ {
+ AddEntries(NistObjectIdentifiers.DsaWithSha224, "SHA224", "DSA");
+ AddEntries(NistObjectIdentifiers.DsaWithSha256, "SHA256", "DSA");
+ AddEntries(NistObjectIdentifiers.DsaWithSha384, "SHA384", "DSA");
+ AddEntries(NistObjectIdentifiers.DsaWithSha512, "SHA512", "DSA");
+ AddEntries(OiwObjectIdentifiers.DsaWithSha1, "SHA1", "DSA");
+ AddEntries(OiwObjectIdentifiers.MD4WithRsa, "MD4", "RSA");
+ AddEntries(OiwObjectIdentifiers.MD4WithRsaEncryption, "MD4", "RSA");
+ AddEntries(OiwObjectIdentifiers.MD5WithRsa, "MD5", "RSA");
+ AddEntries(OiwObjectIdentifiers.Sha1WithRsa, "SHA1", "RSA");
+ AddEntries(PkcsObjectIdentifiers.MD2WithRsaEncryption, "MD2", "RSA");
+ AddEntries(PkcsObjectIdentifiers.MD4WithRsaEncryption, "MD4", "RSA");
+ AddEntries(PkcsObjectIdentifiers.MD5WithRsaEncryption, "MD5", "RSA");
+ AddEntries(PkcsObjectIdentifiers.Sha1WithRsaEncryption, "SHA1", "RSA");
+ AddEntries(PkcsObjectIdentifiers.Sha224WithRsaEncryption, "SHA224", "RSA");
+ AddEntries(PkcsObjectIdentifiers.Sha256WithRsaEncryption, "SHA256", "RSA");
+ AddEntries(PkcsObjectIdentifiers.Sha384WithRsaEncryption, "SHA384", "RSA");
+ AddEntries(PkcsObjectIdentifiers.Sha512WithRsaEncryption, "SHA512", "RSA");
+ AddEntries(PkcsObjectIdentifiers.Sha512_224WithRSAEncryption, "SHA512(224)", "RSA");
+ AddEntries(PkcsObjectIdentifiers.Sha512_256WithRSAEncryption, "SHA512(256)", "RSA");
+ AddEntries(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_224, "SHA3-224", "RSA");
+ AddEntries(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_256, "SHA3-256", "RSA");
+ AddEntries(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_384, "SHA3-384", "RSA");
+ AddEntries(NistObjectIdentifiers.IdRsassaPkcs1V15WithSha3_512, "SHA3-512", "RSA");
+ AddEntries(X9ObjectIdentifiers.ECDsaWithSha1, "SHA1", "ECDSA");
+ AddEntries(X9ObjectIdentifiers.ECDsaWithSha224, "SHA224", "ECDSA");
+ AddEntries(X9ObjectIdentifiers.ECDsaWithSha256, "SHA256", "ECDSA");
+ AddEntries(X9ObjectIdentifiers.ECDsaWithSha384, "SHA384", "ECDSA");
+ AddEntries(X9ObjectIdentifiers.ECDsaWithSha512, "SHA512", "ECDSA");
+ AddEntries(X9ObjectIdentifiers.IdDsaWithSha1, "SHA1", "DSA");
+ AddEntries(EacObjectIdentifiers.id_TA_ECDSA_SHA_1, "SHA1", "ECDSA");
+ AddEntries(EacObjectIdentifiers.id_TA_ECDSA_SHA_224, "SHA224", "ECDSA");
+ AddEntries(EacObjectIdentifiers.id_TA_ECDSA_SHA_256, "SHA256", "ECDSA");
+ AddEntries(EacObjectIdentifiers.id_TA_ECDSA_SHA_384, "SHA384", "ECDSA");
+ AddEntries(EacObjectIdentifiers.id_TA_ECDSA_SHA_512, "SHA512", "ECDSA");
+ AddEntries(EacObjectIdentifiers.id_TA_RSA_v1_5_SHA_1, "SHA1", "RSA");
+ AddEntries(EacObjectIdentifiers.id_TA_RSA_v1_5_SHA_256, "SHA256", "RSA");
+ AddEntries(EacObjectIdentifiers.id_TA_RSA_PSS_SHA_1, "SHA1", "RSAandMGF1");
+ AddEntries(EacObjectIdentifiers.id_TA_RSA_PSS_SHA_256, "SHA256", "RSAandMGF1");
+ AddEntries(CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94, "GOST3411", "GOST3410");
+ AddEntries(CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001, "GOST3411", "ECGOST3410");
+ AddEntries(RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256, "GOST3411-2012-256", "ECGOST3410");
+ AddEntries(RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_512, "GOST3411-2012-512", "ECGOST3410");
+
+ m_encryptionAlgs.Add(X9ObjectIdentifiers.IdDsa.Id, "DSA");
+ m_encryptionAlgs.Add(PkcsObjectIdentifiers.RsaEncryption.Id, "RSA");
+ m_encryptionAlgs.Add(TeleTrusTObjectIdentifiers.TeleTrusTRsaSignatureAlgorithm.Id, "RSA");
+ m_encryptionAlgs.Add(X509ObjectIdentifiers.IdEARsa.Id, "RSA");
+ m_encryptionAlgs.Add(CmsSignedGenerator.EncryptionRsaPss, "RSAandMGF1");
+ m_encryptionAlgs.Add(CryptoProObjectIdentifiers.GostR3410x94.Id, "GOST3410");
+ m_encryptionAlgs.Add(CryptoProObjectIdentifiers.GostR3410x2001.Id, "ECGOST3410");
+ m_encryptionAlgs.Add(RosstandartObjectIdentifiers.id_tc26_gost_3410_12_256.Id, "ECGOST3410");
+ m_encryptionAlgs.Add(RosstandartObjectIdentifiers.id_tc26_gost_3410_12_512.Id, "ECGOST3410");
+ m_encryptionAlgs.Add("1.3.6.1.4.1.5849.1.6.2", "ECGOST3410");
+ m_encryptionAlgs.Add("1.3.6.1.4.1.5849.1.1.5", "GOST3410");
+
+ m_digestAlgs.Add(PkcsObjectIdentifiers.MD2.Id, "MD2");
+ m_digestAlgs.Add(PkcsObjectIdentifiers.MD4.Id, "MD4");
+ m_digestAlgs.Add(PkcsObjectIdentifiers.MD5.Id, "MD5");
+ m_digestAlgs.Add(OiwObjectIdentifiers.IdSha1.Id, "SHA1");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha224.Id, "SHA224");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha256.Id, "SHA256");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha384.Id, "SHA384");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha512.Id, "SHA512");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha512_224.Id, "SHA512(224)");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha512_256.Id, "SHA512(256)");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha3_224.Id, "SHA3-224");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha3_256.Id, "SHA3-256");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha3_384.Id, "SHA3-384");
+ m_digestAlgs.Add(NistObjectIdentifiers.IdSha3_512.Id, "SHA3-512");
+ m_digestAlgs.Add(TeleTrusTObjectIdentifiers.RipeMD128.Id, "RIPEMD128");
+ m_digestAlgs.Add(TeleTrusTObjectIdentifiers.RipeMD160.Id, "RIPEMD160");
+ m_digestAlgs.Add(TeleTrusTObjectIdentifiers.RipeMD256.Id, "RIPEMD256");
+ m_digestAlgs.Add(CryptoProObjectIdentifiers.GostR3411.Id, "GOST3411");
+ m_digestAlgs.Add("1.3.6.1.4.1.5849.1.2.1", "GOST3411");
+ m_digestAlgs.Add(RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256.Id, "GOST3411-2012-256");
+ m_digestAlgs.Add(RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512.Id, "GOST3411-2012-512");
+
+ m_digestAliases.Add("SHA1", new string[]{ "SHA-1" });
+ m_digestAliases.Add("SHA224", new string[]{ "SHA-224" });
+ m_digestAliases.Add("SHA256", new string[]{ "SHA-256" });
+ m_digestAliases.Add("SHA384", new string[]{ "SHA-384" });
+ m_digestAliases.Add("SHA512", new string[]{ "SHA-512" });
+
+ noParams.Add(CmsSignedGenerator.EncryptionDsa);
+ //noParams.Add(EncryptionECDsa);
+ noParams.Add(EncryptionECDsaWithSha1);
+ noParams.Add(EncryptionECDsaWithSha224);
+ noParams.Add(EncryptionECDsaWithSha256);
+ noParams.Add(EncryptionECDsaWithSha384);
+ noParams.Add(EncryptionECDsaWithSha512);
+
+ m_ecAlgorithms.Add(CmsSignedGenerator.DigestSha1, EncryptionECDsaWithSha1);
+ m_ecAlgorithms.Add(CmsSignedGenerator.DigestSha224, EncryptionECDsaWithSha224);
+ m_ecAlgorithms.Add(CmsSignedGenerator.DigestSha256, EncryptionECDsaWithSha256);
+ m_ecAlgorithms.Add(CmsSignedGenerator.DigestSha384, EncryptionECDsaWithSha384);
+ m_ecAlgorithms.Add(CmsSignedGenerator.DigestSha512, EncryptionECDsaWithSha512);
+ }
+
+ /**
+ * Return the digest algorithm using one of the standard JCA string
+ * representations rather than the algorithm identifier (if possible).
+ */
+ internal string GetDigestAlgName(string digestAlgOid)
+ {
+ return m_digestAlgs.TryGetValue(digestAlgOid, out var algName) ? algName : digestAlgOid;
+ }
+
+ internal AlgorithmIdentifier GetEncAlgorithmIdentifier(DerObjectIdentifier encOid,
+ Asn1Encodable sigX509Parameters)
+ {
+ if (noParams.Contains(encOid.Id))
+ {
+ return new AlgorithmIdentifier(encOid);
+ }
+
+ return new AlgorithmIdentifier(encOid, sigX509Parameters);
+ }
+
+ internal string[] GetDigestAliases(string algName)
+ {
+ return m_digestAliases.TryGetValue(algName, out var aliases) ? (string[])aliases.Clone() : new string[0];
+ }
+
+ /**
+ * Return the digest encryption algorithm using one of the standard
+ * JCA string representations rather than the algorithm identifier (if
+ * possible).
+ */
+ internal string GetEncryptionAlgName(string encryptionAlgOid)
+ {
+ return m_encryptionAlgs.TryGetValue(encryptionAlgOid, out var algName) ? algName : encryptionAlgOid;
+ }
+
+ internal IDigest GetDigestInstance(
+ string algorithm)
+ {
+ try
+ {
+ return DigestUtilities.GetDigest(algorithm);
+ }
+ catch (SecurityUtilityException e)
+ {
+ // This is probably superfluous on C#, since no provider infrastructure,
+ // assuming DigestUtilities already knows all the aliases
+ foreach (string alias in GetDigestAliases(algorithm))
+ {
+ try { return DigestUtilities.GetDigest(alias); }
+ catch (SecurityUtilityException) {}
+ }
+ throw e;
+ }
+ }
+
+ internal ISigner GetSignatureInstance(
+ string algorithm)
+ {
+ return SignerUtilities.GetSigner(algorithm);
+ }
+
+ internal AlgorithmIdentifier FixAlgID(
+ AlgorithmIdentifier algId)
+ {
+ if (algId.Parameters == null)
+ return new AlgorithmIdentifier(algId.Algorithm, DerNull.Instance);
+
+ return algId;
+ }
+
+ internal string GetEncOid(
+ AsymmetricKeyParameter key,
+ string digestOID)
+ {
+ string encOID = null;
+
+ if (key is RsaKeyParameters rsaKeyParameters)
+ {
+ if (!rsaKeyParameters.IsPrivate)
+ throw new ArgumentException("Expected RSA private key");
+
+ encOID = CmsSignedGenerator.EncryptionRsa;
+ }
+ else if (key is DsaPrivateKeyParameters)
+ {
+ if (digestOID.Equals(CmsSignedGenerator.DigestSha1))
+ {
+ encOID = CmsSignedGenerator.EncryptionDsa;
+ }
+ else if (digestOID.Equals(CmsSignedGenerator.DigestSha224))
+ {
+ encOID = NistObjectIdentifiers.DsaWithSha224.Id;
+ }
+ else if (digestOID.Equals(CmsSignedGenerator.DigestSha256))
+ {
+ encOID = NistObjectIdentifiers.DsaWithSha256.Id;
+ }
+ else if (digestOID.Equals(CmsSignedGenerator.DigestSha384))
+ {
+ encOID = NistObjectIdentifiers.DsaWithSha384.Id;
+ }
+ else if (digestOID.Equals(CmsSignedGenerator.DigestSha512))
+ {
+ encOID = NistObjectIdentifiers.DsaWithSha512.Id;
+ }
+ else
+ {
+ throw new ArgumentException("can't mix DSA with anything but SHA1/SHA2");
+ }
+ }
+ else if (key is ECPrivateKeyParameters ecPrivKey)
+ {
+ string algName = ecPrivKey.AlgorithmName;
+
+ if (algName == "ECGOST3410")
+ {
+ encOID = CmsSignedGenerator.EncryptionECGost3410;
+ }
+ else if (ecPrivKey.Parameters is ECGost3410Parameters ecGost3410Parameters)
+ {
+ var digestParamSet = ecGost3410Parameters.DigestParamSet;
+ if (digestParamSet.Equals(RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256))
+ {
+ encOID = CmsSignedGenerator.EncryptionECGost3410_2012_256;
+ }
+ else if (digestParamSet.Equals(RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512))
+ {
+ encOID = CmsSignedGenerator.EncryptionECGost3410_2012_512;
+ }
+ else
+ {
+ throw new ArgumentException("can't determine GOST3410 algorithm");
+ }
+ }
+ else
+ {
+ // TODO Should we insist on algName being one of "EC" or "ECDSA", as Java does?
+ if (!m_ecAlgorithms.TryGetValue(digestOID, out encOID))
+ throw new ArgumentException("can't mix ECDSA with anything but SHA family digests");
+ }
+ }
+ else if (key is Gost3410PrivateKeyParameters)
+ {
+ encOID = CmsSignedGenerator.EncryptionGost3410;
+ }
+ else
+ {
+ throw new ArgumentException("Unknown algorithm in CmsSignedGenerator.GetEncOid");
+ }
+
+ return encOID;
+ }
+
+ internal IStore GetAttributeCertificates(Asn1Set attrCertSet)
+ {
+ var contents = new List();
+ if (attrCertSet != null)
+ {
+ foreach (Asn1Encodable ae in attrCertSet)
+ {
+ if (ae != null && ae.ToAsn1Object() is Asn1TaggedObject t)
+ {
+ if (t.HasContextTag(2))
+ {
+ Asn1Sequence s = Asn1Sequence.GetInstance(t, false);
+
+ contents.Add(new X509V2AttributeCertificate(AttributeCertificate.GetInstance(s)));
+ }
+ }
+ }
+ }
+ return CollectionUtilities.CreateStore(contents);
+ }
+
+ internal IStore GetCertificates(Asn1Set certSet)
+ {
+ var contents = new List();
+ if (certSet != null)
+ {
+ foreach (Asn1Encodable ae in certSet)
+ {
+ if (ae != null && ae.ToAsn1Object() is Asn1Sequence s)
+ {
+ contents.Add(new X509Certificate(X509CertificateStructure.GetInstance(s)));
+ }
+ }
+ }
+ return CollectionUtilities.CreateStore(contents);
+ }
+
+ internal IStore GetCrls(Asn1Set crlSet)
+ {
+ var contents = new List();
+ if (crlSet != null)
+ {
+ foreach (Asn1Encodable ae in crlSet)
+ {
+ if (ae != null && ae.ToAsn1Object() is Asn1Sequence s)
+ {
+ contents.Add(new X509Crl(CertificateList.GetInstance(s)));
+ }
+ }
+ }
+ return CollectionUtilities.CreateStore(contents);
+ }
+
+ internal IStore