equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
512 provider = p; |
512 provider = p; |
513 } |
513 } |
514 |
514 |
515 private SunPKCS11 newProvider() { |
515 private SunPKCS11 newProvider() { |
516 try { |
516 try { |
517 InputStream in = new ByteArrayInputStream(config.getBytes("UTF8")); |
517 return new SunPKCS11(new Config("--" + config)); |
518 return new SunPKCS11(in); |
|
519 } catch (Exception e) { |
518 } catch (Exception e) { |
520 // XXX |
519 // XXX |
521 throw new ProviderException(e); |
520 throw new ProviderException(e); |
522 } |
521 } |
523 } |
522 } |