| OLD | NEW |
| 1 /* ***** BEGIN LICENSE BLOCK ***** | 1 /* ***** BEGIN LICENSE BLOCK ***** |
| 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 3 * | 3 * |
| 4 * The contents of this file are subject to the Mozilla Public License Version | 4 * The contents of this file are subject to the Mozilla Public License Version |
| 5 * 1.1 (the "License"); you may not use this file except in compliance with | 5 * 1.1 (the "License"); you may not use this file except in compliance with |
| 6 * the License. You may obtain a copy of the License at | 6 * the License. You may obtain a copy of the License at |
| 7 * http://www.mozilla.org/MPL/ | 7 * http://www.mozilla.org/MPL/ |
| 8 * | 8 * |
| 9 * Software distributed under the License is distributed on an "AS IS" basis, | 9 * Software distributed under the License is distributed on an "AS IS" basis, |
| 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include <pk11pub.h> | 40 #include <pk11pub.h> |
| 41 #include <pkcs12.h> | 41 #include <pkcs12.h> |
| 42 #include <p12plcy.h> | 42 #include <p12plcy.h> |
| 43 #include <secerr.h> | 43 #include <secerr.h> |
| 44 | 44 |
| 45 #include "base/lazy_instance.h" | 45 #include "base/lazy_instance.h" |
| 46 #include "base/logging.h" | 46 #include "base/logging.h" |
| 47 #include "base/string_util.h" | 47 #include "base/string_util.h" |
| 48 #include "crypto/nss_util_internal.h" | 48 #include "crypto/nss_util_internal.h" |
| 49 #include "net/base/net_errors.h" | 49 #include "net/base/net_errors.h" |
| 50 #include "net/base/x509_certificate.h" | 50 #include "net/cert/x509_certificate.h" |
| 51 | 51 |
| 52 namespace mozilla_security_manager { | 52 namespace mozilla_security_manager { |
| 53 | 53 |
| 54 namespace { | 54 namespace { |
| 55 | 55 |
| 56 // unicodeToItem | 56 // unicodeToItem |
| 57 // | 57 // |
| 58 // For the NSS PKCS#12 library, must convert PRUnichars (shorts) to | 58 // For the NSS PKCS#12 library, must convert PRUnichars (shorts) to |
| 59 // a buffer of octets. Must handle byte order correctly. | 59 // a buffer of octets. Must handle byte order correctly. |
| 60 // TODO: Is there a Mozilla way to do this? In the string lib? | 60 // TODO: Is there a Mozilla way to do this? In the string lib? |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 finish: | 477 finish: |
| 478 if (srv) | 478 if (srv) |
| 479 LOG(ERROR) << "PKCS#12 export failed with error " << PORT_GetError(); | 479 LOG(ERROR) << "PKCS#12 export failed with error " << PORT_GetError(); |
| 480 if (ecx) | 480 if (ecx) |
| 481 SEC_PKCS12DestroyExportContext(ecx); | 481 SEC_PKCS12DestroyExportContext(ecx); |
| 482 SECITEM_ZfreeItem(&unicodePw, PR_FALSE); | 482 SECITEM_ZfreeItem(&unicodePw, PR_FALSE); |
| 483 return return_count; | 483 return return_count; |
| 484 } | 484 } |
| 485 | 485 |
| 486 } // namespace mozilla_security_manager | 486 } // namespace mozilla_security_manager |
| OLD | NEW |