| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This utility can dump the contents of CRL set, optionally augmented with a | 5 // This utility can dump the contents of CRL set, optionally augmented with a |
| 6 // delta CRL set. | 6 // delta CRL set. |
| 7 | 7 |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 #include <stdlib.h> | 10 #include <stdlib.h> |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/at_exit.h" | 14 #include "base/at_exit.h" |
| 15 #include "base/file_util.h" | 15 #include "base/files/file_util.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
| 18 #include "net/cert/crl_set.h" | 18 #include "net/cert/crl_set.h" |
| 19 #include "net/cert/crl_set_storage.h" | 19 #include "net/cert/crl_set_storage.h" |
| 20 | 20 |
| 21 static int Usage(const char* argv0) { | 21 static int Usage(const char* argv0) { |
| 22 fprintf(stderr, "Usage: %s <crl-set file> [<delta file>]" | 22 fprintf(stderr, "Usage: %s <crl-set file> [<delta file>]" |
| 23 " [<resulting output file>]\n", argv0); | 23 " [<resulting output file>]\n", argv0); |
| 24 return 1; | 24 return 1; |
| 25 } | 25 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 i++) { | 75 i++) { |
| 76 printf("%s\n", base::HexEncode(i->first.data(), i->first.size()).c_str()); | 76 printf("%s\n", base::HexEncode(i->first.data(), i->first.size()).c_str()); |
| 77 for (std::vector<std::string>::const_iterator j = i->second.begin(); | 77 for (std::vector<std::string>::const_iterator j = i->second.begin(); |
| 78 j != i->second.end(); j++) { | 78 j != i->second.end(); j++) { |
| 79 printf(" %s\n", base::HexEncode(j->data(), j->size()).c_str()); | 79 printf(" %s\n", base::HexEncode(j->data(), j->size()).c_str()); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 return 0; | 83 return 0; |
| 84 } | 84 } |
| OLD | NEW |