Skip to content

Commit 407aeea

Browse files
committed
FIX: revisited TLS and HTTP protocols to be more stable in some cases
1 parent 99a6cd1 commit 407aeea

File tree

4 files changed

+396
-227
lines changed

4 files changed

+396
-227
lines changed

src/mezz/codec-crt.r

+7-2
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,17 @@ register-codec [
152152
'SEQUENCE into [
153153
AlgorithmIdentifier ( result/public-key: copy *blk )
154154
'BIT_STRING set *val binary! (
155-
tmp: der-codec/decode *val
156155
append/only result/public-key switch/default *blk/1 [
157156
rsaEncryption [
157+
tmp: der-codec/decode *val
158158
reduce [copy tmp/2/2 copy tmp/2/4] ;@@ or don't copy?
159159
]
160-
][ tmp ]
160+
ecPublicKey [
161+
remove next result/public-key
162+
result/public-key/2: der-codec/decode-OID result/public-key/2
163+
copy *val
164+
]
165+
][ copy *val ]
161166

162167
)
163168
]

src/mezz/codec-der.r

+10
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,16 @@ register-codec [
214214
#{05} (name: 'caRepository)
215215
]
216216
|
217+
#{2A8648CE3D} (main: "X9.62") [
218+
#{0201} (name: 'ecPublicKey)
219+
| #{0301} [
220+
#{07} (name: 'secp256r1)
221+
;| #{02} (name: 'prime192v2)
222+
;| #{03} (name: 'prime192v3)
223+
| #{01} (name: 'secp192r1)
224+
]
225+
]
226+
|
217227
#{2A864886F70D01} [
218228
#{01} (main: "PKCS #1") [
219229
#{01} (name: 'rsaEncryption)

0 commit comments

Comments
 (0)