*/
if (gnutls_check_version("3.1.4") == NULL) {
- fprintf(stderr, "GnuTLS 3.1.4 is required for this example\n");
+ fprintf(stderr, "GnuTLS 3.1.4 or later is required for this example\n");
exit(1);
}
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
- /* PKCS11 private key operations might require PIN.
- * Register a callback.
- */
+
+ /* The PKCS11 private key operations may require PIN.
+ * Register a callback. */
gnutls_pkcs11_set_pin_function(pin_callback, NULL);
/* X509 stuff */
gnutls_certificate_credentials_t xcred;
if (gnutls_check_version("3.1.4") == NULL) {
- fprintf(stderr, "GnuTLS 3.1.4 is required for this example\n");
+ fprintf(stderr, "GnuTLS 3.1.4 or later is required for this example\n");
exit(1);
}
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
load_keys();
gnutls_certificate_credentials_t xcred;
if (gnutls_check_version("3.1.4") == NULL) {
- fprintf(stderr, "GnuTLS 3.1.4 is required for this example\n");
+ fprintf(stderr, "GnuTLS 3.1.4 or later is required for this example\n");
exit(1);
}
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
/* X509 stuff */
gnutls_certificate_credentials_t cert_cred;
if (gnutls_check_version("3.1.4") == NULL) {
- fprintf(stderr, "GnuTLS 3.1.4 is required for this example\n");
+ fprintf(stderr, "GnuTLS 3.1.4 or later is required for this example\n");
exit(1);
}
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
gnutls_srp_allocate_client_credentials(&srp_cred);
gnutls_certificate_credentials_t xcred;
if (gnutls_check_version("3.1.4") == NULL) {
- fprintf(stderr, "GnuTLS 3.1.4 is required for this example\n");
+ fprintf(stderr, "GnuTLS 3.1.4 or later is required for this example\n");
exit(1);
}
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
/* X509 stuff */
int optval = 1;
if (gnutls_check_version("3.1.4") == NULL) {
- fprintf(stderr, "GnuTLS 3.1.4 is required for this example\n");
+ fprintf(stderr, "GnuTLS 3.1.4 or later is required for this example\n");
exit(1);
}
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
gnutls_anon_allocate_server_credentials(&anoncred);
strcpy(name, "Echo Server");
if (gnutls_check_version("3.1.4") == NULL) {
- fprintf(stderr, "GnuTLS 3.1.4 is required for this example\n");
+ fprintf(stderr, "GnuTLS 3.1.4 or later is required for this example\n");
exit(1);
}
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
gnutls_certificate_allocate_credentials(&cred);
int kx;
if (gnutls_check_version("3.1.4") == NULL) {
- fprintf(stderr, "GnuTLS 3.1.4 is required for this example\n");
+ fprintf(stderr, "GnuTLS 3.1.4 or later is required for this example\n");
exit(1);
}
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
gnutls_certificate_allocate_credentials(&x509_cred);
strcpy(name, "Echo Server");
if (gnutls_check_version("3.1.4") == NULL) {
- fprintf(stderr, "GnuTLS 3.1.4 is required for this example\n");
+ fprintf(stderr, "GnuTLS 3.1.4 or later is required for this example\n");
exit(1);
}
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
/* SRP_PASSWD a password file (created with the included srptool utility)
char buffer[MAX_BUF + 1];
int optval = 1;
- /* this must be called once in the program
- */
+ /* for backwards compatibility with gnutls < 3.3.0 */
gnutls_global_init();
gnutls_certificate_allocate_credentials(&x509_cred);