View | Details | Raw Unified | Return to bug 60456
Collapse All | Expand All

(-)old\modules\ssl\ssl_engine_vars.c (+10 lines)
Line 642 Link Here
642
    else if (strcEQn(var, "IP_", 3)) {
643
        type = GEN_IPADD;
644
        var += 3;
645
    }
Line 1016 Link Here
1020
        if (modssl_X509_getSAN(p, xs, GEN_IPADD, NULL, -1, &entries)) {
1021
            extract_san_array(t, "SSL_SERVER_SAN_IP", entries, p);
1022
        }
Line 1031 Link Here
1038
        }
1039
        if (modssl_X509_getSAN(p, xs, GEN_IPADD, NULL, -1, &entries)) {
1040
            extract_san_array(t, "SSL_CLIENT_SAN_IP", entries, p);
(-)old\modules\ssl\ssl_util_ssl.c (+37 lines)
Line 215 Link Here
215
static char *asn1_ipadd_to_utf8(apr_pool_t *pool, ASN1_OCTET_STRING *ip)
216
{
217
      char *result = NULL;
218
      int len;
219
      unsigned char *p;
220
      char oline[64], htmp[5];
221
      int i;
222
      len = 0;
223
      p = ip->data;
224
      if (ip->length == 4)
225
              len += BIO_snprintf(oline, sizeof oline, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
226
      else if (ip->length == 16) {
227
              oline[0] = 0;
228
              for (i = 0; i < 8; i++) {
229
                      len += BIO_snprintf(htmp, sizeof htmp, "%x", p[0] << 8 | p[1]);
230
                      p += 2;
231
                      strcat(oline, htmp);
232
                      if (i != 7) {
233
                              strcat(oline, ":");
234
                              len++;
235
                      }
236
              }
237
      }
238
      if (len > 0) {
239
              result = apr_palloc(pool, len + 1);
240
              strncpy(result, oline, len);
241
              result[len] = NUL;
242
      }
243
      return result;
244
}
Line 330 Link Here
362
                break;
363
            case GEN_IPADD:
364
                if (((idx == -1) || (n == idx)) &&
365
                    (utf8str = asn1_ipadd_to_utf8(p, name->d.iPAddress))) {
366
                    APR_ARRAY_PUSH(*entries, const char *) = utf8str;
367
                }
368
                n++;

Return to bug 60456