diff options
author | lloyd <[email protected]> | 2009-03-30 18:27:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-03-30 18:27:18 +0000 |
commit | 96d6eb6f29c55e16a37cf11899547886f735b065 (patch) | |
tree | 9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/cert/x509/x509find.cpp | |
parent | 3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (diff) |
Thomas Moschny passed along a request from the Fedora packagers which came
up during the Fedora submission review, that each source file include some
text about the license. One handy Perl script later and each file now has
the line
Distributed under the terms of the Botan license
after the copyright notices.
While I was in there modifying every file anyway, I also stripped out the
remainder of the block comments (lots of astericks before and after the
text); this is stylistic thing I picked up when I was first learning C++
but in retrospect it is not a good style as the structure makes it harder
to modify comments (with the result that comments become fewer, shorter and
are less likely to be updated, which are not good things).
Diffstat (limited to 'src/cert/x509/x509find.cpp')
-rw-r--r-- | src/cert/x509/x509find.cpp | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/src/cert/x509/x509find.cpp b/src/cert/x509/x509find.cpp index 83d02449d..257367da9 100644 --- a/src/cert/x509/x509find.cpp +++ b/src/cert/x509/x509find.cpp @@ -1,7 +1,9 @@ -/************************************************* -* X.509 Certificate Store Searching Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* X.509 Certificate Store Searching +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/x509find.h> #include <botan/charset.h> @@ -11,9 +13,9 @@ namespace Botan { namespace { -/************************************************* -* Compare based on case-insensive substrings * -*************************************************/ +/* +* Compare based on case-insensive substrings +*/ bool substring_match(const std::string& searching_for, const std::string& found) { @@ -23,9 +25,9 @@ bool substring_match(const std::string& searching_for, return false; } -/************************************************* -* Compare based on case-insensive match * -*************************************************/ +/* +* Compare based on case-insensive match +*/ bool ignore_case(const std::string& searching_for, const std::string& found) { if(searching_for.size() != found.size()) @@ -37,9 +39,9 @@ bool ignore_case(const std::string& searching_for, const std::string& found) } -/************************************************* -* Search based on the contents of a DN entry * -*************************************************/ +/* +* Search based on the contents of a DN entry +*/ bool DN_Check::match(const X509_Certificate& cert) const { std::vector<std::string> info = cert.subject_info(dn_entry); @@ -50,9 +52,9 @@ bool DN_Check::match(const X509_Certificate& cert) const return false; } -/************************************************* -* DN_Check Constructor * -*************************************************/ +/* +* DN_Check Constructor +*/ DN_Check::DN_Check(const std::string& dn_entry, const std::string& looking_for, compare_fn func) { @@ -61,9 +63,9 @@ DN_Check::DN_Check(const std::string& dn_entry, const std::string& looking_for, compare = func; } -/************************************************* -* DN_Check Constructor * -*************************************************/ +/* +* DN_Check Constructor +*/ DN_Check::DN_Check(const std::string& dn_entry, const std::string& looking_for, Search_Type method) { @@ -78,9 +80,9 @@ DN_Check::DN_Check(const std::string& dn_entry, const std::string& looking_for, throw Invalid_Argument("Unknown method argument to DN_Check()"); } -/************************************************* -* Match by issuer and serial number * -*************************************************/ +/* +* Match by issuer and serial number +*/ bool IandS_Match::match(const X509_Certificate& cert) const { if(cert.serial_number() != serial) @@ -88,9 +90,9 @@ bool IandS_Match::match(const X509_Certificate& cert) const return (cert.issuer_dn() == issuer); } -/************************************************* -* IandS_Match Constructor * -*************************************************/ +/* +* IandS_Match Constructor +*/ IandS_Match::IandS_Match(const X509_DN& issuer, const MemoryRegion<byte>& serial) { @@ -98,9 +100,9 @@ IandS_Match::IandS_Match(const X509_DN& issuer, this->serial = serial; } -/************************************************* -* Match by subject key identifier * -*************************************************/ +/* +* Match by subject key identifier +*/ bool SKID_Match::match(const X509_Certificate& cert) const { return (cert.subject_key_id() == skid); |