View | Details | Raw Unified | Return to bug 228898 | Differences between
and this patch

Collapse All | Expand All

(-)snmplib/snmp_openssl.c (-7 / +7 lines)
Lines 47-53 void netsnmp_init_openssl(void) { Link Here
47
    DEBUGMSGTL(("snmp_openssl", "initializing\n"));
47
    DEBUGMSGTL(("snmp_openssl", "initializing\n"));
48
48
49
    /* Initializing OpenSSL */
49
    /* Initializing OpenSSL */
50
    SSL_library_init();
50
    OPENSSL_init_ssl(0, NULL);
51
    SSL_load_error_strings();
51
    SSL_load_error_strings();
52
    ERR_load_BIO_strings();
52
    ERR_load_BIO_strings();
53
    OpenSSL_add_all_algorithms();
53
    OpenSSL_add_all_algorithms();
Lines 164-174 netsnmp_openssl_cert_dump_names(X509 *oc Link Here
164
        oname_entry = X509_NAME_get_entry(osubj_name, i);
164
        oname_entry = X509_NAME_get_entry(osubj_name, i);
165
        netsnmp_assert(NULL != oname_entry);
165
        netsnmp_assert(NULL != oname_entry);
166
166
167
        if (oname_entry->value->type != V_ASN1_PRINTABLESTRING)
167
        if (X509_NAME_ENTRY_get_data(oname_entry)->type != V_ASN1_PRINTABLESTRING)
168
            continue;
168
            continue;
169
169
170
        /** get NID */
170
        /** get NID */
171
        onid = OBJ_obj2nid(oname_entry->object);
171
        onid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(oname_entry));
172
        if (onid == NID_undef) {
172
        if (onid == NID_undef) {
173
            prefix_long = prefix_short = "UNKNOWN";
173
            prefix_long = prefix_short = "UNKNOWN";
174
        }
174
        }
Lines 179-187 netsnmp_openssl_cert_dump_names(X509 *oc Link Here
179
179
180
        DEBUGMSGT(("9:cert:dump:names",
180
        DEBUGMSGT(("9:cert:dump:names",
181
                   "[%02d] NID type %d, ASN type %d\n", i, onid,
181
                   "[%02d] NID type %d, ASN type %d\n", i, onid,
182
                   oname_entry->value->type));
182
                   X509_NAME_ENTRY_get_data(oname_entry)->type));
183
        DEBUGMSGT(("9:cert:dump:names", "%s/%s: '%s'\n", prefix_long,
183
        DEBUGMSGT(("9:cert:dump:names", "%s/%s: '%s'\n", prefix_long,
184
                   prefix_short, ASN1_STRING_data(oname_entry->value)));
184
                   prefix_short, ASN1_STRING_data(X509_NAME_ENTRY_get_data(oname_entry))));
185
    }
185
    }
186
}
186
}
187
#endif /* NETSNMP_FEATURE_REMOVE_CERT_DUMP_NAMES */
187
#endif /* NETSNMP_FEATURE_REMOVE_CERT_DUMP_NAMES */
Lines 470-476 netsnmp_openssl_cert_get_hash_type(X509 Link Here
470
    if (NULL == ocert)
470
    if (NULL == ocert)
471
        return 0;
471
        return 0;
472
472
473
    return _nid2ht(OBJ_obj2nid(ocert->sig_alg->algorithm));
473
    return _nid2ht(X509_get_signature_nid(ocert));
474
}
474
}
475
475
476
/**
476
/**
Lines 487-493 netsnmp_openssl_cert_get_fingerprint(X50 Link Here
487
    if (NULL == ocert)
487
    if (NULL == ocert)
488
        return NULL;
488
        return NULL;
489
489
490
    nid = OBJ_obj2nid(ocert->sig_alg->algorithm);
490
    nid = X509_get_signature_nid(ocert);
491
    DEBUGMSGT(("9:openssl:fingerprint", "alg %d, cert nid %d (%d)\n", alg, nid,
491
    DEBUGMSGT(("9:openssl:fingerprint", "alg %d, cert nid %d (%d)\n", alg, nid,
492
               _nid2ht(nid)));
492
               _nid2ht(nid)));
493
        
493
        

Return to bug 228898