2 * Mac OS X Secure Transport implementation of the schannel (SSL/TLS) provider.
4 * Copyright 2005 Juan Lang
5 * Copyright 2008 Henri Verbeet
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "wine/port.h"
26 #ifdef HAVE_SECURITY_SECURITY_H
27 #include <Security/Security.h>
28 #define GetCurrentThread GetCurrentThread_Mac
29 #define LoadResource LoadResource_Mac
30 #include <CoreServices/CoreServices.h>
31 #undef GetCurrentThread
40 #include "secur32_priv.h"
41 #include "wine/debug.h"
42 #include "wine/library.h"
44 WINE_DEFAULT_DEBUG_CHANNEL(secur32);
46 #ifdef HAVE_SECURITY_SECURITY_H
49 SSLContextRef context;
50 struct schan_transport *transport;
60 schan_kx_DH_anon_EXPORT,
62 schan_kx_DH_DSS_EXPORT,
64 schan_kx_DH_RSA_EXPORT,
66 schan_kx_DHE_DSS_EXPORT,
68 schan_kx_DHE_RSA_EXPORT,
75 schan_kx_FORTEZZA_DMS,
82 schan_enc_3DES_EDE_CBC,
83 schan_enc_AES_128_CBC,
84 schan_enc_AES_256_CBC,
87 schan_enc_FORTEZZA_CBC,
103 struct cipher_suite {
104 SSLCipherSuite suite;
111 /* This table corresponds to the enum in <Security/CipherSuite.h>. */
112 static const struct cipher_suite cipher_suites[] = {
113 #define CIPHER_SUITE(p, kx, enc, mac) { p##_##kx##_WITH_##enc##_##mac, schan_proto_##p, \
114 schan_kx_##kx, schan_enc_##enc, schan_mac_##mac }
115 CIPHER_SUITE(SSL, RSA, NULL, MD5),
116 CIPHER_SUITE(SSL, RSA, NULL, MD5),
117 CIPHER_SUITE(SSL, RSA, NULL, SHA),
118 CIPHER_SUITE(SSL, RSA_EXPORT, RC4_40, MD5),
119 CIPHER_SUITE(SSL, RSA, RC4_128, MD5),
120 CIPHER_SUITE(SSL, RSA, RC4_128, SHA),
121 CIPHER_SUITE(SSL, RSA_EXPORT, RC2_CBC_40, MD5),
122 CIPHER_SUITE(SSL, RSA, IDEA_CBC, SHA),
123 CIPHER_SUITE(SSL, RSA_EXPORT, DES40_CBC, SHA),
124 CIPHER_SUITE(SSL, RSA, DES_CBC, SHA),
125 CIPHER_SUITE(SSL, RSA, 3DES_EDE_CBC, SHA),
126 CIPHER_SUITE(SSL, DH_DSS_EXPORT, DES40_CBC, SHA),
127 CIPHER_SUITE(SSL, DH_DSS, DES_CBC, SHA),
128 CIPHER_SUITE(SSL, DH_DSS, 3DES_EDE_CBC, SHA),
129 CIPHER_SUITE(SSL, DH_RSA_EXPORT, DES40_CBC, SHA),
130 CIPHER_SUITE(SSL, DH_RSA, DES_CBC, SHA),
131 CIPHER_SUITE(SSL, DH_RSA, 3DES_EDE_CBC, SHA),
132 CIPHER_SUITE(SSL, DHE_DSS_EXPORT, DES40_CBC, SHA),
133 CIPHER_SUITE(SSL, DHE_DSS, DES_CBC, SHA),
134 CIPHER_SUITE(SSL, DHE_DSS, 3DES_EDE_CBC, SHA),
135 CIPHER_SUITE(SSL, DHE_RSA_EXPORT, DES40_CBC, SHA),
136 CIPHER_SUITE(SSL, DHE_RSA, DES_CBC, SHA),
137 CIPHER_SUITE(SSL, DHE_RSA, 3DES_EDE_CBC, SHA),
138 CIPHER_SUITE(SSL, DH_anon_EXPORT, RC4_40, MD5),
139 CIPHER_SUITE(SSL, DH_anon, RC4_128, MD5),
140 CIPHER_SUITE(SSL, DH_anon_EXPORT, DES40_CBC, SHA),
141 CIPHER_SUITE(SSL, DH_anon, DES_CBC, SHA),
142 CIPHER_SUITE(SSL, DH_anon, 3DES_EDE_CBC, SHA),
143 CIPHER_SUITE(SSL, FORTEZZA_DMS, NULL, SHA),
144 CIPHER_SUITE(SSL, FORTEZZA_DMS, FORTEZZA_CBC, SHA),
146 CIPHER_SUITE(TLS, RSA, AES_128_CBC, SHA),
147 CIPHER_SUITE(TLS, DH_DSS, AES_128_CBC, SHA),
148 CIPHER_SUITE(TLS, DH_RSA, AES_128_CBC, SHA),
149 CIPHER_SUITE(TLS, DHE_DSS, AES_128_CBC, SHA),
150 CIPHER_SUITE(TLS, DHE_RSA, AES_128_CBC, SHA),
151 CIPHER_SUITE(TLS, DH_anon, AES_128_CBC, SHA),
152 CIPHER_SUITE(TLS, RSA, AES_256_CBC, SHA),
153 CIPHER_SUITE(TLS, DH_DSS, AES_256_CBC, SHA),
154 CIPHER_SUITE(TLS, DH_RSA, AES_256_CBC, SHA),
155 CIPHER_SUITE(TLS, DHE_DSS, AES_256_CBC, SHA),
156 CIPHER_SUITE(TLS, DHE_RSA, AES_256_CBC, SHA),
157 CIPHER_SUITE(TLS, DH_anon, AES_256_CBC, SHA),
159 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
160 CIPHER_SUITE(TLS, ECDH_ECDSA, NULL, SHA),
161 CIPHER_SUITE(TLS, ECDH_ECDSA, RC4_128, SHA),
162 CIPHER_SUITE(TLS, ECDH_ECDSA, 3DES_EDE_CBC, SHA),
163 CIPHER_SUITE(TLS, ECDH_ECDSA, AES_128_CBC, SHA),
164 CIPHER_SUITE(TLS, ECDH_ECDSA, AES_256_CBC, SHA),
165 CIPHER_SUITE(TLS, ECDHE_ECDSA, NULL, SHA),
166 CIPHER_SUITE(TLS, ECDHE_ECDSA, RC4_128, SHA),
167 CIPHER_SUITE(TLS, ECDHE_ECDSA, 3DES_EDE_CBC, SHA),
168 CIPHER_SUITE(TLS, ECDHE_ECDSA, AES_128_CBC, SHA),
169 CIPHER_SUITE(TLS, ECDHE_ECDSA, AES_256_CBC, SHA),
170 CIPHER_SUITE(TLS, ECDH_RSA, NULL, SHA),
171 CIPHER_SUITE(TLS, ECDH_RSA, RC4_128, SHA),
172 CIPHER_SUITE(TLS, ECDH_RSA, 3DES_EDE_CBC, SHA),
173 CIPHER_SUITE(TLS, ECDH_RSA, AES_128_CBC, SHA),
174 CIPHER_SUITE(TLS, ECDH_RSA, AES_256_CBC, SHA),
175 CIPHER_SUITE(TLS, ECDHE_RSA, NULL, SHA),
176 CIPHER_SUITE(TLS, ECDHE_RSA, RC4_128, SHA),
177 CIPHER_SUITE(TLS, ECDHE_RSA, 3DES_EDE_CBC, SHA),
178 CIPHER_SUITE(TLS, ECDHE_RSA, AES_128_CBC, SHA),
179 CIPHER_SUITE(TLS, ECDHE_RSA, AES_256_CBC, SHA),
180 CIPHER_SUITE(TLS, ECDH_anon, NULL, SHA),
181 CIPHER_SUITE(TLS, ECDH_anon, RC4_128, SHA),
182 CIPHER_SUITE(TLS, ECDH_anon, 3DES_EDE_CBC, SHA),
183 CIPHER_SUITE(TLS, ECDH_anon, AES_128_CBC, SHA),
184 CIPHER_SUITE(TLS, ECDH_anon, AES_256_CBC, SHA),
187 CIPHER_SUITE(SSL, RSA, RC2_CBC, MD5),
188 CIPHER_SUITE(SSL, RSA, IDEA_CBC, MD5),
189 CIPHER_SUITE(SSL, RSA, DES_CBC, MD5),
190 CIPHER_SUITE(SSL, RSA, 3DES_EDE_CBC, MD5),
195 static const struct cipher_suite* get_cipher_suite(SSLCipherSuite cipher_suite)
198 for (i = 0; i < sizeof(cipher_suites)/sizeof(cipher_suites[0]); i++)
200 if (cipher_suites[i].suite == cipher_suite)
201 return &cipher_suites[i];
208 static DWORD schan_get_session_protocol(struct mac_session* s)
210 SSLProtocol protocol;
213 TRACE("(%p/%p)\n", s, s->context);
215 status = SSLGetNegotiatedProtocolVersion(s->context, &protocol);
218 ERR("Failed to get session protocol: %ld\n", status);
222 TRACE("protocol %d\n", protocol);
226 case kSSLProtocol2: return SP_PROT_SSL2_CLIENT;
227 case kSSLProtocol3: return SP_PROT_SSL3_CLIENT;
228 case kTLSProtocol1: return SP_PROT_TLS1_CLIENT;
230 FIXME("unknown protocol %d\n", protocol);
235 static ALG_ID schan_get_cipher_algid(const struct cipher_suite* c)
237 TRACE("(%#x)\n", (unsigned int)c->suite);
241 case schan_enc_3DES_EDE_CBC: return CALG_3DES;
242 case schan_enc_AES_128_CBC: return CALG_AES_128;
243 case schan_enc_AES_256_CBC: return CALG_AES_256;
244 case schan_enc_DES_CBC: return CALG_DES;
245 case schan_enc_DES40_CBC: return CALG_DES;
246 case schan_enc_NULL: return 0;
247 case schan_enc_RC2_CBC_40: return CALG_RC2;
248 case schan_enc_RC2_CBC: return CALG_RC2;
249 case schan_enc_RC4_128: return CALG_RC4;
250 case schan_enc_RC4_40: return CALG_RC4;
252 case schan_enc_FORTEZZA_CBC:
253 case schan_enc_IDEA_CBC:
254 FIXME("Don't know CALG for encryption algorithm %d, returning 0\n", c->enc_alg);
258 FIXME("Unknown encryption algorithm %d for cipher suite %#x, returning 0\n", c->enc_alg, (unsigned int)c->suite);
263 static unsigned int schan_get_cipher_key_size(const struct cipher_suite* c)
265 TRACE("(%#x)\n", (unsigned int)c->suite);
269 case schan_enc_3DES_EDE_CBC: return 168;
270 case schan_enc_AES_128_CBC: return 128;
271 case schan_enc_AES_256_CBC: return 256;
272 case schan_enc_DES_CBC: return 56;
273 case schan_enc_DES40_CBC: return 40;
274 case schan_enc_NULL: return 0;
275 case schan_enc_RC2_CBC_40: return 40;
276 case schan_enc_RC2_CBC: return 128;
277 case schan_enc_RC4_128: return 128;
278 case schan_enc_RC4_40: return 40;
280 case schan_enc_FORTEZZA_CBC:
281 case schan_enc_IDEA_CBC:
282 FIXME("Don't know key size for encryption algorithm %d, returning 0\n", c->enc_alg);
286 FIXME("Unknown encryption algorithm %d for cipher suite %#x, returning 0\n", c->enc_alg, (unsigned int)c->suite);
291 static ALG_ID schan_get_mac_algid(const struct cipher_suite* c)
293 TRACE("(%#x)\n", (unsigned int)c->suite);
297 case schan_mac_MD5: return CALG_MD5;
298 case schan_mac_NULL: return 0;
299 case schan_mac_SHA: return CALG_SHA;
302 FIXME("Unknown hashing algorithm %d for cipher suite %#x, returning 0\n", c->mac_alg, (unsigned)c->suite);
307 static unsigned int schan_get_mac_key_size(const struct cipher_suite* c)
309 TRACE("(%#x)\n", (unsigned int)c->suite);
313 case schan_mac_MD5: return 128;
314 case schan_mac_NULL: return 0;
315 case schan_mac_SHA: return 160;
318 FIXME("Unknown hashing algorithm %d for cipher suite %#x, returning 0\n", c->mac_alg, (unsigned)c->suite);
323 static ALG_ID schan_get_kx_algid(const struct cipher_suite* c)
325 TRACE("(%#x)\n", (unsigned int)c->suite);
329 case schan_kx_DHE_DSS_EXPORT:
330 case schan_kx_DHE_DSS:
331 case schan_kx_DHE_RSA_EXPORT:
332 case schan_kx_DHE_RSA: return CALG_DH_EPHEM;
333 case schan_kx_NULL: return 0;
334 case schan_kx_RSA: return CALG_RSA_KEYX;
336 case schan_kx_DH_anon_EXPORT:
337 case schan_kx_DH_anon:
338 case schan_kx_DH_DSS_EXPORT:
339 case schan_kx_DH_DSS:
340 case schan_kx_DH_RSA_EXPORT:
341 case schan_kx_DH_RSA:
342 case schan_kx_ECDH_anon:
343 case schan_kx_ECDH_ECDSA:
344 case schan_kx_ECDH_RSA:
345 case schan_kx_ECDHE_ECDSA:
346 case schan_kx_ECDHE_RSA:
347 case schan_kx_FORTEZZA_DMS:
348 case schan_kx_RSA_EXPORT:
349 FIXME("Don't know CALG for key exchange algorithm %d for cipher suite %#x, returning 0\n", c->kx_alg, (unsigned)c->suite);
353 FIXME("Unknown key exchange algorithm %d for cipher suite %#x, returning 0\n", c->kx_alg, (unsigned)c->suite);
359 /* schan_pull_adapter
360 * Callback registered with SSLSetIOFuncs as the read function for a
361 * session. Reads data from the session connection. Conforms to the
364 * transport - The session connection
365 * buff - The buffer into which to store the read data. Must be at least
366 * *buff_len bytes in length.
367 * *buff_len - On input, the desired length to read. On successful return,
368 * the number of bytes actually read.
371 * noErr on complete success meaning the requested length was successfully
373 * errSSLWouldBlock when the requested length could not be read without
374 * blocking. *buff_len indicates how much was actually read. The
375 * caller should try again if/when they want to read more.
376 * errSSLClosedGraceful when the connection has closed and there's no
377 * more data to be read.
378 * other error code for failure.
380 static OSStatus schan_pull_adapter(SSLConnectionRef transport, void *buff,
383 struct mac_session *s = (struct mac_session*)transport;
384 size_t requested = *buff_len;
388 TRACE("(%p/%p, %p, %p/%lu)\n", s, s->transport, buff, buff_len,
389 (unsigned long)*buff_len);
391 status = schan_pull(s->transport, buff, buff_len);
396 TRACE("Connection closed\n");
397 ret = errSSLClosedGraceful;
399 else if (*buff_len < requested)
401 TRACE("Pulled %lu bytes before would block\n", (unsigned long)*buff_len);
402 ret = errSSLWouldBlock;
406 TRACE("Pulled %lu bytes\n", (unsigned long)*buff_len);
410 else if (status == EAGAIN)
412 TRACE("Would block before being able to pull anything\n");
413 ret = errSSLWouldBlock;
417 FIXME("Unknown status code from schan_pull: %d\n", status);
424 /* schan_push_adapter
425 * Callback registered with SSLSetIOFuncs as the write function for a
426 * session. Writes data to the session connection. Conforms to the
429 * transport - The session connection
430 * buff - The buffer of data to write. Must be at least *buff_len bytes in length.
431 * *buff_len - On input, the desired length to write. On successful return,
432 * the number of bytes actually written.
435 * noErr on complete or partial success; *buff_len indicates how much data
436 * was actually written, which may be less than requrested.
437 * errSSLWouldBlock when no data could be written without blocking. The
438 * caller should try again.
439 * other error code for failure.
441 static OSStatus schan_push_adapter(SSLConnectionRef transport, const void *buff,
444 struct mac_session *s = (struct mac_session*)transport;
448 TRACE("(%p/%p, %p, %p/%lu)\n", s, s->transport, buff, buff_len,
449 (unsigned long)*buff_len);
451 status = schan_push(s->transport, buff, buff_len);
454 TRACE("Pushed %lu bytes\n", (unsigned long)*buff_len);
457 else if (status == EAGAIN)
459 TRACE("Would block before being able to push anything\n");
460 ret = errSSLWouldBlock;
464 FIXME("Unknown status code from schan_push: %d\n", status);
472 BOOL schan_imp_create_session(schan_imp_session *session, BOOL is_server,
473 schan_imp_certificate_credentials cred)
475 struct mac_session *s;
478 TRACE("(%p, %d)\n", session, is_server);
480 s = HeapAlloc(GetProcessHeap(), 0, sizeof(*s));
484 status = SSLNewContext(is_server, &s->context);
487 ERR("Failed to create session context: %ld\n", (long)status);
491 status = SSLSetConnection(s->context, s);
494 ERR("Failed to set session connection: %ld\n", (long)status);
498 status = SSLSetEnableCertVerify(s->context, FALSE);
501 ERR("Failed to disable certificate verification: %ld\n", (long)status);
505 status = SSLSetProtocolVersionEnabled(s->context, kSSLProtocol2, FALSE);
508 ERR("Failed to disable SSL version 2: %ld\n", (long)status);
512 status = SSLSetIOFuncs(s->context, schan_pull_adapter, schan_push_adapter);
515 ERR("Failed to set session I/O funcs: %ld\n", (long)status);
519 TRACE(" -> %p/%p\n", s, s->context);
521 *session = (schan_imp_session)s;
525 HeapFree(GetProcessHeap(), 0, s);
529 void schan_imp_dispose_session(schan_imp_session session)
531 struct mac_session *s = (struct mac_session*)session;
534 TRACE("(%p/%p)\n", s, s->context);
536 status = SSLDisposeContext(s->context);
538 ERR("Failed to dispose of session context: %ld\n", status);
539 HeapFree(GetProcessHeap(), 0, s);
542 void schan_imp_set_session_transport(schan_imp_session session,
543 struct schan_transport *t)
545 struct mac_session *s = (struct mac_session*)session;
547 TRACE("(%p/%p, %p)\n", s, s->context, t);
552 SECURITY_STATUS schan_imp_handshake(schan_imp_session session)
554 struct mac_session *s = (struct mac_session*)session;
557 TRACE("(%p/%p)\n", s, s->context);
559 status = SSLHandshake(s->context);
562 TRACE("Handshake completed\n");
565 else if (status == errSSLWouldBlock)
567 TRACE("Continue...\n");
568 return SEC_I_CONTINUE_NEEDED;
570 else if (errSecErrnoBase <= status && status <= errSecErrnoLimit)
572 ERR("Handshake failed: %s\n", strerror(status));
573 return SEC_E_INTERNAL_ERROR;
577 ERR("Handshake failed: %ld\n", (long)status);
578 cssmPerror("SSLHandshake", status);
579 return SEC_E_INTERNAL_ERROR;
586 unsigned int schan_imp_get_session_cipher_block_size(schan_imp_session session)
588 struct mac_session* s = (struct mac_session*)session;
589 SSLCipherSuite cipherSuite;
590 const struct cipher_suite* c;
593 TRACE("(%p/%p)\n", s, s->context);
595 status = SSLGetNegotiatedCipher(s->context, &cipherSuite);
598 ERR("Failed to get session cipher suite: %ld\n", status);
602 c = get_cipher_suite(cipherSuite);
605 ERR("Unknown session cipher suite: %#x\n", (unsigned int)cipherSuite);
611 case schan_enc_3DES_EDE_CBC: return 64;
612 case schan_enc_AES_128_CBC: return 128;
613 case schan_enc_AES_256_CBC: return 128;
614 case schan_enc_DES_CBC: return 64;
615 case schan_enc_DES40_CBC: return 64;
616 case schan_enc_NULL: return 0;
617 case schan_enc_RC2_CBC_40: return 64;
618 case schan_enc_RC2_CBC: return 64;
619 case schan_enc_RC4_128: return 0;
620 case schan_enc_RC4_40: return 0;
622 case schan_enc_FORTEZZA_CBC:
623 case schan_enc_IDEA_CBC:
624 FIXME("Don't know block size for encryption algorithm %d, returning 0\n", c->enc_alg);
628 FIXME("Unknown encryption algorithm %d for cipher suite %#x, returning 0\n", c->enc_alg, (unsigned int)c->suite);
633 SECURITY_STATUS schan_imp_get_connection_info(schan_imp_session session,
634 SecPkgContext_ConnectionInfo *info)
636 struct mac_session* s = (struct mac_session*)session;
637 SSLCipherSuite cipherSuite;
638 const struct cipher_suite* c;
641 TRACE("(%p/%p, %p)\n", s, s->context, info);
643 status = SSLGetNegotiatedCipher(s->context, &cipherSuite);
646 ERR("Failed to get session cipher suite: %ld\n", status);
647 return SEC_E_INTERNAL_ERROR;
650 c = get_cipher_suite(cipherSuite);
653 ERR("Unknown session cipher suite: %#x\n", (unsigned int)cipherSuite);
654 return SEC_E_INTERNAL_ERROR;
657 info->dwProtocol = schan_get_session_protocol(s);
658 info->aiCipher = schan_get_cipher_algid(c);
659 info->dwCipherStrength = schan_get_cipher_key_size(c);
660 info->aiHash = schan_get_mac_algid(c);
661 info->dwHashStrength = schan_get_mac_key_size(c);
662 info->aiExch = schan_get_kx_algid(c);
663 /* FIXME: info->dwExchStrength? */
664 info->dwExchStrength = 0;
669 SECURITY_STATUS schan_imp_get_session_peer_certificate(schan_imp_session session,
670 PCCERT_CONTEXT *cert)
672 struct mac_session* s = (struct mac_session*)session;
673 SECURITY_STATUS ret = SEC_E_INTERNAL_ERROR;
677 TRACE("(%p/%p, %p)\n", s, s->context, cert);
679 status = SSLCopyPeerCertificates(s->context, &certs);
680 if (status == noErr && certs)
682 SecCertificateRef mac_cert;
684 if (CFArrayGetCount(certs) &&
685 (mac_cert = (SecCertificateRef)CFArrayGetValueAtIndex(certs, 0)) &&
686 (SecKeychainItemExport(mac_cert, kSecFormatX509Cert, 0, NULL, &data) == noErr))
688 *cert = CertCreateCertificateContext(X509_ASN_ENCODING,
689 CFDataGetBytePtr(data), CFDataGetLength(data));
694 ret = GetLastError();
695 WARN("CertCreateCertificateContext failed: %x\n", ret);
700 WARN("Couldn't extract certificate data\n");
704 WARN("SSLCopyPeerCertificates failed: %ld\n", (long)status);
709 SECURITY_STATUS schan_imp_send(schan_imp_session session, const void *buffer,
712 struct mac_session* s = (struct mac_session*)session;
715 TRACE("(%p/%p, %p, %p/%lu)\n", s, s->context, buffer, length, (unsigned long)*length);
717 status = SSLWrite(s->context, buffer, *length, length);
719 TRACE("Wrote %lu bytes\n", (unsigned long)*length);
720 else if (status == errSSLWouldBlock)
724 TRACE("Would block before being able to write anything\n");
725 return SEC_I_CONTINUE_NEEDED;
728 TRACE("Wrote %lu bytes before would block\n", (unsigned long)*length);
732 WARN("SSLWrite failed: %ld\n", (long)status);
733 return SEC_E_INTERNAL_ERROR;
739 SECURITY_STATUS schan_imp_recv(schan_imp_session session, void *buffer,
742 struct mac_session* s = (struct mac_session*)session;
745 TRACE("(%p/%p, %p, %p/%lu)\n", s, s->context, buffer, length, (unsigned long)*length);
747 status = SSLRead(s->context, buffer, *length, length);
749 TRACE("Read %lu bytes\n", (unsigned long)*length);
750 else if (status == errSSLWouldBlock)
754 TRACE("Would block before being able to read anything\n");
755 return SEC_I_CONTINUE_NEEDED;
758 TRACE("Read %lu bytes before would block\n", (unsigned long)*length);
762 WARN("SSLRead failed: %ld\n", (long)status);
763 return SEC_E_INTERNAL_ERROR;
769 BOOL schan_imp_allocate_certificate_credentials(schan_imp_certificate_credentials *c)
771 /* The certificate is never really used for anything. */
776 void schan_imp_free_certificate_credentials(schan_imp_certificate_credentials c)
780 BOOL schan_imp_init(void)
786 void schan_imp_deinit(void)
791 #endif /* HAVE_SECURITY_SECURITY_H */