equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2019, 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 |
345 * @param inStream an input stream with the certificate data. |
345 * @param inStream an input stream with the certificate data. |
346 * |
346 * |
347 * @return a certificate object initialized with the data |
347 * @return a certificate object initialized with the data |
348 * from the input stream. |
348 * from the input stream. |
349 * |
349 * |
350 * @exception CertificateException on parsing errors. |
350 * @throws CertificateException on parsing errors. |
351 */ |
351 */ |
352 public final Certificate generateCertificate(InputStream inStream) |
352 public final Certificate generateCertificate(InputStream inStream) |
353 throws CertificateException |
353 throws CertificateException |
354 { |
354 { |
355 return certFacSpi.engineGenerateCertificate(inStream); |
355 return certFacSpi.engineGenerateCertificate(inStream); |
383 * the {@link #getCertPathEncodings getCertPathEncodings} method. |
383 * the {@link #getCertPathEncodings getCertPathEncodings} method. |
384 * |
384 * |
385 * @param inStream an {@code InputStream} containing the data |
385 * @param inStream an {@code InputStream} containing the data |
386 * @return a {@code CertPath} initialized with the data from the |
386 * @return a {@code CertPath} initialized with the data from the |
387 * {@code InputStream} |
387 * {@code InputStream} |
388 * @exception CertificateException if an exception occurs while decoding |
388 * @throws CertificateException if an exception occurs while decoding |
389 * @since 1.4 |
389 * @since 1.4 |
390 */ |
390 */ |
391 public final CertPath generateCertPath(InputStream inStream) |
391 public final CertPath generateCertPath(InputStream inStream) |
392 throws CertificateException |
392 throws CertificateException |
393 { |
393 { |
405 * |
405 * |
406 * @param inStream an {@code InputStream} containing the data |
406 * @param inStream an {@code InputStream} containing the data |
407 * @param encoding the encoding used for the data |
407 * @param encoding the encoding used for the data |
408 * @return a {@code CertPath} initialized with the data from the |
408 * @return a {@code CertPath} initialized with the data from the |
409 * {@code InputStream} |
409 * {@code InputStream} |
410 * @exception CertificateException if an exception occurs while decoding or |
410 * @throws CertificateException if an exception occurs while decoding or |
411 * the encoding requested is not supported |
411 * the encoding requested is not supported |
412 * @since 1.4 |
412 * @since 1.4 |
413 */ |
413 */ |
414 public final CertPath generateCertPath(InputStream inStream, |
414 public final CertPath generateCertPath(InputStream inStream, |
415 String encoding) throws CertificateException |
415 String encoding) throws CertificateException |
426 * {@code List} object. |
426 * {@code List} object. |
427 * |
427 * |
428 * @param certificates a {@code List} of {@code Certificate}s |
428 * @param certificates a {@code List} of {@code Certificate}s |
429 * @return a {@code CertPath} initialized with the supplied list of |
429 * @return a {@code CertPath} initialized with the supplied list of |
430 * certificates |
430 * certificates |
431 * @exception CertificateException if an exception occurs |
431 * @throws CertificateException if an exception occurs |
432 * @since 1.4 |
432 * @since 1.4 |
433 */ |
433 */ |
434 public final CertPath |
434 public final CertPath |
435 generateCertPath(List<? extends Certificate> certificates) |
435 generateCertPath(List<? extends Certificate> certificates) |
436 throws CertificateException |
436 throws CertificateException |
469 * |
469 * |
470 * @return a (possibly empty) collection view of |
470 * @return a (possibly empty) collection view of |
471 * java.security.cert.Certificate objects |
471 * java.security.cert.Certificate objects |
472 * initialized with the data from the input stream. |
472 * initialized with the data from the input stream. |
473 * |
473 * |
474 * @exception CertificateException on parsing errors. |
474 * @throws CertificateException on parsing errors. |
475 */ |
475 */ |
476 public final Collection<? extends Certificate> generateCertificates |
476 public final Collection<? extends Certificate> generateCertificates |
477 (InputStream inStream) throws CertificateException { |
477 (InputStream inStream) throws CertificateException { |
478 return certFacSpi.engineGenerateCertificates(inStream); |
478 return certFacSpi.engineGenerateCertificates(inStream); |
479 } |
479 } |
503 * @param inStream an input stream with the CRL data. |
503 * @param inStream an input stream with the CRL data. |
504 * |
504 * |
505 * @return a CRL object initialized with the data |
505 * @return a CRL object initialized with the data |
506 * from the input stream. |
506 * from the input stream. |
507 * |
507 * |
508 * @exception CRLException on parsing errors. |
508 * @throws CRLException on parsing errors. |
509 */ |
509 */ |
510 public final CRL generateCRL(InputStream inStream) |
510 public final CRL generateCRL(InputStream inStream) |
511 throws CRLException |
511 throws CRLException |
512 { |
512 { |
513 return certFacSpi.engineGenerateCRL(inStream); |
513 return certFacSpi.engineGenerateCRL(inStream); |
542 * |
542 * |
543 * @return a (possibly empty) collection view of |
543 * @return a (possibly empty) collection view of |
544 * java.security.cert.CRL objects initialized with the data from the input |
544 * java.security.cert.CRL objects initialized with the data from the input |
545 * stream. |
545 * stream. |
546 * |
546 * |
547 * @exception CRLException on parsing errors. |
547 * @throws CRLException on parsing errors. |
548 */ |
548 */ |
549 public final Collection<? extends CRL> generateCRLs(InputStream inStream) |
549 public final Collection<? extends CRL> generateCRLs(InputStream inStream) |
550 throws CRLException { |
550 throws CRLException { |
551 return certFacSpi.engineGenerateCRLs(inStream); |
551 return certFacSpi.engineGenerateCRLs(inStream); |
552 } |
552 } |