Skip navigation links

Oracle Fusion Middleware Web Services Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1.9)

E56326-01


oracle.security.xmlsec.wss.swa
Class MimeHeaderC14N

java.lang.Object
  extended by oracle.security.xmlsec.wss.swa.MimeHeaderC14N


public class MimeHeaderC14N
extends java.lang.Object

Utilities for Mime Header canonicalization following the SWA 1.1 spec

5.4.1 MIME header canonicalization

The result of MIME header canonicalization is a UTF-8 encoded octet stream.

Each of the MIME headers listed for the Attachment-Complete transform MUST be canonicalized as part of that transform processing, as outlined in this section. This means the transform MUST perform the following actions in interpreting the MIME headers for signature creation or verification (this order is not prescriptive as long as the same result is obtained)

Since:
release specific (what release of product did this appear in)
Version:
$Header: entsec_ldap/java/src/oracle/security/xmlsec/wss/swa/MimeHeaderC14N.java /st_entsec_11.1.1.7.0/1 2012/11/01 06:55:07 abhyadav Exp $

Constructor Summary
MimeHeaderC14N()
           

 

Method Summary
static java.lang.String canonicalizeContentDescription(java.lang.String contentDescription)
          Canonicalize the Content-Description by doing an RFC 2047 decode
static java.lang.String canonicalizeContentDisposition(java.lang.String contentDisposition)
          Canonicalize the Content-Dispostion by removing any comments, lowercase the disposition type and parameter name, sorting the parameters by name, and uniformly putting in double quotes
static java.lang.String canonicalizeContentId(java.lang.String contentId)
          Canonicalize the ContentId, by parsing the address into its constituent parts.
static java.lang.String canonicalizeContentLocation(java.lang.String contentLocation, boolean decode)
          Canonicalize the Content-Location, by removing any comments and any folding white space, and optionally decoding it
static java.lang.String canonicalizeContentType(java.lang.String contentType)
          Canonicalize the Content-Type, by lowercasing he type and subtype, sorting the parameters, and lowercasing the parameter names
static java.lang.String canonicalizeHeader(java.lang.String header)
           
static java.lang.String canonicalizeMimeHeaders(javax.xml.soap.AttachmentPart ap)
          Canonicalize the 5 mime headers in the following order Content-Description Content-Disposition Content-ID Content-Location Content-Type
static java.lang.String canonicalizeParameterList(ParameterList plist)
           
static java.lang.String quote(java.lang.String s)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

MimeHeaderC14N

public MimeHeaderC14N()

Method Detail

canonicalizeContentLocation

public static java.lang.String canonicalizeContentLocation(java.lang.String contentLocation,
                                                           boolean decode)
                                                    throws ParseException,
                                                           java.io.UnsupportedEncodingException
Canonicalize the Content-Location, by removing any comments and any folding white space, and optionally decoding it

According to RFC 2557

   content-location := "Content-Location:" [CFWS] URI [CFWS] 
 
where CFWS is comments and folding white space. If the URI has any non ASCII characters they must be encoded according to RFC 2047.e.g
   =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=
 
Parameters:
contentLocation - original header
decode - whether to decode the RFC 2047 encoding
Returns:
Throws:
ParseException
java.io.UnsupportedEncodingException

canonicalizeContentDisposition

public static java.lang.String canonicalizeContentDisposition(java.lang.String contentDisposition)
                                                       throws ParseException
Canonicalize the Content-Dispostion by removing any comments, lowercase the disposition type and parameter name, sorting the parameters by name, and uniformly putting in double quotes
Parameters:
contentDisposition - original header
decode -
Returns:
Throws:
ParseException

canonicalizeContentDescription

public static java.lang.String canonicalizeContentDescription(java.lang.String contentDescription)
                                                       throws java.io.UnsupportedEncodingException
Canonicalize the Content-Description by doing an RFC 2047 decode
Parameters:
contentDescription - original header
Returns:
Throws:
java.io.UnsupportedEncodingException

canonicalizeContentId

public static java.lang.String canonicalizeContentId(java.lang.String contentId)
                                              throws AddressException
Canonicalize the ContentId, by parsing the address into its constituent parts.
Parameters:
contentId - original header
Returns:
Throws:
AddressException

canonicalizeContentType

public static java.lang.String canonicalizeContentType(java.lang.String contentType)
                                                throws ParseException
Canonicalize the Content-Type, by lowercasing he type and subtype, sorting the parameters, and lowercasing the parameter names
Parameters:
contentType - original header
Returns:
Throws:
ParseException

canonicalizeParameterList

public static java.lang.String canonicalizeParameterList(ParameterList plist)

quote

public static java.lang.String quote(java.lang.String s)

canonicalizeHeader

public static java.lang.String canonicalizeHeader(java.lang.String header)

canonicalizeMimeHeaders

public static java.lang.String canonicalizeMimeHeaders(javax.xml.soap.AttachmentPart ap)
                                                throws java.io.UnsupportedEncodingException,
                                                       ParseException,
                                                       AddressException
Canonicalize the 5 mime headers in the following order
Returns:
Throws:
java.io.UnsupportedEncodingException
ParseException
AddressException

Skip navigation links

Oracle Fusion Middleware Web Services Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1.9)

E56326-01


Copyright © 2005, 2015 , Oracle. All rights reserved.