diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor.c,v 1.107 2010/07/13 11:52:06 djm Exp $ */ | 1 | /* $OpenBSD: monitor.c,v 1.108 2010/07/13 23:13:16 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> | 3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> |
4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> | 4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> |
@@ -518,7 +518,7 @@ monitor_allowed_key(u_char *blob, u_int bloblen) | |||
518 | { | 518 | { |
519 | /* make sure key is allowed */ | 519 | /* make sure key is allowed */ |
520 | if (key_blob == NULL || key_bloblen != bloblen || | 520 | if (key_blob == NULL || key_bloblen != bloblen || |
521 | timing_safe_cmp(key_blob, blob, key_bloblen)) | 521 | timingsafe_bcmp(key_blob, blob, key_bloblen)) |
522 | return (0); | 522 | return (0); |
523 | return (1); | 523 | return (1); |
524 | } | 524 | } |
@@ -1103,14 +1103,14 @@ monitor_valid_userblob(u_char *data, u_int datalen) | |||
1103 | len = buffer_len(&b); | 1103 | len = buffer_len(&b); |
1104 | if ((session_id2 == NULL) || | 1104 | if ((session_id2 == NULL) || |
1105 | (len < session_id2_len) || | 1105 | (len < session_id2_len) || |
1106 | (timing_safe_cmp(p, session_id2, session_id2_len) != 0)) | 1106 | (timingsafe_bcmp(p, session_id2, session_id2_len) != 0)) |
1107 | fail++; | 1107 | fail++; |
1108 | buffer_consume(&b, session_id2_len); | 1108 | buffer_consume(&b, session_id2_len); |
1109 | } else { | 1109 | } else { |
1110 | p = buffer_get_string(&b, &len); | 1110 | p = buffer_get_string(&b, &len); |
1111 | if ((session_id2 == NULL) || | 1111 | if ((session_id2 == NULL) || |
1112 | (len != session_id2_len) || | 1112 | (len != session_id2_len) || |
1113 | (timing_safe_cmp(p, session_id2, session_id2_len) != 0)) | 1113 | (timingsafe_bcmp(p, session_id2, session_id2_len) != 0)) |
1114 | fail++; | 1114 | fail++; |
1115 | xfree(p); | 1115 | xfree(p); |
1116 | } | 1116 | } |
@@ -1158,7 +1158,7 @@ monitor_valid_hostbasedblob(u_char *data, u_int datalen, char *cuser, | |||
1158 | p = buffer_get_string(&b, &len); | 1158 | p = buffer_get_string(&b, &len); |
1159 | if ((session_id2 == NULL) || | 1159 | if ((session_id2 == NULL) || |
1160 | (len != session_id2_len) || | 1160 | (len != session_id2_len) || |
1161 | (timing_safe_cmp(p, session_id2, session_id2_len) != 0)) | 1161 | (timingsafe_bcmp(p, session_id2, session_id2_len) != 0)) |
1162 | fail++; | 1162 | fail++; |
1163 | xfree(p); | 1163 | xfree(p); |
1164 | 1164 | ||
@@ -1684,7 +1684,7 @@ mm_get_kex(Buffer *m) | |||
1684 | kex->session_id = buffer_get_string(m, &kex->session_id_len); | 1684 | kex->session_id = buffer_get_string(m, &kex->session_id_len); |
1685 | if (session_id2 == NULL || | 1685 | if (session_id2 == NULL || |
1686 | kex->session_id_len != session_id2_len || | 1686 | kex->session_id_len != session_id2_len || |
1687 | timing_safe_cmp(kex->session_id, session_id2, session_id2_len) != 0) | 1687 | timingsafe_bcmp(kex->session_id, session_id2, session_id2_len) != 0) |
1688 | fatal("mm_get_get: internal error: bad session id"); | 1688 | fatal("mm_get_get: internal error: bad session id"); |
1689 | kex->we_need = buffer_get_int(m); | 1689 | kex->we_need = buffer_get_int(m); |
1690 | kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; | 1690 | kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; |