2 * ra_svn_sasl.h : SASL-related declarations shared between the
3 * ra_svn and svnserve module
5 * ====================================================================
6 * Licensed to the Apache Software Foundation (ASF) under one
7 * or more contributor license agreements. See the NOTICE file
8 * distributed with this work for additional information
9 * regarding copyright ownership. The ASF licenses this file
10 * to you under the Apache License, Version 2.0 (the
11 * "License"); you may not use this file except in compliance
12 * with the License. You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing,
17 * software distributed under the License is distributed on an
18 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19 * KIND, either express or implied. See the License for the
20 * specific language governing permissions and limitations
22 * ====================================================================
31 /* This prevents sasl.h from redefining iovec, which is always defined by APR
33 #define STRUCT_IOVEC_DEFINED
36 #include <sasl/sasl.h>
39 #include <apr_errno.h>
40 #include <apr_pools.h>
42 #include "svn_error.h"
43 #include "svn_ra_svn.h"
45 #include "private/svn_atomic.h"
49 #endif /* __cplusplus */
51 /** The application and service name used for sasl_client_new,
52 * sasl_server_init, and sasl_server_new. */
53 #define SVN_RA_SVN_SASL_NAME "svn"
55 extern volatile svn_atomic_t svn_ra_svn__sasl_status;
57 /* Initialize secprops with default values. */
59 svn_ra_svn__default_secprops(sasl_security_properties_t *secprops);
61 /* This function is called by the client and the server before
62 calling sasl_{client, server}_init, pool is used for allocations. */
64 svn_ra_svn__sasl_common_init(apr_pool_t *pool);
66 /* Sets local_addrport and remote_addrport to a string containing the
67 remote and local IP address and port, formatted like this: a.b.c.d;port. */
69 svn_ra_svn__get_addresses(const char **local_addrport,
70 const char **remote_addrport,
71 svn_ra_svn_conn_t *conn,
74 /* If a security layer was negotiated during the authentication exchange,
75 create an encrypted stream for conn. */
77 svn_ra_svn__enable_sasl_encryption(svn_ra_svn_conn_t *conn,
78 sasl_conn_t *sasl_ctx,
84 #endif /* __cplusplus */
86 #endif /* RA_SVN_SASL_H */