summaryrefslogtreecommitdiff
path: root/src/ssl_error.c
blob: 88a01a155cb736cc870e353b4f1b84329c83c1fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "ucspissl.h"

int ssl_error(int (*op)(const char *)) {
  unsigned long e;
  int r;

  e = ERR_get_error();
  if (!e) return 0;
  r = op(ERR_error_string(e,0));
  if (r) return r;
  return ssl_error(op);
}