SharkSSL™ Embedded SSL/TLS Stack
SharkSSL.h
1 /*
2  * ____ _________ __ _
3  * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4  * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5  * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6  * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7  * /____/
8  *
9  * SharkSSL Embedded SSL/TLS Stack
10  ****************************************************************************
11  * PROGRAM MODULE
12  *
13  * $Id: SharkSSL.h 4673 2020-11-30 17:03:06Z wini $
14  *
15  * COPYRIGHT: Real Time Logic LLC, 2010 - 2020
16  *
17  * This software is copyrighted by and is the sole property of Real
18  * Time Logic LLC. All rights, title, ownership, or other interests in
19  * the software remain the property of Real Time Logic LLC. This
20  * software may only be used in accordance with the terms and
21  * conditions stipulated in the corresponding license agreement under
22  * which the software has been supplied. Any unauthorized use,
23  * duplication, transmission, distribution, or disclosure of this
24  * software is expressly forbidden.
25  *
26  * This Copyright notice may not be removed or modified without prior
27  * written consent of Real Time Logic LLC.
28  *
29  * Real Time Logic LLC. reserves the right to modify this software
30  * without notice.
31  *
32  * http://www.realtimelogic.com
33  * http://www.sharkssl.com
34  ****************************************************************************
35  *
36  */
37 #ifndef _SharkSsl_h
38 #define _SharkSsl_h
39 
40 #include "TargConfig.h" /* platform dependencies */
41 #include "SharkSSL_cfg.h" /* SharkSSL configuration */
42 #ifdef __cplusplus
43 #include <stddef.h> /* size_t for new, delete */
44 #endif
45 
46 #ifndef SHARKSSL_API
47 #define SHARKSSL_API
48 #else /* Barracuda */
49 #define SHARKSSL_BA 1
50 #include <ThreadLib.h>
51 #include <BaServerLib.h>
52 #endif
53 
54 #include "SharkSslCrypto.h" /* Crypto API */
55 
56 #ifndef sharkCertSerialNumber2NetworkEndian
57 
61 typedef U64 SharkCertSerialNumber;
62 #ifdef B_BIG_ENDIAN
63 #define sharkCertSerialNumber2NetworkEndian(n)
64 #else
65 #define sharkCertSerialNumber2NetworkEndian(n) \
66  do { \
67  U64 nn=0; \
68  register U8* t=(U8*)&nn; \
69  register U8* f=(U8*)&n; \
70  t[7]=f[0]; \
71  t[6]=f[1]; \
72  t[5]=f[2]; \
73  t[4]=f[3]; \
74  t[3]=f[4]; \
75  t[2]=f[5]; \
76  t[1]=f[6]; \
77  t[0]=f[7]; \
78  n=nn; \
79  } while(0)
80 #endif
81 #endif
82 
83 /* Forward decl. */
84 struct SharkSslCertDN;
85 struct SharkSslASN1Create;
86 struct SharkSslBitExtReq;
87 
90 typedef U8* SharkSslKey;
91 
92 
114 #define SHARKSSL_ALERT_LEVEL_WARNING 1
115 
117 #define SHARKSSL_ALERT_LEVEL_FATAL 2
118 
131 #define SHARKSSL_ALERT_CLOSE_NOTIFY 0
132 
133 #define SHARKSSL_ALERT_UNEXPECTED_MESSAGE 10
134 
135 #define SHARKSSL_ALERT_BAD_RECORD_MAC 20
136 
137 #define SHARKSSL_ALERT_DECRYPTION_FAILED 21
138 
139 #define SHARKSSL_ALERT_RECORD_OVERFLOW 22
140 
141 #define SHARKSSL_ALERT_DECOMPRESSION_FAILURE 30
142 
143 #define SHARKSSL_ALERT_HANDSHAKE_FAILURE 40
144 
145 #define SHARKSSL_ALERT_NO_CERTIFICATE 41 /* SSL 3.0 only */
146 
147 #define SHARKSSL_ALERT_BAD_CERTIFICATE 42
148 
149 #define SHARKSSL_ALERT_UNSUPPORTED_CERTIFICATE 43
150 
151 #define SHARKSSL_ALERT_CERTIFICATE_REVOKED 44
152 
153 #define SHARKSSL_ALERT_CERTIFICATE_EXPIRED 45
154 
155 #define SHARKSSL_ALERT_CERTIFICATE_UNKNOWN 46
156 
157 #define SHARKSSL_ALERT_ILLEGAL_PARAMETER 47
158 
159 #define SHARKSSL_ALERT_UNKNOWN_CA 48
160 
161 #define SHARKSSL_ALERT_ACCESS_DENIED 49
162 
163 #define SHARKSSL_ALERT_DECODE_ERROR 50
164 
165 #define SHARKSSL_ALERT_DECRYPT_ERROR 51
166 
167 #define SHARKSSL_ALERT_EXPORT_RESTRICTION 60
168 
169 #define SHARKSSL_ALERT_PROTOCOL_VERSION 70
170 
171 #define SHARKSSL_ALERT_INSUFFICIENT_SECURITY 71
172 
173 #define SHARKSSL_ALERT_INTERNAL_ERROR 80
174 
175 #define SHARKSSL_ALERT_USER_CANCELED 90
176 
177 #define SHARKSSL_ALERT_NO_RENEGOTIATION 100
178 
179 #define SHARKSSL_ALERT_UNRECOGNIZED_NAME 112
180 
181 #define SHARKSSL_ALERT_UNKNOWN_PSK_IDENTITY 115
182  /* end group SharkSslAlertMsg */ /* end group SharkSslAlert */
185 
186 
196 #define TLS_NULL_WITH_NULL_NULL 0x0000
197 
198 #define TLS_RSA_WITH_NULL_MD5 0x0001
199 
200 #define TLS_RSA_WITH_NULL_SHA 0x0002
201 
202 #define TLS_RSA_WITH_RC4_128_MD5 0x0004
203 
204 #define TLS_RSA_WITH_RC4_128_SHA 0x0005
205 
206 #define TLS_RSA_WITH_DES_CBC_SHA 0x0009
207 
208 #define TLS_RSA_WITH_3DES_EDE_CBC_SHA 0x000A
209 
210 #define TLS_DHE_RSA_WITH_DES_CBC_SHA 0x0015
211 
212 #define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA 0x0016
213 
214 #define TLS_RSA_WITH_AES_128_CBC_SHA 0x002F
215 
216 #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA 0x0033
217 
218 #define TLS_RSA_WITH_AES_256_CBC_SHA 0x0035
219 
220 #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA 0x0039
221 
222 #define TLS_RSA_WITH_NULL_SHA256 0x003B
223 
224 #define TLS_RSA_WITH_AES_128_CBC_SHA256 0x003C
225 
226 #define TLS_RSA_WITH_AES_256_CBC_SHA256 0x003D
227 
228 #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 0x0067
229 
230 #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x006B
231 
232 #define TLS_PSK_WITH_RC4_128_SHA 0x008A
233 
234 #define TLS_PSK_WITH_3DES_EDE_CBC_SHA 0x008B
235 
236 #define TLS_PSK_WITH_AES_128_CBC_SHA 0x008C
237 
238 #define TLS_PSK_WITH_AES_256_CBC_SHA 0x008D
239 
240 #define TLS_RSA_WITH_AES_128_GCM_SHA256 0x009C
241 
242 #define TLS_RSA_WITH_AES_256_GCM_SHA384 0x009D
243 
244 #define TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 0x009E
245 
246 #define TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 0x009F
247 
248 #define TLS_PSK_WITH_AES_128_GCM_SHA256 0x00A8
249 
250 #define TLS_PSK_WITH_AES_256_GCM_SHA384 0x00A9
251 
252 #define TLS_PSK_WITH_AES_128_CBC_SHA256 0x00AE
253 
254 #define TLS_PSK_WITH_AES_256_CBC_SHA384 0x00AF
255 
256 #define TLS_ECDH_ECDSA_WITH_NULL_SHA 0xC001
257 
258 #define TLS_ECDH_ECDSA_WITH_RC4_128_SHA 0xC002
259 
260 #define TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC003
261 
262 #define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0xC004
263 
264 #define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0xC005
265 
266 #define TLS_ECDHE_ECDSA_WITH_NULL_SHA 0xC006
267 
268 #define TLS_ECDHE_ECDSA_WITH_RC4_128_SHA 0xC007
269 
270 #define TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC008
271 
272 #define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0xC009
273 
274 #define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0xC00A
275 
276 #define TLS_ECDH_RSA_WITH_NULL_SHA 0xC00B
277 
278 #define TLS_ECDH_RSA_WITH_RC4_128_SHA 0xC00C
279 
280 #define TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 0xC00D
281 
282 #define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 0xC00E
283 
284 #define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 0xC00F
285 
286 #define TLS_ECDHE_RSA_WITH_NULL_SHA 0xC010
287 
288 #define TLS_ECDHE_RSA_WITH_RC4_128_SHA 0xC011
289 
290 #define TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 0xC012
291 
292 #define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 0xC013
293 
294 #define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 0xC014
295 
296 #define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 0xC023
297 
298 #define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 0xC024
299 
300 #define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 0xC025
301 
302 #define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 0xC026
303 
304 #define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 0xC027
305 
306 #define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 0xC028
307 
308 #define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 0xC029
309 
310 #define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 0xC02A
311 
312 #define TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xC02B
313 
314 #define TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xC02C
315 
316 #define TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0xC02D
317 
318 #define TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0xC02E
319 
320 #define TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xC02F
321 
322 #define TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0xC030
323 
324 #define TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 0xC031
325 
326 #define TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 0xC032
327 
328 #define TLS_RSA_WITH_AES_128_CCM 0xC09C
329 
330 #define TLS_RSA_WITH_AES_256_CCM 0xC09D
331 
332 #define TLS_DHE_RSA_WITH_AES_128_CCM 0xC09E
333 
334 #define TLS_DHE_RSA_WITH_AES_256_CCM 0xC09F
335 
336 #define TLS_RSA_WITH_AES_128_CCM_8 0xC0A0
337 
338 #define TLS_RSA_WITH_AES_256_CCM_8 0xC0A1
339 
340 #define TLS_DHE_RSA_WITH_AES_128_CCM_8 0xC0A2
341 
342 #define TLS_DHE_RSA_WITH_AES_256_CCM_8 0xC0A3
343 
344 #define TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 0xCCA8
345 
346 #define TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 0xCCA9
347 
348 #define TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 0xCCAA
349 #if SHARKSSL_ENABLE_OLD_CHACHA20_POLY1305
350 
351 #define TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256_OLD 0xCC13
352 
353 #define TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256_OLD 0xCC14
354 
355 #define TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256_OLD 0xCC15
356 #endif
357  /* end group SharkSslCiphers */
359 
360 
368 #define SHARKSSL_PROTOCOL_UNKNOWN 0x00
369 
370 #define SHARKSSL_PROTOCOL_SSL_3_0 0x30
371 
372 #define SHARKSSL_PROTOCOL_TLS_1_0 0x31
373 
374 #define SHARKSSL_PROTOCOL_TLS_1_1 0x32
375 
376 #define SHARKSSL_PROTOCOL_TLS_1_2 0x33
377  /* end group SharkSslProtocol */
379 
380 
381 #if (SHARKSSL_ENABLE_RSA || SHARKSSL_ENABLE_ECDSA)
382 #ifndef BA_API /* standalone SharkSSL */
383 #define BA_API SHARKSSL_API
384 #ifdef _SHARKSSL_C_
385 #define SingleListCode 1
386 #endif
387 #endif
388 #include "SingleList.h"
389 #endif
390 
391 
392 #if SHARKSSL_ENABLE_SESSION_CACHE || SHARKSSL_NOPACK
393 
401 typedef struct SharkSslSession SharkSslSession;
402  /* end group SharkSslSessionApi */
404 
405 #ifndef _DOXYGEN
406 typedef struct SharkSslSessionCache
407 {
408  SharkSslSession *cache;
409  ThreadMutexBase cacheMutex;
410  U16 cacheSize;
411 } SharkSslSessionCache;
412 #endif
413 #endif
414 
415 
427 typedef enum
428 {
433  /* end group SharkSslInfoAndCodes */
435 
436 
437 #if (SHARKSSL_ENABLE_RSA || SHARKSSL_ENABLE_ECDSA)
438 
447 typedef const U8 *SharkSslCert;
448 
449 #ifdef __cplusplus
450 extern "C" {
451 #endif
452 
458 SHARKSSL_API U16 SharkSslCert_len(SharkSslCert cert);
459 
460 
461 #if SHARKSSL_ENABLE_CSR_CREATION
462 
524 SHARKSSL_API int
526  SharkSslKey privKey,
527  U8 hashID,
528  struct SharkSslCertDN* certDN,
529  const char *SAN,
530  struct SharkSslBitExtReq* keyUsage,
531  struct SharkSslBitExtReq* nsCertType);
532 #endif
533 
534 #if SHARKSSL_ENABLE_CSR_SIGNING
535 
595 SHARKSSL_API int
597  const U8 *csrData,
598  int csrDataLen,
599  const SharkSslCert caCert,
600  const SharkSslKey privKey,
601  const char *validFrom,
602  const char *validTo,
603  SharkCertSerialNumber serialNumber,
604  U8 hashID);
605 #endif
606 
607 #if SHARKSSL_ENABLE_ASN1_KEY_CREATION
608 
614 SHARKSSL_API int
615 SharkSslASN1Create_key(struct SharkSslASN1Create *o, const SharkSslKey key);
616 #endif
617 
618 
619 #ifdef __cplusplus
620 }
621 #endif
622 
623 
624 #if SHARKSSL_ENABLE_CA_LIST
625 
630 typedef const U8 *SharkSslCAList;
631 #endif
632  /* end group SharkSslInfoAndCodes */
634 #endif
635 
636 #if SHARKSSL_ENABLE_PSK || SHARKSSL_NOPACK
637 
645 typedef const U8 *SharkSslPSKTable;
646  /* end group SharkSslInfoAndCodes */
648 #endif
649 
650 #ifndef _DOXYGEN
651 struct SharkSsl;
652 #endif
653 
654 
655 /* Non documented API used by SharkSslSCMgr when used indirectly by
656  Lua code in the Barracuda Application Server. The code manages
657  automatic destruction of SharkSslSCMgr.
658  */
659 #ifndef _DOXYGEN
660 struct SharkSslIntf;
661 typedef void (*SharkSslIntf_Terminate)(struct SharkSslIntf* o,
662  struct SharkSsl* ssl);
663 typedef struct SharkSslIntf
664 {
665  SharkSslIntf_Terminate terminate;
666 } SharkSslIntf;
667 #define SharkSslIntf_constructor(o,terminateFunc) (o)->terminate=terminateFunc
668 #endif
669 
670 
692 typedef struct SharkSslCon SharkSslCon;
693 
694 
698 typedef struct
699 SharkSsl
700 {
701 #ifdef __cplusplus
702  void *operator new(size_t s) { return ::baMalloc(s); }
703  void operator delete(void* d) { if(d) ::baFree(d); }
704  void *operator new(size_t, void *place) { return place; }
705  void operator delete(void*, void *) { }
706 
707  SharkSsl() {};
708 
709  SharkSsl(SharkSsl_Role role,
710  U16 cacheSize = 0,
711  U16 inBufStartSize = 4096,
712  U16 outBufSize = 4096
713  );
714 
715  ~SharkSsl();
716  SharkSslCon *createCon(void);
717  U8 setCAList(SharkSslCAList caList);
718  U8 addCertificate(SharkSslCert cert);
719  void terminateCon(SharkSslCon *sslCon);
720 #endif
721  #if (SHARKSSL_SSL_SERVER_CODE && SHARKSSL_SSL_CLIENT_CODE) || SHARKSSL_NOPACK
722  SharkSsl_Role role;
723  #endif
724  U16 outBufSize;
725  U16 inBufStartSize;
726  U16 nCon;
727  #if (SHARKSSL_ENABLE_RSA || (SHARKSSL_ENABLE_ECDSA)) || SHARKSSL_NOPACK
728  SingleList certList;
729  #if SHARKSSL_ENABLE_CA_LIST || SHARKSSL_NOPACK
730  SharkSslCAList caList;
731  #endif
732  #endif
733  #if SHARKSSL_ENABLE_PSK || SHARKSSL_NOPACK
734  SharkSslPSKTable tablePSK;
735  #endif
736  #if SHARKSSL_ENABLE_SESSION_CACHE || SHARKSSL_NOPACK
737  SharkSslSessionCache sessionCache;
738  /* Reserved for use with one SharkSslSCMgr object */
739  SharkSslIntf* intf;
740  #endif
742  /* end group SharkSslInfoAndCodes */
744 
751 typedef enum
752 {
756 
760 
771 
784 
797 
811 
820 
832 
838 
845 
849 
851  /* end group SharkSslCoreApi */
853 
854 #if (SHARKSSL_ENABLE_RSA || SHARKSSL_ENABLE_ECDSA)
855 
867 #if SHARKSSL_ENABLE_CERT_KEYUSAGE
868 #define SHARKSSL_CERT_KEYUSAGE_DIGITALSIGNATURE 0x00000001
869 #define SHARKSSL_CERT_KEYUSAGE_NONREPUDIATION 0x00000002
870 #define SHARKSSL_CERT_KEYUSAGE_KEYENCIPHERMENT 0x00000004
871 #define SHARKSSL_CERT_KEYUSAGE_DATAENCIPHERMENT 0x00000008
872 #define SHARKSSL_CERT_KEYUSAGE_KEYAGREEMENT 0x00000010
873 #define SHARKSSL_CERT_KEYUSAGE_KEYCERTSIGN 0x00000020
874 #define SHARKSSL_CERT_KEYUSAGE_CRLSIGN 0x00000040
875 #define SHARKSSL_CERT_KEYUSAGE_ENCIPHERONLY 0x00000080
876 #define SHARKSSL_CERT_KEYUSAGE_DECIPHERONLY 0x00000100
877 #define SHARKSSL_CERT_KEYUSAGE_PRESENT 0x00000200
878 #define SHARKSSL_CERT_KEYUSAGE_CRITICAL 0x00000400
879 
880 #define SHARKSSL_CERT_KEYPURPOSE_SERVERAUTH 0x00010000
881 #define SHARKSSL_CERT_KEYPURPOSE_CLIENTAUTH 0x00020000
882 #define SHARKSSL_CERT_KEYPURPOSE_CODESIGNING 0x00040000
883 #define SHARKSSL_CERT_KEYPURPOSE_EMAILPROTECTION 0x00080000
884 #define SHARKSSL_CERT_KEYPURPOSE_TIMESTAMPING 0x00100000
885 #define SHARKSSL_CERT_KEYPURPOSE_OCSPSIGNING 0x00200000
886 
887 #define SharkSslCertInfo_KeyFlagSet(o,f) ((o)->keyUsagePurposes & f)
888 
892 #define SharkSslCertInfo_isKeyUsagePresent(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_PRESENT)
893 #define SharkSslCertInfo_isKeyUsageCritical(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_CRITICAL)
894 #define SharkSslCertInfo_KU_digitalSignature(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_DIGITALSIGNATURE)
895 #define SharkSslCertInfo_KU_nonRepudiation(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_NONREPUDIATION)
896 #define SharkSslCertInfo_KU_keyEncipherment(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_KEYENCIPHERMENT)
897 #define SharkSslCertInfo_KU_dataEncipherment(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_DATAENCIPHERMENT)
898 #define SharkSslCertInfo_KU_keyAgreement(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_KEYAGREEMENT)
899 #define SharkSslCertInfo_KU_keyCertSign(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_KEYCERTSIGN)
900 #define SharkSslCertInfo_KU_cRLSign(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_CRLSIGN)
901 #define SharkSslCertInfo_KU_encipherOnly(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_ENCIPHERONLY)
902 #define SharkSslCertInfo_KU_decipherOnly(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYUSAGE_DECIPHERONLY)
903 
904 #define SharkSslCertInfo_kp_serverAuth(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYPURPOSE_SERVERAUTH)
905 #define SharkSslCertInfo_kp_clientAuth(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYPURPOSE_CLIENTAUTH)
906 #define SharkSslCertInfo_kp_codeSigning(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYPURPOSE_CODESIGNING)
907 #define SharkSslCertInfo_kp_emailProtection(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYPURPOSE_EMAILPROTECTION)
908 #define SharkSslCertInfo_kp_timeStamping(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYPURPOSE_TIMESTAMPING)
909 #define SharkSslCertInfo_kp_OCSPSigning(o) SharkSslCertInfo_KeyFlagSet(o, SHARKSSL_CERT_KEYPURPOSE_OCSPSIGNING)
910 #endif
911 
912 
924 typedef struct SharkSslCertDN
925 {
926  const U8 *countryName;
927  const U8 *province;
928  const U8 *locality;
929  const U8 *organization;
930  const U8 *unit;
934  const U8 *commonName;
935  const U8 *emailAddress;
936 
937  U8 countryNameLen;
941  U8 unitLen;
945 
946 #define SharkSslCertDN_constructor(o) memset(o,0,sizeof(SharkSslCertDN))
947 
948 #define SharkSslCertDN_setCountryName(o, countryNameMA) \
949  (o)->countryName=(const U8*)countryNameMA,(o)->countryNameLen=(U8)strlen(countryNameMA)
950 #define SharkSslCertDN_setProvince(o, provinceMA) \
951  (o)->province=(const U8*)provinceMA,(o)->provinceLen=(U8)strlen(provinceMA)
952 #define SharkSslCertDN_setLocality(o, localityMA) \
953  (o)->locality=(const U8*)localityMA,(o)->localityLen=(U8)strlen(localityMA)
954 #define SharkSslCertDN_setOrganization(o, organizationMA) \
955  (o)->organization=(const U8*)organizationMA,(o)->organizationLen=(U8)strlen(organizationMA)
956 #define SharkSslCertDN_setUnit(o, unitMA) \
957  (o)->unit=(const U8*)unitMA,(o)->unitLen=(U8)strlen(unitMA)
958 #define SharkSslCertDN_setCommonName(o, commonNameMA) \
959  (o)->commonName=(const U8*)commonNameMA,(o)->commonNameLen=(U8)strlen(commonNameMA)
960 #define SharkSslCertDN_setEmailAddress(o, emailAddressMA) \
961  (o)->emailAddress=(const U8*)emailAddressMA,(o)->emailAddressLen=(U8)strlen(emailAddressMA)
962 
963 
967 typedef struct SharkSslCertInfo
968 {
970  U16 snLen;
971 
975  U8 version;
976 
980  U8 CAflag;
981 
984  U8 *sn;
985 
988  U8 *timeFrom;
989 
992  U8 *timeTo;
993 
999 
1005 
1018  U16 subjectAltNamesLen;
1019 
1020  #if SHARKSSL_ENABLE_CERT_KEYUSAGE
1021 
1043  U32 keyUsagePurposes;
1044  #endif
1045 
1051  /* end group SharkSslCertInfo */
1053 #endif
1054 
1060 #ifdef __cplusplus
1061 extern "C" {
1062 #endif
1063 
1091 SHARKSSL_API void SharkSsl_constructor(
1092  SharkSsl *o,
1093  SharkSsl_Role role,
1094  U16 cacheSize,
1095  U16 inBufStartSize,
1096  U16 outBufSize
1097  );
1098 
1106 SHARKSSL_API void SharkSsl_destructor(SharkSsl *o);
1107 
1108 
1129 
1130 
1146 
1147 
1148 #if SHARKSSL_ENABLE_SESSION_CACHE
1149 
1154 SHARKSSL_API U16 SharkSsl_getCacheSize(SharkSsl *o);
1155 
1156 #define SharkSsl_setIntf(o, sharkSslIntf) (o)->intf=sharkSslIntf
1157 #define SharkSsl_getIntf(o) (o)->intf
1158 
1159 #endif
1160 
1161 
1168 #define SharkSslCon_terminate(o) SharkSsl_terminateCon(0, o)
1192 
1193 
1219 
1220 
1225 
1226 
1244 
1245 
1256 
1268 
1269 
1284 
1315 U16 SharkSslCon_copyDecData(SharkSslCon *o, U8 *buf, U16 maxLen);
1316 
1317 
1327 SHARKSSL_API U16 SharkSslCon_getDecData(SharkSslCon *o, U8 **bufPtr);
1328 
1329 
1342 
1343 
1357 
1358 
1369 
1370 
1383 
1384 
1392 
1393 
1397 
1398 
1409 
1410 
1421 
1422 
1432 #define SharkSslCon_getAlertData(o) SharkSslCon_getEncData(o)
1434 
1444 #define SharkSslCon_getAlertDataLen(o) SharkSslCon_getEncDataLen(o)
1445  /* end group SharkSslCoreApi */
1447 
1448 #if SHARKSSL_ENABLE_INFO_API
1449 
1453 
1457 
1458 #endif
1459 
1460 #if SHARKSSL_ENABLE_SNI
1461 
1462 #if SHARKSSL_SSL_CLIENT_CODE
1463 
1465 SHARKSSL_API U8 SharkSslCon_setSNI(SharkSslCon *o, const char *name, U16 length);
1466 #endif
1467 
1468 #endif
1469 
1470 
1471 #if (SHARKSSL_ENABLE_RSA || SHARKSSL_ENABLE_ECDSA)
1472 #if (SHARKSSL_SSL_CLIENT_CODE && SHARKSSL_ENABLE_CLIENT_AUTH)
1473 
1477 #endif
1478 
1487 
1488 
1500 
1501 #if SHARKSSL_ENABLE_CA_LIST
1502 
1523 SHARKSSL_API U8 SharkSsl_setCAList(SharkSsl *o, SharkSslCAList caList);
1524 
1538 
1539 U8 SharkSslCon_isCAListEmpty(SharkSslCon *o);
1540 #endif /* SHARKSSL_ENABLE_CA_LIST */
1541 
1542 #if (SHARKSSL_SSL_SERVER_CODE && SHARKSSL_ENABLE_RSA)
1543 
1546 /* to be used as 'flag' param */
1547 #define SHARKSSL_SET_FAVOR_RSA 1
1548 #define SHARKSSL_CLEAR_FAVOR_RSA 0
1549 
1568 #endif /* SHARKSSL_SSL_SERVER_CODE */
1569 #endif /* SHARKSSL_ENABLE_RSA || SHARKSSL_ENABLE_ECDSA */
1570 
1571 #if SHARKSSL_ENABLE_PSK
1572 
1574 SHARKSSL_API U8 SharkSsl_setPSKTable(SharkSsl *o, SharkSslPSKTable tablePSK);
1575 #endif /* SHARKSSL_ENABLE_PSK */
1576 
1577 #if SHARKSSL_SSL_CLIENT_CODE
1578 U8 SharkSslCon_selectProtocol(SharkSslCon *o, U8 protocol);
1579 #endif
1580 
1585 #if SHARKSSL_ENABLE_SESSION_CACHE
1586 
1590 
1591 #if SHARKSSL_SSL_SERVER_CODE
1592 
1595 #endif
1596 
1597 #if SHARKSSL_SSL_CLIENT_CODE
1598 
1607 
1608 
1616 
1622 #endif
1623 #endif
1624  /* end group SharkSslSessionApi */
1626 
1627 #if (SHARKSSL_SSL_SERVER_CODE && SHARKSSL_ENABLE_CLIENT_AUTH && \
1628  (SHARKSSL_ENABLE_RSA || SHARKSSL_ENABLE_ECDSA))
1629 
1661  SharkSslCon *o, const void *caList);
1662 #endif
1663 
1664 #if ((SHARKSSL_SSL_SERVER_CODE || SHARKSSL_SSL_CLIENT_CODE) && \
1665  SHARKSSL_ENABLE_SELECT_CIPHERSUITE)
1666 
1695 SHARKSSL_API U8 SharkSslCon_selectCiphersuite(SharkSslCon *o, U16 cipherSuite);
1696 
1700 #endif
1701 
1702 #if (SHARKSSL_SSL_SERVER_CODE && SHARKSSL_ENABLE_SECURE_RENEGOTIATION)
1703 
1723 #endif
1724  /* end group SharkSslApi */
1726 
1727 
1728 #if SHARKSSL_ENABLE_PEM_API
1729 
1736 typedef enum
1737 {
1740 
1743 
1746 
1749 
1752 
1755 
1758 
1761 
1764 
1767 
1770 
1773 
1776 
1779 
1782 
1785 
1788 
1791 
1795 
1796 
1826  const char *certPEM, const char *keyPEM,
1827  const char *passphrase, SharkSslCert *sharkSslCert);
1828 
1829 #if SHARKSSL_ENABLE_ENCRYPTED_PKCS8_SUPPORT
1830 
1833 SHARKSSL_API int sharkssl_PEM_PBKDF2(
1834  U8 *dk, const char *passphrase,
1835  const char *salt, U32 saltLen,
1836  U32 iterations, U16 dkLen, U8 hashID);
1837 #endif
1838  /* end group RayCryptoApi */
1840 #endif
1841 
1842 #if SHARKSSL_ENABLE_RSA
1843 
1850 #define SHARKSSL_RSA_NO_PADDING 0
1852 
1856 #define SHARKSSL_RSA_PKCS1_PADDING 1
1858 
1863 typedef enum
1864 {
1867 
1870 
1873 
1876 
1879 
1882 
1885 
1888 
1892 #endif
1893  /* end group SharkSslInfoAndCodes */
1895 
1896 #if SHARKSSL_ENABLE_RSA_API
1897 
1908 typedef U8* SharkSslRSAKey;
1909 
1910 #if SHARKSSL_ENABLE_PEM_API
1911 
1935  const char *PEMKey, const char *passphrase);
1936 
1960 SHARKSSL_API SharkSslKey
1961 sharkssl_PEM_extractPublicKey(const char *certPEM);
1962 
1963 SHARKSSL_API SharkSslKey
1964 sharkssl_PEM_extractPublicKey_ext(const char *certPEM, U8 *keyType);
1965 #endif /* SHARKSSL_ENABLE_PEM_API */
1966 
1967 #if (SHARKSSL_ENABLE_PEM_API || (SHARKSSL_ENABLE_RSA && SHARKSSL_ENABLE_RSAKEY_CREATE))
1968 
1971 SHARKSSL_API void SharkSslRSAKey_free(SharkSslRSAKey key);
1972 #define _SHARKSSLRSAKEY_FREE 1
1973 #endif
1974 
1975 #if SHARKSSL_ENABLE_RSA
1976 #if SHARKSSL_ENABLE_RSAKEY_CREATE
1977 
1998 SHARKSSL_API int SharkSslRSAKey_create(SharkSslRSAKey *privKey, U16 keyLength);
1999 
2013 SHARKSSL_API U8 *SharkSslRSAKey_getPublic(SharkSslRSAKey privKey);
2014 #endif
2015 
2020 SHARKSSL_API U16 SharkSslRSAKey_size(SharkSslRSAKey key);
2021 
2045  U16 len, U8 *in, U8 *out, SharkSslRSAKey key, U8 padding);
2046 
2047 
2066  U16 len, U8 *in, U8 *out, SharkSslRSAKey privkey, U8 padding);
2067 
2068 
2069 #if SHARKSSL_ENABLE_RSA_OAEP
2070 #if (!SHARKSSL_USE_SHA1)
2071 #error SHARKSSL_USE_SHA1 must be selected when SHARKSSL_ENABLE_RSA_OAEP is enabled
2072 #endif
2073 
2097 SHARKSSL_API sharkssl_RSA_RetVal sharkssl_RSA_private_decrypt_OAEP(
2098  U16 len, U8 *in, U8 *out, SharkSslRSAKey privkey, U8 hashID, char *label, U16 labelLen);
2099 #endif
2100 
2101 
2123  U16 len, U8 *in, U8 *out, SharkSslRSAKey privkey, U8 padding);
2124 
2125 
2146  U16 len, U8 *in, U8 *out, SharkSslRSAKey key, U8 padding);
2147 
2148 #endif
2149  /* end group RSA */
2151 #endif
2152 
2153 
2166 #if SHARKSSL_USE_ECC
2167 
2168 /*
2169  * NamedCurve, use as curveID parameter
2170  * SECPxxxR1 - RFC 4492 section 5.1.1
2171  * BRAINPOOLPxxxR1 - RFC 7027 section 2
2172  */
2173 #define SHARKSSL_EC_CURVE_ID_SECP192R1 19
2174 #define SHARKSSL_EC_CURVE_ID_SECP224R1 21
2175 #define SHARKSSL_EC_CURVE_ID_SECP256R1 23
2176 #define SHARKSSL_EC_CURVE_ID_SECP384R1 24
2177 #define SHARKSSL_EC_CURVE_ID_SECP521R1 25
2178 #define SHARKSSL_EC_CURVE_ID_BRAINPOOLP256R1 26
2179 #define SHARKSSL_EC_CURVE_ID_BRAINPOOLP384R1 27
2180 #define SHARKSSL_EC_CURVE_ID_BRAINPOOLP512R1 28
2181 
2182 
2189 typedef U8* SharkSslECCKey;
2190 
2191 #if SHARKSSL_ENABLE_PEM_API
2192 
2218  const char *PEMKey, const char *passphrase);
2219 
2220 
2221 #if (SHARKSSL_ENABLE_RSA || SHARKSSL_ENABLE_ECDSA)
2222 
2229 SHARKSSL_API U16 SharkSslKey_vectSize(const SharkSslKey key);
2230 #define SharkSslCert_vectSize(c) SharkSslKey_vectSize((const SharkSslCert)c)
2231 #if SHARKSSL_ENABLE_RSA
2232 #define SharkSslRSAKey_vectSize(k) SharkSslKey_vectSize(k)
2233 #endif
2234 #if SHARKSSL_ENABLE_ECDSA
2235 #define SharkSslECCKey_vectSize(k) SharkSslKey_vectSize(k)
2236 #endif
2237 #endif
2238 #endif
2239 
2240 
2241 #if SHARKSSL_ENABLE_ECCKEY_CREATE
2242 
2290 SHARKSSL_API int SharkSslECCKey_create(SharkSslECCKey *privKey, U16 curveID);
2291 #endif
2292 
2293 
2294 #if (SHARKSSL_ENABLE_PEM_API || SHARKSSL_ENABLE_ECCKEY_CREATE)
2295 
2300 SHARKSSL_API void SharkSslECCKey_free(SharkSslECCKey key);
2301 #define _SHARKSSLECCKEY_FREE 1
2302 #endif
2303 
2304 
2305 /*
2306  *-----------------------------------------------------------------------------
2307  * To free up the memory allocated by SharkSslECCKey_create and
2308  * SharkSslRSAKey_create, the following macro is provided
2309  * For instance, this function could be called after saving the key to a file
2310  *-----------------------------------------------------------------------------
2311  * key: input parameter, points to a buffer allocated by either
2312  * SharkSslECCKey_create or SharkSslRSAKey_create
2313  */
2314 #if defined(_SHARKSSLRSAKEY_FREE)
2315 #define SharkSslKey_free SharkSslRSAKey_free
2316 #elif defined (_SHARKSSLECCKEY_FREE)
2317 #define SharkSslKey_free SharkSslECCKey_free
2318 #else
2319 #define SharkSslKey_free
2320 #endif
2321 #undef _SHARKSSLRSAKEY_FREE
2322 #undef _SHARKSSLECCKEY_FREE
2323 
2324 
2330 #if (SHARKSSL_ENABLE_ECDSA && SHARKSSL_ENABLE_ECDSA_API)
2331 
2334 typedef enum
2335 {
2338 
2341 
2344 
2347 
2350 
2353 
2356 
2359 
2362 
2366  /* end group SharkSslInfoAndCodes */
2368 
2374 #if (!SHARKSSL_ECDSA_ONLY_VERIFY)
2375 
2383 SHARKSSL_API U16 sharkssl_ECDSA_siglen(SharkSslECCKey privkey);
2384 
2408  SharkSslECCKey privkey, U8 *sig, U16 *siglen, U8 *hash, U8 hashlen);
2409 #endif
2410 
2429  SharkSslECCKey pubkey, U8 *sig, U16 siglen, U8 *hash, U8 hashlen);
2430 
2431 #endif
2432  /* end group ECC */
2434 #endif
2435 
2436 
2437 #if (SHARKSSL_ENABLE_CA_LIST && SHARKSSL_ENABLE_CERTSTORE_API)
2438 
2444 #ifndef BA_API /* standalone SharkSSL */
2445 #define BA_API SHARKSSL_API
2446 typedef U8 BaBool;
2447 #endif
2448 #include "DoubleList.h"
2449 
2453 typedef struct SharkSslCertStore
2454 {
2455  DoubleList certList;
2456  SharkSslCAList caList;
2457  U16 elements; /* number of elements in list */
2459 
2469 
2473 
2475 #define SharkSslCertStore_release(o) SharkSslCertStore_destructor(o)
2489 SHARKSSL_API U16 SharkSslCertStore_add(
2490  SharkSslCertStore *o, const char *cert, U32 certlen);
2491 
2503  SharkSslCertStore *o, SharkSslCAList *outList);
2504  /* end group SharkSslCertApi */
2506 #endif /* SHARKSSL_ENABLE_CA_LIST && SHARKSSL_ENABLE_CERTSTORE_API */
2507 
2508 #if ((SHARKSSL_ENABLE_PEM_API) || (SHARKSSL_ENABLE_CERTSTORE_API))
2509 SHARKSSL_API U32 sharkssl_B64Decode(
2510  U8 *outStr, U32 outStrSize, const char *b64beg, const char *b64end);
2511 #endif
2512 
2513 
2514 
2515 #ifdef __cplusplus
2516 }
2517 
2518 inline SharkSsl::SharkSsl(
2519  SharkSsl_Role role, U16 cacheSize, U16 inBufStartSize, U16 outBufSize) {
2520  SharkSsl_constructor(this, role, cacheSize, inBufStartSize, outBufSize);
2521 }
2522 inline SharkSsl::~SharkSsl() {
2523  SharkSsl_destructor(this);
2524 }
2525 inline SharkSslCon *SharkSsl::createCon(void) {
2526  return SharkSsl_createCon(this);
2527 }
2528 inline void SharkSsl::terminateCon(SharkSslCon *sslCon) {
2529  SharkSsl_terminateCon(this, sslCon);
2530 }
2531 
2532 #if (SHARKSSL_ENABLE_RSA || SHARKSSL_ENABLE_ECDSA)
2533 inline U8 SharkSsl::addCertificate(SharkSslCert cert) {
2534  return SharkSsl_addCertificate(this, cert);
2535 }
2536 #if SHARKSSL_ENABLE_CA_LIST
2537 inline U8 SharkSsl::setCAList(SharkSslCAList caList) {
2538  return SharkSsl_setCAList(this, caList);
2539 }
2540 #endif /* SHARKSSL_ENABLE_CA_LIST */
2541 #endif /* SHARKSSL_ENABLE_RSA || SHARKSSL_ENABLE_ECDSA */
2542 
2543 #if SHARKSSL_ENABLE_PSK
2544 inline U8 SharkSsl::setPSKTable(SharkSslPSKTable tablePSK) {
2545  return SharkSsl_setPSKTable(this, tablePSK);
2546 }
2547 #endif /* SHARKSSL_ENABLE_PSK */
2548 
2549 #endif /* __cplusplus */
2550 
2551 
2552 #endif
SharkSslASN1Create_key
SHARKSSL_API int SharkSslASN1Create_key(struct SharkSslASN1Create *o, const SharkSslKey key)
Convert a SharkSslKey to ASN.1 representation.
SHARKSSL_ECDSA_OK
@ SHARKSSL_ECDSA_OK
OK.
Definition: SharkSSL.h:2337
SharkSslCon_AllocationError
@ SharkSslCon_AllocationError
The memory pool is too small.
Definition: SharkSSL.h:759
SharkSslCertStore
SharkSslCertStore is a container object used when assembling a SharkSslCAList.
Definition: SharkSSL.h:2454
SharkSslCon_getProtocol
SHARKSSL_API U8 SharkSslCon_getProtocol(SharkSslCon *o)
Returns the active session's protocol version.
SHARKSSL_PEM_OK
@ SHARKSSL_PEM_OK
OK.
Definition: SharkSSL.h:1739
SharkSslCertDN::commonNameLen
U8 commonNameLen
length in bytes of the field "unit"
Definition: SharkSSL.h:942
SHARKSSL_PEM_OK_PUBLIC
@ SHARKSSL_PEM_OK_PUBLIC
OK_PUBLIC.
Definition: SharkSSL.h:1742
SharkSslRSAKey_create
SHARKSSL_API int SharkSslRSAKey_create(SharkSslRSAKey *privKey, U16 keyLength)
SHARKSSL_PEM_KEY_WRONG_LENGTH
@ SHARKSSL_PEM_KEY_WRONG_LENGTH
KEY_WRONG_LENGTH.
Definition: SharkSSL.h:1754
SharkSslCon_getEncData
U8 * SharkSslCon_getEncData(SharkSslCon *o)
This function is used in conjunction with state SharkSslCon_Encrypted returned by function SharkSslCo...
sharkssl_PEM_extractPublicKey
SHARKSSL_API SharkSslKey sharkssl_PEM_extractPublicKey(const char *certPEM)
Extract the public key form a certificate in PEM format.
SharkSslASN1Create_CSR
SHARKSSL_API int SharkSslASN1Create_CSR(struct SharkSslASN1Create *o, SharkSslKey privKey, U8 hashID, struct SharkSslCertDN *certDN, const char *SAN, struct SharkSslBitExtReq *keyUsage, struct SharkSslBitExtReq *nsCertType)
SharkSsl_createCon
SharkSslCon * SharkSsl_createCon(SharkSsl *o)
Create a SharkSslCon object.
SharkSslCertDN
Certificate KeyUsage and ExtendedKeyUsage flags and relative pseudofunctions.
Definition: SharkSSL.h:925
SharkSslCertInfo::timeTo
U8 * timeTo
Certificate expiration date (in UTCTime format: YYMMDDHHMMSSZ)
Definition: SharkSSL.h:992
SHARKSSL_PEM_KEY_UNSUPPORTED_EXPONENT_LENGTH
@ SHARKSSL_PEM_KEY_UNSUPPORTED_EXPONENT_LENGTH
KEY_UNSUPPORTED_EXPONENT_LENGTH.
Definition: SharkSSL.h:1769
SharkSslKey_vectSize
SHARKSSL_API U16 SharkSslKey_vectSize(const SharkSslKey key)
SHARKSSL_PEM_KEY_CERT_MISMATCH
@ SHARKSSL_PEM_KEY_CERT_MISMATCH
KEY_CERT_MISMATCH.
Definition: SharkSSL.h:1775
SharkSslCon_releaseSession
SHARKSSL_API U8 SharkSslCon_releaseSession(SharkSslCon *o)
experimental
SharkSslCon_trustedCA
SHARKSSL_API U8 SharkSslCon_trustedCA(SharkSslCon *o)
Returns TRUE if the certificate is valid and is signed with a root certificate trusted by SharkSSL.
SharkSslRSAKey_size
SHARKSSL_API U16 SharkSslRSAKey_size(SharkSslRSAKey key)
SharkSslRSAKey_free
SHARKSSL_API void SharkSslRSAKey_free(SharkSslRSAKey key)
Release a SharkSslRSAKey allocated by functions sharkssl_PEM_to_RSAKey and sharkssl_PEM_extractPublic...
SharkSslCon_getHandshakeDataLen
U16 SharkSslCon_getHandshakeDataLen(SharkSslCon *o)
This function is used in conjunction with state SharkSslCon_Handshake returned by function SharkSslCo...
sharkssl_RSA_public_decrypt
SHARKSSL_API sharkssl_RSA_RetVal sharkssl_RSA_public_decrypt(U16 len, U8 *in, U8 *out, SharkSslRSAKey key, U8 padding)
Bring back a message digest using the public key or private key.
SHARKSSL_PEM_KEY_UNRECOGNIZED_FORMAT
@ SHARKSSL_PEM_KEY_UNRECOGNIZED_FORMAT
KEY_UNRECOGNIZED_FORMAT.
Definition: SharkSSL.h:1760
SharkSslCertStore_assemble
SHARKSSL_API U8 SharkSslCertStore_assemble(SharkSslCertStore *o, SharkSslCAList *outList)
Assemble all certificates added by calling SharkSslCertStore_add.
SHARKSSL_PEM_KEY_PARSE_ERROR
@ SHARKSSL_PEM_KEY_PARSE_ERROR
KEY_PARSE_ERROR.
Definition: SharkSSL.h:1748
SharkSslCon_NeedMoreData
@ SharkSslCon_NeedMoreData
Returned when SharkSSL holds an incomplete SSL/TLS record or when the connection is initially establi...
Definition: SharkSSL.h:796
SharkSslCert
const U8 * SharkSslCert
The SharkSSL Certificate is in a binary format optimized for speed and size.
Definition: SharkSSL.h:447
SharkSsl_Server
@ SharkSsl_Server
Definition: SharkSSL.h:430
SharkSslSession_release
SHARKSSL_API U8 SharkSslSession_release(SharkSslSession *o, SharkSsl *s)
Release a session created by function SharkSslCon_acquireSession.
SHARKSSL_PEM_KEY_PASSPHRASE_REQUIRED
@ SHARKSSL_PEM_KEY_PASSPHRASE_REQUIRED
KEY_PASSPHRASE_REQUIRED.
Definition: SharkSSL.h:1757
SHARKSSL_ECDSA_WRONG_SIGNATURE
@ SHARKSSL_ECDSA_WRONG_SIGNATURE
WRONG SIGNATURE.
Definition: SharkSSL.h:2364
SharkSslRSAKey
U8 * SharkSslRSAKey
SharkSslRSAKey is an alias for the SharkSslCert type and is a private/public key converted by sharkss...
Definition: SharkSSL.h:1908
SharkSslCon_decrypt
SharkSslCon_RetVal SharkSslCon_decrypt(SharkSslCon *o, U16 readLen)
Decrypt the received data copied into the SharkSslCon receive buffer (the buffer returned by SharkSsl...
SharkSslCon_encrypt
SharkSslCon_RetVal SharkSslCon_encrypt(SharkSslCon *o, U8 *buf, U16 maxLen)
Encrypt the data provided by parameter 'buf' or encrypt data in the SharkSslCon send buffer.
SharkSslCertInfo::subjectAltNamesPtr
U8 * subjectAltNamesPtr
Subject Alternative Names subjectAltNamesPtr is a pointer to an ASN1 sequence, whose length is subjec...
Definition: SharkSSL.h:1017
SharkSslCon_Handshake
@ SharkSslCon_Handshake
Returned when an SSL/TLS handshake message has been received or is to be sent.
Definition: SharkSSL.h:783
SHARKSSL_ECDSA_ALLOCATION_ERROR
@ SHARKSSL_ECDSA_ALLOCATION_ERROR
ALLOCATION_ERROR.
Definition: SharkSSL.h:2340
SharkSslCert_signCSR
SHARKSSL_API int SharkSslCert_signCSR(SharkSslCert *signedCSR, const U8 *csrData, int csrDataLen, const SharkSslCert caCert, const SharkSslKey privKey, const char *validFrom, const char *validTo, SharkCertSerialNumber serialNumber, U8 hashID)
SHARKSSL_PEM_ALLOCATION_ERROR
@ SHARKSSL_PEM_ALLOCATION_ERROR
ALLOCATION_ERROR.
Definition: SharkSSL.h:1745
SHARKSSL_PEM_KEY_PRIVATE_KEY_REQUIRED
@ SHARKSSL_PEM_KEY_PRIVATE_KEY_REQUIRED
A PRIVATE KEY IS REQUIRED.
Definition: SharkSSL.h:1790
SharkSslCertInfo
The peer's certificate information returned by SharkSslCon_getCertInfo.
Definition: SharkSSL.h:968
SharkSslCon_encryptMore
U8 SharkSslCon_encryptMore(SharkSslCon *o)
This function is used in conjunction with state SharkSslCon_Encrypted returned by function SharkSslCo...
SharkSslCertInfo::sn
U8 * sn
Binary serial number.
Definition: SharkSSL.h:984
SharkSslRSAKey_getPublic
SHARKSSL_API U8 * SharkSslRSAKey_getPublic(SharkSslRSAKey privKey)
SharkSsl_Client
@ SharkSsl_Client
Definition: SharkSSL.h:431
SHARKSSL_ECDSA_WRONG_KEY_FORMAT
@ SHARKSSL_ECDSA_WRONG_KEY_FORMAT
WRONG_KEY_FORMAT.
Definition: SharkSSL.h:2349
SharkSslCon_acquireSession
SHARKSSL_API SharkSslSession * SharkSslCon_acquireSession(SharkSslCon *o)
Request a SharkSslSession object from the client's session pool.
SharkSslCon_renegotiate
SHARKSSL_API U8 SharkSslCon_renegotiate(SharkSslCon *o)
This function enables you to renegotiate an already established SSL/TLS connection.
SHARKSSL_PEM_KEY_UNSUPPORTED_ENCRYPTION_TYPE
@ SHARKSSL_PEM_KEY_UNSUPPORTED_ENCRYPTION_TYPE
KEY_UNSUPPORTED_ENCRYPTION_TYPE.
Definition: SharkSSL.h:1772
SHARKSSL_PEM_INTERNAL_ERROR
@ SHARKSSL_PEM_INTERNAL_ERROR
INTERNAL ERROR.
Definition: SharkSSL.h:1793
SharkSslCon
struct SharkSslCon SharkSslCon
SharkSslCon is an opaque handle returned by function SharkSsl_createCon.
Definition: SharkSSL.h:692
SHARKSSL_ECDSA_KEY_NOT_PRIVATE
@ SHARKSSL_ECDSA_KEY_NOT_PRIVATE
KEY_IS_NOT_PRIVATE.
Definition: SharkSSL.h:2352
sharkssl_RSA_private_decrypt
SHARKSSL_API sharkssl_RSA_RetVal sharkssl_RSA_private_decrypt(U16 len, U8 *in, U8 *out, SharkSslRSAKey privkey, U8 padding)
Decrypt ciphertext using the private key.
SharkSslCon_Certificate
@ SharkSslCon_Certificate
Returned by function SharkSslCon_encrypt if SHARKSSL_ENABLE_CLONE_CERTINFO is disabled and when a com...
Definition: SharkSSL.h:844
SharkSsl_constructor
SHARKSSL_API void SharkSsl_constructor(SharkSsl *o, SharkSsl_Role role, U16 cacheSize, U16 inBufStartSize, U16 outBufSize)
A SharkSsl object is the coordinator for managing SharkSslCon objects.
sharkssl_ECDSA_verify_hash
SHARKSSL_API sharkssl_ECDSA_RetVal sharkssl_ECDSA_verify_hash(SharkSslECCKey pubkey, U8 *sig, U16 siglen, U8 *hash, U8 hashlen)
Verify a message using the ECC public key and a hash algorithm.
SharkSslCon_decryptMore
U8 SharkSslCon_decryptMore(SharkSslCon *o)
This function is used in conjunction with state SharkSslCon_Decrypted returned by function SharkSslCo...
sharkssl_PEM_to_RSAKey
SHARKSSL_API SharkSslRSAKey sharkssl_PEM_to_RSAKey(const char *PEMKey, const char *passphrase)
Convert an RSA private or public key in PEM format to the SharkSslRSAKey format.
SharkSslCon_Encrypted
@ SharkSslCon_Encrypted
SharkSSL has successfully decrypted a chunk of data.
Definition: SharkSSL.h:831
sharkssl_PEM_RetVal
sharkssl_PEM_RetVal
Return values from function sharkssl_PEM.
Definition: SharkSSL.h:1737
SharkSsl_addCertificate
SHARKSSL_API U8 SharkSsl_addCertificate(SharkSsl *o, SharkSslCert cert)
Add a certificate to the SharkSsl object.
SharkSslCon_CertificateError
@ SharkSslCon_CertificateError
Unrecognized format of a provided certificate.
Definition: SharkSSL.h:848
SharkSslCertDN::organization
const U8 * organization
Organization Name (company or department)
Definition: SharkSSL.h:929
SharkSslSession_getLatestAccessTime
SHARKSSL_API U32 SharkSslSession_getLatestAccessTime(SharkSslSession *o)
Returns the last time the session was accessed.
sharkssl_PEM_to_ECCKey
SHARKSSL_API SharkSslECCKey sharkssl_PEM_to_ECCKey(const char *PEMKey, const char *passphrase)
SharkSslCertDN::provinceLen
U8 provinceLen
length in bytes of the field "country"
Definition: SharkSSL.h:938
SHARKSSL_PEM_KEY_UNSUPPORTED_MODULUS_LENGTH
@ SHARKSSL_PEM_KEY_UNSUPPORTED_MODULUS_LENGTH
KEY_UNSUPPORTED_MODULUS_LENGTH.
Definition: SharkSSL.h:1766
SharkSslCertDN::countryName
const U8 * countryName
ISO3166 country code.
Definition: SharkSSL.h:926
SharkSslECCKey_create
SHARKSSL_API int SharkSslECCKey_create(SharkSslECCKey *privKey, U16 curveID)
SharkSslCon_resumeSession
SHARKSSL_API U8 SharkSslCon_resumeSession(SharkSslCon *o, SharkSslSession *s)
Resume an existing session.
SharkSsl
struct SharkSsl SharkSsl
A SharkSsl object is the coordinator for managing SharkSslCon objects (See SharkSsl_constructor for d...
SharkSslCertInfo::CAflag
U8 CAflag
The Certificate Authority flag (CA) is set to one if the certificate is a CA i.e.
Definition: SharkSSL.h:980
SHARKSSL_ECDSA_INTERNAL_ERROR
@ SHARKSSL_ECDSA_INTERNAL_ERROR
INTERNAL_ERROR.
Definition: SharkSSL.h:2343
SharkSslBitExtReq
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/nss_tech_notes/nss_tech_note3 http://to...
Definition: SharkSslASN1.h:237
SHARKSSL_RSA_WRONG_KEY_FORMAT
@ SHARKSSL_RSA_WRONG_KEY_FORMAT
WRONG_KEY_FORMAT.
Definition: SharkSSL.h:1878
SharkSslCon_selectCiphersuite
SHARKSSL_API U8 SharkSslCon_selectCiphersuite(SharkSslCon *o, U16 cipherSuite)
This function enables you to limit the number of ciphers at runtime.
SHARKSSL_RSA_INPUT_DATA_LENGTH_AND_KEY_LENGTH_MISMATCH
@ SHARKSSL_RSA_INPUT_DATA_LENGTH_AND_KEY_LENGTH_MISMATCH
INPUT_DATA_LENGTH_AND_KEY_LENGTH_MISMATCH.
Definition: SharkSSL.h:1887
SharkSsl_Role
SharkSsl_Role
Select one of client or server mode when creating a SharkSsl object.
Definition: SharkSSL.h:428
SharkSslCertStore
struct SharkSslCertStore SharkSslCertStore
SharkSslCertStore is a container object used when assembling a SharkSslCAList.
SHARKSSL_ECDSA_KEY_NOT_PUBLIC
@ SHARKSSL_ECDSA_KEY_NOT_PUBLIC
KEY_IS_NOT_PUBLIC.
Definition: SharkSSL.h:2355
sharkssl_ECDSA_RetVal
sharkssl_ECDSA_RetVal
Return values from functions sharkssl_ECDSA_sign_hash, sharkssl_ECDSA_verify_hash.
Definition: SharkSSL.h:2335
SharkSslCertInfo
struct SharkSslCertInfo SharkSslCertInfo
The peer's certificate information returned by SharkSslCon_getCertInfo.
SharkSslCertInfo::snLen
U16 snLen
Length of 'sn' (serial number)
Definition: SharkSSL.h:970
SharkSslCertDN::unitLen
U8 unitLen
length in bytes of the field "organization"
Definition: SharkSSL.h:941
SHARKSSL_RSA_WRONG_KEY_LENGTH
@ SHARKSSL_RSA_WRONG_KEY_LENGTH
WRONG_KEY_LENGTH.
Definition: SharkSSL.h:1881
SharkSslCertDN::emailAddressLen
U8 emailAddressLen
length in bytes of the field "common name"
Definition: SharkSSL.h:943
SharkSslCertStore_constructor
SHARKSSL_API void SharkSslCertStore_constructor(SharkSslCertStore *o)
Initialize a SharkSslCertStore object.
SharkSsl_getCacheSize
SHARKSSL_API U16 SharkSsl_getCacheSize(SharkSsl *o)
Returns the SharkSsl session cache size.
SharkSslECCKey_free
SHARKSSL_API void SharkSslECCKey_free(SharkSslECCKey key)
SharkSslCon_AlertSend
@ SharkSslCon_AlertSend
Returned when an SSL/TLS alert message must be sent to the peer side.
Definition: SharkSSL.h:810
SharkSslCon_getCiphersuite
SHARKSSL_API U16 SharkSslCon_getCiphersuite(SharkSslCon *o)
Returns the active session's chiper suite.
SharkSslCertInfo::timeFrom
U8 * timeFrom
Certificate is valid from date (in UTCTime format: YYMMDDHHMMSSZ)
Definition: SharkSSL.h:988
SHARKSSL_RSA_INTERNAL_ERROR
@ SHARKSSL_RSA_INTERNAL_ERROR
INTERNAL_ERROR.
Definition: SharkSSL.h:1872
SharkSslCon_requestClientCert
SHARKSSL_API U8 SharkSslCon_requestClientCert(SharkSslCon *o, const void *caList)
This function is used by server solutions that require client SSL certificate authentication.
SHARKSSL_PEM_KEY_REQUIRED
@ SHARKSSL_PEM_KEY_REQUIRED
KEY_REQUIRED.
Definition: SharkSSL.h:1787
SharkSslCon_getDecData
SHARKSSL_API U16 SharkSslCon_getDecData(SharkSslCon *o, U8 **bufPtr)
Get a pointer to the decoded data.
SharkSslCon_getHandshakeData
U8 * SharkSslCon_getHandshakeData(SharkSslCon *o)
This function is used in conjunction with state SharkSslCon_Handshake returned by function SharkSslCo...
sharkssl_ECDSA_siglen
SHARKSSL_API U16 sharkssl_ECDSA_siglen(SharkSslECCKey privkey)
Returns the maximum length (in bytes) of a DER-encoded ECDSA signature generated with the private key...
SharkSslCertDN::unit
const U8 * unit
Organizational Unit (OU: department or organization unit)
Definition: SharkSSL.h:930
SharkSslCon_isHandshakeComplete
U8 SharkSslCon_isHandshakeComplete(SharkSslCon *o)
Returns TRUE if the SSL handshake phase is completed.
SharkSslCertDN::province
const U8 * province
State or Province.
Definition: SharkSSL.h:927
SHARKSSL_PEM_KEY_WRONG_IV
@ SHARKSSL_PEM_KEY_WRONG_IV
KEY_WRONG_IV.
Definition: SharkSSL.h:1751
SHARKSSL_PEM_CERT_UNRECOGNIZED_FORMAT
@ SHARKSSL_PEM_CERT_UNRECOGNIZED_FORMAT
CERT_UNRECOGNIZED_FORMAT.
Definition: SharkSSL.h:1778
sharkssl_PEM_PBKDF2
SHARKSSL_API int sharkssl_PEM_PBKDF2(U8 *dk, const char *passphrase, const char *salt, U32 saltLen, U32 iterations, U16 dkLen, U8 hashID)
sharkssl_PEM_PBKDF2(output, passphrase, salt, salt_len, iterations, dkLen, hashID) reference: RFC8018...
SharkSslECCKey
U8 * SharkSslECCKey
Definition: SharkSSL.h:2189
sharkssl_PEM
SHARKSSL_API sharkssl_PEM_RetVal sharkssl_PEM(const char *certPEM, const char *keyPEM, const char *passphrase, SharkSslCert *sharkSslCert)
Create a SharkSslCert certificate by using a certificate and key in PEM format.
SharkSslCon_getAlertDescription
U8 SharkSslCon_getAlertDescription(SharkSslCon *o)
This function is used in conjunction with state SharkSslCon_AlertSend returned by function SharkSslCo...
SharkSslCon_getEncBufPtr
U8 * SharkSslCon_getEncBufPtr(SharkSslCon *o)
This function is used in conjunction with SharkSslCon_encrypt when using the zero copy send API.
SharkSslCon_getEncBufSize
U16 SharkSslCon_getEncBufSize(SharkSslCon *o)
Returns the length of the buffer returned by SharkSslCon_getEncBufPtr.
sharkssl_ECDSA_sign_hash
SHARKSSL_API sharkssl_ECDSA_RetVal sharkssl_ECDSA_sign_hash(SharkSslECCKey privkey, U8 *sig, U16 *siglen, U8 *hash, U8 hashlen)
Generate the signature using the ECC private key and a hash.
SHARKSSL_ECDSA_VERIFICATION_FAIL
@ SHARKSSL_ECDSA_VERIFICATION_FAIL
VERIFICATION_FAIL.
Definition: SharkSSL.h:2361
SHARKSSL_RSA_ALLOCATION_ERROR
@ SHARKSSL_RSA_ALLOCATION_ERROR
ALLOCATION_ERROR.
Definition: SharkSSL.h:1869
SharkSslCon_favorRSA
U8 SharkSslCon_favorRSA(SharkSslCon *o, U8 flag)
A SharkSSL server can have multiple certificates, such as RSA certificates with various strengths,...
SHARKSSL_RSA_PKCS1_PADDING_ERROR
@ SHARKSSL_RSA_PKCS1_PADDING_ERROR
PKCS1_PADDING_ERROR.
Definition: SharkSSL.h:1890
SharkSsl_destructor
SHARKSSL_API void SharkSsl_destructor(SharkSsl *o)
Close the SharkSsl object.
SHARKSSL_RSA_WRONG_PARAMETERS
@ SHARKSSL_RSA_WRONG_PARAMETERS
WRONG_PARAMETERS.
Definition: SharkSSL.h:1875
SharkSslCon_getBuf
U8 * SharkSslCon_getBuf(SharkSslCon *o)
Returns a pointer to the SharkSslCon input/receive buffer.
SharkSslCertDN
struct SharkSslCertDN SharkSslCertDN
Certificate KeyUsage and ExtendedKeyUsage flags and relative pseudofunctions.
SharkSslCert_len
SHARKSSL_API U16 SharkSslCert_len(SharkSslCert cert)
SharkSslCertInfo::parent
struct SharkSslCertInfo * parent
Pointer to parent node when the SharkSslCertInfo object is part of a certificate chain.
Definition: SharkSSL.h:1049
SharkSslCon_getEncDataLen
U16 SharkSslCon_getEncDataLen(SharkSslCon *o)
This function is used in conjunction with state SharkSslCon_Encrypted returned by function SharkSslCo...
sharkssl_RSA_public_encrypt
SHARKSSL_API sharkssl_RSA_RetVal sharkssl_RSA_public_encrypt(U16 len, U8 *in, U8 *out, SharkSslRSAKey key, U8 padding)
Encrypt data using the public key or private key.
SHARKSSL_ECDSA_SIGLEN_TOO_SMALL
@ SHARKSSL_ECDSA_SIGLEN_TOO_SMALL
SIGLEN_TOO_SMALL.
Definition: SharkSSL.h:2358
SharkSsl_terminateCon
void SharkSsl_terminateCon(const SharkSsl *o, SharkSslCon *con)
Terminate a SharkSslCon object created by function SharkSsl_createCon.
SharkSslCertInfo::issuer
SharkSslCertDN issuer
The entity who has signed and issued the certificate (RFC2459 4.1.2.4)
Definition: SharkSSL.h:998
SharkSslCertDN::organizationLen
U8 organizationLen
length in bytes of the field "locality"
Definition: SharkSSL.h:940
SharkSslCon_copyDecData
U16 SharkSslCon_copyDecData(SharkSslCon *o, U8 *buf, U16 maxLen)
Copy decoded data to 'buf'.
SharkSslCon_Error
@ SharkSslCon_Error
Indicates general errors, including configuration errors.
Definition: SharkSSL.h:755
SHARKSSL_PEM_KEY_UNSUPPORTED_FORMAT
@ SHARKSSL_PEM_KEY_UNSUPPORTED_FORMAT
KEY_UNSUPPORTED_FORMAT.
Definition: SharkSSL.h:1763
SharkSslCertInfo::subject
SharkSslCertDN subject
The entity associated with the public key (RFC2459 4.1.2.6).
Definition: SharkSSL.h:1004
SHARKSSL_PEM_CERT_UNSUPPORTED_TYPE
@ SHARKSSL_PEM_CERT_UNSUPPORTED_TYPE
CERT_UNSUPPORTED_TYPE.
Definition: SharkSSL.h:1781
SharkSslCertDN::locality
const U8 * locality
The city or town name.
Definition: SharkSSL.h:928
SharkSslCon_getBufLen
U16 SharkSslCon_getBufLen(SharkSslCon *o)
Returns the length of the SharkSslCon input buffer.
SharkSslCon_Decrypted
@ SharkSslCon_Decrypted
Returned when a block of received data has been successfully decrypted.
Definition: SharkSSL.h:770
SharkSslSession
struct SharkSslSession SharkSslSession
SharkSslSession is an opaque handle returned by function SharkSslCon_acquireSession.
Definition: SharkSSL.h:401
SharkSslCertInfo::version
U8 version
Certificate version is offset at 0 so add +1 for actual version number.
Definition: SharkSSL.h:975
SharkSsl
A SharkSsl object is the coordinator for managing SharkSslCon objects (See SharkSsl_constructor for d...
Definition: SharkSSL.h:700
SharkSslCon_setSNI
SHARKSSL_API U8 SharkSslCon_setSNI(SharkSslCon *o, const char *name, U16 length)
set Server Name Indication for TLS client connections
SharkSslCon_HandshakeNotComplete
@ SharkSslCon_HandshakeNotComplete
An error condition returned by function SharkSslCon_encrypt if the SSL handshake is not completed.
Definition: SharkSSL.h:837
sharkssl_RSA_RetVal
sharkssl_RSA_RetVal
Return values from functions sharkssl_RSA_public_encrypt, sharkssl_RSA_private_decrypt,...
Definition: SharkSSL.h:1864
SharkSsl_Unspecified
@ SharkSsl_Unspecified
Definition: SharkSSL.h:429
sharkssl_RSA_private_encrypt
SHARKSSL_API sharkssl_RSA_RetVal sharkssl_RSA_private_encrypt(U16 len, U8 *in, U8 *out, SharkSslRSAKey privkey, U8 padding)
Sign a message digest using the private key.
SharkSslCertStore_add
SHARKSSL_API U16 SharkSslCertStore_add(SharkSslCertStore *o, const char *cert, U32 certlen)
add a certificate in PEM or p7b format to the CA store.
SharkSslCon_getAlertLevel
U8 SharkSslCon_getAlertLevel(SharkSslCon *o)
This function is used in conjunction with state SharkSslCon_AlertSend returned by function SharkSslCo...
SharkSslCon_certificateRequested
U8 SharkSslCon_certificateRequested(SharkSslCon *o)
Returns TRUE if the server requested a certificate from the client to verify that the client's identi...
SharkSsl_setCAList
SHARKSSL_API U8 SharkSsl_setCAList(SharkSsl *o, SharkSslCAList caList)
Set a Certificate Authority (CA) list so the SharkSSL object can permform certificate validation on t...
SharkSslCertStore_destructor
SHARKSSL_API void SharkSslCertStore_destructor(SharkSslCertStore *o)
Cleanup all memory used by the SharkSslCAList object.
SharkSslCertDN::localityLen
U8 localityLen
length in bytes of the field "province"
Definition: SharkSSL.h:939
SHARKSSL_RSA_OK
@ SHARKSSL_RSA_OK
OK.
Definition: SharkSSL.h:1866
SharkSslCAList
const U8 * SharkSslCAList
The SharkSSL Certificate Authority (CA) List is in a binary format optimized for speed and size.
Definition: SharkSSL.h:630
SHARKSSL_ECDSA_WRONG_PARAMETERS
@ SHARKSSL_ECDSA_WRONG_PARAMETERS
WRONG_PARAMETERS.
Definition: SharkSSL.h:2346
SharkSslCon_getCertInfo
SHARKSSL_API SharkSslCertInfo * SharkSslCon_getCertInfo(SharkSslCon *o)
Returns the peer's certificate if the handshaking has completed.
SharkSslCertDN::commonName
const U8 * commonName
Common Name is the Host + Domain Name (example: www.mycompany.com, where www is host and mycompany....
Definition: SharkSSL.h:934
SharkSslCon_RetVal
SharkSslCon_RetVal
The SharkSslCon_decrypt and SharkSslCon_encrypt return values.
Definition: SharkSSL.h:752
SHARKSSL_PEM_KEY_UNSUPPORTED_VERSION
@ SHARKSSL_PEM_KEY_UNSUPPORTED_VERSION
KEY_UNSUPPORTED_VERSION.
Definition: SharkSSL.h:1784
SHARKSSL_RSA_INPUT_DATA_LENGTH_TOO_BIG
@ SHARKSSL_RSA_INPUT_DATA_LENGTH_TOO_BIG
INPUT_DATA_LENGTH_TOO_BIG.
Definition: SharkSSL.h:1884
SharkSslASN1Create
Opaque object used when creating ASN.1 encoded data.
Definition: SharkSslASN1.h:226
SharkSslCon_clearCiphersuiteSelection
SHARKSSL_API U8 SharkSslCon_clearCiphersuiteSelection(SharkSslCon *o)
Clears the selection, thus enabling all ciphers.
SharkSslCon_AlertRecv
@ SharkSslCon_AlertRecv
SharkSSL received an SSL/TLS alert message from the peer, which means that the peer either failed to ...
Definition: SharkSSL.h:819