|
1 | 1 | using System; |
2 | 2 | using System.Collections; |
3 | 3 | using System.Collections.Generic; |
| 4 | +using System.ComponentModel; |
4 | 5 | using System.Diagnostics; |
5 | 6 | using System.Globalization; |
6 | 7 | using System.IO; |
@@ -1035,15 +1036,15 @@ private void ParseTLS1dot3CertificateRequest(Hashtable htCertFilter, byte[] arrC |
1035 | 1036 | arrExtData[iX++]; |
1036 | 1037 | Debug.Assert((cbSigHashAlgs % 2) == 0); |
1037 | 1038 |
|
1038 | | - var alSigHashAlgs = new ArrayList(); |
| 1039 | + var alSigSchemes = new ArrayList(); |
1039 | 1040 |
|
1040 | 1041 | for (int ixSigHashPair = 0; ixSigHashPair < cbSigHashAlgs / 2; ++ixSigHashPair) |
1041 | 1042 | { |
1042 | | - alSigHashAlgs.Add(GetHashSigString(arrExtData[iX + (2 * ixSigHashPair)], arrExtData[1+ iX + (2 * ixSigHashPair)])); |
| 1043 | + alSigSchemes.Add(GetTLS13SigSchemeString((arrExtData[iX + (2 * ixSigHashPair)] << 8) + arrExtData[1+ iX + (2 * ixSigHashPair)])); |
1043 | 1044 | } |
1044 | | - htCertFilter.Add("Accepted SignatureAndHashAlgorithms", alSigHashAlgs); |
| 1045 | + htCertFilter.Add("Accepted SignatureSchemes", alSigSchemes); |
1045 | 1046 | } |
1046 | | - catch { htCertFilter.Add("Accepted SignatureAndHashAlgorithms", "Parse failure"); } |
| 1047 | + catch { htCertFilter.Add("Accepted SignatureSchemes", "Parse failure"); } |
1047 | 1048 | break; |
1048 | 1049 | default: |
1049 | 1050 | htCertFilter.Add("FilterExt #" + iExtensionType.ToString(), "Length" + iExtDataLen.ToString()); |
@@ -1104,6 +1105,42 @@ private void GenerateDNSResolutionListSession(Dictionary<int, List<Hashtable>> d |
1104 | 1105 | catch (Exception e) { FiddlerApplication.Log.LogFormat("GenerateDNSResolutionListSession failed: " + DescribeExceptionWithStack(e)); } |
1105 | 1106 | } |
1106 | 1107 |
|
| 1108 | + // https://www.rfc-editor.org/rfc/rfc8446#section-4.3.2:~:text=extensions%20contains%20a-,SignatureSchemeList,-value%3A%0A%0A%20%20%20%20%20%20enum%20%7B%0A%20%20%20%20%20%20%20%20%20%20/*%20RSASSA |
| 1109 | + private static string GetTLS13SigSchemeString(int iValue) |
| 1110 | + { |
| 1111 | + switch (iValue) |
| 1112 | + { |
| 1113 | + case 0x0401: return "rsa_pkcs1_sha256"; |
| 1114 | + case 0x0501: return "rsa_pkcs1_sha384"; |
| 1115 | + case 0x0601: return "rsa_pkcs1_sha512"; |
| 1116 | + |
| 1117 | + /* ECDSA algorithms */ |
| 1118 | + case 0x0403: return "ecdsa_secp256r1_sha256"; |
| 1119 | + case 0x0503: return "ecdsa_secp384r1_sha384"; |
| 1120 | + case 0x0603: return "ecdsa_secp521r1_sha512"; |
| 1121 | + |
| 1122 | + /* RSASSA-PSS algorithms with public key OID rsaEncryption */ |
| 1123 | + case 0x0804: return "rsa_pss_rsae_sha256"; |
| 1124 | + case 0x0805: return "rsa_pss_rsae_sha384"; |
| 1125 | + case 0x0806: return "rsa_pss_rsae_sha512"; |
| 1126 | + |
| 1127 | + /* EdDSA algorithms */ |
| 1128 | + case 0x0807: return "ed25519"; |
| 1129 | + case 0x0808: return "ed448"; |
| 1130 | + |
| 1131 | + /* RSASSA-PSS algorithms with public key OID RSASSA-PSS */ |
| 1132 | + case 0x0809: return "rsa_pss_pss_sha256"; |
| 1133 | + case 0x080a: return "rsa_pss_pss_sha384"; |
| 1134 | + case 0x080b: return "rsa_pss_pss_sha512"; |
| 1135 | + |
| 1136 | + case 0x0201: return "rsa_pkcs1_sha1"; |
| 1137 | + case 0x0202: return "dsa_sha1"; |
| 1138 | + case 0x0203: return "ecdsa_sha1"; |
| 1139 | + |
| 1140 | + default: return String.Format("unknown(0x{0:x})", iValue); |
| 1141 | + } |
| 1142 | + } |
| 1143 | + |
1107 | 1144 | private static string GetHashSigString(int iHash, int iSig) |
1108 | 1145 | { |
1109 | 1146 | string sHash; |
|
0 commit comments