Lines Matching defs:sp
219 ret_sec_buffer(krb5_storage *sp, struct sec_buffer *buf)
222 CHECK(krb5_ret_uint16(sp, &buf->length), 0);
223 CHECK(krb5_ret_uint16(sp, &buf->allocated), 0);
224 CHECK(krb5_ret_uint32(sp, &buf->offset), 0);
230 store_sec_buffer(krb5_storage *sp, const struct sec_buffer *buf)
233 CHECK(krb5_store_uint16(sp, buf->length), 0);
234 CHECK(krb5_store_uint16(sp, buf->allocated), 0);
235 CHECK(krb5_store_uint32(sp, buf->offset), 0);
259 ret_string(krb5_storage *sp, int ucs2, size_t len, char **s)
266 CHECK(krb5_storage_read(sp, *s, len), len);
290 ret_sec_string(krb5_storage *sp, int ucs2, struct sec_buffer *desc, char **s)
293 CHECK(krb5_storage_seek(sp, desc->offset, SEEK_SET), desc->offset);
294 CHECK(ret_string(sp, ucs2, desc->length, s), 0);
300 put_string(krb5_storage *sp, int ucs2, const char *s)
314 CHECK(krb5_storage_write(sp, buf.data, buf.length), buf.length);
327 ret_buf(krb5_storage *sp, struct sec_buffer *desc, struct ntlm_buf *buf)
333 CHECK(krb5_storage_seek(sp, desc->offset, SEEK_SET), desc->offset);
334 CHECK(krb5_storage_read(sp, buf->data, buf->length), buf->length);
341 put_buf(krb5_storage *sp, const struct ntlm_buf *buf)
344 CHECK(krb5_storage_write(sp, buf->data, buf->length), buf->length);
1489 krb5_storage *sp;
1504 sp = krb5_storage_emem();
1505 if (sp == NULL)
1507 krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE);
1509 CHECK(krb5_store_uint32(sp, 0x00000101), 0);
1510 CHECK(krb5_store_uint32(sp, 0), 0);
1512 CHECK(krb5_store_uint32(sp, t & 0xffffffff), 0);
1513 CHECK(krb5_store_uint32(sp, t >> 32), 0);
1515 CHECK(krb5_storage_write(sp, clientchallenge, 8), 8);
1517 CHECK(krb5_store_uint32(sp, 0), 0); /* unknown but zero will work */
1518 CHECK(krb5_storage_write(sp, infotarget->data, infotarget->length),
1520 CHECK(krb5_store_uint32(sp, 0), 0); /* unknown but zero will work */
1522 CHECK(krb5_storage_to_data(sp, &data), 0);
1523 krb5_storage_free(sp);
1524 sp = NULL;
1528 sp = krb5_storage_emem();
1529 if (sp == NULL) {
1534 CHECK(krb5_storage_write(sp, ntlmv2answer, 16), 16);
1535 CHECK(krb5_storage_write(sp, data.data, data.length), data.length);
1538 CHECK(krb5_storage_to_data(sp, &data), 0);
1539 krb5_storage_free(sp);
1540 sp = NULL;
1547 if (sp)
1548 krb5_storage_free(sp);
1587 krb5_storage *sp;
1607 sp = krb5_storage_from_readonly_mem(answer->data, answer->length);
1608 if (sp == NULL)
1610 krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE);
1612 CHECK(krb5_storage_read(sp, clientanswer, 16), 16);
1614 CHECK(krb5_ret_uint32(sp, &temp), 0);
1616 CHECK(krb5_ret_uint32(sp, &temp), 0);
1619 CHECK(krb5_ret_uint32(sp, &temp), 0);
1621 CHECK(krb5_ret_uint32(sp, &temp), 0);
1632 CHECK(krb5_storage_read(sp, clientnonce, 8), 8);
1634 CHECK(krb5_ret_uint32(sp, &temp), 0); /* unknown */
1637 infotarget->length = answer->length - krb5_storage_seek(sp, 0, SEEK_CUR);
1643 CHECK(krb5_storage_read(sp, infotarget->data, infotarget->length),
1646 krb5_storage_free(sp);
1647 sp = NULL;
1667 if (sp)
1668 krb5_storage_free(sp);