// setpreferredCipher.cpp : // lib: bcrypt.lib #include "stdafx.h" #include #include #include void main(void) { SECURITY_STATUS Status = ERROR_SUCCESS; LPWSTR wszCiphertop = (L"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384_P384"); LPWSTR wszCipherbottom = (L"TLS_RSA_WITH_RC4_128_SHA"); Status = BCryptAddContextFunction(CRYPT_LOCAL,L"SSL",NCRYPT_SCHANNEL_INTERFACE,wszCiphertop,CRYPT_PRIORITY_TOP); printf("\nSet %S on top\n",wszCiphertop); // Schmuddelkind RC4 wird von manchen Programmen noch gebraucht Status = BCryptAddContextFunction(CRYPT_LOCAL,L"SSL",NCRYPT_SCHANNEL_INTERFACE,wszCipherbottom,CRYPT_PRIORITY_BOTTOM); printf("\nSet %S on bottom\n",wszCipherbottom); }