blob: 1036f3d320afaaaf7cc0816e069916d3bc95055d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Rampart/C: oxs_key.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="dir_2ab6243317ac98a7842daf660931c511.html">include</a>
</div>
</div>
</div>
<h1>oxs_key.h</h1><a href="oxs__key_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</span>
<a name="l00003"></a>00003 <span class="comment"> * contributor license agreements. See the NOTICE file distributed with</span>
<a name="l00004"></a>00004 <span class="comment"> * this work for additional information regarding copyright ownership.</span>
<a name="l00005"></a>00005 <span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span>
<a name="l00006"></a>00006 <span class="comment"> * (the "License"); you may not use this file except in compliance with</span>
<a name="l00007"></a>00007 <span class="comment"> * the License. You may obtain a copy of the License at</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
<a name="l00012"></a>00012 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
<a name="l00013"></a>00013 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="l00014"></a>00014 <span class="comment"> * See the License for the specific language governing permissions and</span>
<a name="l00015"></a>00015 <span class="comment"> * limitations under the License.</span>
<a name="l00016"></a>00016 <span class="comment"> */</span>
<a name="l00017"></a>00017
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef OXS_KEY_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define OXS_KEY_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;axis2_defines.h&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="oxs__constants_8h.html" title="Constants for OMXMLSecurity.">oxs_constants.h</a>&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;<a class="code" href="oxs__buffer_8h.html" title="The buffer representation in OMXMLSecurity.">oxs_buffer.h</a>&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;axutil_env.h&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;rp_algorithmsuite.h&gt;</span>
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span>
<a name="l00040"></a>00040 {
<a name="l00041"></a>00041 <span class="preprocessor">#endif</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00043"></a>00043 <span class="comment">/*Key usage is not specified yet*/</span>
<a name="l00044"></a>00044 <span class="preprocessor">#define OXS_KEY_USAGE_NONE 0</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span> <span class="comment">/*Key is a session key */</span>
<a name="l00046"></a>00046 <span class="preprocessor">#define OXS_KEY_USAGE_SESSION 1</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span> <span class="comment">/*Key is a signature session key*/</span>
<a name="l00048"></a>00048 <span class="preprocessor">#define OXS_KEY_USAGE_SIGNATURE_SESSION 2</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span> <span class="comment">/*Key is a derived key */</span>
<a name="l00050"></a>00050 <span class="preprocessor">#define OXS_KEY_USAGE_DERIVED 3 </span>
<a name="l00051"></a>00051 <span class="preprocessor"></span>
<a name="l00052"></a>00052 <span class="preprocessor">#define OXS_KEY_DEFAULT_SIZE 64</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00055"></a><a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">00055</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a>;
<a name="l00056"></a>00056
<a name="l00064"></a>00064 AXIS2_EXTERN <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *AXIS2_CALL
<a name="l00065"></a>00065 <a class="code" href="group__oxs__key.html#g36b734c7ad70d648fc537710c5612720">oxs_key_get_data</a>(
<a name="l00066"></a>00066 <span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00067"></a>00067 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00074"></a>00074 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
<a name="l00075"></a>00075 <a class="code" href="group__oxs__key.html#g72b5b28fa8e1abbe2e1acdcab9bb2a8e">oxs_key_get_name</a>(
<a name="l00076"></a>00076 <span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00077"></a>00077 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00084"></a>00084 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
<a name="l00085"></a>00085 <a class="code" href="group__oxs__key.html#gd5c5faa9b86c4a56411b5f137425ccdf">oxs_key_get_nonce</a>(
<a name="l00086"></a>00086 <span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00087"></a>00087 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00088"></a>00088
<a name="l00095"></a>00095 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
<a name="l00096"></a>00096 <a class="code" href="group__oxs__key.html#gcfa520499cb4c4f8f3dc2219d18c94dc">oxs_key_get_label</a>(
<a name="l00097"></a>00097 <span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00098"></a>00098 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00099"></a>00099
<a name="l00106"></a>00106 AXIS2_EXTERN <span class="keywordtype">int</span> AXIS2_CALL
<a name="l00107"></a>00107 <a class="code" href="group__oxs__key.html#gb98d9f017d0ebe66f359ac7ca081f3f8">oxs_key_get_size</a>(
<a name="l00108"></a>00108 <span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00109"></a>00109 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00116"></a>00116 AXIS2_EXTERN <span class="keywordtype">int</span> AXIS2_CALL
<a name="l00117"></a>00117 <a class="code" href="group__oxs__key.html#g683be18a6f3df260278571268b71de2c">oxs_key_get_usage</a>(
<a name="l00118"></a>00118 <span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00119"></a>00119 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00120"></a>00120
<a name="l00127"></a>00127 AXIS2_EXTERN <span class="keywordtype">int</span> AXIS2_CALL
<a name="l00128"></a>00128 <a class="code" href="group__oxs__key.html#g8216b16bc4e527e8bd081d2977fe458c">oxs_key_get_offset</a>(
<a name="l00129"></a>00129 <span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00130"></a>00130 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00131"></a>00131
<a name="l00138"></a>00138 AXIS2_EXTERN <span class="keywordtype">int</span> AXIS2_CALL
<a name="l00139"></a>00139 <a class="code" href="group__oxs__key.html#gfba71fdb7b244986d302edb7e043d3fe">oxs_key_get_length</a>(
<a name="l00140"></a>00140 <span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00141"></a>00141 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00142"></a>00142
<a name="l00150"></a>00150 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00151"></a>00151 <a class="code" href="group__oxs__key.html#g608ab7734d0d74cdbe939d89d02b56df">oxs_key_set_name</a>(
<a name="l00152"></a>00152 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00153"></a>00153 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00154"></a>00154 axis2_char_t *name);
<a name="l00155"></a>00155
<a name="l00156"></a>00156
<a name="l00164"></a>00164 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00165"></a>00165 <a class="code" href="group__oxs__key.html#g274bbd1d75ff0e877aa4300951b35f44">oxs_key_set_usage</a>(
<a name="l00166"></a>00166 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00167"></a>00167 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00168"></a>00168 <span class="keywordtype">int</span> usage);
<a name="l00169"></a>00169
<a name="l00170"></a>00170 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00171"></a>00171 oxs_key_set_nonce(
<a name="l00172"></a>00172 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00173"></a>00173 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00174"></a>00174 axis2_char_t *nonce);
<a name="l00175"></a>00175
<a name="l00176"></a>00176 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00177"></a>00177 oxs_key_set_label(
<a name="l00178"></a>00178 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00179"></a>00179 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00180"></a>00180 axis2_char_t *label);
<a name="l00181"></a>00181
<a name="l00182"></a>00182 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00183"></a>00183 oxs_key_set_offset(
<a name="l00184"></a>00184 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00185"></a>00185 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00186"></a>00186 <span class="keywordtype">int</span> offset);
<a name="l00187"></a>00187
<a name="l00188"></a>00188 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00189"></a>00189 oxs_key_set_length(
<a name="l00190"></a>00190 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00191"></a>00191 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00192"></a>00192 <span class="keywordtype">int</span> length);
<a name="l00199"></a>00199 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00200"></a>00200 <a class="code" href="group__oxs__key.html#gf05ffae742c85b79b7478ab52df01e1d">oxs_key_free</a>(
<a name="l00201"></a>00201 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00202"></a>00202 <span class="keyword">const</span> axutil_env_t *env
<a name="l00203"></a>00203 );
<a name="l00204"></a>00204
<a name="l00205"></a>00205 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00206"></a>00206 oxs_key_populate_with_buf(<a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00207"></a>00207 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00208"></a>00208 <a class="code" href="group__oxs__buffer.html#g0c4b78066ec1762a58cbec685dd60537">oxs_buffer_t</a> *buffer,
<a name="l00209"></a>00209 axis2_char_t *name,
<a name="l00210"></a>00210 <span class="keywordtype">int</span> usage);
<a name="l00211"></a>00211
<a name="l00222"></a>00222 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00223"></a>00223 <a class="code" href="group__oxs__key.html#g5580f26489fd91cc79c7c9530ea88f1f">oxs_key_populate</a>(
<a name="l00224"></a>00224 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00225"></a>00225 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00226"></a>00226 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *data,
<a name="l00227"></a>00227 axis2_char_t *name,
<a name="l00228"></a>00228 <span class="keywordtype">int</span> size,
<a name="l00229"></a>00229 <span class="keywordtype">int</span> usage);
<a name="l00230"></a>00230
<a name="l00237"></a>00237 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00238"></a>00238 <a class="code" href="group__oxs__key.html#g3033d5598a78536ee46679acd5022ef4">oxs_key_read_from_file</a>(
<a name="l00239"></a>00239 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00240"></a>00240 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00241"></a>00241 axis2_char_t *file_name);
<a name="l00242"></a>00242
<a name="l00249"></a>00249 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00250"></a>00250 <a class="code" href="group__oxs__key.html#gb1fd9305246059f8b7b0c2a988f680f3">oxs_key_for_algo</a>(<a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00251"></a>00251 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00252"></a>00252 rp_algorithmsuite_t *key_algo);
<a name="l00253"></a>00253
<a name="l00254"></a>00254
<a name="l00255"></a>00255 AXIS2_EXTERN <a class="code" href="group__oxs__buffer.html#g0c4b78066ec1762a58cbec685dd60537">oxs_buffer_t</a> *AXIS2_CALL
<a name="l00256"></a>00256 oxs_key_get_buffer(<span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00257"></a>00257 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00258"></a>00258
<a name="l00259"></a>00259 AXIS2_EXTERN <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *AXIS2_CALL
<a name="l00260"></a>00260 oxs_key_dup(<a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00261"></a>00261 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00262"></a>00262
<a name="l00263"></a>00263 AXIS2_EXTERN <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *AXIS2_CALL
<a name="l00264"></a>00264 oxs_key_create(<span class="keyword">const</span> axutil_env_t *env);
<a name="l00265"></a>00265
<a name="l00266"></a>00266 <span class="comment">/* once the key_sha is given, ownership is assumed */</span>
<a name="l00267"></a>00267 AXIS2_EXTERN axis2_status_t AXIS2_CALL
<a name="l00268"></a>00268 oxs_key_set_key_sha(
<a name="l00269"></a>00269 <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00270"></a>00270 <span class="keyword">const</span> axutil_env_t *env,
<a name="l00271"></a>00271 axis2_char_t *key_sha);
<a name="l00272"></a>00272
<a name="l00273"></a>00273 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
<a name="l00274"></a>00274 oxs_key_get_key_sha(
<a name="l00275"></a>00275 <span class="keyword">const</span> <a class="code" href="group__oxs__key.html#g6336c79b9592fb630903079b14a99206">oxs_key_t</a> *key,
<a name="l00276"></a>00276 <span class="keyword">const</span> axutil_env_t *env);
<a name="l00277"></a>00277
<a name="l00278"></a>00278
<a name="l00279"></a>00279 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00280"></a>00280 <span class="preprocessor"></span>}
<a name="l00281"></a>00281 <span class="preprocessor">#endif</span>
<a name="l00282"></a>00282 <span class="preprocessor"></span>
<a name="l00283"></a>00283 <span class="preprocessor">#endif </span><span class="comment">/* OXS_KEY_H */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed May 13 10:52:52 2009 for Rampart/C by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>