OLD | NEW |
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | 1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 /* | 2 /* |
3 * SSL3 Protocol | 3 * SSL3 Protocol |
4 * | 4 * |
5 * This Source Code Form is subject to the terms of the Mozilla Public | 5 * This Source Code Form is subject to the terms of the Mozilla Public |
6 * License, v. 2.0. If a copy of the MPL was not distributed with this | 6 * License, v. 2.0. If a copy of the MPL was not distributed with this |
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
8 | 8 |
9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */ | 9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */ |
10 | 10 |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 PORT_SetError(SSL_ERROR_UNSUPPORTED_VERSION); | 1055 PORT_SetError(SSL_ERROR_UNSUPPORTED_VERSION); |
1056 return SECFailure; | 1056 return SECFailure; |
1057 } | 1057 } |
1058 | 1058 |
1059 ss->version = PR_MIN(peerVersion, ss->vrange.max); | 1059 ss->version = PR_MIN(peerVersion, ss->vrange.max); |
1060 PORT_Assert(ssl3_VersionIsSupported(ss->protocolVariant, ss->version)); | 1060 PORT_Assert(ssl3_VersionIsSupported(ss->protocolVariant, ss->version)); |
1061 | 1061 |
1062 return SECSuccess; | 1062 return SECSuccess; |
1063 } | 1063 } |
1064 | 1064 |
1065 static SECStatus | 1065 SECStatus |
1066 ssl3_GetNewRandom(SSL3Random *random) | 1066 ssl3_GetNewRandom(SSL3Random *random) |
1067 { | 1067 { |
1068 SECStatus rv; | 1068 SECStatus rv; |
1069 | 1069 |
1070 rv = PK11_GenerateRandom(random->rand, SSL3_RANDOM_LENGTH); | 1070 rv = PK11_GenerateRandom(random->rand, SSL3_RANDOM_LENGTH); |
1071 if (rv != SECSuccess) { | 1071 if (rv != SECSuccess) { |
1072 ssl_MapLowLevelError(SSL_ERROR_GENERATE_RANDOM_FAILURE); | 1072 ssl_MapLowLevelError(SSL_ERROR_GENERATE_RANDOM_FAILURE); |
1073 } | 1073 } |
1074 return rv; | 1074 return rv; |
1075 } | 1075 } |
(...skipping 12862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13938 } | 13938 } |
13939 } | 13939 } |
13940 } | 13940 } |
13941 | 13941 |
13942 rv = ssl3_ConstrainRangeByPolicy(); | 13942 rv = ssl3_ConstrainRangeByPolicy(); |
13943 | 13943 |
13944 return rv; | 13944 return rv; |
13945 } | 13945 } |
13946 | 13946 |
13947 /* End of ssl3con.c */ | 13947 /* End of ssl3con.c */ |
OLD | NEW |