Skip to content

Commit

Permalink
Potential fix for ndg issue found at andresriancho#10538
Browse files Browse the repository at this point in the history
  • Loading branch information
andresriancho committed Aug 10, 2015
1 parent 794d2e2 commit db17c9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 133 deletions.
13 changes: 6 additions & 7 deletions w3af/core/data/url/openssl/ssl_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
import socket
import select
import OpenSSL
import subj_alt_name
import pyasn1.codec.der.decoder

from ndg.httpsclient.subj_alt_name import SubjectAltName
from pyasn1.codec.der.decoder import decode as der_decoder

CERT_NONE = ssl.CERT_NONE
CERT_OPTIONAL = ssl.CERT_OPTIONAL
Expand Down Expand Up @@ -137,7 +138,7 @@ def getpeercert(self, binary_form=False):
x509)

dns_name = []
general_names = subj_alt_name.SubjectAltName()
general_names = SubjectAltName()

for i in range(x509.get_extension_count()):
ext = x509.get_extension(i)
Expand All @@ -146,12 +147,10 @@ def getpeercert(self, binary_form=False):
continue

ext_dat = ext.get_data()
der_decoder = pyasn1.codec.der.decoder
decoded_dat = der_decoder.decode(ext_dat,
asn1Spec=general_names)
decoded_dat = der_decoder(ext_dat, asn1Spec=general_names)

for name in decoded_dat:
if not isinstance(name, subj_alt_name.SubjectAltName):
if not isinstance(name, SubjectAltName):
continue
for entry in range(len(name)):
component = name.getComponentByPosition(entry)
Expand Down
126 changes: 0 additions & 126 deletions w3af/core/data/url/openssl/subj_alt_name.py

This file was deleted.

0 comments on commit db17c9d

Please sign in to comment.