summaryrefslogtreecommitdiff
path: root/gss-genr.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-07-10 09:13:30 +0000
committerDamien Miller <djm@mindrot.org>2018-07-10 19:15:35 +1000
commit0f3958c1e6ffb8ea4ba27e2a97a00326fce23246 (patch)
treef2538c652ca620a254578a088ff0f5eb2e36d9dd /gss-genr.c
parentc74ae8e7c45f325f3387abd48fa7dfef07a08069 (diff)
upstream: kerberos/gssapi fixes for buffer removal
OpenBSD-Commit-ID: 1cdf56fec95801e4563c47f21696f04cd8b60c4c
Diffstat (limited to 'gss-genr.c')
-rw-r--r--gss-genr.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/gss-genr.c b/gss-genr.c
index f794e05b7..d56257b4a 100644
--- a/gss-genr.c
+++ b/gss-genr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gss-genr.c,v 1.25 2018/07/09 21:37:55 markus Exp $ */ 1/* $OpenBSD: gss-genr.c,v 1.26 2018/07/10 09:13:30 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
@@ -47,6 +47,21 @@
47extern u_char *session_id2; 47extern u_char *session_id2;
48extern u_int session_id2_len; 48extern u_int session_id2_len;
49 49
50/* sshbuf_get for gss_buffer_desc */
51int
52ssh_gssapi_get_buffer_desc(struct sshbuf *b, gss_buffer_desc *g)
53{
54 int r;
55 u_char *p;
56 size_t len;
57
58 if ((r = sshbuf_get_string(b, &p, &len)) != 0)
59 return r;
60 g->value = p;
61 g->length = len;
62 return 0;
63}
64
50/* Check that the OID in a data stream matches that in the context */ 65/* Check that the OID in a data stream matches that in the context */
51int 66int
52ssh_gssapi_check_oid(Gssctxt *ctx, void *data, size_t len) 67ssh_gssapi_check_oid(Gssctxt *ctx, void *data, size_t len)