File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change
1
+ using System . Formats . Asn1 ;
2
+
3
+ namespace fido2_net_lib
4
+ {
5
+ public static class AsnHelper
6
+ {
7
+ public static byte [ ] GetBlob ( byte [ ] input )
8
+ {
9
+ var writer = new AsnWriter ( AsnEncodingRules . BER ) ;
10
+
11
+ writer . WriteOctetString ( input ) ;
12
+
13
+ return writer . Encode ( ) ;
14
+ }
15
+ }
16
+ }
Original file line number Diff line number Diff line change 9
9
using System . Text ;
10
10
using System . Text . Json ;
11
11
using System . Threading . Tasks ;
12
- using Asn1 ;
13
12
using Fido2NetLib ;
14
13
using Fido2NetLib . Objects ;
15
14
using Microsoft . Extensions . Caching . Distributed ;
21
20
22
21
namespace fido2_net_lib . Test
23
22
{
24
-
25
23
// todo: Create tests and name Facts and json files better.
26
24
public class Fido2Tests
27
25
{
28
26
private static readonly IMetadataService _metadataService ;
29
27
private static readonly Fido2Configuration _config ;
30
28
public static readonly List < ( COSE . KeyType , COSE . Algorithm , COSE . EllipticCurve ) > _validCOSEParameters ;
31
29
32
-
33
30
static Fido2Tests ( )
34
31
{
35
32
var services = new ServiceCollection ( ) ;
@@ -180,7 +177,7 @@ public Attestation()
180
177
181
178
_attestationObject = CBORObject . NewMap ( ) ;
182
179
183
- _asnEncodedAaguid = AsnElt . MakeBlob ( AttestedCredentialData . AaGuidToBigEndian ( _aaguid ) ) . Encode ( ) ;
180
+ _asnEncodedAaguid = AsnHelper . GetBlob ( AttestedCredentialData . AaGuidToBigEndian ( _aaguid ) ) ;
184
181
185
182
idFidoGenCeAaguidExt = new X509Extension ( oidIdFidoGenCeAaguid , _asnEncodedAaguid , false ) ;
186
183
}
You can’t perform that action at this time.
0 commit comments