summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-02-20 17:03:25 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-02-23 16:14:19 +1100
commitbea05159e4239e04dc5e8782b881ed7f70b231fc (patch)
tree5c3d5cb09afea5e9f7c259fde3e8a623bc4a900d /source3/libsmb
parent757c9b79ea1b2a599d9db1f6e686534777abd3a7 (diff)
downloadsamba-bea05159e4239e04dc5e8782b881ed7f70b231fc.tar.gz
samba-bea05159e4239e04dc5e8782b881ed7f70b231fc.tar.bz2
samba-bea05159e4239e04dc5e8782b881ed7f70b231fc.zip
s3-libsmb: Remove unused spnego functions
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clispnego.c109
1 files changed, 0 insertions, 109 deletions
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index d584f9f4ab..c1b49c9d33 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -449,78 +449,6 @@ done:
return true;
}
-bool spnego_parse_auth(TALLOC_CTX *ctx, DATA_BLOB blob, DATA_BLOB *auth)
-{
- return spnego_parse_auth_and_mic(ctx, blob, auth, NULL);
-}
-
-/*
- generate a minimal SPNEGO response packet. Doesn't contain much.
-*/
-DATA_BLOB spnego_gen_auth_response_and_mic(TALLOC_CTX *ctx,
- NTSTATUS nt_status,
- const char *mechOID,
- DATA_BLOB *reply,
- DATA_BLOB *mechlistMIC)
-{
- ASN1_DATA *data;
- DATA_BLOB ret;
- uint8 negResult;
-
- if (NT_STATUS_IS_OK(nt_status)) {
- negResult = SPNEGO_ACCEPT_COMPLETED;
- } else if (NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
- negResult = SPNEGO_ACCEPT_INCOMPLETE;
- } else {
- negResult = SPNEGO_REJECT;
- }
-
- data = asn1_init(talloc_tos());
- if (data == NULL) {
- return data_blob_null;
- }
-
- asn1_push_tag(data, ASN1_CONTEXT(1));
- asn1_push_tag(data, ASN1_SEQUENCE(0));
- asn1_push_tag(data, ASN1_CONTEXT(0));
- asn1_write_enumerated(data, negResult);
- asn1_pop_tag(data);
-
- if (mechOID) {
- asn1_push_tag(data,ASN1_CONTEXT(1));
- asn1_write_OID(data, mechOID);
- asn1_pop_tag(data);
- }
-
- if (reply && reply->data != NULL) {
- asn1_push_tag(data,ASN1_CONTEXT(2));
- asn1_write_OctetString(data, reply->data, reply->length);
- asn1_pop_tag(data);
- }
-
- if (mechlistMIC && mechlistMIC->data != NULL) {
- asn1_push_tag(data, ASN1_CONTEXT(3));
- asn1_write_OctetString(data,
- mechlistMIC->data,
- mechlistMIC->length);
- asn1_pop_tag(data);
- }
-
- asn1_pop_tag(data);
- asn1_pop_tag(data);
-
- ret = data_blob_talloc(ctx, data->data, data->length);
- asn1_free(data);
- return ret;
-}
-
-DATA_BLOB spnego_gen_auth_response(TALLOC_CTX *ctx, DATA_BLOB *reply,
- NTSTATUS nt_status, const char *mechOID)
-{
- return spnego_gen_auth_response_and_mic(ctx, nt_status,
- mechOID, reply, NULL);
-}
-
/*
parse a SPNEGO auth packet. This contains the encrypted passwords
*/
@@ -596,40 +524,3 @@ bool spnego_parse_auth_response(TALLOC_CTX *ctx,
return True;
}
-bool spnego_mech_list_blob(TALLOC_CTX *mem_ctx,
- char **oid_list, DATA_BLOB *raw_data)
-{
- ASN1_DATA *data;
- unsigned int idx;
-
- if (!oid_list || !oid_list[0] || !raw_data) {
- return false;
- }
-
- data = asn1_init(talloc_tos());
- if (data == NULL) {
- return false;
- }
-
- asn1_push_tag(data, ASN1_SEQUENCE(0));
- for (idx = 0; oid_list[idx]; idx++) {
- asn1_write_OID(data, oid_list[idx]);
- }
- asn1_pop_tag(data);
-
- if (data->has_error) {
- DEBUG(3, (__location__ " failed at %d\n", (int)data->ofs));
- asn1_free(data);
- return false;
- }
-
- *raw_data = data_blob_talloc(mem_ctx, data->data, data->length);
- if (!raw_data->data) {
- DEBUG(3, (__location__": data_blob_talloc() failed!\n"));
- asn1_free(data);
- return false;
- }
-
- asn1_free(data);
- return true;
-}