Skip to content

Commit

Permalink
FIX: revisited TLS and HTTP protocols to be more stable in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Aug 30, 2019
1 parent 99a6cd1 commit 407aeea
Show file tree
Hide file tree
Showing 4 changed files with 396 additions and 227 deletions.
9 changes: 7 additions & 2 deletions src/mezz/codec-crt.r
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,17 @@ register-codec [
'SEQUENCE into [
AlgorithmIdentifier ( result/public-key: copy *blk )
'BIT_STRING set *val binary! (
tmp: der-codec/decode *val
append/only result/public-key switch/default *blk/1 [
rsaEncryption [
tmp: der-codec/decode *val
reduce [copy tmp/2/2 copy tmp/2/4] ;@@ or don't copy?
]
][ tmp ]
ecPublicKey [
remove next result/public-key
result/public-key/2: der-codec/decode-OID result/public-key/2
copy *val
]
][ copy *val ]

)
]
Expand Down
10 changes: 10 additions & 0 deletions src/mezz/codec-der.r
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,16 @@ register-codec [
#{05} (name: 'caRepository)
]
|
#{2A8648CE3D} (main: "X9.62") [
#{0201} (name: 'ecPublicKey)
| #{0301} [
#{07} (name: 'secp256r1)
;| #{02} (name: 'prime192v2)
;| #{03} (name: 'prime192v3)
| #{01} (name: 'secp192r1)
]
]
|
#{2A864886F70D01} [
#{01} (main: "PKCS #1") [
#{01} (name: 'rsaEncryption)
Expand Down
Loading

0 comments on commit 407aeea

Please sign in to comment.