aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-10-02 16:53:07 +0000
committerRob Austein <sra@hactrn.net>2007-10-02 16:53:07 +0000
commitadaa0c63c4d878174993b78d10bbe1fb0f09ac44 (patch)
tree2139e0c0b940dd3aa141215d8ebdbfaa79f20550
parentd2cde7f086c89ec26105980b76a9b9b99e12b2e2 (diff)
Nit
svn path=/scripts/rpki/x509.py; revision=1077
-rw-r--r--scripts/rpki/x509.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/rpki/x509.py b/scripts/rpki/x509.py
index 9c0aa2e8..58c1ab06 100644
--- a/scripts/rpki/x509.py
+++ b/scripts/rpki/x509.py
@@ -23,7 +23,8 @@ class PEM_converter(object):
self.e = "-----END %s-----" % kind
def looks_like_PEM(self, text):
- return text.find(self.b) >= 0 and text.find(self.e) > 0
+ b = text.find(self.b)
+ return b >= 0 and text.find(self.e) > b + len(self.b)
def to_DER(self, pem):
"""Convert from PEM to DER."""